// begin jquery.js
(function(e,t){var n,r,i=typeof t,o=e.location,a=e.document,s=a.documentElement,l=e.jQuery,u=e.$,c={},p=[],f="1.10.0",d=p.concat,h=p.push,g=p.slice,m=p.indexOf,y=c.toString,v=c.hasOwnProperty,b=f.trim,x=function(e,t){return new x.fn.init(e,t,r)},w=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,T=/\S+/g,C=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,N=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,k=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,E=/^[\],:{}\s]*$/,S=/(?:^|:|,)(?:\s*\[)+/g,A=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,j=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,D=/^-ms-/,L=/-([\da-z])/gi,H=function(e,t){return t.toUpperCase()},q=function(e){(a.addEventListener||"load"===e.type||"complete"===a.readyState)&&(_(),x.ready())},_=function(){a.addEventListener?(a.removeEventListener("DOMContentLoaded",q,!1),e.removeEventListener("load",q,!1)):(a.detachEvent("onreadystatechange",q),e.detachEvent("onload",q))};x.fn=x.prototype={jquery:f,constructor:x,init:function(e,n,r){var i,o;if(!e)return this;if("string"==typeof e){if(i="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:N.exec(e),!i||!i[1]&&n)return!n||n.jquery?(n||r).find(e):this.constructor(n).find(e);if(i[1]){if(n=n instanceof x?n[0]:n,x.merge(this,x.parseHTML(i[1],n&&n.nodeType?n.ownerDocument||n:a,!0)),k.test(i[1])&&x.isPlainObject(n))for(i in n)x.isFunction(this[i])?this[i](n[i]):this.attr(i,n[i]);return this}if(o=a.getElementById(i[2]),o&&o.parentNode){if(o.id!==i[2])return r.find(e);this.length=1,this[0]=o}return this.context=a,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):x.isFunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),x.makeArray(e,this))},selector:"",length:0,toArray:function(){return g.call(this)},get:function(e){return null==e?this.toArray():0>e?this[this.length+e]:this[e]},pushStack:function(e){var t=x.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return x.each(this,e,t)},ready:function(e){return x.ready.promise().done(e),this},slice:function(){return this.pushStack(g.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},map:function(e){return this.pushStack(x.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:h,sort:[].sort,splice:[].splice},x.fn.init.prototype=x.fn,x.extend=x.fn.extend=function(){var e,n,r,i,o,a,s=arguments[0]||{},l=1,u=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},l=2),"object"==typeof s||x.isFunction(s)||(s={}),u===l&&(s=this,--l);u>l;l++)if(null!=(o=arguments[l]))for(i in o)e=s[i],r=o[i],s!==r&&(c&&r&&(x.isPlainObject(r)||(n=x.isArray(r)))?(n?(n=!1,a=e&&x.isArray(e)?e:[]):a=e&&x.isPlainObject(e)?e:{},s[i]=x.extend(c,a,r)):r!==t&&(s[i]=r));return s},x.extend({expando:"jQuery"+(f+Math.random()).replace(/\D/g,""),noConflict:function(t){return e.$===x&&(e.$=u),t&&e.jQuery===x&&(e.jQuery=l),x},isReady:!1,readyWait:1,holdReady:function(e){e?x.readyWait++:x.ready(!0)},ready:function(e){if(e===!0?!--x.readyWait:!x.isReady){if(!a.body)return setTimeout(x.ready);x.isReady=!0,e!==!0&&--x.readyWait>0||(n.resolveWith(a,[x]),x.fn.trigger&&x(a).trigger("ready").off("ready"))}},isFunction:function(e){return"function"===x.type(e)},isArray:Array.isArray||function(e){return"array"===x.type(e)},isWindow:function(e){return null!=e&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?c[y.call(e)]||"object":typeof e},isPlainObject:function(e){var n;if(!e||"object"!==x.type(e)||e.nodeType||x.isWindow(e))return!1;try{if(e.constructor&&!v.call(e,"constructor")&&!v.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(r){return!1}if(x.support.ownLast)for(n in e)return v.call(e,n);for(n in e);return n===t||v.call(e,n)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw Error(e)},parseHTML:function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||a;var r=k.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=x.buildFragment([e],t,i),i&&x(i).remove(),x.merge([],r.childNodes))},parseJSON:function(n){return e.JSON&&e.JSON.parse?e.JSON.parse(n):null===n?n:"string"==typeof n&&(n=x.trim(n),n&&E.test(n.replace(A,"@").replace(j,"]").replace(S,"")))?Function("return "+n)():(x.error("Invalid JSON: "+n),t)},parseXML:function(n){var r,i;if(!n||"string"!=typeof n)return null;try{e.DOMParser?(i=new DOMParser,r=i.parseFromString(n,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(n))}catch(o){r=t}return r&&r.documentElement&&!r.getElementsByTagName("parsererror").length||x.error("Invalid XML: "+n),r},noop:function(){},globalEval:function(t){t&&x.trim(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(D,"ms-").replace(L,H)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,n){var r,i=0,o=e.length,a=M(e);if(n){if(a){for(;o>i;i++)if(r=t.apply(e[i],n),r===!1)break}else for(i in e)if(r=t.apply(e[i],n),r===!1)break}else if(a){for(;o>i;i++)if(r=t.call(e[i],i,e[i]),r===!1)break}else for(i in e)if(r=t.call(e[i],i,e[i]),r===!1)break;return e},trim:b&&!b.call("\ufeff\u00a0")?function(e){return null==e?"":b.call(e)}:function(e){return null==e?"":(e+"").replace(C,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(M(Object(e))?x.merge(n,"string"==typeof e?[e]:e):h.call(n,e)),n},inArray:function(e,t,n){var r;if(t){if(m)return m.call(t,e,n);for(r=t.length,n=n?0>n?Math.max(0,r+n):n:0;r>n;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,n){var r=n.length,i=e.length,o=0;if("number"==typeof r)for(;r>o;o++)e[i++]=n[o];else while(n[o]!==t)e[i++]=n[o++];return e.length=i,e},grep:function(e,t,n){var r,i=[],o=0,a=e.length;for(n=!!n;a>o;o++)r=!!t(e[o],o),n!==r&&i.push(e[o]);return i},map:function(e,t,n){var r,i=0,o=e.length,a=M(e),s=[];if(a)for(;o>i;i++)r=t(e[i],i,n),null!=r&&(s[s.length]=r);else for(i in e)r=t(e[i],i,n),null!=r&&(s[s.length]=r);return d.apply([],s)},guid:1,proxy:function(e,n){var r,i,o;return"string"==typeof n&&(o=e[n],n=e,e=o),x.isFunction(e)?(r=g.call(arguments,2),i=function(){return e.apply(n||this,r.concat(g.call(arguments)))},i.guid=e.guid=e.guid||x.guid++,i):t},access:function(e,n,r,i,o,a,s){var l=0,u=e.length,c=null==r;if("object"===x.type(r)){o=!0;for(l in r)x.access(e,n,l,r[l],!0,a,s)}else if(i!==t&&(o=!0,x.isFunction(i)||(s=!0),c&&(s?(n.call(e,i),n=null):(c=n,n=function(e,t,n){return c.call(x(e),n)})),n))for(;u>l;l++)n(e[l],r,s?i:i.call(e[l],l,n(e[l],r)));return o?e:c?n.call(e):u?n(e[0],r):a},now:function(){return(new Date).getTime()},swap:function(e,t,n,r){var i,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];i=n.apply(e,r||[]);for(o in t)e.style[o]=a[o];return i}}),x.ready.promise=function(t){if(!n)if(n=x.Deferred(),"complete"===a.readyState)setTimeout(x.ready);else if(a.addEventListener)a.addEventListener("DOMContentLoaded",q,!1),e.addEventListener("load",q,!1);else{a.attachEvent("onreadystatechange",q),e.attachEvent("onload",q);var r=!1;try{r=null==e.frameElement&&a.documentElement}catch(i){}r&&r.doScroll&&function o(){if(!x.isReady){try{r.doScroll("left")}catch(e){return setTimeout(o,50)}_(),x.ready()}}()}return n.promise(t)},x.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){c["[object "+t+"]"]=t.toLowerCase()});function M(e){var t=e.length,n=x.type(e);return x.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||"function"!==n&&(0===t||"number"==typeof t&&t>0&&t-1 in e)}r=x(a),function(e,t){var n,r,i,o,a,s,l,u,c,p,f,d,h,g,m,y,v,b="sizzle"+-new Date,w=e.document,T=0,C=0,N=lt(),k=lt(),E=lt(),S=!1,A=function(){return 0},j=typeof t,D=1<<31,L={}.hasOwnProperty,H=[],q=H.pop,_=H.push,M=H.push,O=H.slice,F=H.indexOf||function(e){var t=0,n=this.length;for(;n>t;t++)if(this[t]===e)return t;return-1},B="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",P="[\\x20\\t\\r\\n\\f]",R="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",W=R.replace("w","w#"),$="\\["+P+"*("+R+")"+P+"*(?:([*^$|!~]?=)"+P+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+W+")|)|)"+P+"*\\]",I=":("+R+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+$.replace(3,8)+")*)|.*)\\)|)",z=RegExp("^"+P+"+|((?:^|[^\\\\])(?:\\\\.)*)"+P+"+$","g"),X=RegExp("^"+P+"*,"+P+"*"),U=RegExp("^"+P+"*([>+~]|"+P+")"+P+"*"),V=RegExp(P+"*[+~]"),Y=RegExp("="+P+"*([^\\]'\"]*)"+P+"*\\]","g"),J=RegExp(I),G=RegExp("^"+W+"$"),Q={ID:RegExp("^#("+R+")"),CLASS:RegExp("^\\.("+R+")"),TAG:RegExp("^("+R.replace("w","w*")+")"),ATTR:RegExp("^"+$),PSEUDO:RegExp("^"+I),CHILD:RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+P+"*(even|odd|(([+-]|)(\\d*)n|)"+P+"*(?:([+-]|)"+P+"*(\\d+)|))"+P+"*\\)|)","i"),bool:RegExp("^(?:"+B+")$","i"),needsContext:RegExp("^"+P+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+P+"*((?:-\\d)?\\d*)"+P+"*\\)|)(?=[^-]|$)","i")},K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,et=/^(?:input|select|textarea|button)$/i,tt=/^h\d$/i,nt=/'|\\/g,rt=RegExp("\\\\([\\da-f]{1,6}"+P+"?|("+P+")|.)","ig"),it=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:0>r?String.fromCharCode(r+65536):String.fromCharCode(55296|r>>10,56320|1023&r)};try{M.apply(H=O.call(w.childNodes),w.childNodes),H[w.childNodes.length].nodeType}catch(ot){M={apply:H.length?function(e,t){_.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function at(e,t,n,i){var o,a,s,l,u,c,d,m,y,x;if((t?t.ownerDocument||t:w)!==f&&p(t),t=t||f,n=n||[],!e||"string"!=typeof e)return n;if(1!==(l=t.nodeType)&&9!==l)return[];if(h&&!i){if(o=Z.exec(e))if(s=o[1]){if(9===l){if(a=t.getElementById(s),!a||!a.parentNode)return n;if(a.id===s)return n.push(a),n}else if(t.ownerDocument&&(a=t.ownerDocument.getElementById(s))&&v(t,a)&&a.id===s)return n.push(a),n}else{if(o[2])return M.apply(n,t.getElementsByTagName(e)),n;if((s=o[3])&&r.getElementsByClassName&&t.getElementsByClassName)return M.apply(n,t.getElementsByClassName(s)),n}if(r.qsa&&(!g||!g.test(e))){if(m=d=b,y=t,x=9===l&&e,1===l&&"object"!==t.nodeName.toLowerCase()){c=bt(e),(d=t.getAttribute("id"))?m=d.replace(nt,"\\$&"):t.setAttribute("id",m),m="[id='"+m+"'] ",u=c.length;while(u--)c[u]=m+xt(c[u]);y=V.test(e)&&t.parentNode||t,x=c.join(",")}if(x)try{return M.apply(n,y.querySelectorAll(x)),n}catch(T){}finally{d||t.removeAttribute("id")}}}return At(e.replace(z,"$1"),t,n,i)}function st(e){return K.test(e+"")}function lt(){var e=[];function t(n,r){return e.push(n+=" ")>o.cacheLength&&delete t[e.shift()],t[n]=r}return t}function ut(e){return e[b]=!0,e}function ct(e){var t=f.createElement("div");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function pt(e,t,n){e=e.split("|");var r,i=e.length,a=n?null:t;while(i--)(r=o.attrHandle[e[i]])&&r!==t||(o.attrHandle[e[i]]=a)}function ft(e,t){var n=e.getAttributeNode(t);return n&&n.specified?n.value:e[t]===!0?t.toLowerCase():null}function dt(e,t){return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}function ht(e){return"input"===e.nodeName.toLowerCase()?e.defaultValue:t}function gt(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||D)-(~e.sourceIndex||D);if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function mt(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function yt(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function vt(e){return ut(function(t){return t=+t,ut(function(n,r){var i,o=e([],n.length,t),a=o.length;while(a--)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}s=at.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},r=at.support={},p=at.setDocument=function(e){var n=e?e.ownerDocument||e:w;return n!==f&&9===n.nodeType&&n.documentElement?(f=n,d=n.documentElement,h=!s(n),r.attributes=ct(function(e){return e.innerHTML="<a href='#'></a>",pt("type|href|height|width",dt,"#"===e.firstChild.getAttribute("href")),pt(B,ft,null==e.getAttribute("disabled")),e.className="i",!e.getAttribute("className")}),r.input=ct(function(e){return e.innerHTML="<input>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")}),pt("value",ht,r.attributes&&r.input),r.getElementsByTagName=ct(function(e){return e.appendChild(n.createComment("")),!e.getElementsByTagName("*").length}),r.getElementsByClassName=ct(function(e){return e.innerHTML="<div class='a'></div><div class='a i'></div>",e.firstChild.className="i",2===e.getElementsByClassName("i").length}),r.getById=ct(function(e){return d.appendChild(e).id=b,!n.getElementsByName||!n.getElementsByName(b).length}),r.getById?(o.find.ID=function(e,t){if(typeof t.getElementById!==j&&h){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},o.filter.ID=function(e){var t=e.replace(rt,it);return function(e){return e.getAttribute("id")===t}}):(delete o.find.ID,o.filter.ID=function(e){var t=e.replace(rt,it);return function(e){var n=typeof e.getAttributeNode!==j&&e.getAttributeNode("id");return n&&n.value===t}}),o.find.TAG=r.getElementsByTagName?function(e,n){return typeof n.getElementsByTagName!==j?n.getElementsByTagName(e):t}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},o.find.CLASS=r.getElementsByClassName&&function(e,n){return typeof n.getElementsByClassName!==j&&h?n.getElementsByClassName(e):t},m=[],g=[],(r.qsa=st(n.querySelectorAll))&&(ct(function(e){e.innerHTML="<select><option selected=''></option></select>",e.querySelectorAll("[selected]").length||g.push("\\["+P+"*(?:value|"+B+")"),e.querySelectorAll(":checked").length||g.push(":checked")}),ct(function(e){var t=n.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("t",""),e.querySelectorAll("[t^='']").length&&g.push("[*^$]="+P+"*(?:''|\"\")"),e.querySelectorAll(":enabled").length||g.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),g.push(",.*:")})),(r.matchesSelector=st(y=d.webkitMatchesSelector||d.mozMatchesSelector||d.oMatchesSelector||d.msMatchesSelector))&&ct(function(e){r.disconnectedMatch=y.call(e,"div"),y.call(e,"[s!='']:x"),m.push("!=",I)}),g=g.length&&RegExp(g.join("|")),m=m.length&&RegExp(m.join("|")),v=st(d.contains)||d.compareDocumentPosition?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},r.sortDetached=ct(function(e){return 1&e.compareDocumentPosition(n.createElement("div"))}),A=d.compareDocumentPosition?function(e,t){if(e===t)return S=!0,0;var i=t.compareDocumentPosition&&e.compareDocumentPosition&&e.compareDocumentPosition(t);return i?1&i||!r.sortDetached&&t.compareDocumentPosition(e)===i?e===n||v(w,e)?-1:t===n||v(w,t)?1:c?F.call(c,e)-F.call(c,t):0:4&i?-1:1:e.compareDocumentPosition?-1:1}:function(e,t){var r,i=0,o=e.parentNode,a=t.parentNode,s=[e],l=[t];if(e===t)return S=!0,0;if(!o||!a)return e===n?-1:t===n?1:o?-1:a?1:c?F.call(c,e)-F.call(c,t):0;if(o===a)return gt(e,t);r=e;while(r=r.parentNode)s.unshift(r);r=t;while(r=r.parentNode)l.unshift(r);while(s[i]===l[i])i++;return i?gt(s[i],l[i]):s[i]===w?-1:l[i]===w?1:0},n):f},at.matches=function(e,t){return at(e,null,null,t)},at.matchesSelector=function(e,t){if((e.ownerDocument||e)!==f&&p(e),t=t.replace(Y,"='$1']"),!(!r.matchesSelector||!h||m&&m.test(t)||g&&g.test(t)))try{var n=y.call(e,t);if(n||r.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(i){}return at(t,f,null,[e]).length>0},at.contains=function(e,t){return(e.ownerDocument||e)!==f&&p(e),v(e,t)},at.attr=function(e,n){(e.ownerDocument||e)!==f&&p(e);var i=o.attrHandle[n.toLowerCase()],a=i&&L.call(o.attrHandle,n.toLowerCase())?i(e,n,!h):t;return a===t?r.attributes||!h?e.getAttribute(n):(a=e.getAttributeNode(n))&&a.specified?a.value:null:a},at.error=function(e){throw Error("Syntax error, unrecognized expression: "+e)},at.uniqueSort=function(e){var t,n=[],i=0,o=0;if(S=!r.detectDuplicates,c=!r.sortStable&&e.slice(0),e.sort(A),S){while(t=e[o++])t===e[o]&&(i=n.push(o));while(i--)e.splice(n[i],1)}return e},a=at.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=a(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r];r++)n+=a(t);return n},o=at.selectors={cacheLength:50,createPseudo:ut,match:Q,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(rt,it),e[3]=(e[4]||e[5]||"").replace(rt,it),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||at.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&at.error(e[0]),e},PSEUDO:function(e){var n,r=!e[5]&&e[2];return Q.CHILD.test(e[0])?null:(e[3]&&e[4]!==t?e[2]=e[4]:r&&J.test(r)&&(n=bt(r,!0))&&(n=r.indexOf(")",r.length-n)-r.length)&&(e[0]=e[0].slice(0,n),e[2]=r.slice(0,n)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(rt,it).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=N[e+" "];return t||(t=RegExp("(^|"+P+")"+e+"("+P+"|$)"))&&N(e,function(e){return t.test("string"==typeof e.className&&e.className||typeof e.getAttribute!==j&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=at.attr(r,e);return null==i?"!="===t:t?(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i+" ").indexOf(n)>-1:"|="===t?i===n||i.slice(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,l){var u,c,p,f,d,h,g=o!==a?"nextSibling":"previousSibling",m=t.parentNode,y=s&&t.nodeName.toLowerCase(),v=!l&&!s;if(m){if(o){while(g){p=t;while(p=p[g])if(s?p.nodeName.toLowerCase()===y:1===p.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?m.firstChild:m.lastChild],a&&v){c=m[b]||(m[b]={}),u=c[e]||[],d=u[0]===T&&u[1],f=u[0]===T&&u[2],p=d&&m.childNodes[d];while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if(1===p.nodeType&&++f&&p===t){c[e]=[T,d,f];break}}else if(v&&(u=(t[b]||(t[b]={}))[e])&&u[0]===T)f=u[1];else while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if((s?p.nodeName.toLowerCase()===y:1===p.nodeType)&&++f&&(v&&((p[b]||(p[b]={}))[e]=[T,f]),p===t))break;return f-=i,f===r||0===f%r&&f/r>=0}}},PSEUDO:function(e,t){var n,r=o.pseudos[e]||o.setFilters[e.toLowerCase()]||at.error("unsupported pseudo: "+e);return r[b]?r(t):r.length>1?(n=[e,e,"",t],o.setFilters.hasOwnProperty(e.toLowerCase())?ut(function(e,n){var i,o=r(e,t),a=o.length;while(a--)i=F.call(e,o[a]),e[i]=!(n[i]=o[a])}):function(e){return r(e,0,n)}):r}},pseudos:{not:ut(function(e){var t=[],n=[],r=l(e.replace(z,"$1"));return r[b]?ut(function(e,t,n,i){var o,a=r(e,null,i,[]),s=e.length;while(s--)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),!n.pop()}}),has:ut(function(e){return function(t){return at(e,t).length>0}}),contains:ut(function(e){return function(t){return(t.textContent||t.innerText||a(t)).indexOf(e)>-1}}),lang:ut(function(e){return G.test(e||"")||at.error("unsupported lang: "+e),e=e.replace(rt,it).toLowerCase(),function(t){var n;do if(n=h?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===d},focus:function(e){return e===f.activeElement&&(!f.hasFocus||f.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeName>"@"||3===e.nodeType||4===e.nodeType)return!1;return!0},parent:function(e){return!o.pseudos.empty(e)},header:function(e){return tt.test(e.nodeName)},input:function(e){return et.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||t.toLowerCase()===e.type)},first:vt(function(){return[0]}),last:vt(function(e,t){return[t-1]}),eq:vt(function(e,t,n){return[0>n?n+t:n]}),even:vt(function(e,t){var n=0;for(;t>n;n+=2)e.push(n);return e}),odd:vt(function(e,t){var n=1;for(;t>n;n+=2)e.push(n);return e}),lt:vt(function(e,t,n){var r=0>n?n+t:n;for(;--r>=0;)e.push(r);return e}),gt:vt(function(e,t,n){var r=0>n?n+t:n;for(;t>++r;)e.push(r);return e})}};for(n in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})o.pseudos[n]=mt(n);for(n in{submit:!0,reset:!0})o.pseudos[n]=yt(n);function bt(e,t){var n,r,i,a,s,l,u,c=k[e+" "];if(c)return t?0:c.slice(0);s=e,l=[],u=o.preFilter;while(s){(!n||(r=X.exec(s)))&&(r&&(s=s.slice(r[0].length)||s),l.push(i=[])),n=!1,(r=U.exec(s))&&(n=r.shift(),i.push({value:n,type:r[0].replace(z," ")}),s=s.slice(n.length));for(a in o.filter)!(r=Q[a].exec(s))||u[a]&&!(r=u[a](r))||(n=r.shift(),i.push({value:n,type:a,matches:r}),s=s.slice(n.length));if(!n)break}return t?s.length:s?at.error(e):k(e,l).slice(0)}function xt(e){var t=0,n=e.length,r="";for(;n>t;t++)r+=e[t].value;return r}function wt(e,t,n){var r=t.dir,o=n&&"parentNode"===r,a=C++;return t.first?function(t,n,i){while(t=t[r])if(1===t.nodeType||o)return e(t,n,i)}:function(t,n,s){var l,u,c,p=T+" "+a;if(s){while(t=t[r])if((1===t.nodeType||o)&&e(t,n,s))return!0}else while(t=t[r])if(1===t.nodeType||o)if(c=t[b]||(t[b]={}),(u=c[r])&&u[0]===p){if((l=u[1])===!0||l===i)return l===!0}else if(u=c[r]=[p],u[1]=e(t,n,s)||i,u[1]===!0)return!0}}function Tt(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function Ct(e,t,n,r,i){var o,a=[],s=0,l=e.length,u=null!=t;for(;l>s;s++)(o=e[s])&&(!n||n(o,r,i))&&(a.push(o),u&&t.push(s));return a}function Nt(e,t,n,r,i,o){return r&&!r[b]&&(r=Nt(r)),i&&!i[b]&&(i=Nt(i,o)),ut(function(o,a,s,l){var u,c,p,f=[],d=[],h=a.length,g=o||St(t||"*",s.nodeType?[s]:s,[]),m=!e||!o&&t?g:Ct(g,f,e,s,l),y=n?i||(o?e:h||r)?[]:a:m;if(n&&n(m,y,s,l),r){u=Ct(y,d),r(u,[],s,l),c=u.length;while(c--)(p=u[c])&&(y[d[c]]=!(m[d[c]]=p))}if(o){if(i||e){if(i){u=[],c=y.length;while(c--)(p=y[c])&&u.push(m[c]=p);i(null,y=[],u,l)}c=y.length;while(c--)(p=y[c])&&(u=i?F.call(o,p):f[c])>-1&&(o[u]=!(a[u]=p))}}else y=Ct(y===a?y.splice(h,y.length):y),i?i(null,a,y,l):M.apply(a,y)})}function kt(e){var t,n,r,i=e.length,a=o.relative[e[0].type],s=a||o.relative[" "],l=a?1:0,c=wt(function(e){return e===t},s,!0),p=wt(function(e){return F.call(t,e)>-1},s,!0),f=[function(e,n,r){return!a&&(r||n!==u)||((t=n).nodeType?c(e,n,r):p(e,n,r))}];for(;i>l;l++)if(n=o.relative[e[l].type])f=[wt(Tt(f),n)];else{if(n=o.filter[e[l].type].apply(null,e[l].matches),n[b]){for(r=++l;i>r;r++)if(o.relative[e[r].type])break;return Nt(l>1&&Tt(f),l>1&&xt(e.slice(0,l-1).concat({value:" "===e[l-2].type?"*":""})).replace(z,"$1"),n,r>l&&kt(e.slice(l,r)),i>r&&kt(e=e.slice(r)),i>r&&xt(e))}f.push(n)}return Tt(f)}function Et(e,t){var n=0,r=t.length>0,a=e.length>0,s=function(s,l,c,p,d){var h,g,m,y=[],v=0,b="0",x=s&&[],w=null!=d,C=u,N=s||a&&o.find.TAG("*",d&&l.parentNode||l),k=T+=null==C?1:Math.random()||.1;for(w&&(u=l!==f&&l,i=n);null!=(h=N[b]);b++){if(a&&h){g=0;while(m=e[g++])if(m(h,l,c)){p.push(h);break}w&&(T=k,i=++n)}r&&((h=!m&&h)&&v--,s&&x.push(h))}if(v+=b,r&&b!==v){g=0;while(m=t[g++])m(x,y,l,c);if(s){if(v>0)while(b--)x[b]||y[b]||(y[b]=q.call(p));y=Ct(y)}M.apply(p,y),w&&!s&&y.length>0&&v+t.length>1&&at.uniqueSort(p)}return w&&(T=k,u=C),x};return r?ut(s):s}l=at.compile=function(e,t){var n,r=[],i=[],o=E[e+" "];if(!o){t||(t=bt(e)),n=t.length;while(n--)o=kt(t[n]),o[b]?r.push(o):i.push(o);o=E(e,Et(i,r))}return o};function St(e,t,n){var r=0,i=t.length;for(;i>r;r++)at(e,t[r],n);return n}function At(e,t,n,i){var a,s,u,c,p,f=bt(e);if(!i&&1===f.length){if(s=f[0]=f[0].slice(0),s.length>2&&"ID"===(u=s[0]).type&&r.getById&&9===t.nodeType&&h&&o.relative[s[1].type]){if(t=(o.find.ID(u.matches[0].replace(rt,it),t)||[])[0],!t)return n;e=e.slice(s.shift().value.length)}a=Q.needsContext.test(e)?0:s.length;while(a--){if(u=s[a],o.relative[c=u.type])break;if((p=o.find[c])&&(i=p(u.matches[0].replace(rt,it),V.test(s[0].type)&&t.parentNode||t))){if(s.splice(a,1),e=i.length&&xt(s),!e)return M.apply(n,i),n;break}}}return l(e,f)(i,t,!h,n,V.test(e)),n}o.pseudos.nth=o.pseudos.eq;function jt(){}jt.prototype=o.filters=o.pseudos,o.setFilters=new jt,r.sortStable=b.split("").sort(A).join("")===b,p(),[0,0].sort(A),r.detectDuplicates=S,x.find=at,x.expr=at.selectors,x.expr[":"]=x.expr.pseudos,x.unique=at.uniqueSort,x.text=at.getText,x.isXMLDoc=at.isXML,x.contains=at.contains}(e);var O={};function F(e){var t=O[e]={};return x.each(e.match(T)||[],function(e,n){t[n]=!0}),t}x.Callbacks=function(e){e="string"==typeof e?O[e]||F(e):x.extend({},e);var n,r,i,o,a,s,l=[],u=!e.once&&[],c=function(t){for(r=e.memory&&t,i=!0,a=s||0,s=0,o=l.length,n=!0;l&&o>a;a++)if(l[a].apply(t[0],t[1])===!1&&e.stopOnFalse){r=!1;break}n=!1,l&&(u?u.length&&c(u.shift()):r?l=[]:p.disable())},p={add:function(){if(l){var t=l.length;(function i(t){x.each(t,function(t,n){var r=x.type(n);"function"===r?e.unique&&p.has(n)||l.push(n):n&&n.length&&"string"!==r&&i(n)})})(arguments),n?o=l.length:r&&(s=t,c(r))}return this},remove:function(){return l&&x.each(arguments,function(e,t){var r;while((r=x.inArray(t,l,r))>-1)l.splice(r,1),n&&(o>=r&&o--,a>=r&&a--)}),this},has:function(e){return e?x.inArray(e,l)>-1:!(!l||!l.length)},empty:function(){return l=[],o=0,this},disable:function(){return l=u=r=t,this},disabled:function(){return!l},lock:function(){return u=t,r||p.disable(),this},locked:function(){return!u},fireWith:function(e,t){return t=t||[],t=[e,t.slice?t.slice():t],!l||i&&!u||(n?u.push(t):c(t)),this},fire:function(){return p.fireWith(this,arguments),this},fired:function(){return!!i}};return p},x.extend({Deferred:function(e){var t=[["resolve","done",x.Callbacks("once memory"),"resolved"],["reject","fail",x.Callbacks("once memory"),"rejected"],["notify","progress",x.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return x.Deferred(function(n){x.each(t,function(t,o){var a=o[0],s=x.isFunction(e[t])&&e[t];i[o[1]](function(){var e=s&&s.apply(this,arguments);e&&x.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[a+"With"](this===r?n.promise():this,s?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?x.extend(e,r):r}},i={};return r.pipe=r.then,x.each(t,function(e,o){var a=o[2],s=o[3];r[o[1]]=a.add,s&&a.add(function(){n=s},t[1^e][2].disable,t[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=a.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t=0,n=g.call(arguments),r=n.length,i=1!==r||e&&x.isFunction(e.promise)?r:0,o=1===i?e:x.Deferred(),a=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?g.call(arguments):r,n===s?o.notifyWith(t,n):--i||o.resolveWith(t,n)}},s,l,u;if(r>1)for(s=Array(r),l=Array(r),u=Array(r);r>t;t++)n[t]&&x.isFunction(n[t].promise)?n[t].promise().done(a(t,u,n)).fail(o.reject).progress(a(t,l,s)):--i;return i||o.resolveWith(u,n),o.promise()}}),x.support=function(t){var n,r,o,s,l,u,c,p,f,d=a.createElement("div");if(d.setAttribute("className","t"),d.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",n=d.getElementsByTagName("*")||[],r=d.getElementsByTagName("a")[0],!r||!r.style||!n.length)return t;s=a.createElement("select"),u=s.appendChild(a.createElement("option")),o=d.getElementsByTagName("input")[0],r.style.cssText="top:1px;float:left;opacity:.5",t.getSetAttribute="t"!==d.className,t.leadingWhitespace=3===d.firstChild.nodeType,t.tbody=!d.getElementsByTagName("tbody").length,t.htmlSerialize=!!d.getElementsByTagName("link").length,t.style=/top/.test(r.getAttribute("style")),t.hrefNormalized="/a"===r.getAttribute("href"),t.opacity=/^0.5/.test(r.style.opacity),t.cssFloat=!!r.style.cssFloat,t.checkOn=!!o.value,t.optSelected=u.selected,t.enctype=!!a.createElement("form").enctype,t.html5Clone="<:nav></:nav>"!==a.createElement("nav").cloneNode(!0).outerHTML,t.inlineBlockNeedsLayout=!1,t.shrinkWrapBlocks=!1,t.pixelPosition=!1,t.deleteExpando=!0,t.noCloneEvent=!0,t.reliableMarginRight=!0,t.boxSizingReliable=!0,o.checked=!0,t.noCloneChecked=o.cloneNode(!0).checked,s.disabled=!0,t.optDisabled=!u.disabled;try{delete d.test}catch(h){t.deleteExpando=!1}o=a.createElement("input"),o.setAttribute("value",""),t.input=""===o.getAttribute("value"),o.value="t",o.setAttribute("type","radio"),t.radioValue="t"===o.value,o.setAttribute("checked","t"),o.setAttribute("name","t"),l=a.createDocumentFragment(),l.appendChild(o),t.appendChecked=o.checked,t.checkClone=l.cloneNode(!0).cloneNode(!0).lastChild.checked,d.attachEvent&&(d.attachEvent("onclick",function(){t.noCloneEvent=!1}),d.cloneNode(!0).click());for(f in{submit:!0,change:!0,focusin:!0})d.setAttribute(c="on"+f,"t"),t[f+"Bubbles"]=c in e||d.attributes[c].expando===!1;d.style.backgroundClip="content-box",d.cloneNode(!0).style.backgroundClip="",t.clearCloneStyle="content-box"===d.style.backgroundClip;for(f in x(t))break;return t.ownLast="0"!==f,x(function(){var n,r,o,s="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",l=a.getElementsByTagName("body")[0];l&&(n=a.createElement("div"),n.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",l.appendChild(n).appendChild(d),d.innerHTML="<table><tr><td></td><td>t</td></tr></table>",o=d.getElementsByTagName("td"),o[0].style.cssText="padding:0;margin:0;border:0;display:none",p=0===o[0].offsetHeight,o[0].style.display="",o[1].style.display="none",t.reliableHiddenOffsets=p&&0===o[0].offsetHeight,d.innerHTML="",d.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",x.swap(l,null!=l.style.zoom?{zoom:1}:{},function(){t.boxSizing=4===d.offsetWidth}),e.getComputedStyle&&(t.pixelPosition="1%"!==(e.getComputedStyle(d,null)||{}).top,t.boxSizingReliable="4px"===(e.getComputedStyle(d,null)||{width:"4px"}).width,r=d.appendChild(a.createElement("div")),r.style.cssText=d.style.cssText=s,r.style.marginRight=r.style.width="0",d.style.width="1px",t.reliableMarginRight=!parseFloat((e.getComputedStyle(r,null)||{}).marginRight)),typeof d.style.zoom!==i&&(d.innerHTML="",d.style.cssText=s+"width:1px;padding:1px;display:inline;zoom:1",t.inlineBlockNeedsLayout=3===d.offsetWidth,d.style.display="block",d.innerHTML="<div></div>",d.firstChild.style.width="5px",t.shrinkWrapBlocks=3!==d.offsetWidth,t.inlineBlockNeedsLayout&&(l.style.zoom=1)),l.removeChild(n),n=d=o=r=null)}),n=s=l=u=r=o=null,t}({});var B=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,P=/([A-Z])/g;function R(e,n,r,i){if(x.acceptData(e)){var o,a,s=x.expando,l=e.nodeType,u=l?x.cache:e,c=l?e[s]:e[s]&&s;if(c&&u[c]&&(i||u[c].data)||r!==t||"string"!=typeof n)return c||(c=l?e[s]=p.pop()||x.guid++:s),u[c]||(u[c]=l?{}:{toJSON:x.noop}),("object"==typeof n||"function"==typeof n)&&(i?u[c]=x.extend(u[c],n):u[c].data=x.extend(u[c].data,n)),a=u[c],i||(a.data||(a.data={}),a=a.data),r!==t&&(a[x.camelCase(n)]=r),"string"==typeof n?(o=a[n],null==o&&(o=a[x.camelCase(n)])):o=a,o}}function W(e,t,n){if(x.acceptData(e)){var r,i,o=e.nodeType,a=o?x.cache:e,s=o?e[x.expando]:x.expando;if(a[s]){if(t&&(r=n?a[s]:a[s].data)){x.isArray(t)?t=t.concat(x.map(t,x.camelCase)):t in r?t=[t]:(t=x.camelCase(t),t=t in r?[t]:t.split(" ")),i=t.length;while(i--)delete r[t[i]];if(n?!I(r):!x.isEmptyObject(r))return}(n||(delete a[s].data,I(a[s])))&&(o?x.cleanData([e],!0):x.support.deleteExpando||a!=a.window?delete a[s]:a[s]=null)}}}x.extend({cache:{},noData:{applet:!0,embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(e){return e=e.nodeType?x.cache[e[x.expando]]:e[x.expando],!!e&&!I(e)},data:function(e,t,n){return R(e,t,n)},removeData:function(e,t){return W(e,t)},_data:function(e,t,n){return R(e,t,n,!0)},_removeData:function(e,t){return W(e,t,!0)},acceptData:function(e){if(e.nodeType&&1!==e.nodeType&&9!==e.nodeType)return!1;var t=e.nodeName&&x.noData[e.nodeName.toLowerCase()];return!t||t!==!0&&e.getAttribute("classid")===t}}),x.fn.extend({data:function(e,n){var r,i,o=null,a=0,s=this[0];if(e===t){if(this.length&&(o=x.data(s),1===s.nodeType&&!x._data(s,"parsedAttrs"))){for(r=s.attributes;r.length>a;a++)i=r[a].name,0===i.indexOf("data-")&&(i=x.camelCase(i.slice(5)),$(s,i,o[i]));x._data(s,"parsedAttrs",!0)}return o}return"object"==typeof e?this.each(function(){x.data(this,e)}):arguments.length>1?this.each(function(){x.data(this,e,n)}):s?$(s,e,x.data(s,e)):null},removeData:function(e){return this.each(function(){x.removeData(this,e)})}});function $(e,n,r){if(r===t&&1===e.nodeType){var i="data-"+n.replace(P,"-$1").toLowerCase();if(r=e.getAttribute(i),"string"==typeof r){try{r="true"===r?!0:"false"===r?!1:"null"===r?null:+r+""===r?+r:B.test(r)?x.parseJSON(r):r}catch(o){}x.data(e,n,r)}else r=t}return r}function I(e){var t;for(t in e)if(("data"!==t||!x.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}x.extend({queue:function(e,n,r){var i;return e?(n=(n||"fx")+"queue",i=x._data(e,n),r&&(!i||x.isArray(r)?i=x._data(e,n,x.makeArray(r)):i.push(r)),i||[]):t},dequeue:function(e,t){t=t||"fx";var n=x.queue(e,t),r=n.length,i=n.shift(),o=x._queueHooks(e,t),a=function(){x.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),o.cur=i,i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return x._data(e,n)||x._data(e,n,{empty:x.Callbacks("once memory").add(function(){x._removeData(e,t+"queue"),x._removeData(e,n)})})}}),x.fn.extend({queue:function(e,n){var r=2;return"string"!=typeof e&&(n=e,e="fx",r--),r>arguments.length?x.queue(this[0],e):n===t?this:this.each(function(){var t=x.queue(this,e,n);x._queueHooks(this,e),"fx"===e&&"inprogress"!==t[0]&&x.dequeue(this,e)})},dequeue:function(e){return this.each(function(){x.dequeue(this,e)})},delay:function(e,t){return e=x.fx?x.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,n){var r,i=1,o=x.Deferred(),a=this,s=this.length,l=function(){--i||o.resolveWith(a,[a])};"string"!=typeof e&&(n=e,e=t),e=e||"fx";while(s--)r=x._data(a[s],e+"queueHooks"),r&&r.empty&&(i++,r.empty.add(l));return l(),o.promise(n)}});var z,X,U=/[\t\r\n\f]/g,V=/\r/g,Y=/^(?:input|select|textarea|button|object)$/i,J=/^(?:a|area)$/i,G=/^(?:checked|selected)$/i,Q=x.support.getSetAttribute,K=x.support.input;x.fn.extend({attr:function(e,t){return x.access(this,x.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){x.removeAttr(this,e)})},prop:function(e,t){return x.access(this,x.prop,e,t,arguments.length>1)},removeProp:function(e){return e=x.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,o,a=0,s=this.length,l="string"==typeof e&&e;if(x.isFunction(e))return this.each(function(t){x(this).addClass(e.call(this,t,this.className))});if(l)for(t=(e||"").match(T)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(U," "):" ")){o=0;while(i=t[o++])0>r.indexOf(" "+i+" ")&&(r+=i+" ");n.className=x.trim(r)}return this},removeClass:function(e){var t,n,r,i,o,a=0,s=this.length,l=0===arguments.length||"string"==typeof e&&e;if(x.isFunction(e))return this.each(function(t){x(this).removeClass(e.call(this,t,this.className))});if(l)for(t=(e||"").match(T)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(U," "):"")){o=0;while(i=t[o++])while(r.indexOf(" "+i+" ")>=0)r=r.replace(" "+i+" "," ");n.className=e?x.trim(r):""}return this},toggleClass:function(e,t){var n=typeof e,r="boolean"==typeof t;return x.isFunction(e)?this.each(function(n){x(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if("string"===n){var o,a=0,s=x(this),l=t,u=e.match(T)||[];while(o=u[a++])l=r?l:!s.hasClass(o),s[l?"addClass":"removeClass"](o)}else(n===i||"boolean"===n)&&(this.className&&x._data(this,"__className__",this.className),this.className=this.className||e===!1?"":x._data(this,"__className__")||"")})},hasClass:function(e){var t=" "+e+" ",n=0,r=this.length;for(;r>n;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(U," ").indexOf(t)>=0)return!0;return!1},val:function(e){var n,r,i,o=this[0];{if(arguments.length)return i=x.isFunction(e),this.each(function(n){var o;1===this.nodeType&&(o=i?e.call(this,n,x(this).val()):e,null==o?o="":"number"==typeof o?o+="":x.isArray(o)&&(o=x.map(o,function(e){return null==e?"":e+""})),r=x.valHooks[this.type]||x.valHooks[this.nodeName.toLowerCase()],r&&"set"in r&&r.set(this,o,"value")!==t||(this.value=o))});if(o)return r=x.valHooks[o.type]||x.valHooks[o.nodeName.toLowerCase()],r&&"get"in r&&(n=r.get(o,"value"))!==t?n:(n=o.value,"string"==typeof n?n.replace(V,""):null==n?"":n)}}}),x.extend({valHooks:{option:{get:function(e){var t=x.find.attr(e,"value");return null!=t?t:e.text}},select:{get:function(e){var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type||0>i,a=o?null:[],s=o?i+1:r.length,l=0>i?s:o?i:0;for(;s>l;l++)if(n=r[l],!(!n.selected&&l!==i||(x.support.optDisabled?n.disabled:null!==n.getAttribute("disabled"))||n.parentNode.disabled&&x.nodeName(n.parentNode,"optgroup"))){if(t=x(n).val(),o)return t;a.push(t)}return a},set:function(e,t){var n,r,i=e.options,o=x.makeArray(t),a=i.length;while(a--)r=i[a],(r.selected=x.inArray(x(r).val(),o)>=0)&&(n=!0);return n||(e.selectedIndex=-1),o}}},attr:function(e,n,r){var o,a,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return typeof e.getAttribute===i?x.prop(e,n,r):(1===s&&x.isXMLDoc(e)||(n=n.toLowerCase(),o=x.attrHooks[n]||(x.expr.match.bool.test(n)?X:z)),r===t?o&&"get"in o&&null!==(a=o.get(e,n))?a:(a=x.find.attr(e,n),null==a?t:a):null!==r?o&&"set"in o&&(a=o.set(e,r,n))!==t?a:(e.setAttribute(n,r+""),r):(x.removeAttr(e,n),t))},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(T);if(o&&1===e.nodeType)while(n=o[i++])r=x.propFix[n]||n,x.expr.match.bool.test(n)?K&&Q||!G.test(n)?e[r]=!1:e[x.camelCase("default-"+n)]=e[r]=!1:x.attr(e,n,""),e.removeAttribute(Q?n:r)},attrHooks:{type:{set:function(e,t){if(!x.support.radioValue&&"radio"===t&&x.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},propFix:{"for":"htmlFor","class":"className"},prop:function(e,n,r){var i,o,a,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return a=1!==s||!x.isXMLDoc(e),a&&(n=x.propFix[n]||n,o=x.propHooks[n]),r!==t?o&&"set"in o&&(i=o.set(e,r,n))!==t?i:e[n]=r:o&&"get"in o&&null!==(i=o.get(e,n))?i:e[n]},propHooks:{tabIndex:{get:function(e){var t=x.find.attr(e,"tabindex");return t?parseInt(t,10):Y.test(e.nodeName)||J.test(e.nodeName)&&e.href?0:-1}}}}),X={set:function(e,t,n){return t===!1?x.removeAttr(e,n):K&&Q||!G.test(n)?e.setAttribute(!Q&&x.propFix[n]||n,n):e[x.camelCase("default-"+n)]=e[n]=!0,n}},x.each(x.expr.match.bool.source.match(/\w+/g),function(e,n){var r=x.expr.attrHandle[n]||x.find.attr;x.expr.attrHandle[n]=K&&Q||!G.test(n)?function(e,n,i){var o=x.expr.attrHandle[n],a=i?t:(x.expr.attrHandle[n]=t)!=r(e,n,i)?n.toLowerCase():null;return x.expr.attrHandle[n]=o,a}:function(e,n,r){return r?t:e[x.camelCase("default-"+n)]?n.toLowerCase():null}}),K&&Q||(x.attrHooks.value={set:function(e,n,r){return x.nodeName(e,"input")?(e.defaultValue=n,t):z&&z.set(e,n,r)}}),Q||(z={set:function(e,n,r){var i=e.getAttributeNode(r);return i||e.setAttributeNode(i=e.ownerDocument.createAttribute(r)),i.value=n+="","value"===r||n===e.getAttribute(r)?n:t}},x.expr.attrHandle.id=x.expr.attrHandle.name=x.expr.attrHandle.coords=function(e,n,r){var i;return r?t:(i=e.getAttributeNode(n))&&""!==i.value?i.value:null},x.valHooks.button={get:function(e,n){var r=e.getAttributeNode(n);return r&&r.specified?r.value:t},set:z.set},x.attrHooks.contenteditable={set:function(e,t,n){z.set(e,""===t?!1:t,n)}},x.each(["width","height"],function(e,n){x.attrHooks[n]={set:function(e,r){return""===r?(e.setAttribute(n,"auto"),r):t}}})),x.support.hrefNormalized||x.each(["href","src"],function(e,t){x.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}}),x.support.style||(x.attrHooks.style={get:function(e){return e.style.cssText||t},set:function(e,t){return e.style.cssText=t+""}}),x.support.optSelected||(x.propHooks.selected={get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}}),x.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){x.propFix[this.toLowerCase()]=this}),x.support.enctype||(x.propFix.enctype="encoding"),x.each(["radio","checkbox"],function(){x.valHooks[this]={set:function(e,n){return x.isArray(n)?e.checked=x.inArray(x(e).val(),n)>=0:t}},x.support.checkOn||(x.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var Z=/^(?:input|select|textarea)$/i,et=/^key/,tt=/^(?:mouse|contextmenu)|click/,nt=/^(?:focusinfocus|focusoutblur)$/,rt=/^([^.]*)(?:\.(.+)|)$/;function it(){return!0}function ot(){return!1}function at(){try{return a.activeElement}catch(e){}}x.event={global:{},add:function(e,n,r,o,a){var s,l,u,c,p,f,d,h,g,m,y,v=x._data(e);if(v){r.handler&&(c=r,r=c.handler,a=c.selector),r.guid||(r.guid=x.guid++),(l=v.events)||(l=v.events={}),(f=v.handle)||(f=v.handle=function(e){return typeof x===i||e&&x.event.triggered===e.type?t:x.event.dispatch.apply(f.elem,arguments)},f.elem=e),n=(n||"").match(T)||[""],u=n.length;while(u--)s=rt.exec(n[u])||[],g=y=s[1],m=(s[2]||"").split(".").sort(),g&&(p=x.event.special[g]||{},g=(a?p.delegateType:p.bindType)||g,p=x.event.special[g]||{},d=x.extend({type:g,origType:y,data:o,handler:r,guid:r.guid,selector:a,needsContext:a&&x.expr.match.needsContext.test(a),namespace:m.join(".")},c),(h=l[g])||(h=l[g]=[],h.delegateCount=0,p.setup&&p.setup.call(e,o,m,f)!==!1||(e.addEventListener?e.addEventListener(g,f,!1):e.attachEvent&&e.attachEvent("on"+g,f))),p.add&&(p.add.call(e,d),d.handler.guid||(d.handler.guid=r.guid)),a?h.splice(h.delegateCount++,0,d):h.push(d),x.event.global[g]=!0);e=null}},remove:function(e,t,n,r,i){var o,a,s,l,u,c,p,f,d,h,g,m=x.hasData(e)&&x._data(e);if(m&&(c=m.events)){t=(t||"").match(T)||[""],u=t.length;while(u--)if(s=rt.exec(t[u])||[],d=g=s[1],h=(s[2]||"").split(".").sort(),d){p=x.event.special[d]||{},d=(r?p.delegateType:p.bindType)||d,f=c[d]||[],s=s[2]&&RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),l=o=f.length;while(o--)a=f[o],!i&&g!==a.origType||n&&n.guid!==a.guid||s&&!s.test(a.namespace)||r&&r!==a.selector&&("**"!==r||!a.selector)||(f.splice(o,1),a.selector&&f.delegateCount--,p.remove&&p.remove.call(e,a));l&&!f.length&&(p.teardown&&p.teardown.call(e,h,m.handle)!==!1||x.removeEvent(e,d,m.handle),delete c[d])}else for(d in c)x.event.remove(e,d+t[u],n,r,!0);x.isEmptyObject(c)&&(delete m.handle,x._removeData(e,"events"))}},trigger:function(n,r,i,o){var s,l,u,c,p,f,d,h=[i||a],g=v.call(n,"type")?n.type:n,m=v.call(n,"namespace")?n.namespace.split("."):[];if(u=f=i=i||a,3!==i.nodeType&&8!==i.nodeType&&!nt.test(g+x.event.triggered)&&(g.indexOf(".")>=0&&(m=g.split("."),g=m.shift(),m.sort()),l=0>g.indexOf(":")&&"on"+g,n=n[x.expando]?n:new x.Event(g,"object"==typeof n&&n),n.isTrigger=o?2:3,n.namespace=m.join("."),n.namespace_re=n.namespace?RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,n.result=t,n.target||(n.target=i),r=null==r?[n]:x.makeArray(r,[n]),p=x.event.special[g]||{},o||!p.trigger||p.trigger.apply(i,r)!==!1)){if(!o&&!p.noBubble&&!x.isWindow(i)){for(c=p.delegateType||g,nt.test(c+g)||(u=u.parentNode);u;u=u.parentNode)h.push(u),f=u;f===(i.ownerDocument||a)&&h.push(f.defaultView||f.parentWindow||e)}d=0;while((u=h[d++])&&!n.isPropagationStopped())n.type=d>1?c:p.bindType||g,s=(x._data(u,"events")||{})[n.type]&&x._data(u,"handle"),s&&s.apply(u,r),s=l&&u[l],s&&x.acceptData(u)&&s.apply&&s.apply(u,r)===!1&&n.preventDefault();if(n.type=g,!o&&!n.isDefaultPrevented()&&(!p._default||p._default.apply(h.pop(),r)===!1)&&x.acceptData(i)&&l&&i[g]&&!x.isWindow(i)){f=i[l],f&&(i[l]=null),x.event.triggered=g;try{i[g]()}catch(y){}x.event.triggered=t,f&&(i[l]=f)}return n.result}},dispatch:function(e){e=x.event.fix(e);var n,r,i,o,a,s=[],l=g.call(arguments),u=(x._data(this,"events")||{})[e.type]||[],c=x.event.special[e.type]||{};if(l[0]=e,e.delegateTarget=this,!c.preDispatch||c.preDispatch.call(this,e)!==!1){s=x.event.handlers.call(this,e,u),n=0;while((o=s[n++])&&!e.isPropagationStopped()){e.currentTarget=o.elem,a=0;while((i=o.handlers[a++])&&!e.isImmediatePropagationStopped())(!e.namespace_re||e.namespace_re.test(i.namespace))&&(e.handleObj=i,e.data=i.data,r=((x.event.special[i.origType]||{}).handle||i.handler).apply(o.elem,l),r!==t&&(e.result=r)===!1&&(e.preventDefault(),e.stopPropagation()))}return c.postDispatch&&c.postDispatch.call(this,e),e.result}},handlers:function(e,n){var r,i,o,a,s=[],l=n.delegateCount,u=e.target;if(l&&u.nodeType&&(!e.button||"click"!==e.type))for(;u!=this;u=u.parentNode||this)if(1===u.nodeType&&(u.disabled!==!0||"click"!==e.type)){for(o=[],a=0;l>a;a++)i=n[a],r=i.selector+" ",o[r]===t&&(o[r]=i.needsContext?x(r,this).index(u)>=0:x.find(r,this,null,[u]).length),o[r]&&o.push(i);o.length&&s.push({elem:u,handlers:o})}return n.length>l&&s.push({elem:this,handlers:n.slice(l)}),s},fix:function(e){if(e[x.expando])return e;var t,n,r,i=e.type,o=e,s=this.fixHooks[i];s||(this.fixHooks[i]=s=tt.test(i)?this.mouseHooks:et.test(i)?this.keyHooks:{}),r=s.props?this.props.concat(s.props):this.props,e=new x.Event(o),t=r.length;while(t--)n=r[t],e[n]=o[n];return e.target||(e.target=o.srcElement||a),3===e.target.nodeType&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,s.filter?s.filter(e,o):e},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,n){var r,i,o,s=n.button,l=n.fromElement;return null==e.pageX&&null!=n.clientX&&(i=e.target.ownerDocument||a,o=i.documentElement,r=i.body,e.pageX=n.clientX+(o&&o.scrollLeft||r&&r.scrollLeft||0)-(o&&o.clientLeft||r&&r.clientLeft||0),e.pageY=n.clientY+(o&&o.scrollTop||r&&r.scrollTop||0)-(o&&o.clientTop||r&&r.clientTop||0)),!e.relatedTarget&&l&&(e.relatedTarget=l===e.target?n.toElement:l),e.which||s===t||(e.which=1&s?1:2&s?3:4&s?2:0),e}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==at()&&this.focus)try{return this.focus(),!1}catch(e){}},delegateType:"focusin"},blur:{trigger:function(){return this===at()&&this.blur?(this.blur(),!1):t},delegateType:"focusout"},click:{trigger:function(){return x.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):t},_default:function(e){return x.nodeName(e.target,"a")}},beforeunload:{postDispatch:function(e){e.result!==t&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n,r){var i=x.extend(new x.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?x.event.trigger(i,null,t):x.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},x.removeEvent=a.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)}:function(e,t,n){var r="on"+t;e.detachEvent&&(typeof e[r]===i&&(e[r]=null),e.detachEvent(r,n))},x.Event=function(e,n){return this instanceof x.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.returnValue===!1||e.getPreventDefault&&e.getPreventDefault()?it:ot):this.type=e,n&&x.extend(this,n),this.timeStamp=e&&e.timeStamp||x.now(),this[x.expando]=!0,t):new x.Event(e,n)},x.Event.prototype={isDefaultPrevented:ot,isPropagationStopped:ot,isImmediatePropagationStopped:ot,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=it,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=it,e&&(e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=it,this.stopPropagation()}},x.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){x.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj;return(!i||i!==r&&!x.contains(r,i))&&(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),x.support.submitBubbles||(x.event.special.submit={setup:function(){return x.nodeName(this,"form")?!1:(x.event.add(this,"click._submit keypress._submit",function(e){var n=e.target,r=x.nodeName(n,"input")||x.nodeName(n,"button")?n.form:t;r&&!x._data(r,"submitBubbles")&&(x.event.add(r,"submit._submit",function(e){e._submit_bubble=!0}),x._data(r,"submitBubbles",!0))}),t)},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&x.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){return x.nodeName(this,"form")?!1:(x.event.remove(this,"._submit"),t)}}),x.support.changeBubbles||(x.event.special.change={setup:function(){return Z.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(x.event.add(this,"propertychange._change",function(e){"checked"===e.originalEvent.propertyName&&(this._just_changed=!0)}),x.event.add(this,"click._change",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1),x.event.simulate("change",this,e,!0)})),!1):(x.event.add(this,"beforeactivate._change",function(e){var t=e.target;Z.test(t.nodeName)&&!x._data(t,"changeBubbles")&&(x.event.add(t,"change._change",function(e){!this.parentNode||e.isSimulated||e.isTrigger||x.event.simulate("change",this.parentNode,e,!0)}),x._data(t,"changeBubbles",!0))}),t)},handle:function(e){var n=e.target;return this!==n||e.isSimulated||e.isTrigger||"radio"!==n.type&&"checkbox"!==n.type?e.handleObj.handler.apply(this,arguments):t},teardown:function(){return x.event.remove(this,"._change"),!Z.test(this.nodeName)}}),x.support.focusinBubbles||x.each({focus:"focusin",blur:"focusout"},function(e,t){var n=0,r=function(e){x.event.simulate(t,e.target,x.event.fix(e),!0)};x.event.special[t]={setup:function(){0===n++&&a.addEventListener(e,r,!0)},teardown:function(){0===--n&&a.removeEventListener(e,r,!0)}}}),x.fn.extend({on:function(e,n,r,i,o){var a,s;if("object"==typeof e){"string"!=typeof n&&(r=r||n,n=t);for(a in e)this.on(a,n,r,e[a],o);return this}if(null==r&&null==i?(i=n,r=n=t):null==i&&("string"==typeof n?(i=r,r=t):(i=r,r=n,n=t)),i===!1)i=ot;else if(!i)return this;return 1===o&&(s=i,i=function(e){return x().off(e),s.apply(this,arguments)},i.guid=s.guid||(s.guid=x.guid++)),this.each(function(){x.event.add(this,e,i,r,n)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,n,r){var i,o;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,x(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof e){for(o in e)this.off(o,n,e[o]);return this}return(n===!1||"function"==typeof n)&&(r=n,n=t),r===!1&&(r=ot),this.each(function(){x.event.remove(this,e,r,n)})},trigger:function(e,t){return this.each(function(){x.event.trigger(e,t,this)})},triggerHandler:function(e,n){var r=this[0];return r?x.event.trigger(e,n,r,!0):t}});var st=/^.[^:#\[\.,]*$/,lt=/^(?:parents|prev(?:Until|All))/,ut=x.expr.match.needsContext,ct={children:!0,contents:!0,next:!0,prev:!0};x.fn.extend({find:function(e){var t,n=[],r=this,i=r.length;if("string"!=typeof e)return this.pushStack(x(e).filter(function(){for(t=0;i>t;t++)if(x.contains(r[t],this))return!0}));for(t=0;i>t;t++)x.find(e,r[t],n);return n=this.pushStack(i>1?x.unique(n):n),n.selector=this.selector?this.selector+" "+e:e,n},has:function(e){var t,n=x(e,this),r=n.length;return this.filter(function(){for(t=0;r>t;t++)if(x.contains(this,n[t]))return!0})},not:function(e){return this.pushStack(ft(this,e||[],!0))},filter:function(e){return this.pushStack(ft(this,e||[],!1))},is:function(e){return!!ft(this,"string"==typeof e&&ut.test(e)?x(e):e||[],!1).length},closest:function(e,t){var n,r=0,i=this.length,o=[],a=ut.test(e)||"string"!=typeof e?x(e,t||this.context):0;for(;i>r;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(11>n.nodeType&&(a?a.index(n)>-1:1===n.nodeType&&x.find.matchesSelector(n,e))){n=o.push(n);break}return this.pushStack(o.length>1?x.unique(o):o)},index:function(e){return e?"string"==typeof e?x.inArray(this[0],x(e)):x.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){var n="string"==typeof e?x(e,t):x.makeArray(e&&e.nodeType?[e]:e),r=x.merge(this.get(),n);return this.pushStack(x.unique(r))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}});function pt(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}x.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return x.dir(e,"parentNode")},parentsUntil:function(e,t,n){return x.dir(e,"parentNode",n)},next:function(e){return pt(e,"nextSibling")},prev:function(e){return pt(e,"previousSibling")},nextAll:function(e){return x.dir(e,"nextSibling")},prevAll:function(e){return x.dir(e,"previousSibling")},nextUntil:function(e,t,n){return x.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return x.dir(e,"previousSibling",n)},siblings:function(e){return x.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return x.sibling(e.firstChild)},contents:function(e){return x.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:x.merge([],e.childNodes)}},function(e,t){x.fn[e]=function(n,r){var i=x.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=x.filter(r,i)),this.length>1&&(ct[e]||(i=x.unique(i)),lt.test(e)&&(i=i.reverse())),this.pushStack(i)}}),x.extend({filter:function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?x.find.matchesSelector(r,e)?[r]:[]:x.find.matches(e,x.grep(t,function(e){return 1===e.nodeType}))},dir:function(e,n,r){var i=[],o=e[n];while(o&&9!==o.nodeType&&(r===t||1!==o.nodeType||!x(o).is(r)))1===o.nodeType&&i.push(o),o=o[n];return i},sibling:function(e,t){var n=[];for(;e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}});function ft(e,t,n){if(x.isFunction(t))return x.grep(e,function(e,r){return!!t.call(e,r,e)!==n});if(t.nodeType)return x.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(st.test(t))return x.filter(t,e,n);t=x.filter(t,e)}return x.grep(e,function(e){return x.inArray(e,t)>=0!==n})}function dt(e){var t=ht.split("|"),n=e.createDocumentFragment();if(n.createElement)while(t.length)n.createElement(t.pop());return n}var ht="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",gt=/ jQuery\d+="(?:null|\d+)"/g,mt=RegExp("<(?:"+ht+")[\\s/>]","i"),yt=/^\s+/,vt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,bt=/<([\w:]+)/,xt=/<tbody/i,wt=/<|&#?\w+;/,Tt=/<(?:script|style|link)/i,Ct=/^(?:checkbox|radio)$/i,Nt=/checked\s*(?:[^=]|=\s*.checked.)/i,kt=/^$|\/(?:java|ecma)script/i,Et=/^true\/(.*)/,St=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,At={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:x.support.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},jt=dt(a),Dt=jt.appendChild(a.createElement("div"));At.optgroup=At.option,At.tbody=At.tfoot=At.colgroup=At.caption=At.thead,At.th=At.td,x.fn.extend({text:function(e){return x.access(this,function(e){return e===t?x.text(this):this.empty().append((this[0]&&this[0].ownerDocument||a).createTextNode(e))},null,e,arguments.length)},append:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Lt(this,e);t.appendChild(e)}})},prepend:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Lt(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){var n,r=e?x.filter(e,this):this,i=0;for(;null!=(n=r[i]);i++)t||1!==n.nodeType||x.cleanData(Ft(n)),n.parentNode&&(t&&x.contains(n.ownerDocument,n)&&_t(Ft(n,"script")),n.parentNode.removeChild(n));return this},empty:function(){var e,t=0;for(;null!=(e=this[t]);t++){1===e.nodeType&&x.cleanData(Ft(e,!1));while(e.firstChild)e.removeChild(e.firstChild);e.options&&x.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return x.clone(this,e,t)})},html:function(e){return x.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t)return 1===n.nodeType?n.innerHTML.replace(gt,""):t;if(!("string"!=typeof e||Tt.test(e)||!x.support.htmlSerialize&&mt.test(e)||!x.support.leadingWhitespace&&yt.test(e)||At[(bt.exec(e)||["",""])[1].toLowerCase()])){e=e.replace(vt,"<$1></$2>");try{for(;i>r;r++)n=this[r]||{},1===n.nodeType&&(x.cleanData(Ft(n,!1)),n.innerHTML=e);n=0}catch(o){}}n&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=x.map(this,function(e){return[e.nextSibling,e.parentNode]}),t=0;return this.domManip(arguments,function(n){var r=e[t++],i=e[t++];i&&(r&&r.parentNode!==i&&(r=this.nextSibling),x(this).remove(),i.insertBefore(n,r))},!0),t?this:this.remove()},detach:function(e){return this.remove(e,!0)},domManip:function(e,t,n){e=d.apply([],e);var r,i,o,a,s,l,u=0,c=this.length,p=this,f=c-1,h=e[0],g=x.isFunction(h);if(g||!(1>=c||"string"!=typeof h||x.support.checkClone)&&Nt.test(h))return this.each(function(r){var i=p.eq(r);g&&(e[0]=h.call(this,r,i.html())),i.domManip(e,t,n)});if(c&&(l=x.buildFragment(e,this[0].ownerDocument,!1,!n&&this),r=l.firstChild,1===l.childNodes.length&&(l=r),r)){for(a=x.map(Ft(l,"script"),Ht),o=a.length;c>u;u++)i=l,u!==f&&(i=x.clone(i,!0,!0),o&&x.merge(a,Ft(i,"script"))),t.call(this[u],i,u);if(o)for(s=a[a.length-1].ownerDocument,x.map(a,qt),u=0;o>u;u++)i=a[u],kt.test(i.type||"")&&!x._data(i,"globalEval")&&x.contains(s,i)&&(i.src?x._evalUrl(i.src):x.globalEval((i.text||i.textContent||i.innerHTML||"").replace(St,"")));l=r=null}return this}});function Lt(e,t){return x.nodeName(e,"table")&&x.nodeName(1===t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function Ht(e){return e.type=(null!==x.find.attr(e,"type"))+"/"+e.type,e}function qt(e){var t=Et.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function _t(e,t){var n,r=0;for(;null!=(n=e[r]);r++)x._data(n,"globalEval",!t||x._data(t[r],"globalEval"))}function Mt(e,t){if(1===t.nodeType&&x.hasData(e)){var n,r,i,o=x._data(e),a=x._data(t,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s)for(r=0,i=s[n].length;i>r;r++)x.event.add(t,n,s[n][r])}a.data&&(a.data=x.extend({},a.data))}}function Ot(e,t){var n,r,i;if(1===t.nodeType){if(n=t.nodeName.toLowerCase(),!x.support.noCloneEvent&&t[x.expando]){i=x._data(t);for(r in i.events)x.removeEvent(t,r,i.handle);t.removeAttribute(x.expando)}"script"===n&&t.text!==e.text?(Ht(t).text=e.text,qt(t)):"object"===n?(t.parentNode&&(t.outerHTML=e.outerHTML),x.support.html5Clone&&e.innerHTML&&!x.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===n&&Ct.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===n?t.defaultSelected=t.selected=e.defaultSelected:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}}x.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){x.fn[e]=function(e){var n,r=0,i=[],o=x(e),a=o.length-1;for(;a>=r;r++)n=r===a?this:this.clone(!0),x(o[r])[t](n),h.apply(i,n.get());return this.pushStack(i)}});function Ft(e,n){var r,o,a=0,s=typeof e.getElementsByTagName!==i?e.getElementsByTagName(n||"*"):typeof e.querySelectorAll!==i?e.querySelectorAll(n||"*"):t;if(!s)for(s=[],r=e.childNodes||e;null!=(o=r[a]);a++)!n||x.nodeName(o,n)?s.push(o):x.merge(s,Ft(o,n));return n===t||n&&x.nodeName(e,n)?x.merge([e],s):s}function Bt(e){Ct.test(e.type)&&(e.defaultChecked=e.checked)}x.extend({clone:function(e,t,n){var r,i,o,a,s,l=x.contains(e.ownerDocument,e);if(x.support.html5Clone||x.isXMLDoc(e)||!mt.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(Dt.innerHTML=e.outerHTML,Dt.removeChild(o=Dt.firstChild)),!(x.support.noCloneEvent&&x.support.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||x.isXMLDoc(e)))for(r=Ft(o),s=Ft(e),a=0;null!=(i=s[a]);++a)r[a]&&Ot(i,r[a]);if(t)if(n)for(s=s||Ft(e),r=r||Ft(o),a=0;null!=(i=s[a]);a++)Mt(i,r[a]);else Mt(e,o);return r=Ft(o,"script"),r.length>0&&_t(r,!l&&Ft(e,"script")),r=s=i=null,o},buildFragment:function(e,t,n,r){var i,o,a,s,l,u,c,p=e.length,f=dt(t),d=[],h=0;for(;p>h;h++)if(o=e[h],o||0===o)if("object"===x.type(o))x.merge(d,o.nodeType?[o]:o);else if(wt.test(o)){s=s||f.appendChild(t.createElement("div")),l=(bt.exec(o)||["",""])[1].toLowerCase(),c=At[l]||At._default,s.innerHTML=c[1]+o.replace(vt,"<$1></$2>")+c[2],i=c[0];while(i--)s=s.lastChild;if(!x.support.leadingWhitespace&&yt.test(o)&&d.push(t.createTextNode(yt.exec(o)[0])),!x.support.tbody){o="table"!==l||xt.test(o)?"<table>"!==c[1]||xt.test(o)?0:s:s.firstChild,i=o&&o.childNodes.length;while(i--)x.nodeName(u=o.childNodes[i],"tbody")&&!u.childNodes.length&&o.removeChild(u)}x.merge(d,s.childNodes),s.textContent="";while(s.firstChild)s.removeChild(s.firstChild);s=f.lastChild}else d.push(t.createTextNode(o));s&&f.removeChild(s),x.support.appendChecked||x.grep(Ft(d,"input"),Bt),h=0;while(o=d[h++])if((!r||-1===x.inArray(o,r))&&(a=x.contains(o.ownerDocument,o),s=Ft(f.appendChild(o),"script"),a&&_t(s),n)){i=0;while(o=s[i++])kt.test(o.type||"")&&n.push(o)}return s=null,f},cleanData:function(e,t){var n,r,o,a,s=0,l=x.expando,u=x.cache,c=x.support.deleteExpando,f=x.event.special;for(;null!=(n=e[s]);s++)if((t||x.acceptData(n))&&(o=n[l],a=o&&u[o])){if(a.events)for(r in a.events)f[r]?x.event.remove(n,r):x.removeEvent(n,r,a.handle);u[o]&&(delete u[o],c?delete n[l]:typeof n.removeAttribute!==i?n.removeAttribute(l):n[l]=null,p.push(o))}},_evalUrl:function(e){return x.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})}}),x.fn.extend({wrapAll:function(e){if(x.isFunction(e))return this.each(function(t){x(this).wrapAll(e.call(this,t))});if(this[0]){var t=x(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstChild&&1===e.firstChild.nodeType)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return x.isFunction(e)?this.each(function(t){x(this).wrapInner(e.call(this,t))}):this.each(function(){var t=x(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=x.isFunction(e);return this.each(function(n){x(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){x.nodeName(this,"body")||x(this).replaceWith(this.childNodes)}).end()}});var Pt,Rt,Wt,$t=/alpha\([^)]*\)/i,It=/opacity\s*=\s*([^)]*)/,zt=/^(top|right|bottom|left)$/,Xt=/^(none|table(?!-c[ea]).+)/,Ut=/^margin/,Vt=RegExp("^("+w+")(.*)$","i"),Yt=RegExp("^("+w+")(?!px)[a-z%]+$","i"),Jt=RegExp("^([+-])=("+w+")","i"),Gt={BODY:"block"},Qt={position:"absolute",visibility:"hidden",display:"block"},Kt={letterSpacing:0,fontWeight:400},Zt=["Top","Right","Bottom","Left"],en=["Webkit","O","Moz","ms"];function tn(e,t){if(t in e)return t;var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=en.length;while(i--)if(t=en[i]+n,t in e)return t;return r}function nn(e,t){return e=t||e,"none"===x.css(e,"display")||!x.contains(e.ownerDocument,e)}function rn(e,t){var n,r,i,o=[],a=0,s=e.length;for(;s>a;a++)r=e[a],r.style&&(o[a]=x._data(r,"olddisplay"),n=r.style.display,t?(o[a]||"none"!==n||(r.style.display=""),""===r.style.display&&nn(r)&&(o[a]=x._data(r,"olddisplay",ln(r.nodeName)))):o[a]||(i=nn(r),(n&&"none"!==n||!i)&&x._data(r,"olddisplay",i?n:x.css(r,"display"))));for(a=0;s>a;a++)r=e[a],r.style&&(t&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=t?o[a]||"":"none"));return e}x.fn.extend({css:function(e,n){return x.access(this,function(e,n,r){var i,o,a={},s=0;if(x.isArray(n)){for(o=Rt(e),i=n.length;i>s;s++)a[n[s]]=x.css(e,n[s],!1,o);return a}return r!==t?x.style(e,n,r):x.css(e,n)},e,n,arguments.length>1)},show:function(){return rn(this,!0)},hide:function(){return rn(this)},toggle:function(e){var t="boolean"==typeof e;return this.each(function(){(t?e:nn(this))?x(this).show():x(this).hide()})}}),x.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Wt(e,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":x.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,r,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var o,a,s,l=x.camelCase(n),u=e.style;if(n=x.cssProps[l]||(x.cssProps[l]=tn(u,l)),s=x.cssHooks[n]||x.cssHooks[l],r===t)return s&&"get"in s&&(o=s.get(e,!1,i))!==t?o:u[n];if(a=typeof r,"string"===a&&(o=Jt.exec(r))&&(r=(o[1]+1)*o[2]+parseFloat(x.css(e,n)),a="number"),!(null==r||"number"===a&&isNaN(r)||("number"!==a||x.cssNumber[l]||(r+="px"),x.support.clearCloneStyle||""!==r||0!==n.indexOf("background")||(u[n]="inherit"),s&&"set"in s&&(r=s.set(e,r,i))===t)))try{u[n]=r}catch(c){}}},css:function(e,n,r,i){var o,a,s,l=x.camelCase(n);return n=x.cssProps[l]||(x.cssProps[l]=tn(e.style,l)),s=x.cssHooks[n]||x.cssHooks[l],s&&"get"in s&&(a=s.get(e,!0,r)),a===t&&(a=Wt(e,n,i)),"normal"===a&&n in Kt&&(a=Kt[n]),""===r||r?(o=parseFloat(a),r===!0||x.isNumeric(o)?o||0:a):a}}),e.getComputedStyle?(Rt=function(t){return e.getComputedStyle(t,null)},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),l=s?s.getPropertyValue(n)||s[n]:t,u=e.style;return s&&(""!==l||x.contains(e.ownerDocument,e)||(l=x.style(e,n)),Yt.test(l)&&Ut.test(n)&&(i=u.width,o=u.minWidth,a=u.maxWidth,u.minWidth=u.maxWidth=u.width=l,l=s.width,u.width=i,u.minWidth=o,u.maxWidth=a)),l}):a.documentElement.currentStyle&&(Rt=function(e){return e.currentStyle},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),l=s?s[n]:t,u=e.style;return null==l&&u&&u[n]&&(l=u[n]),Yt.test(l)&&!zt.test(n)&&(i=u.left,o=e.runtimeStyle,a=o&&o.left,a&&(o.left=e.currentStyle.left),u.left="fontSize"===n?"1em":l,l=u.pixelLeft+"px",u.left=i,a&&(o.left=a)),""===l?"auto":l});function on(e,t,n){var r=Vt.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function an(e,t,n,r,i){var o=n===(r?"border":"content")?4:"width"===t?1:0,a=0;for(;4>o;o+=2)"margin"===n&&(a+=x.css(e,n+Zt[o],!0,i)),r?("content"===n&&(a-=x.css(e,"padding"+Zt[o],!0,i)),"margin"!==n&&(a-=x.css(e,"border"+Zt[o]+"Width",!0,i))):(a+=x.css(e,"padding"+Zt[o],!0,i),"padding"!==n&&(a+=x.css(e,"border"+Zt[o]+"Width",!0,i)));return a}function sn(e,t,n){var r=!0,i="width"===t?e.offsetWidth:e.offsetHeight,o=Rt(e),a=x.support.boxSizing&&"border-box"===x.css(e,"boxSizing",!1,o);if(0>=i||null==i){if(i=Wt(e,t,o),(0>i||null==i)&&(i=e.style[t]),Yt.test(i))return i;r=a&&(x.support.boxSizingReliable||i===e.style[t]),i=parseFloat(i)||0}return i+an(e,t,n||(a?"border":"content"),r,o)+"px"}function ln(e){var t=a,n=Gt[e];return n||(n=un(e,t),"none"!==n&&n||(Pt=(Pt||x("<iframe frameborder='0' width='0' height='0'/>").css("cssText","display:block !important")).appendTo(t.documentElement),t=(Pt[0].contentWindow||Pt[0].contentDocument).document,t.write("<!doctype html><html><body>"),t.close(),n=un(e,t),Pt.detach()),Gt[e]=n),n}function un(e,t){var n=x(t.createElement(e)).appendTo(t.body),r=x.css(n[0],"display");return n.remove(),r}x.each(["height","width"],function(e,n){x.cssHooks[n]={get:function(e,r,i){return r?0===e.offsetWidth&&Xt.test(x.css(e,"display"))?x.swap(e,Qt,function(){return sn(e,n,i)}):sn(e,n,i):t},set:function(e,t,r){var i=r&&Rt(e);return on(e,t,r?an(e,n,r,x.support.boxSizing&&"border-box"===x.css(e,"boxSizing",!1,i),i):0)}}}),x.support.opacity||(x.cssHooks.opacity={get:function(e,t){return It.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,i=x.isNumeric(t)?"alpha(opacity="+100*t+")":"",o=r&&r.filter||n.filter||"";n.zoom=1,(t>=1||""===t)&&""===x.trim(o.replace($t,""))&&n.removeAttribute&&(n.removeAttribute("filter"),""===t||r&&!r.filter)||(n.filter=$t.test(o)?o.replace($t,i):o+" "+i)}}),x(function(){x.support.reliableMarginRight||(x.cssHooks.marginRight={get:function(e,n){return n?x.swap(e,{display:"inline-block"},Wt,[e,"marginRight"]):t}}),!x.support.pixelPosition&&x.fn.position&&x.each(["top","left"],function(e,n){x.cssHooks[n]={get:function(e,r){return r?(r=Wt(e,n),Yt.test(r)?x(e).position()[n]+"px":r):t}}})}),x.expr&&x.expr.filters&&(x.expr.filters.hidden=function(e){return 0>=e.offsetWidth&&0>=e.offsetHeight||!x.support.reliableHiddenOffsets&&"none"===(e.style&&e.style.display||x.css(e,"display"))},x.expr.filters.visible=function(e){return!x.expr.filters.hidden(e)}),x.each({margin:"",padding:"",border:"Width"},function(e,t){x.cssHooks[e+t]={expand:function(n){var r=0,i={},o="string"==typeof n?n.split(" "):[n];for(;4>r;r++)i[e+Zt[r]+t]=o[r]||o[r-2]||o[0];return i}},Ut.test(e)||(x.cssHooks[e+t].set=on)});var cn=/%20/g,pn=/\[\]$/,fn=/\r?\n/g,dn=/^(?:submit|button|image|reset|file)$/i,hn=/^(?:input|select|textarea|keygen)/i;x.fn.extend({serialize:function(){return x.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=x.prop(this,"elements");return e?x.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!x(this).is(":disabled")&&hn.test(this.nodeName)&&!dn.test(e)&&(this.checked||!Ct.test(e))}).map(function(e,t){var n=x(this).val();return null==n?null:x.isArray(n)?x.map(n,function(e){return{name:t.name,value:e.replace(fn,"\r\n")}}):{name:t.name,value:n.replace(fn,"\r\n")}}).get()}}),x.param=function(e,n){var r,i=[],o=function(e,t){t=x.isFunction(t)?t():null==t?"":t,i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(n===t&&(n=x.ajaxSettings&&x.ajaxSettings.traditional),x.isArray(e)||e.jquery&&!x.isPlainObject(e))x.each(e,function(){o(this.name,this.value)});else for(r in e)gn(r,e[r],n,o);return i.join("&").replace(cn,"+")};function gn(e,t,n,r){var i;if(x.isArray(t))x.each(t,function(t,i){n||pn.test(e)?r(e,i):gn(e+"["+("object"==typeof i?t:"")+"]",i,n,r)});else if(n||"object"!==x.type(t))r(e,t);else for(i in t)gn(e+"["+i+"]",t[i],n,r)}x.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){x.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),x.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}});var mn,yn,vn=x.now(),bn=/\?/,xn=/#.*$/,wn=/([?&])_=[^&]*/,Tn=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Cn=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Nn=/^(?:GET|HEAD)$/,kn=/^\/\//,En=/^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,Sn=x.fn.load,An={},jn={},Dn="*/".concat("*");try{yn=o.href}catch(Ln){yn=a.createElement("a"),yn.href="",yn=yn.href}mn=En.exec(yn.toLowerCase())||[];function Hn(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(T)||[];if(x.isFunction(n))while(r=o[i++])"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function qn(e,n,r,i){var o={},a=e===jn;function s(l){var u;return o[l]=!0,x.each(e[l]||[],function(e,l){var c=l(n,r,i);return"string"!=typeof c||a||o[c]?a?!(u=c):t:(n.dataTypes.unshift(c),s(c),!1)}),u}return s(n.dataTypes[0])||!o["*"]&&s("*")}function _n(e,n){var r,i,o=x.ajaxSettings.flatOptions||{};for(i in n)n[i]!==t&&((o[i]?e:r||(r={}))[i]=n[i]);return r&&x.extend(!0,e,r),e}x.fn.load=function(e,n,r){if("string"!=typeof e&&Sn)return Sn.apply(this,arguments);var i,o,a,s=this,l=e.indexOf(" ");return l>=0&&(i=e.slice(l,e.length),e=e.slice(0,l)),x.isFunction(n)?(r=n,n=t):n&&"object"==typeof n&&(a="POST"),s.length>0&&x.ajax({url:e,type:a,dataType:"html",data:n}).done(function(e){o=arguments,s.html(i?x("<div>").append(x.parseHTML(e)).find(i):e)}).complete(r&&function(e,t){s.each(r,o||[e.responseText,t,e])}),this},x.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){x.fn[t]=function(e){return this.on(t,e)}}),x.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:yn,type:"GET",isLocal:Cn.test(mn[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Dn,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":x.parseJSON,"text xml":x.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?_n(_n(e,x.ajaxSettings),t):_n(x.ajaxSettings,e)},ajaxPrefilter:Hn(An),ajaxTransport:Hn(jn),ajax:function(e,n){"object"==typeof e&&(n=e,e=t),n=n||{};var r,i,o,a,s,l,u,c,p=x.ajaxSetup({},n),f=p.context||p,d=p.context&&(f.nodeType||f.jquery)?x(f):x.event,h=x.Deferred(),g=x.Callbacks("once memory"),m=p.statusCode||{},y={},v={},b=0,w="canceled",C={readyState:0,getResponseHeader:function(e){var t;if(2===b){if(!c){c={};while(t=Tn.exec(a))c[t[1].toLowerCase()]=t[2]}t=c[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===b?a:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return b||(e=v[n]=v[n]||e,y[e]=t),this},overrideMimeType:function(e){return b||(p.mimeType=e),this},statusCode:function(e){var t;if(e)if(2>b)for(t in e)m[t]=[m[t],e[t]];else C.always(e[C.status]);return this},abort:function(e){var t=e||w;return u&&u.abort(t),k(0,t),this}};if(h.promise(C).complete=g.add,C.success=C.done,C.error=C.fail,p.url=((e||p.url||yn)+"").replace(xn,"").replace(kn,mn[1]+"//"),p.type=n.method||n.type||p.method||p.type,p.dataTypes=x.trim(p.dataType||"*").toLowerCase().match(T)||[""],null==p.crossDomain&&(r=En.exec(p.url.toLowerCase()),p.crossDomain=!(!r||r[1]===mn[1]&&r[2]===mn[2]&&(r[3]||("http:"===r[1]?"80":"443"))===(mn[3]||("http:"===mn[1]?"80":"443")))),p.data&&p.processData&&"string"!=typeof p.data&&(p.data=x.param(p.data,p.traditional)),qn(An,p,n,C),2===b)return C;l=p.global,l&&0===x.active++&&x.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!Nn.test(p.type),o=p.url,p.hasContent||(p.data&&(o=p.url+=(bn.test(o)?"&":"?")+p.data,delete p.data),p.cache===!1&&(p.url=wn.test(o)?o.replace(wn,"$1_="+vn++):o+(bn.test(o)?"&":"?")+"_="+vn++)),p.ifModified&&(x.lastModified[o]&&C.setRequestHeader("If-Modified-Since",x.lastModified[o]),x.etag[o]&&C.setRequestHeader("If-None-Match",x.etag[o])),(p.data&&p.hasContent&&p.contentType!==!1||n.contentType)&&C.setRequestHeader("Content-Type",p.contentType),C.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+Dn+"; q=0.01":""):p.accepts["*"]);for(i in p.headers)C.setRequestHeader(i,p.headers[i]);if(p.beforeSend&&(p.beforeSend.call(f,C,p)===!1||2===b))return C.abort();w="abort";for(i in{success:1,error:1,complete:1})C[i](p[i]);if(u=qn(jn,p,n,C)){C.readyState=1,l&&d.trigger("ajaxSend",[C,p]),p.async&&p.timeout>0&&(s=setTimeout(function(){C.abort("timeout")},p.timeout));try{b=1,u.send(y,k)}catch(N){if(!(2>b))throw N;k(-1,N)}}else k(-1,"No Transport");function k(e,n,r,i){var c,y,v,w,T,N=n;2!==b&&(b=2,s&&clearTimeout(s),u=t,a=i||"",C.readyState=e>0?4:0,c=e>=200&&300>e||304===e,r&&(w=Mn(p,C,r)),w=On(p,w,C,c),c?(p.ifModified&&(T=C.getResponseHeader("Last-Modified"),T&&(x.lastModified[o]=T),T=C.getResponseHeader("etag"),T&&(x.etag[o]=T)),204===e||"HEAD"===p.type?N="nocontent":304===e?N="notmodified":(N=w.state,y=w.data,v=w.error,c=!v)):(v=N,(e||!N)&&(N="error",0>e&&(e=0))),C.status=e,C.statusText=(n||N)+"",c?h.resolveWith(f,[y,N,C]):h.rejectWith(f,[C,N,v]),C.statusCode(m),m=t,l&&d.trigger(c?"ajaxSuccess":"ajaxError",[C,p,c?y:v]),g.fireWith(f,[C,N]),l&&(d.trigger("ajaxComplete",[C,p]),--x.active||x.event.trigger("ajaxStop")))}return C},getJSON:function(e,t,n){return x.get(e,t,n,"json")},getScript:function(e,n){return x.get(e,t,n,"script")}}),x.each(["get","post"],function(e,n){x[n]=function(e,r,i,o){return x.isFunction(r)&&(o=o||i,i=r,r=t),x.ajax({url:e,type:n,dataType:o,data:r,success:i})}});function Mn(e,n,r){var i,o,a,s,l=e.contents,u=e.dataTypes;while("*"===u[0])u.shift(),o===t&&(o=e.mimeType||n.getResponseHeader("Content-Type"));if(o)for(s in l)if(l[s]&&l[s].test(o)){u.unshift(s);break}if(u[0]in r)a=u[0];else{for(s in r){if(!u[0]||e.converters[s+" "+u[0]]){a=s;break}i||(i=s)}a=a||i}return a?(a!==u[0]&&u.unshift(a),r[a]):t}function On(e,t,n,r){var i,o,a,s,l,u={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)u[a.toLowerCase()]=e.converters[a];o=c.shift();while(o)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!l&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=o,o=c.shift())if("*"===o)o=l;else if("*"!==l&&l!==o){if(a=u[l+" "+o]||u["* "+o],!a)for(i in u)if(s=i.split(" "),s[1]===o&&(a=u[l+" "+s[0]]||u["* "+s[0]])){a===!0?a=u[i]:u[i]!==!0&&(o=s[0],c.unshift(s[1]));break}if(a!==!0)if(a&&e["throws"])t=a(t);else try{t=a(t)}catch(p){return{state:"parsererror",error:a?p:"No conversion from "+l+" to "+o}}}return{state:"success",data:t}}x.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return x.globalEval(e),e}}}),x.ajaxPrefilter("script",function(e){e.cache===t&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),x.ajaxTransport("script",function(e){if(e.crossDomain){var n,r=a.head||x("head")[0]||a.documentElement;return{send:function(t,i){n=a.createElement("script"),n.async=!0,e.scriptCharset&&(n.charset=e.scriptCharset),n.src=e.url,n.onload=n.onreadystatechange=function(e,t){(t||!n.readyState||/loaded|complete/.test(n.readyState))&&(n.onload=n.onreadystatechange=null,n.parentNode&&n.parentNode.removeChild(n),n=null,t||i(200,"success"))},r.insertBefore(n,r.firstChild)},abort:function(){n&&n.onload(t,!0)}}}});var Fn=[],Bn=/(=)\?(?=&|$)|\?\?/;x.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Fn.pop()||x.expando+"_"+vn++;return this[e]=!0,e}}),x.ajaxPrefilter("json jsonp",function(n,r,i){var o,a,s,l=n.jsonp!==!1&&(Bn.test(n.url)?"url":"string"==typeof n.data&&!(n.contentType||"").indexOf("application/x-www-form-urlencoded")&&Bn.test(n.data)&&"data");return l||"jsonp"===n.dataTypes[0]?(o=n.jsonpCallback=x.isFunction(n.jsonpCallback)?n.jsonpCallback():n.jsonpCallback,l?n[l]=n[l].replace(Bn,"$1"+o):n.jsonp!==!1&&(n.url+=(bn.test(n.url)?"&":"?")+n.jsonp+"="+o),n.converters["script json"]=function(){return s||x.error(o+" was not called"),s[0]},n.dataTypes[0]="json",a=e[o],e[o]=function(){s=arguments},i.always(function(){e[o]=a,n[o]&&(n.jsonpCallback=r.jsonpCallback,Fn.push(o)),s&&x.isFunction(a)&&a(s[0]),s=a=t}),"script"):t});var Pn,Rn,Wn=0,$n=e.ActiveXObject&&function(){var e;for(e in Pn)Pn[e](t,!0)};function In(){try{return new e.XMLHttpRequest}catch(t){}}function zn(){try{return new e.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}x.ajaxSettings.xhr=e.ActiveXObject?function(){return!this.isLocal&&In()||zn()}:In,Rn=x.ajaxSettings.xhr(),x.support.cors=!!Rn&&"withCredentials"in Rn,Rn=x.support.ajax=!!Rn,Rn&&x.ajaxTransport(function(n){if(!n.crossDomain||x.support.cors){var r;return{send:function(i,o){var a,s,l=n.xhr();if(n.username?l.open(n.type,n.url,n.async,n.username,n.password):l.open(n.type,n.url,n.async),n.xhrFields)for(s in n.xhrFields)l[s]=n.xhrFields[s];n.mimeType&&l.overrideMimeType&&l.overrideMimeType(n.mimeType),n.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest");try{for(s in i)l.setRequestHeader(s,i[s])}catch(u){}l.send(n.hasContent&&n.data||null),r=function(e,i){var s,u,c,p;try{if(r&&(i||4===l.readyState))if(r=t,a&&(l.onreadystatechange=x.noop,$n&&delete Pn[a]),i)4!==l.readyState&&l.abort();else{p={},s=l.status,u=l.getAllResponseHeaders(),"string"==typeof l.responseText&&(p.text=l.responseText);try{c=l.statusText}catch(f){c=""}s||!n.isLocal||n.crossDomain?1223===s&&(s=204):s=p.text?200:404}}catch(d){i||o(-1,d)}p&&o(s,c,p,u)},n.async?4===l.readyState?setTimeout(r):(a=++Wn,$n&&(Pn||(Pn={},x(e).unload($n)),Pn[a]=r),l.onreadystatechange=r):r()},abort:function(){r&&r(t,!0)}}}});var Xn,Un,Vn=/^(?:toggle|show|hide)$/,Yn=RegExp("^(?:([+-])=|)("+w+")([a-z%]*)$","i"),Jn=/queueHooks$/,Gn=[nr],Qn={"*":[function(e,t){var n=this.createTween(e,t),r=n.cur(),i=Yn.exec(t),o=i&&i[3]||(x.cssNumber[e]?"":"px"),a=(x.cssNumber[e]||"px"!==o&&+r)&&Yn.exec(x.css(n.elem,e)),s=1,l=20;if(a&&a[3]!==o){o=o||a[3],i=i||[],a=+r||1;do s=s||".5",a/=s,x.style(n.elem,e,a+o);while(s!==(s=n.cur()/r)&&1!==s&&--l)}return i&&(n.unit=o,n.start=+a||+r||0,n.end=i[1]?a+(i[1]+1)*i[2]:+i[2]),n}]};function Kn(){return setTimeout(function(){Xn=t}),Xn=x.now()}function Zn(e,t,n){var r,i=(Qn[t]||[]).concat(Qn["*"]),o=0,a=i.length;for(;a>o;o++)if(r=i[o].call(n,t,e))return r}function er(e,t,n){var r,i,o=0,a=Gn.length,s=x.Deferred().always(function(){delete l.elem}),l=function(){if(i)return!1;var t=Xn||Kn(),n=Math.max(0,u.startTime+u.duration-t),r=n/u.duration||0,o=1-r,a=0,l=u.tweens.length;for(;l>a;a++)u.tweens[a].run(o);return s.notifyWith(e,[u,o,n]),1>o&&l?n:(s.resolveWith(e,[u]),!1)},u=s.promise({elem:e,props:x.extend({},t),opts:x.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:Xn||Kn(),duration:n.duration,tweens:[],createTween:function(t,n){var r=x.Tween(e,u.opts,t,n,u.opts.specialEasing[t]||u.opts.easing);return u.tweens.push(r),r},stop:function(t){var n=0,r=t?u.tweens.length:0;if(i)return this;for(i=!0;r>n;n++)u.tweens[n].run(1);return t?s.resolveWith(e,[u,t]):s.rejectWith(e,[u,t]),this}}),c=u.props;for(tr(c,u.opts.specialEasing);a>o;o++)if(r=Gn[o].call(u,e,c,u.opts))return r;return x.map(c,Zn,u),x.isFunction(u.opts.start)&&u.opts.start.call(e,u),x.fx.timer(x.extend(l,{elem:e,anim:u,queue:u.opts.queue})),u.progress(u.opts.progress).done(u.opts.done,u.opts.complete).fail(u.opts.fail).always(u.opts.always)}function tr(e,t){var n,r,i,o,a;for(n in e)if(r=x.camelCase(n),i=t[r],o=e[n],x.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),a=x.cssHooks[r],a&&"expand"in a){o=a.expand(o),delete e[r];for(n in o)n in e||(e[n]=o[n],t[n]=i)}else t[r]=i}x.Animation=x.extend(er,{tweener:function(e,t){x.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");var n,r=0,i=e.length;for(;i>r;r++)n=e[r],Qn[n]=Qn[n]||[],Qn[n].unshift(t)},prefilter:function(e,t){t?Gn.unshift(e):Gn.push(e)}});function nr(e,t,n){var r,i,o,a,s,l,u=this,c={},p=e.style,f=e.nodeType&&nn(e),d=x._data(e,"fxshow");n.queue||(s=x._queueHooks(e,"fx"),null==s.unqueued&&(s.unqueued=0,l=s.empty.fire,s.empty.fire=function(){s.unqueued||l()}),s.unqueued++,u.always(function(){u.always(function(){s.unqueued--,x.queue(e,"fx").length||s.empty.fire()})})),1===e.nodeType&&("height"in t||"width"in t)&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],"inline"===x.css(e,"display")&&"none"===x.css(e,"float")&&(x.support.inlineBlockNeedsLayout&&"inline"!==ln(e.nodeName)?p.zoom=1:p.display="inline-block")),n.overflow&&(p.overflow="hidden",x.support.shrinkWrapBlocks||u.always(function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]}));for(r in t)if(i=t[r],Vn.exec(i)){if(delete t[r],o=o||"toggle"===i,i===(f?"hide":"show"))continue;c[r]=d&&d[r]||x.style(e,r)}if(!x.isEmptyObject(c)){d?"hidden"in d&&(f=d.hidden):d=x._data(e,"fxshow",{}),o&&(d.hidden=!f),f?x(e).show():u.done(function(){x(e).hide()}),u.done(function(){var t;x._removeData(e,"fxshow");for(t in c)x.style(e,t,c[t])});for(r in c)a=Zn(f?d[r]:0,r,u),r in d||(d[r]=a.start,f&&(a.end=a.start,a.start="width"===r||"height"===r?1:0))}}function rr(e,t,n,r,i){return new rr.prototype.init(e,t,n,r,i)}x.Tween=rr,rr.prototype={constructor:rr,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||"swing",this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(x.cssNumber[n]?"":"px")},cur:function(){var e=rr.propHooks[this.prop];return e&&e.get?e.get(this):rr.propHooks._default.get(this)},run:function(e){var t,n=rr.propHooks[this.prop];return this.pos=t=this.options.duration?x.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):rr.propHooks._default.set(this),this}},rr.prototype.init.prototype=rr.prototype,rr.propHooks={_default:{get:function(e){var t;return null==e.elem[e.prop]||e.elem.style&&null!=e.elem.style[e.prop]?(t=x.css(e.elem,e.prop,""),t&&"auto"!==t?t:0):e.elem[e.prop]},set:function(e){x.fx.step[e.prop]?x.fx.step[e.prop](e):e.elem.style&&(null!=e.elem.style[x.cssProps[e.prop]]||x.cssHooks[e.prop])?x.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},rr.propHooks.scrollTop=rr.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},x.each(["toggle","show","hide"],function(e,t){var n=x.fn[t];x.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(ir(t,!0),e,r,i)}}),x.fn.extend({fadeTo:function(e,t,n,r){return this.filter(nn).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=x.isEmptyObject(e),o=x.speed(t,n,r),a=function(){var t=er(this,x.extend({},e),o);a.finish=function(){t.stop(!0)},(i||x._data(this,"finish"))&&t.stop(!0)};return a.finish=a,i||o.queue===!1?this.each(a):this.queue(o.queue,a)},stop:function(e,n,r){var i=function(e){var t=e.stop;delete e.stop,t(r)};return"string"!=typeof e&&(r=n,n=e,e=t),n&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,n=null!=e&&e+"queueHooks",o=x.timers,a=x._data(this);if(n)a[n]&&a[n].stop&&i(a[n]);else for(n in a)a[n]&&a[n].stop&&Jn.test(n)&&i(a[n]);for(n=o.length;n--;)o[n].elem!==this||null!=e&&o[n].queue!==e||(o[n].anim.stop(r),t=!1,o.splice(n,1));(t||!r)&&x.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,n=x._data(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=x.timers,a=r?r.length:0;for(n.finish=!0,x.queue(this,e,[]),i&&i.cur&&i.cur.finish&&i.cur.finish.call(this),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;a>t;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}});function ir(e,t){var n,r={height:e},i=0;for(t=t?1:0;4>i;i+=2-t)n=Zt[i],r["margin"+n]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}x.each({slideDown:ir("show"),slideUp:ir("hide"),slideToggle:ir("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){x.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),x.speed=function(e,t,n){var r=e&&"object"==typeof e?x.extend({},e):{complete:n||!n&&t||x.isFunction(e)&&e,duration:e,easing:n&&t||t&&!x.isFunction(t)&&t};return r.duration=x.fx.off?0:"number"==typeof r.duration?r.duration:r.duration in x.fx.speeds?x.fx.speeds[r.duration]:x.fx.speeds._default,(null==r.queue||r.queue===!0)&&(r.queue="fx"),r.old=r.complete,r.complete=function(){x.isFunction(r.old)&&r.old.call(this),r.queue&&x.dequeue(this,r.queue)},r},x.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},x.timers=[],x.fx=rr.prototype.init,x.fx.tick=function(){var e,n=x.timers,r=0;for(Xn=x.now();n.length>r;r++)e=n[r],e()||n[r]!==e||n.splice(r--,1);n.length||x.fx.stop(),Xn=t},x.fx.timer=function(e){e()&&x.timers.push(e)&&x.fx.start()},x.fx.interval=13,x.fx.start=function(){Un||(Un=setInterval(x.fx.tick,x.fx.interval))},x.fx.stop=function(){clearInterval(Un),Un=null},x.fx.speeds={slow:600,fast:200,_default:400},x.fx.step={},x.expr&&x.expr.filters&&(x.expr.filters.animated=function(e){return x.grep(x.timers,function(t){return e===t.elem}).length}),x.fn.offset=function(e){if(arguments.length)return e===t?this:this.each(function(t){x.offset.setOffset(this,e,t)});var n,r,o={top:0,left:0},a=this[0],s=a&&a.ownerDocument;if(s)return n=s.documentElement,x.contains(n,a)?(typeof a.getBoundingClientRect!==i&&(o=a.getBoundingClientRect()),r=or(s),{top:o.top+(r.pageYOffset||n.scrollTop)-(n.clientTop||0),left:o.left+(r.pageXOffset||n.scrollLeft)-(n.clientLeft||0)}):o},x.offset={setOffset:function(e,t,n){var r=x.css(e,"position");"static"===r&&(e.style.position="relative");var i=x(e),o=i.offset(),a=x.css(e,"top"),s=x.css(e,"left"),l=("absolute"===r||"fixed"===r)&&x.inArray("auto",[a,s])>-1,u={},c={},p,f;l?(c=i.position(),p=c.top,f=c.left):(p=parseFloat(a)||0,f=parseFloat(s)||0),x.isFunction(t)&&(t=t.call(e,n,o)),null!=t.top&&(u.top=t.top-o.top+p),null!=t.left&&(u.left=t.left-o.left+f),"using"in t?t.using.call(e,u):i.css(u)}},x.fn.extend({position:function(){if(this[0]){var e,t,n={top:0,left:0},r=this[0];return"fixed"===x.css(r,"position")?t=r.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),x.nodeName(e[0],"html")||(n=e.offset()),n.top+=x.css(e[0],"borderTopWidth",!0),n.left+=x.css(e[0],"borderLeftWidth",!0)),{top:t.top-n.top-x.css(r,"marginTop",!0),left:t.left-n.left-x.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||s;while(e&&!x.nodeName(e,"html")&&"static"===x.css(e,"position"))e=e.offsetParent;return e||s})}}),x.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,n){var r=/Y/.test(n);x.fn[e]=function(i){return x.access(this,function(e,i,o){var a=or(e);return o===t?a?n in a?a[n]:a.document.documentElement[i]:e[i]:(a?a.scrollTo(r?x(a).scrollLeft():o,r?o:x(a).scrollTop()):e[i]=o,t)},e,i,arguments.length,null)}});function or(e){return x.isWindow(e)?e:9===e.nodeType?e.defaultView||e.parentWindow:!1}x.each({Height:"height",Width:"width"},function(e,n){x.each({padding:"inner"+e,content:n,"":"outer"+e},function(r,i){x.fn[i]=function(i,o){var a=arguments.length&&(r||"boolean"!=typeof i),s=r||(i===!0||o===!0?"margin":"border");return x.access(this,function(n,r,i){var o;return x.isWindow(n)?n.document.documentElement["client"+e]:9===n.nodeType?(o=n.documentElement,Math.max(n.body["scroll"+e],o["scroll"+e],n.body["offset"+e],o["offset"+e],o["client"+e])):i===t?x.css(n,r,s):x.style(n,r,i,s)},n,a?i:t,a,null)}})}),x.fn.size=function(){return this.length},x.fn.andSelf=x.fn.addBack,"object"==typeof module&&"object"==typeof module.exports?module.exports=x:(e.jQuery=e.$=x,"function"==typeof define&&define.amd&&define("jquery",[],function(){return x}))})(window);
// end jquery.js
// begin jquery-browser-detection.js
jQuery.uaMatch=function(ua){ua=ua.toLowerCase();var match=/(chrome)[ \/]([\w.]+)/.exec(ua)||/(webkit)[ \/]([\w.]+)/.exec(ua)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua)||/(msie) ([\w.]+)/.exec(ua)||ua.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua)||[];return{browser:match[1]||"",version:match[2]||"0"};};if(!jQuery.browser){matched=jQuery.uaMatch(navigator.userAgent);browser={};if(matched.browser){browser[matched.browser]=true;browser.version=matched.version;}
if(browser.chrome){browser.webkit=true;}else if(browser.webkit){browser.safari=true;}
jQuery.browser=browser;}
// end jquery-browser-detection.js
// begin jquery.validate.js
(function($){$.extend($.fn,{validate:function(options){if(!this.length){if(options&&options.debug&&window.console){console.warn("Nothing selected, can't validate, returning nothing.");}
return;}
var validator=$.data(this[0],"validator");if(validator){return validator;}
this.attr("novalidate","novalidate");validator=new $.validator(options,this[0]);$.data(this[0],"validator",validator);if(validator.settings.onsubmit){this.validateDelegate(":submit","click",function(event){if(validator.settings.submitHandler){validator.submitButton=event.target;}
if($(event.target).hasClass("cancel")){validator.cancelSubmit=true;}
if($(event.target).attr("formnovalidate")!==undefined){validator.cancelSubmit=true;}});this.submit(function(event){if(validator.settings.debug){event.preventDefault();}
function handle(){var hidden;if(validator.settings.submitHandler){if(validator.submitButton){hidden=$("<input type='hidden'/>").attr("name",validator.submitButton.name).val($(validator.submitButton).val()).appendTo(validator.currentForm);}
validator.settings.submitHandler.call(validator,validator.currentForm,event);if(validator.submitButton){hidden.remove();}
return false;}
return true;}
if(validator.cancelSubmit){validator.cancelSubmit=false;return handle();}
if(validator.form()){if(validator.pendingRequest){validator.formSubmitted=true;return false;}
return handle();}else{validator.focusInvalid();return false;}});}
return validator;},valid:function(){if($(this[0]).is("form")){return this.validate().form();}else{var valid=true;var validator=$(this[0].form).validate();this.each(function(){valid=valid&&validator.element(this);});return valid;}},removeAttrs:function(attributes){var result={},$element=this;$.each(attributes.split(/\s/),function(index,value){result[value]=$element.attr(value);$element.removeAttr(value);});return result;},rules:function(command,argument){var element=this[0];if(command){var settings=$.data(element.form,"validator").settings;var staticRules=settings.rules;var existingRules=$.validator.staticRules(element);switch(command){case"add":$.extend(existingRules,$.validator.normalizeRule(argument));delete existingRules.messages;staticRules[element.name]=existingRules;if(argument.messages){settings.messages[element.name]=$.extend(settings.messages[element.name],argument.messages);}
break;case"remove":if(!argument){delete staticRules[element.name];return existingRules;}
var filtered={};$.each(argument.split(/\s/),function(index,method){filtered[method]=existingRules[method];delete existingRules[method];});return filtered;}}
var data=$.validator.normalizeRules($.extend({},$.validator.classRules(element),$.validator.attributeRules(element),$.validator.dataRules(element),$.validator.staticRules(element)),element);if(data.required){var param=data.required;delete data.required;data=$.extend({required:param},data);}
return data;}});$.extend($.expr[":"],{blank:function(a){return!$.trim(""+$(a).val());},filled:function(a){return!!$.trim(""+$(a).val());},unchecked:function(a){return!$(a).prop("checked");}});$.validator=function(options,form){this.settings=$.extend(true,{},$.validator.defaults,options);this.currentForm=form;this.init();};$.validator.format=function(source,params){if(arguments.length===1){return function(){var args=$.makeArray(arguments);args.unshift(source);return $.validator.format.apply(this,args);};}
if(arguments.length>2&&params.constructor!==Array){params=$.makeArray(arguments).slice(1);}
if(params.constructor!==Array){params=[params];}
$.each(params,function(i,n){source=source.replace(new RegExp("\\{"+i+"\\}","g"),function(){return n;});});return source;};$.extend($.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",validClass:"valid",errorElement:"label",focusInvalid:true,errorContainer:$([]),errorLabelContainer:$([]),onsubmit:true,ignore:":hidden",ignoreTitle:false,onfocusin:function(element,event){this.lastActive=element;if(this.settings.focusCleanup&&!this.blockFocusCleanup){if(this.settings.unhighlight){this.settings.unhighlight.call(this,element,this.settings.errorClass,this.settings.validClass);}
this.addWrapper(this.errorsFor(element)).hide();}},onfocusout:function(element,event){if(!this.checkable(element)&&(element.name in this.submitted||!this.optional(element))){this.element(element);}},onkeyup:function(element,event){if(event.which===9&&this.elementValue(element)===""){return;}else if(element.name in this.submitted||element===this.lastElement){this.element(element);}},onclick:function(element,event){if(element.name in this.submitted){this.element(element);}
else if(element.parentNode.name in this.submitted){this.element(element.parentNode);}},highlight:function(element,errorClass,validClass){if(element.type==="radio"){this.findByName(element.name).addClass(errorClass).removeClass(validClass);}else{$(element).addClass(errorClass).removeClass(validClass);}},unhighlight:function(element,errorClass,validClass){if(element.type==="radio"){this.findByName(element.name).removeClass(errorClass).addClass(validClass);}else{$(element).removeClass(errorClass).addClass(validClass);}}},setDefaults:function(settings){$.extend($.validator.defaults,settings);},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.",maxlength:$.validator.format("Please enter no more than {0} characters."),minlength:$.validator.format("Please enter at least {0} characters."),rangelength:$.validator.format("Please enter a value between {0} and {1} characters long."),range:$.validator.format("Please enter a value between {0} and {1}."),max:$.validator.format("Please enter a value less than or equal to {0}."),min:$.validator.format("Please enter a value greater than or equal to {0}.")},autoCreateRanges:false,prototype:{init:function(){this.labelContainer=$(this.settings.errorLabelContainer);this.errorContext=this.labelContainer.length&&this.labelContainer||$(this.currentForm);this.containers=$(this.settings.errorContainer).add(this.settings.errorLabelContainer);this.submitted={};this.valueCache={};this.pendingRequest=0;this.pending={};this.invalid={};this.reset();var groups=(this.groups={});$.each(this.settings.groups,function(key,value){if(typeof value==="string"){value=value.split(/\s/);}
$.each(value,function(index,name){groups[name]=key;});});var rules=this.settings.rules;$.each(rules,function(key,value){rules[key]=$.validator.normalizeRule(value);});function delegate(event){var validator=$.data(this[0].form,"validator"),eventType="on"+event.type.replace(/^validate/,"");if(validator.settings[eventType]){validator.settings[eventType].call(validator,this[0],event);}}
$(this.currentForm)
.validateDelegate(":text, [type='password'], [type='file'], select, textarea, "+
"[type='number'], [type='search'] ,[type='tel'], [type='url'], "+
"[type='email'], [type='datetime'], [type='date'], [type='month'], "+
"[type='week'], [type='time'], [type='datetime-local'], "+
"[type='range'], [type='color'] ","focusin focusout keyup",delegate)
.validateDelegate("[type='radio'], [type='checkbox'], select, option","click",delegate);if(this.settings.invalidHandler){$(this.currentForm).bind("invalid-form.validate",this.settings.invalidHandler);}},form:function(){this.checkForm();$.extend(this.submitted,this.errorMap);this.invalid=$.extend({},this.errorMap);if(!this.valid()){$(this.currentForm).triggerHandler("invalid-form",[this]);}
this.showErrors();return this.valid();},checkForm:function(){this.prepareForm();for(var i=0,elements=(this.currentElements=this.elements());elements[i];i++){this.check(elements[i]);}
return this.valid();},element:function(element){element=this.validationTargetFor(this.clean(element));this.lastElement=element;this.prepareElement(element);this.currentElements=$(element);var result=this.check(element)!==false;if(result){delete this.invalid[element.name];}else{this.invalid[element.name]=true;}
if(!this.numberOfInvalids()){this.toHide=this.toHide.add(this.containers);}
this.showErrors();return result;},showErrors:function(errors){if(errors){$.extend(this.errorMap,errors);this.errorList=[];for(var name in errors){this.errorList.push({message:errors[name],element:this.findByName(name)[0]});}
this.successList=$.grep(this.successList,function(element){return!(element.name in errors);});}
if(this.settings.showErrors){this.settings.showErrors.call(this,this.errorMap,this.errorList);}else{this.defaultShowErrors();}},resetForm:function(){if($.fn.resetForm){$(this.currentForm).resetForm();}
this.submitted={};this.lastElement=null;this.prepareForm();this.hideErrors();this.elements().removeClass(this.settings.errorClass).removeData("previousValue");},numberOfInvalids:function(){return this.objectLength(this.invalid);},objectLength:function(obj){var count=0;for(var i in obj){count++;}
return count;},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{$(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[])
.filter(":visible")
.focus()
.trigger("focusin");}catch(e){}}},findLastActive:function(){var lastActive=this.lastActive;return lastActive&&$.grep(this.errorList,function(n){return n.element.name===lastActive.name;}).length===1&&lastActive;},elements:function(){var validator=this,rulesCache={};return $(this.currentForm)
.find("input, select, textarea")
.not(":submit, :reset, :image, [disabled]")
.not(this.settings.ignore)
.filter(function(){if(!this.name&&validator.settings.debug&&window.console){console.error("%o has no name assigned",this);}
if(this.name in rulesCache||!validator.objectLength($(this).rules())){return false;}
rulesCache[this.name]=true;return true;});},clean:function(selector){return $(selector)[0];},errors:function(){var errorClass=this.settings.errorClass.replace(" ",".");return $(this.settings.errorElement+"."+errorClass,this.errorContext);},reset:function(){this.successList=[];this.errorList=[];this.errorMap={};this.toShow=$([]);this.toHide=$([]);this.currentElements=$([]);},prepareForm:function(){this.reset();this.toHide=this.errors().add(this.containers);},prepareElement:function(element){this.reset();this.toHide=this.errorsFor(element);},elementValue:function(element){var type=$(element).attr("type"),val=$(element).val();if(type==="radio"||type==="checkbox"){return $("input[name='"+$(element).attr("name")+"']:checked").val();}
if(typeof val==="string"){return val.replace(/\r/g,"");}
return val;},check:function(element){element=this.validationTargetFor(this.clean(element));var rules=$(element).rules();var dependencyMismatch=false;var val=this.elementValue(element);var result;for(var method in rules){var rule={method:method,parameters:rules[method]};try{result=$.validator.methods[method].call(this,val,element,rule.parameters);if(result==="dependency-mismatch"){dependencyMismatch=true;continue;}
dependencyMismatch=false;if(result==="pending"){this.toHide=this.toHide.not(this.errorsFor(element));return;}
if(!result){this.formatAndAdd(element,rule);return false;}}catch(e){if(this.settings.debug&&window.console){console.log("Exception occurred when checking element "+element.id+", check the '"+rule.method+"' method.",e);}
throw e;}}
if(dependencyMismatch){return;}
if(this.objectLength(rules)){this.successList.push(element);}
return true;},customDataMessage:function(element,method){return $(element).data("msg-"+method.toLowerCase())||(element.attributes&&$(element).attr("data-msg-"+method.toLowerCase()));},customMessage:function(name,method){var m=this.settings.messages[name];return m&&(m.constructor===String?m:m[method]);},findDefined:function(){for(var i=0;i<arguments.length;i++){if(arguments[i]!==undefined){return arguments[i];}}
return undefined;},defaultMessage:function(element,method){return this.findDefined(this.customMessage(element.name,method),this.customDataMessage(element,method),!this.settings.ignoreTitle&&element.title||undefined,$.validator.messages[method],"<strong>Warning: No message defined for "+element.name+"</strong>");},formatAndAdd:function(element,rule){var message=this.defaultMessage(element,rule.method),theregex=/\$?\{(\d+)\}/g;if(typeof message==="function"){message=message.call(this,rule.parameters,element);}else if(theregex.test(message)){message=$.validator.format(message.replace(theregex,"{$1}"),rule.parameters);}
this.errorList.push({message:message,element:element});this.errorMap[element.name]=message;this.submitted[element.name]=message;},addWrapper:function(toToggle){if(this.settings.wrapper){toToggle=toToggle.add(toToggle.parent(this.settings.wrapper));}
return toToggle;},defaultShowErrors:function(){var i,elements;for(i=0;this.errorList[i];i++){var error=this.errorList[i];if(this.settings.highlight){this.settings.highlight.call(this,error.element,this.settings.errorClass,this.settings.validClass);}
this.showLabel(error.element,error.message);}
if(this.errorList.length){this.toShow=this.toShow.add(this.containers);}
if(this.settings.success){for(i=0;this.successList[i];i++){this.showLabel(this.successList[i]);}}
if(this.settings.unhighlight){for(i=0,elements=this.validElements();elements[i];i++){this.settings.unhighlight.call(this,elements[i],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 $(this.errorList).map(function(){return this.element;});},showLabel:function(element,message){var label=this.errorsFor(element);if(label.length){label.removeClass(this.settings.validClass).addClass(this.settings.errorClass);label.html(message);}else{label=$("<"+this.settings.errorElement+">")
.attr("for",this.idOrName(element))
.addClass(this.settings.errorClass)
.html(message||"");if(this.settings.wrapper){label=label.hide().show().wrap("<"+this.settings.wrapper+"/>").parent();}
if(!this.labelContainer.append(label).length){if(this.settings.errorPlacement){this.settings.errorPlacement(label,$(element));}else{label.insertAfter(element);}}}
if(!message&&this.settings.success){label.text("");if(typeof this.settings.success==="string"){label.addClass(this.settings.success);}else{this.settings.success(label,element);}}
this.toShow=this.toShow.add(label);},errorsFor:function(element){var name=this.idOrName(element);return this.errors().filter(function(){return $(this).attr("for")===name;});},idOrName:function(element){return this.groups[element.name]||(this.checkable(element)?element.name:element.id||element.name);},validationTargetFor:function(element){if(this.checkable(element)){element=this.findByName(element.name).not(this.settings.ignore)[0];}
return element;},checkable:function(element){return(/radio|checkbox/i).test(element.type);},findByName:function(name){return $(this.currentForm).find("[name='"+name+"']");},getLength:function(value,element){switch(element.nodeName.toLowerCase()){case"select":return $("option:selected",element).length;case"input":if(this.checkable(element)){return this.findByName(element.name).filter(":checked").length;}}
return value.length;},depend:function(param,element){return this.dependTypes[typeof param]?this.dependTypes[typeof param](param,element):true;},dependTypes:{"boolean":function(param,element){return param;},"string":function(param,element){return!!$(param,element.form).length;},"function":function(param,element){return param(element);}},optional:function(element){var val=this.elementValue(element);return!$.validator.methods.required.call(this,val,element)&&"dependency-mismatch";},startRequest:function(element){if(!this.pending[element.name]){this.pendingRequest++;this.pending[element.name]=true;}},stopRequest:function(element,valid){this.pendingRequest--;if(this.pendingRequest<0){this.pendingRequest=0;}
delete this.pending[element.name];if(valid&&this.pendingRequest===0&&this.formSubmitted&&this.form()){$(this.currentForm).submit();this.formSubmitted=false;}else if(!valid&&this.pendingRequest===0&&this.formSubmitted){$(this.currentForm).triggerHandler("invalid-form",[this]);this.formSubmitted=false;}},previousValue:function(element){return $.data(element,"previousValue")||$.data(element,"previousValue",{old:null,valid:true,message:this.defaultMessage(element,"remote")});}},classRuleSettings:{required:{required:true},email:{email:true},url:{url:true},date:{date:true},dateISO:{dateISO:true},number:{number:true},digits:{digits:true},creditcard:{creditcard:true}},addClassRules:function(className,rules){if(className.constructor===String){this.classRuleSettings[className]=rules;}else{$.extend(this.classRuleSettings,className);}},classRules:function(element){var rules={};var classes=$(element).attr("class");if(classes){$.each(classes.split(" "),function(){if(this in $.validator.classRuleSettings){$.extend(rules,$.validator.classRuleSettings[this]);}});}
return rules;},attributeRules:function(element){var rules={};var $element=$(element);var type=$element[0].getAttribute("type");for(var method in $.validator.methods){var value;if(method==="required"){value=$element.get(0).getAttribute(method);if(value===""){value=true;}
value=!!value;}else{value=$element.attr(method);}
if(/min|max/.test(method)&&(type===null||/number|range|text/.test(type))){value=Number(value);}
if(value){rules[method]=value;}else if(type===method&&type!=='range'){rules[method]=true;}}
if(rules.maxlength&&/-1|2147483647|524288/.test(rules.maxlength)){delete rules.maxlength;}
return rules;},dataRules:function(element){var method,value,rules={},$element=$(element);for(method in $.validator.methods){value=$element.data("rule-"+method.toLowerCase());if(value!==undefined){rules[method]=value;}}
return rules;},staticRules:function(element){var rules={};var validator=$.data(element.form,"validator");if(validator.settings.rules){rules=$.validator.normalizeRule(validator.settings.rules[element.name])||{};}
return rules;},normalizeRules:function(rules,element){$.each(rules,function(prop,val){if(val===false){delete rules[prop];return;}
if(val.param||val.depends){var keepRule=true;switch(typeof val.depends){case"string":keepRule=!!$(val.depends,element.form).length;break;case"function":keepRule=val.depends.call(element,element);break;}
if(keepRule){rules[prop]=val.param!==undefined?val.param:true;}else{delete rules[prop];}}});$.each(rules,function(rule,parameter){rules[rule]=$.isFunction(parameter)?parameter(element):parameter;});$.each(['minlength','maxlength'],function(){if(rules[this]){rules[this]=Number(rules[this]);}});$.each(['rangelength','range'],function(){var parts;if(rules[this]){if($.isArray(rules[this])){rules[this]=[Number(rules[this][0]),Number(rules[this][1])];}else if(typeof rules[this]==="string"){parts=rules[this].split(/[\s,]+/);rules[this]=[Number(parts[0]),Number(parts[1])];}}});if($.validator.autoCreateRanges){if(rules.min&&rules.max){rules.range=[rules.min,rules.max];delete rules.min;delete rules.max;}
if(rules.minlength&&rules.maxlength){rules.rangelength=[rules.minlength,rules.maxlength];delete rules.minlength;delete rules.maxlength;}}
return rules;},normalizeRule:function(data){if(typeof data==="string"){var transformed={};$.each(data.split(/\s/),function(){transformed[this]=true;});data=transformed;}
return data;},addMethod:function(name,method,message){$.validator.methods[name]=method;$.validator.messages[name]=message!==undefined?message:$.validator.messages[name];if(method.length<3){$.validator.addClassRules(name,$.validator.normalizeRule(name));}},methods:{required:function(value,element,param){if(!this.depend(param,element)){return"dependency-mismatch";}
if(element.nodeName.toLowerCase()==="select"){var val=$(element).val();return val&&val.length>0;}
if(this.checkable(element)){return this.getLength(value,element)>0;}
return $.trim(value).length>0;},email:function(value,element){return this.optional(element)||/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([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(value);},url:function(value,element){return this.optional(element)||/^(https?|s?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(value);},date:function(value,element){return this.optional(element)||!/Invalid|NaN/.test(new Date(value).toString());},dateISO:function(value,element){return this.optional(element)||/^\d{4}[\/\-]\d{1,2}[\/\-]\d{1,2}$/.test(value);},number:function(value,element){return this.optional(element)||/^-?(?:\d+|\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(value);},digits:function(value,element){return this.optional(element)||/^\d+$/.test(value);},creditcard:function(value,element){if(this.optional(element)){return"dependency-mismatch";}
if(/[^0-9 \-]+/.test(value)){return false;}
var nCheck=0,nDigit=0,bEven=false;value=value.replace(/\D/g,"");for(var n=value.length-1;n>=0;n--){var cDigit=value.charAt(n);nDigit=parseInt(cDigit,10);if(bEven){if((nDigit*=2)>9){nDigit-=9;}}
nCheck+=nDigit;bEven=!bEven;}
return(nCheck%10)===0;},minlength:function(value,element,param){var length=$.isArray(value)?value.length:this.getLength($.trim(value),element);return this.optional(element)||length>=param;},maxlength:function(value,element,param){var length=$.isArray(value)?value.length:this.getLength($.trim(value),element);return this.optional(element)||length<=param;},rangelength:function(value,element,param){var length=$.isArray(value)?value.length:this.getLength($.trim(value),element);return this.optional(element)||(length>=param[0]&&length<=param[1]);},min:function(value,element,param){return this.optional(element)||value>=param;},max:function(value,element,param){return this.optional(element)||value<=param;},range:function(value,element,param){return this.optional(element)||(value>=param[0]&&value<=param[1]);},equalTo:function(value,element,param){var target=$(param);if(this.settings.onfocusout){target.unbind(".validate-equalTo").bind("blur.validate-equalTo",function(){$(element).valid();});}
return value===target.val();},remote:function(value,element,param){if(this.optional(element)){return"dependency-mismatch";}
var previous=this.previousValue(element);if(!this.settings.messages[element.name]){this.settings.messages[element.name]={};}
previous.originalMessage=this.settings.messages[element.name].remote;this.settings.messages[element.name].remote=previous.message;param=typeof param==="string"&&{url:param}||param;if(previous.old===value){return previous.valid;}
previous.old=value;var validator=this;this.startRequest(element);var data={};data[element.name]=value;$.ajax($.extend(true,{url:param,mode:"abort",port:"validate"+element.name,dataType:"json",data:data,success:function(response){validator.settings.messages[element.name].remote=previous.originalMessage;var valid=response===true||response==="true";if(valid){var submitted=validator.formSubmitted;validator.prepareElement(element);validator.formSubmitted=submitted;validator.successList.push(element);delete validator.invalid[element.name];validator.showErrors();}else{var errors={};var message=response||validator.defaultMessage(element,"remote");errors[element.name]=previous.message=$.isFunction(message)?message(value):message;validator.invalid[element.name]=true;validator.showErrors(errors);}
previous.valid=valid;validator.stopRequest(element,valid);}},param));return"pending";}}});$.format=$.validator.format;}(jQuery));(function($){var pendingRequests={};if($.ajaxPrefilter){$.ajaxPrefilter(function(settings,_,xhr){var port=settings.port;if(settings.mode==="abort"){if(pendingRequests[port]){pendingRequests[port].abort();}
pendingRequests[port]=xhr;}});}else{var ajax=$.ajax;$.ajax=function(settings){var mode=("mode"in settings?settings:$.ajaxSettings).mode,port=("port"in settings?settings:$.ajaxSettings).port;if(mode==="abort"){if(pendingRequests[port]){pendingRequests[port].abort();}
pendingRequests[port]=ajax.apply(this,arguments);return pendingRequests[port];}
return ajax.apply(this,arguments);};}}(jQuery));(function($){$.extend($.fn,{validateDelegate:function(delegate,type,handler){return this.bind(type,function(event){var target=$(event.target);if(target.is(delegate)){return handler.apply(target,arguments);}});}});}(jQuery));
// end jquery.validate.js
// begin jquery-ui.js
(function(e,t){function i(t,i){var a,n,r,o=t.nodeName.toLowerCase();return"area"===o?(a=t.parentNode,n=a.name,t.href&&n&&"map"===a.nodeName.toLowerCase()?(r=e("img[usemap=#"+n+"]")[0],!!r&&s(r)):!1):(/input|select|textarea|button|object/.test(o)?!t.disabled:"a"===o?t.href||i:i)&&s(t)}function s(t){return e.expr.filters.visible(t)&&!e(t).parents().addBack().filter(function(){return"hidden"===e.css(this,"visibility")}).length}var a=0,n=/^ui-id-\d+$/;e.ui=e.ui||{},e.extend(e.ui,{version:"1.10.3",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,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,SPACE:32,TAB:9,UP:38}}),e.fn.extend({focus:function(t){return function(i,s){return"number"==typeof i?this.each(function(){var t=this;setTimeout(function(){e(t).focus(),s&&s.call(t)},i)}):t.apply(this,arguments)}}(e.fn.focus),scrollParent:function(){var t;return t=e.ui.ie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(e.css(this,"position"))&&/(auto|scroll)/.test(e.css(this,"overflow")+e.css(this,"overflow-y")+e.css(this,"overflow-x"))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(e.css(this,"overflow")+e.css(this,"overflow-y")+e.css(this,"overflow-x"))}).eq(0),/fixed/.test(this.css("position"))||!t.length?e(document):t},zIndex:function(i){if(i!==t)return this.css("zIndex",i);if(this.length)for(var s,a,n=e(this[0]);n.length&&n[0]!==document;){if(s=n.css("position"),("absolute"===s||"relative"===s||"fixed"===s)&&(a=parseInt(n.css("zIndex"),10),!isNaN(a)&&0!==a))return a;n=n.parent()}return 0},uniqueId:function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++a)})},removeUniqueId:function(){return this.each(function(){n.test(this.id)&&e(this).removeAttr("id")})}}),e.extend(e.expr[":"],{data:e.expr.createPseudo?e.expr.createPseudo(function(t){return function(i){return!!e.data(i,t)}}):function(t,i,s){return!!e.data(t,s[3])},focusable:function(t){return i(t,!isNaN(e.attr(t,"tabindex")))},tabbable:function(t){var s=e.attr(t,"tabindex"),a=isNaN(s);return(a||s>=0)&&i(t,!a)}}),e("<a>").outerWidth(1).jquery||e.each(["Width","Height"],function(i,s){function a(t,i,s,a){return e.each(n,function(){i-=parseFloat(e.css(t,"padding"+this))||0,s&&(i-=parseFloat(e.css(t,"border"+this+"Width"))||0),a&&(i-=parseFloat(e.css(t,"margin"+this))||0)}),i}var n="Width"===s?["Left","Right"]:["Top","Bottom"],r=s.toLowerCase(),o={innerWidth:e.fn.innerWidth,innerHeight:e.fn.innerHeight,outerWidth:e.fn.outerWidth,outerHeight:e.fn.outerHeight};e.fn["inner"+s]=function(i){return i===t?o["inner"+s].call(this):this.each(function(){e(this).css(r,a(this,i)+"px")})},e.fn["outer"+s]=function(t,i){return"number"!=typeof t?o["outer"+s].call(this,t):this.each(function(){e(this).css(r,a(this,t,!0,i)+"px")})}}),e.fn.addBack||(e.fn.addBack=function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}),e("<a>").data("a-b","a").removeData("a-b").data("a-b")&&(e.fn.removeData=function(t){return function(i){return arguments.length?t.call(this,e.camelCase(i)):t.call(this)}}(e.fn.removeData)),e.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),e.support.selectstart="onselectstart"in document.createElement("div"),e.fn.extend({disableSelection:function(){return this.bind((e.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(e){e.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}}),e.extend(e.ui,{plugin:{add:function(t,i,s){var a,n=e.ui[t].prototype;for(a in s)n.plugins[a]=n.plugins[a]||[],n.plugins[a].push([i,s[a]])},call:function(e,t,i){var s,a=e.plugins[t];if(a&&e.element[0].parentNode&&11!==e.element[0].parentNode.nodeType)for(s=0;a.length>s;s++)e.options[a[s][0]]&&a[s][1].apply(e.element,i)}},hasScroll:function(t,i){if("hidden"===e(t).css("overflow"))return!1;var s=i&&"left"===i?"scrollLeft":"scrollTop",a=!1;return t[s]>0?!0:(t[s]=1,a=t[s]>0,t[s]=0,a)}})})(jQuery);(function(e,t){var i=0,s=Array.prototype.slice,n=e.cleanData;e.cleanData=function(t){for(var i,s=0;null!=(i=t[s]);s++)try{e(i).triggerHandler("remove")}catch(a){}n(t)},e.widget=function(i,s,n){var a,r,o,h,l={},u=i.split(".")[0];i=i.split(".")[1],a=u+"-"+i,n||(n=s,s=e.Widget),e.expr[":"][a.toLowerCase()]=function(t){return!!e.data(t,a)},e[u]=e[u]||{},r=e[u][i],o=e[u][i]=function(e,i){return this._createWidget?(arguments.length&&this._createWidget(e,i),t):new o(e,i)},e.extend(o,r,{version:n.version,_proto:e.extend({},n),_childConstructors:[]}),h=new s,h.options=e.widget.extend({},h.options),e.each(n,function(i,n){return e.isFunction(n)?(l[i]=function(){var e=function(){return s.prototype[i].apply(this,arguments)},t=function(e){return s.prototype[i].apply(this,e)};return function(){var i,s=this._super,a=this._superApply;return this._super=e,this._superApply=t,i=n.apply(this,arguments),this._super=s,this._superApply=a,i}}(),t):(l[i]=n,t)}),o.prototype=e.widget.extend(h,{widgetEventPrefix:r?h.widgetEventPrefix:i},l,{constructor:o,namespace:u,widgetName:i,widgetFullName:a}),r?(e.each(r._childConstructors,function(t,i){var s=i.prototype;e.widget(s.namespace+"."+s.widgetName,o,i._proto)}),delete r._childConstructors):s._childConstructors.push(o),e.widget.bridge(i,o)},e.widget.extend=function(i){for(var n,a,r=s.call(arguments,1),o=0,h=r.length;h>o;o++)for(n in r[o])a=r[o][n],r[o].hasOwnProperty(n)&&a!==t&&(i[n]=e.isPlainObject(a)?e.isPlainObject(i[n])?e.widget.extend({},i[n],a):e.widget.extend({},a):a);return i},e.widget.bridge=function(i,n){var a=n.prototype.widgetFullName||i;e.fn[i]=function(r){var o="string"==typeof r,h=s.call(arguments,1),l=this;return r=!o&&h.length?e.widget.extend.apply(null,[r].concat(h)):r,o?this.each(function(){var s,n=e.data(this,a);return n?e.isFunction(n[r])&&"_"!==r.charAt(0)?(s=n[r].apply(n,h),s!==n&&s!==t?(l=s&&s.jquery?l.pushStack(s.get()):s,!1):t):e.error("no such method '"+r+"' for "+i+" widget instance"):e.error("cannot call methods on "+i+" prior to initialization; "+"attempted to call method '"+r+"'")}):this.each(function(){var t=e.data(this,a);t?t.option(r||{})._init():e.data(this,a,new n(r,this))}),l}},e.Widget=function(){},e.Widget._childConstructors=[],e.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(t,s){s=e(s||this.defaultElement||this)[0],this.element=e(s),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.options=e.widget.extend({},this.options,this._getCreateOptions(),t),this.bindings=e(),this.hoverable=e(),this.focusable=e(),s!==this&&(e.data(s,this.widgetFullName,this),this._on(!0,this.element,{remove:function(e){e.target===s&&this.destroy()}}),this.document=e(s.style?s.ownerDocument:s.document||s),this.window=e(this.document[0].defaultView||this.document[0].parentWindow)),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:e.noop,_getCreateEventData:e.noop,_create:e.noop,_init:e.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(e.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled "+"ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:e.noop,widget:function(){return this.element},option:function(i,s){var n,a,r,o=i;if(0===arguments.length)return e.widget.extend({},this.options);if("string"==typeof i)if(o={},n=i.split("."),i=n.shift(),n.length){for(a=o[i]=e.widget.extend({},this.options[i]),r=0;n.length-1>r;r++)a[n[r]]=a[n[r]]||{},a=a[n[r]];if(i=n.pop(),s===t)return a[i]===t?null:a[i];a[i]=s}else{if(s===t)return this.options[i]===t?null:this.options[i];o[i]=s}return this._setOptions(o),this},_setOptions:function(e){var t;for(t in e)this._setOption(t,e[t]);return this},_setOption:function(e,t){return this.options[e]=t,"disabled"===e&&(this.widget().toggleClass(this.widgetFullName+"-disabled ui-state-disabled",!!t).attr("aria-disabled",t),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")),this},enable:function(){return this._setOption("disabled",!1)},disable:function(){return this._setOption("disabled",!0)},_on:function(i,s,n){var a,r=this;"boolean"!=typeof i&&(n=s,s=i,i=!1),n?(s=a=e(s),this.bindings=this.bindings.add(s)):(n=s,s=this.element,a=this.widget()),e.each(n,function(n,o){function h(){return i||r.options.disabled!==!0&&!e(this).hasClass("ui-state-disabled")?("string"==typeof o?r[o]:o).apply(r,arguments):t}"string"!=typeof o&&(h.guid=o.guid=o.guid||h.guid||e.guid++);var l=n.match(/^(\w+)\s*(.*)$/),u=l[1]+r.eventNamespace,c=l[2];c?a.delegate(c,u,h):s.bind(u,h)})},_off:function(e,t){t=(t||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.unbind(t).undelegate(t)},_delay:function(e,t){function i(){return("string"==typeof e?s[e]:e).apply(s,arguments)}var s=this;return setTimeout(i,t||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t),this._on(t,{mouseenter:function(t){e(t.currentTarget).addClass("ui-state-hover")},mouseleave:function(t){e(t.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t),this._on(t,{focusin:function(t){e(t.currentTarget).addClass("ui-state-focus")},focusout:function(t){e(t.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(t,i,s){var n,a,r=this.options[t];if(s=s||{},i=e.Event(i),i.type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),i.target=this.element[0],a=i.originalEvent)for(n in a)n in i||(i[n]=a[n]);return this.element.trigger(i,s),!(e.isFunction(r)&&r.apply(this.element[0],[i].concat(s))===!1||i.isDefaultPrevented())}},e.each({show:"fadeIn",hide:"fadeOut"},function(t,i){e.Widget.prototype["_"+t]=function(s,n,a){"string"==typeof n&&(n={effect:n});var r,o=n?n===!0||"number"==typeof n?i:n.effect||i:t;n=n||{},"number"==typeof n&&(n={duration:n}),r=!e.isEmptyObject(n),n.complete=a,n.delay&&s.delay(n.delay),r&&e.effects&&e.effects.effect[o]?s[t](n):o!==t&&s[o]?s[o](n.duration,n.easing,a):s.queue(function(i){e(this)[t](),a&&a.call(s[0]),i()})}})})(jQuery);(function(e){var t=!1;e(document).mouseup(function(){t=!1}),e.widget("ui.mouse",{version:"1.10.3",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var t=this;this.element.bind("mousedown."+this.widgetName,function(e){return t._mouseDown(e)}).bind("click."+this.widgetName,function(i){return!0===e.data(i.target,t.widgetName+".preventClickEvent")?(e.removeData(i.target,t.widgetName+".preventClickEvent"),i.stopImmediatePropagation(),!1):undefined}),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName),this._mouseMoveDelegate&&e(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(i){if(!t){this._mouseStarted&&this._mouseUp(i),this._mouseDownEvent=i;var s=this,n=1===i.which,a="string"==typeof this.options.cancel&&i.target.nodeName?e(i.target).closest(this.options.cancel).length:!1;return n&&!a&&this._mouseCapture(i)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){s.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(i)&&this._mouseDelayMet(i)&&(this._mouseStarted=this._mouseStart(i)!==!1,!this._mouseStarted)?(i.preventDefault(),!0):(!0===e.data(i.target,this.widgetName+".preventClickEvent")&&e.removeData(i.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(e){return s._mouseMove(e)},this._mouseUpDelegate=function(e){return s._mouseUp(e)},e(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),i.preventDefault(),t=!0,!0)):!0}},_mouseMove:function(t){return e.ui.ie&&(!document.documentMode||9>document.documentMode)&&!t.button?this._mouseUp(t):this._mouseStarted?(this._mouseDrag(t),t.preventDefault()):(this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,t)!==!1,this._mouseStarted?this._mouseDrag(t):this._mouseUp(t)),!this._mouseStarted)},_mouseUp:function(t){return e(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,t.target===this._mouseDownEvent.target&&e.data(t.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(t)),!1},_mouseDistanceMet:function(e){return Math.max(Math.abs(this._mouseDownEvent.pageX-e.pageX),Math.abs(this._mouseDownEvent.pageY-e.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})})(jQuery);(function(t,e){function i(t,e,i){return[parseFloat(t[0])*(p.test(t[0])?e/100:1),parseFloat(t[1])*(p.test(t[1])?i/100:1)]}function s(e,i){return parseInt(t.css(e,i),10)||0}function n(e){var i=e[0];return 9===i.nodeType?{width:e.width(),height:e.height(),offset:{top:0,left:0}}:t.isWindow(i)?{width:e.width(),height:e.height(),offset:{top:e.scrollTop(),left:e.scrollLeft()}}:i.preventDefault?{width:0,height:0,offset:{top:i.pageY,left:i.pageX}}:{width:e.outerWidth(),height:e.outerHeight(),offset:e.offset()}}t.ui=t.ui||{};var a,o=Math.max,r=Math.abs,h=Math.round,l=/left|center|right/,c=/top|center|bottom/,u=/[\+\-]\d+(\.[\d]+)?%?/,d=/^\w+/,p=/%$/,f=t.fn.position;t.position={scrollbarWidth:function(){if(a!==e)return a;var i,s,n=t("<div style='display:block;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),o=n.children()[0];return t("body").append(n),i=o.offsetWidth,n.css("overflow","scroll"),s=o.offsetWidth,i===s&&(s=n[0].clientWidth),n.remove(),a=i-s},getScrollInfo:function(e){var i=e.isWindow?"":e.element.css("overflow-x"),s=e.isWindow?"":e.element.css("overflow-y"),n="scroll"===i||"auto"===i&&e.width<e.element[0].scrollWidth,a="scroll"===s||"auto"===s&&e.height<e.element[0].scrollHeight;return{width:a?t.position.scrollbarWidth():0,height:n?t.position.scrollbarWidth():0}},getWithinInfo:function(e){var i=t(e||window),s=t.isWindow(i[0]);return{element:i,isWindow:s,offset:i.offset()||{left:0,top:0},scrollLeft:i.scrollLeft(),scrollTop:i.scrollTop(),width:s?i.width():i.outerWidth(),height:s?i.height():i.outerHeight()}}},t.fn.position=function(e){if(!e||!e.of)return f.apply(this,arguments);e=t.extend({},e);var a,p,m,g,v,b,_=t(e.of),y=t.position.getWithinInfo(e.within),w=t.position.getScrollInfo(y),x=(e.collision||"flip").split(" "),k={};return b=n(_),_[0].preventDefault&&(e.at="left top"),p=b.width,m=b.height,g=b.offset,v=t.extend({},g),t.each(["my","at"],function(){var t,i,s=(e[this]||"").split(" ");1===s.length&&(s=l.test(s[0])?s.concat(["center"]):c.test(s[0])?["center"].concat(s):["center","center"]),s[0]=l.test(s[0])?s[0]:"center",s[1]=c.test(s[1])?s[1]:"center",t=u.exec(s[0]),i=u.exec(s[1]),k[this]=[t?t[0]:0,i?i[0]:0],e[this]=[d.exec(s[0])[0],d.exec(s[1])[0]]}),1===x.length&&(x[1]=x[0]),"right"===e.at[0]?v.left+=p:"center"===e.at[0]&&(v.left+=p/2),"bottom"===e.at[1]?v.top+=m:"center"===e.at[1]&&(v.top+=m/2),a=i(k.at,p,m),v.left+=a[0],v.top+=a[1],this.each(function(){var n,l,c=t(this),u=c.outerWidth(),d=c.outerHeight(),f=s(this,"marginLeft"),b=s(this,"marginTop"),D=u+f+s(this,"marginRight")+w.width,T=d+b+s(this,"marginBottom")+w.height,C=t.extend({},v),M=i(k.my,c.outerWidth(),c.outerHeight());"right"===e.my[0]?C.left-=u:"center"===e.my[0]&&(C.left-=u/2),"bottom"===e.my[1]?C.top-=d:"center"===e.my[1]&&(C.top-=d/2),C.left+=M[0],C.top+=M[1],t.support.offsetFractions||(C.left=h(C.left),C.top=h(C.top)),n={marginLeft:f,marginTop:b},t.each(["left","top"],function(i,s){t.ui.position[x[i]]&&t.ui.position[x[i]][s](C,{targetWidth:p,targetHeight:m,elemWidth:u,elemHeight:d,collisionPosition:n,collisionWidth:D,collisionHeight:T,offset:[a[0]+M[0],a[1]+M[1]],my:e.my,at:e.at,within:y,elem:c})}),e.using&&(l=function(t){var i=g.left-C.left,s=i+p-u,n=g.top-C.top,a=n+m-d,h={target:{element:_,left:g.left,top:g.top,width:p,height:m},element:{element:c,left:C.left,top:C.top,width:u,height:d},horizontal:0>s?"left":i>0?"right":"center",vertical:0>a?"top":n>0?"bottom":"middle"};u>p&&p>r(i+s)&&(h.horizontal="center"),d>m&&m>r(n+a)&&(h.vertical="middle"),h.important=o(r(i),r(s))>o(r(n),r(a))?"horizontal":"vertical",e.using.call(this,t,h)}),c.offset(t.extend(C,{using:l}))})},t.ui.position={fit:{left:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollLeft:s.offset.left,a=s.width,r=t.left-e.collisionPosition.marginLeft,h=n-r,l=r+e.collisionWidth-a-n;e.collisionWidth>a?h>0&&0>=l?(i=t.left+h+e.collisionWidth-a-n,t.left+=h-i):t.left=l>0&&0>=h?n:h>l?n+a-e.collisionWidth:n:h>0?t.left+=h:l>0?t.left-=l:t.left=o(t.left-r,t.left)},top:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollTop:s.offset.top,a=e.within.height,r=t.top-e.collisionPosition.marginTop,h=n-r,l=r+e.collisionHeight-a-n;e.collisionHeight>a?h>0&&0>=l?(i=t.top+h+e.collisionHeight-a-n,t.top+=h-i):t.top=l>0&&0>=h?n:h>l?n+a-e.collisionHeight:n:h>0?t.top+=h:l>0?t.top-=l:t.top=o(t.top-r,t.top)}},flip:{left:function(t,e){var i,s,n=e.within,a=n.offset.left+n.scrollLeft,o=n.width,h=n.isWindow?n.scrollLeft:n.offset.left,l=t.left-e.collisionPosition.marginLeft,c=l-h,u=l+e.collisionWidth-o-h,d="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,p="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,f=-2*e.offset[0];0>c?(i=t.left+d+p+f+e.collisionWidth-o-a,(0>i||r(c)>i)&&(t.left+=d+p+f)):u>0&&(s=t.left-e.collisionPosition.marginLeft+d+p+f-h,(s>0||u>r(s))&&(t.left+=d+p+f))},top:function(t,e){var i,s,n=e.within,a=n.offset.top+n.scrollTop,o=n.height,h=n.isWindow?n.scrollTop:n.offset.top,l=t.top-e.collisionPosition.marginTop,c=l-h,u=l+e.collisionHeight-o-h,d="top"===e.my[1],p=d?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,f="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,m=-2*e.offset[1];0>c?(s=t.top+p+f+m+e.collisionHeight-o-a,t.top+p+f+m>c&&(0>s||r(c)>s)&&(t.top+=p+f+m)):u>0&&(i=t.top-e.collisionPosition.marginTop+p+f+m-h,t.top+p+f+m>u&&(i>0||u>r(i))&&(t.top+=p+f+m))}},flipfit:{left:function(){t.ui.position.flip.left.apply(this,arguments),t.ui.position.fit.left.apply(this,arguments)},top:function(){t.ui.position.flip.top.apply(this,arguments),t.ui.position.fit.top.apply(this,arguments)}}},function(){var e,i,s,n,a,o=document.getElementsByTagName("body")[0],r=document.createElement("div");e=document.createElement(o?"div":"body"),s={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},o&&t.extend(s,{position:"absolute",left:"-1000px",top:"-1000px"});for(a in s)e.style[a]=s[a];e.appendChild(r),i=o||document.documentElement,i.insertBefore(e,i.firstChild),r.style.cssText="position: absolute; left: 10.7432222px;",n=t(r).offset().left,t.support.offsetFractions=n>10&&11>n,e.innerHTML="",i.removeChild(e)}()})(jQuery);(function(e){e.widget("ui.draggable",e.ui.mouse,{version:"1.10.3",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){"original"!==this.options.helper||/^(?: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(){this.element.removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"),this._mouseDestroy()},_mouseCapture:function(t){var i=this.options;return this.helper||i.disabled||e(t.target).closest(".ui-resizable-handle").length>0?!1:(this.handle=this._getHandle(t),this.handle?(e(i.iframeFix===!0?"iframe":i.iframeFix).each(function(){e("<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(e(this).offset()).appendTo("body")}),!0):!1)},_mouseStart:function(t){var i=this.options;return this.helper=this._createHelper(t),this.helper.addClass("ui-draggable-dragging"),this._cacheHelperProportions(),e.ui.ddmanager&&(e.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(),this.offsetParent=this.helper.offsetParent(),this.offsetParentCssPosition=this.offsetParent.css("position"),this.offset=this.positionAbs=this.element.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},this.offset.scroll=!1,e.extend(this.offset,{click:{left:t.pageX-this.offset.left,top:t.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.originalPosition=this.position=this._generatePosition(t),this.originalPageX=t.pageX,this.originalPageY=t.pageY,i.cursorAt&&this._adjustOffsetFromHelper(i.cursorAt),this._setContainment(),this._trigger("start",t)===!1?(this._clear(),!1):(this._cacheHelperProportions(),e.ui.ddmanager&&!i.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t),this._mouseDrag(t,!0),e.ui.ddmanager&&e.ui.ddmanager.dragStart(this,t),!0)},_mouseDrag:function(t,i){if("fixed"===this.offsetParentCssPosition&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(t),this.positionAbs=this._convertPositionTo("absolute"),!i){var s=this._uiHash();if(this._trigger("drag",t,s)===!1)return this._mouseUp({}),!1;this.position=s.position}return this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),e.ui.ddmanager&&e.ui.ddmanager.drag(this,t),!1},_mouseStop:function(t){var i=this,s=!1;return e.ui.ddmanager&&!this.options.dropBehaviour&&(s=e.ui.ddmanager.drop(this,t)),this.dropped&&(s=this.dropped,this.dropped=!1),"original"!==this.options.helper||e.contains(this.element[0].ownerDocument,this.element[0])?("invalid"===this.options.revert&&!s||"valid"===this.options.revert&&s||this.options.revert===!0||e.isFunction(this.options.revert)&&this.options.revert.call(this.element,s)?e(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){i._trigger("stop",t)!==!1&&i._clear()}):this._trigger("stop",t)!==!1&&this._clear(),!1):!1},_mouseUp:function(t){return e("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)}),e.ui.ddmanager&&e.ui.ddmanager.dragStop(this,t),e.ui.mouse.prototype._mouseUp.call(this,t)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear(),this},_getHandle:function(t){return this.options.handle?!!e(t.target).closest(this.element.find(this.options.handle)).length:!0},_createHelper:function(t){var i=this.options,s=e.isFunction(i.helper)?e(i.helper.apply(this.element[0],[t])):"clone"===i.helper?this.element.clone().removeAttr("id"):this.element;return s.parents("body").length||s.appendTo("parent"===i.appendTo?this.element[0].parentNode:i.appendTo),s[0]===this.element[0]||/(fixed|absolute)/.test(s.css("position"))||s.css("position","absolute"),s},_adjustOffsetFromHelper:function(t){"string"==typeof t&&(t=t.split(" ")),e.isArray(t)&&(t={left:+t[0],top:+t[1]||0}),"left"in t&&(this.offset.click.left=t.left+this.margins.left),"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left),"top"in t&&(this.offset.click.top=t.top+this.margins.top),"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_getParentOffset:function(){var t=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==document&&e.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===document.body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&e.ui.ie)&&(t={top:0,left:0}),{top:t.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var e=this.element.position();return{top:e.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:e.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}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,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var t,i,s,n=this.options;return n.containment?"window"===n.containment?(this.containment=[e(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,e(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,e(window).scrollLeft()+e(window).width()-this.helperProportions.width-this.margins.left,e(window).scrollTop()+(e(window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top],undefined):"document"===n.containment?(this.containment=[0,0,e(document).width()-this.helperProportions.width-this.margins.left,(e(document).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top],undefined):n.containment.constructor===Array?(this.containment=n.containment,undefined):("parent"===n.containment&&(n.containment=this.helper[0].parentNode),i=e(n.containment),s=i[0],s&&(t="hidden"!==i.css("overflow"),this.containment=[(parseInt(i.css("borderLeftWidth"),10)||0)+(parseInt(i.css("paddingLeft"),10)||0),(parseInt(i.css("borderTopWidth"),10)||0)+(parseInt(i.css("paddingTop"),10)||0),(t?Math.max(s.scrollWidth,s.offsetWidth):s.offsetWidth)-(parseInt(i.css("borderRightWidth"),10)||0)-(parseInt(i.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(t?Math.max(s.scrollHeight,s.offsetHeight):s.offsetHeight)-(parseInt(i.css("borderBottomWidth"),10)||0)-(parseInt(i.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relative_container=i),undefined):(this.containment=null,undefined)},_convertPositionTo:function(t,i){i||(i=this.position);var s="absolute"===t?1:-1,n="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&e.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent;return this.offset.scroll||(this.offset.scroll={top:n.scrollTop(),left:n.scrollLeft()}),{top:i.top+this.offset.relative.top*s+this.offset.parent.top*s-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():this.offset.scroll.top)*s,left:i.left+this.offset.relative.left*s+this.offset.parent.left*s-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():this.offset.scroll.left)*s}},_generatePosition:function(t){var i,s,n,a,o=this.options,r="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&e.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,h=t.pageX,l=t.pageY;return this.offset.scroll||(this.offset.scroll={top:r.scrollTop(),left:r.scrollLeft()}),this.originalPosition&&(this.containment&&(this.relative_container?(s=this.relative_container.offset(),i=[this.containment[0]+s.left,this.containment[1]+s.top,this.containment[2]+s.left,this.containment[3]+s.top]):i=this.containment,t.pageX-this.offset.click.left<i[0]&&(h=i[0]+this.offset.click.left),t.pageY-this.offset.click.top<i[1]&&(l=i[1]+this.offset.click.top),t.pageX-this.offset.click.left>i[2]&&(h=i[2]+this.offset.click.left),t.pageY-this.offset.click.top>i[3]&&(l=i[3]+this.offset.click.top)),o.grid&&(n=o.grid[1]?this.originalPageY+Math.round((l-this.originalPageY)/o.grid[1])*o.grid[1]:this.originalPageY,l=i?n-this.offset.click.top>=i[1]||n-this.offset.click.top>i[3]?n:n-this.offset.click.top>=i[1]?n-o.grid[1]:n+o.grid[1]:n,a=o.grid[0]?this.originalPageX+Math.round((h-this.originalPageX)/o.grid[0])*o.grid[0]:this.originalPageX,h=i?a-this.offset.click.left>=i[0]||a-this.offset.click.left>i[2]?a:a-this.offset.click.left>=i[0]?a-o.grid[0]:a+o.grid[0]:a)),{top:l-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():this.offset.scroll.top),left:h-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():this.offset.scroll.left)}},_clear:function(){this.helper.removeClass("ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1},_trigger:function(t,i,s){return s=s||this._uiHash(),e.ui.plugin.call(this,t,[i,s]),"drag"===t&&(this.positionAbs=this._convertPositionTo("absolute")),e.Widget.prototype._trigger.call(this,t,i,s)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),e.ui.plugin.add("draggable","connectToSortable",{start:function(t,i){var s=e(this).data("ui-draggable"),n=s.options,a=e.extend({},i,{item:s.element});s.sortables=[],e(n.connectToSortable).each(function(){var i=e.data(this,"ui-sortable");i&&!i.options.disabled&&(s.sortables.push({instance:i,shouldRevert:i.options.revert}),i.refreshPositions(),i._trigger("activate",t,a))})},stop:function(t,i){var s=e(this).data("ui-draggable"),n=e.extend({},i,{item:s.element});e.each(s.sortables,function(){this.instance.isOver?(this.instance.isOver=0,s.cancelHelperRemoval=!0,this.instance.cancelHelperRemoval=!1,this.shouldRevert&&(this.instance.options.revert=this.shouldRevert),this.instance._mouseStop(t),this.instance.options.helper=this.instance.options._helper,"original"===s.options.helper&&this.instance.currentItem.css({top:"auto",left:"auto"})):(this.instance.cancelHelperRemoval=!1,this.instance._trigger("deactivate",t,n))})},drag:function(t,i){var s=e(this).data("ui-draggable"),n=this;e.each(s.sortables,function(){var a=!1,o=this;this.instance.positionAbs=s.positionAbs,this.instance.helperProportions=s.helperProportions,this.instance.offset.click=s.offset.click,this.instance._intersectsWith(this.instance.containerCache)&&(a=!0,e.each(s.sortables,function(){return this.instance.positionAbs=s.positionAbs,this.instance.helperProportions=s.helperProportions,this.instance.offset.click=s.offset.click,this!==o&&this.instance._intersectsWith(this.instance.containerCache)&&e.contains(o.instance.element[0],this.instance.element[0])&&(a=!1),a})),a?(this.instance.isOver||(this.instance.isOver=1,this.instance.currentItem=e(n).clone().removeAttr("id").appendTo(this.instance.element).data("ui-sortable-item",!0),this.instance.options._helper=this.instance.options.helper,this.instance.options.helper=function(){return i.helper[0]},t.target=this.instance.currentItem[0],this.instance._mouseCapture(t,!0),this.instance._mouseStart(t,!0,!0),this.instance.offset.click.top=s.offset.click.top,this.instance.offset.click.left=s.offset.click.left,this.instance.offset.parent.left-=s.offset.parent.left-this.instance.offset.parent.left,this.instance.offset.parent.top-=s.offset.parent.top-this.instance.offset.parent.top,s._trigger("toSortable",t),s.dropped=this.instance.element,s.currentItem=s.element,this.instance.fromOutside=s),this.instance.currentItem&&this.instance._mouseDrag(t)):this.instance.isOver&&(this.instance.isOver=0,this.instance.cancelHelperRemoval=!0,this.instance.options.revert=!1,this.instance._trigger("out",t,this.instance._uiHash(this.instance)),this.instance._mouseStop(t,!0),this.instance.options.helper=this.instance.options._helper,this.instance.currentItem.remove(),this.instance.placeholder&&this.instance.placeholder.remove(),s._trigger("fromSortable",t),s.dropped=!1)})}}),e.ui.plugin.add("draggable","cursor",{start:function(){var t=e("body"),i=e(this).data("ui-draggable").options;t.css("cursor")&&(i._cursor=t.css("cursor")),t.css("cursor",i.cursor)},stop:function(){var t=e(this).data("ui-draggable").options;t._cursor&&e("body").css("cursor",t._cursor)}}),e.ui.plugin.add("draggable","opacity",{start:function(t,i){var s=e(i.helper),n=e(this).data("ui-draggable").options;s.css("opacity")&&(n._opacity=s.css("opacity")),s.css("opacity",n.opacity)},stop:function(t,i){var s=e(this).data("ui-draggable").options;s._opacity&&e(i.helper).css("opacity",s._opacity)}}),e.ui.plugin.add("draggable","scroll",{start:function(){var t=e(this).data("ui-draggable");t.scrollParent[0]!==document&&"HTML"!==t.scrollParent[0].tagName&&(t.overflowOffset=t.scrollParent.offset())},drag:function(t){var i=e(this).data("ui-draggable"),s=i.options,n=!1;i.scrollParent[0]!==document&&"HTML"!==i.scrollParent[0].tagName?(s.axis&&"x"===s.axis||(i.overflowOffset.top+i.scrollParent[0].offsetHeight-t.pageY<s.scrollSensitivity?i.scrollParent[0].scrollTop=n=i.scrollParent[0].scrollTop+s.scrollSpeed:t.pageY-i.overflowOffset.top<s.scrollSensitivity&&(i.scrollParent[0].scrollTop=n=i.scrollParent[0].scrollTop-s.scrollSpeed)),s.axis&&"y"===s.axis||(i.overflowOffset.left+i.scrollParent[0].offsetWidth-t.pageX<s.scrollSensitivity?i.scrollParent[0].scrollLeft=n=i.scrollParent[0].scrollLeft+s.scrollSpeed:t.pageX-i.overflowOffset.left<s.scrollSensitivity&&(i.scrollParent[0].scrollLeft=n=i.scrollParent[0].scrollLeft-s.scrollSpeed))):(s.axis&&"x"===s.axis||(t.pageY-e(document).scrollTop()<s.scrollSensitivity?n=e(document).scrollTop(e(document).scrollTop()-s.scrollSpeed):e(window).height()-(t.pageY-e(document).scrollTop())<s.scrollSensitivity&&(n=e(document).scrollTop(e(document).scrollTop()+s.scrollSpeed))),s.axis&&"y"===s.axis||(t.pageX-e(document).scrollLeft()<s.scrollSensitivity?n=e(document).scrollLeft(e(document).scrollLeft()-s.scrollSpeed):e(window).width()-(t.pageX-e(document).scrollLeft())<s.scrollSensitivity&&(n=e(document).scrollLeft(e(document).scrollLeft()+s.scrollSpeed)))),n!==!1&&e.ui.ddmanager&&!s.dropBehaviour&&e.ui.ddmanager.prepareOffsets(i,t)}}),e.ui.plugin.add("draggable","snap",{start:function(){var t=e(this).data("ui-draggable"),i=t.options;t.snapElements=[],e(i.snap.constructor!==String?i.snap.items||":data(ui-draggable)":i.snap).each(function(){var i=e(this),s=i.offset();this!==t.element[0]&&t.snapElements.push({item:this,width:i.outerWidth(),height:i.outerHeight(),top:s.top,left:s.left})})},drag:function(t,i){var s,n,a,o,r,h,l,u,c,d,p=e(this).data("ui-draggable"),f=p.options,m=f.snapTolerance,g=i.offset.left,v=g+p.helperProportions.width,b=i.offset.top,y=b+p.helperProportions.height;for(c=p.snapElements.length-1;c>=0;c--)r=p.snapElements[c].left,h=r+p.snapElements[c].width,l=p.snapElements[c].top,u=l+p.snapElements[c].height,r-m>v||g>h+m||l-m>y||b>u+m||!e.contains(p.snapElements[c].item.ownerDocument,p.snapElements[c].item)?(p.snapElements[c].snapping&&p.options.snap.release&&p.options.snap.release.call(p.element,t,e.extend(p._uiHash(),{snapItem:p.snapElements[c].item})),p.snapElements[c].snapping=!1):("inner"!==f.snapMode&&(s=m>=Math.abs(l-y),n=m>=Math.abs(u-b),a=m>=Math.abs(r-v),o=m>=Math.abs(h-g),s&&(i.position.top=p._convertPositionTo("relative",{top:l-p.helperProportions.height,left:0}).top-p.margins.top),n&&(i.position.top=p._convertPositionTo("relative",{top:u,left:0}).top-p.margins.top),a&&(i.position.left=p._convertPositionTo("relative",{top:0,left:r-p.helperProportions.width}).left-p.margins.left),o&&(i.position.left=p._convertPositionTo("relative",{top:0,left:h}).left-p.margins.left)),d=s||n||a||o,"outer"!==f.snapMode&&(s=m>=Math.abs(l-b),n=m>=Math.abs(u-y),a=m>=Math.abs(r-g),o=m>=Math.abs(h-v),s&&(i.position.top=p._convertPositionTo("relative",{top:l,left:0}).top-p.margins.top),n&&(i.position.top=p._convertPositionTo("relative",{top:u-p.helperProportions.height,left:0}).top-p.margins.top),a&&(i.position.left=p._convertPositionTo("relative",{top:0,left:r}).left-p.margins.left),o&&(i.position.left=p._convertPositionTo("relative",{top:0,left:h-p.helperProportions.width}).left-p.margins.left)),!p.snapElements[c].snapping&&(s||n||a||o||d)&&p.options.snap.snap&&p.options.snap.snap.call(p.element,t,e.extend(p._uiHash(),{snapItem:p.snapElements[c].item})),p.snapElements[c].snapping=s||n||a||o||d)}}),e.ui.plugin.add("draggable","stack",{start:function(){var t,i=this.data("ui-draggable").options,s=e.makeArray(e(i.stack)).sort(function(t,i){return(parseInt(e(t).css("zIndex"),10)||0)-(parseInt(e(i).css("zIndex"),10)||0)});s.length&&(t=parseInt(e(s[0]).css("zIndex"),10)||0,e(s).each(function(i){e(this).css("zIndex",t+i)}),this.css("zIndex",t+s.length))}}),e.ui.plugin.add("draggable","zIndex",{start:function(t,i){var s=e(i.helper),n=e(this).data("ui-draggable").options;s.css("zIndex")&&(n._zIndex=s.css("zIndex")),s.css("zIndex",n.zIndex)},stop:function(t,i){var s=e(this).data("ui-draggable").options;s._zIndex&&e(i.helper).css("zIndex",s._zIndex)}})})(jQuery);(function(e){function t(e,t,i){return e>t&&t+i>e}e.widget("ui.droppable",{version:"1.10.3",widgetEventPrefix:"drop",options:{accept:"*",activeClass:!1,addClasses:!0,greedy:!1,hoverClass:!1,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var t=this.options,i=t.accept;this.isover=!1,this.isout=!0,this.accept=e.isFunction(i)?i:function(e){return e.is(i)},this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight},e.ui.ddmanager.droppables[t.scope]=e.ui.ddmanager.droppables[t.scope]||[],e.ui.ddmanager.droppables[t.scope].push(this),t.addClasses&&this.element.addClass("ui-droppable")},_destroy:function(){for(var t=0,i=e.ui.ddmanager.droppables[this.options.scope];i.length>t;t++)i[t]===this&&i.splice(t,1);this.element.removeClass("ui-droppable ui-droppable-disabled")},_setOption:function(t,i){"accept"===t&&(this.accept=e.isFunction(i)?i:function(e){return e.is(i)}),e.Widget.prototype._setOption.apply(this,arguments)},_activate:function(t){var i=e.ui.ddmanager.current;this.options.activeClass&&this.element.addClass(this.options.activeClass),i&&this._trigger("activate",t,this.ui(i))},_deactivate:function(t){var i=e.ui.ddmanager.current;this.options.activeClass&&this.element.removeClass(this.options.activeClass),i&&this._trigger("deactivate",t,this.ui(i))},_over:function(t){var i=e.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this.options.hoverClass&&this.element.addClass(this.options.hoverClass),this._trigger("over",t,this.ui(i)))},_out:function(t){var i=e.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("out",t,this.ui(i)))},_drop:function(t,i){var s=i||e.ui.ddmanager.current,n=!1;return s&&(s.currentItem||s.element)[0]!==this.element[0]?(this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function(){var t=e.data(this,"ui-droppable");return t.options.greedy&&!t.options.disabled&&t.options.scope===s.options.scope&&t.accept.call(t.element[0],s.currentItem||s.element)&&e.ui.intersect(s,e.extend(t,{offset:t.element.offset()}),t.options.tolerance)?(n=!0,!1):undefined}),n?!1:this.accept.call(this.element[0],s.currentItem||s.element)?(this.options.activeClass&&this.element.removeClass(this.options.activeClass),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("drop",t,this.ui(s)),this.element):!1):!1},ui:function(e){return{draggable:e.currentItem||e.element,helper:e.helper,position:e.position,offset:e.positionAbs}}}),e.ui.intersect=function(e,i,s){if(!i.offset)return!1;var n,a,o=(e.positionAbs||e.position.absolute).left,r=o+e.helperProportions.width,h=(e.positionAbs||e.position.absolute).top,l=h+e.helperProportions.height,u=i.offset.left,c=u+i.proportions.width,d=i.offset.top,p=d+i.proportions.height;switch(s){case"fit":return o>=u&&c>=r&&h>=d&&p>=l;case"intersect":return o+e.helperProportions.width/2>u&&c>r-e.helperProportions.width/2&&h+e.helperProportions.height/2>d&&p>l-e.helperProportions.height/2;case"pointer":return n=(e.positionAbs||e.position.absolute).left+(e.clickOffset||e.offset.click).left,a=(e.positionAbs||e.position.absolute).top+(e.clickOffset||e.offset.click).top,t(a,d,i.proportions.height)&&t(n,u,i.proportions.width);case"touch":return(h>=d&&p>=h||l>=d&&p>=l||d>h&&l>p)&&(o>=u&&c>=o||r>=u&&c>=r||u>o&&r>c);default:return!1}},e.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(t,i){var s,n,a=e.ui.ddmanager.droppables[t.options.scope]||[],o=i?i.type:null,r=(t.currentItem||t.element).find(":data(ui-droppable)").addBack();e:for(s=0;a.length>s;s++)if(!(a[s].options.disabled||t&&!a[s].accept.call(a[s].element[0],t.currentItem||t.element))){for(n=0;r.length>n;n++)if(r[n]===a[s].element[0]){a[s].proportions.height=0;continue e}a[s].visible="none"!==a[s].element.css("display"),a[s].visible&&("mousedown"===o&&a[s]._activate.call(a[s],i),a[s].offset=a[s].element.offset(),a[s].proportions={width:a[s].element[0].offsetWidth,height:a[s].element[0].offsetHeight})}},drop:function(t,i){var s=!1;return e.each((e.ui.ddmanager.droppables[t.options.scope]||[]).slice(),function(){this.options&&(!this.options.disabled&&this.visible&&e.ui.intersect(t,this,this.options.tolerance)&&(s=this._drop.call(this,i)||s),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],t.currentItem||t.element)&&(this.isout=!0,this.isover=!1,this._deactivate.call(this,i)))}),s},dragStart:function(t,i){t.element.parentsUntil("body").bind("scroll.droppable",function(){t.options.refreshPositions||e.ui.ddmanager.prepareOffsets(t,i)})},drag:function(t,i){t.options.refreshPositions&&e.ui.ddmanager.prepareOffsets(t,i),e.each(e.ui.ddmanager.droppables[t.options.scope]||[],function(){if(!this.options.disabled&&!this.greedyChild&&this.visible){var s,n,a,o=e.ui.intersect(t,this,this.options.tolerance),r=!o&&this.isover?"isout":o&&!this.isover?"isover":null;r&&(this.options.greedy&&(n=this.options.scope,a=this.element.parents(":data(ui-droppable)").filter(function(){return e.data(this,"ui-droppable").options.scope===n}),a.length&&(s=e.data(a[0],"ui-droppable"),s.greedyChild="isover"===r)),s&&"isover"===r&&(s.isover=!1,s.isout=!0,s._out.call(s,i)),this[r]=!0,this["isout"===r?"isover":"isout"]=!1,this["isover"===r?"_over":"_out"].call(this,i),s&&"isout"===r&&(s.isout=!1,s.isover=!0,s._over.call(s,i)))}})},dragStop:function(t,i){t.element.parentsUntil("body").unbind("scroll.droppable"),t.options.refreshPositions||e.ui.ddmanager.prepareOffsets(t,i)}}})(jQuery);(function(e){function t(e){return parseInt(e,10)||0}function i(e){return!isNaN(parseInt(e,10))}e.widget("ui.resizable",e.ui.mouse,{version:"1.10.3",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_create:function(){var t,i,s,n,a,o=this,r=this.options;if(this.element.addClass("ui-resizable"),e.extend(this,{_aspectRatio:!!r.aspectRatio,aspectRatio:r.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:r.helper||r.ghost||r.animate?r.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)&&(this.element.wrap(e("<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("ui-resizable",this.element.data("ui-resizable")),this.elementIsWrapper=!0,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=r.handles||(e(".ui-resizable-handle",this.element).length?{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"}:"e,s,se"),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),t=this.handles.split(","),this.handles={},i=0;t.length>i;i++)s=e.trim(t[i]),a="ui-resizable-"+s,n=e("<div class='ui-resizable-handle "+a+"'></div>"),n.css({zIndex:r.zIndex}),"se"===s&&n.addClass("ui-icon ui-icon-gripsmall-diagonal-se"),this.handles[s]=".ui-resizable-"+s,this.element.append(n);this._renderAxis=function(t){var i,s,n,a;t=t||this.element;for(i in this.handles)this.handles[i].constructor===String&&(this.handles[i]=e(this.handles[i],this.element).show()),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)&&(s=e(this.handles[i],this.element),a=/sw|ne|nw|se|n|s/.test(i)?s.outerHeight():s.outerWidth(),n=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join(""),t.css(n,a),this._proportionallyResize()),e(this.handles[i]).length},this._renderAxis(this.element),this._handles=e(".ui-resizable-handle",this.element).disableSelection(),this._handles.mouseover(function(){o.resizing||(this.className&&(n=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),o.axis=n&&n[1]?n[1]:"se")}),r.autoHide&&(this._handles.hide(),e(this.element).addClass("ui-resizable-autohide").mouseenter(function(){r.disabled||(e(this).removeClass("ui-resizable-autohide"),o._handles.show())}).mouseleave(function(){r.disabled||o.resizing||(e(this).addClass("ui-resizable-autohide"),o._handles.hide())})),this._mouseInit()},_destroy:function(){this._mouseDestroy();var t,i=function(t){e(t).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").removeData("ui-resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};return this.elementIsWrapper&&(i(this.element),t=this.element,this.originalElement.css({position:t.css("position"),width:t.outerWidth(),height:t.outerHeight(),top:t.css("top"),left:t.css("left")}).insertAfter(t),t.remove()),this.originalElement.css("resize",this.originalResizeStyle),i(this.originalElement),this},_mouseCapture:function(t){var i,s,n=!1;for(i in this.handles)s=e(this.handles[i])[0],(s===t.target||e.contains(s,t.target))&&(n=!0);return!this.options.disabled&&n},_mouseStart:function(i){var s,n,a,o=this.options,r=this.element.position(),h=this.element;return this.resizing=!0,/absolute/.test(h.css("position"))?h.css({position:"absolute",top:h.css("top"),left:h.css("left")}):h.is(".ui-draggable")&&h.css({position:"absolute",top:r.top,left:r.left}),this._renderProxy(),s=t(this.helper.css("left")),n=t(this.helper.css("top")),o.containment&&(s+=e(o.containment).scrollLeft()||0,n+=e(o.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:s,top:n},this.size=this._helper?{width:h.outerWidth(),height:h.outerHeight()}:{width:h.width(),height:h.height()},this.originalSize=this._helper?{width:h.outerWidth(),height:h.outerHeight()}:{width:h.width(),height:h.height()},this.originalPosition={left:s,top:n},this.sizeDiff={width:h.outerWidth()-h.width(),height:h.outerHeight()-h.height()},this.originalMousePosition={left:i.pageX,top:i.pageY},this.aspectRatio="number"==typeof o.aspectRatio?o.aspectRatio:this.originalSize.width/this.originalSize.height||1,a=e(".ui-resizable-"+this.axis).css("cursor"),e("body").css("cursor","auto"===a?this.axis+"-resize":a),h.addClass("ui-resizable-resizing"),this._propagate("start",i),!0},_mouseDrag:function(t){var i,s=this.helper,n={},a=this.originalMousePosition,o=this.axis,r=this.position.top,h=this.position.left,l=this.size.width,u=this.size.height,c=t.pageX-a.left||0,d=t.pageY-a.top||0,p=this._change[o];return p?(i=p.apply(this,[t,c,d]),this._updateVirtualBoundaries(t.shiftKey),(this._aspectRatio||t.shiftKey)&&(i=this._updateRatio(i,t)),i=this._respectSize(i,t),this._updateCache(i),this._propagate("resize",t),this.position.top!==r&&(n.top=this.position.top+"px"),this.position.left!==h&&(n.left=this.position.left+"px"),this.size.width!==l&&(n.width=this.size.width+"px"),this.size.height!==u&&(n.height=this.size.height+"px"),s.css(n),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),e.isEmptyObject(n)||this._trigger("resize",t,this.ui()),!1):!1},_mouseStop:function(t){this.resizing=!1;var i,s,n,a,o,r,h,l=this.options,u=this;return this._helper&&(i=this._proportionallyResizeElements,s=i.length&&/textarea/i.test(i[0].nodeName),n=s&&e.ui.hasScroll(i[0],"left")?0:u.sizeDiff.height,a=s?0:u.sizeDiff.width,o={width:u.helper.width()-a,height:u.helper.height()-n},r=parseInt(u.element.css("left"),10)+(u.position.left-u.originalPosition.left)||null,h=parseInt(u.element.css("top"),10)+(u.position.top-u.originalPosition.top)||null,l.animate||this.element.css(e.extend(o,{top:h,left:r})),u.helper.height(u.size.height),u.helper.width(u.size.width),this._helper&&!l.animate&&this._proportionallyResize()),e("body").css("cursor","auto"),this.element.removeClass("ui-resizable-resizing"),this._propagate("stop",t),this._helper&&this.helper.remove(),!1},_updateVirtualBoundaries:function(e){var t,s,n,a,o,r=this.options;o={minWidth:i(r.minWidth)?r.minWidth:0,maxWidth:i(r.maxWidth)?r.maxWidth:1/0,minHeight:i(r.minHeight)?r.minHeight:0,maxHeight:i(r.maxHeight)?r.maxHeight:1/0},(this._aspectRatio||e)&&(t=o.minHeight*this.aspectRatio,n=o.minWidth/this.aspectRatio,s=o.maxHeight*this.aspectRatio,a=o.maxWidth/this.aspectRatio,t>o.minWidth&&(o.minWidth=t),n>o.minHeight&&(o.minHeight=n),o.maxWidth>s&&(o.maxWidth=s),o.maxHeight>a&&(o.maxHeight=a)),this._vBoundaries=o},_updateCache:function(e){this.offset=this.helper.offset(),i(e.left)&&(this.position.left=e.left),i(e.top)&&(this.position.top=e.top),i(e.height)&&(this.size.height=e.height),i(e.width)&&(this.size.width=e.width)},_updateRatio:function(e){var t=this.position,s=this.size,n=this.axis;return i(e.height)?e.width=e.height*this.aspectRatio:i(e.width)&&(e.height=e.width/this.aspectRatio),"sw"===n&&(e.left=t.left+(s.width-e.width),e.top=null),"nw"===n&&(e.top=t.top+(s.height-e.height),e.left=t.left+(s.width-e.width)),e},_respectSize:function(e){var t=this._vBoundaries,s=this.axis,n=i(e.width)&&t.maxWidth&&t.maxWidth<e.width,a=i(e.height)&&t.maxHeight&&t.maxHeight<e.height,o=i(e.width)&&t.minWidth&&t.minWidth>e.width,r=i(e.height)&&t.minHeight&&t.minHeight>e.height,h=this.originalPosition.left+this.originalSize.width,l=this.position.top+this.size.height,u=/sw|nw|w/.test(s),c=/nw|ne|n/.test(s);return o&&(e.width=t.minWidth),r&&(e.height=t.minHeight),n&&(e.width=t.maxWidth),a&&(e.height=t.maxHeight),o&&u&&(e.left=h-t.minWidth),n&&u&&(e.left=h-t.maxWidth),r&&c&&(e.top=l-t.minHeight),a&&c&&(e.top=l-t.maxHeight),e.width||e.height||e.left||!e.top?e.width||e.height||e.top||!e.left||(e.left=null):e.top=null,e},_proportionallyResize:function(){if(this._proportionallyResizeElements.length){var e,t,i,s,n,a=this.helper||this.element;for(e=0;this._proportionallyResizeElements.length>e;e++){if(n=this._proportionallyResizeElements[e],!this.borderDif)for(this.borderDif=[],i=[n.css("borderTopWidth"),n.css("borderRightWidth"),n.css("borderBottomWidth"),n.css("borderLeftWidth")],s=[n.css("paddingTop"),n.css("paddingRight"),n.css("paddingBottom"),n.css("paddingLeft")],t=0;i.length>t;t++)this.borderDif[t]=(parseInt(i[t],10)||0)+(parseInt(s[t],10)||0);n.css({height:a.height()-this.borderDif[0]-this.borderDif[2]||0,width:a.width()-this.borderDif[1]-this.borderDif[3]||0})}}},_renderProxy:function(){var t=this.element,i=this.options;this.elementOffset=t.offset(),this._helper?(this.helper=this.helper||e("<div style='overflow:hidden;'></div>"),this.helper.addClass(this._helper).css({width:this.element.outerWidth()-1,height:this.element.outerHeight()-1,position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++i.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(e,t){return{width:this.originalSize.width+t}},w:function(e,t){var i=this.originalSize,s=this.originalPosition;return{left:s.left+t,width:i.width-t}},n:function(e,t,i){var s=this.originalSize,n=this.originalPosition;return{top:n.top+i,height:s.height-i}},s:function(e,t,i){return{height:this.originalSize.height+i}},se:function(t,i,s){return e.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[t,i,s]))},sw:function(t,i,s){return e.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[t,i,s]))},ne:function(t,i,s){return e.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[t,i,s]))},nw:function(t,i,s){return e.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[t,i,s]))}},_propagate:function(t,i){e.ui.plugin.call(this,t,[i,this.ui()]),"resize"!==t&&this._trigger(t,i,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}}}),e.ui.plugin.add("resizable","animate",{stop:function(t){var i=e(this).data("ui-resizable"),s=i.options,n=i._proportionallyResizeElements,a=n.length&&/textarea/i.test(n[0].nodeName),o=a&&e.ui.hasScroll(n[0],"left")?0:i.sizeDiff.height,r=a?0:i.sizeDiff.width,h={width:i.size.width-r,height:i.size.height-o},l=parseInt(i.element.css("left"),10)+(i.position.left-i.originalPosition.left)||null,u=parseInt(i.element.css("top"),10)+(i.position.top-i.originalPosition.top)||null;i.element.animate(e.extend(h,u&&l?{top:u,left:l}:{}),{duration:s.animateDuration,easing:s.animateEasing,step:function(){var s={width:parseInt(i.element.css("width"),10),height:parseInt(i.element.css("height"),10),top:parseInt(i.element.css("top"),10),left:parseInt(i.element.css("left"),10)};n&&n.length&&e(n[0]).css({width:s.width,height:s.height}),i._updateCache(s),i._propagate("resize",t)}})}}),e.ui.plugin.add("resizable","containment",{start:function(){var i,s,n,a,o,r,h,l=e(this).data("ui-resizable"),u=l.options,c=l.element,d=u.containment,p=d instanceof e?d.get(0):/parent/.test(d)?c.parent().get(0):d;p&&(l.containerElement=e(p),/document/.test(d)||d===document?(l.containerOffset={left:0,top:0},l.containerPosition={left:0,top:0},l.parentData={element:e(document),left:0,top:0,width:e(document).width(),height:e(document).height()||document.body.parentNode.scrollHeight}):(i=e(p),s=[],e(["Top","Right","Left","Bottom"]).each(function(e,n){s[e]=t(i.css("padding"+n))}),l.containerOffset=i.offset(),l.containerPosition=i.position(),l.containerSize={height:i.innerHeight()-s[3],width:i.innerWidth()-s[1]},n=l.containerOffset,a=l.containerSize.height,o=l.containerSize.width,r=e.ui.hasScroll(p,"left")?p.scrollWidth:o,h=e.ui.hasScroll(p)?p.scrollHeight:a,l.parentData={element:p,left:n.left,top:n.top,width:r,height:h}))},resize:function(t){var i,s,n,a,o=e(this).data("ui-resizable"),r=o.options,h=o.containerOffset,l=o.position,u=o._aspectRatio||t.shiftKey,c={top:0,left:0},d=o.containerElement;d[0]!==document&&/static/.test(d.css("position"))&&(c=h),l.left<(o._helper?h.left:0)&&(o.size.width=o.size.width+(o._helper?o.position.left-h.left:o.position.left-c.left),u&&(o.size.height=o.size.width/o.aspectRatio),o.position.left=r.helper?h.left:0),l.top<(o._helper?h.top:0)&&(o.size.height=o.size.height+(o._helper?o.position.top-h.top:o.position.top),u&&(o.size.width=o.size.height*o.aspectRatio),o.position.top=o._helper?h.top:0),o.offset.left=o.parentData.left+o.position.left,o.offset.top=o.parentData.top+o.position.top,i=Math.abs((o._helper?o.offset.left-c.left:o.offset.left-c.left)+o.sizeDiff.width),s=Math.abs((o._helper?o.offset.top-c.top:o.offset.top-h.top)+o.sizeDiff.height),n=o.containerElement.get(0)===o.element.parent().get(0),a=/relative|absolute/.test(o.containerElement.css("position")),n&&a&&(i-=o.parentData.left),i+o.size.width>=o.parentData.width&&(o.size.width=o.parentData.width-i,u&&(o.size.height=o.size.width/o.aspectRatio)),s+o.size.height>=o.parentData.height&&(o.size.height=o.parentData.height-s,u&&(o.size.width=o.size.height*o.aspectRatio))},stop:function(){var t=e(this).data("ui-resizable"),i=t.options,s=t.containerOffset,n=t.containerPosition,a=t.containerElement,o=e(t.helper),r=o.offset(),h=o.outerWidth()-t.sizeDiff.width,l=o.outerHeight()-t.sizeDiff.height;t._helper&&!i.animate&&/relative/.test(a.css("position"))&&e(this).css({left:r.left-n.left-s.left,width:h,height:l}),t._helper&&!i.animate&&/static/.test(a.css("position"))&&e(this).css({left:r.left-n.left-s.left,width:h,height:l})}}),e.ui.plugin.add("resizable","alsoResize",{start:function(){var t=e(this).data("ui-resizable"),i=t.options,s=function(t){e(t).each(function(){var t=e(this);t.data("ui-resizable-alsoresize",{width:parseInt(t.width(),10),height:parseInt(t.height(),10),left:parseInt(t.css("left"),10),top:parseInt(t.css("top"),10)})})};"object"!=typeof i.alsoResize||i.alsoResize.parentNode?s(i.alsoResize):i.alsoResize.length?(i.alsoResize=i.alsoResize[0],s(i.alsoResize)):e.each(i.alsoResize,function(e){s(e)})},resize:function(t,i){var s=e(this).data("ui-resizable"),n=s.options,a=s.originalSize,o=s.originalPosition,r={height:s.size.height-a.height||0,width:s.size.width-a.width||0,top:s.position.top-o.top||0,left:s.position.left-o.left||0},h=function(t,s){e(t).each(function(){var t=e(this),n=e(this).data("ui-resizable-alsoresize"),a={},o=s&&s.length?s:t.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];e.each(o,function(e,t){var i=(n[t]||0)+(r[t]||0);i&&i>=0&&(a[t]=i||null)}),t.css(a)})};"object"!=typeof n.alsoResize||n.alsoResize.nodeType?h(n.alsoResize):e.each(n.alsoResize,function(e,t){h(e,t)})},stop:function(){e(this).removeData("resizable-alsoresize")}}),e.ui.plugin.add("resizable","ghost",{start:function(){var t=e(this).data("ui-resizable"),i=t.options,s=t.size;t.ghost=t.originalElement.clone(),t.ghost.css({opacity:.25,display:"block",position:"relative",height:s.height,width:s.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass("string"==typeof i.ghost?i.ghost:""),t.ghost.appendTo(t.helper)},resize:function(){var t=e(this).data("ui-resizable");t.ghost&&t.ghost.css({position:"relative",height:t.size.height,width:t.size.width})},stop:function(){var t=e(this).data("ui-resizable");t.ghost&&t.helper&&t.helper.get(0).removeChild(t.ghost.get(0))}}),e.ui.plugin.add("resizable","grid",{resize:function(){var t=e(this).data("ui-resizable"),i=t.options,s=t.size,n=t.originalSize,a=t.originalPosition,o=t.axis,r="number"==typeof i.grid?[i.grid,i.grid]:i.grid,h=r[0]||1,l=r[1]||1,u=Math.round((s.width-n.width)/h)*h,c=Math.round((s.height-n.height)/l)*l,d=n.width+u,p=n.height+c,f=i.maxWidth&&d>i.maxWidth,m=i.maxHeight&&p>i.maxHeight,g=i.minWidth&&i.minWidth>d,v=i.minHeight&&i.minHeight>p;i.grid=r,g&&(d+=h),v&&(p+=l),f&&(d-=h),m&&(p-=l),/^(se|s|e)$/.test(o)?(t.size.width=d,t.size.height=p):/^(ne)$/.test(o)?(t.size.width=d,t.size.height=p,t.position.top=a.top-c):/^(sw)$/.test(o)?(t.size.width=d,t.size.height=p,t.position.left=a.left-u):(t.size.width=d,t.size.height=p,t.position.top=a.top-c,t.position.left=a.left-u)}})})(jQuery);(function(t){function e(t,e,i){return t>e&&e+i>t}function i(t){return/left|right/.test(t.css("float"))||/inline|table-cell/.test(t.css("display"))}t.widget("ui.sortable",t.ui.mouse,{version:"1.10.3",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_create:function(){var t=this.options;this.containerCache={},this.element.addClass("ui-sortable"),this.refresh(),this.floating=this.items.length?"x"===t.axis||i(this.items[0].item):!1,this.offset=this.element.offset(),this._mouseInit(),this.ready=!0},_destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled"),this._mouseDestroy();for(var t=this.items.length-1;t>=0;t--)this.items[t].item.removeData(this.widgetName+"-item");return this},_setOption:function(e,i){"disabled"===e?(this.options[e]=i,this.widget().toggleClass("ui-sortable-disabled",!!i)):t.Widget.prototype._setOption.apply(this,arguments)},_mouseCapture:function(e,i){var s=null,n=!1,a=this;return this.reverting?!1:this.options.disabled||"static"===this.options.type?!1:(this._refreshItems(e),t(e.target).parents().each(function(){return t.data(this,a.widgetName+"-item")===a?(s=t(this),!1):undefined}),t.data(e.target,a.widgetName+"-item")===a&&(s=t(e.target)),s?!this.options.handle||i||(t(this.options.handle,s).find("*").addBack().each(function(){this===e.target&&(n=!0)}),n)?(this.currentItem=s,this._removeCurrentsFromItems(),!0):!1:!1)},_mouseStart:function(e,i,s){var n,a,o=this.options;if(this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(e),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},t.extend(this.offset,{click:{left:e.pageX-this.offset.left,top:e.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),this.originalPosition=this._generatePosition(e),this.originalPageX=e.pageX,this.originalPageY=e.pageY,o.cursorAt&&this._adjustOffsetFromHelper(o.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),o.containment&&this._setContainment(),o.cursor&&"auto"!==o.cursor&&(a=this.document.find("body"),this.storedCursor=a.css("cursor"),a.css("cursor",o.cursor),this.storedStylesheet=t("<style>*{ cursor: "+o.cursor+" !important; }</style>").appendTo(a)),o.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",o.opacity)),o.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",o.zIndex)),this.scrollParent[0]!==document&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",e,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!s)for(n=this.containers.length-1;n>=0;n--)this.containers[n]._trigger("activate",e,this._uiHash(this));return t.ui.ddmanager&&(t.ui.ddmanager.current=this),t.ui.ddmanager&&!o.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this.dragging=!0,this.helper.addClass("ui-sortable-helper"),this._mouseDrag(e),!0},_mouseDrag:function(e){var i,s,n,a,o=this.options,r=!1;for(this.position=this._generatePosition(e),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),this.options.scroll&&(this.scrollParent[0]!==document&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-e.pageY<o.scrollSensitivity?this.scrollParent[0].scrollTop=r=this.scrollParent[0].scrollTop+o.scrollSpeed:e.pageY-this.overflowOffset.top<o.scrollSensitivity&&(this.scrollParent[0].scrollTop=r=this.scrollParent[0].scrollTop-o.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-e.pageX<o.scrollSensitivity?this.scrollParent[0].scrollLeft=r=this.scrollParent[0].scrollLeft+o.scrollSpeed:e.pageX-this.overflowOffset.left<o.scrollSensitivity&&(this.scrollParent[0].scrollLeft=r=this.scrollParent[0].scrollLeft-o.scrollSpeed)):(e.pageY-t(document).scrollTop()<o.scrollSensitivity?r=t(document).scrollTop(t(document).scrollTop()-o.scrollSpeed):t(window).height()-(e.pageY-t(document).scrollTop())<o.scrollSensitivity&&(r=t(document).scrollTop(t(document).scrollTop()+o.scrollSpeed)),e.pageX-t(document).scrollLeft()<o.scrollSensitivity?r=t(document).scrollLeft(t(document).scrollLeft()-o.scrollSpeed):t(window).width()-(e.pageX-t(document).scrollLeft())<o.scrollSensitivity&&(r=t(document).scrollLeft(t(document).scrollLeft()+o.scrollSpeed))),r!==!1&&t.ui.ddmanager&&!o.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e)),this.positionAbs=this._convertPositionTo("absolute"),this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),i=this.items.length-1;i>=0;i--)if(s=this.items[i],n=s.item[0],a=this._intersectsWithPointer(s),a&&s.instance===this.currentContainer&&n!==this.currentItem[0]&&this.placeholder[1===a?"next":"prev"]()[0]!==n&&!t.contains(this.placeholder[0],n)&&("semi-dynamic"===this.options.type?!t.contains(this.element[0],n):!0)){if(this.direction=1===a?"down":"up","pointer"!==this.options.tolerance&&!this._intersectsWithSides(s))break;this._rearrange(e,s),this._trigger("change",e,this._uiHash());break}return this._contactContainers(e),t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),this._trigger("sort",e,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(e,i){if(e){if(t.ui.ddmanager&&!this.options.dropBehaviour&&t.ui.ddmanager.drop(this,e),this.options.revert){var s=this,n=this.placeholder.offset(),a=this.options.axis,o={};a&&"x"!==a||(o.left=n.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===document.body?0:this.offsetParent[0].scrollLeft)),a&&"y"!==a||(o.top=n.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===document.body?0:this.offsetParent[0].scrollTop)),this.reverting=!0,t(this.helper).animate(o,parseInt(this.options.revert,10)||500,function(){s._clear(e)})}else this._clear(e,i);return!1}},cancel:function(){if(this.dragging){this._mouseUp({target:null}),"original"===this.options.helper?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,this._uiHash(this)),this.containers[e].containerCache.over&&(this.containers[e]._trigger("out",null,this._uiHash(this)),this.containers[e].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),"original"!==this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),t.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?t(this.domPosition.prev).after(this.currentItem):t(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(e){var i=this._getItemsAsjQuery(e&&e.connected),s=[];return e=e||{},t(i).each(function(){var i=(t(e.item||this).attr(e.attribute||"id")||"").match(e.expression||/(.+)[\-=_](.+)/);i&&s.push((e.key||i[1]+"[]")+"="+(e.key&&e.expression?i[1]:i[2]))}),!s.length&&e.key&&s.push(e.key+"="),s.join("&")},toArray:function(e){var i=this._getItemsAsjQuery(e&&e.connected),s=[];return e=e||{},i.each(function(){s.push(t(e.item||this).attr(e.attribute||"id")||"")}),s},_intersectsWith:function(t){var e=this.positionAbs.left,i=e+this.helperProportions.width,s=this.positionAbs.top,n=s+this.helperProportions.height,a=t.left,o=a+t.width,r=t.top,h=r+t.height,l=this.offset.click.top,c=this.offset.click.left,u="x"===this.options.axis||s+l>r&&h>s+l,d="y"===this.options.axis||e+c>a&&o>e+c,p=u&&d;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>t[this.floating?"width":"height"]?p:e+this.helperProportions.width/2>a&&o>i-this.helperProportions.width/2&&s+this.helperProportions.height/2>r&&h>n-this.helperProportions.height/2},_intersectsWithPointer:function(t){var i="x"===this.options.axis||e(this.positionAbs.top+this.offset.click.top,t.top,t.height),s="y"===this.options.axis||e(this.positionAbs.left+this.offset.click.left,t.left,t.width),n=i&&s,a=this._getDragVerticalDirection(),o=this._getDragHorizontalDirection();return n?this.floating?o&&"right"===o||"down"===a?2:1:a&&("down"===a?2:1):!1},_intersectsWithSides:function(t){var i=e(this.positionAbs.top+this.offset.click.top,t.top+t.height/2,t.height),s=e(this.positionAbs.left+this.offset.click.left,t.left+t.width/2,t.width),n=this._getDragVerticalDirection(),a=this._getDragHorizontalDirection();return this.floating&&a?"right"===a&&s||"left"===a&&!s:n&&("down"===n&&i||"up"===n&&!i)},_getDragVerticalDirection:function(){var t=this.positionAbs.top-this.lastPositionAbs.top;return 0!==t&&(t>0?"down":"up")},_getDragHorizontalDirection:function(){var t=this.positionAbs.left-this.lastPositionAbs.left;return 0!==t&&(t>0?"right":"left")},refresh:function(t){return this._refreshItems(t),this.refreshPositions(),this},_connectWith:function(){var t=this.options;return t.connectWith.constructor===String?[t.connectWith]:t.connectWith},_getItemsAsjQuery:function(e){var i,s,n,a,o=[],r=[],h=this._connectWith();if(h&&e)for(i=h.length-1;i>=0;i--)for(n=t(h[i]),s=n.length-1;s>=0;s--)a=t.data(n[s],this.widgetFullName),a&&a!==this&&!a.options.disabled&&r.push([t.isFunction(a.options.items)?a.options.items.call(a.element):t(a.options.items,a.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),a]);for(r.push([t.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):t(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]),i=r.length-1;i>=0;i--)r[i][0].each(function(){o.push(this)});return t(o)},_removeCurrentsFromItems:function(){var e=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=t.grep(this.items,function(t){for(var i=0;e.length>i;i++)if(e[i]===t.item[0])return!1;return!0})},_refreshItems:function(e){this.items=[],this.containers=[this];var i,s,n,a,o,r,h,l,c=this.items,u=[[t.isFunction(this.options.items)?this.options.items.call(this.element[0],e,{item:this.currentItem}):t(this.options.items,this.element),this]],d=this._connectWith();if(d&&this.ready)for(i=d.length-1;i>=0;i--)for(n=t(d[i]),s=n.length-1;s>=0;s--)a=t.data(n[s],this.widgetFullName),a&&a!==this&&!a.options.disabled&&(u.push([t.isFunction(a.options.items)?a.options.items.call(a.element[0],e,{item:this.currentItem}):t(a.options.items,a.element),a]),this.containers.push(a));for(i=u.length-1;i>=0;i--)for(o=u[i][1],r=u[i][0],s=0,l=r.length;l>s;s++)h=t(r[s]),h.data(this.widgetName+"-item",o),c.push({item:h,instance:o,width:0,height:0,left:0,top:0})},refreshPositions:function(e){this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset());var i,s,n,a;for(i=this.items.length-1;i>=0;i--)s=this.items[i],s.instance!==this.currentContainer&&this.currentContainer&&s.item[0]!==this.currentItem[0]||(n=this.options.toleranceElement?t(this.options.toleranceElement,s.item):s.item,e||(s.width=n.outerWidth(),s.height=n.outerHeight()),a=n.offset(),s.left=a.left,s.top=a.top);if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(i=this.containers.length-1;i>=0;i--)a=this.containers[i].element.offset(),this.containers[i].containerCache.left=a.left,this.containers[i].containerCache.top=a.top,this.containers[i].containerCache.width=this.containers[i].element.outerWidth(),this.containers[i].containerCache.height=this.containers[i].element.outerHeight();return this},_createPlaceholder:function(e){e=e||this;var i,s=e.options;s.placeholder&&s.placeholder.constructor!==String||(i=s.placeholder,s.placeholder={element:function(){var s=e.currentItem[0].nodeName.toLowerCase(),n=t("<"+s+">",e.document[0]).addClass(i||e.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper");return"tr"===s?e.currentItem.children().each(function(){t("<td>&#160;</td>",e.document[0]).attr("colspan",t(this).attr("colspan")||1).appendTo(n)}):"img"===s&&n.attr("src",e.currentItem.attr("src")),i||n.css("visibility","hidden"),n},update:function(t,n){(!i||s.forcePlaceholderSize)&&(n.height()||n.height(e.currentItem.innerHeight()-parseInt(e.currentItem.css("paddingTop")||0,10)-parseInt(e.currentItem.css("paddingBottom")||0,10)),n.width()||n.width(e.currentItem.innerWidth()-parseInt(e.currentItem.css("paddingLeft")||0,10)-parseInt(e.currentItem.css("paddingRight")||0,10)))}}),e.placeholder=t(s.placeholder.element.call(e.element,e.currentItem)),e.currentItem.after(e.placeholder),s.placeholder.update(e,e.placeholder)},_contactContainers:function(s){var n,a,o,r,h,l,c,u,d,p,f=null,m=null;for(n=this.containers.length-1;n>=0;n--)if(!t.contains(this.currentItem[0],this.containers[n].element[0]))if(this._intersectsWith(this.containers[n].containerCache)){if(f&&t.contains(this.containers[n].element[0],f.element[0]))continue;f=this.containers[n],m=n}else this.containers[n].containerCache.over&&(this.containers[n]._trigger("out",s,this._uiHash(this)),this.containers[n].containerCache.over=0);if(f)if(1===this.containers.length)this.containers[m].containerCache.over||(this.containers[m]._trigger("over",s,this._uiHash(this)),this.containers[m].containerCache.over=1);else{for(o=1e4,r=null,p=f.floating||i(this.currentItem),h=p?"left":"top",l=p?"width":"height",c=this.positionAbs[h]+this.offset.click[h],a=this.items.length-1;a>=0;a--)t.contains(this.containers[m].element[0],this.items[a].item[0])&&this.items[a].item[0]!==this.currentItem[0]&&(!p||e(this.positionAbs.top+this.offset.click.top,this.items[a].top,this.items[a].height))&&(u=this.items[a].item.offset()[h],d=!1,Math.abs(u-c)>Math.abs(u+this.items[a][l]-c)&&(d=!0,u+=this.items[a][l]),o>Math.abs(u-c)&&(o=Math.abs(u-c),r=this.items[a],this.direction=d?"up":"down"));if(!r&&!this.options.dropOnEmpty)return;if(this.currentContainer===this.containers[m])return;r?this._rearrange(s,r,null,!0):this._rearrange(s,null,this.containers[m].element,!0),this._trigger("change",s,this._uiHash()),this.containers[m]._trigger("change",s,this._uiHash(this)),this.currentContainer=this.containers[m],this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[m]._trigger("over",s,this._uiHash(this)),this.containers[m].containerCache.over=1}},_createHelper:function(e){var i=this.options,s=t.isFunction(i.helper)?t(i.helper.apply(this.element[0],[e,this.currentItem])):"clone"===i.helper?this.currentItem.clone():this.currentItem;return s.parents("body").length||t("parent"!==i.appendTo?i.appendTo:this.currentItem[0].parentNode)[0].appendChild(s[0]),s[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")}),(!s[0].style.width||i.forceHelperSize)&&s.width(this.currentItem.width()),(!s[0].style.height||i.forceHelperSize)&&s.height(this.currentItem.height()),s},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),t.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var e=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===document.body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&t.ui.ie)&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var t=this.currentItem.position();return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:t.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}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 e,i,s,n=this.options;"parent"===n.containment&&(n.containment=this.helper[0].parentNode),("document"===n.containment||"window"===n.containment)&&(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,t("document"===n.containment?document:window).width()-this.helperProportions.width-this.margins.left,(t("document"===n.containment?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(n.containment)||(e=t(n.containment)[0],i=t(n.containment).offset(),s="hidden"!==t(e).css("overflow"),this.containment=[i.left+(parseInt(t(e).css("borderLeftWidth"),10)||0)+(parseInt(t(e).css("paddingLeft"),10)||0)-this.margins.left,i.top+(parseInt(t(e).css("borderTopWidth"),10)||0)+(parseInt(t(e).css("paddingTop"),10)||0)-this.margins.top,i.left+(s?Math.max(e.scrollWidth,e.offsetWidth):e.offsetWidth)-(parseInt(t(e).css("borderLeftWidth"),10)||0)-(parseInt(t(e).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,i.top+(s?Math.max(e.scrollHeight,e.offsetHeight):e.offsetHeight)-(parseInt(t(e).css("borderTopWidth"),10)||0)-(parseInt(t(e).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:function(e,i){i||(i=this.position);var s="absolute"===e?1:-1,n="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,a=/(html|body)/i.test(n[0].tagName);return{top:i.top+this.offset.relative.top*s+this.offset.parent.top*s-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():a?0:n.scrollTop())*s,left:i.left+this.offset.relative.left*s+this.offset.parent.left*s-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():a?0:n.scrollLeft())*s}},_generatePosition:function(e){var i,s,n=this.options,a=e.pageX,o=e.pageY,r="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,h=/(html|body)/i.test(r[0].tagName);return"relative"!==this.cssPosition||this.scrollParent[0]!==document&&this.scrollParent[0]!==this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset()),this.originalPosition&&(this.containment&&(e.pageX-this.offset.click.left<this.containment[0]&&(a=this.containment[0]+this.offset.click.left),e.pageY-this.offset.click.top<this.containment[1]&&(o=this.containment[1]+this.offset.click.top),e.pageX-this.offset.click.left>this.containment[2]&&(a=this.containment[2]+this.offset.click.left),e.pageY-this.offset.click.top>this.containment[3]&&(o=this.containment[3]+this.offset.click.top)),n.grid&&(i=this.originalPageY+Math.round((o-this.originalPageY)/n.grid[1])*n.grid[1],o=this.containment?i-this.offset.click.top>=this.containment[1]&&i-this.offset.click.top<=this.containment[3]?i:i-this.offset.click.top>=this.containment[1]?i-n.grid[1]:i+n.grid[1]:i,s=this.originalPageX+Math.round((a-this.originalPageX)/n.grid[0])*n.grid[0],a=this.containment?s-this.offset.click.left>=this.containment[0]&&s-this.offset.click.left<=this.containment[2]?s:s-this.offset.click.left>=this.containment[0]?s-n.grid[0]:s+n.grid[0]:s)),{top:o-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():h?0:r.scrollTop()),left:a-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():h?0:r.scrollLeft())}},_rearrange:function(t,e,i,s){i?i[0].appendChild(this.placeholder[0]):e.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?e.item[0]:e.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var n=this.counter;this._delay(function(){n===this.counter&&this.refreshPositions(!s)})},_clear:function(t,e){this.reverting=!1;var i,s=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(i in this._storedCSS)("auto"===this._storedCSS[i]||"static"===this._storedCSS[i])&&(this._storedCSS[i]="");this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else this.currentItem.show();for(this.fromOutside&&!e&&s.push(function(t){this._trigger("receive",t,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||e||s.push(function(t){this._trigger("update",t,this._uiHash())}),this!==this.currentContainer&&(e||(s.push(function(t){this._trigger("remove",t,this._uiHash())}),s.push(function(t){return function(e){t._trigger("receive",e,this._uiHash(this))}}.call(this,this.currentContainer)),s.push(function(t){return function(e){t._trigger("update",e,this._uiHash(this))}}.call(this,this.currentContainer)))),i=this.containers.length-1;i>=0;i--)e||s.push(function(t){return function(e){t._trigger("deactivate",e,this._uiHash(this))}}.call(this,this.containers[i])),this.containers[i].containerCache.over&&(s.push(function(t){return function(e){t._trigger("out",e,this._uiHash(this))}}.call(this,this.containers[i])),this.containers[i].containerCache.over=0);if(this.storedCursor&&(this.document.find("body").css("cursor",this.storedCursor),this.storedStylesheet.remove()),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!1,this.cancelHelperRemoval){if(!e){for(this._trigger("beforeStop",t,this._uiHash()),i=0;s.length>i;i++)s[i].call(this,t);this._trigger("stop",t,this._uiHash())}return this.fromOutside=!1,!1}if(e||this._trigger("beforeStop",t,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null,!e){for(i=0;s.length>i;i++)s[i].call(this,t);this._trigger("stop",t,this._uiHash())}return this.fromOutside=!1,!0},_trigger:function(){t.Widget.prototype._trigger.apply(this,arguments)===!1&&this.cancel()},_uiHash:function(e){var i=e||this;return{helper:i.helper,placeholder:i.placeholder||t([]),position:i.position,originalPosition:i.originalPosition,offset:i.positionAbs,item:i.currentItem,sender:e?e.element:null}}})})(jQuery);(function(t){var e=0;t.widget("ui.autocomplete",{version:"1.10.3",defaultElement:"<input>",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},pending:0,_create:function(){var e,i,s,n=this.element[0].nodeName.toLowerCase(),a="textarea"===n,o="input"===n;this.isMultiLine=a?!0:o?!1:this.element.prop("isContentEditable"),this.valueMethod=this.element[a||o?"val":"text"],this.isNewMenu=!0,this.element.addClass("ui-autocomplete-input").attr("autocomplete","off"),this._on(this.element,{keydown:function(n){if(this.element.prop("readOnly"))return e=!0,s=!0,i=!0,undefined;e=!1,s=!1,i=!1;var a=t.ui.keyCode;switch(n.keyCode){case a.PAGE_UP:e=!0,this._move("previousPage",n);break;case a.PAGE_DOWN:e=!0,this._move("nextPage",n);break;case a.UP:e=!0,this._keyEvent("previous",n);break;case a.DOWN:e=!0,this._keyEvent("next",n);break;case a.ENTER:case a.NUMPAD_ENTER:this.menu.active&&(e=!0,n.preventDefault(),this.menu.select(n));break;case a.TAB:this.menu.active&&this.menu.select(n);break;case a.ESCAPE:this.menu.element.is(":visible")&&(this._value(this.term),this.close(n),n.preventDefault());break;default:i=!0,this._searchTimeout(n)}},keypress:function(s){if(e)return e=!1,(!this.isMultiLine||this.menu.element.is(":visible"))&&s.preventDefault(),undefined;if(!i){var n=t.ui.keyCode;switch(s.keyCode){case n.PAGE_UP:this._move("previousPage",s);break;case n.PAGE_DOWN:this._move("nextPage",s);break;case n.UP:this._keyEvent("previous",s);break;case n.DOWN:this._keyEvent("next",s)}}},input:function(t){return s?(s=!1,t.preventDefault(),undefined):(this._searchTimeout(t),undefined)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(t){return this.cancelBlur?(delete this.cancelBlur,undefined):(clearTimeout(this.searching),this.close(t),this._change(t),undefined)}}),this._initSource(),this.menu=t("<ul>").addClass("ui-autocomplete ui-front").appendTo(this._appendTo()).menu({role:null}).hide().data("ui-menu"),this._on(this.menu.element,{mousedown:function(e){e.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur});var i=this.menu.element[0];t(e.target).closest(".ui-menu-item").length||this._delay(function(){var e=this;this.document.one("mousedown",function(s){s.target===e.element[0]||s.target===i||t.contains(i,s.target)||e.close()})})},menufocus:function(e,i){if(this.isNewMenu&&(this.isNewMenu=!1,e.originalEvent&&/^mouse/.test(e.originalEvent.type)))return this.menu.blur(),this.document.one("mousemove",function(){t(e.target).trigger(e.originalEvent)}),undefined;var s=i.item.data("ui-autocomplete-item");!1!==this._trigger("focus",e,{item:s})?e.originalEvent&&/^key/.test(e.originalEvent.type)&&this._value(s.value):this.liveRegion.text(s.value)},menuselect:function(t,e){var i=e.item.data("ui-autocomplete-item"),s=this.previous;this.element[0]!==this.document[0].activeElement&&(this.element.focus(),this.previous=s,this._delay(function(){this.previous=s,this.selectedItem=i})),!1!==this._trigger("select",t,{item:i})&&this._value(i.value),this.term=this._value(),this.close(t),this.selectedItem=i}}),this.liveRegion=t("<span>",{role:"status","aria-live":"polite"}).addClass("ui-helper-hidden-accessible").insertBefore(this.element),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(t,e){this._super(t,e),"source"===t&&this._initSource(),"appendTo"===t&&this.menu.element.appendTo(this._appendTo()),"disabled"===t&&e&&this.xhr&&this.xhr.abort()},_appendTo:function(){var e=this.options.appendTo;return e&&(e=e.jquery||e.nodeType?t(e):this.document.find(e).eq(0)),e||(e=this.element.closest(".ui-front")),e.length||(e=this.document[0].body),e},_initSource:function(){var e,i,s=this;t.isArray(this.options.source)?(e=this.options.source,this.source=function(i,s){s(t.ui.autocomplete.filter(e,i.term))}):"string"==typeof this.options.source?(i=this.options.source,this.source=function(e,n){s.xhr&&s.xhr.abort(),s.xhr=t.ajax({url:i,data:e,dataType:"json",success:function(t){n(t)},error:function(){n([])}})}):this.source=this.options.source},_searchTimeout:function(t){clearTimeout(this.searching),this.searching=this._delay(function(){this.term!==this._value()&&(this.selectedItem=null,this.search(null,t))},this.options.delay)},search:function(t,e){return t=null!=t?t:this._value(),this.term=this._value(),t.length<this.options.minLength?this.close(e):this._trigger("search",e)!==!1?this._search(t):undefined},_search:function(t){this.pending++,this.element.addClass("ui-autocomplete-loading"),this.cancelSearch=!1,this.source({term:t},this._response())},_response:function(){var t=this,i=++e;return function(s){i===e&&t.__response(s),t.pending--,t.pending||t.element.removeClass("ui-autocomplete-loading")}},__response:function(t){t&&(t=this._normalize(t)),this._trigger("response",null,{content:t}),!this.options.disabled&&t&&t.length&&!this.cancelSearch?(this._suggest(t),this._trigger("open")):this._close()},close:function(t){this.cancelSearch=!0,this._close(t)},_close:function(t){this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this._trigger("close",t))},_change:function(t){this.previous!==this._value()&&this._trigger("change",t,{item:this.selectedItem})},_normalize:function(e){return e.length&&e[0].label&&e[0].value?e:t.map(e,function(e){return"string"==typeof e?{label:e,value:e}:t.extend({label:e.label||e.value,value:e.value||e.label},e)})},_suggest:function(e){var i=this.menu.element.empty();this._renderMenu(i,e),this.isNewMenu=!0,this.menu.refresh(),i.show(),this._resizeMenu(),i.position(t.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next()},_resizeMenu:function(){var t=this.menu.element;t.outerWidth(Math.max(t.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(e,i){var s=this;t.each(i,function(t,i){s._renderItemData(e,i)})},_renderItemData:function(t,e){return this._renderItem(t,e).data("ui-autocomplete-item",e)},_renderItem:function(e,i){return t("<li>").append(t("<a>").text(i.label)).appendTo(e)},_move:function(t,e){return this.menu.element.is(":visible")?this.menu.isFirstItem()&&/^previous/.test(t)||this.menu.isLastItem()&&/^next/.test(t)?(this._value(this.term),this.menu.blur(),undefined):(this.menu[t](e),undefined):(this.search(null,e),undefined)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(t,e){(!this.isMultiLine||this.menu.element.is(":visible"))&&(this._move(t,e),e.preventDefault())}}),t.extend(t.ui.autocomplete,{escapeRegex:function(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(e,i){var s=RegExp(t.ui.autocomplete.escapeRegex(i),"i");return t.grep(e,function(t){return s.test(t.label||t.value||t)})}}),t.widget("ui.autocomplete",t.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(t){return t+(t>1?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(t){var e;this._superApply(arguments),this.options.disabled||this.cancelSearch||(e=t&&t.length?this.options.messages.results(t.length):this.options.messages.noResults,this.liveRegion.text(e))}})})(jQuery);(function(t,e){function i(){this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,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:!1,showMonthAfterYear:!1,yearSuffix:""},this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},t.extend(this._defaults,this.regional[""]),this.dpDiv=s(t("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"))}function s(e){var i="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return e.delegate(i,"mouseout",function(){t(this).removeClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&t(this).removeClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&t(this).removeClass("ui-datepicker-next-hover")}).delegate(i,"mouseover",function(){t.datepicker._isDisabledDatepicker(a.inline?e.parent()[0]:a.input[0])||(t(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),t(this).addClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&t(this).addClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&t(this).addClass("ui-datepicker-next-hover"))})}function n(e,i){t.extend(e,i);for(var s in i)null==i[s]&&(e[s]=i[s]);return e}t.extend(t.ui,{datepicker:{version:"1.10.3"}});var a,r="datepicker";t.extend(i.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(t){return n(this._defaults,t||{}),this},_attachDatepicker:function(e,i){var s,n,a;s=e.nodeName.toLowerCase(),n="div"===s||"span"===s,e.id||(this.uuid+=1,e.id="dp"+this.uuid),a=this._newInst(t(e),n),a.settings=t.extend({},i||{}),"input"===s?this._connectDatepicker(e,a):n&&this._inlineDatepicker(e,a)},_newInst:function(e,i){var n=e[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1");return{id:n,input:e,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:i,dpDiv:i?s(t("<div class='"+this._inlineClass+" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")):this.dpDiv}},_connectDatepicker:function(e,i){var s=t(e);i.append=t([]),i.trigger=t([]),s.hasClass(this.markerClassName)||(this._attachments(s,i),s.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp),this._autoSize(i),t.data(e,r,i),i.settings.disabled&&this._disableDatepicker(e))},_attachments:function(e,i){var s,n,a,r=this._get(i,"appendText"),o=this._get(i,"isRTL");i.append&&i.append.remove(),r&&(i.append=t("<span class='"+this._appendClass+"'>"+r+"</span>"),e[o?"before":"after"](i.append)),e.unbind("focus",this._showDatepicker),i.trigger&&i.trigger.remove(),s=this._get(i,"showOn"),("focus"===s||"both"===s)&&e.focus(this._showDatepicker),("button"===s||"both"===s)&&(n=this._get(i,"buttonText"),a=this._get(i,"buttonImage"),i.trigger=t(this._get(i,"buttonImageOnly")?t("<img/>").addClass(this._triggerClass).attr({src:a,alt:n,title:n}):t("<button type='button'></button>").addClass(this._triggerClass).html(a?t("<img/>").attr({src:a,alt:n,title:n}):n)),e[o?"before":"after"](i.trigger),i.trigger.click(function(){return t.datepicker._datepickerShowing&&t.datepicker._lastInput===e[0]?t.datepicker._hideDatepicker():t.datepicker._datepickerShowing&&t.datepicker._lastInput!==e[0]?(t.datepicker._hideDatepicker(),t.datepicker._showDatepicker(e[0])):t.datepicker._showDatepicker(e[0]),!1}))},_autoSize:function(t){if(this._get(t,"autoSize")&&!t.inline){var e,i,s,n,a=new Date(2009,11,20),r=this._get(t,"dateFormat");r.match(/[DM]/)&&(e=function(t){for(i=0,s=0,n=0;t.length>n;n++)t[n].length>i&&(i=t[n].length,s=n);return s},a.setMonth(e(this._get(t,r.match(/MM/)?"monthNames":"monthNamesShort"))),a.setDate(e(this._get(t,r.match(/DD/)?"dayNames":"dayNamesShort"))+20-a.getDay())),t.input.attr("size",this._formatDate(t,a).length)}},_inlineDatepicker:function(e,i){var s=t(e);s.hasClass(this.markerClassName)||(s.addClass(this.markerClassName).append(i.dpDiv),t.data(e,r,i),this._setDate(i,this._getDefaultDate(i),!0),this._updateDatepicker(i),this._updateAlternate(i),i.settings.disabled&&this._disableDatepicker(e),i.dpDiv.css("display","block"))},_dialogDatepicker:function(e,i,s,a,o){var h,l,c,u,d,p=this._dialogInst;return p||(this.uuid+=1,h="dp"+this.uuid,this._dialogInput=t("<input type='text' id='"+h+"' style='position: absolute; top: -100px; width: 0px;'/>"),this._dialogInput.keydown(this._doKeyDown),t("body").append(this._dialogInput),p=this._dialogInst=this._newInst(this._dialogInput,!1),p.settings={},t.data(this._dialogInput[0],r,p)),n(p.settings,a||{}),i=i&&i.constructor===Date?this._formatDate(p,i):i,this._dialogInput.val(i),this._pos=o?o.length?o:[o.pageX,o.pageY]:null,this._pos||(l=document.documentElement.clientWidth,c=document.documentElement.clientHeight,u=document.documentElement.scrollLeft||document.body.scrollLeft,d=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[l/2-100+u,c/2-150+d]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),p.settings.onSelect=s,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),t.blockUI&&t.blockUI(this.dpDiv),t.data(this._dialogInput[0],r,p),this},_destroyDatepicker:function(e){var i,s=t(e),n=t.data(e,r);s.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),t.removeData(e,r),"input"===i?(n.append.remove(),n.trigger.remove(),s.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)):("div"===i||"span"===i)&&s.removeClass(this.markerClassName).empty())},_enableDatepicker:function(e){var i,s,n=t(e),a=t.data(e,r);n.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),"input"===i?(e.disabled=!1,a.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):("div"===i||"span"===i)&&(s=n.children("."+this._inlineClass),s.children().removeClass("ui-state-disabled"),s.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)),this._disabledInputs=t.map(this._disabledInputs,function(t){return t===e?null:t}))},_disableDatepicker:function(e){var i,s,n=t(e),a=t.data(e,r);n.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),"input"===i?(e.disabled=!0,a.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):("div"===i||"span"===i)&&(s=n.children("."+this._inlineClass),s.children().addClass("ui-state-disabled"),s.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)),this._disabledInputs=t.map(this._disabledInputs,function(t){return t===e?null:t}),this._disabledInputs[this._disabledInputs.length]=e)},_isDisabledDatepicker:function(t){if(!t)return!1;for(var e=0;this._disabledInputs.length>e;e++)if(this._disabledInputs[e]===t)return!0;return!1},_getInst:function(e){try{return t.data(e,r)}catch(i){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(i,s,a){var r,o,h,l,c=this._getInst(i);return 2===arguments.length&&"string"==typeof s?"defaults"===s?t.extend({},t.datepicker._defaults):c?"all"===s?t.extend({},c.settings):this._get(c,s):null:(r=s||{},"string"==typeof s&&(r={},r[s]=a),c&&(this._curInst===c&&this._hideDatepicker(),o=this._getDateDatepicker(i,!0),h=this._getMinMaxDate(c,"min"),l=this._getMinMaxDate(c,"max"),n(c.settings,r),null!==h&&r.dateFormat!==e&&r.minDate===e&&(c.settings.minDate=this._formatDate(c,h)),null!==l&&r.dateFormat!==e&&r.maxDate===e&&(c.settings.maxDate=this._formatDate(c,l)),"disabled"in r&&(r.disabled?this._disableDatepicker(i):this._enableDatepicker(i)),this._attachments(t(i),c),this._autoSize(c),this._setDate(c,o),this._updateAlternate(c),this._updateDatepicker(c)),e)},_changeDatepicker:function(t,e,i){this._optionDatepicker(t,e,i)},_refreshDatepicker:function(t){var e=this._getInst(t);e&&this._updateDatepicker(e)},_setDateDatepicker:function(t,e){var i=this._getInst(t);i&&(this._setDate(i,e),this._updateDatepicker(i),this._updateAlternate(i))},_getDateDatepicker:function(t,e){var i=this._getInst(t);return i&&!i.inline&&this._setDateFromField(i,e),i?this._getDate(i):null},_doKeyDown:function(e){var i,s,n,a=t.datepicker._getInst(e.target),r=!0,o=a.dpDiv.is(".ui-datepicker-rtl");if(a._keyEvent=!0,t.datepicker._datepickerShowing)switch(e.keyCode){case 9:t.datepicker._hideDatepicker(),r=!1;break;case 13:return n=t("td."+t.datepicker._dayOverClass+":not(."+t.datepicker._currentClass+")",a.dpDiv),n[0]&&t.datepicker._selectDay(e.target,a.selectedMonth,a.selectedYear,n[0]),i=t.datepicker._get(a,"onSelect"),i?(s=t.datepicker._formatDate(a),i.apply(a.input?a.input[0]:null,[s,a])):t.datepicker._hideDatepicker(),!1;case 27:t.datepicker._hideDatepicker();break;case 33:t.datepicker._adjustDate(e.target,e.ctrlKey?-t.datepicker._get(a,"stepBigMonths"):-t.datepicker._get(a,"stepMonths"),"M");break;case 34:t.datepicker._adjustDate(e.target,e.ctrlKey?+t.datepicker._get(a,"stepBigMonths"):+t.datepicker._get(a,"stepMonths"),"M");break;case 35:(e.ctrlKey||e.metaKey)&&t.datepicker._clearDate(e.target),r=e.ctrlKey||e.metaKey;break;case 36:(e.ctrlKey||e.metaKey)&&t.datepicker._gotoToday(e.target),r=e.ctrlKey||e.metaKey;break;case 37:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,o?1:-1,"D"),r=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&t.datepicker._adjustDate(e.target,e.ctrlKey?-t.datepicker._get(a,"stepBigMonths"):-t.datepicker._get(a,"stepMonths"),"M");break;case 38:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,-7,"D"),r=e.ctrlKey||e.metaKey;break;case 39:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,o?-1:1,"D"),r=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&t.datepicker._adjustDate(e.target,e.ctrlKey?+t.datepicker._get(a,"stepBigMonths"):+t.datepicker._get(a,"stepMonths"),"M");break;case 40:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,7,"D"),r=e.ctrlKey||e.metaKey;break;default:r=!1}else 36===e.keyCode&&e.ctrlKey?t.datepicker._showDatepicker(this):r=!1;r&&(e.preventDefault(),e.stopPropagation())},_doKeyPress:function(i){var s,n,a=t.datepicker._getInst(i.target);return t.datepicker._get(a,"constrainInput")?(s=t.datepicker._possibleChars(t.datepicker._get(a,"dateFormat")),n=String.fromCharCode(null==i.charCode?i.keyCode:i.charCode),i.ctrlKey||i.metaKey||" ">n||!s||s.indexOf(n)>-1):e},_doKeyUp:function(e){var i,s=t.datepicker._getInst(e.target);if(s.input.val()!==s.lastVal)try{i=t.datepicker.parseDate(t.datepicker._get(s,"dateFormat"),s.input?s.input.val():null,t.datepicker._getFormatConfig(s)),i&&(t.datepicker._setDateFromField(s),t.datepicker._updateAlternate(s),t.datepicker._updateDatepicker(s))}catch(n){}return!0},_showDatepicker:function(e){if(e=e.target||e,"input"!==e.nodeName.toLowerCase()&&(e=t("input",e.parentNode)[0]),!t.datepicker._isDisabledDatepicker(e)&&t.datepicker._lastInput!==e){var i,s,a,r,o,h,l;i=t.datepicker._getInst(e),t.datepicker._curInst&&t.datepicker._curInst!==i&&(t.datepicker._curInst.dpDiv.stop(!0,!0),i&&t.datepicker._datepickerShowing&&t.datepicker._hideDatepicker(t.datepicker._curInst.input[0])),s=t.datepicker._get(i,"beforeShow"),a=s?s.apply(e,[e,i]):{},a!==!1&&(n(i.settings,a),i.lastVal=null,t.datepicker._lastInput=e,t.datepicker._setDateFromField(i),t.datepicker._inDialog&&(e.value=""),t.datepicker._pos||(t.datepicker._pos=t.datepicker._findPos(e),t.datepicker._pos[1]+=e.offsetHeight),r=!1,t(e).parents().each(function(){return r|="fixed"===t(this).css("position"),!r}),o={left:t.datepicker._pos[0],top:t.datepicker._pos[1]},t.datepicker._pos=null,i.dpDiv.empty(),i.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),t.datepicker._updateDatepicker(i),o=t.datepicker._checkOffset(i,o,r),i.dpDiv.css({position:t.datepicker._inDialog&&t.blockUI?"static":r?"fixed":"absolute",display:"none",left:o.left+"px",top:o.top+"px"}),i.inline||(h=t.datepicker._get(i,"showAnim"),l=t.datepicker._get(i,"duration"),i.dpDiv.zIndex(t(e).zIndex()+1),t.datepicker._datepickerShowing=!0,t.effects&&t.effects.effect[h]?i.dpDiv.show(h,t.datepicker._get(i,"showOptions"),l):i.dpDiv[h||"show"](h?l:null),t.datepicker._shouldFocusInput(i)&&i.input.focus(),t.datepicker._curInst=i))}},_updateDatepicker:function(e){this.maxRows=4,a=e,e.dpDiv.empty().append(this._generateHTML(e)),this._attachHandlers(e),e.dpDiv.find("."+this._dayOverClass+" a").mouseover();var i,s=this._getNumberOfMonths(e),n=s[1],r=17;e.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),n>1&&e.dpDiv.addClass("ui-datepicker-multi-"+n).css("width",r*n+"em"),e.dpDiv[(1!==s[0]||1!==s[1]?"add":"remove")+"Class"]("ui-datepicker-multi"),e.dpDiv[(this._get(e,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),e===t.datepicker._curInst&&t.datepicker._datepickerShowing&&t.datepicker._shouldFocusInput(e)&&e.input.focus(),e.yearshtml&&(i=e.yearshtml,setTimeout(function(){i===e.yearshtml&&e.yearshtml&&e.dpDiv.find("select.ui-datepicker-year:first").replaceWith(e.yearshtml),i=e.yearshtml=null},0))},_shouldFocusInput:function(t){return t.input&&t.input.is(":visible")&&!t.input.is(":disabled")&&!t.input.is(":focus")},_checkOffset:function(e,i,s){var n=e.dpDiv.outerWidth(),a=e.dpDiv.outerHeight(),r=e.input?e.input.outerWidth():0,o=e.input?e.input.outerHeight():0,h=document.documentElement.clientWidth+(s?0:t(document).scrollLeft()),l=document.documentElement.clientHeight+(s?0:t(document).scrollTop());return i.left-=this._get(e,"isRTL")?n-r:0,i.left-=s&&i.left===e.input.offset().left?t(document).scrollLeft():0,i.top-=s&&i.top===e.input.offset().top+o?t(document).scrollTop():0,i.left-=Math.min(i.left,i.left+n>h&&h>n?Math.abs(i.left+n-h):0),i.top-=Math.min(i.top,i.top+a>l&&l>a?Math.abs(a+o):0),i},_findPos:function(e){for(var i,s=this._getInst(e),n=this._get(s,"isRTL");e&&("hidden"===e.type||1!==e.nodeType||t.expr.filters.hidden(e));)e=e[n?"previousSibling":"nextSibling"];return i=t(e).offset(),[i.left,i.top]},_hideDatepicker:function(e){var i,s,n,a,o=this._curInst;!o||e&&o!==t.data(e,r)||this._datepickerShowing&&(i=this._get(o,"showAnim"),s=this._get(o,"duration"),n=function(){t.datepicker._tidyDialog(o)},t.effects&&(t.effects.effect[i]||t.effects[i])?o.dpDiv.hide(i,t.datepicker._get(o,"showOptions"),s,n):o.dpDiv["slideDown"===i?"slideUp":"fadeIn"===i?"fadeOut":"hide"](i?s:null,n),i||n(),this._datepickerShowing=!1,a=this._get(o,"onClose"),a&&a.apply(o.input?o.input[0]:null,[o.input?o.input.val():"",o]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),t.blockUI&&(t.unblockUI(),t("body").append(this.dpDiv))),this._inDialog=!1)},_tidyDialog:function(t){t.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(e){if(t.datepicker._curInst){var i=t(e.target),s=t.datepicker._getInst(i[0]);(i[0].id!==t.datepicker._mainDivId&&0===i.parents("#"+t.datepicker._mainDivId).length&&!i.hasClass(t.datepicker.markerClassName)&&!i.closest("."+t.datepicker._triggerClass).length&&t.datepicker._datepickerShowing&&(!t.datepicker._inDialog||!t.blockUI)||i.hasClass(t.datepicker.markerClassName)&&t.datepicker._curInst!==s)&&t.datepicker._hideDatepicker()}},_adjustDate:function(e,i,s){var n=t(e),a=this._getInst(n[0]);this._isDisabledDatepicker(n[0])||(this._adjustInstDate(a,i+("M"===s?this._get(a,"showCurrentAtPos"):0),s),this._updateDatepicker(a))},_gotoToday:function(e){var i,s=t(e),n=this._getInst(s[0]);this._get(n,"gotoCurrent")&&n.currentDay?(n.selectedDay=n.currentDay,n.drawMonth=n.selectedMonth=n.currentMonth,n.drawYear=n.selectedYear=n.currentYear):(i=new Date,n.selectedDay=i.getDate(),n.drawMonth=n.selectedMonth=i.getMonth(),n.drawYear=n.selectedYear=i.getFullYear()),this._notifyChange(n),this._adjustDate(s)},_selectMonthYear:function(e,i,s){var n=t(e),a=this._getInst(n[0]);a["selected"+("M"===s?"Month":"Year")]=a["draw"+("M"===s?"Month":"Year")]=parseInt(i.options[i.selectedIndex].value,10),this._notifyChange(a),this._adjustDate(n)},_selectDay:function(e,i,s,n){var a,r=t(e);t(n).hasClass(this._unselectableClass)||this._isDisabledDatepicker(r[0])||(a=this._getInst(r[0]),a.selectedDay=a.currentDay=t("a",n).html(),a.selectedMonth=a.currentMonth=i,a.selectedYear=a.currentYear=s,this._selectDate(e,this._formatDate(a,a.currentDay,a.currentMonth,a.currentYear)))},_clearDate:function(e){var i=t(e);this._selectDate(i,"")},_selectDate:function(e,i){var s,n=t(e),a=this._getInst(n[0]);i=null!=i?i:this._formatDate(a),a.input&&a.input.val(i),this._updateAlternate(a),s=this._get(a,"onSelect"),s?s.apply(a.input?a.input[0]:null,[i,a]):a.input&&a.input.trigger("change"),a.inline?this._updateDatepicker(a):(this._hideDatepicker(),this._lastInput=a.input[0],"object"!=typeof a.input[0]&&a.input.focus(),this._lastInput=null)},_updateAlternate:function(e){var i,s,n,a=this._get(e,"altField");a&&(i=this._get(e,"altFormat")||this._get(e,"dateFormat"),s=this._getDate(e),n=this.formatDate(i,s,this._getFormatConfig(e)),t(a).each(function(){t(this).val(n)}))},noWeekends:function(t){var e=t.getDay();return[e>0&&6>e,""]},iso8601Week:function(t){var e,i=new Date(t.getTime());return i.setDate(i.getDate()+4-(i.getDay()||7)),e=i.getTime(),i.setMonth(0),i.setDate(1),Math.floor(Math.round((e-i)/864e5)/7)+1},parseDate:function(i,s,n){if(null==i||null==s)throw"Invalid arguments";if(s="object"==typeof s?""+s:s+"",""===s)return null;var a,r,o,h,l=0,c=(n?n.shortYearCutoff:null)||this._defaults.shortYearCutoff,u="string"!=typeof c?c:(new Date).getFullYear()%100+parseInt(c,10),d=(n?n.dayNamesShort:null)||this._defaults.dayNamesShort,p=(n?n.dayNames:null)||this._defaults.dayNames,f=(n?n.monthNamesShort:null)||this._defaults.monthNamesShort,m=(n?n.monthNames:null)||this._defaults.monthNames,g=-1,v=-1,_=-1,b=-1,y=!1,x=function(t){var e=i.length>a+1&&i.charAt(a+1)===t;return e&&a++,e},k=function(t){var e=x(t),i="@"===t?14:"!"===t?20:"y"===t&&e?4:"o"===t?3:2,n=RegExp("^\\d{1,"+i+"}"),a=s.substring(l).match(n);if(!a)throw"Missing number at position "+l;return l+=a[0].length,parseInt(a[0],10)},w=function(i,n,a){var r=-1,o=t.map(x(i)?a:n,function(t,e){return[[e,t]]}).sort(function(t,e){return-(t[1].length-e[1].length)});if(t.each(o,function(t,i){var n=i[1];return s.substr(l,n.length).toLowerCase()===n.toLowerCase()?(r=i[0],l+=n.length,!1):e}),-1!==r)return r+1;throw"Unknown name at position "+l},D=function(){if(s.charAt(l)!==i.charAt(a))throw"Unexpected literal at position "+l;l++};for(a=0;i.length>a;a++)if(y)"'"!==i.charAt(a)||x("'")?D():y=!1;else switch(i.charAt(a)){case"d":_=k("d");break;case"D":w("D",d,p);break;case"o":b=k("o");break;case"m":v=k("m");break;case"M":v=w("M",f,m);break;case"y":g=k("y");break;case"@":h=new Date(k("@")),g=h.getFullYear(),v=h.getMonth()+1,_=h.getDate();break;case"!":h=new Date((k("!")-this._ticksTo1970)/1e4),g=h.getFullYear(),v=h.getMonth()+1,_=h.getDate();break;case"'":x("'")?D():y=!0;break;default:D()}if(s.length>l&&(o=s.substr(l),!/^\s+/.test(o)))throw"Extra/unparsed characters found in date: "+o;if(-1===g?g=(new Date).getFullYear():100>g&&(g+=(new Date).getFullYear()-(new Date).getFullYear()%100+(u>=g?0:-100)),b>-1)for(v=1,_=b;;){if(r=this._getDaysInMonth(g,v-1),r>=_)break;v++,_-=r}if(h=this._daylightSavingAdjust(new Date(g,v-1,_)),h.getFullYear()!==g||h.getMonth()+1!==v||h.getDate()!==_)throw"Invalid date";return h},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:1e7*60*60*24*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925)),formatDate:function(t,e,i){if(!e)return"";var s,n=(i?i.dayNamesShort:null)||this._defaults.dayNamesShort,a=(i?i.dayNames:null)||this._defaults.dayNames,r=(i?i.monthNamesShort:null)||this._defaults.monthNamesShort,o=(i?i.monthNames:null)||this._defaults.monthNames,h=function(e){var i=t.length>s+1&&t.charAt(s+1)===e;return i&&s++,i},l=function(t,e,i){var s=""+e;if(h(t))for(;i>s.length;)s="0"+s;return s},c=function(t,e,i,s){return h(t)?s[e]:i[e]},u="",d=!1;if(e)for(s=0;t.length>s;s++)if(d)"'"!==t.charAt(s)||h("'")?u+=t.charAt(s):d=!1;else switch(t.charAt(s)){case"d":u+=l("d",e.getDate(),2);break;case"D":u+=c("D",e.getDay(),n,a);break;case"o":u+=l("o",Math.round((new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime()-new Date(e.getFullYear(),0,0).getTime())/864e5),3);break;case"m":u+=l("m",e.getMonth()+1,2);break;case"M":u+=c("M",e.getMonth(),r,o);break;case"y":u+=h("y")?e.getFullYear():(10>e.getYear()%100?"0":"")+e.getYear()%100;break;case"@":u+=e.getTime();break;case"!":u+=1e4*e.getTime()+this._ticksTo1970;break;case"'":h("'")?u+="'":d=!0;break;default:u+=t.charAt(s)}return u},_possibleChars:function(t){var e,i="",s=!1,n=function(i){var s=t.length>e+1&&t.charAt(e+1)===i;return s&&e++,s};for(e=0;t.length>e;e++)if(s)"'"!==t.charAt(e)||n("'")?i+=t.charAt(e):s=!1;else switch(t.charAt(e)){case"d":case"m":case"y":case"@":i+="0123456789";break;case"D":case"M":return null;case"'":n("'")?i+="'":s=!0;break;default:i+=t.charAt(e)}return i},_get:function(t,i){return t.settings[i]!==e?t.settings[i]:this._defaults[i]},_setDateFromField:function(t,e){if(t.input.val()!==t.lastVal){var i=this._get(t,"dateFormat"),s=t.lastVal=t.input?t.input.val():null,n=this._getDefaultDate(t),a=n,r=this._getFormatConfig(t);try{a=this.parseDate(i,s,r)||n}catch(o){s=e?"":s}t.selectedDay=a.getDate(),t.drawMonth=t.selectedMonth=a.getMonth(),t.drawYear=t.selectedYear=a.getFullYear(),t.currentDay=s?a.getDate():0,t.currentMonth=s?a.getMonth():0,t.currentYear=s?a.getFullYear():0,this._adjustInstDate(t)}},_getDefaultDate:function(t){return this._restrictMinMax(t,this._determineDate(t,this._get(t,"defaultDate"),new Date))},_determineDate:function(e,i,s){var n=function(t){var e=new Date;return e.setDate(e.getDate()+t),e},a=function(i){try{return t.datepicker.parseDate(t.datepicker._get(e,"dateFormat"),i,t.datepicker._getFormatConfig(e))}catch(s){}for(var n=(i.toLowerCase().match(/^c/)?t.datepicker._getDate(e):null)||new Date,a=n.getFullYear(),r=n.getMonth(),o=n.getDate(),h=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,l=h.exec(i);l;){switch(l[2]||"d"){case"d":case"D":o+=parseInt(l[1],10);break;case"w":case"W":o+=7*parseInt(l[1],10);break;case"m":case"M":r+=parseInt(l[1],10),o=Math.min(o,t.datepicker._getDaysInMonth(a,r));break;case"y":case"Y":a+=parseInt(l[1],10),o=Math.min(o,t.datepicker._getDaysInMonth(a,r))}l=h.exec(i)}return new Date(a,r,o)},r=null==i||""===i?s:"string"==typeof i?a(i):"number"==typeof i?isNaN(i)?s:n(i):new Date(i.getTime());return r=r&&"Invalid Date"==""+r?s:r,r&&(r.setHours(0),r.setMinutes(0),r.setSeconds(0),r.setMilliseconds(0)),this._daylightSavingAdjust(r)},_daylightSavingAdjust:function(t){return t?(t.setHours(t.getHours()>12?t.getHours()+2:0),t):null},_setDate:function(t,e,i){var s=!e,n=t.selectedMonth,a=t.selectedYear,r=this._restrictMinMax(t,this._determineDate(t,e,new Date));t.selectedDay=t.currentDay=r.getDate(),t.drawMonth=t.selectedMonth=t.currentMonth=r.getMonth(),t.drawYear=t.selectedYear=t.currentYear=r.getFullYear(),n===t.selectedMonth&&a===t.selectedYear||i||this._notifyChange(t),this._adjustInstDate(t),t.input&&t.input.val(s?"":this._formatDate(t))},_getDate:function(t){var e=!t.currentYear||t.input&&""===t.input.val()?null:this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay));return e},_attachHandlers:function(e){var i=this._get(e,"stepMonths"),s="#"+e.id.replace(/\\\\/g,"\\");e.dpDiv.find("[data-handler]").map(function(){var e={prev:function(){t.datepicker._adjustDate(s,-i,"M")},next:function(){t.datepicker._adjustDate(s,+i,"M")},hide:function(){t.datepicker._hideDatepicker()},today:function(){t.datepicker._gotoToday(s)},selectDay:function(){return t.datepicker._selectDay(s,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return t.datepicker._selectMonthYear(s,this,"M"),!1},selectYear:function(){return t.datepicker._selectMonthYear(s,this,"Y"),!1}};t(this).bind(this.getAttribute("data-event"),e[this.getAttribute("data-handler")])})},_generateHTML:function(t){var e,i,s,n,a,r,o,h,l,c,u,d,p,f,m,g,v,_,b,y,x,k,w,D,T,C,M,S,N,I,P,A,z,H,E,F,O,W,j,R=new Date,L=this._daylightSavingAdjust(new Date(R.getFullYear(),R.getMonth(),R.getDate())),Y=this._get(t,"isRTL"),B=this._get(t,"showButtonPanel"),J=this._get(t,"hideIfNoPrevNext"),K=this._get(t,"navigationAsDateFormat"),Q=this._getNumberOfMonths(t),V=this._get(t,"showCurrentAtPos"),U=this._get(t,"stepMonths"),q=1!==Q[0]||1!==Q[1],X=this._daylightSavingAdjust(t.currentDay?new Date(t.currentYear,t.currentMonth,t.currentDay):new Date(9999,9,9)),G=this._getMinMaxDate(t,"min"),$=this._getMinMaxDate(t,"max"),Z=t.drawMonth-V,te=t.drawYear;if(0>Z&&(Z+=12,te--),$)for(e=this._daylightSavingAdjust(new Date($.getFullYear(),$.getMonth()-Q[0]*Q[1]+1,$.getDate())),e=G&&G>e?G:e;this._daylightSavingAdjust(new Date(te,Z,1))>e;)Z--,0>Z&&(Z=11,te--);for(t.drawMonth=Z,t.drawYear=te,i=this._get(t,"prevText"),i=K?this.formatDate(i,this._daylightSavingAdjust(new Date(te,Z-U,1)),this._getFormatConfig(t)):i,s=this._canAdjustMonth(t,-1,te,Z)?"<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(Y?"e":"w")+"'>"+i+"</span></a>":J?"":"<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(Y?"e":"w")+"'>"+i+"</span></a>",n=this._get(t,"nextText"),n=K?this.formatDate(n,this._daylightSavingAdjust(new Date(te,Z+U,1)),this._getFormatConfig(t)):n,a=this._canAdjustMonth(t,1,te,Z)?"<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click' title='"+n+"'><span class='ui-icon ui-icon-circle-triangle-"+(Y?"w":"e")+"'>"+n+"</span></a>":J?"":"<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='"+n+"'><span class='ui-icon ui-icon-circle-triangle-"+(Y?"w":"e")+"'>"+n+"</span></a>",r=this._get(t,"currentText"),o=this._get(t,"gotoCurrent")&&t.currentDay?X:L,r=K?this.formatDate(r,o,this._getFormatConfig(t)):r,h=t.inline?"":"<button type='button' class='ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all' data-handler='hide' data-event='click'>"+this._get(t,"closeText")+"</button>",l=B?"<div class='ui-datepicker-buttonpane ui-widget-content'>"+(Y?h:"")+(this._isInRange(t,o)?"<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'>"+r+"</button>":"")+(Y?"":h)+"</div>":"",c=parseInt(this._get(t,"firstDay"),10),c=isNaN(c)?0:c,u=this._get(t,"showWeek"),d=this._get(t,"dayNames"),p=this._get(t,"dayNamesMin"),f=this._get(t,"monthNames"),m=this._get(t,"monthNamesShort"),g=this._get(t,"beforeShowDay"),v=this._get(t,"showOtherMonths"),_=this._get(t,"selectOtherMonths"),b=this._getDefaultDate(t),y="",k=0;Q[0]>k;k++){for(w="",this.maxRows=4,D=0;Q[1]>D;D++){if(T=this._daylightSavingAdjust(new Date(te,Z,t.selectedDay)),C=" ui-corner-all",M="",q){if(M+="<div class='ui-datepicker-group",Q[1]>1)switch(D){case 0:M+=" ui-datepicker-group-first",C=" ui-corner-"+(Y?"right":"left");break;case Q[1]-1:M+=" ui-datepicker-group-last",C=" ui-corner-"+(Y?"left":"right");break;default:M+=" ui-datepicker-group-middle",C=""}M+="'>"}for(M+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+C+"'>"+(/all|left/.test(C)&&0===k?Y?a:s:"")+(/all|right/.test(C)&&0===k?Y?s:a:"")+this._generateMonthYearHeader(t,Z,te,G,$,k>0||D>0,f,m)+"</div><table class='ui-datepicker-calendar'><thead>"+"<tr>",S=u?"<th class='ui-datepicker-week-col'>"+this._get(t,"weekHeader")+"</th>":"",x=0;7>x;x++)N=(x+c)%7,S+="<th"+((x+c+6)%7>=5?" class='ui-datepicker-week-end'":"")+">"+"<span title='"+d[N]+"'>"+p[N]+"</span></th>";for(M+=S+"</tr></thead><tbody>",I=this._getDaysInMonth(te,Z),te===t.selectedYear&&Z===t.selectedMonth&&(t.selectedDay=Math.min(t.selectedDay,I)),P=(this._getFirstDayOfMonth(te,Z)-c+7)%7,A=Math.ceil((P+I)/7),z=q?this.maxRows>A?this.maxRows:A:A,this.maxRows=z,H=this._daylightSavingAdjust(new Date(te,Z,1-P)),E=0;z>E;E++){for(M+="<tr>",F=u?"<td class='ui-datepicker-week-col'>"+this._get(t,"calculateWeek")(H)+"</td>":"",x=0;7>x;x++)O=g?g.apply(t.input?t.input[0]:null,[H]):[!0,""],W=H.getMonth()!==Z,j=W&&!_||!O[0]||G&&G>H||$&&H>$,F+="<td class='"+((x+c+6)%7>=5?" ui-datepicker-week-end":"")+(W?" ui-datepicker-other-month":"")+(H.getTime()===T.getTime()&&Z===t.selectedMonth&&t._keyEvent||b.getTime()===H.getTime()&&b.getTime()===T.getTime()?" "+this._dayOverClass:"")+(j?" "+this._unselectableClass+" ui-state-disabled":"")+(W&&!v?"":" "+O[1]+(H.getTime()===X.getTime()?" "+this._currentClass:"")+(H.getTime()===L.getTime()?" ui-datepicker-today":""))+"'"+(W&&!v||!O[2]?"":" title='"+O[2].replace(/'/g,"&#39;")+"'")+(j?"":" data-handler='selectDay' data-event='click' data-month='"+H.getMonth()+"' data-year='"+H.getFullYear()+"'")+">"+(W&&!v?"&#xa0;":j?"<span class='ui-state-default'>"+H.getDate()+"</span>":"<a class='ui-state-default"+(H.getTime()===L.getTime()?" ui-state-highlight":"")+(H.getTime()===X.getTime()?" ui-state-active":"")+(W?" ui-priority-secondary":"")+"' href='#'>"+H.getDate()+"</a>")+"</td>",H.setDate(H.getDate()+1),H=this._daylightSavingAdjust(H);M+=F+"</tr>"}Z++,Z>11&&(Z=0,te++),M+="</tbody></table>"+(q?"</div>"+(Q[0]>0&&D===Q[1]-1?"<div class='ui-datepicker-row-break'></div>":""):""),w+=M}y+=w}return y+=l,t._keyEvent=!1,y},_generateMonthYearHeader:function(t,e,i,s,n,a,r,o){var h,l,c,u,d,p,f,m,g=this._get(t,"changeMonth"),v=this._get(t,"changeYear"),_=this._get(t,"showMonthAfterYear"),b="<div class='ui-datepicker-title'>",y="";if(a||!g)y+="<span class='ui-datepicker-month'>"+r[e]+"</span>";else{for(h=s&&s.getFullYear()===i,l=n&&n.getFullYear()===i,y+="<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>",c=0;12>c;c++)(!h||c>=s.getMonth())&&(!l||n.getMonth()>=c)&&(y+="<option value='"+c+"'"+(c===e?" selected='selected'":"")+">"+o[c]+"</option>");y+="</select>"}if(_||(b+=y+(!a&&g&&v?"":"&#xa0;")),!t.yearshtml)if(t.yearshtml="",a||!v)b+="<span class='ui-datepicker-year'>"+i+"</span>";else{for(u=this._get(t,"yearRange").split(":"),d=(new Date).getFullYear(),p=function(t){var e=t.match(/c[+\-].*/)?i+parseInt(t.substring(1),10):t.match(/[+\-].*/)?d+parseInt(t,10):parseInt(t,10);return isNaN(e)?d:e},f=p(u[0]),m=Math.max(f,p(u[1]||"")),f=s?Math.max(f,s.getFullYear()):f,m=n?Math.min(m,n.getFullYear()):m,t.yearshtml+="<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>";m>=f;f++)t.yearshtml+="<option value='"+f+"'"+(f===i?" selected='selected'":"")+">"+f+"</option>";t.yearshtml+="</select>",b+=t.yearshtml,t.yearshtml=null}return b+=this._get(t,"yearSuffix"),_&&(b+=(!a&&g&&v?"":"&#xa0;")+y),b+="</div>"},_adjustInstDate:function(t,e,i){var s=t.drawYear+("Y"===i?e:0),n=t.drawMonth+("M"===i?e:0),a=Math.min(t.selectedDay,this._getDaysInMonth(s,n))+("D"===i?e:0),r=this._restrictMinMax(t,this._daylightSavingAdjust(new Date(s,n,a)));t.selectedDay=r.getDate(),t.drawMonth=t.selectedMonth=r.getMonth(),t.drawYear=t.selectedYear=r.getFullYear(),("M"===i||"Y"===i)&&this._notifyChange(t)},_restrictMinMax:function(t,e){var i=this._getMinMaxDate(t,"min"),s=this._getMinMaxDate(t,"max"),n=i&&i>e?i:e;return s&&n>s?s:n},_notifyChange:function(t){var e=this._get(t,"onChangeMonthYear");e&&e.apply(t.input?t.input[0]:null,[t.selectedYear,t.selectedMonth+1,t])},_getNumberOfMonths:function(t){var e=this._get(t,"numberOfMonths");return null==e?[1,1]:"number"==typeof e?[1,e]:e},_getMinMaxDate:function(t,e){return this._determineDate(t,this._get(t,e+"Date"),null)},_getDaysInMonth:function(t,e){return 32-this._daylightSavingAdjust(new Date(t,e,32)).getDate()},_getFirstDayOfMonth:function(t,e){return new Date(t,e,1).getDay()},_canAdjustMonth:function(t,e,i,s){var n=this._getNumberOfMonths(t),a=this._daylightSavingAdjust(new Date(i,s+(0>e?e:n[0]*n[1]),1));return 0>e&&a.setDate(this._getDaysInMonth(a.getFullYear(),a.getMonth())),this._isInRange(t,a)},_isInRange:function(t,e){var i,s,n=this._getMinMaxDate(t,"min"),a=this._getMinMaxDate(t,"max"),r=null,o=null,h=this._get(t,"yearRange");return h&&(i=h.split(":"),s=(new Date).getFullYear(),r=parseInt(i[0],10),o=parseInt(i[1],10),i[0].match(/[+\-].*/)&&(r+=s),i[1].match(/[+\-].*/)&&(o+=s)),(!n||e.getTime()>=n.getTime())&&(!a||e.getTime()<=a.getTime())&&(!r||e.getFullYear()>=r)&&(!o||o>=e.getFullYear())},_getFormatConfig:function(t){var e=this._get(t,"shortYearCutoff");return e="string"!=typeof e?e:(new Date).getFullYear()%100+parseInt(e,10),{shortYearCutoff:e,dayNamesShort:this._get(t,"dayNamesShort"),dayNames:this._get(t,"dayNames"),monthNamesShort:this._get(t,"monthNamesShort"),monthNames:this._get(t,"monthNames")}},_formatDate:function(t,e,i,s){e||(t.currentDay=t.selectedDay,t.currentMonth=t.selectedMonth,t.currentYear=t.selectedYear);var n=e?"object"==typeof e?e:this._daylightSavingAdjust(new Date(s,i,e)):this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay));return this.formatDate(this._get(t,"dateFormat"),n,this._getFormatConfig(t))}}),t.fn.datepicker=function(e){if(!this.length)return this;t.datepicker.initialized||(t(document).mousedown(t.datepicker._checkExternalClick),t.datepicker.initialized=!0),0===t("#"+t.datepicker._mainDivId).length&&t("body").append(t.datepicker.dpDiv);var i=Array.prototype.slice.call(arguments,1);return"string"!=typeof e||"isDisabled"!==e&&"getDate"!==e&&"widget"!==e?"option"===e&&2===arguments.length&&"string"==typeof arguments[1]?t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this[0]].concat(i)):this.each(function(){"string"==typeof e?t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this].concat(i)):t.datepicker._attachDatepicker(this,e)}):t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this[0]].concat(i))},t.datepicker=new i,t.datepicker.initialized=!1,t.datepicker.uuid=(new Date).getTime(),t.datepicker.version="1.10.3"})(jQuery);(function(t){t.widget("ui.menu",{version:"1.10.3",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-carat-1-e"},menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.element.uniqueId().addClass("ui-menu ui-widget ui-widget-content ui-corner-all").toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length).attr({role:this.options.role,tabIndex:0}).bind("click"+this.eventNamespace,t.proxy(function(t){this.options.disabled&&t.preventDefault()},this)),this.options.disabled&&this.element.addClass("ui-state-disabled").attr("aria-disabled","true"),this._on({"mousedown .ui-menu-item > a":function(t){t.preventDefault()},"click .ui-state-disabled > a":function(t){t.preventDefault()},"click .ui-menu-item:has(a)":function(e){var i=t(e.target).closest(".ui-menu-item");!this.mouseHandled&&i.not(".ui-state-disabled").length&&(this.mouseHandled=!0,this.select(e),i.has(".ui-menu").length?this.expand(e):this.element.is(":focus")||(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(e){var i=t(e.currentTarget);i.siblings().children(".ui-state-active").removeClass("ui-state-active"),this.focus(e,i)},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(t,e){var i=this.active||this.element.children(".ui-menu-item").eq(0);e||this.focus(t,i)},blur:function(e){this._delay(function(){t.contains(this.element[0],this.document[0].activeElement)||this.collapseAll(e)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(e){t(e.target).closest(".ui-menu").length||this.collapseAll(e),this.mouseHandled=!1}})},_destroy:function(){this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeClass("ui-menu ui-widget ui-widget-content ui-corner-all ui-menu-icons").removeAttr("role").removeAttr("tabIndex").removeAttr("aria-labelledby").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-disabled").removeUniqueId().show(),this.element.find(".ui-menu-item").removeClass("ui-menu-item").removeAttr("role").removeAttr("aria-disabled").children("a").removeUniqueId().removeClass("ui-corner-all ui-state-hover").removeAttr("tabIndex").removeAttr("role").removeAttr("aria-haspopup").children().each(function(){var e=t(this);e.data("ui-menu-submenu-carat")&&e.remove()}),this.element.find(".ui-menu-divider").removeClass("ui-menu-divider ui-widget-content")},_keydown:function(e){function i(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}var s,n,a,o,r,h=!0;switch(e.keyCode){case t.ui.keyCode.PAGE_UP:this.previousPage(e);break;case t.ui.keyCode.PAGE_DOWN:this.nextPage(e);break;case t.ui.keyCode.HOME:this._move("first","first",e);break;case t.ui.keyCode.END:this._move("last","last",e);break;case t.ui.keyCode.UP:this.previous(e);break;case t.ui.keyCode.DOWN:this.next(e);break;case t.ui.keyCode.LEFT:this.collapse(e);break;case t.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(e);break;case t.ui.keyCode.ENTER:case t.ui.keyCode.SPACE:this._activate(e);break;case t.ui.keyCode.ESCAPE:this.collapse(e);break;default:h=!1,n=this.previousFilter||"",a=String.fromCharCode(e.keyCode),o=!1,clearTimeout(this.filterTimer),a===n?o=!0:a=n+a,r=RegExp("^"+i(a),"i"),s=this.activeMenu.children(".ui-menu-item").filter(function(){return r.test(t(this).children("a").text())}),s=o&&-1!==s.index(this.active.next())?this.active.nextAll(".ui-menu-item"):s,s.length||(a=String.fromCharCode(e.keyCode),r=RegExp("^"+i(a),"i"),s=this.activeMenu.children(".ui-menu-item").filter(function(){return r.test(t(this).children("a").text())})),s.length?(this.focus(e,s),s.length>1?(this.previousFilter=a,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter):delete this.previousFilter}h&&e.preventDefault()},_activate:function(t){this.active.is(".ui-state-disabled")||(this.active.children("a[aria-haspopup='true']").length?this.expand(t):this.select(t))},refresh:function(){var e,i=this.options.icons.submenu,s=this.element.find(this.options.menus);s.filter(":not(.ui-menu)").addClass("ui-menu ui-widget ui-widget-content ui-corner-all").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var e=t(this),s=e.prev("a"),n=t("<span>").addClass("ui-menu-icon ui-icon "+i).data("ui-menu-submenu-carat",!0);s.attr("aria-haspopup","true").prepend(n),e.attr("aria-labelledby",s.attr("id"))}),e=s.add(this.element),e.children(":not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role","presentation").children("a").uniqueId().addClass("ui-corner-all").attr({tabIndex:-1,role:this._itemRole()}),e.children(":not(.ui-menu-item)").each(function(){var e=t(this);/[^\-\u2014\u2013\s]/.test(e.text())||e.addClass("ui-widget-content ui-menu-divider")}),e.children(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!t.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(t,e){"icons"===t&&this.element.find(".ui-menu-icon").removeClass(this.options.icons.submenu).addClass(e.submenu),this._super(t,e)},focus:function(t,e){var i,s;this.blur(t,t&&"focus"===t.type),this._scrollIntoView(e),this.active=e.first(),s=this.active.children("a").addClass("ui-state-focus"),this.options.role&&this.element.attr("aria-activedescendant",s.attr("id")),this.active.parent().closest(".ui-menu-item").children("a:first").addClass("ui-state-active"),t&&"keydown"===t.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),i=e.children(".ui-menu"),i.length&&/^mouse/.test(t.type)&&this._startOpening(i),this.activeMenu=e.parent(),this._trigger("focus",t,{item:e})},_scrollIntoView:function(e){var i,s,n,a,o,r;this._hasScroll()&&(i=parseFloat(t.css(this.activeMenu[0],"borderTopWidth"))||0,s=parseFloat(t.css(this.activeMenu[0],"paddingTop"))||0,n=e.offset().top-this.activeMenu.offset().top-i-s,a=this.activeMenu.scrollTop(),o=this.activeMenu.height(),r=e.height(),0>n?this.activeMenu.scrollTop(a+n):n+r>o&&this.activeMenu.scrollTop(a+n-o+r))},blur:function(t,e){e||clearTimeout(this.timer),this.active&&(this.active.children("a").removeClass("ui-state-focus"),this.active=null,this._trigger("blur",t,{item:this.active}))},_startOpening:function(t){clearTimeout(this.timer),"true"===t.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(t)},this.delay))},_open:function(e){var i=t.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(e.parents(".ui-menu")).hide().attr("aria-hidden","true"),e.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(i)},collapseAll:function(e,i){clearTimeout(this.timer),this.timer=this._delay(function(){var s=i?this.element:t(e&&e.target).closest(this.element.find(".ui-menu"));s.length||(s=this.element),this._close(s),this.blur(e),this.activeMenu=s},this.delay)},_close:function(t){t||(t=this.active?this.active.parent():this.element),t.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false").end().find("a.ui-state-active").removeClass("ui-state-active")},collapse:function(t){var e=this.active&&this.active.parent().closest(".ui-menu-item",this.element);e&&e.length&&(this._close(),this.focus(t,e))},expand:function(t){var e=this.active&&this.active.children(".ui-menu ").children(".ui-menu-item").first();e&&e.length&&(this._open(e.parent()),this._delay(function(){this.focus(t,e)}))},next:function(t){this._move("next","first",t)},previous:function(t){this._move("prev","last",t)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(t,e,i){var s;this.active&&(s="first"===t||"last"===t?this.active["first"===t?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[t+"All"](".ui-menu-item").eq(0)),s&&s.length&&this.active||(s=this.activeMenu.children(".ui-menu-item")[e]()),this.focus(i,s)},nextPage:function(e){var i,s,n;return this.active?(this.isLastItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return i=t(this),0>i.offset().top-s-n}),this.focus(e,i)):this.focus(e,this.activeMenu.children(".ui-menu-item")[this.active?"last":"first"]())),undefined):(this.next(e),undefined)},previousPage:function(e){var i,s,n;return this.active?(this.isFirstItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return i=t(this),i.offset().top-s+n>0}),this.focus(e,i)):this.focus(e,this.activeMenu.children(".ui-menu-item").first())),undefined):(this.next(e),undefined)},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(e){this.active=this.active||t(e.target).closest(".ui-menu-item");var i={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(e,!0),this._trigger("select",e,i)}})})(jQuery);
// end jquery-ui.js
// begin stacktrace.js
function printStackTrace(options){options=options||{guess:true};var ex=options.e||null,guess=!!options.guess;var p=new printStackTrace.implementation(),result=p.run(ex);return(guess)?p.guessAnonymousFunctions(result):result;}
printStackTrace.implementation=function(){};printStackTrace.implementation.prototype={run:function(ex,mode){ex=ex||this.createException();mode=mode||this.mode(ex);if(mode==='other'){return this.other(arguments.callee);}else{return this[mode](ex);}},createException:function(){try{this.undef();}catch(e){return e;}},mode:function(e){if(e['arguments']&&e.stack){return'chrome';}else if(e.stack&&e.sourceURL){return'safari';}else if(typeof e.message==='string'&&typeof window!=='undefined'&&window.opera){if(!e.stacktrace){return'opera9';}
if(e.message.indexOf('\n')>-1&&e.message.split('\n').length>e.stacktrace.split('\n').length){return'opera9';}
if(!e.stack){return'opera10a';}
if(e.stacktrace.indexOf("called from line")<0){return'opera10b';}
return'opera11';}else if(e.stack){return'firefox';}
return'other';},instrumentFunction:function(context,functionName,callback){context=context||window;var original=context[functionName];context[functionName]=function instrumented(){callback.call(this,printStackTrace().slice(4));return context[functionName]._instrumented.apply(this,arguments);};context[functionName]._instrumented=original;},deinstrumentFunction:function(context,functionName){if(context[functionName].constructor===Function&&context[functionName]._instrumented&&context[functionName]._instrumented.constructor===Function){context[functionName]=context[functionName]._instrumented;}},chrome:function(e){var stack=(e.stack+'\n').replace(/^\S[^\(]+?[\n$]/gm,'').replace(/^\s+(at eval )?at\s+/gm,'').replace(/^([^\(]+?)([\n$])/gm,'{anonymous}()@$1$2').replace(/^Object.<anonymous>\s*\(([^\)]+)\)/gm,'{anonymous}()@$1').split('\n');stack.pop();return stack;},safari:function(e){return e.stack.replace(/\[native code\]\n/m,'').replace(/^@/gm,'{anonymous}()@').split('\n');},firefox:function(e){return e.stack.replace(/(?:\n@:0)?\s+$/m,'').replace(/^[\(@]/gm,'{anonymous}()@').split('\n');},opera11:function(e){var ANON='{anonymous}',lineRE=/^.*line (\d+), column (\d+)(?: in (.+))? in (\S+):$/;var lines=e.stacktrace.split('\n'),result=[];for(var i=0,len=lines.length;i<len;i+=2){var match=lineRE.exec(lines[i]);if(match){var location=match[4]+':'+match[1]+':'+match[2];var fnName=match[3]||"global code";fnName=fnName.replace(/<anonymous function: (\S+)>/,"$1").replace(/<anonymous function>/,ANON);result.push(fnName+'@'+location+' -- '+lines[i+1].replace(/^\s+/,''));}}
return result;},opera10b:function(e){var lineRE=/^(.*)@(.+):(\d+)$/;var lines=e.stacktrace.split('\n'),result=[];for(var i=0,len=lines.length;i<len;i++){var match=lineRE.exec(lines[i]);if(match){var fnName=match[1]?(match[1]+'()'):"global code";result.push(fnName+'@'+match[2]+':'+match[3]);}}
return result;},opera10a:function(e){var ANON='{anonymous}',lineRE=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i;var lines=e.stacktrace.split('\n'),result=[];for(var i=0,len=lines.length;i<len;i+=2){var match=lineRE.exec(lines[i]);if(match){var fnName=match[3]||ANON;result.push(fnName+'()@'+match[2]+':'+match[1]+' -- '+lines[i+1].replace(/^\s+/,''));}}
return result;},opera9:function(e){var ANON='{anonymous}',lineRE=/Line (\d+).*script (?:in )?(\S+)/i;var lines=e.message.split('\n'),result=[];for(var i=2,len=lines.length;i<len;i+=2){var match=lineRE.exec(lines[i]);if(match){result.push(ANON+'()@'+match[2]+':'+match[1]+' -- '+lines[i+1].replace(/^\s+/,''));}}
return result;},other:function(curr){var ANON='{anonymous}',fnRE=/function\s*([\w\-$]+)?\s*\(/i,stack=[],fn,args,maxStackSize=10;while(curr&&curr['arguments']&&stack.length<maxStackSize){fn=fnRE.test(curr.toString())?RegExp.$1||ANON:ANON;args=Array.prototype.slice.call(curr['arguments']||[]);stack[stack.length]=fn+'('+this.stringifyArguments(args)+')';curr=curr.caller;}
return stack;},stringifyArguments:function(args){var result=[];var slice=Array.prototype.slice;for(var i=0;i<args.length;++i){var arg=args[i];if(arg===undefined){result[i]='undefined';}else if(arg===null){result[i]='null';}else if(arg.constructor){if(arg.constructor===Array){if(arg.length<3){result[i]='['+this.stringifyArguments(arg)+']';}else{result[i]='['+this.stringifyArguments(slice.call(arg,0,1))+'...'+this.stringifyArguments(slice.call(arg,-1))+']';}}else if(arg.constructor===Object){result[i]='#object';}else if(arg.constructor===Function){result[i]='#function';}else if(arg.constructor===String){result[i]='"'+arg+'"';}else if(arg.constructor===Number){result[i]=arg;}}}
return result.join(',');},sourceCache:{},ajax:function(url){var req=this.createXMLHTTPObject();if(req){try{req.open('GET',url,false);req.send(null);return req.responseText;}catch(e){}}
return'';},createXMLHTTPObject:function(){var xmlhttp,XMLHttpFactories=[function(){return new XMLHttpRequest();},function(){return new ActiveXObject('Msxml2.XMLHTTP');},function(){return new ActiveXObject('Msxml3.XMLHTTP');},function(){return new ActiveXObject('Microsoft.XMLHTTP');}];for(var i=0;i<XMLHttpFactories.length;i++){try{xmlhttp=XMLHttpFactories[i]();this.createXMLHTTPObject=XMLHttpFactories[i];return xmlhttp;}catch(e){}}},isSameDomain:function(url){return typeof location!=="undefined"&&url.indexOf(location.hostname)!==-1;},getSource:function(url){if(!(url in this.sourceCache)){this.sourceCache[url]=this.ajax(url).split('\n');}
return this.sourceCache[url];},guessAnonymousFunctions:function(stack){for(var i=0;i<stack.length;++i){var reStack=/\{anonymous\}\(.*\)@(.*)/,reRef=/^(.*?)(?::(\d+))(?::(\d+))?(?: -- .+)?$/,frame=stack[i],ref=reStack.exec(frame);if(ref){var m=reRef.exec(ref[1]);if(m){var file=m[1],lineno=m[2],charno=m[3]||0;if(file&&this.isSameDomain(file)&&lineno){var functionName=this.guessAnonymousFunction(file,lineno,charno);stack[i]=frame.replace('{anonymous}',functionName);}}}}
return stack;},guessAnonymousFunction:function(url,lineNo,charNo){var ret;try{ret=this.findFunctionName(this.getSource(url),lineNo);}catch(e){ret='getSource failed with url: '+url+', exception: '+e.toString();}
return ret;},findFunctionName:function(source,lineNo){var reFunctionDeclaration=/function\s+([^(]*?)\s*\(([^)]*)\)/;var reFunctionExpression=/['"]?([0-9A-Za-z_]+)['"]?\s*[:=]\s*function\b/;var reFunctionEvaluation=/['"]?([0-9A-Za-z_]+)['"]?\s*[:=]\s*(?:eval|new Function)\b/;var code="",line,maxLines=Math.min(lineNo,20),m,commentPos;for(var i=0;i<maxLines;++i){line=source[lineNo-i-1];commentPos=line.indexOf('//');if(commentPos>=0){line=line.substr(0,commentPos);}
if(line){code=line+code;m=reFunctionExpression.exec(code);if(m&&m[1]){return m[1];}
m=reFunctionDeclaration.exec(code);if(m&&m[1]){return m[1];}
m=reFunctionEvaluation.exec(code);if(m&&m[1]){return m[1];}}}
return'(?)';}};
// end stacktrace.js
// begin pubsub.js
;(function(d){var cache={};d.publish=function(topic,args){cache[topic]&&d.each(cache[topic],function(){this.apply(d,args||[]);});};d.subscribe=function(topic,callback){if(!cache[topic]){cache[topic]=[];}
cache[topic].push(callback);return[topic,callback];};d.unsubscribe=function(handle){var t=handle[0];cache[t]&&d.each(cache[t],function(idx){if(this==handle[1]){cache[t].splice(idx,1);}});};})(jQuery);
// end pubsub.js
// begin jquery.jstree.js
"use strict";(function(){if(jQuery&&jQuery.jstree){return;}
var is_ie6=false,is_ie7=false,is_ff2=false;(function($){$.vakata={};$.vakata.css={get_css:function(rule_name,delete_flag,sheet){rule_name=rule_name.toLowerCase();var css_rules=sheet.cssRules||sheet.rules,j=0;do{if(css_rules.length&&j>css_rules.length+5){return false;}
if(css_rules[j].selectorText&&css_rules[j].selectorText.toLowerCase()==rule_name){if(delete_flag===true){if(sheet.removeRule){sheet.removeRule(j);}
if(sheet.deleteRule){sheet.deleteRule(j);}
return true;}
else{return css_rules[j];}}}
while(css_rules[++j]);return false;},add_css:function(rule_name,sheet){if($.jstree.css.get_css(rule_name,false,sheet)){return false;}
if(sheet.insertRule){sheet.insertRule(rule_name+' { }',0);}else{sheet.addRule(rule_name,null,0);}
return $.vakata.css.get_css(rule_name);},remove_css:function(rule_name,sheet){return $.vakata.css.get_css(rule_name,true,sheet);},add_sheet:function(opts){var tmp=false,is_new=true;if(opts.str){if(opts.title){tmp=$("style[id='"+opts.title+"-stylesheet']")[0];}
if(tmp){is_new=false;}
else{tmp=document.createElement("style");tmp.setAttribute('type',"text/css");if(opts.title){tmp.setAttribute("id",opts.title+"-stylesheet");}}
if(tmp.styleSheet){if(is_new){document.getElementsByTagName("head")[0].appendChild(tmp);tmp.styleSheet.cssText=opts.str;}
else{tmp.styleSheet.cssText=tmp.styleSheet.cssText+" "+opts.str;}}
else{tmp.appendChild(document.createTextNode(opts.str));document.getElementsByTagName("head")[0].appendChild(tmp);}
return tmp.sheet||tmp.styleSheet;}
if(opts.url){if(document.createStyleSheet){try{tmp=document.createStyleSheet(opts.url);}catch(e){}}
else{tmp=document.createElement('link');tmp.rel='stylesheet';tmp.type='text/css';tmp.media="all";tmp.href=opts.url;document.getElementsByTagName("head")[0].appendChild(tmp);return tmp.styleSheet;}}}};var instances=[],focused_instance=-1,plugins={},prepared_move={};$.fn.jstree=function(settings){var isMethodCall=(typeof settings=='string'),args=Array.prototype.slice.call(arguments,1),returnValue=this;if(isMethodCall){if(settings.substring(0,1)=='_'){return returnValue;}
this.each(function(){var instance=instances[$.data(this,"jstree_instance_id")],methodValue=(instance&&$.isFunction(instance[settings]))?instance[settings].apply(instance,args):instance;if(typeof methodValue!=="undefined"&&(settings.indexOf("is_")===0||(methodValue!==true&&methodValue!==false))){returnValue=methodValue;return false;}});}
else{this.each(function(){var instance_id=$.data(this,"jstree_instance_id"),a=[],b=settings?$.extend({},true,settings):{},c=$(this),s=false,t=[];a=a.concat(args);if(c.data("jstree")){a.push(c.data("jstree"));}
b=a.length?$.extend.apply(null,[true,b].concat(a)):b;if(typeof instance_id!=="undefined"&&instances[instance_id]){instances[instance_id].destroy();}
instance_id=parseInt(instances.push({}),10)-1;$.data(this,"jstree_instance_id",instance_id);b.plugins=$.isArray(b.plugins)?b.plugins:$.jstree.defaults.plugins.slice();b.plugins.unshift("core");b.plugins=b.plugins.sort().join(",,").replace(/(,|^)([^,]+)(,,\2)+(,|$)/g,"$1$2$4").replace(/,,+/g,",").replace(/,$/,"").split(",");s=$.extend(true,{},$.jstree.defaults,b);s.plugins=b.plugins;$.each(plugins,function(i,val){if($.inArray(i,s.plugins)===-1){s[i]=null;delete s[i];}
else{t.push(i);}});s.plugins=t;instances[instance_id]=new $.jstree._instance(instance_id,$(this).addClass("jstree jstree-"+instance_id),s);$.each(instances[instance_id]._get_settings().plugins,function(i,val){instances[instance_id].data[val]={};});$.each(instances[instance_id]._get_settings().plugins,function(i,val){if(plugins[val]){plugins[val].__init.apply(instances[instance_id]);}});setTimeout(function(){if(instances[instance_id]){instances[instance_id].init();}},0);});}
return returnValue;};$.jstree={defaults:{plugins:[]},_focused:function(){return instances[focused_instance]||null;},_reference:function(needle){if(instances[needle]){return instances[needle];}
var o=$(needle);if(!o.length&&typeof needle==="string"){o=$("#"+needle);}
if(!o.length){return null;}
return instances[o.closest(".jstree").data("jstree_instance_id")]||null;},_instance:function(index,container,settings){this.data={core:{}};this.get_settings=function(){return $.extend(true,{},settings);};this._get_settings=function(){return settings;};this.get_index=function(){return index;};this.get_container=function(){return container;};this.get_container_ul=function(){return container.children("ul:eq(0)");};this._set_settings=function(s){settings=$.extend(true,{},settings,s);};},_fn:{},plugin:function(pname,pdata){pdata=$.extend({},{__init:$.noop,__destroy:$.noop,_fn:{},defaults:false},pdata);plugins[pname]=pdata;$.jstree.defaults[pname]=pdata.defaults;$.each(pdata._fn,function(i,val){val.plugin=pname;val.old=$.jstree._fn[i];$.jstree._fn[i]=function(){var rslt,func=val,args=Array.prototype.slice.call(arguments),evnt=new $.Event("before.jstree"),rlbk=false;if(this.data.core.locked===true&&i!=="unlock"&&i!=="is_locked"){return;}
do{if(func&&func.plugin&&$.inArray(func.plugin,this._get_settings().plugins)!==-1){break;}
func=func.old;}while(func);if(!func){return;}
if(i.indexOf("_")===0){rslt=func.apply(this,args);}
else{rslt=this.get_container().triggerHandler(evnt,{"func":i,"inst":this,"args":args,"plugin":func.plugin});if(rslt===false){return;}
if(typeof rslt!=="undefined"){args=rslt;}
rslt=func.apply($.extend({},this,{__callback:function(data){this.get_container().triggerHandler(i+'.jstree',{"inst":this,"args":args,"rslt":data,"rlbk":rlbk});},__rollback:function(){rlbk=this.get_rollback();return rlbk;},__call_old:function(replace_arguments){return func.old.apply(this,(replace_arguments?Array.prototype.slice.call(arguments,1):args));}}),args);}
return rslt;};$.jstree._fn[i].old=val.old;$.jstree._fn[i].plugin=pname;});},rollback:function(rb){if(rb){if(!$.isArray(rb)){rb=[rb];}
$.each(rb,function(i,val){instances[val.i].set_rollback(val.h,val.d);});}}};$.jstree._fn=$.jstree._instance.prototype={};$(function(){var u=navigator.userAgent.toLowerCase(),v=(u.match(/.+?(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[0,'0'])[1],css_string=''+
'.jstree ul, .jstree li { display:block; margin:0 0 0 0; padding:0 0 0 0; list-style-type:none; } '+
'.jstree li { display:block; min-height:18px; line-height:18px; white-space:nowrap; margin-left:18px; min-width:18px; } '+
'.jstree-rtl li { margin-left:0; margin-right:18px; } '+
'.jstree > ul > li { margin-left:0px; } '+
'.jstree-rtl > ul > li { margin-right:0px; } '+
'.jstree ins { display:inline-block; text-decoration:none; width:18px; height:18px; margin:0 0 0 0; padding:0; } '+
'.jstree a { display:inline-block; line-height:16px; height:16px; color:black; white-space:nowrap; text-decoration:none; padding:1px 2px; margin:0; } '+
'.jstree a:focus { outline: none; } '+
'.jstree a > ins { height:16px; width:16px; } '+
'.jstree a > .jstree-icon { margin-right:3px; } '+
'.jstree-rtl a > .jstree-icon { margin-left:3px; margin-right:0; } '+
'li.jstree-open > ul { display:block; } '+
'li.jstree-closed > ul { display:none; } ';if(/msie/.test(u)&&parseInt(v,10)==6){is_ie6=true;try{document.execCommand("BackgroundImageCache",false,true);}catch(err){}
css_string+=''+
'.jstree li { height:18px; margin-left:0; margin-right:0; } '+
'.jstree li li { margin-left:18px; } '+
'.jstree-rtl li li { margin-left:0px; margin-right:18px; } '+
'li.jstree-open ul { display:block; } '+
'li.jstree-closed ul { display:none !important; } '+
'.jstree li a { display:inline; border-width:0 !important; padding:0px 2px !important; } '+
'.jstree li a ins { height:16px; width:16px; margin-right:3px; } '+
'.jstree-rtl li a ins { margin-right:0px; margin-left:3px; } ';}
if(/msie/.test(u)&&parseInt(v,10)==7){is_ie7=true;css_string+='.jstree li a { border-width:0 !important; padding:0px 2px !important; } ';}
if(!/compatible/.test(u)&&/mozilla/.test(u)&&parseFloat(v,10)<1.9){is_ff2=true;css_string+=''+
'.jstree ins { display:-moz-inline-box; } '+
'.jstree li { line-height:12px; } '+
'.jstree a { display:-moz-inline-box; } '+
'.jstree .jstree-no-icons .jstree-checkbox { display:-moz-inline-stack !important; } ';}
$.vakata.css.add_sheet({str:css_string,title:"jstree"});});$.jstree.plugin("core",{__init:function(){this.data.core.locked=false;this.data.core.to_open=this.get_settings().core.initially_open;this.data.core.to_load=this.get_settings().core.initially_load;},defaults:{html_titles:false,animation:500,initially_open:[],initially_load:[],open_parents:true,notify_plugins:true,rtl:false,load_open:false,strings:{loading:"Loading ...",new_node:"New node",multiple_selection:"Multiple selection"}},_fn:{init:function(){this.set_focus();if(this._get_settings().core.rtl){this.get_container().addClass("jstree-rtl").css("direction","rtl");}
this.get_container().html("<ul><li class='jstree-last jstree-leaf'><ins>&#160;</ins><a class='jstree-loading' href='#'><ins class='jstree-icon'>&#160;</ins>"+this._get_string("loading")+"</a></li></ul>");this.data.core.li_height=this.get_container_ul().find("li.jstree-closed, li.jstree-leaf").eq(0).height()||18;this.get_container()
.delegate("li > ins","click.jstree",$.proxy(function(event){var trgt=$(event.target);this.toggle_node(trgt);},this))
.bind("mousedown.jstree",$.proxy(function(){this.set_focus();},this))
.bind("dblclick.jstree",function(event){var sel;if(document.selection&&document.selection.empty){document.selection.empty();}
else{if(window.getSelection){sel=window.getSelection();try{sel.removeAllRanges();sel.collapse();}catch(err){}}}});if(this._get_settings().core.notify_plugins){this.get_container()
.bind("load_node.jstree",$.proxy(function(e,data){var o=this._get_node(data.rslt.obj),t=this;if(o===-1){o=this.get_container_ul();}
if(!o.length){return;}
o.find("li").each(function(){var th=$(this);if(th.data("jstree")){$.each(th.data("jstree"),function(plugin,values){if(t.data[plugin]&&$.isFunction(t["_"+plugin+"_notify"])){t["_"+plugin+"_notify"].call(t,th,values);}});}});},this));}
if(this._get_settings().core.load_open){this.get_container()
.bind("load_node.jstree",$.proxy(function(e,data){var o=this._get_node(data.rslt.obj),t=this;if(o===-1){o=this.get_container_ul();}
if(!o.length){return;}
o.find("li.jstree-open:not(:has(ul))").each(function(){t.load_node(this,$.noop,$.noop);});},this));}
this.__callback();this.load_node(-1,function(){this.loaded();this.reload_nodes();});},destroy:function(){var i,n=this.get_index(),s=this._get_settings(),_this=this;$.each(s.plugins,function(i,val){try{plugins[val].__destroy.apply(_this);}catch(err){}});this.__callback();if(this.is_focused()){for(i in instances){if(instances.hasOwnProperty(i)&&i!=n){instances[i].set_focus();break;}}}
if(n===focused_instance){focused_instance=-1;}
this.get_container()
.unbind(".jstree")
.undelegate(".jstree")
.removeData("jstree_instance_id")
.find("[class^='jstree']")
.addBack()
.attr("class",function(){return this.className.replace(/jstree[^ ]*|$/ig,'');});$(document)
.unbind(".jstree-"+n)
.undelegate(".jstree-"+n);instances[n]=null;delete instances[n];},_core_notify:function(n,data){if(data.opened){this.open_node(n,false,true);}},lock:function(){this.data.core.locked=true;this.get_container().children("ul").addClass("jstree-locked").css("opacity","0.7");this.__callback({});},unlock:function(){this.data.core.locked=false;this.get_container().children("ul").removeClass("jstree-locked").css("opacity","1");this.__callback({});},is_locked:function(){return this.data.core.locked;},save_opened:function(){var _this=this;this.data.core.to_open=[];this.get_container_ul().find("li.jstree-open").each(function(){if(this.id){_this.data.core.to_open.push("#"+this.id.toString().replace(/^#/,"").replace(/\\\//g,"/").replace(/\//g,"\\\/").replace(/\\\./g,".").replace(/\./g,"\\.").replace(/\:/g,"\\:"));}});this.__callback(_this.data.core.to_open);},save_loaded:function(){},reload_nodes:function(is_callback){var _this=this,done=true,current=[],remaining=[];if(!is_callback){this.data.core.reopen=false;this.data.core.refreshing=true;this.data.core.to_open=$.map($.makeArray(this.data.core.to_open),function(n){return"#"+n.toString().replace(/^#/,"").replace(/\\\//g,"/").replace(/\//g,"\\\/").replace(/\\\./g,".").replace(/\./g,"\\.").replace(/\:/g,"\\:");});this.data.core.to_load=$.map($.makeArray(this.data.core.to_load),function(n){return"#"+n.toString().replace(/^#/,"").replace(/\\\//g,"/").replace(/\//g,"\\\/").replace(/\\\./g,".").replace(/\./g,"\\.").replace(/\:/g,"\\:");});if(this.data.core.to_open.length){this.data.core.to_load=this.data.core.to_load.concat(this.data.core.to_open);}}
if(this.data.core.to_load.length){$.each(this.data.core.to_load,function(i,val){if(val=="#"){return true;}
if($(val).length){current.push(val);}
else{remaining.push(val);}});if(current.length){this.data.core.to_load=remaining;$.each(current,function(i,val){if(!_this._is_loaded(val)){_this.load_node(val,function(){_this.reload_nodes(true);},function(){_this.reload_nodes(true);});done=false;}});}}
if(this.data.core.to_open.length){$.each(this.data.core.to_open,function(i,val){_this.open_node(val,false,true);});}
if(done){if(this.data.core.reopen){clearTimeout(this.data.core.reopen);}
this.data.core.reopen=setTimeout(function(){_this.__callback({},_this);},50);this.data.core.refreshing=false;this.reopen();}},reopen:function(){var _this=this;if(this.data.core.to_open.length){$.each(this.data.core.to_open,function(i,val){_this.open_node(val,false,true);});}
this.__callback({});},refresh:function(obj){var _this=this;this.save_opened();if(!obj){obj=-1;}
obj=this._get_node(obj);if(!obj){obj=-1;}
if(obj!==-1){obj.children("UL").remove();}
else{this.get_container_ul().empty();}
this.load_node(obj,function(){_this.__callback({"obj":obj});_this.reload_nodes();});},loaded:function(){this.__callback();},set_focus:function(){if(this.is_focused()){return;}
var f=$.jstree._focused();if(f){f.unset_focus();}
this.get_container().addClass("jstree-focused");focused_instance=this.get_index();this.__callback();},is_focused:function(){return focused_instance==this.get_index();},unset_focus:function(){if(this.is_focused()){this.get_container().removeClass("jstree-focused");focused_instance=-1;}
this.__callback();},_get_node:function(obj){var $obj=$(obj,this.get_container());if($obj.is(".jstree")||obj==-1){return-1;}
$obj=$obj.closest("li",this.get_container());return $obj.length?$obj:false;},_get_next:function(obj,strict){obj=this._get_node(obj);if(obj===-1){return this.get_container().find("> ul > li:first-child");}
if(!obj.length){return false;}
if(strict){return(obj.nextAll("li").size()>0)?obj.nextAll("li:eq(0)"):false;}
if(obj.hasClass("jstree-open")){return obj.find("li:eq(0)");}
else if(obj.nextAll("li").size()>0){return obj.nextAll("li:eq(0)");}
else{return obj.parentsUntil(".jstree","li").next("li").eq(0);}},_get_prev:function(obj,strict){obj=this._get_node(obj);if(obj===-1){return this.get_container().find("> ul > li:last-child");}
if(!obj.length){return false;}
if(strict){return(obj.prevAll("li").length>0)?obj.prevAll("li:eq(0)"):false;}
if(obj.prev("li").length){obj=obj.prev("li").eq(0);while(obj.hasClass("jstree-open")){obj=obj.children("ul:eq(0)").children("li:last");}
return obj;}
else{var o=obj.parentsUntil(".jstree","li:eq(0)");return o.length?o:false;}},_get_parent:function(obj){obj=this._get_node(obj);if(obj==-1||!obj.length){return false;}
var o=obj.parentsUntil(".jstree","li:eq(0)");return o.length?o:-1;},_get_children:function(obj){obj=this._get_node(obj);if(obj===-1){return this.get_container().children("ul:eq(0)").children("li");}
if(!obj.length){return false;}
return obj.children("ul:eq(0)").children("li");},get_path:function(obj,id_mode){var p=[],_this=this;obj=this._get_node(obj);if(obj===-1||!obj||!obj.length){return false;}
obj.parentsUntil(".jstree","li").each(function(){p.push(id_mode?this.id:_this.get_text(this));});p.reverse();p.push(id_mode?obj.attr("id"):this.get_text(obj));return p;},_get_string:function(key){return this._get_settings().core.strings[key]||key;},is_open:function(obj){obj=this._get_node(obj);return obj&&obj!==-1&&obj.hasClass("jstree-open");},is_closed:function(obj){obj=this._get_node(obj);return obj&&obj!==-1&&obj.hasClass("jstree-closed");},is_leaf:function(obj){obj=this._get_node(obj);return obj&&obj!==-1&&obj.hasClass("jstree-leaf");},correct_state:function(obj){obj=this._get_node(obj);if(!obj||obj===-1){return false;}
obj.removeClass("jstree-closed jstree-open").addClass("jstree-leaf").children("ul").remove();this.__callback({"obj":obj});},open_node:function(obj,callback,skip_animation){obj=this._get_node(obj);if(!obj.length){return false;}
if(!obj.hasClass("jstree-closed")){if(callback){callback.call();}return false;}
var s=skip_animation||is_ie6?0:this._get_settings().core.animation,t=this;if(!this._is_loaded(obj)){obj.children("a").addClass("jstree-loading");this.load_node(obj,function(){t.open_node(obj,callback,skip_animation);},callback);}
else{if(this._get_settings().core.open_parents){obj.parentsUntil(".jstree",".jstree-closed").each(function(){t.open_node(this,false,true);});}
if(s){obj.children("ul").css("display","none");}
obj.removeClass("jstree-closed").addClass("jstree-open").children("a").removeClass("jstree-loading");if(s){obj.children("ul").stop(true,true).slideDown(s,function(){this.style.display="";t.after_open(obj);});}
else{t.after_open(obj);}
this.__callback({"obj":obj});if(callback){callback.call();}}},after_open:function(obj){this.__callback({"obj":obj});},close_node:function(obj,skip_animation){obj=this._get_node(obj);var s=skip_animation||is_ie6?0:this._get_settings().core.animation,t=this;if(!obj.length||!obj.hasClass("jstree-open")){return false;}
if(s){obj.children("ul").attr("style","display:block !important");}
obj.removeClass("jstree-open").addClass("jstree-closed");if(s){obj.children("ul").stop(true,true).slideUp(s,function(){this.style.display="";t.after_close(obj);});}
else{t.after_close(obj);}
this.__callback({"obj":obj});},after_close:function(obj){this.__callback({"obj":obj});},toggle_node:function(obj){obj=this._get_node(obj);if(obj.hasClass("jstree-closed")){return this.open_node(obj);}
if(obj.hasClass("jstree-open")){return this.close_node(obj);}},open_all:function(obj,do_animation,original_obj){obj=obj?this._get_node(obj):-1;if(!obj||obj===-1){obj=this.get_container_ul();}
if(original_obj){obj=obj.find("li.jstree-closed");}
else{original_obj=obj;if(obj.is(".jstree-closed")){obj=obj.find("li.jstree-closed").addBack();}
else{obj=obj.find("li.jstree-closed");}}
var _this=this;obj.each(function(){var __this=this;if(!_this._is_loaded(this)){_this.open_node(this,function(){_this.open_all(__this,do_animation,original_obj);},!do_animation);}
else{_this.open_node(this,false,!do_animation);}});if(original_obj.find('li.jstree-closed').length===0){this.__callback({"obj":original_obj});}},close_all:function(obj,do_animation){var _this=this;obj=obj?this._get_node(obj):this.get_container();if(!obj||obj===-1){obj=this.get_container_ul();}
obj.find("li.jstree-open").addBack().each(function(){_this.close_node(this,!do_animation);});this.__callback({"obj":obj});},clean_node:function(obj){obj=obj&&obj!=-1?$(obj):this.get_container_ul();obj=obj.is("li")?obj.find("li").addBack():obj.find("li");obj.removeClass("jstree-last")
.filter("li:last-child").addClass("jstree-last").end()
.filter(":has(li)")
.not(".jstree-open").removeClass("jstree-leaf").addClass("jstree-closed");obj.not(".jstree-open, .jstree-closed").addClass("jstree-leaf").children("ul").remove();this.__callback({"obj":obj});},get_rollback:function(){this.__callback();return{i:this.get_index(),h:this.get_container().children("ul").clone(true),d:this.data};},set_rollback:function(html,data){this.get_container().empty().append(html);this.data=data;this.__callback();},load_node:function(obj,s_call,e_call){this.__callback({"obj":obj});},_is_loaded:function(obj){return true;},create_node:function(obj,position,js,callback,is_loaded){obj=this._get_node(obj);position=typeof position==="undefined"?"last":position;var d=$("<li />"),s=this._get_settings().core,tmp;if(obj!==-1&&!obj.length){return false;}
if(!is_loaded&&!this._is_loaded(obj)){this.load_node(obj,function(){this.create_node(obj,position,js,callback,true);});return false;}
this.__rollback();if(typeof js==="string"){js={"data":js};}
if(!js){js={};}
if(js.attr){d.attr(js.attr);}
if(js.metadata){d.data(js.metadata);}
if(js.state){d.addClass("jstree-"+js.state);}
if(!js.data){js.data=this._get_string("new_node");}
if(!$.isArray(js.data)){tmp=js.data;js.data=[];js.data.push(tmp);}
$.each(js.data,function(i,m){tmp=$("<a />");if($.isFunction(m)){m=m.call(this,js);}
if(typeof m=="string"){tmp.attr('href','#')[s.html_titles?"html":"text"](m);}
else{if(!m.attr){m.attr={};}
if(!m.attr.href){m.attr.href='#';}
tmp.attr(m.attr)[s.html_titles?"html":"text"](m.title);if(m.language){tmp.addClass(m.language);}}
tmp.prepend("<ins class='jstree-icon'>&#160;</ins>");if(!m.icon&&js.icon){m.icon=js.icon;}
if(m.icon){if(m.icon.indexOf("/")===-1){tmp.children("ins").addClass(m.icon);}
else{tmp.children("ins").css("background","url('"+m.icon+"') center center no-repeat");}}
d.append(tmp);});d.prepend("<ins class='jstree-icon'>&#160;</ins>");if(obj===-1){obj=this.get_container();if(position==="before"){position="first";}
if(position==="after"){position="last";}}
switch(position){case"before":obj.before(d);tmp=this._get_parent(obj);break;case"after":obj.after(d);tmp=this._get_parent(obj);break;case"inside":case"first":if(!obj.children("ul").length){obj.append("<ul />");}
obj.children("ul").prepend(d);tmp=obj;break;case"last":if(!obj.children("ul").length){obj.append("<ul />");}
obj.children("ul").append(d);tmp=obj;break;default:if(!obj.children("ul").length){obj.append("<ul />");}
if(!position){position=0;}
tmp=obj.children("ul").children("li").eq(position);if(tmp.length){tmp.before(d);}
else{obj.children("ul").append(d);}
tmp=obj;break;}
if(tmp===-1||tmp.get(0)===this.get_container().get(0)){tmp=-1;}
this.clean_node(tmp);this.__callback({"obj":d,"parent":tmp});if(callback){callback.call(this,d);}
return d;},get_text:function(obj){obj=this._get_node(obj);if(!obj.length){return false;}
var s=this._get_settings().core.html_titles;obj=obj.children("a:eq(0)");if(s){obj=obj.clone();obj.children("INS").remove();return obj.html();}
else{obj=obj.contents().filter(function(){return this.nodeType==3;})[0];return obj.nodeValue;}},set_text:function(obj,val){obj=this._get_node(obj);if(!obj.length){return false;}
obj=obj.children("a:eq(0)");if(this._get_settings().core.html_titles){var tmp=obj.children("INS").clone();obj.html(val).prepend(tmp);this.__callback({"obj":obj,"name":val});return true;}
else{obj=obj.contents().filter(function(){return this.nodeType==3;})[0];this.__callback({"obj":obj,"name":val});return(obj.nodeValue=val);}},rename_node:function(obj,val){obj=this._get_node(obj);this.__rollback();if(obj&&obj.length&&this.set_text.apply(this,Array.prototype.slice.call(arguments))){this.__callback({"obj":obj,"name":val});}},delete_node:function(obj){obj=this._get_node(obj);if(!obj.length){return false;}
this.__rollback();var p=this._get_parent(obj),prev=$([]),t=this;obj.each(function(){prev=prev.add(t._get_prev(this));});obj=obj.detach();if(p!==-1&&p.find("> ul > li").length===0){p.removeClass("jstree-open jstree-closed").addClass("jstree-leaf");}
this.clean_node(p);this.__callback({"obj":obj,"prev":prev,"parent":p});return obj;},prepare_move:function(o,r,pos,cb,is_cb){var p={};p.ot=$.jstree._reference(o)||this;p.o=p.ot._get_node(o);p.r=r===-1?-1:this._get_node(r);p.p=(typeof pos==="undefined"||pos===false)?"last":pos;if(!is_cb&&prepared_move.o&&prepared_move.o[0]===p.o[0]&&prepared_move.r[0]===p.r[0]&&prepared_move.p===p.p){this.__callback(prepared_move);if(cb){cb.call(this,prepared_move);}
return;}
p.ot=$.jstree._reference(p.o)||this;p.rt=$.jstree._reference(p.r)||this;if(p.r===-1||!p.r){p.cr=-1;switch(p.p){case"first":case"before":case"inside":p.cp=0;break;case"after":case"last":p.cp=p.rt.get_container().find(" > ul > li").length;break;default:p.cp=p.p;break;}}
else{if(!/^(before|after)$/.test(p.p)&&!this._is_loaded(p.r)){return this.load_node(p.r,function(){this.prepare_move(o,r,pos,cb,true);});}
switch(p.p){case"before":p.cp=p.r.index();p.cr=p.rt._get_parent(p.r);break;case"after":p.cp=p.r.index()+1;p.cr=p.rt._get_parent(p.r);break;case"inside":case"first":p.cp=0;p.cr=p.r;break;case"last":p.cp=p.r.find(" > ul > li").length;p.cr=p.r;break;default:p.cp=p.p;p.cr=p.r;break;}}
p.np=p.cr==-1?p.rt.get_container():p.cr;p.op=p.ot._get_parent(p.o);p.cop=p.o.index();if(p.op===-1){p.op=p.ot?p.ot.get_container():this.get_container();}
if(!/^(before|after)$/.test(p.p)&&p.op&&p.np&&p.op[0]===p.np[0]&&p.o.index()<p.cp){p.cp++;}
p.or=p.np.find(" > ul > li:nth-child("+(p.cp+1)+")");prepared_move=p;this.__callback(prepared_move);if(cb){cb.call(this,prepared_move);}},check_move:function(){var obj=prepared_move,ret=true,r=obj.r===-1?this.get_container():obj.r;if(!obj||!obj.o||obj.or[0]===obj.o[0]){return false;}
if(!obj.cy){if(obj.op&&obj.np&&obj.op[0]===obj.np[0]&&obj.cp-1===obj.o.index()){return false;}
obj.o.each(function(){if(r.parentsUntil(".jstree","li").addBack().index(this)!==-1){ret=false;return false;}});}
return ret;},move_node:function(obj,ref,position,is_copy,is_prepared,skip_check){if(!is_prepared){return this.prepare_move(obj,ref,position,function(p){this.move_node(p,false,false,is_copy,true,skip_check);});}
if(is_copy){prepared_move.cy=true;}
if(!skip_check&&!this.check_move()){return false;}
this.__rollback();var o=false;if(is_copy){o=obj.o.clone(true);o.find("*[id]").addBack().each(function(){if(this.id){this.id="copy_"+this.id;}});}
else{o=obj.o;}
if(obj.or.length){obj.or.before(o);}
else{if(!obj.np.children("ul").length){$("<ul />").appendTo(obj.np);}
obj.np.children("ul:eq(0)").append(o);}
try{obj.ot.clean_node(obj.op);obj.rt.clean_node(obj.np);if(!obj.op.find("> ul > li").length){obj.op.removeClass("jstree-open jstree-closed").addClass("jstree-leaf").children("ul").remove();}}catch(e){}
if(is_copy){prepared_move.cy=true;prepared_move.oc=o;}
this.__callback(prepared_move);return prepared_move;},_get_move:function(){return prepared_move;}}});})(jQuery);(function($){var scrollbar_width,e1,e2;$(function(){if(/msie/.test(navigator.userAgent.toLowerCase())){e1=$('<textarea cols="10" rows="2"></textarea>').css({position:'absolute',top:-1000,left:0}).appendTo('body');e2=$('<textarea cols="10" rows="2" style="overflow: hidden;"></textarea>').css({position:'absolute',top:-1000,left:0}).appendTo('body');scrollbar_width=e1.width()-e2.width();e1.add(e2).remove();}
else{e1=$('<div />').css({width:100,height:100,overflow:'auto',position:'absolute',top:-1000,left:0})
.prependTo('body').append('<div />').find('div').css({width:'100%',height:200});scrollbar_width=100-e1.width();e1.parent().remove();}});$.jstree.plugin("ui",{__init:function(){this.data.ui.selected=$();this.data.ui.last_selected=false;this.data.ui.hovered=null;this.data.ui.to_select=this.get_settings().ui.initially_select;this.get_container()
.delegate("a","click.jstree",$.proxy(function(event){event.preventDefault();event.currentTarget.blur();if(!$(event.currentTarget).hasClass("jstree-loading")){this.select_node(event.currentTarget,true,event);}},this))
.delegate("a","mouseenter.jstree",$.proxy(function(event){if(!$(event.currentTarget).hasClass("jstree-loading")){this.hover_node(event.target);}},this))
.delegate("a","mouseleave.jstree",$.proxy(function(event){if(!$(event.currentTarget).hasClass("jstree-loading")){this.dehover_node(event.target);}},this))
.bind("reopen.jstree",$.proxy(function(){this.reselect();},this))
.bind("get_rollback.jstree",$.proxy(function(){this.dehover_node();this.save_selected();},this))
.bind("set_rollback.jstree",$.proxy(function(){this.reselect();},this))
.bind("close_node.jstree",$.proxy(function(event,data){var s=this._get_settings().ui,obj=this._get_node(data.rslt.obj),clk=(obj&&obj.length)?obj.children("ul").find("a.jstree-clicked"):$(),_this=this;if(s.selected_parent_close===false||!clk.length){return;}
clk.each(function(){_this.deselect_node(this);if(s.selected_parent_close==="select_parent"){_this.select_node(obj);}});},this))
.bind("delete_node.jstree",$.proxy(function(event,data){var s=this._get_settings().ui.select_prev_on_delete,obj=this._get_node(data.rslt.obj),clk=(obj&&obj.length)?obj.find("a.jstree-clicked"):[],_this=this;clk.each(function(){_this.deselect_node(this);});if(s&&clk.length){data.rslt.prev.each(function(){if(this.parentNode){_this.select_node(this);return false;}});}},this))
.bind("move_node.jstree",$.proxy(function(event,data){if(data.rslt.cy){data.rslt.oc.find("a.jstree-clicked").removeClass("jstree-clicked");}},this));},defaults:{select_limit:-1,select_multiple_modifier:"ctrl",select_range_modifier:"shift",selected_parent_close:"select_parent",selected_parent_open:true,select_prev_on_delete:true,disable_selecting_children:false,initially_select:[]},_fn:{_get_node:function(obj,allow_multiple){if(typeof obj==="undefined"||obj===null){return allow_multiple?this.data.ui.selected:this.data.ui.last_selected;}
var $obj=$(obj,this.get_container());if($obj.is(".jstree")||obj==-1){return-1;}
$obj=$obj.closest("li",this.get_container());return $obj.length?$obj:false;},_ui_notify:function(n,data){if(data.selected){this.select_node(n,false);}},save_selected:function(){var _this=this;this.data.ui.to_select=[];this.data.ui.selected.each(function(){if(this.id){_this.data.ui.to_select.push("#"+this.id.toString().replace(/^#/,"").replace(/\\\//g,"/").replace(/\//g,"\\\/").replace(/\\\./g,".").replace(/\./g,"\\.").replace(/\:/g,"\\:"));}});this.__callback(this.data.ui.to_select);},reselect:function(){var _this=this,s=this.data.ui.to_select;s=$.map($.makeArray(s),function(n){return"#"+n.toString().replace(/^#/,"").replace(/\\\//g,"/").replace(/\//g,"\\\/").replace(/\\\./g,".").replace(/\./g,"\\.").replace(/\:/g,"\\:");});$.each(s,function(i,val){if(val&&val!=="#"){_this.select_node(val);}});this.data.ui.selected=this.data.ui.selected.filter(function(){return this.parentNode;});this.__callback();},refresh:function(obj){this.save_selected();return this.__call_old();},hover_node:function(obj){obj=this._get_node(obj);if(!obj.length){return false;}
if(!obj.hasClass("jstree-hovered")){this.dehover_node();}
this.data.ui.hovered=obj.children("a").addClass("jstree-hovered").parent();this._fix_scroll(obj);this.__callback({"obj":obj});},dehover_node:function(){var obj=this.data.ui.hovered,p;if(!obj||!obj.length){return false;}
p=obj.children("a").removeClass("jstree-hovered").parent();if(this.data.ui.hovered[0]===p[0]){this.data.ui.hovered=null;}
this.__callback({"obj":obj});},select_node:function(obj,check,e){obj=this._get_node(obj);if(obj==-1||!obj||!obj.length){return false;}
var s=this._get_settings().ui,is_multiple=(s.select_multiple_modifier=="on"||(s.select_multiple_modifier!==false&&e&&e[s.select_multiple_modifier+"Key"])),is_range=(s.select_range_modifier!==false&&e&&e[s.select_range_modifier+"Key"]&&this.data.ui.last_selected&&this.data.ui.last_selected[0]!==obj[0]&&this.data.ui.last_selected.parent()[0]===obj.parent()[0]),is_selected=this.is_selected(obj),proceed=true,t=this;if(check){if(s.disable_selecting_children&&is_multiple&&((obj.parentsUntil(".jstree","li").children("a.jstree-clicked").length)||(obj.children("ul").find("a.jstree-clicked:eq(0)").length))){return false;}
proceed=false;switch(!0){case(is_range):this.data.ui.last_selected.addClass("jstree-last-selected");obj=obj[obj.index()<this.data.ui.last_selected.index()?"nextUntil":"prevUntil"](".jstree-last-selected").addBack();if(s.select_limit==-1||obj.length<s.select_limit){this.data.ui.last_selected.removeClass("jstree-last-selected");this.data.ui.selected.each(function(){if(this!==t.data.ui.last_selected[0]){t.deselect_node(this);}});is_selected=false;proceed=true;}
else{proceed=false;}
break;case(is_selected&&!is_multiple):this.deselect_all();is_selected=false;proceed=true;break;case(!is_selected&&!is_multiple):if(s.select_limit==-1||s.select_limit>0){this.deselect_all();proceed=true;}
break;case(is_selected&&is_multiple):this.deselect_node(obj);break;case(!is_selected&&is_multiple):if(s.select_limit==-1||this.data.ui.selected.length+1<=s.select_limit){proceed=true;}
break;}}
if(proceed&&!is_selected){if(!is_range){this.data.ui.last_selected=obj;}
obj.children("a").addClass("jstree-clicked");if(s.selected_parent_open){obj.parents(".jstree-closed").each(function(){t.open_node(this,false,true);});}
this.data.ui.selected=this.data.ui.selected.add(obj);this._fix_scroll(obj.eq(0));this.__callback({"obj":obj,"e":e});}},_fix_scroll:function(obj){var c=this.get_container()[0],t;if(c.scrollHeight>c.offsetHeight){obj=this._get_node(obj);if(!obj||obj===-1||!obj.length||!obj.is(":visible")){return;}
t=obj.offset().top-this.get_container().offset().top;if(t<0){c.scrollTop=c.scrollTop+t-1;}
if(t+this.data.core.li_height+(c.scrollWidth>c.offsetWidth?scrollbar_width:0)>c.offsetHeight){c.scrollTop=c.scrollTop+(t-c.offsetHeight+this.data.core.li_height+1+(c.scrollWidth>c.offsetWidth?scrollbar_width:0));}}},deselect_node:function(obj){obj=this._get_node(obj);if(!obj.length){return false;}
if(this.is_selected(obj)){obj.children("a").removeClass("jstree-clicked");this.data.ui.selected=this.data.ui.selected.not(obj);if(this.data.ui.last_selected.get(0)===obj.get(0)){this.data.ui.last_selected=this.data.ui.selected.eq(0);}
this.__callback({"obj":obj});}},toggle_select:function(obj){obj=this._get_node(obj);if(!obj.length){return false;}
if(this.is_selected(obj)){this.deselect_node(obj);}
else{this.select_node(obj);}},is_selected:function(obj){return this.data.ui.selected.index(this._get_node(obj))>=0;},get_selected:function(context){return context?$(context).find("a.jstree-clicked").parent():this.data.ui.selected;},deselect_all:function(context){var ret=context?$(context).find("a.jstree-clicked").parent():this.get_container().find("a.jstree-clicked").parent();ret.children("a.jstree-clicked").removeClass("jstree-clicked");this.data.ui.selected=$([]);this.data.ui.last_selected=false;this.__callback({"obj":ret});}}});$.jstree.defaults.plugins.push("ui");})(jQuery);(function($){$.jstree.plugin("crrm",{__init:function(){this.get_container()
.bind("move_node.jstree",$.proxy(function(e,data){if(this._get_settings().crrm.move.open_onmove){var t=this;data.rslt.np.parentsUntil(".jstree").addBack().filter(".jstree-closed").each(function(){t.open_node(this,false,true);});}},this));},defaults:{input_width_limit:200,move:{always_copy:false,open_onmove:true,default_position:"last",check_move:function(m){return true;}}},_fn:{_show_input:function(obj,callback){obj=this._get_node(obj);var rtl=this._get_settings().core.rtl,w=this._get_settings().crrm.input_width_limit,w1=obj.children("ins").width(),w2=obj.find("> a:visible > ins").width()*obj.find("> a:visible > ins").length,t=this.get_text(obj),h1=$("<div />",{css:{"position":"absolute","top":"-200px","left":(rtl?"0px":"-1000px"),"visibility":"hidden"}}).appendTo("body"),h2=obj.css("position","relative").append($("<input />",{"value":t,"class":"jstree-rename-input","css":{"padding":"0","border":"1px solid silver","position":"absolute","left":(rtl?"auto":(w1+w2+4)+"px"),"right":(rtl?(w1+w2+4)+"px":"auto"),"top":"0px","height":(this.data.core.li_height-2)+"px","lineHeight":(this.data.core.li_height-2)+"px","width":"150px"},"blur":$.proxy(function(){var i=obj.children(".jstree-rename-input"),v=i.val();if(v===""){v=t;}
h1.remove();i.remove();this.set_text(obj,t);this.rename_node(obj,v);callback.call(this,obj,v,t);obj.css("position","");},this),"keyup":function(event){var key=event.keyCode||event.which;if(key==27){this.value=t;this.blur();return;}
else if(key==13){this.blur();return;}
else{h2.width(Math.min(h1.text("pW"+this.value).width(),w));}},"keypress":function(event){var key=event.keyCode||event.which;if(key==13){return false;}}})).children(".jstree-rename-input");this.set_text(obj,"");h1.css({fontFamily:h2.css('fontFamily')||'',fontSize:h2.css('fontSize')||'',fontWeight:h2.css('fontWeight')||'',fontStyle:h2.css('fontStyle')||'',fontStretch:h2.css('fontStretch')||'',fontVariant:h2.css('fontVariant')||'',letterSpacing:h2.css('letterSpacing')||'',wordSpacing:h2.css('wordSpacing')||''});h2.width(Math.min(h1.text("pW"+h2[0].value).width(),w))[0].select();},rename:function(obj){obj=this._get_node(obj);this.__rollback();var f=this.__callback;this._show_input(obj,function(obj,new_name,old_name){f.call(this,{"obj":obj,"new_name":new_name,"old_name":old_name});});},create:function(obj,position,js,callback,skip_rename){var t,_this=this;obj=this._get_node(obj);if(!obj){obj=-1;}
this.__rollback();t=this.create_node(obj,position,js,function(t){var p=this._get_parent(t),pos=$(t).index();if(callback){callback.call(this,t);}
if(p.length&&p.hasClass("jstree-closed")){this.open_node(p,false,true);}
if(!skip_rename){this._show_input(t,function(obj,new_name,old_name){_this.__callback({"obj":obj,"name":new_name,"parent":p,"position":pos});});}
else{_this.__callback({"obj":t,"name":this.get_text(t),"parent":p,"position":pos});}});return t;},remove:function(obj){obj=this._get_node(obj,true);var p=this._get_parent(obj),prev=this._get_prev(obj);this.__rollback();obj=this.delete_node(obj);if(obj!==false){this.__callback({"obj":obj,"prev":prev,"parent":p});}},check_move:function(){if(!this.__call_old()){return false;}
var s=this._get_settings().crrm.move;if(!s.check_move.call(this,this._get_move())){return false;}
return true;},move_node:function(obj,ref,position,is_copy,is_prepared,skip_check){var s=this._get_settings().crrm.move;if(!is_prepared){if(typeof position==="undefined"){position=s.default_position;}
if(position==="inside"&&!s.default_position.match(/^(before|after)$/)){position=s.default_position;}
return this.__call_old(true,obj,ref,position,is_copy,false,skip_check);}
if(s.always_copy===true||(s.always_copy==="multitree"&&obj.rt.get_index()!==obj.ot.get_index())){is_copy=true;}
this.__call_old(true,obj,ref,position,is_copy,true,skip_check);},cut:function(obj){obj=this._get_node(obj,true);if(!obj||!obj.length){return false;}
this.data.crrm.cp_nodes=false;this.data.crrm.ct_nodes=obj;this.__callback({"obj":obj});},copy:function(obj){obj=this._get_node(obj,true);if(!obj||!obj.length){return false;}
this.data.crrm.ct_nodes=false;this.data.crrm.cp_nodes=obj;this.__callback({"obj":obj});},paste:function(obj){obj=this._get_node(obj);if(!obj||!obj.length){return false;}
var nodes=this.data.crrm.ct_nodes?this.data.crrm.ct_nodes:this.data.crrm.cp_nodes;if(!this.data.crrm.ct_nodes&&!this.data.crrm.cp_nodes){return false;}
if(this.data.crrm.ct_nodes){this.move_node(this.data.crrm.ct_nodes,obj);this.data.crrm.ct_nodes=false;}
if(this.data.crrm.cp_nodes){this.move_node(this.data.crrm.cp_nodes,obj,false,true);}
this.__callback({"obj":obj,"nodes":nodes});}}});})(jQuery);(function($){var themes_loaded=[];$.jstree._themes=false;$.jstree.plugin("themes",{__init:function(){this.get_container()
.bind("init.jstree",$.proxy(function(){var s=this._get_settings().themes;this.data.themes.dots=s.dots;this.data.themes.icons=s.icons;this.set_theme(s.theme,s.url);},this))
.bind("loaded.jstree",$.proxy(function(){if(!this.data.themes.dots){this.hide_dots();}
else{this.show_dots();}
if(!this.data.themes.icons){this.hide_icons();}
else{this.show_icons();}},this));},defaults:{theme:"default",url:false,dots:true,icons:true},_fn:{set_theme:function(theme_name,theme_url){if(!theme_name){return false;}
if(!theme_url){theme_url=$.jstree._themes+theme_name+'/style.css';}
if($.inArray(theme_url,themes_loaded)==-1){$.vakata.css.add_sheet({"url":theme_url});themes_loaded.push(theme_url);}
if(this.data.themes.theme!=theme_name){this.get_container().removeClass('jstree-'+this.data.themes.theme);this.data.themes.theme=theme_name;}
this.get_container().addClass('jstree-'+theme_name);if(!this.data.themes.dots){this.hide_dots();}
else{this.show_dots();}
if(!this.data.themes.icons){this.hide_icons();}
else{this.show_icons();}
this.__callback();},get_theme:function(){return this.data.themes.theme;},show_dots:function(){this.data.themes.dots=true;this.get_container().children("ul").removeClass("jstree-no-dots");},hide_dots:function(){this.data.themes.dots=false;this.get_container().children("ul").addClass("jstree-no-dots");},toggle_dots:function(){if(this.data.themes.dots){this.hide_dots();}else{this.show_dots();}},show_icons:function(){this.data.themes.icons=true;this.get_container().children("ul").removeClass("jstree-no-icons");},hide_icons:function(){this.data.themes.icons=false;this.get_container().children("ul").addClass("jstree-no-icons");},toggle_icons:function(){if(this.data.themes.icons){this.hide_icons();}else{this.show_icons();}}}});$(function(){if($.jstree._themes===false){$("script").each(function(){if(this.src.toString().match(/jquery\.jstree[^\/]*?\.js(\?.*)?$/)){$.jstree._themes=this.src.toString().replace(/jquery\.jstree[^\/]*?\.js(\?.*)?$/,"")+'themes/';return false;}});}
if($.jstree._themes===false){$.jstree._themes="themes/";}});$.jstree.defaults.plugins.push("themes");})(jQuery);(function($){var bound=[];function exec(i,event){var f=$.jstree._focused(),tmp;if(f&&f.data&&f.data.hotkeys&&f.data.hotkeys.enabled){tmp=f._get_settings().hotkeys[i];if(tmp){return tmp.call(f,event);}}}
$.jstree.plugin("hotkeys",{__init:function(){if(typeof $.hotkeys==="undefined"){throw"jsTree hotkeys: jQuery hotkeys plugin not included.";}
if(!this.data.ui){throw"jsTree hotkeys: jsTree UI plugin not included.";}
$.each(this._get_settings().hotkeys,function(i,v){if(v!==false&&$.inArray(i,bound)==-1){$(document).bind("keydown",i,function(event){return exec(i,event);});bound.push(i);}});this.get_container()
.bind("lock.jstree",$.proxy(function(){if(this.data.hotkeys.enabled){this.data.hotkeys.enabled=false;this.data.hotkeys.revert=true;}},this))
.bind("unlock.jstree",$.proxy(function(){if(this.data.hotkeys.revert){this.data.hotkeys.enabled=true;}},this));this.enable_hotkeys();},defaults:{"up":function(){var o=this.data.ui.hovered||this.data.ui.last_selected||-1;this.hover_node(this._get_prev(o));return false;},"ctrl+up":function(){var o=this.data.ui.hovered||this.data.ui.last_selected||-1;this.hover_node(this._get_prev(o));return false;},"shift+up":function(){var o=this.data.ui.hovered||this.data.ui.last_selected||-1;this.hover_node(this._get_prev(o));return false;},"down":function(){var o=this.data.ui.hovered||this.data.ui.last_selected||-1;this.hover_node(this._get_next(o));return false;},"ctrl+down":function(){var o=this.data.ui.hovered||this.data.ui.last_selected||-1;this.hover_node(this._get_next(o));return false;},"shift+down":function(){var o=this.data.ui.hovered||this.data.ui.last_selected||-1;this.hover_node(this._get_next(o));return false;},"left":function(){var o=this.data.ui.hovered||this.data.ui.last_selected;if(o){if(o.hasClass("jstree-open")){this.close_node(o);}
else{this.hover_node(this._get_prev(o));}}
return false;},"ctrl+left":function(){var o=this.data.ui.hovered||this.data.ui.last_selected;if(o){if(o.hasClass("jstree-open")){this.close_node(o);}
else{this.hover_node(this._get_prev(o));}}
return false;},"shift+left":function(){var o=this.data.ui.hovered||this.data.ui.last_selected;if(o){if(o.hasClass("jstree-open")){this.close_node(o);}
else{this.hover_node(this._get_prev(o));}}
return false;},"right":function(){var o=this.data.ui.hovered||this.data.ui.last_selected;if(o&&o.length){if(o.hasClass("jstree-closed")){this.open_node(o);}
else{this.hover_node(this._get_next(o));}}
return false;},"ctrl+right":function(){var o=this.data.ui.hovered||this.data.ui.last_selected;if(o&&o.length){if(o.hasClass("jstree-closed")){this.open_node(o);}
else{this.hover_node(this._get_next(o));}}
return false;},"shift+right":function(){var o=this.data.ui.hovered||this.data.ui.last_selected;if(o&&o.length){if(o.hasClass("jstree-closed")){this.open_node(o);}
else{this.hover_node(this._get_next(o));}}
return false;},"space":function(){if(this.data.ui.hovered){this.data.ui.hovered.children("a:eq(0)").click();}
return false;},"ctrl+space":function(event){event.type="click";if(this.data.ui.hovered){this.data.ui.hovered.children("a:eq(0)").trigger(event);}
return false;},"shift+space":function(event){event.type="click";if(this.data.ui.hovered){this.data.ui.hovered.children("a:eq(0)").trigger(event);}
return false;},"f2":function(){this.rename(this.data.ui.hovered||this.data.ui.last_selected);},"del":function(){this.remove(this.data.ui.hovered||this._get_node(null));}},_fn:{enable_hotkeys:function(){this.data.hotkeys.enabled=true;},disable_hotkeys:function(){this.data.hotkeys.enabled=false;}}});})(jQuery);(function($){$.jstree.plugin("json_data",{__init:function(){var s=this._get_settings().json_data;if(s.progressive_unload){this.get_container().bind("after_close.jstree",function(e,data){data.rslt.obj.children("ul").remove();});}},defaults:{data:false,ajax:false,correct_state:true,progressive_render:false,progressive_unload:false},_fn:{load_node:function(obj,s_call,e_call){var _this=this;this.load_node_json(obj,function(){_this.__callback({"obj":_this._get_node(obj)});s_call.call(this);},e_call);},_is_loaded:function(obj){var s=this._get_settings().json_data;obj=this._get_node(obj);return obj==-1||!obj||(!s.ajax&&!s.progressive_render&&!$.isFunction(s.data))||obj.is(".jstree-open, .jstree-leaf")||obj.children("ul").children("li").length>0;},refresh:function(obj){obj=this._get_node(obj);var s=this._get_settings().json_data;if(obj&&obj!==-1&&s.progressive_unload&&($.isFunction(s.data)||!!s.ajax)){obj.removeData("jstree_children");}
return this.__call_old();},load_node_json:function(obj,s_call,e_call){var s=this.get_settings().json_data,d,error_func=function(){},success_func=function(){};obj=this._get_node(obj);if(obj&&obj!==-1&&(s.progressive_render||s.progressive_unload)&&!obj.is(".jstree-open, .jstree-leaf")&&obj.children("ul").children("li").length===0&&obj.data("jstree_children")){d=this._parse_json(obj.data("jstree_children"),obj);if(d){obj.append(d);if(!s.progressive_unload){obj.removeData("jstree_children");}}
this.clean_node(obj);if(s_call){s_call.call(this);}
return;}
if(obj&&obj!==-1){if(obj.data("jstree_is_loading")){return;}
else{obj.data("jstree_is_loading",true);}}
switch(!0){case(!s.data&&!s.ajax):throw"Neither data nor ajax settings supplied.";case($.isFunction(s.data)):s.data.call(this,obj,$.proxy(function(d){d=this._parse_json(d,obj);if(!d){if(obj===-1||!obj){if(s.correct_state){this.get_container().children("ul").empty();}}
else{obj.children("a.jstree-loading").removeClass("jstree-loading");obj.removeData("jstree_is_loading");if(s.correct_state){this.correct_state(obj);}}
if(e_call){e_call.call(this);}}
else{if(obj===-1||!obj){this.get_container().children("ul").empty().append(d.children());}
else{obj.append(d).children("a.jstree-loading").removeClass("jstree-loading");obj.removeData("jstree_is_loading");}
this.clean_node(obj);if(s_call){s_call.call(this);}}},this));break;case(!!s.data&&!s.ajax)||(!!s.data&&!!s.ajax&&(!obj||obj===-1)):if(!obj||obj==-1){d=this._parse_json(s.data,obj);if(d){this.get_container().children("ul").empty().append(d.children());this.clean_node();}
else{if(s.correct_state){this.get_container().children("ul").empty();}}}
if(s_call){s_call.call(this);}
break;case(!s.data&&!!s.ajax)||(!!s.data&&!!s.ajax&&obj&&obj!==-1):error_func=function(x,t,e){var ef=this.get_settings().json_data.ajax.error;if(ef){ef.call(this,x,t,e);}
if(obj!=-1&&obj.length){obj.children("a.jstree-loading").removeClass("jstree-loading");obj.removeData("jstree_is_loading");if(t==="success"&&s.correct_state){this.correct_state(obj);}}
else{if(t==="success"&&s.correct_state){this.get_container().children("ul").empty();}}
if(e_call){e_call.call(this);}};success_func=function(d,t,x){var sf=this.get_settings().json_data.ajax.success;if(sf){d=sf.call(this,d,t,x)||d;}
if(d===""||(d&&d.toString&&d.toString().replace(/^[\s\n]+$/,"")==="")||(!$.isArray(d)&&!$.isPlainObject(d))){return error_func.call(this,x,t,"");}
d=this._parse_json(d,obj);if(d){if(obj===-1||!obj){this.get_container().children("ul").empty().append(d.children());}
else{obj.append(d).children("a.jstree-loading").removeClass("jstree-loading");obj.removeData("jstree_is_loading");}
this.clean_node(obj);if(s_call){s_call.call(this);}}
else{if(obj===-1||!obj){if(s.correct_state){this.get_container().children("ul").empty();if(s_call){s_call.call(this);}}}
else{obj.children("a.jstree-loading").removeClass("jstree-loading");obj.removeData("jstree_is_loading");if(s.correct_state){this.correct_state(obj);if(s_call){s_call.call(this);}}}}};s.ajax.context=this;s.ajax.error=error_func;s.ajax.success=success_func;if(!s.ajax.dataType){s.ajax.dataType="json";}
if($.isFunction(s.ajax.url)){s.ajax.url=s.ajax.url.call(this,obj);}
if($.isFunction(s.ajax.data)){s.ajax.data=s.ajax.data.call(this,obj);}
$.ajax(s.ajax);break;}},_parse_json:function(js,obj,is_callback){var d=false,p=this._get_settings(),s=p.json_data,t=p.core.html_titles,tmp,i,j,ul1,ul2;if(!js){return d;}
if(s.progressive_unload&&obj&&obj!==-1){obj.data("jstree_children",d);}
if($.isArray(js)){d=$('<ul>');if(!js.length){return false;}
for(i=0,j=js.length;i<j;i++){tmp=this._parse_json(js[i],obj,true);if(tmp.length){d=d.append(tmp);}}
d=d.children();}
else{if(typeof js=="string"){js={data:js};}
if(!js.data&&js.data!==""){return d;}
d=$("<li />");if(js.attr){d.attr(js.attr);}
if(js.metadata){d.data(js.metadata);}
if(js.state){d.addClass("jstree-"+js.state);}
if(!$.isArray(js.data)){tmp=js.data;js.data=[];js.data.push(tmp);}
$.each(js.data,function(i,m){tmp=$("<a />");if($.isFunction(m)){m=m.call(this,js);}
if(typeof m=="string"){tmp.attr('href','#')[t?"html":"text"](m);}
else{if(!m.attr){m.attr={};}
if(!m.attr.href){m.attr.href='#';}
tmp.attr(m.attr)[t?"html":"text"](m.title);if(m.language){tmp.addClass(m.language);}}
tmp.prepend("<ins class='jstree-icon'>&#160;</ins>");if(!m.icon&&js.icon){m.icon=js.icon;}
if(m.icon){if(m.icon.indexOf("/")===-1){tmp.children("ins").addClass(m.icon);}
else{tmp.children("ins").css("background","url('"+m.icon+"') center center no-repeat");}}
d.append(tmp);});d.prepend("<ins class='jstree-icon'>&#160;</ins>");if(js.children){if(s.progressive_render&&js.state!=="open"){d.addClass("jstree-closed").data("jstree_children",js.children);}
else{if(s.progressive_unload){d.data("jstree_children",js.children);}
if($.isArray(js.children)&&js.children.length){tmp=this._parse_json(js.children,obj,true);if(tmp.length){ul2=$("<ul />");ul2.append(tmp);d.append(ul2);}}}}}
if(!is_callback){ul1=$("<ul />");ul1.append(d);d=ul1;}
return d;},get_json:function(obj,li_attr,a_attr,is_callback){var result=[],s=this._get_settings(),_this=this,tmp1,tmp2,li,a,t,lang;obj=this._get_node(obj);if(!obj||obj===-1){obj=this.get_container().find("> ul > li");}
li_attr=$.isArray(li_attr)?li_attr:["id","class"];if(!is_callback&&this.data.types){li_attr.push(s.types.type_attr);}
a_attr=$.isArray(a_attr)?a_attr:[];obj.each(function(){li=$(this);tmp1={data:[]};if(li_attr.length){tmp1.attr={};}
$.each(li_attr,function(i,v){tmp2=li.attr(v);if(tmp2&&tmp2.length&&tmp2.replace(/jstree[^ ]*/ig,'').length){tmp1.attr[v]=(" "+tmp2).replace(/ jstree[^ ]*/ig,'').replace(/\s+$/ig," ").replace(/^ /,"").replace(/ $/,"");}});if(li.hasClass("jstree-open")){tmp1.state="open";}
if(li.hasClass("jstree-closed")){tmp1.state="closed";}
if(li.data()){tmp1.metadata=li.data();}
a=li.children("a");a.each(function(){t=$(this);if(a_attr.length||$.inArray("languages",s.plugins)!==-1||t.children("ins").get(0).style.backgroundImage.length||(t.children("ins").get(0).className&&t.children("ins").get(0).className.replace(/jstree[^ ]*|$/ig,'').length)){lang=false;if($.inArray("languages",s.plugins)!==-1&&$.isArray(s.languages)&&s.languages.length){$.each(s.languages,function(l,lv){if(t.hasClass(lv)){lang=lv;return false;}});}
tmp2={attr:{},title:_this.get_text(t,lang)};$.each(a_attr,function(k,z){tmp2.attr[z]=(" "+(t.attr(z)||"")).replace(/ jstree[^ ]*/ig,'').replace(/\s+$/ig," ").replace(/^ /,"").replace(/ $/,"");});if($.inArray("languages",s.plugins)!==-1&&$.isArray(s.languages)&&s.languages.length){$.each(s.languages,function(k,z){if(t.hasClass(z)){tmp2.language=z;return true;}});}
if(t.children("ins").get(0).className.replace(/jstree[^ ]*|$/ig,'').replace(/^\s+$/ig,"").length){tmp2.icon=t.children("ins").get(0).className.replace(/jstree[^ ]*|$/ig,'').replace(/\s+$/ig," ").replace(/^ /,"").replace(/ $/,"");}
if(t.children("ins").get(0).style.backgroundImage.length){tmp2.icon=t.children("ins").get(0).style.backgroundImage.replace("url(","").replace(")","");}}
else{tmp2=_this.get_text(t);}
if(a.length>1){tmp1.data.push(tmp2);}
else{tmp1.data=tmp2;}});li=li.find("> ul > li");if(li.length){tmp1.children=_this.get_json(li,li_attr,a_attr,true);}
result.push(tmp1);});return result;}}});})(jQuery);(function($){var sh=false;$.jstree.plugin("languages",{__init:function(){this._load_css();},defaults:[],_fn:{set_lang:function(i){var langs=this._get_settings().languages,st=false,selector=".jstree-"+this.get_index()+' a';if(!$.isArray(langs)||langs.length===0){return false;}
if($.inArray(i,langs)==-1){if(!!langs[i]){i=langs[i];}
else{return false;}}
if(i==this.data.languages.current_language){return true;}
st=$.vakata.css.get_css(selector+"."+this.data.languages.current_language,false,sh);if(st!==false){st.style.display="none";}
st=$.vakata.css.get_css(selector+"."+i,false,sh);if(st!==false){st.style.display="";}
this.data.languages.current_language=i;this.__callback(i);return true;},get_lang:function(){return this.data.languages.current_language;},_get_string:function(key,lang){var langs=this._get_settings().languages,s=this._get_settings().core.strings;if($.isArray(langs)&&langs.length){lang=(lang&&$.inArray(lang,langs)!=-1)?lang:this.data.languages.current_language;}
if(s[lang]&&s[lang][key]){return s[lang][key];}
if(s[key]){return s[key];}
return key;},get_text:function(obj,lang){obj=this._get_node(obj)||this.data.ui.last_selected;if(!obj.size()){return false;}
var langs=this._get_settings().languages,s=this._get_settings().core.html_titles;if($.isArray(langs)&&langs.length){lang=(lang&&$.inArray(lang,langs)!=-1)?lang:this.data.languages.current_language;obj=obj.children("a."+lang);}
else{obj=obj.children("a:eq(0)");}
if(s){obj=obj.clone();obj.children("INS").remove();return obj.html();}
else{obj=obj.contents().filter(function(){return this.nodeType==3;})[0];return obj.nodeValue;}},set_text:function(obj,val,lang){obj=this._get_node(obj)||this.data.ui.last_selected;if(!obj.size()){return false;}
var langs=this._get_settings().languages,s=this._get_settings().core.html_titles,tmp;if($.isArray(langs)&&langs.length){lang=(lang&&$.inArray(lang,langs)!=-1)?lang:this.data.languages.current_language;obj=obj.children("a."+lang);}
else{obj=obj.children("a:eq(0)");}
if(s){tmp=obj.children("INS").clone();obj.html(val).prepend(tmp);this.__callback({"obj":obj,"name":val,"lang":lang});return true;}
else{obj=obj.contents().filter(function(){return this.nodeType==3;})[0];this.__callback({"obj":obj,"name":val,"lang":lang});return(obj.nodeValue=val);}},_load_css:function(){var langs=this._get_settings().languages,str="/* languages css */",selector=".jstree-"+this.get_index()+' a',ln;if($.isArray(langs)&&langs.length){this.data.languages.current_language=langs[0];for(ln=0;ln<langs.length;ln++){str+=selector+"."+langs[ln]+" {";if(langs[ln]!=this.data.languages.current_language){str+=" display:none; ";}
str+=" } ";}
sh=$.vakata.css.add_sheet({'str':str,'title':"jstree-languages"});}},create_node:function(obj,position,js,callback){var t=this.__call_old(true,obj,position,js,function(t){var langs=this._get_settings().languages,a=t.children("a"),ln;if($.isArray(langs)&&langs.length){for(ln=0;ln<langs.length;ln++){if(!a.is("."+langs[ln])){t.append(a.eq(0).clone().removeClass(langs.join(" ")).addClass(langs[ln]));}}
a.not("."+langs.join(", .")).remove();}
if(callback){callback.call(this,t);}});return t;}}});})(jQuery);(function($){$.jstree.plugin("cookies",{__init:function(){if(typeof $.cookie==="undefined"){throw"jsTree cookie: jQuery cookie plugin not included.";}
var s=this._get_settings().cookies,tmp;if(!!s.save_loaded){tmp=$.cookie(s.save_loaded);if(tmp&&tmp.length){this.data.core.to_load=tmp.split(",");}}
if(!!s.save_opened){tmp=$.cookie(s.save_opened);if(tmp&&tmp.length){this.data.core.to_open=tmp.split(",");}}
if(!!s.save_selected){tmp=$.cookie(s.save_selected);if(tmp&&tmp.length&&this.data.ui){this.data.ui.to_select=tmp.split(",");}}
this.get_container()
.one((this.data.ui?"reselect":"reopen")+".jstree",$.proxy(function(){this.get_container()
.bind("open_node.jstree close_node.jstree select_node.jstree deselect_node.jstree",$.proxy(function(e){if(this._get_settings().cookies.auto_save){this.save_cookie((e.handleObj.namespace+e.handleObj.type).replace("jstree",""));}},this));},this));},defaults:{save_loaded:"jstree_load",save_opened:"jstree_open",save_selected:"jstree_select",auto_save:true,cookie_options:{}},_fn:{save_cookie:function(c){if(this.data.core.refreshing){return;}
var s=this._get_settings().cookies;if(!c){if(s.save_loaded){this.save_loaded();$.cookie(s.save_loaded,this.data.core.to_load.join(","),s.cookie_options);}
if(s.save_opened){this.save_opened();$.cookie(s.save_opened,this.data.core.to_open.join(","),s.cookie_options);}
if(s.save_selected&&this.data.ui){this.save_selected();$.cookie(s.save_selected,this.data.ui.to_select.join(","),s.cookie_options);}
return;}
switch(c){case"open_node":case"close_node":if(!!s.save_opened){this.save_opened();$.cookie(s.save_opened,this.data.core.to_open.join(","),s.cookie_options);}
if(!!s.save_loaded){this.save_loaded();$.cookie(s.save_loaded,this.data.core.to_load.join(","),s.cookie_options);}
break;case"select_node":case"deselect_node":if(!!s.save_selected&&this.data.ui){this.save_selected();$.cookie(s.save_selected,this.data.ui.to_select.join(","),s.cookie_options);}
break;}}}});})(jQuery);(function($){$.jstree.plugin("sort",{__init:function(){this.get_container()
.bind("load_node.jstree",$.proxy(function(e,data){var obj=this._get_node(data.rslt.obj);obj=obj===-1?this.get_container().children("ul"):obj.children("ul");this.sort(obj);},this))
.bind("rename_node.jstree create_node.jstree create.jstree",$.proxy(function(e,data){this.sort(data.rslt.obj.parent());},this))
.bind("move_node.jstree",$.proxy(function(e,data){var m=data.rslt.np==-1?this.get_container():data.rslt.np;this.sort(m.children("ul"));},this));},defaults:function(a,b){return this.get_text(a)>this.get_text(b)?1:-1;},_fn:{sort:function(obj){var s=this._get_settings().sort,t=this;obj.append($.makeArray(obj.children("li")).sort($.proxy(s,t)));obj.find("> li > ul").each(function(){t.sort($(this));});this.clean_node(obj);}}});})(jQuery);(function($){var o=false,r=false,m=false,ml=false,sli=false,sti=false,dir1=false,dir2=false,last_pos=false;$.vakata.dnd={is_down:false,is_drag:false,helper:false,scroll_spd:10,init_x:0,init_y:0,threshold:5,helper_left:5,helper_top:10,user_data:{},drag_start:function(e,data,html){if($.vakata.dnd.is_drag){$.vakata.drag_stop({});}
try{e.currentTarget.unselectable="on";e.currentTarget.onselectstart=function(){return false;};if(e.currentTarget.style){e.currentTarget.style.MozUserSelect="none";}}catch(err){}
$.vakata.dnd.init_x=e.pageX;$.vakata.dnd.init_y=e.pageY;$.vakata.dnd.user_data=data;$.vakata.dnd.is_down=true;$.vakata.dnd.helper=$("<div id='vakata-dragged' />").html(html);$(document).bind("mousemove",$.vakata.dnd.drag);$(document).bind("mouseup",$.vakata.dnd.drag_stop);return false;},drag:function(e){if(!$.vakata.dnd.is_down){return;}
if(!$.vakata.dnd.is_drag){if(Math.abs(e.pageX-$.vakata.dnd.init_x)>5||Math.abs(e.pageY-$.vakata.dnd.init_y)>5){$.vakata.dnd.helper.appendTo("body");$.vakata.dnd.is_drag=true;$(document).triggerHandler("drag_start.vakata",{"event":e,"data":$.vakata.dnd.user_data});}
else{return;}}
if(e.type==="mousemove"){var d=$(document),t=d.scrollTop(),l=d.scrollLeft();if(e.pageY-t<20){if(sti&&dir1==="down"){clearInterval(sti);sti=false;}
if(!sti){dir1="up";sti=setInterval(function(){$(document).scrollTop($(document).scrollTop()-$.vakata.dnd.scroll_spd);},150);}}
else{if(sti&&dir1==="up"){clearInterval(sti);sti=false;}}
if($(window).height()-(e.pageY-t)<20){if(sti&&dir1==="up"){clearInterval(sti);sti=false;}
if(!sti){dir1="down";sti=setInterval(function(){$(document).scrollTop($(document).scrollTop()+$.vakata.dnd.scroll_spd);},150);}}
else{if(sti&&dir1==="down"){clearInterval(sti);sti=false;}}
if(e.pageX-l<20){if(sli&&dir2==="right"){clearInterval(sli);sli=false;}
if(!sli){dir2="left";sli=setInterval(function(){$(document).scrollLeft($(document).scrollLeft()-$.vakata.dnd.scroll_spd);},150);}}
else{if(sli&&dir2==="left"){clearInterval(sli);sli=false;}}
if($(window).width()-(e.pageX-l)<20){if(sli&&dir2==="left"){clearInterval(sli);sli=false;}
if(!sli){dir2="right";sli=setInterval(function(){$(document).scrollLeft($(document).scrollLeft()+$.vakata.dnd.scroll_spd);},150);}}
else{if(sli&&dir2==="right"){clearInterval(sli);sli=false;}}}
$.vakata.dnd.helper.css({left:(e.pageX+$.vakata.dnd.helper_left)+"px",top:(e.pageY+$.vakata.dnd.helper_top)+"px"});$(document).triggerHandler("drag.vakata",{"event":e,"data":$.vakata.dnd.user_data});},drag_stop:function(e){if(sli){clearInterval(sli);}
if(sti){clearInterval(sti);}
$(document).unbind("mousemove",$.vakata.dnd.drag);$(document).unbind("mouseup",$.vakata.dnd.drag_stop);$(document).triggerHandler("drag_stop.vakata",{"event":e,"data":$.vakata.dnd.user_data});$.vakata.dnd.helper.remove();$.vakata.dnd.init_x=0;$.vakata.dnd.init_y=0;$.vakata.dnd.user_data={};$.vakata.dnd.is_down=false;$.vakata.dnd.is_drag=false;}};$(function(){var css_string='#vakata-dragged { display:block; margin:0 0 0 0; padding:4px 4px 4px 24px; position:absolute; top:-2000px; line-height:16px; z-index:10000; } ';$.vakata.css.add_sheet({str:css_string,title:"vakata"});});$.jstree.plugin("dnd",{__init:function(){this.data.dnd={active:false,after:false,inside:false,before:false,off:false,prepared:false,w:0,to1:false,to2:false,cof:false,cw:false,ch:false,i1:false,i2:false,mto:false};this.get_container()
.bind("mouseenter.jstree",$.proxy(function(e){if($.vakata.dnd.is_drag&&$.vakata.dnd.user_data.jstree){if(this.data.themes){m.attr("class","jstree-"+this.data.themes.theme);if(ml){ml.attr("class","jstree-"+this.data.themes.theme);}
$.vakata.dnd.helper.attr("class","jstree-dnd-helper jstree-"+this.data.themes.theme);}
if(e.currentTarget===e.target&&$.vakata.dnd.user_data.obj&&$($.vakata.dnd.user_data.obj).length&&$($.vakata.dnd.user_data.obj).parents(".jstree:eq(0)")[0]!==e.target){var tr=$.jstree._reference(e.target),dc;if(tr.data.dnd.foreign){dc=tr._get_settings().dnd.drag_check.call(this,{"o":o,"r":tr.get_container(),is_root:true});if(dc===true||dc.inside===true||dc.before===true||dc.after===true){$.vakata.dnd.helper.children("ins").attr("class","jstree-ok");}}
else{tr.prepare_move(o,tr.get_container(),"last");if(tr.check_move()){$.vakata.dnd.helper.children("ins").attr("class","jstree-ok");}}}}},this))
.bind("mouseup.jstree",$.proxy(function(e){if($.vakata.dnd.is_drag&&$.vakata.dnd.user_data.jstree&&e.currentTarget===e.target&&$.vakata.dnd.user_data.obj&&$($.vakata.dnd.user_data.obj).length&&$($.vakata.dnd.user_data.obj).parents(".jstree:eq(0)")[0]!==e.target){var tr=$.jstree._reference(e.currentTarget),dc;if(tr.data.dnd.foreign){dc=tr._get_settings().dnd.drag_check.call(this,{"o":o,"r":tr.get_container(),is_root:true});if(dc===true||dc.inside===true||dc.before===true||dc.after===true){tr._get_settings().dnd.drag_finish.call(this,{"o":o,"r":tr.get_container(),is_root:true});}}
else{tr.move_node(o,tr.get_container(),"last",e[tr._get_settings().dnd.copy_modifier+"Key"]);}}},this))
.bind("mouseleave.jstree",$.proxy(function(e){if(e.relatedTarget&&e.relatedTarget.id&&e.relatedTarget.id==="jstree-marker-line"){return false;}
if($.vakata.dnd.is_drag&&$.vakata.dnd.user_data.jstree){if(this.data.dnd.i1){clearInterval(this.data.dnd.i1);}
if(this.data.dnd.i2){clearInterval(this.data.dnd.i2);}
if(this.data.dnd.to1){clearTimeout(this.data.dnd.to1);}
if(this.data.dnd.to2){clearTimeout(this.data.dnd.to2);}
if($.vakata.dnd.helper.children("ins").hasClass("jstree-ok")){$.vakata.dnd.helper.children("ins").attr("class","jstree-invalid");}}},this))
.bind("mousemove.jstree",$.proxy(function(e){if($.vakata.dnd.is_drag&&$.vakata.dnd.user_data.jstree){var cnt=this.get_container()[0];if(e.pageX+24>this.data.dnd.cof.left+this.data.dnd.cw){if(this.data.dnd.i1){clearInterval(this.data.dnd.i1);}
this.data.dnd.i1=setInterval($.proxy(function(){this.scrollLeft+=$.vakata.dnd.scroll_spd;},cnt),100);}
else if(e.pageX-24<this.data.dnd.cof.left){if(this.data.dnd.i1){clearInterval(this.data.dnd.i1);}
this.data.dnd.i1=setInterval($.proxy(function(){this.scrollLeft-=$.vakata.dnd.scroll_spd;},cnt),100);}
else{if(this.data.dnd.i1){clearInterval(this.data.dnd.i1);}}
if(e.pageY+24>this.data.dnd.cof.top+this.data.dnd.ch){if(this.data.dnd.i2){clearInterval(this.data.dnd.i2);}
this.data.dnd.i2=setInterval($.proxy(function(){this.scrollTop+=$.vakata.dnd.scroll_spd;},cnt),100);}
else if(e.pageY-24<this.data.dnd.cof.top){if(this.data.dnd.i2){clearInterval(this.data.dnd.i2);}
this.data.dnd.i2=setInterval($.proxy(function(){this.scrollTop-=$.vakata.dnd.scroll_spd;},cnt),100);}
else{if(this.data.dnd.i2){clearInterval(this.data.dnd.i2);}}}},this))
.bind("scroll.jstree",$.proxy(function(e){if($.vakata.dnd.is_drag&&$.vakata.dnd.user_data.jstree&&m&&ml){m.hide();ml.hide();}},this))
.delegate("a","mousedown.jstree",$.proxy(function(e){if(e.which===1){this.start_drag(e.currentTarget,e);return false;}},this))
.delegate("a","mouseenter.jstree",$.proxy(function(e){if($.vakata.dnd.is_drag&&$.vakata.dnd.user_data.jstree){this.dnd_enter(e.currentTarget);}},this))
.delegate("a","mousemove.jstree",$.proxy(function(e){if($.vakata.dnd.is_drag&&$.vakata.dnd.user_data.jstree){if(!r||!r.length||r.children("a")[0]!==e.currentTarget){this.dnd_enter(e.currentTarget);}
if(typeof this.data.dnd.off.top==="undefined"){this.data.dnd.off=$(e.target).offset();}
this.data.dnd.w=(e.pageY-(this.data.dnd.off.top||0))%this.data.core.li_height;if(this.data.dnd.w<0){this.data.dnd.w+=this.data.core.li_height;}
this.dnd_show();}},this))
.delegate("a","mouseleave.jstree",$.proxy(function(e){if($.vakata.dnd.is_drag&&$.vakata.dnd.user_data.jstree){if(e.relatedTarget&&e.relatedTarget.id&&e.relatedTarget.id==="jstree-marker-line"){return false;}
if(m){m.hide();}
if(ml){ml.hide();}
this.data.dnd.mto=setTimeout((function(t){return function(){t.dnd_leave(e);};})(this),0);}},this))
.delegate("a","mouseup.jstree",$.proxy(function(e){if($.vakata.dnd.is_drag&&$.vakata.dnd.user_data.jstree){this.dnd_finish(e);}},this));$(document)
.bind("drag_stop.vakata",$.proxy(function(){if(this.data.dnd.to1){clearTimeout(this.data.dnd.to1);}
if(this.data.dnd.to2){clearTimeout(this.data.dnd.to2);}
if(this.data.dnd.i1){clearInterval(this.data.dnd.i1);}
if(this.data.dnd.i2){clearInterval(this.data.dnd.i2);}
this.data.dnd.after=false;this.data.dnd.before=false;this.data.dnd.inside=false;this.data.dnd.off=false;this.data.dnd.prepared=false;this.data.dnd.w=false;this.data.dnd.to1=false;this.data.dnd.to2=false;this.data.dnd.i1=false;this.data.dnd.i2=false;this.data.dnd.active=false;this.data.dnd.foreign=false;if(m){m.css({"top":"-2000px"});}
if(ml){ml.css({"top":"-2000px"});}},this))
.bind("drag_start.vakata",$.proxy(function(e,data){if(data.data.jstree){var et=$(data.event.target);if(et.closest(".jstree").hasClass("jstree-"+this.get_index())){this.dnd_enter(et);}}},this));var s=this._get_settings().dnd;if(s.drag_target){$(document)
.delegate(s.drag_target,"mousedown.jstree-"+this.get_index(),$.proxy(function(e){o=e.target;$.vakata.dnd.drag_start(e,{jstree:true,obj:e.target},"<ins class='jstree-icon'></ins>"+$(e.target).text());if(this.data.themes){if(m){m.attr("class","jstree-"+this.data.themes.theme);}
if(ml){ml.attr("class","jstree-"+this.data.themes.theme);}
$.vakata.dnd.helper.attr("class","jstree-dnd-helper jstree-"+this.data.themes.theme);}
$.vakata.dnd.helper.children("ins").attr("class","jstree-invalid");var cnt=this.get_container();this.data.dnd.cof=cnt.offset();this.data.dnd.cw=parseInt(cnt.width(),10);this.data.dnd.ch=parseInt(cnt.height(),10);this.data.dnd.foreign=true;e.preventDefault();},this));}
if(s.drop_target){$(document)
.delegate(s.drop_target,"mouseenter.jstree-"+this.get_index(),$.proxy(function(e){if(this.data.dnd.active&&this._get_settings().dnd.drop_check.call(this,{"o":o,"r":$(e.target),"e":e})){$.vakata.dnd.helper.children("ins").attr("class","jstree-ok");}},this))
.delegate(s.drop_target,"mouseleave.jstree-"+this.get_index(),$.proxy(function(e){if(this.data.dnd.active){$.vakata.dnd.helper.children("ins").attr("class","jstree-invalid");}},this))
.delegate(s.drop_target,"mouseup.jstree-"+this.get_index(),$.proxy(function(e){if(this.data.dnd.active&&$.vakata.dnd.helper.children("ins").hasClass("jstree-ok")){this._get_settings().dnd.drop_finish.call(this,{"o":o,"r":$(e.target),"e":e});}},this));}},defaults:{copy_modifier:"ctrl",check_timeout:100,open_timeout:500,drop_target:".jstree-drop",drop_check:function(data){return true;},drop_finish:$.noop,drag_target:".jstree-draggable",drag_finish:$.noop,drag_check:function(data){return{after:false,before:false,inside:true};}},_fn:{dnd_prepare:function(){if(!r||!r.length){return;}
this.data.dnd.off=r.offset();if(this._get_settings().core.rtl){this.data.dnd.off.right=this.data.dnd.off.left+r.width();}
if(this.data.dnd.foreign){var a=this._get_settings().dnd.drag_check.call(this,{"o":o,"r":r});this.data.dnd.after=a.after;this.data.dnd.before=a.before;this.data.dnd.inside=a.inside;this.data.dnd.prepared=true;return this.dnd_show();}
this.prepare_move(o,r,"before");this.data.dnd.before=this.check_move();this.prepare_move(o,r,"after");this.data.dnd.after=this.check_move();if(this._is_loaded(r)){this.prepare_move(o,r,"inside");this.data.dnd.inside=this.check_move();}
else{this.data.dnd.inside=false;}
this.data.dnd.prepared=true;return this.dnd_show();},dnd_show:function(){if(!this.data.dnd.prepared){return;}
var o=["before","inside","after"],r=false,rtl=this._get_settings().core.rtl,pos;if(this.data.dnd.w<this.data.core.li_height/3){o=["before","inside","after"];}
else if(this.data.dnd.w<=this.data.core.li_height*2/3){o=this.data.dnd.w<this.data.core.li_height/2?["inside","before","after"]:["inside","after","before"];}
else{o=["after","inside","before"];}
$.each(o,$.proxy(function(i,val){if(this.data.dnd[val]){$.vakata.dnd.helper.children("ins").attr("class","jstree-ok");r=val;return false;}},this));if(r===false){$.vakata.dnd.helper.children("ins").attr("class","jstree-invalid");}
pos=rtl?(this.data.dnd.off.right-18):(this.data.dnd.off.left+10);switch(r){case"before":m.css({"left":pos+"px","top":(this.data.dnd.off.top-6)+"px"}).show();if(ml){ml.css({"left":(pos+8)+"px","top":(this.data.dnd.off.top-1)+"px"}).show();}
break;case"after":m.css({"left":pos+"px","top":(this.data.dnd.off.top+this.data.core.li_height-6)+"px"}).show();if(ml){ml.css({"left":(pos+8)+"px","top":(this.data.dnd.off.top+this.data.core.li_height-1)+"px"}).show();}
break;case"inside":m.css({"left":pos+(rtl?-4:4)+"px","top":(this.data.dnd.off.top+this.data.core.li_height/2-5)+"px"}).show();if(ml){ml.hide();}
break;default:m.hide();if(ml){ml.hide();}
break;}
last_pos=r;return r;},dnd_open:function(){this.data.dnd.to2=false;this.open_node(r,$.proxy(this.dnd_prepare,this),true);},dnd_finish:function(e){if(this.data.dnd.foreign){if(this.data.dnd.after||this.data.dnd.before||this.data.dnd.inside){this._get_settings().dnd.drag_finish.call(this,{"o":o,"r":r,"p":last_pos});}}
else{this.dnd_prepare();this.move_node(o,r,last_pos,e[this._get_settings().dnd.copy_modifier+"Key"]);}
o=false;r=false;m.hide();if(ml){ml.hide();}},dnd_enter:function(obj){if(this.data.dnd.mto){clearTimeout(this.data.dnd.mto);this.data.dnd.mto=false;}
var s=this._get_settings().dnd;this.data.dnd.prepared=false;r=this._get_node(obj);if(s.check_timeout){if(this.data.dnd.to1){clearTimeout(this.data.dnd.to1);}
this.data.dnd.to1=setTimeout($.proxy(this.dnd_prepare,this),s.check_timeout);}
else{this.dnd_prepare();}
if(s.open_timeout){if(this.data.dnd.to2){clearTimeout(this.data.dnd.to2);}
if(r&&r.length&&r.hasClass("jstree-closed")){this.data.dnd.to2=setTimeout($.proxy(this.dnd_open,this),s.open_timeout);}}
else{if(r&&r.length&&r.hasClass("jstree-closed")){this.dnd_open();}}},dnd_leave:function(e){this.data.dnd.after=false;this.data.dnd.before=false;this.data.dnd.inside=false;$.vakata.dnd.helper.children("ins").attr("class","jstree-invalid");m.hide();if(ml){ml.hide();}
if(r&&r[0]===e.target.parentNode){if(this.data.dnd.to1){clearTimeout(this.data.dnd.to1);this.data.dnd.to1=false;}
if(this.data.dnd.to2){clearTimeout(this.data.dnd.to2);this.data.dnd.to2=false;}}},start_drag:function(obj,e){o=this._get_node(obj);if(this.data.ui&&this.is_selected(o)){o=this._get_node(null,true);}
var dt=o.length>1?this._get_string("multiple_selection"):this.get_text(o),cnt=this.get_container();if(!this._get_settings().core.html_titles){dt=dt.replace(/</ig,"&lt;").replace(/>/ig,"&gt;");}
$.vakata.dnd.drag_start(e,{jstree:true,obj:o},"<ins class='jstree-icon'></ins>"+dt);if(this.data.themes){if(m){m.attr("class","jstree-"+this.data.themes.theme);}
if(ml){ml.attr("class","jstree-"+this.data.themes.theme);}
$.vakata.dnd.helper.attr("class","jstree-dnd-helper jstree-"+this.data.themes.theme);}
this.data.dnd.cof=cnt.offset();this.data.dnd.cw=parseInt(cnt.width(),10);this.data.dnd.ch=parseInt(cnt.height(),10);this.data.dnd.active=true;}}});$(function(){var css_string=''+
'#vakata-dragged ins { display:block; text-decoration:none; width:16px; height:16px; margin:0 0 0 0; padding:0; position:absolute; top:4px; left:4px; '+
' -moz-border-radius:4px; border-radius:4px; -webkit-border-radius:4px; '+
'} '+
'#vakata-dragged .jstree-ok { background:green; } '+
'#vakata-dragged .jstree-invalid { background:red; } '+
'#jstree-marker { padding:0; margin:0; font-size:12px; overflow:hidden; height:12px; width:8px; position:absolute; top:-30px; z-index:10001; background-repeat:no-repeat; display:none; background-color:transparent; text-shadow:1px 1px 1px white; color:black; line-height:10px; } '+
'#jstree-marker-line { padding:0; margin:0; line-height:0%; font-size:1px; overflow:hidden; height:1px; width:100px; position:absolute; top:-30px; z-index:10000; background-repeat:no-repeat; display:none; background-color:#456c43; '+
' cursor:pointer; border:1px solid #eeeeee; border-left:0; -moz-box-shadow: 0px 0px 2px #666; -webkit-box-shadow: 0px 0px 2px #666; box-shadow: 0px 0px 2px #666; '+
' -moz-border-radius:1px; border-radius:1px; -webkit-border-radius:1px; '+
'}'+
'';$.vakata.css.add_sheet({str:css_string,title:"jstree"});m=$("<div />").attr({id:"jstree-marker"}).hide().html("&raquo;")
.bind("mouseleave mouseenter",function(e){m.hide();ml.hide();e.preventDefault();e.stopImmediatePropagation();return false;})
.appendTo("body");ml=$("<div />").attr({id:"jstree-marker-line"}).hide()
.bind("mouseup",function(e){if(r&&r.length){r.children("a").trigger(e);e.preventDefault();e.stopImmediatePropagation();return false;}})
.bind("mouseleave",function(e){var rt=$(e.relatedTarget);if(rt.is(".jstree")||rt.closest(".jstree").length===0){if(r&&r.length){r.children("a").trigger(e);m.hide();ml.hide();e.preventDefault();e.stopImmediatePropagation();return false;}}})
.appendTo("body");$(document).bind("drag_start.vakata",function(e,data){if(data.data.jstree){m.show();if(ml){ml.show();}}});$(document).bind("drag_stop.vakata",function(e,data){if(data.data.jstree){m.hide();if(ml){ml.hide();}}});});})(jQuery);(function($){$.jstree.plugin("checkbox",{__init:function(){this.data.checkbox.noui=this._get_settings().checkbox.override_ui;if(this.data.ui&&this.data.checkbox.noui){this.select_node=this.deselect_node=this.deselect_all=$.noop;this.get_selected=this.get_checked;}
this.get_container()
.bind("open_node.jstree create_node.jstree clean_node.jstree refresh.jstree",$.proxy(function(e,data){this._prepare_checkboxes(data.rslt.obj);},this))
.bind("loaded.jstree",$.proxy(function(e){this._prepare_checkboxes();},this))
.delegate((this.data.ui&&this.data.checkbox.noui?"a":"ins.jstree-checkbox"),"click.jstree",$.proxy(function(e){e.preventDefault();if(this._get_node(e.target).hasClass("jstree-checked")){this.uncheck_node(e.target);}
else{this.check_node(e.target);}
if(this.data.ui&&this.data.checkbox.noui){this.save_selected();if(this.data.cookies){this.save_cookie("select_node");}}
else{e.stopImmediatePropagation();return false;}},this));},defaults:{override_ui:false,two_state:false,real_checkboxes:false,checked_parent_open:true,real_checkboxes_names:function(n){return[("check_"+(n[0].id||Math.ceil(Math.random()*10000))),1];}},__destroy:function(){this.get_container()
.find("input.jstree-real-checkbox").removeClass("jstree-real-checkbox").end()
.find("ins.jstree-checkbox").remove();},_fn:{_checkbox_notify:function(n,data){if(data.checked){this.check_node(n,false);}},_prepare_checkboxes:function(obj){obj=!obj||obj==-1?this.get_container().find("> ul > li"):this._get_node(obj);if(obj===false){return;}
var c,_this=this,t,ts=this._get_settings().checkbox.two_state,rc=this._get_settings().checkbox.real_checkboxes,rcn=this._get_settings().checkbox.real_checkboxes_names;obj.each(function(){t=$(this);c=t.is("li")&&(t.hasClass("jstree-checked")||(rc&&t.children(":checked").length))?"jstree-checked":"jstree-unchecked";t.find("li").addBack().each(function(){var $t=$(this),nm;$t.children("a"+(_this.data.languages?"":":eq(0)")).not(":has(.jstree-checkbox)").prepend("<ins class='jstree-checkbox'>&#160;</ins>").parent().not(".jstree-checked, .jstree-unchecked").addClass(ts?"jstree-unchecked":c);if(rc){if(!$t.children(":checkbox").length){nm=rcn.call(_this,$t);$t.prepend("<input type='checkbox' class='jstree-real-checkbox' id='"+nm[0]+"' name='"+nm[0]+"' value='"+nm[1]+"' />");}
else{$t.children(":checkbox").addClass("jstree-real-checkbox");}}
if(!ts){if(c==="jstree-checked"||$t.hasClass("jstree-checked")||$t.children(':checked').length){$t.find("li").addBack().addClass("jstree-checked").children(":checkbox").prop("checked",true);}}
else{if($t.hasClass("jstree-checked")||$t.children(':checked').length){$t.addClass("jstree-checked").children(":checkbox").prop("checked",true);}}});});if(!ts){obj.find(".jstree-checked").parent().parent().each(function(){_this._repair_state(this);});}},change_state:function(obj,state){obj=this._get_node(obj);var coll=false,rc=this._get_settings().checkbox.real_checkboxes;if(!obj||obj===-1){return false;}
state=(state===false||state===true)?state:obj.hasClass("jstree-checked");if(this._get_settings().checkbox.two_state){if(state){obj.removeClass("jstree-checked").addClass("jstree-unchecked");if(rc){obj.children(":checkbox").prop("checked",false);}}
else{obj.removeClass("jstree-unchecked").addClass("jstree-checked");if(rc){obj.children(":checkbox").prop("checked",true);}}}
else{if(state){coll=obj.find("li").addBack();if(!coll.filter(".jstree-checked, .jstree-undetermined").length){return false;}
coll.removeClass("jstree-checked jstree-undetermined").addClass("jstree-unchecked");if(rc){coll.children(":checkbox").prop("checked",false);}}
else{coll=obj.find("li").addBack();if(!coll.filter(".jstree-unchecked, .jstree-undetermined").length){return false;}
coll.removeClass("jstree-unchecked jstree-undetermined").addClass("jstree-checked");if(rc){coll.children(":checkbox").prop("checked",true);}
if(this.data.ui){this.data.ui.last_selected=obj;}
this.data.checkbox.last_selected=obj;}
obj.parentsUntil(".jstree","li").each(function(){var $this=$(this);if(state){if($this.children("ul").children("li.jstree-checked, li.jstree-undetermined").length){$this.parentsUntil(".jstree","li").addBack().removeClass("jstree-checked jstree-unchecked").addClass("jstree-undetermined");if(rc){$this.parentsUntil(".jstree","li").addBack().children(":checkbox").prop("checked",false);}
return false;}
else{$this.removeClass("jstree-checked jstree-undetermined").addClass("jstree-unchecked");if(rc){$this.children(":checkbox").prop("checked",false);}}}
else{if($this.children("ul").children("li.jstree-unchecked, li.jstree-undetermined").length){$this.parentsUntil(".jstree","li").addBack().removeClass("jstree-checked jstree-unchecked").addClass("jstree-undetermined");if(rc){$this.parentsUntil(".jstree","li").addBack().children(":checkbox").prop("checked",false);}
return false;}
else{$this.removeClass("jstree-unchecked jstree-undetermined").addClass("jstree-checked");if(rc){$this.children(":checkbox").prop("checked",true);}}}});}
if(this.data.ui&&this.data.checkbox.noui){this.data.ui.selected=this.get_checked();}
this.__callback(obj);return true;},check_node:function(obj){if(this.change_state(obj,false)){obj=this._get_node(obj);if(this._get_settings().checkbox.checked_parent_open){var t=this;obj.parents(".jstree-closed").each(function(){t.open_node(this,false,true);});}
this.__callback({"obj":obj});}},uncheck_node:function(obj){if(this.change_state(obj,true)){this.__callback({"obj":this._get_node(obj)});}},check_all:function(){var _this=this,coll=this._get_settings().checkbox.two_state?this.get_container_ul().find("li"):this.get_container_ul().children("li");coll.each(function(){_this.change_state(this,false);});this.__callback();},uncheck_all:function(){var _this=this,coll=this._get_settings().checkbox.two_state?this.get_container_ul().find("li"):this.get_container_ul().children("li");coll.each(function(){_this.change_state(this,true);});this.__callback();},is_checked:function(obj){obj=this._get_node(obj);return obj.length?obj.is(".jstree-checked"):false;},get_checked:function(obj,get_all){obj=!obj||obj===-1?this.get_container():this._get_node(obj);return get_all||this._get_settings().checkbox.two_state?obj.find(".jstree-checked"):obj.find("> ul > .jstree-checked, .jstree-undetermined > ul > .jstree-checked");},get_unchecked:function(obj,get_all){obj=!obj||obj===-1?this.get_container():this._get_node(obj);return get_all||this._get_settings().checkbox.two_state?obj.find(".jstree-unchecked"):obj.find("> ul > .jstree-unchecked, .jstree-undetermined > ul > .jstree-unchecked");},show_checkboxes:function(){this.get_container().children("ul").removeClass("jstree-no-checkboxes");},hide_checkboxes:function(){this.get_container().children("ul").addClass("jstree-no-checkboxes");},_repair_state:function(obj){obj=this._get_node(obj);if(!obj.length){return;}
if(this._get_settings().checkbox.two_state){obj.find('li').addBack().not('.jstree-checked').removeClass('jstree-undetermined').addClass('jstree-unchecked').children(':checkbox').prop('checked',true);return;}
var rc=this._get_settings().checkbox.real_checkboxes,a=obj.find("> ul > .jstree-checked").length,b=obj.find("> ul > .jstree-undetermined").length,c=obj.find("> ul > li").length;if(c===0){if(obj.hasClass("jstree-undetermined")){this.change_state(obj,false);}}
else if(a===0&&b===0){this.change_state(obj,true);}
else if(a===c){this.change_state(obj,false);}
else{obj.parentsUntil(".jstree","li").addBack().removeClass("jstree-checked jstree-unchecked").addClass("jstree-undetermined");if(rc){obj.parentsUntil(".jstree","li").addBack().children(":checkbox").prop("checked",false);}}},reselect:function(){if(this.data.ui&&this.data.checkbox.noui){var _this=this,s=this.data.ui.to_select;s=$.map($.makeArray(s),function(n){return"#"+n.toString().replace(/^#/,"").replace(/\\\//g,"/").replace(/\//g,"\\\/").replace(/\\\./g,".").replace(/\./g,"\\.").replace(/\:/g,"\\:");});this.deselect_all();$.each(s,function(i,val){_this.check_node(val);});this.__callback();}
else{this.__call_old();}},save_loaded:function(){var _this=this;this.data.core.to_load=[];this.get_container_ul().find("li.jstree-closed.jstree-undetermined").each(function(){if(this.id){_this.data.core.to_load.push("#"+this.id);}});}}});$(function(){var css_string='.jstree .jstree-real-checkbox { display:none; } ';$.vakata.css.add_sheet({str:css_string,title:"jstree"});});})(jQuery);(function($){$.vakata.xslt=function(xml,xsl,callback){var r=false,p,q,s;if(r===false&&window.ActiveXObject){try{r=new ActiveXObject("Msxml2.XSLTemplate");q=new ActiveXObject("Msxml2.DOMDocument");q.loadXML(xml);s=new ActiveXObject("Msxml2.FreeThreadedDOMDocument");s.loadXML(xsl);r.stylesheet=s;p=r.createProcessor();p.input=q;p.transform();r=p.output;}
catch(e){}}
xml=$.parseXML(xml);xsl=$.parseXML(xsl);if(r===false&&typeof(XSLTProcessor)!=="undefined"){p=new XSLTProcessor();p.importStylesheet(xsl);r=p.transformToFragment(xml,document);r=$('<div />').append(r).html();}
if(r===false&&typeof(xml.transformNode)!=="undefined"){r=xml.transformNode(xsl);}
callback.call(null,r);};var xsl={'nest':'<'+'?xml version="1.0" encoding="utf-8" ?>'+
'<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >'+
'<xsl:output method="html" encoding="utf-8" omit-xml-declaration="yes" standalone="no" indent="no" media-type="text/html" />'+
'<xsl:template match="/">'+
'	<xsl:call-template name="nodes">'+
'		<xsl:with-param name="node" select="/root" />'+
'	</xsl:call-template>'+
'</xsl:template>'+
'<xsl:template name="nodes">'+
'	<xsl:param name="node" />'+
'	<ul>'+
'	<xsl:for-each select="$node/item">'+
'		<xsl:variable name="children" select="count(./item) &gt; 0" />'+
'		<li>'+
'			<xsl:attribute name="class">'+
'				<xsl:if test="position() = last()">jstree-last </xsl:if>'+
'				<xsl:choose>'+
'					<xsl:when test="@state = \'open\'">jstree-open </xsl:when>'+
'					<xsl:when test="$children or @hasChildren or @state = \'closed\'">jstree-closed </xsl:when>'+
'					<xsl:otherwise>jstree-leaf </xsl:otherwise>'+
'				</xsl:choose>'+
'				<xsl:value-of select="@class" />'+
'			</xsl:attribute>'+
'			<xsl:for-each select="@*">'+
'				<xsl:if test="name() != \'class\' and name() != \'state\' and name() != \'hasChildren\'">'+
'					<xsl:attribute name="{name()}"><xsl:value-of select="." /></xsl:attribute>'+
'				</xsl:if>'+
'			</xsl:for-each>'+
'	<ins class="jstree-icon"><xsl:text>&#xa0;</xsl:text></ins>'+
'			<xsl:for-each select="content/name">'+
'				<a>'+
'				<xsl:attribute name="href">'+
'					<xsl:choose>'+
'					<xsl:when test="@href"><xsl:value-of select="@href" /></xsl:when>'+
'					<xsl:otherwise>#</xsl:otherwise>'+
'					</xsl:choose>'+
'				</xsl:attribute>'+
'				<xsl:attribute name="class"><xsl:value-of select="@lang" /> <xsl:value-of select="@class" /></xsl:attribute>'+
'				<xsl:attribute name="style"><xsl:value-of select="@style" /></xsl:attribute>'+
'				<xsl:for-each select="@*">'+
'					<xsl:if test="name() != \'style\' and name() != \'class\' and name() != \'href\'">'+
'						<xsl:attribute name="{name()}"><xsl:value-of select="." /></xsl:attribute>'+
'					</xsl:if>'+
'				</xsl:for-each>'+
'					<ins>'+
'						<xsl:attribute name="class">jstree-icon '+
'							<xsl:if test="string-length(attribute::icon) > 0 and not(contains(@icon,\'/\'))"><xsl:value-of select="@icon" /></xsl:if>'+
'						</xsl:attribute>'+
'						<xsl:if test="string-length(attribute::icon) > 0 and contains(@icon,\'/\')"><xsl:attribute name="style">background:url(<xsl:value-of select="@icon" />) center center no-repeat;</xsl:attribute></xsl:if>'+
'						<xsl:text>&#xa0;</xsl:text>'+
'					</ins>'+
'					<xsl:copy-of select="./child::node()" />'+
'				</a>'+
'			</xsl:for-each>'+
'			<xsl:if test="$children or @hasChildren"><xsl:call-template name="nodes"><xsl:with-param name="node" select="current()" /></xsl:call-template></xsl:if>'+
'		</li>'+
'	</xsl:for-each>'+
'	</ul>'+
'</xsl:template>'+
'</xsl:stylesheet>','flat':'<'+'?xml version="1.0" encoding="utf-8" ?>'+
'<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >'+
'<xsl:output method="html" encoding="utf-8" omit-xml-declaration="yes" standalone="no" indent="no" media-type="text/xml" />'+
'<xsl:template match="/">'+
'	<ul>'+
'	<xsl:for-each select="//item[not(@parent_id) or @parent_id=0 or not(@parent_id = //item/@id)]">'+
'		<xsl:call-template name="nodes">'+
'			<xsl:with-param name="node" select="." />'+
'			<xsl:with-param name="is_last" select="number(position() = last())" />'+
'		</xsl:call-template>'+
'	</xsl:for-each>'+
'	</ul>'+
'</xsl:template>'+
'<xsl:template name="nodes">'+
'	<xsl:param name="node" />'+
'	<xsl:param name="is_last" />'+
'	<xsl:variable name="children" select="count(//item[@parent_id=$node/attribute::id]) &gt; 0" />'+
'	<li>'+
'	<xsl:attribute name="class">'+
'		<xsl:if test="$is_last = true()">jstree-last </xsl:if>'+
'		<xsl:choose>'+
'			<xsl:when test="@state = \'open\'">jstree-open </xsl:when>'+
'			<xsl:when test="$children or @hasChildren or @state = \'closed\'">jstree-closed </xsl:when>'+
'			<xsl:otherwise>jstree-leaf </xsl:otherwise>'+
'		</xsl:choose>'+
'		<xsl:value-of select="@class" />'+
'	</xsl:attribute>'+
'	<xsl:for-each select="@*">'+
'		<xsl:if test="name() != \'parent_id\' and name() != \'hasChildren\' and name() != \'class\' and name() != \'state\'">'+
'		<xsl:attribute name="{name()}"><xsl:value-of select="." /></xsl:attribute>'+
'		</xsl:if>'+
'	</xsl:for-each>'+
'	<ins class="jstree-icon"><xsl:text>&#xa0;</xsl:text></ins>'+
'	<xsl:for-each select="content/name">'+
'		<a>'+
'		<xsl:attribute name="href">'+
'			<xsl:choose>'+
'			<xsl:when test="@href"><xsl:value-of select="@href" /></xsl:when>'+
'			<xsl:otherwise>#</xsl:otherwise>'+
'			</xsl:choose>'+
'		</xsl:attribute>'+
'		<xsl:attribute name="class"><xsl:value-of select="@lang" /> <xsl:value-of select="@class" /></xsl:attribute>'+
'		<xsl:attribute name="style"><xsl:value-of select="@style" /></xsl:attribute>'+
'		<xsl:for-each select="@*">'+
'			<xsl:if test="name() != \'style\' and name() != \'class\' and name() != \'href\'">'+
'				<xsl:attribute name="{name()}"><xsl:value-of select="." /></xsl:attribute>'+
'			</xsl:if>'+
'		</xsl:for-each>'+
'			<ins>'+
'				<xsl:attribute name="class">jstree-icon '+
'					<xsl:if test="string-length(attribute::icon) > 0 and not(contains(@icon,\'/\'))"><xsl:value-of select="@icon" /></xsl:if>'+
'				</xsl:attribute>'+
'				<xsl:if test="string-length(attribute::icon) > 0 and contains(@icon,\'/\')"><xsl:attribute name="style">background:url(<xsl:value-of select="@icon" />) center center no-repeat;</xsl:attribute></xsl:if>'+
'				<xsl:text>&#xa0;</xsl:text>'+
'			</ins>'+
'			<xsl:copy-of select="./child::node()" />'+
'		</a>'+
'	</xsl:for-each>'+
'	<xsl:if test="$children">'+
'		<ul>'+
'		<xsl:for-each select="//item[@parent_id=$node/attribute::id]">'+
'			<xsl:call-template name="nodes">'+
'				<xsl:with-param name="node" select="." />'+
'				<xsl:with-param name="is_last" select="number(position() = last())" />'+
'			</xsl:call-template>'+
'		</xsl:for-each>'+
'		</ul>'+
'	</xsl:if>'+
'	</li>'+
'</xsl:template>'+
'</xsl:stylesheet>'},escape_xml=function(string){return string
.toString()
.replace(/&/g,'&amp;')
.replace(/</g,'&lt;')
.replace(/>/g,'&gt;')
.replace(/"/g,'&quot;')
.replace(/'/g,'&apos;');};$.jstree.plugin("xml_data",{defaults:{data:false,ajax:false,xsl:"flat",clean_node:false,correct_state:true,get_skip_empty:false,get_include_preamble:true},_fn:{load_node:function(obj,s_call,e_call){var _this=this;this.load_node_xml(obj,function(){_this.__callback({"obj":_this._get_node(obj)});s_call.call(this);},e_call);},_is_loaded:function(obj){var s=this._get_settings().xml_data;obj=this._get_node(obj);return obj==-1||!obj||(!s.ajax&&!$.isFunction(s.data))||obj.is(".jstree-open, .jstree-leaf")||obj.children("ul").children("li").size()>0;},load_node_xml:function(obj,s_call,e_call){var s=this.get_settings().xml_data,error_func=function(){},success_func=function(){};obj=this._get_node(obj);if(obj&&obj!==-1){if(obj.data("jstree_is_loading")){return;}
else{obj.data("jstree_is_loading",true);}}
switch(!0){case(!s.data&&!s.ajax):throw"Neither data nor ajax settings supplied.";case($.isFunction(s.data)):s.data.call(this,obj,$.proxy(function(d){this.parse_xml(d,$.proxy(function(d){if(d){d=d.replace(/ ?xmlns="[^"]*"/ig,"");if(d.length>10){d=$(d);if(obj===-1||!obj){this.get_container().children("ul").empty().append(d.children());}
else{obj.children("a.jstree-loading").removeClass("jstree-loading");obj.append(d);obj.removeData("jstree_is_loading");}
if(s.clean_node){this.clean_node(obj);}
if(s_call){s_call.call(this);}}
else{if(obj&&obj!==-1){obj.children("a.jstree-loading").removeClass("jstree-loading");obj.removeData("jstree_is_loading");if(s.correct_state){this.correct_state(obj);if(s_call){s_call.call(this);}}}
else{if(s.correct_state){this.get_container().children("ul").empty();if(s_call){s_call.call(this);}}}}}},this));},this));break;case(!!s.data&&!s.ajax)||(!!s.data&&!!s.ajax&&(!obj||obj===-1)):if(!obj||obj==-1){this.parse_xml(s.data,$.proxy(function(d){if(d){d=d.replace(/ ?xmlns="[^"]*"/ig,"");if(d.length>10){d=$(d);this.get_container().children("ul").empty().append(d.children());if(s.clean_node){this.clean_node(obj);}
if(s_call){s_call.call(this);}}}
else{if(s.correct_state){this.get_container().children("ul").empty();if(s_call){s_call.call(this);}}}},this));}
break;case(!s.data&&!!s.ajax)||(!!s.data&&!!s.ajax&&obj&&obj!==-1):error_func=function(x,t,e){var ef=this.get_settings().xml_data.ajax.error;if(ef){ef.call(this,x,t,e);}
if(obj!==-1&&obj.length){obj.children("a.jstree-loading").removeClass("jstree-loading");obj.removeData("jstree_is_loading");if(t==="success"&&s.correct_state){this.correct_state(obj);}}
else{if(t==="success"&&s.correct_state){this.get_container().children("ul").empty();}}
if(e_call){e_call.call(this);}};success_func=function(d,t,x){d=x.responseText;var sf=this.get_settings().xml_data.ajax.success;if(sf){d=sf.call(this,d,t,x)||d;}
if(d===""||(d&&d.toString&&d.toString().replace(/^[\s\n]+$/,"")==="")){return error_func.call(this,x,t,"");}
this.parse_xml(d,$.proxy(function(d){if(d){d=d.replace(/ ?xmlns="[^"]*"/ig,"");if(d.length>10){d=$(d);if(obj===-1||!obj){this.get_container().children("ul").empty().append(d.children());}
else{obj.children("a.jstree-loading").removeClass("jstree-loading");obj.append(d);obj.removeData("jstree_is_loading");}
if(s.clean_node){this.clean_node(obj);}
if(s_call){s_call.call(this);}}
else{if(obj&&obj!==-1){obj.children("a.jstree-loading").removeClass("jstree-loading");obj.removeData("jstree_is_loading");if(s.correct_state){this.correct_state(obj);if(s_call){s_call.call(this);}}}
else{if(s.correct_state){this.get_container().children("ul").empty();if(s_call){s_call.call(this);}}}}}},this));};s.ajax.context=this;s.ajax.error=error_func;s.ajax.success=success_func;if(!s.ajax.dataType){s.ajax.dataType="xml";}
if($.isFunction(s.ajax.url)){s.ajax.url=s.ajax.url.call(this,obj);}
if($.isFunction(s.ajax.data)){s.ajax.data=s.ajax.data.call(this,obj);}
$.ajax(s.ajax);break;}},parse_xml:function(xml,callback){var s=this._get_settings().xml_data;$.vakata.xslt(xml,xsl[s.xsl],callback);},get_xml:function(tp,obj,li_attr,a_attr,is_callback){var result="",s=this._get_settings(),_this=this,tmp1,tmp2,li,a,lang;if(!tp){tp="flat";}
if(!is_callback){is_callback=0;}
obj=this._get_node(obj);if(!obj||obj===-1){obj=this.get_container().find("> ul > li");}
li_attr=$.isArray(li_attr)?li_attr:["id","class"];if(!is_callback&&this.data.types&&$.inArray(s.types.type_attr,li_attr)===-1){li_attr.push(s.types.type_attr);}
a_attr=$.isArray(a_attr)?a_attr:[];if(!is_callback){if(s.xml_data.get_include_preamble){result+='<'+'?xml version="1.0" encoding="UTF-8"?'+'>';}
result+="<root>";}
obj.each(function(){result+="<item";li=$(this);$.each(li_attr,function(i,v){var t=li.attr(v);if(!s.xml_data.get_skip_empty||typeof t!=="undefined"){result+=" "+v+"=\""+escape_xml((" "+(t||"")).replace(/ jstree[^ ]*/ig,'').replace(/\s+$/ig," ").replace(/^ /,"").replace(/ $/,""))+"\"";}});if(li.hasClass("jstree-open")){result+=" state=\"open\"";}
if(li.hasClass("jstree-closed")){result+=" state=\"closed\"";}
if(tp==="flat"){result+=" parent_id=\""+escape_xml(is_callback)+"\"";}
result+=">";result+="<content>";a=li.children("a");a.each(function(){tmp1=$(this);lang=false;result+="<name";if($.inArray("languages",s.plugins)!==-1){$.each(s.languages,function(k,z){if(tmp1.hasClass(z)){result+=" lang=\""+escape_xml(z)+"\"";lang=z;return false;}});}
if(a_attr.length){$.each(a_attr,function(k,z){var t=tmp1.attr(z);if(!s.xml_data.get_skip_empty||typeof t!=="undefined"){result+=" "+z+"=\""+escape_xml((" "+t||"").replace(/ jstree[^ ]*/ig,'').replace(/\s+$/ig," ").replace(/^ /,"").replace(/ $/,""))+"\"";}});}
if(tmp1.children("ins").get(0).className.replace(/jstree[^ ]*|$/ig,'').replace(/^\s+$/ig,"").length){result+=' icon="'+escape_xml(tmp1.children("ins").get(0).className.replace(/jstree[^ ]*|$/ig,'').replace(/\s+$/ig," ").replace(/^ /,"").replace(/ $/,""))+'"';}
if(tmp1.children("ins").get(0).style.backgroundImage.length){result+=' icon="'+escape_xml(tmp1.children("ins").get(0).style.backgroundImage.replace("url(","").replace(")","").replace(/'/ig,"").replace(/"/ig,""))+'"';}
result+=">";result+="<![CDATA["+_this.get_text(tmp1,lang)+"]]>";result+="</name>";});result+="</content>";tmp2=li[0].id||true;li=li.find("> ul > li");if(li.length){tmp2=_this.get_xml(tp,li,li_attr,a_attr,tmp2);}
else{tmp2="";}
if(tp=="nest"){result+=tmp2;}
result+="</item>";if(tp=="flat"){result+=tmp2;}});if(!is_callback){result+="</root>";}
return result;}}});})(jQuery);(function($){if($().jquery.split('.')[1]>=8){$.expr[':'].jstree_contains=$.expr.createPseudo(function(search){return function(a){return(a.textContent||a.innerText||"").toLowerCase().indexOf(search.toLowerCase())>=0;};});$.expr[':'].jstree_title_contains=$.expr.createPseudo(function(search){return function(a){return(a.getAttribute("title")||"").toLowerCase().indexOf(search.toLowerCase())>=0;};});}
else{$.expr[':'].jstree_contains=function(a,i,m){return(a.textContent||a.innerText||"").toLowerCase().indexOf(m[3].toLowerCase())>=0;};$.expr[':'].jstree_title_contains=function(a,i,m){return(a.getAttribute("title")||"").toLowerCase().indexOf(m[3].toLowerCase())>=0;};}
$.jstree.plugin("search",{__init:function(){this.data.search.str="";this.data.search.result=$();if(this._get_settings().search.show_only_matches){this.get_container()
.bind("search.jstree",function(e,data){$(this).children("ul").find("li").hide().removeClass("jstree-last");data.rslt.nodes.parentsUntil(".jstree").addBack().show()
.filter("ul").each(function(){$(this).children("li:visible").eq(-1).addClass("jstree-last");});})
.bind("clear_search.jstree",function(){$(this).children("ul").find("li").css("display","").end().end().jstree("clean_node",-1);});}},defaults:{ajax:false,search_method:"jstree_contains",show_only_matches:false},_fn:{search:function(str,skip_async){if($.trim(str)===""){this.clear_search();return;}
var s=this.get_settings().search,t=this,error_func=function(){},success_func=function(){};this.data.search.str=str;if(!skip_async&&s.ajax!==false&&this.get_container_ul().find("li.jstree-closed:not(:has(ul)):eq(0)").length>0){this.search.supress_callback=true;error_func=function(){};success_func=function(d,t,x){var sf=this.get_settings().search.ajax.success;if(sf){d=sf.call(this,d,t,x)||d;}
this.data.search.to_open=d;this._search_open();};s.ajax.context=this;s.ajax.error=error_func;s.ajax.success=success_func;if($.isFunction(s.ajax.url)){s.ajax.url=s.ajax.url.call(this,str);}
if($.isFunction(s.ajax.data)){s.ajax.data=s.ajax.data.call(this,str);}
if(!s.ajax.data){s.ajax.data={"search_string":str};}
if(!s.ajax.dataType||/^json/.exec(s.ajax.dataType)){s.ajax.dataType="json";}
$.ajax(s.ajax);return;}
if(this.data.search.result.length){this.clear_search();}
this.data.search.result=this.get_container().find("a"+(this.data.languages?"."+this.get_lang():"")+":"+(s.search_method)+"("+this.data.search.str+")");this.data.search.result.addClass("jstree-search").parent().parents(".jstree-closed").each(function(){t.open_node(this,false,true);});this.__callback({nodes:this.data.search.result,str:str});},clear_search:function(str){this.data.search.result.removeClass("jstree-search");this.__callback(this.data.search.result);this.data.search.result=$();},_search_open:function(is_callback){var _this=this,done=true,current=[],remaining=[];if(this.data.search.to_open.length){$.each(this.data.search.to_open,function(i,val){if(val=="#"){return true;}
if($(val).length&&$(val).is(".jstree-closed")){current.push(val);}
else{remaining.push(val);}});if(current.length){this.data.search.to_open=remaining;$.each(current,function(i,val){_this.open_node(val,function(){_this._search_open(true);});});done=false;}}
if(done){this.search(this.data.search.str,true);}}}});})(jQuery);(function($){$.vakata.context={hide_on_mouseleave:false,cnt:$("<div id='vakata-contextmenu' />"),vis:false,tgt:false,par:false,func:false,data:false,rtl:false,show:function(s,t,x,y,d,p,rtl){$.vakata.context.rtl=!!rtl;var html=$.vakata.context.parse(s),h,w;if(!html){return;}
$.vakata.context.vis=true;$.vakata.context.tgt=t;$.vakata.context.par=p||t||null;$.vakata.context.data=d||null;$.vakata.context.cnt
.html(html)
.css({"visibility":"hidden","display":"block","left":0,"top":0});if($.vakata.context.hide_on_mouseleave){$.vakata.context.cnt
.one("mouseleave",function(e){$.vakata.context.hide();});}
h=$.vakata.context.cnt.height();w=$.vakata.context.cnt.width();if(x+w>$(document).width()){x=$(document).width()-(w+5);$.vakata.context.cnt.find("li > ul").addClass("right");}
if(y+h>$(document).height()){y=y-(h+t[0].offsetHeight);$.vakata.context.cnt.find("li > ul").addClass("bottom");}
$.vakata.context.cnt
.css({"left":x,"top":y})
.find("li:has(ul)")
.bind("mouseenter",function(e){var w=$(document).width(),h=$(document).height(),ul=$(this).children("ul").show();if(w!==$(document).width()){ul.toggleClass("right");}
if(h!==$(document).height()){ul.toggleClass("bottom");}})
.bind("mouseleave",function(e){$(this).children("ul").hide();})
.end()
.css({"visibility":"visible"})
.show();$(document).triggerHandler("context_show.vakata");},hide:function(){$.vakata.context.vis=false;$.vakata.context.cnt.attr("class","").css({"visibility":"hidden"});$(document).triggerHandler("context_hide.vakata");},parse:function(s,is_callback){if(!s){return false;}
var str="",tmp=false,was_sep=true;if(!is_callback){$.vakata.context.func={};}
str+="<ul>";$.each(s,function(i,val){if(!val){return true;}
$.vakata.context.func[i]=val.action;if(!was_sep&&val.separator_before){str+="<li class='vakata-separator vakata-separator-before'></li>";}
was_sep=false;str+="<li class='"+(val._class||"")+(val._disabled?" jstree-contextmenu-disabled ":"")+"'><ins ";if(val.icon&&val.icon.indexOf("/")===-1){str+=" class='"+val.icon+"' ";}
if(val.icon&&val.icon.indexOf("/")!==-1){str+=" style='background:url("+val.icon+") center center no-repeat;' ";}
str+=">&#160;</ins><a href='#' rel='"+i+"'>";if(val.submenu){str+="<span style='float:"+($.vakata.context.rtl?"left":"right")+";'>&raquo;</span>";}
str+=val.label+"</a>";if(val.submenu){tmp=$.vakata.context.parse(val.submenu,true);if(tmp){str+=tmp;}}
str+="</li>";if(val.separator_after){str+="<li class='vakata-separator vakata-separator-after'></li>";was_sep=true;}});str=str.replace(/<li class\='vakata-separator vakata-separator-after'\><\/li\>$/,"");str+="</ul>";$(document).triggerHandler("context_parse.vakata");return str.length>10?str:false;},exec:function(i){if($.isFunction($.vakata.context.func[i])){$.vakata.context.func[i].call($.vakata.context.data,$.vakata.context.par);return true;}
else{return false;}}};$(function(){var css_string=''+
'#vakata-contextmenu { display:block; visibility:hidden; left:0; top:-200px; position:absolute; margin:0; padding:0; min-width:180px; background:#ebebeb; border:1px solid silver; z-index:10000; *width:180px; } '+
'#vakata-contextmenu ul { min-width:180px; *width:180px; } '+
'#vakata-contextmenu ul, #vakata-contextmenu li { margin:0; padding:0; list-style-type:none; display:block; } '+
'#vakata-contextmenu li { line-height:20px; min-height:20px; position:relative; padding:0px; } '+
'#vakata-contextmenu li a { padding:1px 6px; line-height:17px; display:block; text-decoration:none; margin:1px 1px 0 1px; } '+
'#vakata-contextmenu li ins { float:left; width:16px; height:16px; text-decoration:none; margin-right:2px; } '+
'#vakata-contextmenu li a:hover, #vakata-contextmenu li.vakata-hover > a { background:gray; color:white; } '+
'#vakata-contextmenu li ul { display:none; position:absolute; top:-2px; left:100%; background:#ebebeb; border:1px solid gray; } '+
'#vakata-contextmenu .right { right:100%; left:auto; } '+
'#vakata-contextmenu .bottom { bottom:-1px; top:auto; } '+
'#vakata-contextmenu li.vakata-separator { min-height:0; height:1px; line-height:1px; font-size:1px; overflow:hidden; margin:0 2px; background:silver; /* border-top:1px solid #fefefe; */ padding:0; } ';$.vakata.css.add_sheet({str:css_string,title:"vakata"});$.vakata.context.cnt
.delegate("a","click",function(e){e.preventDefault();})
.delegate("a","mouseup",function(e){if(!$(this).parent().hasClass("jstree-contextmenu-disabled")&&$.vakata.context.exec($(this).attr("rel"))){$.vakata.context.hide();}
else{$(this).blur();}})
.delegate("a","mouseover",function(){$.vakata.context.cnt.find(".vakata-hover").removeClass("vakata-hover");})
.appendTo("body");$(document).bind("mousedown",function(e){if($.vakata.context.vis&&!$.contains($.vakata.context.cnt[0],e.target)){$.vakata.context.hide();}});if(typeof $.hotkeys!=="undefined"){$(document)
.bind("keydown","up",function(e){if($.vakata.context.vis){var o=$.vakata.context.cnt.find("ul:visible").last().children(".vakata-hover").removeClass("vakata-hover").prevAll("li:not(.vakata-separator)").first();if(!o.length){o=$.vakata.context.cnt.find("ul:visible").last().children("li:not(.vakata-separator)").last();}
o.addClass("vakata-hover");e.stopImmediatePropagation();e.preventDefault();}})
.bind("keydown","down",function(e){if($.vakata.context.vis){var o=$.vakata.context.cnt.find("ul:visible").last().children(".vakata-hover").removeClass("vakata-hover").nextAll("li:not(.vakata-separator)").first();if(!o.length){o=$.vakata.context.cnt.find("ul:visible").last().children("li:not(.vakata-separator)").first();}
o.addClass("vakata-hover");e.stopImmediatePropagation();e.preventDefault();}})
.bind("keydown","right",function(e){if($.vakata.context.vis){$.vakata.context.cnt.find(".vakata-hover").children("ul").show().children("li:not(.vakata-separator)").removeClass("vakata-hover").first().addClass("vakata-hover");e.stopImmediatePropagation();e.preventDefault();}})
.bind("keydown","left",function(e){if($.vakata.context.vis){$.vakata.context.cnt.find(".vakata-hover").children("ul").hide().children(".vakata-separator").removeClass("vakata-hover");e.stopImmediatePropagation();e.preventDefault();}})
.bind("keydown","esc",function(e){$.vakata.context.hide();e.preventDefault();})
.bind("keydown","space",function(e){$.vakata.context.cnt.find(".vakata-hover").last().children("a").click();e.preventDefault();});}});$.jstree.plugin("contextmenu",{__init:function(){this.get_container()
.delegate("a","contextmenu.jstree",$.proxy(function(e){e.preventDefault();if(!$(e.currentTarget).hasClass("jstree-loading")){this.show_contextmenu(e.currentTarget,e.pageX,e.pageY);}},this))
.delegate("a","click.jstree",$.proxy(function(e){if(this.data.contextmenu){$.vakata.context.hide();}},this))
.bind("destroy.jstree",$.proxy(function(){if(this.data.contextmenu){$.vakata.context.hide();}},this));$(document).bind("context_hide.vakata",$.proxy(function(){this.data.contextmenu=false;},this));},defaults:{select_node:false,show_at_node:true,items:{"create":{"separator_before":false,"separator_after":true,"label":"Create","action":function(obj){this.create(obj);}},"rename":{"separator_before":false,"separator_after":false,"label":"Rename","action":function(obj){this.rename(obj);}},"remove":{"separator_before":false,"icon":false,"separator_after":false,"label":"Delete","action":function(obj){if(this.is_selected(obj)){this.remove();}else{this.remove(obj);}}},"ccp":{"separator_before":true,"icon":false,"separator_after":false,"label":"Edit","action":false,"submenu":{"cut":{"separator_before":false,"separator_after":false,"label":"Cut","action":function(obj){this.cut(obj);}},"copy":{"separator_before":false,"icon":false,"separator_after":false,"label":"Copy","action":function(obj){this.copy(obj);}},"paste":{"separator_before":false,"icon":false,"separator_after":false,"label":"Paste","action":function(obj){this.paste(obj);}}}}}},_fn:{show_contextmenu:function(obj,x,y){obj=this._get_node(obj);var s=this.get_settings().contextmenu,a=obj.children("a:visible:eq(0)"),o=false,i=false;if(s.select_node&&this.data.ui&&!this.is_selected(obj)){this.deselect_all();this.select_node(obj,true);}
if(s.show_at_node||typeof x==="undefined"||typeof y==="undefined"){o=a.offset();x=o.left;y=o.top+this.data.core.li_height;}
i=obj.data("jstree")&&obj.data("jstree").contextmenu?obj.data("jstree").contextmenu:s.items;if($.isFunction(i)){i=i.call(this,obj);}
this.data.contextmenu=true;$.vakata.context.show(i,a,x,y,this,obj,this._get_settings().core.rtl);if(this.data.themes){$.vakata.context.cnt.attr("class","jstree-"+this.data.themes.theme+"-context");}}}});})(jQuery);(function($){$.jstree.plugin("types",{__init:function(){var s=this._get_settings().types;this.data.types.attach_to=[];this.get_container()
.bind("init.jstree",$.proxy(function(){var types=s.types,attr=s.type_attr,icons_css="",_this=this;$.each(types,function(i,tp){$.each(tp,function(k,v){if(!/^(max_depth|max_children|icon|valid_children)$/.test(k)){_this.data.types.attach_to.push(k);}});if(!tp.icon){return true;}
if(tp.icon.image||tp.icon.position){if(i=="default"){icons_css+='.jstree-'+_this.get_index()+' a > .jstree-icon { ';}
else{icons_css+='.jstree-'+_this.get_index()+' li['+attr+'="'+i+'"] > a > .jstree-icon { ';}
if(tp.icon.image){icons_css+=' background-image:url('+tp.icon.image+'); ';}
if(tp.icon.position){icons_css+=' background-position:'+tp.icon.position+'; ';}
else{icons_css+=' background-position:0 0; ';}
icons_css+='} ';}});if(icons_css!==""){$.vakata.css.add_sheet({'str':icons_css,title:"jstree-types"});}},this))
.bind("before.jstree",$.proxy(function(e,data){var s,t,o=this._get_settings().types.use_data?this._get_node(data.args[0]):false,d=o&&o!==-1&&o.length?o.data("jstree"):false;if(d&&d.types&&d.types[data.func]===false){e.stopImmediatePropagation();return false;}
if($.inArray(data.func,this.data.types.attach_to)!==-1){if(!data.args[0]||(!data.args[0].tagName&&!data.args[0].jquery)){return;}
s=this._get_settings().types.types;t=this._get_type(data.args[0]);if(((s[t]&&typeof s[t][data.func]!=="undefined")||(s["default"]&&typeof s["default"][data.func]!=="undefined"))&&this._check(data.func,data.args[0])===false){e.stopImmediatePropagation();return false;}}},this));if(is_ie6){this.get_container()
.bind("load_node.jstree set_type.jstree",$.proxy(function(e,data){var r=data&&data.rslt&&data.rslt.obj&&data.rslt.obj!==-1?this._get_node(data.rslt.obj).parent():this.get_container_ul(),c=false,s=this._get_settings().types;$.each(s.types,function(i,tp){if(tp.icon&&(tp.icon.image||tp.icon.position)){c=i==="default"?r.find("li > a > .jstree-icon"):r.find("li["+s.type_attr+"='"+i+"'] > a > .jstree-icon");if(tp.icon.image){c.css("backgroundImage","url("+tp.icon.image+")");}
c.css("backgroundPosition",tp.icon.position||"0 0");}});},this));}},defaults:{max_children:-1,max_depth:-1,valid_children:"all",use_data:false,type_attr:"rel",types:{"default":{"max_children":-1,"max_depth":-1,"valid_children":"all"
}}},_fn:{_types_notify:function(n,data){if(data.type&&this._get_settings().types.use_data){this.set_type(data.type,n);}},_get_type:function(obj){obj=this._get_node(obj);return(!obj||!obj.length)?false:obj.attr(this._get_settings().types.type_attr)||"default";},set_type:function(str,obj){obj=this._get_node(obj);var ret=(!obj.length||!str)?false:obj.attr(this._get_settings().types.type_attr,str);if(ret){this.__callback({obj:obj,type:str});}
return ret;},_check:function(rule,obj,opts){obj=this._get_node(obj);var v=false,t=this._get_type(obj),d=0,_this=this,s=this._get_settings().types,data=false;if(obj===-1){if(!!s[rule]){v=s[rule];}
else{return;}}
else{if(t===false){return;}
data=s.use_data?obj.data("jstree"):false;if(data&&data.types&&typeof data.types[rule]!=="undefined"){v=data.types[rule];}
else if(!!s.types[t]&&typeof s.types[t][rule]!=="undefined"){v=s.types[t][rule];}
else if(!!s.types["default"]&&typeof s.types["default"][rule]!=="undefined"){v=s.types["default"][rule];}}
if($.isFunction(v)){v=v.call(this,obj);}
if(rule==="max_depth"&&obj!==-1&&opts!==false&&s.max_depth!==-2&&v!==0){obj.children("a:eq(0)").parentsUntil(".jstree","li").each(function(i){if(s.max_depth!==-1&&s.max_depth-(i+1)<=0){v=0;return false;}
d=(i===0)?v:_this._check(rule,this,false);if(d!==-1&&d-(i+1)<=0){v=0;return false;}
if(d>=0&&(d-(i+1)<v||v<0)){v=d-(i+1);}
if(s.max_depth>=0&&(s.max_depth-(i+1)<v||v<0)){v=s.max_depth-(i+1);}});}
return v;},check_move:function(){if(!this.__call_old()){return false;}
var m=this._get_move(),s=m.rt._get_settings().types,mc=m.rt._check("max_children",m.cr),md=m.rt._check("max_depth",m.cr),vc=m.rt._check("valid_children",m.cr),ch=0,d=1,t;if(vc==="none"){return false;}
if($.isArray(vc)&&m.ot&&m.ot._get_type){m.o.each(function(){if($.inArray(m.ot._get_type(this),vc)===-1){d=false;return false;}});if(d===false){return false;}}
if(s.max_children!==-2&&mc!==-1){ch=m.cr===-1?this.get_container().find("> ul > li").not(m.o).length:m.cr.find("> ul > li").not(m.o).length;if(ch+m.o.length>mc){return false;}}
if(s.max_depth!==-2&&md!==-1){d=0;if(md===0){return false;}
if(typeof m.o.d==="undefined"){t=m.o;while(t.length>0){t=t.find("> ul > li");d++;}
m.o.d=d;}
if(md-m.o.d<0){return false;}}
return true;},create_node:function(obj,position,js,callback,is_loaded,skip_check){if(!skip_check&&(is_loaded||this._is_loaded(obj))){var p=(typeof position=="string"&&position.match(/^before|after$/i)&&obj!==-1)?this._get_parent(obj):this._get_node(obj),s=this._get_settings().types,mc=this._check("max_children",p),md=this._check("max_depth",p),vc=this._check("valid_children",p),ch;if(typeof js==="string"){js={data:js};}
if(!js){js={};}
if(vc==="none"){return false;}
if($.isArray(vc)){if(!js.attr||!js.attr[s.type_attr]){if(!js.attr){js.attr={};}
js.attr[s.type_attr]=vc[0];}
else{if($.inArray(js.attr[s.type_attr],vc)===-1){return false;}}}
if(s.max_children!==-2&&mc!==-1){ch=p===-1?this.get_container().find("> ul > li").length:p.find("> ul > li").length;if(ch+1>mc){return false;}}
if(s.max_depth!==-2&&md!==-1&&(md-1)<0){return false;}}
return this.__call_old(true,obj,position,js,callback,is_loaded,skip_check);}}});})(jQuery);(function($){$.jstree.plugin("html_data",{__init:function(){this.data.html_data.original_container_html=this.get_container().find(" > ul > li").clone(true);this.data.html_data.original_container_html.find("li").addBack().contents().filter(function(){return this.nodeType==3;}).remove();},defaults:{data:false,ajax:false,correct_state:true},_fn:{load_node:function(obj,s_call,e_call){var _this=this;this.load_node_html(obj,function(){_this.__callback({"obj":_this._get_node(obj)});s_call.call(this);},e_call);},_is_loaded:function(obj){obj=this._get_node(obj);return obj==-1||!obj||(!this._get_settings().html_data.ajax&&!$.isFunction(this._get_settings().html_data.data))||obj.is(".jstree-open, .jstree-leaf")||obj.children("ul").children("li").size()>0;},load_node_html:function(obj,s_call,e_call){var d,s=this.get_settings().html_data,error_func=function(){},success_func=function(){};obj=this._get_node(obj);if(obj&&obj!==-1){if(obj.data("jstree_is_loading")){return;}
else{obj.data("jstree_is_loading",true);}}
switch(!0){case($.isFunction(s.data)):s.data.call(this,obj,$.proxy(function(d){if(d&&d!==""&&d.toString&&d.toString().replace(/^[\s\n]+$/,"")!==""){d=$(d);if(!d.is("ul")){d=$("<ul />").append(d);}
if(obj==-1||!obj){this.get_container().children("ul").empty().append(d.children()).find("li, a").filter(function(){return!this.firstChild||!this.firstChild.tagName||this.firstChild.tagName!=="INS";}).prepend("<ins class='jstree-icon'>&#160;</ins>").end().filter("a").children("ins:first-child").not(".jstree-icon").addClass("jstree-icon");}
else{obj.children("a.jstree-loading").removeClass("jstree-loading");obj.append(d).children("ul").find("li, a").filter(function(){return!this.firstChild||!this.firstChild.tagName||this.firstChild.tagName!=="INS";}).prepend("<ins class='jstree-icon'>&#160;</ins>").end().filter("a").children("ins:first-child").not(".jstree-icon").addClass("jstree-icon");obj.removeData("jstree_is_loading");}
this.clean_node(obj);if(s_call){s_call.call(this);}}
else{if(obj&&obj!==-1){obj.children("a.jstree-loading").removeClass("jstree-loading");obj.removeData("jstree_is_loading");if(s.correct_state){this.correct_state(obj);if(s_call){s_call.call(this);}}}
else{if(s.correct_state){this.get_container().children("ul").empty();if(s_call){s_call.call(this);}}}}},this));break;case(!s.data&&!s.ajax):if(!obj||obj==-1){this.get_container()
.children("ul").empty()
.append(this.data.html_data.original_container_html)
.find("li, a").filter(function(){return!this.firstChild||!this.firstChild.tagName||this.firstChild.tagName!=="INS";}).prepend("<ins class='jstree-icon'>&#160;</ins>").end()
.filter("a").children("ins:first-child").not(".jstree-icon").addClass("jstree-icon");this.clean_node();}
if(s_call){s_call.call(this);}
break;case(!!s.data&&!s.ajax)||(!!s.data&&!!s.ajax&&(!obj||obj===-1)):if(!obj||obj==-1){d=$(s.data);if(!d.is("ul")){d=$("<ul />").append(d);}
this.get_container()
.children("ul").empty().append(d.children())
.find("li, a").filter(function(){return!this.firstChild||!this.firstChild.tagName||this.firstChild.tagName!=="INS";}).prepend("<ins class='jstree-icon'>&#160;</ins>").end()
.filter("a").children("ins:first-child").not(".jstree-icon").addClass("jstree-icon");this.clean_node();}
if(s_call){s_call.call(this);}
break;case(!s.data&&!!s.ajax)||(!!s.data&&!!s.ajax&&obj&&obj!==-1):obj=this._get_node(obj);error_func=function(x,t,e){var ef=this.get_settings().html_data.ajax.error;if(ef){ef.call(this,x,t,e);}
if(obj!=-1&&obj.length){obj.children("a.jstree-loading").removeClass("jstree-loading");obj.removeData("jstree_is_loading");if(t==="success"&&s.correct_state){this.correct_state(obj);}}
else{if(t==="success"&&s.correct_state){this.get_container().children("ul").empty();}}
if(e_call){e_call.call(this);}};success_func=function(d,t,x){var sf=this.get_settings().html_data.ajax.success;if(sf){d=sf.call(this,d,t,x)||d;}
if(d===""||(d&&d.toString&&d.toString().replace(/^[\s\n]+$/,"")==="")){return error_func.call(this,x,t,"");}
if(d){d=$(d);if(!d.is("ul")){d=$("<ul />").append(d);}
if(obj==-1||!obj){this.get_container().children("ul").empty().append(d.children()).find("li, a").filter(function(){return!this.firstChild||!this.firstChild.tagName||this.firstChild.tagName!=="INS";}).prepend("<ins class='jstree-icon'>&#160;</ins>").end().filter("a").children("ins:first-child").not(".jstree-icon").addClass("jstree-icon");}
else{obj.children("a.jstree-loading").removeClass("jstree-loading");obj.append(d).children("ul").find("li, a").filter(function(){return!this.firstChild||!this.firstChild.tagName||this.firstChild.tagName!=="INS";}).prepend("<ins class='jstree-icon'>&#160;</ins>").end().filter("a").children("ins:first-child").not(".jstree-icon").addClass("jstree-icon");obj.removeData("jstree_is_loading");}
this.clean_node(obj);if(s_call){s_call.call(this);}}
else{if(obj&&obj!==-1){obj.children("a.jstree-loading").removeClass("jstree-loading");obj.removeData("jstree_is_loading");if(s.correct_state){this.correct_state(obj);if(s_call){s_call.call(this);}}}
else{if(s.correct_state){this.get_container().children("ul").empty();if(s_call){s_call.call(this);}}}}};s.ajax.context=this;s.ajax.error=error_func;s.ajax.success=success_func;if(!s.ajax.dataType){s.ajax.dataType="html";}
if($.isFunction(s.ajax.url)){s.ajax.url=s.ajax.url.call(this,obj);}
if($.isFunction(s.ajax.data)){s.ajax.data=s.ajax.data.call(this,obj);}
$.ajax(s.ajax);break;}}}});$.jstree.defaults.plugins.push("html_data");})(jQuery);(function($){$.jstree.plugin("themeroller",{__init:function(){var s=this._get_settings().themeroller;this.get_container()
.addClass("ui-widget-content")
.addClass("jstree-themeroller")
.delegate("a","mouseenter.jstree",function(e){if(!$(e.currentTarget).hasClass("jstree-loading")){$(this).addClass(s.item_h);}})
.delegate("a","mouseleave.jstree",function(){$(this).removeClass(s.item_h);})
.bind("init.jstree",$.proxy(function(e,data){data.inst.get_container().find("> ul > li > .jstree-loading > ins").addClass("ui-icon-refresh");this._themeroller(data.inst.get_container().find("> ul > li"));},this))
.bind("open_node.jstree create_node.jstree",$.proxy(function(e,data){this._themeroller(data.rslt.obj);},this))
.bind("loaded.jstree refresh.jstree",$.proxy(function(e){this._themeroller();},this))
.bind("close_node.jstree",$.proxy(function(e,data){this._themeroller(data.rslt.obj);},this))
.bind("delete_node.jstree",$.proxy(function(e,data){this._themeroller(data.rslt.parent);},this))
.bind("correct_state.jstree",$.proxy(function(e,data){data.rslt.obj
.children("ins.jstree-icon").removeClass(s.opened+" "+s.closed+" ui-icon").end()
.find("> a > ins.ui-icon")
.filter(function(){return this.className.toString()
.replace(s.item_clsd,"").replace(s.item_open,"").replace(s.item_leaf,"")
.indexOf("ui-icon-")===-1;}).removeClass(s.item_open+" "+s.item_clsd).addClass(s.item_leaf||"jstree-no-icon");},this))
.bind("select_node.jstree",$.proxy(function(e,data){data.rslt.obj.children("a").addClass(s.item_a);},this))
.bind("deselect_node.jstree deselect_all.jstree",$.proxy(function(e,data){this.get_container()
.find("a."+s.item_a).removeClass(s.item_a).end()
.find("a.jstree-clicked").addClass(s.item_a);},this))
.bind("dehover_node.jstree",$.proxy(function(e,data){data.rslt.obj.children("a").removeClass(s.item_h);},this))
.bind("hover_node.jstree",$.proxy(function(e,data){this.get_container()
.find("a."+s.item_h).not(data.rslt.obj).removeClass(s.item_h);data.rslt.obj.children("a").addClass(s.item_h);},this))
.bind("move_node.jstree",$.proxy(function(e,data){this._themeroller(data.rslt.o);this._themeroller(data.rslt.op);},this));},__destroy:function(){var s=this._get_settings().themeroller,c=["ui-icon"];$.each(s,function(i,v){v=v.split(" ");if(v.length){c=c.concat(v);}});this.get_container()
.removeClass("ui-widget-content")
.find("."+c.join(", .")).removeClass(c.join(" "));},_fn:{_themeroller:function(obj){var s=this._get_settings().themeroller;obj=(!obj||obj==-1)?this.get_container_ul():this._get_node(obj);obj=(!obj||obj==-1)?this.get_container_ul():obj.parent();obj
.find("li.jstree-closed")
.children("ins.jstree-icon").removeClass(s.opened).addClass("ui-icon "+s.closed).end()
.children("a").addClass(s.item)
.children("ins.jstree-icon").addClass("ui-icon")
.filter(function(){return this.className.toString()
.replace(s.item_clsd,"").replace(s.item_open,"").replace(s.item_leaf,"")
.indexOf("ui-icon-")===-1;}).removeClass(s.item_leaf+" "+s.item_open).addClass(s.item_clsd||"jstree-no-icon")
.end()
.end()
.end()
.end()
.find("li.jstree-open")
.children("ins.jstree-icon").removeClass(s.closed).addClass("ui-icon "+s.opened).end()
.children("a").addClass(s.item)
.children("ins.jstree-icon").addClass("ui-icon")
.filter(function(){return this.className.toString()
.replace(s.item_clsd,"").replace(s.item_open,"").replace(s.item_leaf,"")
.indexOf("ui-icon-")===-1;}).removeClass(s.item_leaf+" "+s.item_clsd).addClass(s.item_open||"jstree-no-icon")
.end()
.end()
.end()
.end()
.find("li.jstree-leaf")
.children("ins.jstree-icon").removeClass(s.closed+" ui-icon "+s.opened).end()
.children("a").addClass(s.item)
.children("ins.jstree-icon").addClass("ui-icon")
.filter(function(){return this.className.toString()
.replace(s.item_clsd,"").replace(s.item_open,"").replace(s.item_leaf,"")
.indexOf("ui-icon-")===-1;}).removeClass(s.item_clsd+" "+s.item_open).addClass(s.item_leaf||"jstree-no-icon");}},defaults:{"opened":"ui-icon-triangle-1-se","closed":"ui-icon-triangle-1-e","item":"ui-state-default","item_h":"ui-state-hover","item_a":"ui-state-active","item_open":"ui-icon-folder-open","item_clsd":"ui-icon-folder-collapsed","item_leaf":"ui-icon-document"}});$(function(){var css_string=''+
'.jstree-themeroller .ui-icon { overflow:visible; } '+
'.jstree-themeroller a { padding:0 2px; } '+
'.jstree-themeroller .jstree-no-icon { display:none; }';$.vakata.css.add_sheet({str:css_string,title:"jstree"});});})(jQuery);(function($){$.jstree.plugin("unique",{__init:function(){this.get_container()
.bind("before.jstree",$.proxy(function(e,data){var nms=[],res=true,p,t;if(data.func=="move_node"){if(data.args[4]===true){if(data.args[0].o&&data.args[0].o.length){data.args[0].o.children("a").each(function(){nms.push($(this).text().replace(/^\s+/g,""));});res=this._check_unique(nms,data.args[0].np.find("> ul > li").not(data.args[0].o),"move_node");}}}
if(data.func=="create_node"){if(data.args[4]||this._is_loaded(data.args[0])){p=this._get_node(data.args[0]);if(data.args[1]&&(data.args[1]==="before"||data.args[1]==="after")){p=this._get_parent(data.args[0]);if(!p||p===-1){p=this.get_container();}}
if(typeof data.args[2]==="string"){nms.push(data.args[2]);}
else if(!data.args[2]||!data.args[2].data){nms.push(this._get_string("new_node"));}
else{nms.push(data.args[2].data);}
res=this._check_unique(nms,p.find("> ul > li"),"create_node");}}
if(data.func=="rename_node"){nms.push(data.args[1]);t=this._get_node(data.args[0]);p=this._get_parent(t);if(!p||p===-1){p=this.get_container();}
res=this._check_unique(nms,p.find("> ul > li").not(t),"rename_node");}
if(!res){e.stopPropagation();return false;}},this));},defaults:{error_callback:$.noop},_fn:{_check_unique:function(nms,p,func){var cnms=[],ok=true;p.children("a").each(function(){cnms.push($(this).text().replace(/^\s+/g,""));});if(!cnms.length||!nms.length){return true;}
$.each(nms,function(i,v){if($.inArray(v,cnms)!==-1){ok=false;return false;}});if(!ok){this._get_settings().unique.error_callback.call(null,nms,p,func);}
return ok;},check_move:function(){if(!this.__call_old()){return false;}
var p=this._get_move(),nms=[];if(p.o&&p.o.length){p.o.children("a").each(function(){nms.push($(this).text().replace(/^\s+/g,""));});return this._check_unique(nms,p.np.find("> ul > li").not(p.o),"check_move");}
return true;}}});})(jQuery);(function($){$.jstree.plugin("wholerow",{__init:function(){if(!this.data.ui){throw"jsTree wholerow: jsTree UI plugin not included.";}
this.data.wholerow.html=false;this.data.wholerow.to=false;this.get_container()
.bind("init.jstree",$.proxy(function(e,data){this._get_settings().core.animation=0;},this))
.bind("open_node.jstree create_node.jstree clean_node.jstree loaded.jstree",$.proxy(function(e,data){this._prepare_wholerow_span(data&&data.rslt&&data.rslt.obj?data.rslt.obj:-1);},this))
.bind("search.jstree clear_search.jstree reopen.jstree after_open.jstree after_close.jstree create_node.jstree delete_node.jstree clean_node.jstree",$.proxy(function(e,data){if(this.data.to){clearTimeout(this.data.to);}
this.data.to=setTimeout((function(t,o){return function(){t._prepare_wholerow_ul(o);};})(this,data&&data.rslt&&data.rslt.obj?data.rslt.obj:-1),0);},this))
.bind("deselect_all.jstree",$.proxy(function(e,data){this.get_container().find(" > .jstree-wholerow .jstree-clicked").removeClass("jstree-clicked "+(this.data.themeroller?this._get_settings().themeroller.item_a:""));},this))
.bind("select_node.jstree deselect_node.jstree ",$.proxy(function(e,data){data.rslt.obj.each(function(){var ref=data.inst.get_container().find(" > .jstree-wholerow li:visible:eq("+(parseInt((($(this).offset().top-data.inst.get_container().offset().top+data.inst.get_container()[0].scrollTop)/data.inst.data.core.li_height),10))+")");ref.children("a").attr("class",data.rslt.obj.children("a").attr("class"));});},this))
.bind("hover_node.jstree dehover_node.jstree",$.proxy(function(e,data){this.get_container().find(" > .jstree-wholerow .jstree-hovered").removeClass("jstree-hovered "+(this.data.themeroller?this._get_settings().themeroller.item_h:""));if(e.type==="hover_node"){var ref=this.get_container().find(" > .jstree-wholerow li:visible:eq("+(parseInt(((data.rslt.obj.offset().top-this.get_container().offset().top+this.get_container()[0].scrollTop)/this.data.core.li_height),10))+")");ref.children("a").attr("class",data.rslt.obj.children(".jstree-hovered").attr("class"));}},this))
.delegate(".jstree-wholerow-span, ins.jstree-icon, li","click.jstree",function(e){var n=$(e.currentTarget);if(e.target.tagName==="A"||(e.target.tagName==="INS"&&n.closest("li").is(".jstree-open, .jstree-closed"))){return;}
n.closest("li").children("a:visible:eq(0)").click();e.stopImmediatePropagation();})
.delegate("li","mouseover.jstree",$.proxy(function(e){e.stopImmediatePropagation();if($(e.currentTarget).children(".jstree-hovered, .jstree-clicked").length){return false;}
this.hover_node(e.currentTarget);return false;},this))
.delegate("li","mouseleave.jstree",$.proxy(function(e){if($(e.currentTarget).children("a").hasClass("jstree-hovered").length){return;}
this.dehover_node(e.currentTarget);},this));if(is_ie7||is_ie6){$.vakata.css.add_sheet({str:".jstree-"+this.get_index()+" { position:relative; } ",title:"jstree"});}},defaults:{},__destroy:function(){this.get_container().children(".jstree-wholerow").remove();this.get_container().find(".jstree-wholerow-span").remove();},_fn:{_prepare_wholerow_span:function(obj){obj=!obj||obj==-1?this.get_container().find("> ul > li"):this._get_node(obj);if(obj===false){return;}
obj.each(function(){$(this).find("li").addBack().each(function(){var $t=$(this);if($t.children(".jstree-wholerow-span").length){return true;}
$t.prepend("<span class='jstree-wholerow-span' style='width:"+($t.parentsUntil(".jstree","li").length*18)+"px;'>&#160;</span>");});});},_prepare_wholerow_ul:function(){var o=this.get_container().children("ul").eq(0),h=o.html();o.addClass("jstree-wholerow-real");if(this.data.wholerow.last_html!==h){this.data.wholerow.last_html=h;this.get_container().children(".jstree-wholerow").remove();this.get_container().append(o.clone().removeClass("jstree-wholerow-real")
.wrapAll("<div class='jstree-wholerow' />").parent()
.width(o.parent()[0].scrollWidth)
.css("top",(o.height()+(is_ie7?5:0))*-1)
.find("li[id]").each(function(){this.removeAttribute("id");}).end());}}}});$(function(){var css_string=''+
'.jstree .jstree-wholerow-real { position:relative; z-index:1; } '+
'.jstree .jstree-wholerow-real li { cursor:pointer; } '+
'.jstree .jstree-wholerow-real a { border-left-color:transparent !important; border-right-color:transparent !important; } '+
'.jstree .jstree-wholerow { position:relative; z-index:0; height:0; } '+
'.jstree .jstree-wholerow ul, .jstree .jstree-wholerow li { width:100%; } '+
'.jstree .jstree-wholerow, .jstree .jstree-wholerow ul, .jstree .jstree-wholerow li, .jstree .jstree-wholerow a { margin:0 !important; padding:0 !important; } '+
'.jstree .jstree-wholerow, .jstree .jstree-wholerow ul, .jstree .jstree-wholerow li { background:transparent !important; }'+
'.jstree .jstree-wholerow ins, .jstree .jstree-wholerow span, .jstree .jstree-wholerow input { display:none !important; }'+
'.jstree .jstree-wholerow a, .jstree .jstree-wholerow a:hover { text-indent:-9999px; !important; width:100%; padding:0 !important; border-right-width:0px !important; border-left-width:0px !important; } '+
'.jstree .jstree-wholerow-span { position:absolute; left:0; margin:0px; padding:0; height:18px; border-width:0; padding:0; z-index:0; }';if(is_ff2){css_string+=''+
'.jstree .jstree-wholerow a { display:block; height:18px; margin:0; padding:0; border:0; } '+
'.jstree .jstree-wholerow-real a { border-color:transparent !important; } ';}
if(is_ie7||is_ie6){css_string+=''+
'.jstree .jstree-wholerow, .jstree .jstree-wholerow li, .jstree .jstree-wholerow ul, .jstree .jstree-wholerow a { margin:0; padding:0; line-height:18px; } '+
'.jstree .jstree-wholerow a { display:block; height:18px; line-height:18px; overflow:hidden; } ';}
$.vakata.css.add_sheet({str:css_string,title:"jstree"});});})(jQuery);(function($){var nodeInterface=["getChildren","getChildrenCount","getAttr","getName","getProps"],validateInterface=function(obj,inter){var valid=true;obj=obj||{};inter=[].concat(inter);$.each(inter,function(i,v){if(!$.isFunction(obj[v])){valid=false;return false;}});return valid;};$.jstree.plugin("model",{__init:function(){if(!this.data.json_data){throw"jsTree model: jsTree json_data plugin not included.";}
this._get_settings().json_data.data=function(n,b){var obj=(n==-1)?this._get_settings().model.object:n.data("jstree_model");if(!validateInterface(obj,nodeInterface)){return b.call(null,false);}
if(this._get_settings().model.async){obj.getChildren($.proxy(function(data){this.model_done(data,b);},this));}
else{this.model_done(obj.getChildren(),b);}};},defaults:{object:false,id_prefix:false,async:false},_fn:{model_done:function(data,callback){var ret=[],s=this._get_settings(),_this=this;if(!$.isArray(data)){data=[data];}
$.each(data,function(i,nd){var r=nd.getProps()||{};r.attr=nd.getAttr()||{};if(nd.getChildrenCount()){r.state="closed";}
r.data=nd.getName();if(!$.isArray(r.data)){r.data=[r.data];}
if(_this.data.types&&$.isFunction(nd.getType)){r.attr[s.types.type_attr]=nd.getType();}
if(r.attr.id&&s.model.id_prefix){r.attr.id=s.model.id_prefix+r.attr.id;}
if(!r.metadata){r.metadata={};}
r.metadata.jstree_model=nd;ret.push(r);});callback.call(null,ret);}}});})(jQuery);})();
// end jquery.jstree.js
// begin jquery.hotkeys.js
(function(jQuery){jQuery.hotkeys={version:"0.8",specialKeys:{8:"backspace",9:"tab",10:"return",13:"return",16:"shift",17:"ctrl",18:"alt",19:"pause",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"insert",46:"del",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9",106:"*",107:"+",109:"-",110:".",111:"/",112:"f1",113:"f2",114:"f3",115:"f4",116:"f5",117:"f6",118:"f7",119:"f8",120:"f9",121:"f10",122:"f11",123:"f12",144:"numlock",145:"scroll",186:";",191:"/",220:"\\",222:"'",224:"meta"},shiftNums:{"`":"~","1":"!","2":"@","3":"#","4":"$","5":"%","6":"^","7":"&","8":"*","9":"(","0":")","-":"_","=":"+",";":": ","'":"\"",",":"<",".":">","/":"?","\\":"|"}};function keyHandler(handleObj){if(typeof handleObj.data==="string"){handleObj.data={keys:handleObj.data};}
if(!handleObj.data||!handleObj.data.keys||typeof handleObj.data.keys!=="string"){return;}
var origHandler=handleObj.handler,keys=handleObj.data.keys.toLowerCase().split(" "),textAcceptingInputTypes=["text","password","number","email","url","range","date","month","week","time","datetime","datetime-local","search","color","tel"];handleObj.handler=function(event){if(this!==event.target&&(/textarea|select/i.test(event.target.nodeName)||jQuery.inArray(event.target.type,textAcceptingInputTypes)>-1)){return;}
var special=jQuery.hotkeys.specialKeys[event.keyCode],character=event.type==="keypress"&&String.fromCharCode(event.which).toLowerCase(),modif="",possible={};if(event.altKey&&special!=="alt"){modif+="alt+";}
if(event.ctrlKey&&special!=="ctrl"){modif+="ctrl+";}
if(event.metaKey&&!event.ctrlKey&&special!=="meta"){modif+="meta+";}
if(event.shiftKey&&special!=="shift"){modif+="shift+";}
if(special){possible[modif+special]=true;}
if(character){possible[modif+character]=true;possible[modif+jQuery.hotkeys.shiftNums[character]]=true;if(modif==="shift+"){possible[jQuery.hotkeys.shiftNums[character]]=true;}}
for(var i=0,l=keys.length;i<l;i++){if(possible[keys[i]]){return origHandler.apply(this,arguments);}}};}
jQuery.each(["keydown","keyup","keypress"],function(){jQuery.event.special[this]={add:keyHandler};});})(this.jQuery);
// end jquery.hotkeys.js
// begin Core.Debug.js
"use strict";var Core=Core||{};Core.Debug=(function(TargetNS){var DebugConsole,DebugLog;if(typeof console==='object'&&typeof console.log==='function'){DebugConsole=console;DebugLog=console.log;}
else if(typeof opera==='object'&&typeof opera.PostError==='function'){DebugConsole=opera;DebugLog=opera.PostError;}
TargetNS.Log=DebugConsole?function(){DebugLog.apply(DebugConsole,arguments);}:function(){};TargetNS.CheckDependency=function(TargetNamespace,Required,RequiredLabel,Silent){var RequiredEval,ErrorMessage;try{RequiredEval=eval('try{ typeof '+Required+'} catch (E) {}');}
catch(Exception){}
if(RequiredEval==='function'||RequiredEval==='object'){return true;}
if(!Silent){ErrorMessage='Namespace '+TargetNamespace+' could not be initialized, because '+
RequiredLabel+' could not be found.';alert(ErrorMessage);throw ErrorMessage;}
return false;};TargetNS.BrowserCheckAgent=function(){var AppropriateBrowser=true,BrowserBlackList=Core.Config.Get('BrowserBlackList::Agent');if(typeof BrowserBlackList!=='undefined'){$.each(BrowserBlackList,function(Key,Value){if($.isFunction(Value)){if(Value()){AppropriateBrowser=false;}}});return AppropriateBrowser;}};TargetNS.BrowserCheckCustomer=function(){var AppropriateBrowser=true,BrowserBlackList=Core.Config.Get('BrowserBlackList::Customer');if(typeof BrowserBlackList!=='undefined'){$.each(BrowserBlackList,function(Key,Value){if($.isFunction(Value)){if(Value()){AppropriateBrowser=false;}}});return AppropriateBrowser;}};TargetNS.SimulateRTLPage=function(){$('body').addClass('RTL');var ExcludeTags={'html':1,'head':1,'style':1,'title':1,'link':1,'meta':1,'script':1,'object':1,'iframe':1},Replacement='رسال الإجابة (البريد الإلكتروني';function ReplaceAllText(Node){var ChildNodes=(Node||document.body).childNodes,CurrentNode,InputType,InputValue,ReplacementValue,CurrentText,I=0;while(I<ChildNodes.length){CurrentNode=ChildNodes[I++];if(CurrentNode.nodeType===1&&!ExcludeTags[CurrentNode.nodeName])
{ReplaceAllText(CurrentNode);if(CurrentNode.nodeName==='INPUT'){InputType=CurrentNode.getAttribute('type');if(InputType==='button'||InputType==='submit'||InputType==='reset'||InputType==='text'){InputValue=CurrentNode.getAttribute('value');if(InputValue&&InputValue.length){ReplacementValue=Replacement.substr(0,InputValue.length);CurrentNode.setAttribute('value',ReplacementValue);}}}}
if(CurrentNode.nodeType!==3){continue;}
CurrentText=CurrentNode.nodeValue;if(!CurrentText){continue;}
CurrentText=CurrentText.replace(/\s+/g,'');if(!CurrentText.length){continue;}
CurrentNode.nodeValue=Replacement.substr(0,CurrentText.length);}}
return ReplaceAllText();};return TargetNS;}(Core.Debug||{}));
// end Core.Debug.js
// begin Core.Data.js
"use strict";var Core=Core||{};Core.Data=(function(TargetNS){TargetNS.Set=function($Element,Name,Object){if(isJQueryObject($Element)){$Element.data(Name,Object);}};TargetNS.Get=function($Element,Name){var Object;if(isJQueryObject($Element)){Object=$Element.data(Name);if(typeof Object==='undefined'||Object===null){return{};}
else{return Object;}}
return{};};TargetNS.CompareObject=function(ObjectOne,ObjectTwo){var Key;if(!ObjectOne||!ObjectTwo){return false;}
if(typeof(ObjectOne)!=='object'||typeof(ObjectTwo)!=='object'){return false;}
if(ObjectOne.constructor!==ObjectTwo.constructor){return false;}
for(Key in ObjectOne){if((typeof(ObjectOne[Key])==='object')&&(typeof(ObjectTwo[Key])==='object')){if(!Core.Data.CompareObject(ObjectOne[Key],ObjectTwo[Key])){return false;}}
else{if(ObjectOne[Key]!==ObjectTwo[Key]){return false;}}}
for(Key in ObjectTwo){if((typeof(ObjectTwo[Key])==='object')&&(typeof(ObjectOne[Key])==='object')){if(!Core.Data.CompareObject(ObjectTwo[Key],ObjectOne[Key])){return false;}}
else{if(ObjectTwo[Key]!==ObjectOne[Key]){return false;}}}
return true;};TargetNS.CopyObject=function(Data){var Key='',TempObject;if(!Data||typeof(Data)!=='object'){return Data;}
TempObject=new Data.constructor();for(Key in Data){if(Data.hasOwnProperty(Key)){TempObject[Key]=Core.Data.CopyObject(Data[Key]);}}
return TempObject;};return TargetNS;}(Core.Data||{}));
// end Core.Data.js
// begin Core.Exception.js
"use strict";var Core=Core||{};Core.Exception=(function(TargetNS){TargetNS.Init=function(){$(window).bind('beforeunload.Exception',function(){TargetNS.AboutToLeave=true;});};TargetNS.ApplicationError=function(ErrorMessage,ErrorType){var Type=ErrorType,Message=ErrorMessage,Types=['Error','InternalError','TypeError','CommunicationError'],DefaultType='Error';if(!$.inArray(Type,Types)){Type=DefaultType;}
this.GetType=function(){return Type;};this.GetMessage=function(){return Message;};};TargetNS.Throw=function(ErrorMessage,ErrorType){throw new TargetNS.ApplicationError(ErrorMessage,ErrorType);};TargetNS.IsErrorOfType=function(ErrorObject,ErrorType){return(ErrorObject instanceof TargetNS.ApplicationError&&ErrorObject.GetType===ErrorType);};TargetNS.HandleFinalError=function(ErrorObject,Trace){var UserErrorMessage='An error occurred! Do you want to see the complete error message?';if(ErrorObject instanceof TargetNS.ApplicationError){if(TargetNS.AboutToLeave&&ErrorObject.GetType()==='CommunicationError'){return false;}
TargetNS.ShowError(ErrorObject.GetMessage(),ErrorObject.GetType(),Trace);if(window.confirm(UserErrorMessage)){alert(ErrorObject.GetMessage()+(Trace?('\n\n'+Trace):''));}
return true;}
else if(ErrorObject instanceof Error){TargetNS.ShowError(ErrorObject.message,'JavaScriptError',Trace);if(window.confirm(UserErrorMessage)){alert(ErrorObject.message+(Trace?('\n\n'+Trace):''));}
throw ErrorObject;}
else{TargetNS.ShowError(ErrorObject,'UndefinedError',Trace);if(window.confirm(UserErrorMessage)){alert(ErrorObject+(Trace?('\n\n'+Trace):''));}
throw ErrorObject;}};TargetNS.ShowError=function(ErrorMessage,ErrorType,Trace){Core.Debug.Log('[ERROR] '+ErrorType+': '+ErrorMessage);if(typeof Trace!=='undefined'){Core.Debug.Log('[STACKTRACE] '+Trace);}};return TargetNS;}(Core.Exception||{}));
// end Core.Exception.js
// begin Core.JSON.js
"use strict";var Core=Core||{};Core.JSON=(function(TargetNS){if(!Core.Debug.CheckDependency('Core.JSON','JSON.parse','JSON parser',true)){return;}
TargetNS.Parse=function(JSONString){var JSONObject;try{JSONObject=JSON.parse(JSONString);}
catch(e){JSONObject={};}
return JSONObject;};TargetNS.Stringify=function(JSONObject){var JSONString;try{JSONString=JSON.stringify(JSONObject);}
catch(e){JSONString="";}
return JSONString;};return TargetNS;}(Core.JSON||{}));
// end Core.JSON.js
// begin Core.JavaScriptEnhancements.js
"use strict";(function(){window.isJQueryObject=function(){var I;if(typeof jQuery==='undefined'){return false;}
for(I=0;I<arguments.length;I++){if(!(arguments[I]instanceof jQuery)){return false;}}
return true;};}());
// end Core.JavaScriptEnhancements.js
// begin Core.Config.js
"use strict";var Core=Core||{};Core.Config=(function(TargetNS){var Config={},ConfigPrefix='Config';if(!Core.Debug.CheckDependency('Core.Config','Core.Data','Core.Data')){return;}
TargetNS.Set=function(Key,Value){var Keys=Key.split('.'),KeyToken,ConfigLevel=Config,Count=0;for(KeyToken in Keys){if(Keys.hasOwnProperty(KeyToken)){if(Keys.length===Count+1){ConfigLevel[ConfigPrefix+Keys[KeyToken]]=Value;}
else if(typeof ConfigLevel[ConfigPrefix+Keys[KeyToken]]==='undefined'){ConfigLevel[ConfigPrefix+Keys[KeyToken]]={};ConfigLevel=ConfigLevel[ConfigPrefix+Keys[KeyToken]];}
else{ConfigLevel=ConfigLevel[ConfigPrefix+Keys[KeyToken]];}
Count++;}}};TargetNS.Get=function(Key,DefaultValue){var Keys=Key.split('.'),KeyToken,ConfigLevel=Config,Count=0;for(KeyToken in Keys){if(Keys.hasOwnProperty(KeyToken)){if(typeof ConfigLevel!=='object'){return DefaultValue;}
if(Keys.length===Count+1){return ConfigLevel[ConfigPrefix+Keys[KeyToken]]||DefaultValue;}
else{ConfigLevel=ConfigLevel[ConfigPrefix+Keys[KeyToken]];}
Count++;}}};TargetNS.AddConfig=function(Data,Key){var ConfigOptions,Keys,KeyToken,ConfigLevel=Config,Count=0;ConfigOptions=Core.Data.CopyObject(Data);if(typeof Key==='undefined'){$.each(Data,function(Key,Value){ConfigLevel[ConfigPrefix+Key]=Value;});}
else{Keys=Key.split('.');for(KeyToken in Keys){if(Keys.length===Count+1){ConfigLevel[ConfigPrefix+Keys[KeyToken]]=ConfigOptions;}
else{if(typeof ConfigLevel[ConfigPrefix+Keys[KeyToken]]==='undefined'){ConfigLevel=ConfigLevel[ConfigPrefix+Keys[KeyToken]];}
else{ConfigLevel=ConfigLevel[ConfigPrefix+Keys[KeyToken]];}
Count++;}}}};TargetNS.AddConfig({'Microsoft Internet Explorer 5.5':function(){return($.browser.msie&&$.browser.version==='5.5');},'Microsoft Internet Explorer 6':function(){return($.browser.msie&&$.browser.version==='6.0');},'Microsoft Internet Explorer 7':function(){var detected=($.browser.msie&&$.browser.version==='7.0');if(detected&&navigator&&navigator.userAgent&&navigator.userAgent.match(/Trident\/4.0/)){alert('Please turn off Compatibility Mode in Internet Explorer.');}
if(detected&&navigator&&navigator.userAgent&&navigator.userAgent.match(/Trident\/5.0/)){alert('Please turn off Compatibility Mode in Internet Explorer.');}
if(detected&&navigator&&navigator.userAgent&&navigator.userAgent.match(/Trident\/6.0/)){alert('Please turn off Compatibility Mode in Internet Explorer.');}
return detected;},'Konqueror (without WebKit engine)':function(){return($.browser.webkit&&navigator.vendor==='KDE');},'Netscape, old Mozilla, old Firefox':function(){var BrowserVersion,BrowserDetected=false;if($.browser.mozilla){BrowserVersion=$.browser.version.split('.');if(parseInt(BrowserVersion[0],10)<10){BrowserDetected=true;}}
return BrowserDetected;}},'BrowserBlackList::Agent');TargetNS.AddConfig({'Microsoft Internet Explorer 5.5':function(){return($.browser.msie&&$.browser.version==='5.5');},'Microsoft Internet Explorer 6':function(){return($.browser.msie&&$.browser.version==='6.0');},'Microsoft Internet Explorer 7':function(){var detected=($.browser.msie&&$.browser.version==='7.0');if(detected&&navigator&&navigator.userAgent&&navigator.userAgent.match(/Trident\/4.0/)){alert('Please turn off Compatibility Mode in Internet Explorer.');}
if(detected&&navigator&&navigator.userAgent&&navigator.userAgent.match(/Trident\/5.0/)){alert('Please turn off Compatibility Mode in Internet Explorer.');}
if(detected&&navigator&&navigator.userAgent&&navigator.userAgent.match(/Trident\/6.0/)){alert('Please turn off Compatibility Mode in Internet Explorer.');}
return detected;},'Konqueror (without WebKit engine)':function(){return($.browser.webkit&&navigator.vendor==='KDE');},'Netscape, old Mozilla, old Firefox':function(){var BrowserVersion,BrowserDetected=false;if($.browser.mozilla){BrowserVersion=$.browser.version.split('.');if(parseInt(BrowserVersion[0],10)<10){BrowserDetected=true;}}
return BrowserDetected;}},'BrowserBlackList::Customer');return TargetNS;}(Core.Config||{}));
// end Core.Config.js
// begin Core.AJAX.js
"use strict";var Core=Core||{};Core.AJAX=(function(TargetNS){var AJAXLoaderPrefix='AJAXLoader',ActiveAJAXCalls={};function ToggleAJAXLoader(FieldID,Show){var $Element=$('#'+FieldID),$Loader=$('#'+AJAXLoaderPrefix+FieldID),LoaderHTML='<span id="'+AJAXLoaderPrefix+FieldID+'" class="AJAXLoader"></span>';if($Element.is('[type=hidden]')){return;}
if(!$Element.length){ActiveAJAXCalls[FieldID]=0;return;}
if(typeof ActiveAJAXCalls[FieldID]==='undefined'){ActiveAJAXCalls[FieldID]=0;}
if(Show){ActiveAJAXCalls[FieldID]++;}
else{ActiveAJAXCalls[FieldID]--;if(ActiveAJAXCalls[FieldID]<=0){ActiveAJAXCalls[FieldID]=0;}}
if(ActiveAJAXCalls[FieldID]>0){if(!$Loader.length){$Element.after(LoaderHTML);}
else{$Loader.show();}}
else{$Loader.hide();}}
function SerializeData(Data){var QueryString='';$.each(Data,function(Key,Value){QueryString+=';'+encodeURIComponent(Key)+'='+encodeURIComponent(Value);});return QueryString;}
function GetSessionInformation(){var Data={};if(!Core.Config.Get('SessionIDCookie')){Data[Core.Config.Get('SessionName')]=Core.Config.Get('SessionID');Data[Core.Config.Get('CustomerPanelSessionName')]=Core.Config.Get('SessionID');}
Data.ChallengeToken=Core.Config.Get('ChallengeToken');return Data;}
function GetAdditionalDefaultData(){var Data={};Data=GetSessionInformation();Data.Action=Core.Config.Get('Action');return Data;}
function UpdateTicketAttachments(Value){var DeleteText=Core.Config.Get('Localization.Delete'),FileID,ButtonStrg,InputStrg;$('#FileUpload').parent().siblings('li').remove();$(Value).each(function(index){FileID=this.FileID;ButtonStrg='<button type="button" id="AttachmentDeleteButton'+FileID+'" name="AttachmentDeleteButton'+FileID+'" value="Delete" class="SpacingLeft">'+DeleteText+'</button>';InputStrg='<input type="hidden" id="AttachmentDelete'+this.FileID+'" name="AttachmentDelete'+this.FileID+'" />';$('#FileUpload').parent().before('<li>'+this.Filename+' ('+this.Filesize+')'+ButtonStrg+InputStrg+'</li>');$('#AttachmentDeleteButton'+FileID).bind('click',function(){var $Form=$(this).closest('form');$('#AttachmentDelete'+FileID).val(1);Core.Form.Validate.DisableValidation($Form);$Form.trigger('submit');});});}
function UpdateTextarea($Element,Value){if($Element.length){var $ParentBody=$Element,ParentBody=$ParentBody[0],ParentBodyValue=$ParentBody.val(),Range,StartRange=0,EndRange=0,NewPosition=0,NewHTML;if(parent.CKEDITOR&&parent.CKEDITOR.instances.RichText){parent.CKEDITOR.instances.RichText.focus();window.setTimeout(function(){try{parent.CKEDITOR.instances.RichText.setData(Value);}
catch(Error){$.noop();}},100);return;}
else{if($Element.parent().data('Cursor')){StartRange=parent.$Element.data('Cursor').StartRange;EndRange=parent.$Element.data('Cursor').EndRange;}
$ParentBody.val(Value);NewPosition=StartRange+Value.length;if(ParentBody.selectionStart){ParentBody.selectionStart=NewPosition;ParentBody.selectionEnd=NewPosition;}
else if(document.selection){Range=document.selection.createRange().duplicate();Range.moveStart('character',NewPosition);Range.select();}
return;}}
else{alert('$JSText{"This window must be called from compose window"}');return;}}
function UpdateFormElements(Data){if(typeof Data!=='object'){return;}
$.each(Data,function(Key,Value){var $Element=$('#'+Key);if(Key==='TicketAttachments'){UpdateTicketAttachments(Value);return;}
if((!$Element.length||!Value)&&!$Element.is('textarea')){return;}
if($Element.is('select')){$Element.empty();$.each(Value,function(Index,Value){var NewOption=new Option(Value[1],Value[0],Value[2],Value[3]);if(Value[4]){NewOption.disabled=true;}
NewOption.innerHTML=Value[1];$Element.append(NewOption);});return;}
if($Element.is('textarea')){UpdateTextarea($Element,Value);return;}
$Element.val(Value);});}
function RedirectAfterSessionTimeOut(XHRObject){var Headers=XHRObject.getAllResponseHeaders(),OldUrl=location.href,NewUrl=Core.Config.Get('Baselink')+"RequestedURL="+encodeURIComponent(OldUrl);if(Headers.match(/X-OTRS-Login: /)){location.href=NewUrl;return true;}
return false;}
TargetNS.SerializeForm=function($Element,Ignore){var QueryString="";if(typeof Ignore==='undefined'){Ignore={};}
if(isJQueryObject($Element)&&$Element.length){$Element.closest('form').find('input:not(:file), textarea, select').filter(':not([disabled=disabled])').each(function(){var Name=$(this).attr('name')||'';if(!Name.length||typeof Ignore[Name]!=='undefined'){return;}
if($(this).is(':checkbox, :radio')){if($(this).is(':checked')){QueryString+=encodeURIComponent(Name)+'='+encodeURIComponent($(this).val()||'on')+";";}}
else if($(this).is('select')){$.each($(this).find('option:selected'),function(){QueryString+=encodeURIComponent(Name)+'='+encodeURIComponent($(this).val()||'')+";";});}
else{QueryString+=encodeURIComponent(Name)+'='+encodeURIComponent($(this).val()||'')+";";}});}
return QueryString;};TargetNS.FormUpdate=function($EventElement,Subaction,ChangedElement,FieldsToUpdate,SuccessCallback){var URL=Core.Config.Get('Baselink'),Data=GetAdditionalDefaultData(),QueryString;Data.Subaction=Subaction;Data.ElementChanged=ChangedElement;QueryString=TargetNS.SerializeForm($EventElement,Data)+SerializeData(Data);if(FieldsToUpdate){$.each(FieldsToUpdate,function(Index,Value){ToggleAJAXLoader(Value,true);});}
return $.ajax({type:'POST',url:URL,data:QueryString,dataType:'json',success:function(Response,Status,XHRObject){if(RedirectAfterSessionTimeOut(XHRObject)){return false;}
if(!Response){Core.Exception.HandleFinalError(new Core.Exception.ApplicationError("Invalid JSON from: "+URL,'CommunicationError'));}
else{UpdateFormElements(Response,FieldsToUpdate);if(typeof SuccessCallback==='function'){SuccessCallback();}
Core.App.Publish('Event.AJAX.FormUpdate.Callback',[Response]);}},complete:function(){if(FieldsToUpdate){$.each(FieldsToUpdate,function(Index,Value){ToggleAJAXLoader(Value,false);});}},error:function(XHRObject,Status,Error){if(RedirectAfterSessionTimeOut(XHRObject)){return false;}
if(Status!=='abort'){Core.Exception.HandleFinalError(new Core.Exception.ApplicationError("Error during AJAX communication. Status: "+Status+", Error: "+Error,'CommunicationError'));}}});};TargetNS.ContentUpdate=function($ElementToUpdate,URL,Callback){var QueryString,QueryIndex=URL.indexOf("?"),GlobalResponse;if(QueryIndex>=0){QueryString=URL.substr(QueryIndex+1);URL=URL.substr(0,QueryIndex);}
QueryString+=SerializeData(GetSessionInformation());return $.ajax({type:'POST',url:URL,data:QueryString,dataType:'html',success:function(Response,Status,XHRObject){if(RedirectAfterSessionTimeOut(XHRObject)){return false;}
if(!Response){Core.Exception.HandleFinalError(new Core.Exception.ApplicationError("No content from: "+URL,'CommunicationError'));}
else if($ElementToUpdate&&isJQueryObject($ElementToUpdate)&&$ElementToUpdate.length){GlobalResponse=Response;$ElementToUpdate.html(Response);}
else{Core.Exception.HandleFinalError(new Core.Exception.ApplicationError("No such element id: "+$ElementToUpdate.attr('id')+" in page!",'CommunicationError'));}},complete:function(){if($.isFunction(Callback)){Callback();}
Core.App.Publish('Event.AJAX.ContentUpdate.Callback',[GlobalResponse]);},error:function(XHRObject,Status,Error){if(RedirectAfterSessionTimeOut(XHRObject)){return false;}
if(Status!=='abort'){Core.Exception.HandleFinalError(new Core.Exception.ApplicationError("Error during AJAX communication. Status: "+Status+", Error: "+Error,'CommunicationError'));}}});};TargetNS.FunctionCall=function(URL,Data,Callback,DataType){if(typeof Data==='string'){Data+=SerializeData(GetSessionInformation());}else{Data=$.extend(Data,GetSessionInformation());}
return $.ajax({type:'POST',url:URL,data:Data,dataType:(typeof DataType==='undefined')?'json':DataType,success:function(Response,Status,XHRObject){if(RedirectAfterSessionTimeOut(XHRObject)){return false;}
if($.isFunction(Callback)){Callback(Response);Core.App.Publish('Event.AJAX.FunctionCall.Callback',[Response]);}
else{Core.Exception.HandleFinalError(new Core.Exception.ApplicationError("Invalid callback method: "+((typeof Callback==='undefined')?'undefined':Callback.toString())));}},error:function(XHRObject,Status,Error){if(RedirectAfterSessionTimeOut(XHRObject)){return false;}
if(Status!=='abort'){Core.Exception.HandleFinalError(new Core.Exception.ApplicationError("Error during AJAX communication. Status: "+Status+", Error: "+Error,'CommunicationError'));}}});};return TargetNS;}(Core.AJAX||{}));
// end Core.AJAX.js
// begin Core.App.js
"use strict";var Core=Core||{};Core.App=(function(TargetNS){if(!Core.Debug.CheckDependency('Core.App','Core.Exception','Core.Exception')){return;}
if(!Core.Debug.CheckDependency('Core.App','Core.Config','Core.Config')){return;}
function SerializeData(Data){var QueryString='';$.each(Data,function(Key,Value){QueryString+=encodeURIComponent(Key)+'='+encodeURIComponent(Value)+';';});return QueryString;}
TargetNS.GetSessionInformation=function(){var Data={};if(!Core.Config.Get('SessionIDCookie')){Data[Core.Config.Get('SessionName')]=Core.Config.Get('SessionID');Data[Core.Config.Get('CustomerPanelSessionName')]=Core.Config.Get('SessionID');}
Data.ChallengeToken=Core.Config.Get('ChallengeToken');return Data;};TargetNS.Ready=function(Callback){if($.isFunction(Callback)){$(document).ready(function(){var Trace;try{Callback();}
catch(Error){Trace=printStackTrace({e:Error,guess:true}).join('\n');Core.Exception.HandleFinalError(Error,Trace);}});}
else{Core.Exception.ShowError('No function parameter given in Core.App.Ready','TypeError');}};TargetNS.InternalRedirect=function(Data){var URL;URL=Core.Config.Get('Baselink')+SerializeData(Data);URL+=SerializeData(TargetNS.GetSessionInformation());window.location.href=URL;};TargetNS.EscapeSelector=function(Selector){return Selector.replace(/(#|:|\.|\[|\])/g,'\\$1');};TargetNS.Publish=function(Topic,Args){$.publish(Topic,Args);};TargetNS.Subscribe=function(Topic,Callback){return $.subscribe(Topic,Callback);};TargetNS.Unsubscribe=function(Handle){$.unsubscribe(Handle);};return TargetNS;}(Core.App||{}));
// end Core.App.js
// begin Core.UI.js
"use strict";var Core=Core||{};Core.UI=(function(TargetNS){var IDGeneratorCount=0;TargetNS.InitWidgetActionToggle=function(){$(".WidgetAction.Toggle > a")
.each(function(){var $WidgetElement=$(this).closest("div.Header").parent('div'),ContentDivID=TargetNS.GetID($WidgetElement.children('.Content'));if(!$WidgetElement.hasClass('Expanded')&&!$WidgetElement.hasClass('Collapsed')){$WidgetElement.addClass('Expanded');}
$(this)
.attr('aria-controls',ContentDivID)
.attr('aria-expanded',$WidgetElement.hasClass('Expanded'));})
.unbind('click.WidgetToggle')
.bind('click.WidgetToggle',function(){var $WidgetElement=$(this).closest("div.Header").parent('div'),Animate=$WidgetElement.hasClass('Animate'),$that=$(this);function ToggleWidget(){$WidgetElement
.toggleClass('Collapsed')
.toggleClass('Expanded')
.end()
.end()
.attr('aria-expanded',$that.closest("div.Header").parent('div').hasClass('Expanded'));}
if(Animate&&Core.Config.Get('AnimationEnabled')){$WidgetElement.addClass('AnimationRunning').find('.Content').slideToggle("fast",function(){ToggleWidget();$WidgetElement.removeClass('AnimationRunning');});}else{ToggleWidget();}
return false;});};TargetNS.InitMessageBoxClose=function(){$(".MessageBox > a.Close")
.unbind('click.MessageBoxClose')
.bind('click.MessageBoxClose',function(Event){$(this).parent().remove();Event.preventDefault();});};TargetNS.GetID=function($Element){var ID=$Element.attr('id');if(!ID){$Element.attr('id',ID='Core_UI_AutogeneratedID_'+IDGeneratorCount++);}
return ID;};TargetNS.ToggleTwoContainer=function($Element1,$Element2){if(isJQueryObject($Element1,$Element2)&&$Element1.length&&$Element2.length){$Element1.slideToggle('fast',function(){$Element2.slideToggle('fast');});}};TargetNS.RegisterToggleTwoContainer=function($ClickedElement,$Element1,$Element2){if(isJQueryObject($ClickedElement)&&$ClickedElement.length){$ClickedElement.click(function(){if($Element1.is(':visible')){TargetNS.ToggleTwoContainer($Element1,$Element2);}
else{TargetNS.ToggleTwoContainer($Element2,$Element1);}
return false;});}};TargetNS.ScrollTo=function($Element){if(isJQueryObject($Element)&&$Element.length){window.scrollTo(0,$Element.offset().top);}};TargetNS.InitCheckboxSelection=function($Element){if(!$Element.length){return;}
$Element.unbind('click.CheckboxSelection').bind('click.CheckboxSelection',function(Event){var $Checkbox=$(this).find('input:checkbox');if(!$Checkbox.length){return;}
$Checkbox
.prop('checked',!$Checkbox.prop('checked'))
.triggerHandler('click');Event.stopPropagation();});};function ShakeMe($id,Position,PostionEnd){var PositionStart=Position.shift();$id.css('left',PositionStart+'px');if(Position.length>0){setTimeout(function(){ShakeMe($id,Position,PostionEnd);},PostionEnd);}
else{try{$id.css('position','static');}
catch(e){}}}
TargetNS.Shake=function($id){var Position=[15,30,15,0,-15,-30,-15,0];Position=Position.concat(Position.concat(Position));$id.css('position','relative');ShakeMe($id,Position,20);};return TargetNS;}(Core.UI||{}));
// end Core.UI.js
// begin Core.UI.Accessibility.js
"use strict";var Core=Core||{};Core.UI=Core.UI||{};Core.UI.Accessibility=(function(TargetNS){TargetNS.Init=function(){$('.ARIARoleBanner')
.attr('role','banner');$('.ARIARoleNavigation')
.attr('role','navigation');$('.ARIARoleSearch')
.attr('role','search');$('.ARIARoleContentinfo')
.attr('role','contentinfo');$('.ARIARoleMain')
.attr('role','main');$('.ARIAHasPopup')
.attr('aria-haspopup','true');$('.Validate_Required, .Validate_DependingRequiredAND, .Validate_DependingRequiredOR')
.attr('aria-required','true');TargetNS.AccessibleNavigation();};TargetNS.AccessibleNavigation=function(){$('#Navigation > ul > li a').on('focus',function(){$(this)
.next('ul')
.addClass('Expanded');});$('#Navigation > ul > li > ul').on('mouseleave',function(){$(this).removeClass('Expanded');});$('#Navigation > ul > li > ul li a').on('focus',function(){$(this)
.closest('ul')
.addClass('Expanded');});$('#Navigation > ul > li > ul li:last-child').prev('li').find('a').on('focusout',function(){$(this)
.closest('ul')
.removeClass('Expanded');});};TargetNS.AudibleAlert=function(Text){var AlertMessageID='Accessibility_AlertMessage';$('#'+AlertMessageID).remove();$('body').append('<div role="alert" id="'+AlertMessageID+'" class="ARIAAlertMessage">'+Text+'</div>');};return TargetNS;}(Core.UI.Accessibility||{}));
// end Core.UI.Accessibility.js
// begin Core.UI.Dialog.js
"use strict";var Core=Core||{};Core.UI=Core.UI||{};Core.UI.Dialog=(function(TargetNS){if(!Core.Debug.CheckDependency('Core.UI.Dialog','$([]).draggable','jQuery UI draggable')){return;}
if(!Core.Debug.CheckDependency('Core.UI.Dialog','Core.Config','Core.Config')){return;}
function AdjustScrollableHeight(AllowAutoGrow){var ContentScrollHeight=0,WindowHeight=$(window).height(),WindowScrollTop=$(window).scrollTop(),DialogTopMargin=$('.Dialog:visible').offset().top,DialogHeight=$('.Dialog:visible').height();if(AllowAutoGrow||DialogHeight>300){ContentScrollHeight=WindowHeight-((DialogTopMargin-WindowScrollTop)*2)-100;}
else{ContentScrollHeight=200;}
$('.Dialog:visible .Content .InnerContent').css('max-height',ContentScrollHeight);}
function FocusFirstElement(){$('div.Dialog:visible .Content')
.find('a:visible, input:visible, textarea:visible, select:visible, button:visible')
.filter(':first')
.focus(1);}
function InitKeyEvent(CloseOnEscape){var $Dialog=$('div.Dialog:visible');$(document).unbind('keypress.Dialog').bind('keypress.Dialog',function(Event){if($.browser.opera&&(Event.keyCode===9||(Event.keyCode===27&&CloseOnEscape))){Event.preventDefault();Event.stopPropagation();return false;}}).unbind('keydown.Dialog').bind('keydown.Dialog',function(Event){var $Tabbables,$First,$Last;if(Event.keyCode===9){$Tabbables=$('a:visible, input:visible, textarea:visible, select:visible, button:visible',$Dialog);$First=$Tabbables.filter(':first');$Last=$Tabbables.filter(':last');if(Event.target===$Last[0]&&!Event.shiftKey){$First.focus(1);Event.preventDefault();Event.stopPropagation();return false;}
else if(Event.target===$First[0]&&Event.shiftKey){$Last.focus(1);Event.preventDefault();Event.stopPropagation();return false;}}
else if(Event.keyCode===27&&CloseOnEscape){TargetNS.CloseDialog($Dialog);Event.preventDefault();Event.stopPropagation();return false;}});}
function DefaultSubmitFunction(){$('.Dialog:visible form').submit();}
function DefaultCloseFunction(){TargetNS.CloseDialog($('.Dialog:visible'));}
TargetNS.ShowDialog=function(Params){function HandleClosingAction(){var $CloseButton=$('.Dialog:visible button.Close');if(Core.Form&&Core.Form.ErrorTooltips){Core.Form.ErrorTooltips.HideTooltip();}
if($CloseButton.length){$CloseButton.trigger('click');}
else{DefaultCloseFunction();}}
function CalculateDialogPosition(Position,Type){var ScrollTop=$(window).scrollTop(),WindowHeight=$(window).height();Type=Type||'top';Position=Position.toString();if(Position.match(/%/)){Position=parseInt(Position.replace(/%/,''),10);if(Type==='top'){Position=parseInt(WindowHeight*(Position/100),10)+ScrollTop;}
else if(Type==='bottom'){Position=WindowHeight+ScrollTop-parseInt(WindowHeight*(Position/100),10);}}
else{Position=parseInt(Position.replace(/px/,''),10);if(Type==='top'){Position=Position+ScrollTop;}
else if(Type==='bottom'){Position=WindowHeight+ScrollTop-Position;}}
return(Position+'px');}
var $Dialog,$Content,$ButtonFooter,ContentScrollHeight,HTMLBackup,DialogCopy,DialogCopySelector,$InnerContent,InnerContentWidth=0,DialogHTML='<div class="Dialog"><div class="Header"><a class="Close" title="'+Core.Config.Get('DialogCloseMsg')+'" href="#"><i class="icon-remove"></i></a></div><div class="Content"></div><div class="Footer"></div></div>';if($('.Dialog:visible').length){TargetNS.CloseDialog($('.Dialog:visible'));}
if(Params.Modal){$('<div id="Overlay" tabindex="-1">').appendTo('body');$('body').css({'overflow':'hidden'});$('#Overlay').height($(document).height()).css('top',0);$('body').css('min-height',$(window).height());}
$Dialog=$(DialogHTML);if(Params.Modal){$Dialog.addClass('Modal');}
if(Params.HTML){if(typeof Params.HTML!=='string'&&isJQueryObject(Params.HTML)){DialogCopy=Core.Data.Get($('body'),'DialogCopy');HTMLBackup=(Params.HTML)[0].innerHTML;DialogCopySelector=Params.HTML.selector;DialogCopy[DialogCopySelector]=HTMLBackup;Core.Data.Set($('body'),'DialogCopy',DialogCopy);Params.HTML.empty();Params.HTML=HTMLBackup;}}
if(Params.Type==='Alert'){$Dialog.addClass('Alert');$Dialog.attr("role","alertdialog");$Content=$Dialog.find('.Content').append('<div class="InnerContent"></div>').find('.InnerContent');$Content.append('<span class="Icon"></span>');if(Params.Headline){$Content.append('<h2>'+Params.Headline+'</h2>');}
if(Params.Text){$Content.append('<p>'+Params.Text+'</p>');}
Params.Buttons=[{Label:'OK',Type:'Close',Function:Params.OnClose}];$Content.append('<div class="Center Spacing"><button type="button" id="DialogButton1" class="Close">Ok</button></div>');}
else if(Params.Type==='Search'){$Dialog.addClass('Search');$Dialog.attr("role","dialog");$Content=$Dialog.find('.Content');if(Params.HTML){$Content.append(Params.HTML);}}
else{$Dialog.attr("role","dialog");$Content=$Dialog.find('.Content');if(Params.Buttons){$Content.append('<div class="InnerContent"></div>').find('.InnerContent').append(Params.HTML);$ButtonFooter=$('<div class="ContentFooter Center"></div>');$.each(Params.Buttons,function(Index,Value){var Classes='';if(Value.Type==='Close'){Classes='Close';}
if(Value.Class){Classes+=' '+Value.Class;}
$ButtonFooter.append('<button id="DialogButton'+(Index-0+1)+'" '+(Classes.length?('class="'+Classes+'" '):'')+'type="button">'+Value.Label+'</button>');});$ButtonFooter.appendTo($Content);}
else{if(Params.HTML){$Content.append(Params.HTML);}}}
if(Params.Title){$Dialog.find('div.Header').append('<h1>'+Params.Title+'</h1>');}
$Dialog.appendTo('body');if($Dialog.find('.Content .ContentFooter').length){$Dialog.find('.Footer').addClass('ContentFooter');if($.browser.msie&&$.browser.version===8){$InnerContent=$Dialog.find('.Content .InnerContent');InnerContentWidth=$InnerContent.width()+parseInt($InnerContent.css('padding-left'),10)+parseInt($InnerContent.css('padding-right'),10);$Dialog.find('.Content .ContentFooter').width(InnerContentWidth);}}
if(DialogCopySelector&&DialogCopySelector.length){Core.Data.Set($Dialog,'DialogCopySelector',DialogCopySelector);}
if(Params.Type==='Alert'){$Dialog.css({top:$(window).scrollTop()+($(window).height()*0.3),left:Math.round(($(window).width()-$Dialog.width())/2)});}
if(typeof Params.PositionTop!=='undefined'){$Dialog.css('top',CalculateDialogPosition(Params.PositionTop,'top'));}
if(typeof Params.PositionLeft!=='undefined'){if(Params.PositionLeft==='Center'){$Dialog.css('left',Math.round(($(window).width()-$Dialog.width())/2));}
else{$Dialog.css('left',Params.PositionLeft);}}
if(typeof Params.PositionBottom!=='undefined'){$Dialog.css('bottom',CalculateDialogPosition(Params.PositionBottom,'bottom'));}
if(typeof Params.PositionRight!=='undefined'){$Dialog.css('right',Params.PositionRight);}
AdjustScrollableHeight(Params.AllowAutoGrow);$Dialog.draggable({containment:'body',handle:'.Header',start:function(Event,UI){if(Core.Form&&Core.Form.ErrorTooltips){Core.Form.ErrorTooltips.HideTooltip();}}});if(Params.Buttons){$.each(Params.Buttons,function(Index,Value){$('#DialogButton'+(Index-0+1)).click(function(){if(Value.Type==='Submit'){if($.isFunction(Value.Function)){if(Value.Function()){DefaultSubmitFunction();}}
else{DefaultSubmitFunction();}}
else if(Value.Type==='Close'){if($.isFunction(Value.Function)){if(Value.Function()){DefaultCloseFunction();}}
else{DefaultCloseFunction();}}
else{if($.isFunction(Value.Function)){Value.Function();}}});});}
$Dialog.find('.Header a.Close').click(function(){HandleClosingAction();return false;});if(Params.CloseOnClickOutside){$(document).unbind('click.Dialog').bind('click.Dialog',function(event){if($(event.target).parents('html').length&&$(event.target).closest('div.Dialog').length===0){HandleClosingAction();}});}
$(window).unbind('resize.Dialog').bind('resize.Dialog',function(){AdjustScrollableHeight(Params.AllowAutoGrow);});InitKeyEvent(Params.CloseOnEscape);FocusFirstElement();};TargetNS.ShowContentDialog=function(HTML,Title,PositionTop,PositionLeft,Modal,Buttons,AllowAutoGrow){TargetNS.ShowDialog({HTML:HTML,Title:Title,Modal:Modal,CloseOnClickOutside:true,CloseOnEscape:true,PositionTop:PositionTop,PositionLeft:PositionLeft,Buttons:Buttons,AllowAutoGrow:AllowAutoGrow});};TargetNS.ShowAlert=function(Headline,Text,CloseFunction){TargetNS.ShowDialog({Type:'Alert',Modal:true,Title:Headline,Text:Text,OnClose:CloseFunction});};TargetNS.CloseDialog=function(Object){var $Dialog,DialogCopy,DialogCopySelector,BackupHTML,Editor;$Dialog=$(Object).closest('.Dialog:visible');DialogCopySelector=Core.Data.Get($Dialog,'DialogCopySelector');$Dialog.remove();$('#Overlay').remove();$('body').css({'overflow':'auto'});$(document).unbind('keydown.Dialog').unbind('keypress.Dialog').unbind('click.Dialog');$(window).unbind('resize.Dialog');$('body').css('min-height','auto');if(DialogCopySelector.length){DialogCopy=Core.Data.Get($('body'),'DialogCopy');if(typeof DialogCopy!=='undefined'){BackupHTML=DialogCopy[DialogCopySelector];if(BackupHTML&&BackupHTML.length){$(DialogCopySelector).append(BackupHTML);}
delete DialogCopy[DialogCopySelector];}
Core.Data.Set($('body'),'DialogCopy',DialogCopy);}
Core.App.Publish('Event.UI.Dialog.CloseDialog.Close',$Dialog);};return TargetNS;}(Core.UI.Dialog||{}));
// end Core.UI.Dialog.js
// begin Core.UI.RichTextEditor.js
"use strict";var Core=Core||{};Core.UI=Core.UI||{};Core.UI.RichTextEditor=(function(TargetNS){var $FormID;function CheckFormID(){if(typeof $FormID==='undefined'){$FormID=$('input:hidden[name=FormID]');}
return $FormID;}
TargetNS.Init=function($EditorArea){var EditorID='',Editor,Instance,UserLanguage;if(isJQueryObject($EditorArea)&&$EditorArea.length===1){EditorID=$EditorArea.attr('id');}
if(EditorID===''){Core.Exception.Throw('RichTextEditor: Need exactly one EditorArea!','TypeError');}
Instance=CKEDITOR.instances[EditorID];if(Instance){Instance.destroy(true);}
CKEDITOR.on('instanceCreated',function(Editor){CKEDITOR.addCss(Core.Config.Get('RichText.EditingAreaCSS'));Editor.editor.on('change',function(evt){Core.Form.Validate.ValidateElement($(Editor.editor.element.$));});});UserLanguage=Core.Config.Get('UserLanguage').replace(/_/,"-");Editor=CKEDITOR.replace(EditorID,{customConfig:'',defaultLanguage:UserLanguage,language:UserLanguage,width:Core.Config.Get('RichText.Width',620),resize_minWidth:Core.Config.Get('RichText.Width',620),height:Core.Config.Get('RichText.Height',320),removePlugins:'elementspath,scayt,menubutton',forcePasteAsPlainText:false,format_tags:'p;h1;h2;h3;h4;h5;h6;pre',fontSize_sizes:'8px;10px;12px;16px;18px;20px;22px;24px;26px;28px;30px;',extraAllowedContent:'div table tr td th colgroup col style[*]{*}',enterMode:CKEDITOR.ENTER_BR,shiftEnterMode:CKEDITOR.ENTER_BR,contentsLangDirection:Core.Config.Get('RichText.TextDir','ltr'),disableNativeSpellChecker:false,toolbar:CheckFormID().length?Core.Config.Get('RichText.Toolbar'):Core.Config.Get('RichText.ToolbarWithoutImage'),filebrowserUploadUrl:Core.Config.Get('Baselink'),extraPlugins:Core.Config.Get('RichText.SpellChecker')?'aspell,onchange':'onchange',entities:false});if(CheckFormID().length){CKEDITOR.config.action=Core.Config.Get('RichText.PictureUploadAction','PictureUpload');CKEDITOR.config.formID=CheckFormID().val();}
CKEDITOR.config.spellerPagesServerScript=Core.Config.Get('Baselink');CKEDITOR.instances[EditorID].updateElementOriginal=CKEDITOR.instances[EditorID].updateElement;CKEDITOR.instances[EditorID].updateElement=function(){var Data;CKEDITOR.instances[EditorID].updateElementOriginal();Data=this.element.getValue();if(!Data.match(/<img/)){Data=Data.replace(/\s+|&nbsp;|<\/?\w+[^>]*\/?>/g,'');if(!Data.length){this.element.setValue('');}}};CKEDITOR.instances[EditorID].on('blur',function(){CKEDITOR.instances[EditorID].updateElement();Core.Form.Validate.ValidateElement($EditorArea);});CKEDITOR.instances[EditorID].on('focus',function(){if($EditorArea.attr('class').match(/Error/)){window.setTimeout(function(){CKEDITOR.instances[EditorID].updateElement();Core.Form.Validate.ValidateElement($EditorArea);},0);}});$EditorArea.focus(function(){TargetNS.Focus($EditorArea);Core.UI.ScrollTo($("label[for="+$EditorArea.attr('id')+"]"));});};TargetNS.InitAll=function(){$('textarea.RichText').each(function(){TargetNS.Init($(this));});};TargetNS.GetRTE=function($EditorArea){if(isJQueryObject($EditorArea)){var $RTE=$('#cke_'+$EditorArea.attr('id'));return($RTE.length?$RTE:undefined);}};TargetNS.UpdateLinkedField=function($EditorArea){var EditorID='',Data,StrippedContent;if(isJQueryObject($EditorArea)&&$EditorArea.length===1){EditorID=$EditorArea.attr('id');}
if(EditorID===''){Core.Exception.Throw('RichTextEditor: Need exactly one EditorArea!','TypeError');}
Data=CKEDITOR.instances[EditorID].getData();StrippedContent=Data.replace(/\s+|&nbsp;|<\/?\w+[^>]*\/?>/g,'');if(StrippedContent.length===0&&!Data.match(/<img/)){$EditorArea.val('');}
else{$EditorArea.val(Data);}};TargetNS.IsEnabled=function($EditorArea){var EditorID='';if(isJQueryObject($EditorArea)&&$EditorArea.length===1){EditorID=$EditorArea.attr('id');if($('#cke_'+Core.App.EscapeSelector(EditorID)).length){return true;}}
return false;};TargetNS.Focus=function($EditorArea){var EditorID='';if(isJQueryObject($EditorArea)&&$EditorArea.length===1){EditorID=$EditorArea.attr('id');}
if(EditorID===''){Core.Exception.Throw('RichTextEditor: Need exactly one EditorArea!','TypeError');}
if(typeof CKEDITOR==='object'){CKEDITOR.instances[EditorID].focus();}
else{$EditorArea.focus();}};return TargetNS;}(Core.UI.RichTextEditor||{}));
// end Core.UI.RichTextEditor.js
// begin Core.UI.Datepicker.js
"use strict";var Core=Core||{};Core.UI=Core.UI||{};Core.UI.Datepicker=(function(TargetNS){var VacationDays,VacationDaysOneTime,LocalizationData,DatepickerCount=0;if(!Core.Debug.CheckDependency('Core.UI.Datepicker','$([]).datepicker','jQuery UI datepicker')){return;}
function CheckDate(DateObject){var DayDescription='',DayClass='';if(typeof VacationDays==='undefined'){VacationDays=Core.Config.Get('Datepicker.VacationDays').TimeVacationDays;}
if(typeof VacationDaysOneTime==='undefined'){VacationDaysOneTime=Core.Config.Get('Datepicker.VacationDays').TimeVacationDaysOneTime;}
if(typeof VacationDays[DateObject.getMonth()+1]!=='undefined'&&typeof VacationDays[DateObject.getMonth()+1][DateObject.getDate()]!=='undefined'){DayDescription+=VacationDays[DateObject.getMonth()+1][DateObject.getDate()];DayClass='Highlight ';}
if(typeof VacationDaysOneTime[DateObject.getFullYear()]!=='undefined'&&typeof VacationDaysOneTime[DateObject.getFullYear()][DateObject.getMonth()+1]!=='undefined'&&typeof VacationDaysOneTime[DateObject.getFullYear()][DateObject.getMonth()+1][DateObject.getDate()]!=='undefined'){DayDescription+=VacationDaysOneTime[DateObject.getFullYear()][DateObject.getMonth()+1][DateObject.getDate()];DayClass='Highlight ';}
if(DayClass.length){return[true,DayClass,DayDescription];}
else{return[true,''];}}
TargetNS.Init=function(Element){function LeadingZero(Number){if(Number.toString().length===1){return'0'+Number;}
else{return Number;}}
var $DatepickerElement,HasDateSelectBoxes=false,Options,I,ErrorMessage;if(typeof LocalizationData==='undefined'){LocalizationData=Core.Config.Get('Datepicker.Localization');if(typeof LocalizationData==='undefined'){throw new Core.Exception.ApplicationError('Datepicker localization data could not be found!','InternalError');}}
DatepickerCount++;if(typeof Element==='object'&&typeof Element.Day!=='undefined'&&typeof Element.Month!=='undefined'&&typeof Element.Year!=='undefined'&&isJQueryObject(Element.Day,Element.Month,Element.Year)){$DatepickerElement=$('<input>').attr('type','hidden').attr('id','Datepicker'+DatepickerCount);Element.Year.after($DatepickerElement);if(Element.Day.is('select')&&Element.Month.is('select')&&Element.Year.is('select')){HasDateSelectBoxes=true;}}
else{return false;}
Options={beforeShowDay:function(DateObject){return CheckDate(DateObject);},showOn:'focus',prevText:LocalizationData.PrevText,nextText:LocalizationData.NextText,firstDay:Element.WeekDayStart,showMonthAfterYear:0,monthNames:LocalizationData.MonthNames,monthNamesShort:LocalizationData.MonthNamesShort,dayNames:LocalizationData.DayNames,dayNamesShort:LocalizationData.DayNamesShort,dayNamesMin:LocalizationData.DayNamesMin,isRTL:LocalizationData.IsRTL};Options.onSelect=function(DateText,Instance){var Year=Instance.selectedYear,Month=Instance.selectedMonth+1,Day=Instance.selectedDay;if(HasDateSelectBoxes){Element.Year.find('option[value='+Year+']').prop('selected',true);Element.Month.find('option[value='+Month+']').prop('selected',true);Element.Day.find('option[value='+Day+']').prop('selected',true);}
else{Element.Year.val(Year);Element.Month.val(LeadingZero(Month));Element.Day.val(LeadingZero(Day));}};Options.beforeShow=function(Input,Instance){$(Input).val('');return{defaultDate:new Date(Element.Year.val(),Element.Month.val()-1,Element.Day.val())};};$DatepickerElement.datepicker(Options);if(!$('#'+Core.App.EscapeSelector(Element.Day.attr('id'))+'DatepickerIcon').length){$DatepickerElement.after('<a href="#" class="DatepickerIcon" id="'+Element.Day.attr('id')+'DatepickerIcon" title="'+LocalizationData.IconText+'"></a>');if(Element.DateInFuture){ErrorMessage=Core.Config.Get('Datepicker.ErrorMessageDateInFuture');}
else{ErrorMessage=Core.Config.Get('Datepicker.ErrorMessage');}
Element.Year
.after('<div id="'+Element.Day.attr('id')+'Error" class="TooltipErrorMessage"><p>'+ErrorMessage+'</p></div>')
.after('<div id="'+Element.Month.attr('id')+'Error" class="TooltipErrorMessage"><p>'+ErrorMessage+'</p></div>')
.after('<div id="'+Element.Year.attr('id')+'Error" class="TooltipErrorMessage"><p>'+ErrorMessage+'</p></div>');if(Element.Hour&&Element.Hour.length){Element.Hour
.after('<div id="'+Element.Hour.attr('id')+'Error" class="TooltipErrorMessage"><p>'+ErrorMessage+'</p></div>')
.after('<div id="'+Element.Minute.attr('id')+'Error" class="TooltipErrorMessage"><p>'+ErrorMessage+'</p></div>');}}
$('#'+Core.App.EscapeSelector(Element.Day.attr('id'))+'DatepickerIcon').unbind('click.Datepicker').bind('click.Datepicker',function(){$DatepickerElement.datepicker('show');return false;});$('#ui-datepicker-div').hide();};return TargetNS;}(Core.UI.Datepicker||{}));
// end Core.UI.Datepicker.js
// begin Core.UI.Popup.js
"use strict";var Core=Core||{};Core.UI=Core.UI||{};Core.UI.Popup=(function(TargetNS){var OpenPopups={},PopupProfiles,PopupDefaultProfile='Default',RegisterPopupTimeOut=1000;if(!Core.Debug.CheckDependency('Core.UI.Dialog','Core.Config','Core.Config')){return;}
PopupProfiles={'Default':{WindowURLParams:"dependent=yes,location=no,menubar=no,resizable=yes,scrollbars=yes,status=no,toolbar=no",Left:100,Top:100,Width:1000,Height:700}};function CheckOpenPopups(){$.each(OpenPopups,function(Key,Value){if(Value.closed){delete OpenPopups[Key];}});}
function GetPopupObjectByType(Type){return OpenPopups[Type];}
TargetNS.ProfileAdd=function(Key,Values){PopupProfiles[Key]=Values;};TargetNS.ProfileList=function(){return PopupProfiles;};TargetNS.RegisterPopupEvent=function(){$(window).bind('Popup',function(Event,Type,Param){if(Type&&typeof Type!=='undefined'){if(Type==='Reload'){window.location.reload();}
else if(Type==='URL'){if(Param&&typeof Param.URL!=='undefined'){window.location.href=Param.URL;}}}});};TargetNS.FirePopupEvent=function(Type,Param){$(window).unbind('beforeunload.Popup').unbind('unload.Popup');$(window).trigger('Popup',[Type,Param]);};TargetNS.CheckPopupsOnUnload=function(){var Size=0;CheckOpenPopups();$.each(OpenPopups,function(Key,Value){if(Value.name.match(/OTRSPopup_.+/)){Size++;}});if(Size){return Core.Config.Get('PopupLeaveParentWindowMsg');}};TargetNS.ClosePopupsOnUnload=function(){CheckOpenPopups();$.each(OpenPopups,function(Key,Value){if(Value.name.match(/OTRSPopup_.+/)){TargetNS.ClosePopup(Value);}});};TargetNS.RegisterPopupAtParentWindow=function(WindowObject){var TypeRegEx=/OTRSPopup_([^_]+)_.*/.exec(WindowObject.name),Type=RegExp.$1;if(typeof OpenPopups[Type]==='undefined'){OpenPopups[Type]=WindowObject;}
else{if(OpenPopups[Type]!==WindowObject){OpenPopups[Type]=WindowObject;}}};TargetNS.InitRegisterPopupAtParentWindow=function(){window.setTimeout(function(){if(window.name.match(/OTRSPopup_.+/)&&window.opener&&window.opener.Core&&window.opener.Core.UI&&window.opener.Core.UI.Popup){try{window.opener.Core.UI.Popup.RegisterPopupAtParentWindow(window);}
catch(Error){}}
Core.UI.Popup.InitRegisterPopupAtParentWindow();},RegisterPopupTimeOut);};TargetNS.GetPopupObject=function(Type){return GetPopupObjectByType(Type);};TargetNS.Resize=function(Type,Width,Height){var Object=GetPopupObjectByType(Type);if(typeof Object!=='undefined'){Object.resizeTo(Width,Height);}};TargetNS.OpenPopup=function(URL,Type,Profile){var PopupObject,PopupProfile,NewWindow,WindowName,ConfirmClosePopup=true,PopupFeatures;CheckOpenPopups();if(URL){PopupObject=GetPopupObjectByType(Type);if(typeof PopupObject!=='undefined'){ConfirmClosePopup=window.confirm(Core.Config.Get('PopupAlreadyOpenMsg'));if(ConfirmClosePopup){TargetNS.ClosePopup(PopupObject);}}
if(ConfirmClosePopup){PopupProfile=PopupProfiles[Profile]?Profile:PopupDefaultProfile;WindowName='OTRSPopup_'+Type+'_'+Date.parse(new Date());PopupFeatures=PopupProfiles[PopupProfile].WindowURLParams;PopupFeatures+=',left='+((window.screen.left||0)+PopupProfiles[PopupProfile].Left);PopupFeatures+=',top='+((window.screen.top||0)+PopupProfiles[PopupProfile].Top);PopupFeatures+=',width='+PopupProfiles[PopupProfile].Width;PopupFeatures+=',height='+PopupProfiles[PopupProfile].Height;NewWindow=window.open(URL,WindowName,PopupFeatures);if(!NewWindow||NewWindow.closed||typeof NewWindow.closed==='undefined'){window.alert(Core.Config.Get('PopupBlockerMsg'));}
else{OpenPopups[Type]=NewWindow;}}}};TargetNS.HasOpenPopups=function(){var HasOpenPopups=false,Popup;CheckOpenPopups();for(Popup in OpenPopups){if(OpenPopups.hasOwnProperty(Popup)){HasOpenPopups=true;break;}}
return HasOpenPopups;};TargetNS.ClosePopup=function(Popup){if(typeof Popup==='string'){Popup=GetPopupObjectByType(Popup);}
if(typeof Popup!=='undefined'){Popup.close();CheckOpenPopups();}};TargetNS.Init=function(){$(window).bind('beforeunload.Popup',function(){return Core.UI.Popup.CheckPopupsOnUnload();});$(window).bind('unload.Popup',function(){Core.UI.Popup.ClosePopupsOnUnload();});Core.UI.Popup.RegisterPopupEvent();if(window.name.match(/OTRSPopup_.+/)&&window.opener!==null){Core.UI.Popup.InitRegisterPopupAtParentWindow();$('.CancelClosePopup').bind('click',function(){window.close();});$('.UndoClosePopup').bind('click',function(){var RedirectURL=$(this).attr('href');window.opener.Core.UI.Popup.FirePopupEvent('URL',{URL:RedirectURL});window.close();});}};return TargetNS;}(Core.UI.Popup||{}));
// end Core.UI.Popup.js
// begin Core.UI.TreeSelection.js
"use strict";var Core=Core||{};Core.UI=Core.UI||{};Core.UI.TreeSelection=(function(TargetNS){function GetChildren(Elements,Index,Data){$.each(Elements,function(InnerIndex,InnerData){if(typeof InnerData!=='object'){return false;}
if(InnerData.ID===Data.ChildOf){Elements[InnerIndex].children.push(Data);delete Elements[Index];}});return Elements;}
function CollectElements(Elements,Level){$.each(Elements,function(Index,Data){if(typeof Data!=='object'){return false;}
if(Data.Level===Level){if(Level>0){Elements=GetChildren(Elements,Index,Data);}}});return Elements;}
function BuildElementsArray($Element){var Elements=[],Level,HighestLevel=0;$Element.find('option').each(function(){var ElementID=$(this).attr('value'),ElementDisabled=$(this).is(':disabled'),ElementName=$(this).text(),ElementNameTrim=ElementName.replace(/(^[\xA0]+)/g,''),CurrentLevel=(ElementName.length-ElementNameTrim.length)/2,ChildOf=0,ElementIndex=0,CurrentElement;if(!ElementID||ElementID==="||-"||(ElementDisabled&&ElementName.match(/^-+$/))){return true;}
if(Elements.length&&CurrentLevel>0){if(CurrentLevel>Elements[Elements.length-1].Level){ChildOf=Elements[Elements.length-1].ID;}
else if(CurrentLevel===Elements[Elements.length-1].Level){ChildOf=Elements[Elements.length-1].ChildOf;}
else{for(ElementIndex=Elements.length;ElementIndex>=0;ElementIndex--){if(CurrentLevel>Elements[ElementIndex-1].Level){ChildOf=Elements[ElementIndex-1].ID;break;}}}}
ElementID=(ElementID==='-')?Math.floor((Math.random()*100000)+1):ElementID;CurrentElement={ID:ElementID,Name:ElementNameTrim,Level:CurrentLevel,ChildOf:ChildOf,children:[],data:ElementNameTrim,attr:{'data-id':ElementID,'class':(ElementDisabled)?'Disabled':''}};Elements.push(CurrentElement);if(CurrentLevel>HighestLevel){HighestLevel=CurrentLevel;}});Elements.sort(function(a,b){if(a.Level-b.Level===0){return(a.Name.localeCompare(b.Name));}
else{return(a.Level-b.Level);}});for(Level=HighestLevel;Level>=0;Level--){Elements=CollectElements(Elements,Level);}
return Elements;}
TargetNS.ShowTreeSelection=function($TriggerObj){var $TreeObj=$('<div id="JSTree"><ul></ul></div>'),$SelectObj=$TriggerObj.prevAll('select'),SelectSize=$SelectObj.attr('size'),SelectedID=$SelectObj.val(),Multiple=($SelectObj.attr('multiple')!==''&&$SelectObj.attr('multiple')!==undefined)?true:false,ElementCount=$SelectObj.find('option').length,DialogTitle=$SelectObj.parent().prev('label').clone().children().remove().end().text(),Elements={},InDialog=false,StyleSheetURL,$SelectedNodesObj,SelectedNodes=[],$CurrentTreeObj,$CurrentFocusedObj;if(!$SelectObj){return false;}
if($SelectObj.closest('.Dialog').length){InDialog=true;}
if(InDialog&&$TriggerObj.hasClass('TreeSelectionVisible')){$TriggerObj
.removeClass('TreeSelectionVisible')
.prev('.jstree')
.jstree('destroy')
.remove();$SelectObj.show();return false;}
if(!DialogTitle){DialogTitle=$SelectObj.prev('label').text();}
DialogTitle=$.trim(DialogTitle);DialogTitle=DialogTitle.substr(0,DialogTitle.length-1);DialogTitle=DialogTitle.replace(/^\*\s+/,'');if(ElementCount===1&&$SelectObj.find('option').text()==='-'){alert(Core.Config.Get('NoElementsToSelectFromMsg'));return false;}
Elements=BuildElementsArray($SelectObj);StyleSheetURL=Core.Config.Get('WebPath')+'skins/Agent/default/css/thirdparty/jstree-theme/default/style.css';$TreeObj.jstree({"core":{"animation":70},"ui":{"select_multiple_modifier":((SelectSize&&Multiple)||Multiple)?'on':'ctrl',"select_limit":((SelectSize&&Multiple)||Multiple)?-1:1},"search":{"show_only_matches":true},"json_data":{"data":Elements},"themes":{"theme":"default","icons":false,"url":StyleSheetURL},"plugins":["themes","json_data","ui","hotkeys","search"]})
.bind("select_node.jstree",function(event,data){if(data.rslt.obj.hasClass('Disabled')){$TreeObj.jstree("deselect_node",data.rslt.obj);}
$TreeObj.jstree("toggle_node",data.rslt.obj);if(InDialog){SelectedNodes=[];$SelectedNodesObj=$TreeObj.jstree("get_selected");$SelectedNodesObj.each(function(){SelectedNodes.push($(this).attr('data-id'));});$SelectObj.val(SelectedNodes);}
if((data.rslt.e&&data.rslt.e.type!==undefined)&&!InDialog&&!Multiple){$TreeObj.next('#SubmitTree').focus();}})
.bind("deselect_node.jstree",function(event,data){if(InDialog){SelectedNodes=[];$SelectedNodesObj=$TreeObj.jstree("get_selected");$SelectedNodesObj.each(function(){SelectedNodes.push($(this).attr('data-id'));});$SelectObj.val(SelectedNodes);}})
.bind("loaded.jstree",function(event,data){if(SelectedID){if(typeof SelectedID==='object'){$.each(SelectedID,function(Index,Data){$TreeObj.jstree("select_node",$TreeObj.find('li[data-id="'+Data+'"]'));});}
else{$TreeObj.jstree("select_node",$TreeObj.find('li[data-id="'+SelectedID+'"]'));}}});if(!InDialog){Core.UI.Dialog.ShowContentDialog('<div class="OverlayTreeSelector" id="TreeContainer"></div>',DialogTitle,'20%','Center',true);$('#TreeContainer')
.prepend($TreeObj)
.prepend('<div id="TreeSearch"><input type="text" id="TreeSearchInput" placeholder="'+Core.Config.Get('SearchMsg')+'..." /><span title="'+Core.Config.Get('DeleteMsg')+'">x</span></div>')
.append('<input type="button" id="SubmitTree" class="Primary" title="'+Core.Config.Get('ApplyButtonText')+'" value="'+Core.Config.Get('ApplyButtonText')+'" />');}
else{$TreeObj
.addClass('Hidden InOverlay')
.insertAfter($SelectObj)
.show();$SelectObj.hide();$TriggerObj.addClass('TreeSelectionVisible');}
$CurrentFocusedObj=document.activeElement;$('#TreeSearch').find('input').focus();$('#TreeSearch').find('input').bind('keyup',function(){$TreeObj.jstree("search",$(this).val());$('.jstree-search')
.parent()
.removeClass('jstree-open')
.addClass('jstree-closed')
.find('ins').click(function(){$(this).nextAll('ul').find('li').show();});});$('#TreeSearch').find('span').bind('click',function(){$(this).prev('input').val('');$TreeObj.jstree("clear_search");});$('#TreeContainer').find('input#SubmitTree').bind('click',function(){var $SelectedObj=$TreeObj.jstree("get_selected");if(typeof $SelectedObj==='object'&&$SelectedObj.attr('data-id')){if($SelectedObj.length>1){$SelectedObj.each(function(){SelectedNodes.push($(this).attr('data-id'));});$SelectObj
.val(SelectedNodes)
.trigger('change');}
else{if($SelectedObj.attr('data-id')!==$SelectObj.val()){$SelectObj
.val($SelectedObj.attr('data-id'))
.trigger('change');}}}
Core.UI.Dialog.CloseDialog($('.Dialog'));});Core.App.Subscribe('Event.UI.Dialog.CloseDialog.Close',function(Dialog){if($(Dialog).find('#TreeContainer').length&&!$(Dialog).find('#SearchForm').length){$CurrentFocusedObj.focus();}});};TargetNS.InitTreeSelection=function(){$('.Field, fieldset').off('click.ShowTreeSelection').on('click.ShowTreeSelection','.ShowTreeSelection',function(Event){Core.UI.TreeSelection.ShowTreeSelection($(this));return false;});};TargetNS.InitDynamicFieldTreeViewRestore=function(){$('.DynamicFieldWithTreeView').each(function(){var Data=[];$(this).find('option').each(function(){Data.push([$(this).attr('value'),$(this).text(),$(this).prop('selected'),$(this).prop('disabled')]);});Core.UI.TreeSelection.RestoreDynamicFieldTreeView($(this),Data,1);});};TargetNS.RestoreDynamicFieldTreeView=function($FieldObj,Data,CheckClass,AJAXUpdate){var Key,Value,Selected,SelectedAttr,Disabled,DisabledAttr,SelectData=[],LastElement,NeededSpaces,Spaces,i;if(CheckClass&&$FieldObj.hasClass('TreeViewRestored')){return false;}
$FieldObj.find('option').remove();$.each(Data,function(index,OptionData){Key=OptionData[0]||'';Value=OptionData[1]||'';Spaces='';NeededSpaces=0;Selected=OptionData[2]||false;Disabled=OptionData[3]||false;if(AJAXUpdate===1){Selected=OptionData[3];Disabled=OptionData[4];}
if(Key.match(/::/g)){NeededSpaces=Key.match(/::/g).length;}
if(NeededSpaces>0){NeededSpaces=NeededSpaces*2;for(i=0;i<NeededSpaces;i++){Spaces='&nbsp;'+Spaces;}}
Value=Spaces+Value;SelectedAttr='';if(Selected){SelectedAttr=' selected="selected"';}
DisabledAttr='';if(Disabled){DisabledAttr=' disabled="disabled"';}
SelectData.push({'Key':Key,'Value':Value,'SelectedAttr':SelectedAttr,'DisabledAttr':DisabledAttr});});SelectData.sort(function(a,b){var KeyA=a.Key.toLowerCase(),KeyB=b.Key.toLowerCase();if(KeyA<KeyB){return-1;}
if(KeyA>KeyB){return 1;}
return 0;});$.each(SelectData,function(index,Data){$FieldObj.append('<option value="'+Data.Key+'"'+Data.SelectedAttr+Data.DisabledAttr+'>'+Data.Value+'</option>');});$FieldObj.addClass('TreeViewRestored');};return TargetNS;}(Core.UI.TreeSelection||{}));
// end Core.UI.TreeSelection.js
// begin Core.UI.Autocomplete.js
"use strict";var Core=Core||{};Core.UI=Core.UI||{};Core.UI.Autocomplete=(function(TargetNS){var ConfigFallback={AutoCompleteActive:1,MinQueryLength:2,QueryDelay:100,MaxResultsDisplayed:20},ConfigElements=['AutoCompleteActive','MinQueryLength','QueryDelay','MaxResultsDisplayed','ButtonText'],Config={};function InitConfig(Type,Options){var TypeConfig=Core.Config.Get('Autocomplete');$.each(ConfigElements,function(ConfigKey,ConfigElement){if(Options&&typeof Options[ConfigElement]!=='undefined'){Config[ConfigElement]=Options[ConfigElement];}
else if(Type&&TypeConfig[Type]){Config[ConfigElement]=TypeConfig[Type][ConfigElement];}
else{Config[ConfigElement]=ConfigFallback[ConfigElement];}});Config.AutoCompleteActive=parseInt(Config.AutoCompleteActive,10);if(!Config.AutoCompleteActive){Config.MinQueryLength=500;}
return Config;}
TargetNS.GetConfig=function(Key){return Config[Key];};TargetNS.SearchButtonClicked={};TargetNS.Init=function($Element,SourceFunction,SelectFunction,Type,Options){var Config;if(!isJQueryObject($Element)||!$Element.length){return;}
Config=InitConfig(Type,Options);$Element.autocomplete({minLength:Config.MinQueryLength,delay:Config.QueryDelay,open:function(){$Element.autocomplete('widget').addClass('ui-overlay-autocomplete');return false;},source:function(Request,Response){if($Element.data('AutoCompleteXHR')){$Element.data('AutoCompleteXHR').abort();$Element.removeData('AutoCompleteXHR');Response({});}
if(SourceFunction){SourceFunction(Request,Response);}
},select:function(Event,UI){if(SelectFunction){SelectFunction(Event,UI);}
Event.preventDefault();return false;}});if(!Config.AutoCompleteActive){$Element.each(function(){var $SelectedElement=$(this);$SelectedElement.after('<button id="'+Core.App.EscapeSelector($SelectedElement.attr('id'))+'Search" type="button">'+Config.ButtonText+'</button>');$('#'+Core.App.EscapeSelector($SelectedElement.attr('id'))+'Search').click(function(){TargetNS.SearchButtonClicked[$SelectedElement.attr('id')]=true;$SelectedElement.autocomplete("option","minLength",0);$SelectedElement.autocomplete("search");$SelectedElement.autocomplete("option","minLength",500);});});}};return TargetNS;}(Core.UI.Autocomplete||{}));
// end Core.UI.Autocomplete.js
// begin Core.Form.js
"use strict";var Core=Core||{};Core.Form=(function(TargetNS){if(!Core.Debug.CheckDependency('Core.Form','Core.Data','Core.Data')){return;}
TargetNS.DisableForm=function($Form){if(!isJQueryObject($Form)){$Form=$('body');}
if(!$Form.hasClass('AlreadyDisabled')){$.each($Form.find("input:not([type='hidden']), textarea, select, button"),function(key,value){var ReadonlyValue=$(this).attr('readonly'),TagnameValue=$(this).prop('tagName'),DisabledValue=$(this).attr('disabled');if(TagnameValue==='BUTTON'){Core.Data.Set($(this),'OldDisabledStatus',DisabledValue);}
else{Core.Data.Set($(this),'OldReadonlyStatus',ReadonlyValue);}});$Form
.find("input:not([type='hidden']), textarea, select")
.attr('readonly','readonly')
.end()
.find('button')
.attr('disabled','disabled');$Form.addClass('AlreadyDisabled');}};TargetNS.EnableForm=function($Form){if(!isJQueryObject($Form)){$Form=$('body');}
$Form
.find("input:not([type=hidden]), textarea, select")
.removeAttr('readonly')
.end()
.find('button')
.removeAttr('disabled');$.each($Form.find("input:not([type='hidden']), textarea, select, button"),function(key,value){var TagnameValue=$(this).prop('tagName'),ReadonlyValue=Core.Data.Get($(this),'OldReadonlyStatus'),DisabledValue=Core.Data.Get($(this),'OldDisabledStatus');if(TagnameValue==='BUTTON'){if(DisabledValue==='disabled'){$(this).attr('disabled','disabled');}}
else{if(ReadonlyValue==='readonly'){$(this).attr('readonly','readonly');}}});$Form.removeClass('AlreadyDisabled');};TargetNS.SelectAllCheckboxes=function($ClickedBox,$SelectAllCheckbox){if(isJQueryObject($ClickedBox,$SelectAllCheckbox)){var ElementName=$ClickedBox.attr('name'),SelectAllID=$SelectAllCheckbox.attr('id'),$Elements=$('input:checkbox[name='+ElementName+']').filter('[id!='+SelectAllID+']'),Status=$ClickedBox.prop('checked'),CountCheckboxes,CountSelectedCheckboxes;if($ClickedBox.attr('id')&&$ClickedBox.attr('id')===SelectAllID){$Elements.prop('checked',Status).triggerHandler('click');}
else{CountCheckboxes=$Elements.length;CountSelectedCheckboxes=$Elements.filter(':checked').length;if(CountCheckboxes===CountSelectedCheckboxes){$SelectAllCheckbox.prop('checked',true);}
else{$SelectAllCheckbox.prop('checked',false);}}}};TargetNS.InitSelectAllCheckboxes=function($Checkboxes,$SelectAllCheckbox){if(isJQueryObject($Checkboxes,$SelectAllCheckbox)){if($Checkboxes.filter('[id!='+$SelectAllCheckbox.attr('id')+']').length===$Checkboxes.filter(':checked').length){$SelectAllCheckbox.prop('checked',true);}}};TargetNS.HideSelectAllCheckboxes=function($ContainerElement,SelectAllSelector){Core.App.Subscribe('Event.UI.Table.InitTableFilter.Change',function($FilterInput,$Container,ColumnNumber){if($ContainerElement.selector!==$Container.selector){return false;}
if($FilterInput.val().length){$(SelectAllSelector).addClass('Invisible');}
else{$(SelectAllSelector).removeClass('Invisible');}});};return TargetNS;}(Core.Form||{}));
// end Core.Form.js
// begin Core.Form.ErrorTooltips.js
"use strict";var Core=Core||{};Core.Form=Core.Form||{};Core.Form.ErrorTooltips=(function(TargetNS){var TooltipContainerID='OTRS_UI_Tooltips_ErrorTooltip',TooltipOffsetTop=20,TooltipOffsetLeft=20,TongueClass='TongueLeft',$TooltipContent=$('<div class="Content" role="tooltip"></div>'),$Tooltip,Offset;function ShowTooltip($Element,TooltipContent){var $TooltipContainer=$('#'+TooltipContainerID);if(!$TooltipContainer.length){$('body').append('<div id="'+TooltipContainerID+'" class="TooltipContainer"></div>');$TooltipContainer=$('#'+TooltipContainerID);}
if(($(document).width()-$Element.offset().left)<250){TongueClass='TongueRight';}
$Tooltip=$('<div class="Tooltip '+TongueClass+'"><div class="Tongue"></div></div>');$TooltipContent.html(TooltipContent);$Tooltip.append($TooltipContent);Offset=$Element.offset();$TooltipContainer
.empty()
.append($Tooltip)
.css('left',Offset.left+TooltipOffsetLeft)
.css('top',Offset.top+TooltipOffsetTop)
.show();}
TargetNS.HideTooltip=function(){$('#'+TooltipContainerID).hide().empty();};TargetNS.InitTooltip=function($Element,TooltipContent){$Element.unbind('focus.Tooltip');$Element.bind('focus.Tooltip',function(){ShowTooltip($Element,TooltipContent);});$Element.unbind('blur.Tooltip');$Element.bind('blur.Tooltip',TargetNS.HideTooltip);};TargetNS.RemoveTooltip=function($Element){TargetNS.HideTooltip();$Element.unbind('focus.Tooltip');$Element.unbind('blur.Tooltip');};function ShowRTETooltip(Event){ShowTooltip($('#cke_'+Event.listenerData.ElementID+' .cke_contents'),Event.listenerData.Message);}
function RemoveRTETooltip(Event){TargetNS.HideTooltip();}
TargetNS.InitRTETooltip=function($Element,Message){var ElementID=$Element.attr('id');CKEDITOR.instances[ElementID].on('focus',ShowRTETooltip,null,{ElementID:ElementID,Message:Message});CKEDITOR.instances[ElementID].on('blur',RemoveRTETooltip,null,ElementID);};TargetNS.RemoveRTETooltip=function($Element){var ElementID=$Element.attr('id');CKEDITOR.instances[ElementID].removeListener('focus',ShowRTETooltip);CKEDITOR.instances[ElementID].removeListener('blur',RemoveRTETooltip);TargetNS.HideTooltip();};return TargetNS;}(Core.Form.ErrorTooltips||{}));
// end Core.Form.ErrorTooltips.js
// begin Core.Form.Validate.js
"use strict";var Core=Core||{};Core.Form=Core.Form||{};Core.Form.Validate=(function(TargetNS){var Options={FormClass:'Validate',ErrorClass:'Error',ErrorLabelClass:'LabelError',ServerErrorClass:'ServerError',ServerLabelClass:'ServerLabelError',IgnoreClass:'ValidationIgnore',SubmitFunction:{}};if(!Core.Debug.CheckDependency('Core.Form.Validate','Core.UI.Accessibility','Core.UI.Accessibility')){return;}
if(!Core.Debug.CheckDependency('Core.Form.Validate','Core.UI.Dialog','Core.UI.Dialog')){return;}
if(!Core.Debug.CheckDependency('Core.Form.Validate','Core.Form','Core.Form')){return;}
if(!Core.Debug.CheckDependency('Core.Form.Validate','Core.UI.RichTextEditor','Core.UI.RichTextEditor')){return;}
if(!Core.Debug.CheckDependency('Core.Form.Validate','Core.Form.ErrorTooltips','Core.Form.ErrorTooltips')){return;}
if(!Core.Debug.CheckDependency('Core.Form.Validate','Core.App','Core.App')){return;}
TargetNS.HighlightError=function(Element,ErrorType){var $Element=$(Element),InputErrorMessageHTML,InputErrorMessageText;if(ErrorType!=='Error'&&ErrorType!=='ServerError'){ErrorType='Error';}
if($Element.hasClass(Options.ErrorClass)){return;}
$Element.addClass(Options.ErrorClass);$(Element.form).find("label[for="+Core.App.EscapeSelector(Element.id)+"]").addClass(Options.ErrorLabelClass);$Element.attr('aria-invalid',true);if($Element.is('input:checkbox, input:radio')){$Element.data('ValidateOldValue',$Element.prop('checked'));}
else{$Element.data('ValidateOldValue',$Element.val());}
InputErrorMessageHTML=$('#'+Core.App.EscapeSelector($Element.attr('id'))+ErrorType).html();InputErrorMessageText=$('#'+Core.App.EscapeSelector($Element.attr('id'))+ErrorType).text();if(InputErrorMessageHTML&&InputErrorMessageHTML.length){if($('#cke_'+Core.App.EscapeSelector(Element.id)).length){Core.Form.ErrorTooltips.InitRTETooltip($Element,InputErrorMessageHTML);}else{Core.Form.ErrorTooltips.InitTooltip($Element,InputErrorMessageHTML);}}
Core.UI.Accessibility.AudibleAlert(InputErrorMessageText);if(Core.UI.RichTextEditor.IsEnabled($Element)){window.setTimeout(function(){$Element.focus();},0);}};TargetNS.UnHighlightError=function(Element){var $Element=$(Element),ElementValue,RemoveError=true;if($Element.hasClass(Options.ServerErrorClass)){if($Element.is('input:checkbox, input:radio')){ElementValue=$Element.prop('checked');}
else{ElementValue=$Element.val();}
if($Element.data('ValidateOldValue')===ElementValue){RemoveError=false;}
else{$Element.removeData('ValidateOldValue');}}
if(RemoveError){$Element.removeClass(Options.ErrorClass).removeClass(Options.ServerErrorClass);$(Element.form).find("label[for="+Core.App.EscapeSelector(Element.id)+"]").removeClass(Options.ErrorLabelClass);$Element.attr('aria-invalid',false);if($('#cke_'+Core.App.EscapeSelector(Element.id)).length){Core.Form.ErrorTooltips.RemoveRTETooltip($Element);}else{Core.Form.ErrorTooltips.RemoveTooltip($Element);}}};function OnErrorElement(Error,Element){return true;}
function OnSubmit(Form){$(Form).removeClass('ClientError').removeClass('LabelError');if($.isFunction(Options.SubmitFunction[Form.id])){Options.SubmitFunction[Form.id](Form);}
else{Form.submit();}
if($(Form).hasClass("PreventMultipleSubmits")){window.setTimeout(function(){Core.Form.DisableForm($(Form));},0);}}
function ValidatorMethodRequired(Value,Element){var Text,$Element=$(Element);if(Element.nodeName.toLowerCase()==='select'){Text=$(Element).find('option:selected').text();return(Text.length&&Text!=='-');}
if(Core.UI.RichTextEditor.IsEnabled($Element)){CKEDITOR.instances[$Element.attr('id')].updateElement();Value=$Element.val();}
if($Element.filter('input:checkbox, input:radio').length){return $Element.filter(':checked').length>0;}
return $.trim(Value).length>0;}
$.validator.addMethod("Validate_Required",ValidatorMethodRequired,"");$.validator.addMethod("Validate_Number",$.validator.methods.digits,"");$.validator.addMethod("Validate_Email",ValidatorMethodRequired,"");$.validator.addMethod("Validate_MaxLength",function(Value,Element){return(Value.replace(/\n\r?/g,"\n\r").length<=$(Element).attr('maxlength'));},"");$.validator.addMethod("Validate_DateYear",function(Value,Element){return(parseInt(Value,10)>999&&parseInt(Value,10)<10000);},"");$.validator.addMethod("Validate_DateMonth",function(Value,Element){return(parseInt(Value,10)>0&&parseInt(Value,10)<13);},"");function DateValidator(Value,Element,Options){var Classes=$(Element).attr('class'),DateObject,RegExYear,RegExMonth,YearElement='',MonthElement='',DateYearClassPrefix='Validate_DateYear_',DateMonthClassPrefix='Validate_DateMonth_',DateCheck;RegExYear=new RegExp(DateYearClassPrefix);RegExMonth=new RegExp(DateMonthClassPrefix);$.each(Classes.split(' '),function(Index,Value){if(RegExYear.test(Value)){YearElement=Value.replace(DateYearClassPrefix,'');}
if(RegExMonth.test(Value)){MonthElement=Value.replace(DateMonthClassPrefix,'');}});if(YearElement.length&&MonthElement.length&&$('#'+YearElement).length&&$('#'+MonthElement).length){DateObject=new Date($('#'+YearElement).val(),$('#'+MonthElement).val()-1,Value);if(DateObject.getFullYear()===parseInt($('#'+YearElement).val(),10)&&DateObject.getMonth()+1===parseInt($('#'+MonthElement).val(),10)&&DateObject.getDate()===parseInt(Value,10)){if(Options.DateInFuture){DateCheck=new Date();DateCheck.setHours(0,0,0,0);if(DateObject>=DateCheck){return true;}}
else{return true;}}}
return false;}
$.validator.addMethod("Validate_DateDay",function(Value,Element){return DateValidator(Value,Element,{});},"");$.validator.addMethod("Validate_DateInFuture",function(Value,Element){return DateValidator(Value,Element,{DateInFuture:true});},"");$.validator.addMethod("Validate_DateHour",function(Value,Element){return(parseInt(Value,10)>=0&&parseInt(Value,10)<24);},"");$.validator.addMethod("Validate_DateMinute",function(Value,Element){return(parseInt(Value,10)>=0&&parseInt(Value,10)<60);},"");$.validator.addMethod("Validate_TimeUnits",function(Value,Element){return(Value===""||/^-{0,1}\d+?((\.|,){0,1}\d+?){0,1}$/.test(Value));},"");$.validator.addMethod("Validate_Equal",function(Value,Element){var Classes=$(Element).attr('class'),EqualElements=[],ApplyRule=0,EqualClassPrefix='Validate_Equal_',RegExEqual,I;RegExEqual=new RegExp(EqualClassPrefix);$.each(Classes.split(' '),function(Index,Value){if(RegExEqual.test(Value)){EqualElements.push(Value.replace(EqualClassPrefix,''));}});if(EqualElements.length){for(I=0;I<EqualElements.length;I++){if($('#'+$.trim(EqualElements[I])).val()===Value){ApplyRule++;}}
return(ApplyRule===EqualElements.length);}});$.validator.addClassRules("Validate_Required",{Validate_Required:true});$.validator.addClassRules("Validate_Number",{Validate_Number:true});$.validator.addClassRules("Validate_Email",{Validate_Email:true});$.validator.addClassRules("Validate_MaxLength",{Validate_MaxLength:true});$.validator.addClassRules("Validate_RequiredDropdown",{Validate_Required:true});$.validator.addClassRules("Validate_RequiredRichText",{Validate_Required:true});$.validator.addClassRules("Validate_DateYear",{Validate_DateYear:true});$.validator.addClassRules("Validate_DateMonth",{Validate_DateMonth:true});$.validator.addClassRules("Validate_DateDay",{Validate_DateDay:true});$.validator.addClassRules("Validate_DateHour",{Validate_DateHour:true});$.validator.addClassRules("Validate_DateMinute",{Validate_DateMinute:true});$.validator.addClassRules("Validate_TimeUnits",{Validate_TimeUnits:true});$.validator.addClassRules("Validate_Equal",{Validate_Equal:true});function GetDependentElements(Element){var Classes=$(Element).attr('class'),DependentElementIDs=[],RegEx,DependingClassPrefix='Validate_Depending_';RegEx=new RegExp(DependingClassPrefix);$.each(Classes.split(' '),function(Index,Value){if(RegEx.test(Value)){DependentElementIDs.push(Value.replace(DependingClassPrefix,''));}});return DependentElementIDs;}
$.validator.addMethod("Validate_DependingRequiredAND",function(Value,Element){var I,DependentElementIDs=[],$DependentElement;DependentElementIDs=GetDependentElements(Element);for(I=0;I<DependentElementIDs.length;I++){$DependentElement=$('#'+$.trim(DependentElementIDs[I]));if(ValidatorMethodRequired($DependentElement.val(),$DependentElement[0])){return ValidatorMethodRequired(Value,Element);}}
return true;},"");$.validator.addClassRules("Validate_DependingRequiredAND",{Validate_DependingRequiredAND:true});$.validator.addMethod("Validate_DependingRequiredOR",function(Value,Element){var I,DependentElementIDs=[],$DependentElement;DependentElementIDs=GetDependentElements(Element);for(I=0;I<DependentElementIDs.length;I++){$DependentElement=$('#'+$.trim(DependentElementIDs[I]));if(ValidatorMethodRequired($DependentElement.val(),$DependentElement[0])){return true;}}
return ValidatorMethodRequired(Value,Element);},"");$.validator.addClassRules("Validate_DependingRequiredOR",{Validate_DependingRequiredOR:true});TargetNS.Init=function(){var i=0,FormSelector,$ServerErrors,ServerErrorDialogCloseFunction;if(Options.FormClass){FormSelector='form.'+Options.FormClass;}
else{FormSelector='form';}
if(Core.Config.Get('CheckEmailAddresses')){$.validator.addMethod("Validate_Email",$.validator.methods.email,"");}
$(FormSelector).each(function(){$(this).validate({ignoreTitle:true,errorClass:Options.ErrorClass,highlight:TargetNS.HighlightError,unhighlight:TargetNS.UnHighlightError,errorPlacement:OnErrorElement,submitHandler:OnSubmit,ignore:'.'+Options.IgnoreClass});});$ServerErrors=$('input.'+Options.ServerErrorClass)
.add('textarea.'+Options.ServerErrorClass)
.add('select.'+Options.ServerErrorClass);if($ServerErrors.length){$ServerErrors.each(function(){$(this).parents('.WidgetSimple.Collapsed').toggleClass('Collapsed Expanded');TargetNS.HighlightError(this,'ServerError');});ServerErrorDialogCloseFunction=function(){Core.UI.Dialog.CloseDialog($('.Dialog:visible'));$ServerErrors.eq(0).focus();};Core.UI.Dialog.ShowAlert(Core.Config.Get('ValidateServerErrorTitle'),Core.Config.Get('ValidateServerErrorMsg'),ServerErrorDialogCloseFunction);}};TargetNS.ValidateElement=function($Element){if(isJQueryObject($Element)){return $Element.closest('form').validate().element($Element);}
return false;};TargetNS.SetSubmitFunction=function($Form,Func){if(!isJQueryObject($Form)){return false;}
if($.isFunction(Func)&&$Form.length){Options.SubmitFunction[$Form.attr('id')]=Func;}};TargetNS.AddDependingValidation=function(Name,Basis,Depends){var RuleHash={};RuleHash[Basis]={depends:Depends};$.validator.addClassRules(Name,RuleHash);};TargetNS.AddMethod=function(Name,Function){if(Name&&$.isFunction(Function)){$.validator.addMethod(Name,Function,"");}};TargetNS.AddRule=function(Name,MethodHash){if(Name&&typeof MethodHash==="object"){$.validator.addClassRules(Name,MethodHash);}};TargetNS.DisableValidation=function($Form){if(!isJQueryObject($Form)){$Form=$('body');}
$Form
.find("input:not([type='hidden']), textarea, select")
.addClass(Options.IgnoreClass);};TargetNS.EnableValidation=function($Form){if(!isJQueryObject($Form)){$Form=$('body');}
$Form
.find("input:not([type='hidden']), textarea, select")
.removeClass(Options.IgnoreClass);};return TargetNS;}(Core.Form.Validate||{}));
// end Core.Form.Validate.js
// begin Core.Customer.js
"use strict";var Core=Core||{};Core.Customer=(function(TargetNS){if(!Core.Debug.CheckDependency('Core.Customer','Core.UI','Core.UI')){return;}
if(!Core.Debug.CheckDependency('Core.Customer','Core.Form','Core.Form')){return;}
if(!Core.Debug.CheckDependency('Core.Customer','Core.Form.Validate','Core.Form.Validate')){return;}
if(!Core.Debug.CheckDependency('Core.Customer','Core.UI.Accessibility','Core.UI.Accessibility')){return;}
TargetNS.Init=function(){var $TableElements=$('table.Overview tbody tr');Core.Exception.Init();Core.Form.Validate.Init();Core.UI.Popup.Init();if($TableElements.length<200){$TableElements.filter(':nth-child(even)').addClass('Even');}
Core.UI.Accessibility.Init();Core.UI.TreeSelection.InitTreeSelection();Core.UI.TreeSelection.InitDynamicFieldTreeViewRestore();};TargetNS.ClickableRow=function(){$("table tr").click(function(){window.location.href=$("a",this).attr("href");return false;});};TargetNS.Enhance=function(){$('body').removeClass('NoJavaScript').addClass('JavaScriptAvailable');};TargetNS.InitFocus=function(){$('input[type="text"]').first().focus();};return TargetNS;}(Core.Customer||{}));
// end Core.Customer.js
