window.Modernizr=function(a,b,c){function B(a){j.cssText=a}function C(a,b){return B(n.join(a+";")+(b||""))
}function D(a,b){return typeof a===b}function E(a,b){return !!~(""+a).indexOf(b)}function F(a,b){for(var d in a){if(j[a[d]]!==c){return b=="pfx"?a[d]:!0
}}return !1}function G(a,b,d){for(var e in a){var f=b[a[e]];if(f!==c){return d===!1?a[e]:D(f,"function")?f.bind(d||b):f
}}return !1}function H(a,b,c){var d=a.charAt(0).toUpperCase()+a.substr(1),e=(a+" "+p.join(d+" ")+d).split(" ");
return D(b,"string")||D(b,"undefined")?F(e,b):(e=(a+" "+q.join(d+" ")+d).split(" "),G(e,b,c))}var d="2.5.3",e={},f=!0,g=b.documentElement,h="modernizr",i=b.createElement(h),j=i.style,k,l=":)",m={}.toString,n=" -webkit- -moz- -o- -ms- ".split(" "),o="Webkit Moz O ms",p=o.split(" "),q=o.toLowerCase().split(" "),r={},s={},t={},u=[],v=u.slice,w,x=function(a,c,d,e){var f,i,j,k=b.createElement("div"),l=b.body,m=l?l:b.createElement("body");
if(parseInt(d,10)){while(d--){j=b.createElement("div"),j.id=e?e[d]:h+(d+1),k.appendChild(j)}}return f=["&#173;","<style>",a,"</style>"].join(""),k.id=h,(l?k:m).innerHTML+=f,m.appendChild(k),l||(m.style.background="",g.appendChild(m)),i=c(k,a),l?k.parentNode.removeChild(k):m.parentNode.removeChild(m),!!i
},y=function(){function d(d,e){e=e||b.createElement(a[d]||"div"),d="on"+d;var f=d in e;return f||(e.setAttribute||(e=b.createElement("div")),e.setAttribute&&e.removeAttribute&&(e.setAttribute(d,""),f=D(e[d],"function"),D(e[d],"undefined")||(e[d]=c),e.removeAttribute(d))),e=null,f
}var a={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};
return d}(),z={}.hasOwnProperty,A;!D(z,"undefined")&&!D(z.call,"undefined")?A=function(a,b){return z.call(a,b)
}:A=function(a,b){return b in a&&D(a.constructor.prototype[b],"undefined")},Function.prototype.bind||(Function.prototype.bind=function(b){var c=this;
if(typeof c!="function"){throw new TypeError}var d=v.call(arguments,1),e=function(){if(this instanceof e){var a=function(){};
a.prototype=c.prototype;var f=new a,g=c.apply(f,d.concat(v.call(arguments)));return Object(g)===g?g:f
}return c.apply(b,d.concat(v.call(arguments)))};return e});var I=function(a,c){var d=a.join(""),f=c.length;
x(d,function(a,c){var d=b.styleSheets[b.styleSheets.length-1],g=d?d.cssRules&&d.cssRules[0]?d.cssRules[0].cssText:d.cssText||"":"",h=a.childNodes,i={};
while(f--){i[h[f].id]=h[f]}e.csstransforms3d=(i.csstransforms3d&&i.csstransforms3d.offsetLeft)===9&&i.csstransforms3d.offsetHeight===3,e.generatedcontent=(i.generatedcontent&&i.generatedcontent.offsetHeight)>=1,e.fontface=/src/i.test(g)&&g.indexOf(c.split(" ")[0])===0
},f,c)}(['@font-face {font-family:"font";src:url("https://")}',["@media (",n.join("transform-3d),("),h,")","{#csstransforms3d{left:9px;position:absolute;height:3px;}}"].join(""),['#generatedcontent:after{content:"',l,'";visibility:hidden}'].join("")],["fontface","csstransforms3d","generatedcontent"]);
r.canvas=function(){var a=b.createElement("canvas");return !!a.getContext&&!!a.getContext("2d")},r.canvastext=function(){return !!e.canvas&&!!D(b.createElement("canvas").getContext("2d").fillText,"function")
},r.postmessage=function(){return !!a.postMessage},r.hashchange=function(){return y("hashchange",a)&&(b.documentMode===c||b.documentMode>7)
},r.history=function(){return !!a.history&&!!history.pushState},r.draganddrop=function(){var a=b.createElement("div");
return"draggable" in a||"ondragstart" in a&&"ondrop" in a},r.websockets=function(){for(var b=-1,c=p.length;
++b<c;){if(a[p[b]+"WebSocket"]){return !0}}return"WebSocket" in a},r.rgba=function(){return B("background-color:rgba(150,255,150,.5)"),E(j.backgroundColor,"rgba")
},r.borderradius=function(){return H("borderRadius")},r.boxshadow=function(){return H("boxShadow")},r.textshadow=function(){return b.createElement("div").style.textShadow===""
},r.opacity=function(){return C("opacity:.55"),/^0.55$/.test(j.opacity)},r.cssanimations=function(){return H("animationName")
},r.cssgradients=function(){var a="background-image:",b="gradient(linear,left top,right bottom,from(#9f9),to(white));",c="linear-gradient(left top,#9f9, white);";
return B((a+"-webkit- ".split(" ").join(b+a)+n.join(c+a)).slice(0,-a.length)),E(j.backgroundImage,"gradient")
},r.csstransforms=function(){return !!H("transform")},r.csstransforms3d=function(){var a=!!H("perspective");
return a&&"webkitPerspective" in g.style&&(a=e.csstransforms3d),a},r.csstransitions=function(){return H("transition")
},r.fontface=function(){return e.fontface},r.generatedcontent=function(){return e.generatedcontent},r.video=function(){var a=b.createElement("video"),c=!1;
try{if(c=!!a.canPlayType){c=new Boolean(c),c.ogg=a.canPlayType('video/ogg; codecs="theora"').replace(/^no$/,""),c.h264=a.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/,""),c.webm=a.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,"")
}}catch(d){}return c},r.audio=function(){var a=b.createElement("audio"),c=!1;try{if(c=!!a.canPlayType){c=new Boolean(c),c.ogg=a.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),c.mp3=a.canPlayType("audio/mpeg;").replace(/^no$/,""),c.wav=a.canPlayType('audio/wav; codecs="1"').replace(/^no$/,""),c.m4a=(a.canPlayType("audio/x-m4a;")||a.canPlayType("audio/aac;")).replace(/^no$/,"")
}}catch(d){}return c},r.localstorage=function(){try{return localStorage.setItem(h,h),localStorage.removeItem(h),!0
}catch(a){return !1}},r.sessionstorage=function(){try{return sessionStorage.setItem(h,h),sessionStorage.removeItem(h),!0
}catch(a){return !1}},r.applicationcache=function(){return !!a.applicationCache};for(var J in r){A(r,J)&&(w=J.toLowerCase(),e[w]=r[J](),u.push((e[w]?"":"no-")+w))
}return e.addTest=function(a,b){if(typeof a=="object"){for(var d in a){A(a,d)&&e.addTest(d,a[d])}}else{a=a.toLowerCase();
if(e[a]!==c){return e}b=typeof b=="function"?b():b,g.className+=" "+(b?"":"no-")+a,e[a]=b}return e},B(""),i=k=null,e._version=d,e._prefixes=n,e._domPrefixes=q,e._cssomPrefixes=p,e.hasEvent=y,e.testProp=function(a){return F([a])
},e.testAllProps=H,e.testStyles=x,e.prefixed=function(a,b,c){return b?H(a,b,c):H(a,"pfx")},g.className=g.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(f?" js "+u.join(" "):""),e
}(this,this.document);(function(g,b){function k(){var a=e.elements;return"string"==typeof a?a.split(" "):a
}function l(a){var c={},f=a.createElement,b=a.createDocumentFragment,d=b();a.createElement=function(a){if(!e.shivMethods){return f(a)
}var b;b=c[a]?c[a].cloneNode():m.test(a)?(c[a]=f(a)).cloneNode():f(a);return b.canHaveChildren&&!n.test(a)?d.appendChild(b):b
};a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+k().join().replace(/\w+/g,function(a){f(a);
d.createElement(a);return'c("'+a+'")'})+");return n}")(e,d)}function h(a){var c;if(a.documentShived){return a
}if(e.shivCSS&&!i){c=a.createElement("p");var b=a.getElementsByTagName("head")[0]||a.documentElement;
c.innerHTML="x<style>article,aside,figcaption,figure,footer,header,hgroup,nav,section{display:block}mark{background:#FF0;color:#000}</style>";
c=!!b.insertBefore(c.lastChild,b.firstChild)}j||(c=!l(a));if(c){a.documentShived=c}return a}var d=g.html5||{},n=/^<|^(?:button|form|map|select|textarea|object|iframe|option|optgroup)$/i,m=/^<|^(?:a|b|button|code|div|fieldset|form|h1|h2|h3|h4|h5|h6|i|iframe|img|input|label|li|link|ol|option|p|param|q|script|select|span|strong|style|table|tbody|td|textarea|tfoot|th|thead|tr|ul)$/i,i,j;
(function(){var a=b.createElement("a");a.innerHTML="<xyz></xyz>";i="hidden" in a;if(!(a=1==a.childNodes.length)){a:{try{b.createElement("a")
}catch(c){a=!0;break a}a=b.createDocumentFragment();a="undefined"==typeof a.cloneNode||"undefined"==typeof a.createDocumentFragment||"undefined"==typeof a.createElement
}}j=a})();var e={elements:d.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",shivCSS:!1!==d.shivCSS,shivMethods:!1!==d.shivMethods,type:"default",shivDocument:h};
g.html5=e;h(b)})(this,document);Modernizr.addTest("osmac",function(){if(!navigator||!navigator.appVersion){return false
}return(navigator.appVersion.indexOf("Mac")!=-1)});Modernizr.addTest("browser-ie",function(){if(!navigator||!navigator.appVersion){return false
}return(navigator.appVersion.toLowerCase().indexOf("msie")!=-1||navigator.appVersion.toLowerCase().indexOf("trident")!=-1)
});Modernizr.addTest("ipad",function(){return !!navigator.userAgent.match(/iPad/i)});Modernizr.addTest("iphone",function(){return !!navigator.userAgent.match(/iPhone/i)
});Modernizr.addTest("ipod",function(){return !!navigator.userAgent.match(/iPod/i)});Modernizr.addTest("appleios",function(){return(Modernizr.ipad||Modernizr.ipod||Modernizr.iphone)
});
/*! jQuery v1.7.2 jquery.com | jquery.org/license */
(function(a,b){function cy(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1
}function cu(a){if(!cj[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){ck||(ck=c.createElement("iframe"),ck.frameBorder=ck.width=ck.height=0),b.appendChild(ck);
if(!cl||!ck.createElement){cl=(ck.contentWindow||ck.contentDocument).document,cl.write((f.support.boxModel?"<!doctype html>":"")+"<html><body>"),cl.close()
}d=cl.createElement(a),cl.body.appendChild(d),e=f.css(d,"display"),b.removeChild(ck)}cj[a]=e}return cj[a]
}function ct(a,b){var c={};f.each(cp.concat.apply([],cp.slice(0,b)),function(){c[this]=a});return c}function cs(){cq=b
}function cr(){setTimeout(cs,0);return cq=f.now()}function ci(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")
}catch(b){}}function ch(){try{return new a.XMLHttpRequest}catch(b){}}function cb(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));
var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g<i;g++){if(g===1){for(h in a.converters){typeof h=="string"&&(e[h.toLowerCase()]=a.converters[h])
}}l=k,k=d[g];if(k==="*"){k=l}else{if(l!=="*"&&l!==k){m=l+" "+k,n=e[m]||e["* "+k];if(!n){p=b;for(o in e){j=o.split(" ");
if(j[0]===l||j[0]==="*"){p=e[j[1]+" "+k];if(p){o=e[o],o===!0?n=p:p===!0&&(n=o);break}}}}!n&&!p&&f.error("No conversion from "+m.replace(" "," to ")),n!==!0&&(c=n?n(c):p(o(c)))
}}}return c}function ca(a,c,d){var e=a.contents,f=a.dataTypes,g=a.responseFields,h,i,j,k;for(i in g){i in d&&(c[g[i]]=d[i])
}while(f[0]==="*"){f.shift(),h===b&&(h=a.mimeType||c.getResponseHeader("content-type"))}if(h){for(i in e){if(e[i]&&e[i].test(h)){f.unshift(i);
break}}}if(f[0] in d){j=f[0]}else{for(i in d){if(!f[0]||a.converters[i+" "+f[0]]){j=i;break}k||(k=i)}j=j||k
}if(j){j!==f[0]&&f.unshift(j);return d[j]}}function b_(a,b,c,d){if(f.isArray(b)){f.each(b,function(b,e){c||bD.test(a)?d(a,e):b_(a+"["+(typeof e=="object"?b:"")+"]",e,c,d)
})}else{if(!c&&f.type(b)==="object"){for(var e in b){b_(a+"["+e+"]",b[e],c,d)}}else{d(a,b)}}}function b$(a,c){var d,e,g=f.ajaxSettings.flatOptions||{};
for(d in c){c[d]!==b&&((g[d]?a:e||(e={}))[d]=c[d])}e&&f.extend(!0,a,e)}function bZ(a,c,d,e,f,g){f=f||c.dataTypes[0],g=g||{},g[f]=!0;
var h=a[f],i=0,j=h?h.length:0,k=a===bS,l;for(;i<j&&(k||!l);i++){l=h[i](c,d,e),typeof l=="string"&&(!k||g[l]?l=b:(c.dataTypes.unshift(l),l=bZ(a,c,d,e,l,g)))
}(k||!l)&&!g["*"]&&(l=bZ(a,c,d,e,"*",g));return l}function bY(a){return function(b,c){typeof b!="string"&&(c=b,b="*");
if(f.isFunction(c)){var d=b.toLowerCase().split(bO),e=0,g=d.length,h,i,j;for(;e<g;e++){h=d[e],j=/^\+/.test(h),j&&(h=h.substr(1)||"*"),i=a[h]=a[h]||[],i[j?"unshift":"push"](c)
}}}}function bB(a,b,c){var d=b==="width"?a.offsetWidth:a.offsetHeight,e=b==="width"?1:0,g=4;if(d>0){if(c!=="border"){for(;
e<g;e+=2){c||(d-=parseFloat(f.css(a,"padding"+bx[e]))||0),c==="margin"?d+=parseFloat(f.css(a,c+bx[e]))||0:d-=parseFloat(f.css(a,"border"+bx[e]+"Width"))||0
}}return d+"px"}d=by(a,b);if(d<0||d==null){d=a.style[b]}if(bt.test(d)){return d}d=parseFloat(d)||0;if(c){for(;
e<g;e+=2){d+=parseFloat(f.css(a,"padding"+bx[e]))||0,c!=="padding"&&(d+=parseFloat(f.css(a,"border"+bx[e]+"Width"))||0),c==="margin"&&(d+=parseFloat(f.css(a,c+bx[e]))||0)
}}return d+"px"}function bo(a){var b=c.createElement("div");bh.appendChild(b),b.innerHTML=a.outerHTML;
return b.firstChild}function bn(a){var b=(a.nodeName||"").toLowerCase();b==="input"?bm(a):b!=="script"&&typeof a.getElementsByTagName!="undefined"&&f.grep(a.getElementsByTagName("input"),bm)
}function bm(a){if(a.type==="checkbox"||a.type==="radio"){a.defaultChecked=a.checked}}function bl(a){return typeof a.getElementsByTagName!="undefined"?a.getElementsByTagName("*"):typeof a.querySelectorAll!="undefined"?a.querySelectorAll("*"):[]
}function bk(a,b){var c;b.nodeType===1&&(b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase(),c==="object"?b.outerHTML=a.outerHTML:c!=="input"||a.type!=="checkbox"&&a.type!=="radio"?c==="option"?b.selected=a.defaultSelected:c==="input"||c==="textarea"?b.defaultValue=a.defaultValue:c==="script"&&b.text!==a.text&&(b.text=a.text):(a.checked&&(b.defaultChecked=b.checked=a.checked),b.value!==a.value&&(b.value=a.value)),b.removeAttribute(f.expando),b.removeAttribute("_submit_attached"),b.removeAttribute("_change_attached"))
}function bj(a,b){if(b.nodeType===1&&!!f.hasData(a)){var c,d,e,g=f._data(a),h=f._data(b,g),i=g.events;
if(i){delete h.handle,h.events={};for(c in i){for(d=0,e=i[c].length;d<e;d++){f.event.add(b,c,i[c][d])
}}}h.data&&(h.data=f.extend({},h.data))}}function bi(a,b){return f.nodeName(a,"table")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a
}function U(a){var b=V.split("|"),c=a.createDocumentFragment();if(c.createElement){while(b.length){c.createElement(b.pop())
}}return c}function T(a,b,c){b=b||0;if(f.isFunction(b)){return f.grep(a,function(a,d){var e=!!b.call(a,d,a);
return e===c})}if(b.nodeType){return f.grep(a,function(a,d){return a===b===c})}if(typeof b=="string"){var d=f.grep(a,function(a){return a.nodeType===1
});if(O.test(b)){return f.filter(b,d,!c)}b=f.filter(b,d)}return f.grep(a,function(a,d){return f.inArray(a,b)>=0===c
})}function S(a){return !a||!a.parentNode||a.parentNode.nodeType===11}function K(){return !0}function J(){return !1
}function n(a,b,c){var d=b+"defer",e=b+"queue",g=b+"mark",h=f._data(a,d);h&&(c==="queue"||!f._data(a,e))&&(c==="mark"||!f._data(a,g))&&setTimeout(function(){!f._data(a,e)&&!f._data(a,g)&&(f.removeData(a,d,!0),h.fire())
},0)}function m(a){for(var b in a){if(b==="data"&&f.isEmptyObject(a[b])){continue}if(b!=="toJSON"){return !1
}}return !0}function l(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(k,"-$1").toLowerCase();
d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNumeric(d)?+d:j.test(d)?f.parseJSON(d):d
}catch(g){}f.data(a,c,d)}else{d=b}}return d}function h(a){var b=g[a]={},c,d;a=a.split(/\s+/);for(c=0,d=a.length;
c<d;c++){b[a[c]]=!0}return b}var c=a.document,d=a.navigator,e=a.location,f=function(){function J(){if(!e.isReady){try{c.documentElement.doScroll("left")
}catch(a){setTimeout(J,1);return}e.ready()}}var e=function(a,b){return new e.fn.init(a,b,h)},f=a.jQuery,g=a.$,h,i=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,n=/^[\],:{}\s]*$/,o=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,p=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,q=/(?:^|:|,)(?:\s*\[)+/g,r=/(webkit)[ \/]([\w.]+)/,s=/(opera)(?:.*version)?[ \/]([\w.]+)/,t=/(msie) ([\w.]+)/,u=/(mozilla)(?:.*? rv:([\w.]+))?/,v=/-([a-z]|[0-9])/ig,w=/^-ms-/,x=function(a,b){return(b+"").toUpperCase()
},y=d.userAgent,z,A,B,C=Object.prototype.toString,D=Object.prototype.hasOwnProperty,E=Array.prototype.push,F=Array.prototype.slice,G=String.prototype.trim,H=Array.prototype.indexOf,I={};
e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a){return this}if(a.nodeType){this.context=this[0]=a,this.length=1;
return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this
}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];
if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=m.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);
return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2]){return f.find(a)}this.length=1,this[0]=h
}this.context=c,this.selector=a;return this}return !d||d.jquery?(d||f).find(a):this.constructor(d).find(a)
}if(e.isFunction(a)){return f.ready(a)}a.selector!==b&&(this.selector=a.selector,this.context=a.context);
return e.makeArray(a,this)},selector:"",jquery:"1.7.2",length:0,size:function(){return this.length},toArray:function(){return F.call(this,0)
},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();
e.isArray(a)?E.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");
return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),A.add(a);return this
},eq:function(a){a=+a;return a===-1?this.slice(a):this.slice(a,a+1)},first:function(){return this.eq(0)
},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(F.apply(this,arguments),"slice",F.call(arguments).join(","))
},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)
},push:E,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;
typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);
for(;j<k;j++){if((a=arguments[j])!=null){for(c in a){d=i[c],f=a[c];if(i===f){continue}l&&f&&(e.isPlainObject(f)||(g=e.isArray(f)))?(g?(g=!1,h=d&&e.isArray(d)?d:[]):h=d&&e.isPlainObject(d)?d:{},i[c]=e.extend(l,h,f)):f!==b&&(i[c]=f)
}}}return i},e.extend({noConflict:function(b){a.$===e&&(a.$=g),b&&a.jQuery===e&&(a.jQuery=f);return e
},isReady:!1,readyWait:1,holdReady:function(a){a?e.readyWait++:e.ready(!0)},ready:function(a){if(a===!0&&!--e.readyWait||a!==!0&&!e.isReady){if(!c.body){return setTimeout(e.ready,1)
}e.isReady=!0;if(a!==!0&&--e.readyWait>0){return}A.fireWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").off("ready")
}},bindReady:function(){if(!A){A=e.Callbacks("once memory");if(c.readyState==="complete"){return setTimeout(e.ready,1)
}if(c.addEventListener){c.addEventListener("DOMContentLoaded",B,!1),a.addEventListener("load",e.ready,!1)
}else{if(c.attachEvent){c.attachEvent("onreadystatechange",B),a.attachEvent("onload",e.ready);var b=!1;
try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&J()}}}},isFunction:function(a){return e.type(a)==="function"
},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a!=null&&a==a.window
},isNumeric:function(a){return !isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return a==null?String(a):I[C.call(a)]||"object"
},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a)){return !1}try{if(a.constructor&&!D.call(a,"constructor")&&!D.call(a.constructor.prototype,"isPrototypeOf")){return !1
}}catch(c){return !1}var d;for(d in a){}return d===b||D.call(a,d)},isEmptyObject:function(a){for(var b in a){return !1
}return !0},error:function(a){throw new Error(a)},parseJSON:function(b){if(typeof b!="string"||!b){return null
}b=e.trim(b);if(a.JSON&&a.JSON.parse){return a.JSON.parse(b)}if(n.test(b.replace(o,"@").replace(p,"]").replace(q,""))){return(new Function("return "+b))()
}e.error("Invalid JSON: "+b)},parseXML:function(c){if(typeof c!="string"||!c){return null}var d,f;try{a.DOMParser?(f=new DOMParser,d=f.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))
}catch(g){d=b}(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&e.error("Invalid XML: "+c);
return d},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)
})(b)},camelCase:function(a){return a.replace(w,"ms-").replace(v,x)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()
},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a){if(c.apply(a[f],d)===!1){break
}}}else{for(;g<h;){if(c.apply(a[g++],d)===!1){break}}}}else{if(i){for(f in a){if(c.call(a[f],f,a[f])===!1){break
}}}else{for(;g<h;){if(c.call(a[g],g,a[g++])===!1){break}}}}return a},trim:G?function(a){return a==null?"":G.call(a)
}:function(a){return a==null?"":(a+"").replace(k,"").replace(l,"")},makeArray:function(a,b){var c=b||[];
if(a!=null){var d=e.type(a);a.length==null||d==="string"||d==="function"||d==="regexp"||e.isWindow(a)?E.call(c,a):e.merge(c,a)
}return c},inArray:function(a,b,c){var d;if(b){if(H){return H.call(b,a,c)}d=b.length,c=c?c<0?Math.max(0,d+c):c:0;
for(;c<d;c++){if(c in b&&b[c]===a){return c}}}return -1},merge:function(a,c){var d=a.length,e=0;if(typeof c.length=="number"){for(var f=c.length;
e<f;e++){a[d++]=c[e]}}else{while(c[e]!==b){a[d++]=c[e++]}}a.length=d;return a},grep:function(a,b,c){var d=[],e;
c=!!c;for(var f=0,g=a.length;f<g;f++){e=!!b(a[f],f),c!==e&&d.push(a[f])}return d},map:function(a,c,d){var f,g,h=[],i=0,j=a.length,k=a instanceof e||j!==b&&typeof j=="number"&&(j>0&&a[0]&&a[j-1]||j===0||e.isArray(a));
if(k){for(;i<j;i++){f=c(a[i],i,d),f!=null&&(h[h.length]=f)}}else{for(g in a){f=c(a[g],g,d),f!=null&&(h[h.length]=f)
}}return h.concat.apply([],h)},guid:1,proxy:function(a,c){if(typeof c=="string"){var d=a[c];c=a,a=d}if(!e.isFunction(a)){return b
}var f=F.call(arguments,2),g=function(){return a.apply(c,f.concat(F.call(arguments)))};g.guid=a.guid=a.guid||g.guid||e.guid++;
return g},access:function(a,c,d,f,g,h,i){var j,k=d==null,l=0,m=a.length;if(d&&typeof d=="object"){for(l in d){e.access(a,c,l,d[l],1,h,f)
}g=1}else{if(f!==b){j=i===b&&e.isFunction(f),k&&(j?(j=c,c=function(a,b,c){return j.call(e(a),c)}):(c.call(a,f),c=null));
if(c){for(;l<m;l++){c(a[l],d,j?f.call(a[l],l,c(a[l],d)):f,i)}}g=1}}return g?a:k?c.call(a):m?c(a[0],d):h
},now:function(){return(new Date).getTime()},uaMatch:function(a){a=a.toLowerCase();var b=r.exec(a)||s.exec(a)||t.exec(a)||a.indexOf("compatible")<0&&u.exec(a)||[];
return{browser:b[1]||"",version:b[2]||"0"}},sub:function(){function a(b,c){return new a.fn.init(b,c)}e.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.sub=this.sub,a.fn.init=function(d,f){f&&f instanceof e&&!(f instanceof a)&&(f=a(f));
return e.fn.init.call(this,d,f,b)},a.fn.init.prototype=a.fn;var b=a(c);return a},browser:{}}),e.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(a,b){I["[object "+b+"]"]=b.toLowerCase()
}),z=e.uaMatch(y),z.browser&&(e.browser[z.browser]=!0,e.browser.version=z.version),e.browser.webkit&&(e.browser.safari=!0),j.test(" ")&&(k=/^[\s\xA0]+/,l=/[\s\xA0]+$/),h=e(c),c.addEventListener?B=function(){c.removeEventListener("DOMContentLoaded",B,!1),e.ready()
}:c.attachEvent&&(B=function(){c.readyState==="complete"&&(c.detachEvent("onreadystatechange",B),e.ready())
});return e}(),g={};f.Callbacks=function(a){a=a?g[a]||h(a):{};var c=[],d=[],e,i,j,k,l,m,n=function(b){var d,e,g,h,i;
for(d=0,e=b.length;d<e;d++){g=b[d],h=f.type(g),h==="array"?n(g):h==="function"&&(!a.unique||!p.has(g))&&c.push(g)
}},o=function(b,f){f=f||[],e=!a.memory||[b,f],i=!0,j=!0,m=k||0,k=0,l=c.length;for(;c&&m<l;m++){if(c[m].apply(b,f)===!1&&a.stopOnFalse){e=!0;
break}}j=!1,c&&(a.once?e===!0?p.disable():c=[]:d&&d.length&&(e=d.shift(),p.fireWith(e[0],e[1])))},p={add:function(){if(c){var a=c.length;
n(arguments),j?l=c.length:e&&e!==!0&&(k=a,o(e[0],e[1]))}return this},remove:function(){if(c){var b=arguments,d=0,e=b.length;
for(;d<e;d++){for(var f=0;f<c.length;f++){if(b[d]===c[f]){j&&f<=l&&(l--,f<=m&&m--),c.splice(f--,1);if(a.unique){break
}}}}}return this},has:function(a){if(c){var b=0,d=c.length;for(;b<d;b++){if(a===c[b]){return !0}}}return !1
},empty:function(){c=[];return this},disable:function(){c=d=e=b;return this},disabled:function(){return !c
},lock:function(){d=b,(!e||e===!0)&&p.disable();return this},locked:function(){return !d},fireWith:function(b,c){d&&(j?a.once||d.push([b,c]):(!a.once||!e)&&o(b,c));
return this},fire:function(){p.fireWith(this,arguments);return this},fired:function(){return !!i}};return p
};var i=[].slice;f.extend({Deferred:function(a){var b=f.Callbacks("once memory"),c=f.Callbacks("once memory"),d=f.Callbacks("memory"),e="pending",g={resolve:b,reject:c,notify:d},h={done:b.add,fail:c.add,progress:d.add,state:function(){return e
},isResolved:b.fired,isRejected:c.fired,then:function(a,b,c){i.done(a).fail(b).progress(c);return this
},always:function(){i.done.apply(i,arguments).fail.apply(i,arguments);return this},pipe:function(a,b,c){return f.Deferred(function(d){f.each({done:[a,"resolve"],fail:[b,"reject"],progress:[c,"notify"]},function(a,b){var c=b[0],e=b[1],g;
f.isFunction(c)?i[a](function(){g=c.apply(this,arguments),g&&f.isFunction(g.promise)?g.promise().then(d.resolve,d.reject,d.notify):d[e+"With"](this===i?d:this,[g])
}):i[a](d[e])})}).promise()},promise:function(a){if(a==null){a=h}else{for(var b in h){a[b]=h[b]}}return a
}},i=h.promise({}),j;for(j in g){i[j]=g[j].fire,i[j+"With"]=g[j].fireWith}i.done(function(){e="resolved"
},c.disable,d.lock).fail(function(){e="rejected"},b.disable,d.lock),a&&a.call(i,i);return i},when:function(a){function m(a){return function(b){e[a]=arguments.length>1?i.call(arguments,0):b,j.notifyWith(k,e)
}}function l(a){return function(c){b[a]=arguments.length>1?i.call(arguments,0):c,--g||j.resolveWith(j,b)
}}var b=i.call(arguments,0),c=0,d=b.length,e=Array(d),g=d,h=d,j=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred(),k=j.promise();
if(d>1){for(;c<d;c++){b[c]&&b[c].promise&&f.isFunction(b[c].promise)?b[c].promise().then(l(c),j.reject,m(c)):--g
}g||j.resolveWith(j,b)}else{j!==a&&j.resolveWith(j,d?[a]:[])}return k}}),f.support=function(){var b,d,e,g,h,i,j,k,l,m,n,o,p=c.createElement("div"),q=c.documentElement;
p.setAttribute("className","t"),p.innerHTML="   <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>",d=p.getElementsByTagName("*"),e=p.getElementsByTagName("a")[0];
if(!d||!d.length||!e){return{}}g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=p.getElementsByTagName("input")[0],b={leadingWhitespace:p.firstChild.nodeType===3,tbody:!p.getElementsByTagName("tbody").length,htmlSerialize:!!p.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:p.className!=="t",enctype:!!c.createElement("form").enctype,html5Clone:c.createElement("nav").cloneNode(!0).outerHTML!=="<:nav></:nav>",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,pixelMargin:!0},f.boxModel=b.boxModel=c.compatMode==="CSS1Compat",i.checked=!0,b.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,b.optDisabled=!h.disabled;
try{delete p.test}catch(r){b.deleteExpando=!1}!p.addEventListener&&p.attachEvent&&p.fireEvent&&(p.attachEvent("onclick",function(){b.noCloneEvent=!1
}),p.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),b.radioValue=i.value==="t",i.setAttribute("checked","checked"),i.setAttribute("name","t"),p.appendChild(i),j=c.createDocumentFragment(),j.appendChild(p.lastChild),b.checkClone=j.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecked=i.checked,j.removeChild(i),j.appendChild(p);
if(p.attachEvent){for(n in {submit:1,change:1,focusin:1}){m="on"+n,o=m in p,o||(p.setAttribute(m,"return;"),o=typeof p[m]=="function"),b[n+"Bubbles"]=o
}}j.removeChild(p),j=g=h=p=i=null,f(function(){var d,e,g,h,i,j,l,m,n,q,r,s,t,u=c.getElementsByTagName("body")[0];
!u||(m=1,t="padding:0;margin:0;border:",r="position:absolute;top:0;left:0;width:1px;height:1px;",s=t+"0;visibility:hidden;",n="style='"+r+t+"5px solid #000;",q="<div "+n+"display:block;'><div style='"+t+"0;display:block;overflow:hidden;'></div></div>"+"<table "+n+"' cellpadding='0' cellspacing='0'>"+"<tr><td></td></tr></table>",d=c.createElement("div"),d.style.cssText=s+"width:0;height:0;position:static;top:0;margin-top:"+m+"px",u.insertBefore(d,u.firstChild),p=c.createElement("div"),d.appendChild(p),p.innerHTML="<table><tr><td style='"+t+"0;display:none'></td><td>t</td></tr></table>",k=p.getElementsByTagName("td"),o=k[0].offsetHeight===0,k[0].style.display="",k[1].style.display="none",b.reliableHiddenOffsets=o&&k[0].offsetHeight===0,a.getComputedStyle&&(p.innerHTML="",l=c.createElement("div"),l.style.width="0",l.style.marginRight="0",p.style.width="2px",p.appendChild(l),b.reliableMarginRight=(parseInt((a.getComputedStyle(l,null)||{marginRight:0}).marginRight,10)||0)===0),typeof p.style.zoom!="undefined"&&(p.innerHTML="",p.style.width=p.style.padding="1px",p.style.border=0,p.style.overflow="hidden",p.style.display="inline",p.style.zoom=1,b.inlineBlockNeedsLayout=p.offsetWidth===3,p.style.display="block",p.style.overflow="visible",p.innerHTML="<div style='width:5px;'></div>",b.shrinkWrapBlocks=p.offsetWidth!==3),p.style.cssText=r+s,p.innerHTML=q,e=p.firstChild,g=e.firstChild,i=e.nextSibling.firstChild.firstChild,j={doesNotAddBorder:g.offsetTop!==5,doesAddBorderForTableAndCells:i.offsetTop===5},g.style.position="fixed",g.style.top="20px",j.fixedPosition=g.offsetTop===20||g.offsetTop===15,g.style.position=g.style.top="",e.style.overflow="hidden",e.style.position="relative",j.subtractsBorderForOverflowNotVisible=g.offsetTop===-5,j.doesNotIncludeMarginInBodyOffset=u.offsetTop!==m,a.getComputedStyle&&(p.style.marginTop="1%",b.pixelMargin=(a.getComputedStyle(p,null)||{marginTop:0}).marginTop!=="1%"),typeof d.style.zoom!="undefined"&&(d.style.zoom=1),u.removeChild(d),l=p=d=null,f.extend(b,j))
});return b}();var j=/^(?:\{.*\}|\[.*\])$/,k=/([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];
return !!a&&!m(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g,h,i,j=f.expando,k=typeof c=="string",l=a.nodeType,m=l?f.cache:a,n=l?a[j]:a[j]&&j,o=c==="events";
if((!n||!m[n]||!o&&!e&&!m[n].data)&&k&&d===b){return}n||(l?a[j]=n=++f.uuid:n=j),m[n]||(m[n]={},l||(m[n].toJSON=f.noop));
if(typeof c=="object"||typeof c=="function"){e?m[n]=f.extend(m[n],c):m[n].data=f.extend(m[n].data,c)}g=h=m[n],e||(h.data||(h.data={}),h=h.data),d!==b&&(h[f.camelCase(c)]=d);
if(o&&!h[c]){return g.events}k?(i=h[c],i==null&&(i=h[f.camelCase(c)])):i=h;return i}},removeData:function(a,b,c){if(!!f.acceptData(a)){var d,e,g,h=f.expando,i=a.nodeType,j=i?f.cache:a,k=i?a[h]:h;
if(!j[k]){return}if(b){d=c?j[k]:j[k].data;if(d){f.isArray(b)||(b in d?b=[b]:(b=f.camelCase(b),b in d?b=[b]:b=b.split(" ")));
for(e=0,g=b.length;e<g;e++){delete d[b[e]]}if(!(c?m:f.isEmptyObject)(d)){return}}}if(!c){delete j[k].data;
if(!m(j[k])){return}}f.support.deleteExpando||!j.setInterval?delete j[k]:j[k]=null,i&&(f.support.deleteExpando?delete a[h]:a.removeAttribute?a.removeAttribute(h):a[h]=null)
}},_data:function(a,b,c){return f.data(a,b,c,!0)},acceptData:function(a){if(a.nodeName){var b=f.noData[a.nodeName.toLowerCase()];
if(b){return b!==!0&&a.getAttribute("classid")===b}}return !0}}),f.fn.extend({data:function(a,c){var d,e,g,h,i,j=this[0],k=0,m=null;
if(a===b){if(this.length){m=f.data(j);if(j.nodeType===1&&!f._data(j,"parsedAttrs")){g=j.attributes;for(i=g.length;
k<i;k++){h=g[k].name,h.indexOf("data-")===0&&(h=f.camelCase(h.substring(5)),l(j,h,m[h]))}f._data(j,"parsedAttrs",!0)
}}return m}if(typeof a=="object"){return this.each(function(){f.data(this,a)})}d=a.split(".",2),d[1]=d[1]?"."+d[1]:"",e=d[1]+"!";
return f.access(this,function(c){if(c===b){m=this.triggerHandler("getData"+e,[d[0]]),m===b&&j&&(m=f.data(j,a),m=l(j,a,m));
return m===b&&d[1]?this.data(d[0]):m}d[1]=c,this.each(function(){var b=f(this);b.triggerHandler("setData"+e,d),f.data(this,a,c),b.triggerHandler("changeData"+e,d)
})},null,c,arguments.length>1,null,!1)},removeData:function(a){return this.each(function(){f.removeData(this,a)
})}}),f.extend({_mark:function(a,b){a&&(b=(b||"fx")+"mark",f._data(a,b,(f._data(a,b)||0)+1))},_unmark:function(a,b,c){a!==!0&&(c=b,b=a,a=!1);
if(b){c=c||"fx";var d=c+"mark",e=a?0:(f._data(b,d)||1)-1;e?f._data(b,d,e):(f.removeData(b,d,!0),n(b,c,"mark"))
}},queue:function(a,b,c){var d;if(a){b=(b||"fx")+"queue",d=f._data(a,b),c&&(!d||f.isArray(c)?d=f._data(a,b,f.makeArray(c)):d.push(c));
return d||[]}},dequeue:function(a,b){b=b||"fx";var c=f.queue(a,b),d=c.shift(),e={};d==="inprogress"&&(d=c.shift()),d&&(b==="fx"&&c.unshift("inprogress"),f._data(a,b+".run",e),d.call(a,function(){f.dequeue(a,b)
},e)),c.length||(f.removeData(a,b+"queue "+b+".run",!0),n(a,b,"queue"))}}),f.fn.extend({queue:function(a,c){var d=2;
typeof a!="string"&&(c=a,a="fx",d--);if(arguments.length<d){return f.queue(this[0],a)}return c===b?this:this.each(function(){var b=f.queue(this,a,c);
a==="fx"&&b[0]!=="inprogress"&&f.dequeue(this,a)})},dequeue:function(a){return this.each(function(){f.dequeue(this,a)
})},delay:function(a,b){a=f.fx?f.fx.speeds[a]||a:a,b=b||"fx";return this.queue(b,function(b,c){var d=setTimeout(b,a);
c.stop=function(){clearTimeout(d)}})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,c){function m(){--h||d.resolveWith(e,[e])
}typeof a!="string"&&(c=a,a=b),a=a||"fx";var d=f.Deferred(),e=this,g=e.length,h=1,i=a+"defer",j=a+"queue",k=a+"mark",l;
while(g--){if(l=f.data(e[g],i,b,!0)||(f.data(e[g],j,b,!0)||f.data(e[g],k,b,!0))&&f.data(e[g],i,f.Callbacks("once memory"),!0)){h++,l.add(m)
}}m();return d.promise(c)}});var o=/[\n\t\r]/g,p=/\s+/,q=/\r/g,r=/^(?:button|input)$/i,s=/^(?:button|input|object|select|textarea)$/i,t=/^a(?:rea)?$/i,u=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,v=f.support.getSetAttribute,w,x,y;
f.fn.extend({attr:function(a,b){return f.access(this,f.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){f.removeAttr(this,a)
})},prop:function(a,b){return f.access(this,f.prop,a,b,arguments.length>1)},removeProp:function(a){a=f.propFix[a]||a;
return this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,g,h,i;
if(f.isFunction(a)){return this.each(function(b){f(this).addClass(a.call(this,b,this.className))})}if(a&&typeof a=="string"){b=a.split(p);
for(c=0,d=this.length;c<d;c++){e=this[c];if(e.nodeType===1){if(!e.className&&b.length===1){e.className=a
}else{g=" "+e.className+" ";for(h=0,i=b.length;h<i;h++){~g.indexOf(" "+b[h]+" ")||(g+=b[h]+" ")}e.className=f.trim(g)
}}}}return this},removeClass:function(a){var c,d,e,g,h,i,j;if(f.isFunction(a)){return this.each(function(b){f(this).removeClass(a.call(this,b,this.className))
})}if(a&&typeof a=="string"||a===b){c=(a||"").split(p);for(d=0,e=this.length;d<e;d++){g=this[d];if(g.nodeType===1&&g.className){if(a){h=(" "+g.className+" ").replace(o," ");
for(i=0,j=c.length;i<j;i++){h=h.replace(" "+c[i]+" "," ")}g.className=f.trim(h)}else{g.className=""}}}}return this
},toggleClass:function(a,b){var c=typeof a,d=typeof b=="boolean";if(f.isFunction(a)){return this.each(function(c){f(this).toggleClass(a.call(this,c,this.className,b),b)
})}return this.each(function(){if(c==="string"){var e,g=0,h=f(this),i=b,j=a.split(p);while(e=j[g++]){i=d?i:!h.hasClass(e),h[i?"addClass":"removeClass"](e)
}}else{if(c==="undefined"||c==="boolean"){this.className&&f._data(this,"__className__",this.className),this.className=this.className||a===!1?"":f._data(this,"__className__")||""
}}})},hasClass:function(a){var b=" "+a+" ",c=0,d=this.length;for(;c<d;c++){if(this[c].nodeType===1&&(" "+this[c].className+" ").replace(o," ").indexOf(b)>-1){return !0
}}return !1},val:function(a){var c,d,e,g=this[0];if(!!arguments.length){e=f.isFunction(a);return this.each(function(d){var g=f(this),h;
if(this.nodeType===1){e?h=a.call(this,d,g.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""
})),c=f.valHooks[this.type]||f.valHooks[this.nodeName.toLowerCase()];if(!c||!("set" in c)||c.set(this,h,"value")===b){this.value=h
}}})}if(g){c=f.valHooks[g.type]||f.valHooks[g.nodeName.toLowerCase()];if(c&&"get" in c&&(d=c.get(g,"value"))!==b){return d
}d=g.value;return typeof d=="string"?d.replace(q,""):d==null?"":d}}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;
return !b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,g=a.selectedIndex,h=[],i=a.options,j=a.type==="select-one";
if(g<0){return null}c=j?g:0,d=j?g+1:i.length;for(;c<d;c++){e=i[c];if(e.selected&&(f.support.optDisabled?!e.disabled:e.getAttribute("disabled")===null)&&(!e.parentNode.disabled||!f.nodeName(e.parentNode,"optgroup"))){b=f(e).val();
if(j){return b}h.push(b)}}if(j&&!h.length&&i.length){return f(i[g]).val()}return h},set:function(a,b){var c=f.makeArray(b);
f(a).find("option").each(function(){this.selected=f.inArray(f(this).val(),c)>=0}),c.length||(a.selectedIndex=-1);
return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,d,e){var g,h,i,j=a.nodeType;
if(!!a&&j!==3&&j!==8&&j!==2){if(e&&c in f.attrFn){return f(a)[c](d)}if(typeof a.getAttribute=="undefined"){return f.prop(a,c,d)
}i=j!==1||!f.isXMLDoc(a),i&&(c=c.toLowerCase(),h=f.attrHooks[c]||(u.test(c)?x:w));if(d!==b){if(d===null){f.removeAttr(a,c);
return}if(h&&"set" in h&&i&&(g=h.set(a,d,c))!==b){return g}a.setAttribute(c,""+d);return d}if(h&&"get" in h&&i&&(g=h.get(a,c))!==null){return g
}g=a.getAttribute(c);return g===null?b:g}},removeAttr:function(a,b){var c,d,e,g,h,i=0;if(b&&a.nodeType===1){d=b.toLowerCase().split(p),g=d.length;
for(;i<g;i++){e=d[i],e&&(c=f.propFix[e]||e,h=u.test(e),h||f.attr(a,e,""),a.removeAttribute(v?e:c),h&&c in a&&(a[c]=!1))
}}},attrHooks:{type:{set:function(a,b){if(r.test(a.nodeName)&&a.parentNode){f.error("type property can't be changed")
}else{if(!f.support.radioValue&&b==="radio"&&f.nodeName(a,"input")){var c=a.value;a.setAttribute("type",b),c&&(a.value=c);
return b}}}},value:{get:function(a,b){if(w&&f.nodeName(a,"button")){return w.get(a,b)}return b in a?a.value:null
},set:function(a,b,c){if(w&&f.nodeName(a,"button")){return w.set(a,b,c)}a.value=b}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(a,c,d){var e,g,h,i=a.nodeType;
if(!!a&&i!==3&&i!==8&&i!==2){h=i!==1||!f.isXMLDoc(a),h&&(c=f.propFix[c]||c,g=f.propHooks[c]);return d!==b?g&&"set" in g&&(e=g.set(a,d,c))!==b?e:a[c]=d:g&&"get" in g&&(e=g.get(a,c))!==null?e:a[c]
}},propHooks:{tabIndex:{get:function(a){var c=a.getAttributeNode("tabindex");return c&&c.specified?parseInt(c.value,10):s.test(a.nodeName)||t.test(a.nodeName)&&a.href?0:b
}}}}),f.attrHooks.tabindex=f.propHooks.tabIndex,x={get:function(a,c){var d,e=f.prop(a,c);return e===!0||typeof e!="boolean"&&(d=a.getAttributeNode(c))&&d.nodeValue!==!1?c.toLowerCase():b
},set:function(a,b,c){var d;b===!1?f.removeAttr(a,c):(d=f.propFix[c]||c,d in a&&(a[d]=!0),a.setAttribute(c,c.toLowerCase()));
return c}},v||(y={name:!0,id:!0,coords:!0},w=f.valHooks.button={get:function(a,c){var d;d=a.getAttributeNode(c);
return d&&(y[c]?d.nodeValue!=="":d.specified)?d.nodeValue:b},set:function(a,b,d){var e=a.getAttributeNode(d);
e||(e=c.createAttribute(d),a.setAttributeNode(e));return e.nodeValue=b+""}},f.attrHooks.tabindex.set=w.set,f.each(["width","height"],function(a,b){f.attrHooks[b]=f.extend(f.attrHooks[b],{set:function(a,c){if(c===""){a.setAttribute(b,"auto");
return c}}})}),f.attrHooks.contenteditable={get:w.get,set:function(a,b,c){b===""&&(b="false"),w.set(a,b,c)
}}),f.support.hrefNormalized||f.each(["href","src","width","height"],function(a,c){f.attrHooks[c]=f.extend(f.attrHooks[c],{get:function(a){var d=a.getAttribute(c,2);
return d===null?b:d}})}),f.support.style||(f.attrHooks.style={get:function(a){return a.style.cssText.toLowerCase()||b
},set:function(a,b){return a.style.cssText=""+b}}),f.support.optSelected||(f.propHooks.selected=f.extend(f.propHooks.selected,{get:function(a){var b=a.parentNode;
b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex);return null}})),f.support.enctype||(f.propFix.enctype="encoding"),f.support.checkOn||f.each(["radio","checkbox"],function(){f.valHooks[this]={get:function(a){return a.getAttribute("value")===null?"on":a.value
}}}),f.each(["radio","checkbox"],function(){f.valHooks[this]=f.extend(f.valHooks[this],{set:function(a,b){if(f.isArray(b)){return a.checked=f.inArray(f(a).val(),b)>=0
}}})});var z=/^(?:textarea|input|select)$/i,A=/^([^\.]*)?(?:\.(.+))?$/,B=/(?:^|\s)hover(\.\S+)?\b/,C=/^key/,D=/^(?:mouse|contextmenu)|click/,E=/^(?:focusinfocus|focusoutblur)$/,F=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,G=function(a){var b=F.exec(a);
b&&(b[1]=(b[1]||"").toLowerCase(),b[3]=b[3]&&new RegExp("(?:^|\\s)"+b[3]+"(?:\\s|$)"));return b},H=function(a,b){var c=a.attributes||{};
return(!b[1]||a.nodeName.toLowerCase()===b[1])&&(!b[2]||(c.id||{}).value===b[2])&&(!b[3]||b[3].test((c["class"]||{}).value))
},I=function(a){return f.event.special.hover?a:a.replace(B,"mouseenter$1 mouseleave$1")};f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;
if(!(a.nodeType===3||a.nodeType===8||!c||!d||!(h=f._data(a)))){d.handler&&(p=d,d=p.handler,g=p.selector),d.guid||(d.guid=f.guid++),j=h.events,j||(h.events=j={}),i=h.handle,i||(h.handle=i=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.dispatch.apply(i.elem,arguments):b
},i.elem=a),c=f.trim(I(c)).split(" ");for(k=0;k<c.length;k++){l=A.exec(c[k])||[],m=l[1],n=(l[2]||"").split(".").sort(),s=f.event.special[m]||{},m=(g?s.delegateType:s.bindType)||m,s=f.event.special[m]||{},o=f.extend({type:m,origType:l[1],data:e,handler:d,guid:d.guid,selector:g,quick:g&&G(g),namespace:n.join(".")},p),r=j[m];
if(!r){r=j[m]=[],r.delegateCount=0;if(!s.setup||s.setup.call(a,e,n,i)===!1){a.addEventListener?a.addEventListener(m,i,!1):a.attachEvent&&a.attachEvent("on"+m,i)
}}s.add&&(s.add.call(a,o),o.handler.guid||(o.handler.guid=d.guid)),g?r.splice(r.delegateCount++,0,o):r.push(o),f.event.global[m]=!0
}a=null}},global:{},remove:function(a,b,c,d,e){var g=f.hasData(a)&&f._data(a),h,i,j,k,l,m,n,o,p,q,r,s;
if(!!g&&!!(o=g.events)){b=f.trim(I(b||"")).split(" ");for(h=0;h<b.length;h++){i=A.exec(b[h])||[],j=k=i[1],l=i[2];
if(!j){for(j in o){f.event.remove(a,j+b[h],c,d,!0)}continue}p=f.event.special[j]||{},j=(d?p.delegateType:p.bindType)||j,r=o[j]||[],m=r.length,l=l?new RegExp("(^|\\.)"+l.split(".").sort().join("\\.(?:.*\\.)?")+"(\\.|$)"):null;
for(n=0;n<r.length;n++){s=r[n],(e||k===s.origType)&&(!c||c.guid===s.guid)&&(!l||l.test(s.namespace))&&(!d||d===s.selector||d==="**"&&s.selector)&&(r.splice(n--,1),s.selector&&r.delegateCount--,p.remove&&p.remove.call(a,s))
}r.length===0&&m!==r.length&&((!p.teardown||p.teardown.call(a,l)===!1)&&f.removeEvent(a,j,g.handle),delete o[j])
}f.isEmptyObject(o)&&(q=g.handle,q&&(q.elem=null),f.removeData(a,["events","handle"],!0))}},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(c,d,e,g){if(!e||e.nodeType!==3&&e.nodeType!==8){var h=c.type||c,i=[],j,k,l,m,n,o,p,q,r,s;
if(E.test(h+f.event.triggered)){return}h.indexOf("!")>=0&&(h=h.slice(0,-1),k=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());
if((!e||f.event.customEvent[h])&&!f.event.global[h]){return}c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.isTrigger=!0,c.exclusive=k,c.namespace=i.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)"):null,o=h.indexOf(":")<0?"on"+h:"";
if(!e){j=f.cache;for(l in j){j[l].events&&j[l].events[h]&&f.event.trigger(c,d,j[l].handle.elem,!0)}return
}c.result=b,c.target||(c.target=e),d=d!=null?f.makeArray(d):[],d.unshift(c),p=f.event.special[h]||{};
if(p.trigger&&p.trigger.apply(e,d)===!1){return}r=[[e,p.bindType||h]];if(!g&&!p.noBubble&&!f.isWindow(e)){s=p.delegateType||h,m=E.test(s+h)?e:e.parentNode,n=null;
for(;m;m=m.parentNode){r.push([m,s]),n=m}n&&n===e.ownerDocument&&r.push([n.defaultView||n.parentWindow||a,s])
}for(l=0;l<r.length&&!c.isPropagationStopped();l++){m=r[l][0],c.type=r[l][1],q=(f._data(m,"events")||{})[c.type]&&f._data(m,"handle"),q&&q.apply(m,d),q=o&&m[o],q&&f.acceptData(m)&&q.apply(m,d)===!1&&c.preventDefault()
}c.type=h,!g&&!c.isDefaultPrevented()&&(!p._default||p._default.apply(e.ownerDocument,d)===!1)&&(h!=="click"||!f.nodeName(e,"a"))&&f.acceptData(e)&&o&&e[h]&&(h!=="focus"&&h!=="blur"||c.target.offsetWidth!==0)&&!f.isWindow(e)&&(n=e[o],n&&(e[o]=null),f.event.triggered=h,e[h](),f.event.triggered=b,n&&(e[o]=n));
return c.result}},dispatch:function(c){c=f.event.fix(c||a.event);var d=(f._data(this,"events")||{})[c.type]||[],e=d.delegateCount,g=[].slice.call(arguments,0),h=!c.exclusive&&!c.namespace,i=f.event.special[c.type]||{},j=[],k,l,m,n,o,p,q,r,s,t,u;
g[0]=c,c.delegateTarget=this;if(!i.preDispatch||i.preDispatch.call(this,c)!==!1){if(e&&(!c.button||c.type!=="click")){n=f(this),n.context=this.ownerDocument||this;
for(m=c.target;m!=this;m=m.parentNode||this){if(m.disabled!==!0){p={},r=[],n[0]=m;for(k=0;k<e;k++){s=d[k],t=s.selector,p[t]===b&&(p[t]=s.quick?H(m,s.quick):n.is(t)),p[t]&&r.push(s)
}r.length&&j.push({elem:m,matches:r})}}}d.length>e&&j.push({elem:this,matches:d.slice(e)});for(k=0;k<j.length&&!c.isPropagationStopped();
k++){q=j[k],c.currentTarget=q.elem;for(l=0;l<q.matches.length&&!c.isImmediatePropagationStopped();l++){s=q.matches[l];
if(h||!c.namespace&&!s.namespace||c.namespace_re&&c.namespace_re.test(s.namespace)){c.data=s.data,c.handleObj=s,o=((f.event.special[s.origType]||{}).handle||s.handler).apply(q.elem,g),o!==b&&(c.result=o,o===!1&&(c.preventDefault(),c.stopPropagation()))
}}}i.postDispatch&&i.postDispatch.call(this,c);return c.result}},props:"attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){a.which==null&&(a.which=b.charCode!=null?b.charCode:b.keyCode);
return a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,d){var e,f,g,h=d.button,i=d.fromElement;
a.pageX==null&&d.clientX!=null&&(e=a.target.ownerDocument||c,f=e.documentElement,g=e.body,a.pageX=d.clientX+(f&&f.scrollLeft||g&&g.scrollLeft||0)-(f&&f.clientLeft||g&&g.clientLeft||0),a.pageY=d.clientY+(f&&f.scrollTop||g&&g.scrollTop||0)-(f&&f.clientTop||g&&g.clientTop||0)),!a.relatedTarget&&i&&(a.relatedTarget=i===a.target?d.toElement:i),!a.which&&h!==b&&(a.which=h&1?1:h&2?3:h&4?2:0);
return a}},fix:function(a){if(a[f.expando]){return a}var d,e,g=a,h=f.event.fixHooks[a.type]||{},i=h.props?this.props.concat(h.props):this.props;
a=f.Event(g);for(d=i.length;d;){e=i[--d],a[e]=g[e]}a.target||(a.target=g.srcElement||c),a.target.nodeType===3&&(a.target=a.target.parentNode),a.metaKey===b&&(a.metaKey=a.ctrlKey);
return h.filter?h.filter(a,g):a},special:{ready:{setup:f.bindReady},load:{noBubble:!0},focus:{delegateType:"focusin"},blur:{delegateType:"focusout"},beforeunload:{setup:function(a,b,c){f.isWindow(this)&&(this.onbeforeunload=c)
},teardown:function(a,b){this.onbeforeunload===b&&(this.onbeforeunload=null)}}},simulate:function(a,b,c,d){var e=f.extend(new f.Event,c,{type:a,isSimulated:!0,originalEvent:{}});
d?f.event.trigger(e,null,b):f.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},f.event.handle=f.event.dispatch,f.removeEvent=c.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)
}:function(a,b,c){a.detachEvent&&a.detachEvent("on"+b,c)},f.Event=function(a,b){if(!(this instanceof f.Event)){return new f.Event(a,b)
}a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault()?K:J):this.type=a,b&&f.extend(this,b),this.timeStamp=a&&a.timeStamp||f.now(),this[f.expando]=!0
},f.Event.prototype={preventDefault:function(){this.isDefaultPrevented=K;var a=this.originalEvent;!a||(a.preventDefault?a.preventDefault():a.returnValue=!1)
},stopPropagation:function(){this.isPropagationStopped=K;var a=this.originalEvent;!a||(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)
},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=K,this.stopPropagation()},isDefaultPrevented:J,isPropagationStopped:J,isImmediatePropagationStopped:J},f.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){f.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c=this,d=a.relatedTarget,e=a.handleObj,g=e.selector,h;
if(!d||d!==c&&!f.contains(c,d)){a.type=e.origType,h=e.handler.apply(this,arguments),a.type=b}return h
}}}),f.support.submitBubbles||(f.event.special.submit={setup:function(){if(f.nodeName(this,"form")){return !1
}f.event.add(this,"click._submit keypress._submit",function(a){var c=a.target,d=f.nodeName(c,"input")||f.nodeName(c,"button")?c.form:b;
d&&!d._submit_attached&&(f.event.add(d,"submit._submit",function(a){a._submit_bubble=!0}),d._submit_attached=!0)
})},postDispatch:function(a){a._submit_bubble&&(delete a._submit_bubble,this.parentNode&&!a.isTrigger&&f.event.simulate("submit",this.parentNode,a,!0))
},teardown:function(){if(f.nodeName(this,"form")){return !1}f.event.remove(this,"._submit")}}),f.support.changeBubbles||(f.event.special.change={setup:function(){if(z.test(this.nodeName)){if(this.type==="checkbox"||this.type==="radio"){f.event.add(this,"propertychange._change",function(a){a.originalEvent.propertyName==="checked"&&(this._just_changed=!0)
}),f.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1,f.event.simulate("change",this,a,!0))
})}return !1}f.event.add(this,"beforeactivate._change",function(a){var b=a.target;z.test(b.nodeName)&&!b._change_attached&&(f.event.add(b,"change._change",function(a){this.parentNode&&!a.isSimulated&&!a.isTrigger&&f.event.simulate("change",this.parentNode,a,!0)
}),b._change_attached=!0)})},handle:function(a){var b=a.target;if(this!==b||a.isSimulated||a.isTrigger||b.type!=="radio"&&b.type!=="checkbox"){return a.handleObj.handler.apply(this,arguments)
}},teardown:function(){f.event.remove(this,"._change");return z.test(this.nodeName)}}),f.support.focusinBubbles||f.each({focus:"focusin",blur:"focusout"},function(a,b){var d=0,e=function(a){f.event.simulate(b,a.target,f.event.fix(a),!0)
};f.event.special[b]={setup:function(){d++===0&&c.addEventListener(a,e,!0)},teardown:function(){--d===0&&c.removeEventListener(a,e,!0)
}}}),f.fn.extend({on:function(a,c,d,e,g){var h,i;if(typeof a=="object"){typeof c!="string"&&(d=d||c,c=b);
for(i in a){this.on(i,c,d,a[i],g)}return this}d==null&&e==null?(e=c,d=c=b):e==null&&(typeof c=="string"?(e=d,d=b):(e=d,d=c,c=b));
if(e===!1){e=J}else{if(!e){return this}}g===1&&(h=e,e=function(a){f().off(a);return h.apply(this,arguments)
},e.guid=h.guid||(h.guid=f.guid++));return this.each(function(){f.event.add(this,a,e,d,c)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)
},off:function(a,c,d){if(a&&a.preventDefault&&a.handleObj){var e=a.handleObj;f(a.delegateTarget).off(e.namespace?e.origType+"."+e.namespace:e.origType,e.selector,e.handler);
return this}if(typeof a=="object"){for(var g in a){this.off(g,c,a[g])}return this}if(c===!1||typeof c=="function"){d=c,c=b
}d===!1&&(d=J);return this.each(function(){f.event.remove(this,a,d,c)})},bind:function(a,b,c){return this.on(a,null,b,c)
},unbind:function(a,b){return this.off(a,null,b)},live:function(a,b,c){f(this.context).on(a,this.selector,b,c);
return this},die:function(a,b){f(this.context).off(a,this.selector||"**",b);return this},delegate:function(a,b,c,d){return this.on(b,a,c,d)
},undelegate:function(a,b,c){return arguments.length==1?this.off(a,"**"):this.off(b,a,c)},trigger:function(a,b){return this.each(function(){f.event.trigger(a,b,this)
})},triggerHandler:function(a,b){if(this[0]){return f.event.trigger(a,b,this[0],!0)}},toggle:function(a){var b=arguments,c=a.guid||f.guid++,d=0,e=function(c){var e=(f._data(this,"lastToggle"+a.guid)||0)%d;
f._data(this,"lastToggle"+a.guid,e+1),c.preventDefault();return b[e].apply(this,arguments)||!1};e.guid=c;
while(d<b.length){b[d++].guid=c}return this.click(e)},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)
}}),f.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){f.fn[b]=function(a,c){c==null&&(c=a,a=null);
return arguments.length>0?this.on(b,null,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0),C.test(b)&&(f.event.fixHooks[b]=f.event.keyHooks),D.test(b)&&(f.event.fixHooks[b]=f.event.mouseHooks)
}),function(){function x(a,b,c,e,f,g){for(var h=0,i=e.length;h<i;h++){var j=e[h];if(j){var k=!1;j=j[a];
while(j){if(j[d]===c){k=e[j.sizset];break}if(j.nodeType===1){g||(j[d]=c,j.sizset=h);if(typeof b!="string"){if(j===b){k=!0;
break}}else{if(m.filter(b,[j]).length>0){k=j;break}}}j=j[a]}e[h]=k}}}function w(a,b,c,e,f,g){for(var h=0,i=e.length;
h<i;h++){var j=e[h];if(j){var k=!1;j=j[a];while(j){if(j[d]===c){k=e[j.sizset];break}j.nodeType===1&&!g&&(j[d]=c,j.sizset=h);
if(j.nodeName.toLowerCase()===b){k=j;break}j=j[a]}e[h]=k}}}var a=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d="sizcache"+(Math.random()+"").replace(".",""),e=0,g=Object.prototype.toString,h=!1,i=!0,j=/\\/g,k=/\r\n/g,l=/\W/;
[0,0].sort(function(){i=!1;return 0});var m=function(b,d,e,f){e=e||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9){return[]
}if(!b||typeof b!="string"){return e}var i,j,k,l,n,q,r,t,u=!0,v=m.isXML(d),w=[],x=b;do{a.exec(""),i=a.exec(x);
if(i){x=i[3],w.push(i[1]);if(i[2]){l=i[3];break}}}while(i);if(w.length>1&&p.exec(b)){if(w.length===2&&o.relative[w[0]]){j=y(w[0]+w[1],d,f)
}else{j=o.relative[w[0]]?[d]:m(w.shift(),d);while(w.length){b=w.shift(),o.relative[b]&&(b+=w.shift()),j=y(b,j,f)
}}}else{!f&&w.length>1&&d.nodeType===9&&!v&&o.match.ID.test(w[0])&&!o.match.ID.test(w[w.length-1])&&(n=m.find(w.shift(),d,v),d=n.expr?m.filter(n.expr,n.set)[0]:n.set[0]);
if(d){n=f?{expr:w.pop(),set:s(f)}:m.find(w.pop(),w.length===1&&(w[0]==="~"||w[0]==="+")&&d.parentNode?d.parentNode:d,v),j=n.expr?m.filter(n.expr,n.set):n.set,w.length>0?k=s(j):u=!1;
while(w.length){q=w.pop(),r=q,o.relative[q]?r=w.pop():q="",r==null&&(r=d),o.relative[q](k,r,v)}}else{k=w=[]
}}k||(k=j),k||m.error(q||b);if(g.call(k)==="[object Array]"){if(!u){e.push.apply(e,k)}else{if(d&&d.nodeType===1){for(t=0;
k[t]!=null;t++){k[t]&&(k[t]===!0||k[t].nodeType===1&&m.contains(d,k[t]))&&e.push(j[t])}}else{for(t=0;
k[t]!=null;t++){k[t]&&k[t].nodeType===1&&e.push(j[t])}}}}else{s(k,e)}l&&(m(l,h,e,f),m.uniqueSort(e));
return e};m.uniqueSort=function(a){if(u){h=i,a.sort(u);if(h){for(var b=1;b<a.length;b++){a[b]===a[b-1]&&a.splice(b--,1)
}}}return a},m.matches=function(a,b){return m(a,null,null,b)},m.matchesSelector=function(a,b){return m(b,null,null,[a]).length>0
},m.find=function(a,b,c){var d,e,f,g,h,i;if(!a){return[]}for(e=0,f=o.order.length;e<f;e++){h=o.order[e];
if(g=o.leftMatch[h].exec(a)){i=g[1],g.splice(1,1);if(i.substr(i.length-1)!=="\\"){g[1]=(g[1]||"").replace(j,""),d=o.find[h](g,b,c);
if(d!=null){a=a.replace(o.match[h],"");break}}}}d||(d=typeof b.getElementsByTagName!="undefined"?b.getElementsByTagName("*"):[]);
return{set:d,expr:a}},m.filter=function(a,c,d,e){var f,g,h,i,j,k,l,n,p,q=a,r=[],s=c,t=c&&c[0]&&m.isXML(c[0]);
while(a&&c.length){for(h in o.filter){if((f=o.leftMatch[h].exec(a))!=null&&f[2]){k=o.filter[h],l=f[1],g=!1,f.splice(1,1);
if(l.substr(l.length-1)==="\\"){continue}s===r&&(r=[]);if(o.preFilter[h]){f=o.preFilter[h](f,s,d,r,e,t);
if(!f){g=i=!0}else{if(f===!0){continue}}}if(f){for(n=0;(j=s[n])!=null;n++){j&&(i=k(j,f,n,s),p=e^i,d&&i!=null?p?g=!0:s[n]=!1:p&&(r.push(j),g=!0))
}}if(i!==b){d||(s=r),a=a.replace(o.match[h],"");if(!g){return[]}break}}}if(a===q){if(g==null){m.error(a)
}else{break}}q=a}return s},m.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)
};var n=m.getText=function(a){var b,c,d=a.nodeType,e="";if(d){if(d===1||d===9||d===11){if(typeof a.textContent=="string"){return a.textContent
}if(typeof a.innerText=="string"){return a.innerText.replace(k,"")}for(a=a.firstChild;a;a=a.nextSibling){e+=n(a)
}}else{if(d===3||d===4){return a.nodeValue}}}else{for(b=0;c=a[b];b++){c.nodeType!==8&&(e+=n(c))}}return e
},o=m.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(a){return a.getAttribute("href")
},type:function(a){return a.getAttribute("type")}},relative:{"+":function(a,b){var c=typeof b=="string",d=c&&!l.test(b),e=c&&!d;
d&&(b=b.toLowerCase());for(var f=0,g=a.length,h;f<g;f++){if(h=a[f]){while((h=h.previousSibling)&&h.nodeType!==1){}a[f]=e||h&&h.nodeName.toLowerCase()===b?h||!1:h===b
}}e&&m.filter(b,a,!0)},">":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!l.test(b)){b=b.toLowerCase();
for(;e<f;e++){c=a[e];if(c){var g=c.parentNode;a[e]=g.nodeName.toLowerCase()===b?g:!1}}}else{for(;e<f;
e++){c=a[e],c&&(a[e]=d?c.parentNode:c.parentNode===b)}d&&m.filter(b,a,!0)}},"":function(a,b,c){var d,f=e++,g=x;
typeof b=="string"&&!l.test(b)&&(b=b.toLowerCase(),d=b,g=w),g("parentNode",b,f,a,d,c)},"~":function(a,b,c){var d,f=e++,g=x;
typeof b=="string"&&!l.test(b)&&(b=b.toLowerCase(),d=b,g=w),g("previousSibling",b,f,a,d,c)}},find:{ID:function(a,b,c){if(typeof b.getElementById!="undefined"&&!c){var d=b.getElementById(a[1]);
return d&&d.parentNode?[d]:[]}},NAME:function(a,b){if(typeof b.getElementsByName!="undefined"){var c=[],d=b.getElementsByName(a[1]);
for(var e=0,f=d.length;e<f;e++){d[e].getAttribute("name")===a[1]&&c.push(d[e])}return c.length===0?null:c
}},TAG:function(a,b){if(typeof b.getElementsByTagName!="undefined"){return b.getElementsByTagName(a[1])
}}},preFilter:{CLASS:function(a,b,c,d,e,f){a=" "+a[1].replace(j,"")+" ";if(f){return a}for(var g=0,h;
(h=b[g])!=null;g++){h&&(e^(h.className&&(" "+h.className+" ").replace(/[\t\n\r]/g," ").indexOf(a)>=0)?c||d.push(h):c&&(b[g]=!1))
}return !1},ID:function(a){return a[1].replace(j,"")},TAG:function(a,b){return a[1].replace(j,"").toLowerCase()
},CHILD:function(a){if(a[1]==="nth"){a[2]||m.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);
a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else{a[2]&&m.error(a[0])}a[0]=e++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(j,"");
!f&&o.attrMap[g]&&(a[1]=o.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(j,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");
return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not"){if((a.exec(b[3])||"").length>1||/^\w/.test(b[3])){b[3]=m(b[3],null,null,c)
}else{var g=m.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return !1}}else{if(o.match.POS.test(b[0])||o.match.CHILD.test(b[0])){return !0
}}return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"
},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;
return a.selected===!0},parent:function(a){return !!a.firstChild},empty:function(a){return !a.firstChild
},has:function(a,b,c){return !!m(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;
return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type
},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type
},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();
return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type
},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type
},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"
},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement
}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0
},odd:function(a,b){return b%2===1},lt:function(a,b,c){return b<c[3]-0},gt:function(a,b,c){return b>c[3]-0
},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=o.filters[e];
if(f){return f(a,c,b,d)}if(e==="contains"){return(a.textContent||a.innerText||n([a])||"").indexOf(b[3])>=0
}if(e==="not"){var g=b[3];for(var h=0,i=g.length;h<i;h++){if(g[h]===a){return !1}}return !0}m.error(e)
},CHILD:function(a,b){var c,e,f,g,h,i,j,k=b[1],l=a;switch(k){case"only":case"first":while(l=l.previousSibling){if(l.nodeType===1){return !1
}}if(k==="first"){return !0}l=a;case"last":while(l=l.nextSibling){if(l.nodeType===1){return !1}}return !0;
case"nth":c=b[2],e=b[3];if(c===1&&e===0){return !0}f=b[0],g=a.parentNode;if(g&&(g[d]!==f||!a.nodeIndex)){i=0;
for(l=g.firstChild;l;l=l.nextSibling){l.nodeType===1&&(l.nodeIndex=++i)}g[d]=f}j=a.nodeIndex-e;return c===0?j===0:j%c===0&&j/c>=0
}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||!!a.nodeName&&a.nodeName.toLowerCase()===b
},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=m.attr?m.attr(a,c):o.attrHandle[c]?o.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];
return d==null?f==="!=":!f&&m.attr?d!=null:f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1
},POS:function(a,b,c,d){var e=b[2],f=o.setFilters[e];if(f){return f(a,c,b,d)}}}},p=o.match.POS,q=function(a,b){return"\\"+(b-0+1)
};for(var r in o.match){o.match[r]=new RegExp(o.match[r].source+/(?![^\[]*\])(?![^\(]*\))/.source),o.leftMatch[r]=new RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[r].source.replace(/\\(\d+)/g,q))
}o.match.globalPOS=p;var s=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b
}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(t){s=function(a,b){var c=0,d=b||[];
if(g.call(a)==="[object Array]"){Array.prototype.push.apply(d,a)}else{if(typeof a.length=="number"){for(var e=a.length;
c<e;c++){d.push(a[c])}}else{for(;a[c];c++){d.push(a[c])}}}return d}}var u,v;c.documentElement.compareDocumentPosition?u=function(a,b){if(a===b){h=!0;
return 0}if(!a.compareDocumentPosition||!b.compareDocumentPosition){return a.compareDocumentPosition?-1:1
}return a.compareDocumentPosition(b)&4?-1:1}:(u=function(a,b){if(a===b){h=!0;return 0}if(a.sourceIndex&&b.sourceIndex){return a.sourceIndex-b.sourceIndex
}var c,d,e=[],f=[],g=a.parentNode,i=b.parentNode,j=g;if(g===i){return v(a,b)}if(!g){return -1}if(!i){return 1
}while(j){e.unshift(j),j=j.parentNode}j=i;while(j){f.unshift(j),j=j.parentNode}c=e.length,d=f.length;
for(var k=0;k<c&&k<d;k++){if(e[k]!==f[k]){return v(e[k],f[k])}}return k===c?v(a,f[k],-1):v(e[k],b,1)},v=function(a,b,c){if(a===b){return c
}var d=a.nextSibling;while(d){if(d===b){return -1}d=d.nextSibling}return 1}),function(){var a=c.createElement("div"),d="script"+(new Date).getTime(),e=c.documentElement;
a.innerHTML="<a name='"+d+"'/>",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(o.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);
return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]
}},o.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b
}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(o.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);
if(a[1]==="*"){var d=[];for(var e=0;c[e];e++){c[e].nodeType===1&&d.push(c[e])}c=d}return c}),a.innerHTML="<a href='#'></a>",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(o.attrHandle.href=function(a){return a.getAttribute("href",2)
}),a=null}(),c.querySelectorAll&&function(){var a=m,b=c.createElement("div"),d="__sizzle__";b.innerHTML="<p class='TEST'></p>";
if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){m=function(b,e,f,g){e=e||c;if(!g&&!m.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);
if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1]){return s(e.getElementsByTagName(b),f)}if(h[2]&&o.find.CLASS&&e.getElementsByClassName){return s(e.getElementsByClassName(h[2]),f)
}}if(e.nodeType===9){if(b==="body"&&e.body){return s([e.body],f)}if(h&&h[3]){var i=e.getElementById(h[3]);
if(!i||!i.parentNode){return s([],f)}if(i.id===h[3]){return s([i],f)}}try{return s(e.querySelectorAll(b),f)
}catch(j){}}else{if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var k=e,l=e.getAttribute("id"),n=l||d,p=e.parentNode,q=/^\s*[+~]/.test(b);
l?n=n.replace(/'/g,"\\$&"):e.setAttribute("id",n),q&&p&&(e=e.parentNode);try{if(!q||p){return s(e.querySelectorAll("[id='"+n+"'] "+b),f)
}}catch(r){}finally{l||k.removeAttribute("id")}}}}return a(b,e,f,g)};for(var e in a){m[e]=a[e]}b=null
}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;
if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")
}catch(f){e=!0}m.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!m.isXML(a)){try{if(e||!o.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);
if(f||!d||a.document&&a.document.nodeType!==11){return f}}}catch(g){}}return m(c,null,null,[a]).length>0
}}}(),function(){var a=c.createElement("div");a.innerHTML="<div class='test e'></div><div class='test'></div>";
if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1){return
}o.order.splice(1,0,"CLASS"),o.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c){return b.getElementsByClassName(a[1])
}},a=null}}(),c.documentElement.contains?m.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)
}:c.documentElement.compareDocumentPosition?m.contains=function(a,b){return !!(a.compareDocumentPosition(b)&16)
}:m.contains=function(){return !1},m.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;
return b?b.nodeName!=="HTML":!1};var y=function(a,b,c){var d,e=[],f="",g=b.nodeType?[b]:b;while(d=o.match.PSEUDO.exec(a)){f+=d[0],a=a.replace(o.match.PSEUDO,"")
}a=o.relative[a]?a+"*":a;for(var h=0,i=g.length;h<i;h++){m(a,g[h],e,c)}return m.filter(f,e)};m.attr=f.attr,m.selectors.attrMap={},f.find=m,f.expr=m.selectors,f.expr[":"]=f.expr.filters,f.unique=m.uniqueSort,f.text=m.getText,f.isXMLDoc=m.isXML,f.contains=m.contains
}();var L=/Until$/,M=/^(?:parents|prevUntil|prevAll)/,N=/,/,O=/^.[^:#\[\.,]*$/,P=Array.prototype.slice,Q=f.expr.match.globalPOS,R={children:!0,contents:!0,next:!0,prev:!0};
f.fn.extend({find:function(a){var b=this,c,d;if(typeof a!="string"){return f(a).filter(function(){for(c=0,d=b.length;
c<d;c++){if(f.contains(b[c],this)){return !0}}})}var e=this.pushStack("","find",a),g,h,i;for(c=0,d=this.length;
c<d;c++){g=e.length,f.find(a,this[c],e);if(c>0){for(h=g;h<e.length;h++){for(i=0;i<g;i++){if(e[i]===e[h]){e.splice(h--,1);
break}}}}}return e},has:function(a){var b=f(a);return this.filter(function(){for(var a=0,c=b.length;a<c;
a++){if(f.contains(this,b[a])){return !0}}})},not:function(a){return this.pushStack(T(this,a,!1),"not",a)
},filter:function(a){return this.pushStack(T(this,a,!0),"filter",a)},is:function(a){return !!a&&(typeof a=="string"?Q.test(a)?f(a,this.context).index(this[0])>=0:f.filter(a,this).length>0:this.filter(a).length>0)
},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h=1;while(g&&g.ownerDocument&&g!==b){for(d=0;
d<a.length;d++){f(g).is(a[d])&&c.push({selector:a[d],elem:g,level:h})}g=g.parentNode,h++}return c}var i=Q.test(a)||typeof a!="string"?f(a,b||this.context):0;
for(d=0,e=this.length;d<e;d++){g=this[d];while(g){if(i?i.index(g)>-1:f.find.matchesSelector(g,a)){c.push(g);
break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11){break}}}c=c.length>1?f.unique(c):c;
return this.pushStack(c,"closest",a)},index:function(a){if(!a){return this[0]&&this[0].parentNode?this.prevAll().length:-1
}if(typeof a=="string"){return f.inArray(this[0],f(a))}return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);
return this.pushStack(S(c[0])||S(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)
}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")
},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")
},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")
},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)
},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling((a.parentNode||{}).firstChild,a)
},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)
}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c);L.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!R[a]?f.unique(e):e,(this.length>1||N.test(d))&&M.test(a)&&(e=e.reverse());
return this.pushStack(e,a,P.call(arguments).join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");
return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];
while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d))){g.nodeType===1&&e.push(g),g=g[c]}return e
},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c]){if(a.nodeType===1&&++e===b){break}}return a},sibling:function(a,b){var c=[];
for(;a;a=a.nextSibling){a.nodeType===1&&a!==b&&c.push(a)}return c}});var V="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",W=/ jQuery\d+="(?:\d+|null)"/g,X=/^\s+/,Y=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Z=/<([\w:]+)/,$=/<tbody/i,_=/<|&#?\w+;/,ba=/<(?:script|style)/i,bb=/<(?:script|object|embed|option|style)/i,bc=new RegExp("<(?:"+V+")[\\s/>]","i"),bd=/checked\s*(?:[^=]|=\s*.checked.)/i,be=/\/(java|ecma)script/i,bf=/^\s*<!(?:\[CDATA\[|\-\-)/,bg={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]},bh=U(c);
bg.optgroup=bg.option,bg.tbody=bg.tfoot=bg.colgroup=bg.caption=bg.thead,bg.th=bg.td,f.support.htmlSerialize||(bg._default=[1,"div<div>","</div>"]),f.fn.extend({text:function(a){return f.access(this,function(a){return a===b?f.text(this):this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a))
},null,a,arguments.length)},wrapAll:function(a){if(f.isFunction(a)){return this.each(function(b){f(this).wrapAll(a.call(this,b))
})}if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;
while(a.firstChild&&a.firstChild.nodeType===1){a=a.firstChild}return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a)){return this.each(function(b){f(this).wrapInner(a.call(this,b))
})}return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=f.isFunction(a);
return this.each(function(c){f(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)
}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)
})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)
})},before:function(){if(this[0]&&this[0].parentNode){return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)
})}if(arguments.length){var a=f.clean(arguments);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)
}},after:function(){if(this[0]&&this[0].parentNode){return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)
})}if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f.clean(arguments));
return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++){if(!a||f.filter(a,[d]).length){!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d)
}}return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));
while(b.firstChild){b.removeChild(b.firstChild)}}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;
return this.map(function(){return f.clone(this,a,b)})},html:function(a){return f.access(this,function(a){var c=this[0]||{},d=0,e=this.length;
if(a===b){return c.nodeType===1?c.innerHTML.replace(W,""):null}if(typeof a=="string"&&!ba.test(a)&&(f.support.leadingWhitespace||!X.test(a))&&!bg[(Z.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Y,"<$1></$2>");
try{for(;d<e;d++){c=this[d]||{},c.nodeType===1&&(f.cleanData(c.getElementsByTagName("*")),c.innerHTML=a)
}c=0}catch(g){}}c&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(a){if(this[0]&&this[0].parentNode){if(f.isFunction(a)){return this.each(function(b){var c=f(this),d=c.html();
c.replaceWith(a.call(this,b,d))})}typeof a!="string"&&(a=f(a).detach());return this.each(function(){var b=this.nextSibling,c=this.parentNode;
f(this).remove(),b?f(b).before(a):f(c).append(a)})}return this.length?this.pushStack(f(f.isFunction(a)?a():a),"replaceWith",a):this
},detach:function(a){return this.remove(a,!0)},domManip:function(a,c,d){var e,g,h,i,j=a[0],k=[];if(!f.support.checkClone&&arguments.length===3&&typeof j=="string"&&bd.test(j)){return this.each(function(){f(this).domManip(a,c,d,!0)
})}if(f.isFunction(j)){return this.each(function(e){var g=f(this);a[0]=j.call(this,e,c?g.html():b),g.domManip(a,c,d)
})}if(this[0]){i=j&&j.parentNode,f.support.parentNode&&i&&i.nodeType===11&&i.childNodes.length===this.length?e={fragment:i}:e=f.buildFragment(a,this,k),h=e.fragment,h.childNodes.length===1?g=h=h.firstChild:g=h.firstChild;
if(g){c=c&&f.nodeName(g,"tr");for(var l=0,m=this.length,n=m-1;l<m;l++){d.call(c?bi(this[l],g):this[l],e.cacheable||m>1&&l<n?f.clone(h,!0,!0):h)
}}k.length&&f.each(k,function(a,b){b.src?f.ajax({type:"GET",global:!1,url:b.src,async:!1,dataType:"script"}):f.globalEval((b.text||b.textContent||b.innerHTML||"").replace(bf,"/*$0*/")),b.parentNode&&b.parentNode.removeChild(b)
})}return this}}),f.buildFragment=function(a,b,d){var e,g,h,i,j=a[0];b&&b[0]&&(i=b[0].ownerDocument||b[0]),i.createDocumentFragment||(i=c),a.length===1&&typeof j=="string"&&j.length<512&&i===c&&j.charAt(0)==="<"&&!bb.test(j)&&(f.support.checkClone||!bd.test(j))&&(f.support.html5Clone||!bc.test(j))&&(g=!0,h=f.fragments[j],h&&h!==1&&(e=h)),e||(e=i.createDocumentFragment(),f.clean(a,i,e,d)),g&&(f.fragments[j]=h?e:1);
return{fragment:e,cacheable:g}},f.fragments={},f.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){f.fn[a]=function(c){var d=[],e=f(c),g=this.length===1&&this[0].parentNode;
if(g&&g.nodeType===11&&g.childNodes.length===1&&e.length===1){e[b](this[0]);return this}for(var h=0,i=e.length;
h<i;h++){var j=(h>0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)
}}),f.extend({clone:function(a,b,c){var d,e,g,h=f.support.html5Clone||f.isXMLDoc(a)||!bc.test("<"+a.nodeName+">")?a.cloneNode(!0):bo(a);
if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bk(a,h),d=bl(a),e=bl(h);
for(g=0;d[g];++g){e[g]&&bk(d[g],e[g])}}if(b){bj(a,h);if(c){d=bl(a),e=bl(h);for(g=0;d[g];++g){bj(d[g],e[g])
}}}d=e=null;return h},clean:function(a,b,d,e){var g,h,i,j=[];b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);
for(var k=0,l;(l=a[k])!=null;k++){typeof l=="number"&&(l+="");if(!l){continue}if(typeof l=="string"){if(!_.test(l)){l=b.createTextNode(l)
}else{l=l.replace(Y,"<$1></$2>");var m=(Z.exec(l)||["",""])[1].toLowerCase(),n=bg[m]||bg._default,o=n[0],p=b.createElement("div"),q=bh.childNodes,r;
b===c?bh.appendChild(p):U(b).appendChild(p),p.innerHTML=n[1]+l+n[2];while(o--){p=p.lastChild}if(!f.support.tbody){var s=$.test(l),t=m==="table"&&!s?p.firstChild&&p.firstChild.childNodes:n[1]==="<table>"&&!s?p.childNodes:[];
for(i=t.length-1;i>=0;--i){f.nodeName(t[i],"tbody")&&!t[i].childNodes.length&&t[i].parentNode.removeChild(t[i])
}}!f.support.leadingWhitespace&&X.test(l)&&p.insertBefore(b.createTextNode(X.exec(l)[0]),p.firstChild),l=p.childNodes,p&&(p.parentNode.removeChild(p),q.length>0&&(r=q[q.length-1],r&&r.parentNode&&r.parentNode.removeChild(r)))
}}var u;if(!f.support.appendChecked){if(l[0]&&typeof(u=l.length)=="number"){for(i=0;i<u;i++){bn(l[i])
}}else{bn(l)}}l.nodeType?j.push(l):j=f.merge(j,l)}if(d){g=function(a){return !a.type||be.test(a.type)
};for(k=0;j[k];k++){h=j[k];if(e&&f.nodeName(h,"script")&&(!h.type||be.test(h.type))){e.push(h.parentNode?h.parentNode.removeChild(h):h)
}else{if(h.nodeType===1){var v=f.grep(h.getElementsByTagName("script"),g);j.splice.apply(j,[k+1,0].concat(v))
}d.appendChild(h)}}}return j},cleanData:function(a){var b,c,d=f.cache,e=f.event.special,g=f.support.deleteExpando;
for(var h=0,i;(i=a[h])!=null;h++){if(i.nodeName&&f.noData[i.nodeName.toLowerCase()]){continue}c=i[f.expando];
if(c){b=d[c];if(b&&b.events){for(var j in b.events){e[j]?f.event.remove(i,j):f.removeEvent(i,j,b.handle)
}b.handle&&(b.handle.elem=null)}g?delete i[f.expando]:i.removeAttribute&&i.removeAttribute(f.expando),delete d[c]
}}}});var bp=/alpha\([^)]*\)/i,bq=/opacity=([^)]*)/,br=/([A-Z]|^ms)/g,bs=/^[\-+]?(?:\d*\.)?\d+$/i,bt=/^-?(?:\d*\.)?\d+(?!px)[^\d\s]+$/i,bu=/^([\-+])=([\-+.\de]+)/,bv=/^margin/,bw={position:"absolute",visibility:"hidden",display:"block"},bx=["Top","Right","Bottom","Left"],by,bz,bA;
f.fn.css=function(a,c){return f.access(this,function(a,c,d){return d!==b?f.style(a,c,d):f.css(a,c)},a,c,arguments.length>1)
},f.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=by(a,"opacity");return c===""?"1":c}return a.style.opacity
}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":f.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(!!a&&a.nodeType!==3&&a.nodeType!==8&&!!a.style){var g,h,i=f.camelCase(c),j=a.style,k=f.cssHooks[i];
c=f.cssProps[i]||i;if(d===b){if(k&&"get" in k&&(g=k.get(a,!1,e))!==b){return g}return j[c]}h=typeof d,h==="string"&&(g=bu.exec(d))&&(d=+(g[1]+1)*+g[2]+parseFloat(f.css(a,c)),h="number");
if(d==null||h==="number"&&isNaN(d)){return}h==="number"&&!f.cssNumber[i]&&(d+="px");if(!k||!("set" in k)||(d=k.set(a,d))!==b){try{j[c]=d
}catch(l){}}}},css:function(a,c,d){var e,g;c=f.camelCase(c),g=f.cssHooks[c],c=f.cssProps[c]||c,c==="cssFloat"&&(c="float");
if(g&&"get" in g&&(e=g.get(a,!0,d))!==b){return e}if(by){return by(a,c)}},swap:function(a,b,c){var d={},e,f;
for(f in b){d[f]=a.style[f],a.style[f]=b[f]}e=c.call(a);for(f in b){a.style[f]=d[f]}return e}}),f.curCSS=f.css,c.defaultView&&c.defaultView.getComputedStyle&&(bz=function(a,b){var c,d,e,g,h=a.style;
b=b.replace(br,"-$1").toLowerCase(),(d=a.ownerDocument.defaultView)&&(e=d.getComputedStyle(a,null))&&(c=e.getPropertyValue(b),c===""&&!f.contains(a.ownerDocument.documentElement,a)&&(c=f.style(a,b))),!f.support.pixelMargin&&e&&bv.test(b)&&bt.test(c)&&(g=h.width,h.width=c,c=e.width,h.width=g);
return c}),c.documentElement.currentStyle&&(bA=function(a,b){var c,d,e,f=a.currentStyle&&a.currentStyle[b],g=a.style;
f==null&&g&&(e=g[b])&&(f=e),bt.test(f)&&(c=g.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),g.left=b==="fontSize"?"1em":f,f=g.pixelLeft+"px",g.left=c,d&&(a.runtimeStyle.left=d));
return f===""?"auto":f}),by=bz||bA,f.each(["height","width"],function(a,b){f.cssHooks[b]={get:function(a,c,d){if(c){return a.offsetWidth!==0?bB(a,b,d):f.swap(a,bw,function(){return bB(a,b,d)
})}},set:function(a,b){return bs.test(b)?b+"px":b}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return bq.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""
},set:function(a,b){var c=a.style,d=a.currentStyle,e=f.isNumeric(b)?"alpha(opacity="+b*100+")":"",g=d&&d.filter||c.filter||"";
c.zoom=1;if(b>=1&&f.trim(g.replace(bp,""))===""){c.removeAttribute("filter");if(d&&!d.filter){return}}c.filter=bp.test(g)?g.replace(bp,e):g+" "+e
}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){return f.swap(a,{display:"inline-block"},function(){return b?by(a,"margin-right"):a.style.marginRight
})}})}),f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;
return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style&&a.style.display||f.css(a,"display"))==="none"
},f.expr.filters.visible=function(a){return !f.expr.filters.hidden(a)}),f.each({margin:"",padding:"",border:"Width"},function(a,b){f.cssHooks[a+b]={expand:function(c){var d,e=typeof c=="string"?c.split(" "):[c],f={};
for(d=0;d<4;d++){f[a+bx[d]+b]=e[d]||e[d-2]||e[0]}return f}}});var bC=/%20/g,bD=/\[\]$/,bE=/\r?\n/g,bF=/#.*$/,bG=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bH=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bI=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bJ=/^(?:GET|HEAD)$/,bK=/^\/\//,bL=/\?/,bM=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,bN=/^(?:select|textarea)/i,bO=/\s+/,bP=/([?&])_=[^&]*/,bQ=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bR=f.fn.load,bS={},bT={},bU,bV,bW=["*/"]+["*"];
try{bU=e.href}catch(bX){bU=c.createElement("a"),bU.href="",bU=bU.href}bV=bQ.exec(bU.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bR){return bR.apply(this,arguments)
}if(!this.length){return this}var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";
c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));
var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a
}),i.html(g?f("<div>").append(c.replace(bM,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())
},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this
}).filter(function(){return this.name&&!this.disabled&&(this.checked||bN.test(this.nodeName)||bH.test(this.type))
}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bE,"\r\n")}
}):{name:b.name,value:c.replace(bE,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.on(b,a)
}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})
}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")
},ajaxSetup:function(a,b){b?b$(a,f.ajaxSettings):(b=a,a=f.ajaxSettings),b$(a,b);return a},ajaxSettings:{url:bU,isLocal:bI.test(bV[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":bW},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:bY(bS),ajaxTransport:bY(bT),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a>0?4:0;
var o,r,u,w=c,x=l?ca(d,v,l):b,y,z;if(a>=200&&a<300||a===304){if(d.ifModified){if(y=v.getResponseHeader("Last-Modified")){f.lastModified[k]=y
}if(z=v.getResponseHeader("Etag")){f.etag[k]=z}}if(a===304){w="notmodified",o=!0}else{try{r=cb(d,x),w="success",o=!0
}catch(A){w="parsererror",u=A}}}else{u=w;if(!w||a){w="error",a<0&&(a=0)}}v.status=a,v.statusText=""+(c||w),o?h.resolveWith(e,[r,w,v]):h.rejectWith(e,[v,w,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.fireWith(e,[v,w]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))
}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f.Callbacks("once memory"),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();
a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;
if(s===2){if(!o){o={};while(c=bG.exec(n)){o[c[1].toLowerCase()]=c[2]}}c=o[a.toLowerCase()]}return c===b?null:c
},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);
return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.add,v.statusCode=function(a){if(a){var b;
if(s<2){for(b in a){j[b]=[j[b],a[b]]}}else{b=a[v.status],v.then(b,b)}}return this},d.url=((a||d.url)+"").replace(bF,"").replace(bK,bV[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bO),d.crossDomain==null&&(r=bQ.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bV[1]&&r[2]==bV[2]&&(r[3]||(r[1]==="http:"?80:443))==(bV[3]||(bV[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),bZ(bS,d,c,v);
if(s===2){return !1}t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bJ.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");
if(!d.hasContent){d.data&&(d.url+=(bL.test(d.url)?"&":"?")+d.data,delete d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bP,"$1_="+x);
d.url=y+(y===d.url?(bL.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", "+bW+"; q=0.01":""):d.accepts["*"]);
for(u in d.headers){v.setRequestHeader(u,d.headers[u])}if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();
return !1}for(u in {success:1,error:1,complete:1}){v[u](d[u])}p=bZ(bT,d,c,v);if(!p){w(-1,"No Transport")
}else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")
},d.timeout));try{s=1,p.send(l,w)}catch(z){if(s<2){w(-1,z)}else{throw z}}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)
};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a)){f.each(a,function(){e(this.name,this.value)
})}else{for(var g in a){b_(g,a[g],c,e)}}return d.join("&").replace(bC,"+")}}),f.extend({active:0,lastModified:{},etag:{}});
var cc=f.now(),cd=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+cc++
}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=typeof b.data=="string"&&/^application\/x\-www\-form\-urlencoded/.test(b.contentType);
if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(cd.test(b.url)||e&&cd.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";
b.jsonp!==!1&&(j=j.replace(cd,l),b.url===j&&(e&&(k=k.replace(cd,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]
},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");
return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);
return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)
}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;
return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState)){d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")
}},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var ce=a.ActiveXObject?function(){for(var a in cg){cg[a](0,1)
}}:!1,cf=0,cg;f.ajaxSettings.xhr=a.ActiveXObject?function(){return !this.isLocal&&ch()||ci()}:ch,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials" in a})
}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;
return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);
if(c.xhrFields){for(j in c.xhrFields){h[j]=c.xhrFields[j]}}c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");
try{for(j in e){h.setRequestHeader(j,e[j])}}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;
try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,ce&&delete cg[i]);if(e){h.readyState!==4&&h.abort()
}else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n);try{m.text=h.responseText
}catch(a){}try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)
}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++cf,ce&&(cg||(cg={},f(a).unload(ce)),cg[i]=d),h.onreadystatechange=d)
},abort:function(){d&&d(0,1)}}}});var cj={},ck,cl,cm=/^(?:toggle|show|hide)$/,cn=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,co,cp=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cq;
f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0){return this.animate(ct("show",3),a,b,c)}for(var g=0,h=this.length;
g<h;g++){d=this[g],d.style&&(e=d.style.display,!f._data(d,"olddisplay")&&e==="none"&&(e=d.style.display=""),(e===""&&f.css(d,"display")==="none"||!f.contains(d.ownerDocument.documentElement,d))&&f._data(d,"olddisplay",cu(d.nodeName)))
}for(g=0;g<h;g++){d=this[g];if(d.style){e=d.style.display;if(e===""||e==="none"){d.style.display=f._data(d,"olddisplay")||""
}}}return this},hide:function(a,b,c){if(a||a===0){return this.animate(ct("hide",3),a,b,c)}var d,e,g=0,h=this.length;
for(;g<h;g++){d=this[g],d.style&&(e=f.css(d,"display"),e!=="none"&&!f._data(d,"olddisplay")&&f._data(d,"olddisplay",e))
}for(g=0;g<h;g++){this[g].style&&(this[g].style.display="none")}return this},_toggle:f.fn.toggle,toggle:function(a,b,c){var d=typeof a=="boolean";
f.isFunction(a)&&f.isFunction(b)?this._toggle.apply(this,arguments):a==null||d?this.each(function(){var b=d?a:f(this).is(":hidden");
f(this)[b?"show":"hide"]()}):this.animate(ct("toggle",3),a,b,c);return this},fadeTo:function(a,b,c,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,c,d)
},animate:function(a,b,c,d){function g(){e.queue===!1&&f._mark(this);var b=f.extend({},e),c=this.nodeType===1,d=c&&f(this).is(":hidden"),g,h,i,j,k,l,m,n,o,p,q;
b.animatedProperties={};for(i in a){g=f.camelCase(i),i!==g&&(a[g]=a[i],delete a[i]);if((k=f.cssHooks[g])&&"expand" in k){l=k.expand(a[g]),delete a[g];
for(i in l){i in a||(a[i]=l[i])}}}for(g in a){h=a[g],f.isArray(h)?(b.animatedProperties[g]=h[1],h=a[g]=h[0]):b.animatedProperties[g]=b.specialEasing&&b.specialEasing[g]||b.easing||"swing";
if(h==="hide"&&d||h==="show"&&!d){return b.complete.call(this)}c&&(g==="height"||g==="width")&&(b.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY],f.css(this,"display")==="inline"&&f.css(this,"float")==="none"&&(!f.support.inlineBlockNeedsLayout||cu(this.nodeName)==="inline"?this.style.display="inline-block":this.style.zoom=1))
}b.overflow!=null&&(this.style.overflow="hidden");for(i in a){j=new f.fx(this,b,i),h=a[i],cm.test(h)?(q=f._data(this,"toggle"+i)||(h==="toggle"?d?"show":"hide":0),q?(f._data(this,"toggle"+i,q==="show"?"hide":"show"),j[q]()):j[h]()):(m=cn.exec(h),n=j.cur(),m?(o=parseFloat(m[2]),p=m[3]||(f.cssNumber[i]?"":"px"),p!=="px"&&(f.style(this,i,(o||1)+p),n=(o||1)/j.cur()*n,f.style(this,i,n+p)),m[1]&&(o=(m[1]==="-="?-1:1)*o+n),j.custom(n,o,p)):j.custom(n,h,""))
}return !0}var e=f.speed(b,c,d);if(f.isEmptyObject(a)){return this.each(e.complete,[!1])}a=f.extend({},a);
return e.queue===!1?this.each(g):this.queue(e.queue,g)},stop:function(a,c,d){typeof a!="string"&&(d=c,c=a,a=b),c&&a!==!1&&this.queue(a||"fx",[]);
return this.each(function(){function h(a,b,c){var e=b[c];f.removeData(a,c,!0),e.stop(d)}var b,c=!1,e=f.timers,g=f._data(this);
d||f._unmark(!0,this);if(a==null){for(b in g){g[b]&&g[b].stop&&b.indexOf(".run")===b.length-4&&h(this,g,b)
}}else{g[b=a+".run"]&&g[b].stop&&h(this,g,b)}for(b=e.length;b--;){e[b].elem===this&&(a==null||e[b].queue===a)&&(d?e[b](!0):e[b].saveState(),c=!0,e.splice(b,1))
}(!d||!c)&&f.dequeue(this,a)})}}),f.each({slideDown:ct("show",1),slideUp:ct("hide",1),slideToggle:ct("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){f.fn[a]=function(a,c,d){return this.animate(b,a,c,d)
}}),f.extend({speed:function(a,b,c){var d=a&&typeof a=="object"?f.extend({},a):{complete:c||!c&&b||f.isFunction(a)&&a,duration:a,easing:c&&b||b&&!f.isFunction(b)&&b};
d.duration=f.fx.off?0:typeof d.duration=="number"?d.duration:d.duration in f.fx.speeds?f.fx.speeds[d.duration]:f.fx.speeds._default;
if(d.queue==null||d.queue===!0){d.queue="fx"}d.old=d.complete,d.complete=function(a){f.isFunction(d.old)&&d.old.call(this),d.queue?f.dequeue(this,d.queue):a!==!1&&f._unmark(this)
};return d},easing:{linear:function(a){return a},swing:function(a){return -Math.cos(a*Math.PI)/2+0.5}},timers:[],fx:function(a,b,c){this.options=b,this.elem=a,this.prop=c,b.orig=b.orig||{}
}}),f.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this),(f.fx.step[this.prop]||f.fx.step._default)(this)
},cur:function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop]
}var a,b=f.css(this.elem,this.prop);return isNaN(a=parseFloat(b))?!b||b==="auto"?0:b:a},custom:function(a,c,d){function h(a){return e.step(a)
}var e=this,g=f.fx;this.startTime=cq||cr(),this.end=c,this.now=this.start=a,this.pos=this.state=0,this.unit=d||this.unit||(f.cssNumber[this.prop]?"":"px"),h.queue=this.options.queue,h.elem=this.elem,h.saveState=function(){f._data(e.elem,"fxshow"+e.prop)===b&&(e.options.hide?f._data(e.elem,"fxshow"+e.prop,e.start):e.options.show&&f._data(e.elem,"fxshow"+e.prop,e.end))
},h()&&f.timers.push(h)&&!co&&(co=setInterval(g.tick,g.interval))},show:function(){var a=f._data(this.elem,"fxshow"+this.prop);
this.options.orig[this.prop]=a||f.style(this.elem,this.prop),this.options.show=!0,a!==b?this.custom(this.cur(),a):this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur()),f(this.elem).show()
},hide:function(){this.options.orig[this.prop]=f._data(this.elem,"fxshow"+this.prop)||f.style(this.elem,this.prop),this.options.hide=!0,this.custom(this.cur(),0)
},step:function(a){var b,c,d,e=cq||cr(),g=!0,h=this.elem,i=this.options;if(a||e>=i.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),i.animatedProperties[this.prop]=!0;
for(b in i.animatedProperties){i.animatedProperties[b]!==!0&&(g=!1)}if(g){i.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){h.style["overflow"+b]=i.overflow[a]
}),i.hide&&f(h).hide();if(i.hide||i.show){for(b in i.animatedProperties){f.style(h,b,i.orig[b]),f.removeData(h,"fxshow"+b,!0),f.removeData(h,"toggle"+b,!0)
}}d=i.complete,d&&(i.complete=!1,d.call(h))}return !1}i.duration==Infinity?this.now=e:(c=e-this.startTime,this.state=c/i.duration,this.pos=f.easing[i.animatedProperties[this.prop]](this.state,c,0,1,i.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();
return !0}},f.extend(f.fx,{tick:function(){var a,b=f.timers,c=0;for(;c<b.length;c++){a=b[c],!a()&&b[c]===a&&b.splice(c--,1)
}b.length||f.fx.stop()},interval:13,stop:function(){clearInterval(co),co=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){f.style(a.elem,"opacity",a.now)
},_default:function(a){a.elem.style&&a.elem.style[a.prop]!=null?a.elem.style[a.prop]=a.now+a.unit:a.elem[a.prop]=a.now
}}}),f.each(cp.concat.apply([],cp),function(a,b){b.indexOf("margin")&&(f.fx.step[b]=function(a){f.style(a.elem,b,Math.max(0,a.now)+a.unit)
})}),f.expr&&f.expr.filters&&(f.expr.filters.animated=function(a){return f.grep(f.timers,function(b){return a===b.elem
}).length});var cv,cw=/^t(?:able|d|h)$/i,cx=/^(?:body|html)$/i;"getBoundingClientRect" in c.documentElement?cv=function(a,b,c,d){try{d=a.getBoundingClientRect()
}catch(e){}if(!d||!f.contains(c,a)){return d?{top:d.top,left:d.left}:{top:0,left:0}}var g=b.body,h=cy(b),i=c.clientTop||g.clientTop||0,j=c.clientLeft||g.clientLeft||0,k=h.pageYOffset||f.support.boxModel&&c.scrollTop||g.scrollTop,l=h.pageXOffset||f.support.boxModel&&c.scrollLeft||g.scrollLeft,m=d.top+k-i,n=d.left+l-j;
return{top:m,left:n}}:cv=function(a,b,c){var d,e=a.offsetParent,g=a,h=b.body,i=b.defaultView,j=i?i.getComputedStyle(a,null):a.currentStyle,k=a.offsetTop,l=a.offsetLeft;
while((a=a.parentNode)&&a!==h&&a!==c){if(f.support.fixedPosition&&j.position==="fixed"){break}d=i?i.getComputedStyle(a,null):a.currentStyle,k-=a.scrollTop,l-=a.scrollLeft,a===e&&(k+=a.offsetTop,l+=a.offsetLeft,f.support.doesNotAddBorder&&(!f.support.doesAddBorderForTableAndCells||!cw.test(a.nodeName))&&(k+=parseFloat(d.borderTopWidth)||0,l+=parseFloat(d.borderLeftWidth)||0),g=e,e=a.offsetParent),f.support.subtractsBorderForOverflowNotVisible&&d.overflow!=="visible"&&(k+=parseFloat(d.borderTopWidth)||0,l+=parseFloat(d.borderLeftWidth)||0),j=d
}if(j.position==="relative"||j.position==="static"){k+=h.offsetTop,l+=h.offsetLeft}f.support.fixedPosition&&j.position==="fixed"&&(k+=Math.max(c.scrollTop,h.scrollTop),l+=Math.max(c.scrollLeft,h.scrollLeft));
return{top:k,left:l}},f.fn.offset=function(a){if(arguments.length){return a===b?this:this.each(function(b){f.offset.setOffset(this,a,b)
})}var c=this[0],d=c&&c.ownerDocument;if(!d){return null}if(c===d.body){return f.offset.bodyOffset(c)
}return cv(c,d,d.documentElement)},f.offset={bodyOffset:function(a){var b=a.offsetTop,c=a.offsetLeft;
f.support.doesNotIncludeMarginInBodyOffset&&(b+=parseFloat(f.css(a,"marginTop"))||0,c+=parseFloat(f.css(a,"marginLeft"))||0);
return{top:b,left:c}},setOffset:function(a,b,c){var d=f.css(a,"position");d==="static"&&(a.style.position="relative");
var e=f(a),g=e.offset(),h=f.css(a,"top"),i=f.css(a,"left"),j=(d==="absolute"||d==="fixed")&&f.inArray("auto",[h,i])>-1,k={},l={},m,n;
j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using" in b?b.using.call(a,k):e.css(k)
}},f.fn.extend({position:function(){if(!this[0]){return null}var a=this[0],b=this.offsetParent(),c=this.offset(),d=cx.test(b[0].nodeName)?{top:0,left:0}:b.offset();
c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;
return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;
while(a&&!cx.test(a.nodeName)&&f.css(a,"position")==="static"){a=a.offsetParent}return a})}}),f.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,c){var d=/Y/.test(c);
f.fn[a]=function(e){return f.access(this,function(a,e,g){var h=cy(a);if(g===b){return h?c in h?h[c]:f.support.boxModel&&h.document.documentElement[e]||h.document.body[e]:a[e]
}h?h.scrollTo(d?f(h).scrollLeft():g,d?g:f(h).scrollTop()):a[e]=g},a,e,arguments.length,null)}}),f.each({Height:"height",Width:"width"},function(a,c){var d="client"+a,e="scroll"+a,g="offset"+a;
f.fn["inner"+a]=function(){var a=this[0];return a?a.style?parseFloat(f.css(a,c,"padding")):this[c]():null
},f.fn["outer"+a]=function(a){var b=this[0];return b?b.style?parseFloat(f.css(b,c,a?"margin":"border")):this[c]():null
},f.fn[c]=function(a){return f.access(this,function(a,c,h){var i,j,k,l;if(f.isWindow(a)){i=a.document,j=i.documentElement[d];
return f.support.boxModel&&j||i.body&&i.body[d]||j}if(a.nodeType===9){i=a.documentElement;if(i[d]>=i[e]){return i[d]
}return Math.max(a.body[e],i[e],a.body[g],i[g])}if(h===b){k=f.css(a,c),l=parseFloat(k);return f.isNumeric(l)?l:k
}f(a).css(c,h)},c,a,arguments.length,null)}}),a.jQuery=a.$=f,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return f
})})(window);
/*! jQuery UI - v1.9.2 - 2013-04-03
* http://jqueryui.com
* Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.mouse.js, jquery.ui.position.js, jquery.ui.draggable.js, jquery.ui.droppable.js, jquery.ui.resizable.js, jquery.ui.selectable.js, jquery.ui.sortable.js, jquery.ui.autocomplete.js, jquery.ui.button.js, jquery.ui.datepicker.js, jquery.ui.menu.js, jquery.ui.progressbar.js, jquery.ui.slider.js, jquery.ui.effect.js, jquery.ui.effect-bounce.js, jquery.ui.effect-drop.js, jquery.ui.effect-fade.js, jquery.ui.effect-pulsate.js, jquery.ui.effect-shake.js, jquery.ui.effect-slide.js, jquery.ui.effect-transfer.js
* Copyright 2013 jQuery Foundation and other contributors Licensed MIT */
(function(e,t){function i(t,n){var r,i,o,u=t.nodeName.toLowerCase();
return"area"===u?(r=t.parentNode,i=r.name,!t.href||!i||r.nodeName.toLowerCase()!=="map"?!1:(o=e("img[usemap=#"+i+"]")[0],!!o&&s(o))):(/input|select|textarea|button|object/.test(u)?!t.disabled:"a"===u?t.href||n:n)&&s(t)
}function s(t){return e.expr.filters.visible(t)&&!e(t).parents().andSelf().filter(function(){return e.css(this,"visibility")==="hidden"
}).length}var n=0,r=/^ui-id-\d+$/;e.ui=e.ui||{};if(e.ui.version){return}e.extend(e.ui,{version:"1.9.2",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:e.fn.focus,focus:function(t,n){return typeof t=="number"?this.each(function(){var r=this;
setTimeout(function(){e(r).focus(),n&&n.call(r)},t)}):this._focus.apply(this,arguments)},scrollParent:function(){var t;
return e.ui.ie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?t=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):t=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(n){if(n!==t){return this.css("zIndex",n)
}if(this.length){var r=e(this[0]),i,s;while(r.length&&r[0]!==document){i=r.css("position");if(i==="absolute"||i==="relative"||i==="fixed"){s=parseInt(r.css("zIndex"),10);
if(!isNaN(s)&&s!==0){return s}}r=r.parent()}}return 0},uniqueId:function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++n)
})},removeUniqueId:function(){return this.each(function(){r.test(this.id)&&e(this).removeAttr("id")})
}}),e.extend(e.expr[":"],{data:e.expr.createPseudo?e.expr.createPseudo(function(t){return function(n){return !!e.data(n,t)
}}):function(t,n,r){return !!e.data(t,r[3])},focusable:function(t){return i(t,!isNaN(e.attr(t,"tabindex")))
},tabbable:function(t){var n=e.attr(t,"tabindex"),r=isNaN(n);return(r||n>=0)&&i(t,!r)}}),e(function(){var t=document.body,n=t.appendChild(n=document.createElement("div"));
n.offsetHeight,e.extend(n.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0}),e.support.minHeight=n.offsetHeight===100,e.support.selectstart="onselectstart" in n,t.removeChild(n).style.display="none"
}),e("<a>").outerWidth(1).jquery||e.each(["Width","Height"],function(n,r){function u(t,n,r,s){return e.each(i,function(){n-=parseFloat(e.css(t,"padding"+this))||0,r&&(n-=parseFloat(e.css(t,"border"+this+"Width"))||0),s&&(n-=parseFloat(e.css(t,"margin"+this))||0)
}),n}var i=r==="Width"?["Left","Right"]:["Top","Bottom"],s=r.toLowerCase(),o={innerWidth:e.fn.innerWidth,innerHeight:e.fn.innerHeight,outerWidth:e.fn.outerWidth,outerHeight:e.fn.outerHeight};
e.fn["inner"+r]=function(n){return n===t?o["inner"+r].call(this):this.each(function(){e(this).css(s,u(this,n)+"px")
})},e.fn["outer"+r]=function(t,n){return typeof t!="number"?o["outer"+r].call(this,t):this.each(function(){e(this).css(s,u(this,t,!0,n)+"px")
})}}),e("<a>").data("a-b","a").removeData("a-b").data("a-b")&&(e.fn.removeData=function(t){return function(n){return arguments.length?t.call(this,e.camelCase(n)):t.call(this)
}}(e.fn.removeData)),function(){var t=/msie ([\w.]+)/.exec(navigator.userAgent.toLowerCase())||[];e.ui.ie=t.length?!0:!1,e.ui.ie6=parseFloat(t[1],10)===6
}(),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,n,r){var i,s=e.ui[t].prototype;
for(i in r){s.plugins[i]=s.plugins[i]||[],s.plugins[i].push([n,r[i]])}},call:function(e,t,n){var r,i=e.plugins[t];
if(!i||!e.element[0].parentNode||e.element[0].parentNode.nodeType===11){return}for(r=0;r<i.length;r++){e.options[i[r][0]]&&i[r][1].apply(e.element,n)
}}},contains:e.contains,hasScroll:function(t,n){if(e(t).css("overflow")==="hidden"){return !1}var r=n&&n==="left"?"scrollLeft":"scrollTop",i=!1;
return t[r]>0?!0:(t[r]=1,i=t[r]>0,t[r]=0,i)},isOverAxis:function(e,t,n){return e>t&&e<t+n},isOver:function(t,n,r,i,s,o){return e.ui.isOverAxis(t,r,s)&&e.ui.isOverAxis(n,i,o)
}})})(jQuery);(function(e,t){var n=0,r=Array.prototype.slice,i=e.cleanData;e.cleanData=function(t){for(var n=0,r;
(r=t[n])!=null;n++){try{e(r).triggerHandler("remove")}catch(s){}}i(t)},e.widget=function(t,n,r){var i,s,o,u,a=t.split(".")[0];
t=t.split(".")[1],i=a+"-"+t,r||(r=n,n=e.Widget),e.expr[":"][i.toLowerCase()]=function(t){return !!e.data(t,i)
},e[a]=e[a]||{},s=e[a][t],o=e[a][t]=function(e,t){if(!this._createWidget){return new o(e,t)}arguments.length&&this._createWidget(e,t)
},e.extend(o,s,{version:r.version,_proto:e.extend({},r),_childConstructors:[]}),u=new n,u.options=e.widget.extend({},u.options),e.each(r,function(t,i){e.isFunction(i)&&(r[t]=function(){var e=function(){return n.prototype[t].apply(this,arguments)
},r=function(e){return n.prototype[t].apply(this,e)};return function(){var t=this._super,n=this._superApply,s;
return this._super=e,this._superApply=r,s=i.apply(this,arguments),this._super=t,this._superApply=n,s}
}())}),o.prototype=e.widget.extend(u,{widgetEventPrefix:s?u.widgetEventPrefix:t},r,{constructor:o,namespace:a,widgetName:t,widgetBaseClass:i,widgetFullName:i}),s?(e.each(s._childConstructors,function(t,n){var r=n.prototype;
e.widget(r.namespace+"."+r.widgetName,o,n._proto)}),delete s._childConstructors):n._childConstructors.push(o),e.widget.bridge(t,o)
},e.widget.extend=function(n){var i=r.call(arguments,1),s=0,o=i.length,u,a;for(;s<o;s++){for(u in i[s]){a=i[s][u],i[s].hasOwnProperty(u)&&a!==t&&(e.isPlainObject(a)?n[u]=e.isPlainObject(n[u])?e.widget.extend({},n[u],a):e.widget.extend({},a):n[u]=a)
}}return n},e.widget.bridge=function(n,i){var s=i.prototype.widgetFullName||n;e.fn[n]=function(o){var u=typeof o=="string",a=r.call(arguments,1),f=this;
return o=!u&&a.length?e.widget.extend.apply(null,[o].concat(a)):o,u?this.each(function(){var r,i=e.data(this,s);
if(!i){return e.error("cannot call methods on "+n+" prior to initialization; "+"attempted to call method '"+o+"'")
}if(!e.isFunction(i[o])||o.charAt(0)==="_"){return e.error("no such method '"+o+"' for "+n+" widget instance")
}r=i[o].apply(i,a);if(r!==i&&r!==t){return f=r&&r.jquery?f.pushStack(r.get()):r,!1}}):this.each(function(){var t=e.data(this,s);
t?t.option(o||{})._init():e.data(this,s,new i(o,this))}),f}},e.Widget=function(){},e.Widget._childConstructors=[],e.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(t,r){r=e(r||this.defaultElement||this)[0],this.element=e(r),this.uuid=n++,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(),r!==this&&(e.data(r,this.widgetName,this),e.data(r,this.widgetFullName,this),this._on(!0,this.element,{remove:function(e){e.target===r&&this.destroy()
}}),this.document=e(r.style?r.ownerDocument:r.document||r),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(n,r){var i=n,s,o,u;if(arguments.length===0){return e.widget.extend({},this.options)
}if(typeof n=="string"){i={},s=n.split("."),n=s.shift();if(s.length){o=i[n]=e.widget.extend({},this.options[n]);
for(u=0;u<s.length-1;u++){o[s[u]]=o[s[u]]||{},o=o[s[u]]}n=s.pop();if(r===t){return o[n]===t?null:o[n]
}o[n]=r}else{if(r===t){return this.options[n]===t?null:this.options[n]}i[n]=r}}return this._setOptions(i),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,e==="disabled"&&(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(t,n,r){var i,s=this;typeof t!="boolean"&&(r=n,n=t,t=!1),r?(n=i=e(n),this.bindings=this.bindings.add(n)):(r=n,n=this.element,i=this.widget()),e.each(r,function(r,o){function u(){if(!t&&(s.options.disabled===!0||e(this).hasClass("ui-state-disabled"))){return
}return(typeof o=="string"?s[o]:o).apply(s,arguments)}typeof o!="string"&&(u.guid=o.guid=o.guid||u.guid||e.guid++);
var a=r.match(/^(\w+)\s*(.*)$/),f=a[1]+s.eventNamespace,l=a[2];l?i.delegate(l,f,u):n.bind(f,u)})},_off:function(e,t){t=(t||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.unbind(t).undelegate(t)
},_delay:function(e,t){function n(){return(typeof e=="string"?r[e]:e).apply(r,arguments)}var r=this;return setTimeout(n,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,n,r){var i,s,o=this.options[t];
r=r||{},n=e.Event(n),n.type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),n.target=this.element[0],s=n.originalEvent;
if(s){for(i in s){i in n||(n[i]=s[i])}}return this.element.trigger(n,r),!(e.isFunction(o)&&o.apply(this.element[0],[n].concat(r))===!1||n.isDefaultPrevented())
}},e.each({show:"fadeIn",hide:"fadeOut"},function(t,n){e.Widget.prototype["_"+t]=function(r,i,s){typeof i=="string"&&(i={effect:i});
var o,u=i?i===!0||typeof i=="number"?n:i.effect||n:t;i=i||{},typeof i=="number"&&(i={duration:i}),o=!e.isEmptyObject(i),i.complete=s,i.delay&&r.delay(i.delay),o&&e.effects&&(e.effects.effect[u]||e.uiBackCompat!==!1&&e.effects[u])?r[t](i):u!==t&&r[u]?r[u](i.duration,i.easing,s):r.queue(function(n){e(this)[t](),s&&s.call(r[0]),n()
})}}),e.uiBackCompat!==!1&&(e.Widget.prototype._getCreateOptions=function(){return e.metadata&&e.metadata.get(this.element[0])[this.widgetName]
})})(jQuery);(function(e,t){var n=!1;e(document).mouseup(function(e){n=!1}),e.widget("ui.mouse",{version:"1.9.2",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(n){if(!0===e.data(n.target,t.widgetName+".preventClickEvent")){return e.removeData(n.target,t.widgetName+".preventClickEvent"),n.stopImmediatePropagation(),!1
}}),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(t){if(n){return}this._mouseStarted&&this._mouseUp(t),this._mouseDownEvent=t;var r=this,i=t.which===1,s=typeof this.options.cancel=="string"&&t.target.nodeName?e(t.target).closest(this.options.cancel).length:!1;
if(!i||s||!this._mouseCapture(t)){return !0}this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){r.mouseDelayMet=!0
},this.options.delay));if(this._mouseDistanceMet(t)&&this._mouseDelayMet(t)){this._mouseStarted=this._mouseStart(t)!==!1;
if(!this._mouseStarted){return t.preventDefault(),!0}}return !0===e.data(t.target,this.widgetName+".preventClickEvent")&&e.removeData(t.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(e){return r._mouseMove(e)
},this._mouseUpDelegate=function(e){return r._mouseUp(e)},e(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),t.preventDefault(),n=!0,!0
},_mouseMove:function(t){return !e.ui.ie||document.documentMode>=9||!!t.button?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):this._mouseUp(t)
},_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(e){return this.mouseDelayMet},_mouseStart:function(e){},_mouseDrag:function(e){},_mouseStop:function(e){},_mouseCapture:function(e){return !0
}})})(jQuery);(function(e,t){function h(e,t,n){return[parseInt(e[0],10)*(l.test(e[0])?t/100:1),parseInt(e[1],10)*(l.test(e[1])?n/100:1)]
}function p(t,n){return parseInt(e.css(t,n),10)||0}e.ui=e.ui||{};var n,r=Math.max,i=Math.abs,s=Math.round,o=/left|center|right/,u=/top|center|bottom/,a=/[\+\-]\d+%?/,f=/^\w+/,l=/%$/,c=e.fn.position;
e.position={scrollbarWidth:function(){if(n!==t){return n}var r,i,s=e("<div style='display:block;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),o=s.children()[0];
return e("body").append(s),r=o.offsetWidth,s.css("overflow","scroll"),i=o.offsetWidth,r===i&&(i=s[0].clientWidth),s.remove(),n=r-i
},getScrollInfo:function(t){var n=t.isWindow?"":t.element.css("overflow-x"),r=t.isWindow?"":t.element.css("overflow-y"),i=n==="scroll"||n==="auto"&&t.width<t.element[0].scrollWidth,s=r==="scroll"||r==="auto"&&t.height<t.element[0].scrollHeight;
return{width:i?e.position.scrollbarWidth():0,height:s?e.position.scrollbarWidth():0}},getWithinInfo:function(t){var n=e(t||window),r=e.isWindow(n[0]);
return{element:n,isWindow:r,offset:n.offset()||{left:0,top:0},scrollLeft:n.scrollLeft(),scrollTop:n.scrollTop(),width:r?n.width():n.outerWidth(),height:r?n.height():n.outerHeight()}
}},e.fn.position=function(t){if(!t||!t.of){return c.apply(this,arguments)}t=e.extend({},t);var n,l,d,v,m,g=e(t.of),y=e.position.getWithinInfo(t.within),b=e.position.getScrollInfo(y),w=g[0],E=(t.collision||"flip").split(" "),S={};
return w.nodeType===9?(l=g.width(),d=g.height(),v={top:0,left:0}):e.isWindow(w)?(l=g.width(),d=g.height(),v={top:g.scrollTop(),left:g.scrollLeft()}):w.preventDefault?(t.at="left top",l=d=0,v={top:w.pageY,left:w.pageX}):(l=g.outerWidth(),d=g.outerHeight(),v=g.offset()),m=e.extend({},v),e.each(["my","at"],function(){var e=(t[this]||"").split(" "),n,r;
e.length===1&&(e=o.test(e[0])?e.concat(["center"]):u.test(e[0])?["center"].concat(e):["center","center"]),e[0]=o.test(e[0])?e[0]:"center",e[1]=u.test(e[1])?e[1]:"center",n=a.exec(e[0]),r=a.exec(e[1]),S[this]=[n?n[0]:0,r?r[0]:0],t[this]=[f.exec(e[0])[0],f.exec(e[1])[0]]
}),E.length===1&&(E[1]=E[0]),t.at[0]==="right"?m.left+=l:t.at[0]==="center"&&(m.left+=l/2),t.at[1]==="bottom"?m.top+=d:t.at[1]==="center"&&(m.top+=d/2),n=h(S.at,l,d),m.left+=n[0],m.top+=n[1],this.each(function(){var o,u,a=e(this),f=a.outerWidth(),c=a.outerHeight(),w=p(this,"marginLeft"),x=p(this,"marginTop"),T=f+w+p(this,"marginRight")+b.width,N=c+x+p(this,"marginBottom")+b.height,C=e.extend({},m),k=h(S.my,a.outerWidth(),a.outerHeight());
t.my[0]==="right"?C.left-=f:t.my[0]==="center"&&(C.left-=f/2),t.my[1]==="bottom"?C.top-=c:t.my[1]==="center"&&(C.top-=c/2),C.left+=k[0],C.top+=k[1],e.support.offsetFractions||(C.left=s(C.left),C.top=s(C.top)),o={marginLeft:w,marginTop:x},e.each(["left","top"],function(r,i){e.ui.position[E[r]]&&e.ui.position[E[r]][i](C,{targetWidth:l,targetHeight:d,elemWidth:f,elemHeight:c,collisionPosition:o,collisionWidth:T,collisionHeight:N,offset:[n[0]+k[0],n[1]+k[1]],my:t.my,at:t.at,within:y,elem:a})
}),e.fn.bgiframe&&a.bgiframe(),t.using&&(u=function(e){var n=v.left-C.left,s=n+l-f,o=v.top-C.top,u=o+d-c,h={target:{element:g,left:v.left,top:v.top,width:l,height:d},element:{element:a,left:C.left,top:C.top,width:f,height:c},horizontal:s<0?"left":n>0?"right":"center",vertical:u<0?"top":o>0?"bottom":"middle"};
l<f&&i(n+s)<l&&(h.horizontal="center"),d<c&&i(o+u)<d&&(h.vertical="middle"),r(i(n),i(s))>r(i(o),i(u))?h.important="horizontal":h.important="vertical",t.using.call(this,e,h)
}),a.offset(e.extend(C,{using:u}))})},e.ui.position={fit:{left:function(e,t){var n=t.within,i=n.isWindow?n.scrollLeft:n.offset.left,s=n.width,o=e.left-t.collisionPosition.marginLeft,u=i-o,a=o+t.collisionWidth-s-i,f;
t.collisionWidth>s?u>0&&a<=0?(f=e.left+u+t.collisionWidth-s-i,e.left+=u-f):a>0&&u<=0?e.left=i:u>a?e.left=i+s-t.collisionWidth:e.left=i:u>0?e.left+=u:a>0?e.left-=a:e.left=r(e.left-o,e.left)
},top:function(e,t){var n=t.within,i=n.isWindow?n.scrollTop:n.offset.top,s=t.within.height,o=e.top-t.collisionPosition.marginTop,u=i-o,a=o+t.collisionHeight-s-i,f;
t.collisionHeight>s?u>0&&a<=0?(f=e.top+u+t.collisionHeight-s-i,e.top+=u-f):a>0&&u<=0?e.top=i:u>a?e.top=i+s-t.collisionHeight:e.top=i:u>0?e.top+=u:a>0?e.top-=a:e.top=r(e.top-o,e.top)
}},flip:{left:function(e,t){var n=t.within,r=n.offset.left+n.scrollLeft,s=n.width,o=n.isWindow?n.scrollLeft:n.offset.left,u=e.left-t.collisionPosition.marginLeft,a=u-o,f=u+t.collisionWidth-s-o,l=t.my[0]==="left"?-t.elemWidth:t.my[0]==="right"?t.elemWidth:0,c=t.at[0]==="left"?t.targetWidth:t.at[0]==="right"?-t.targetWidth:0,h=-2*t.offset[0],p,d;
if(a<0){p=e.left+l+c+h+t.collisionWidth-s-r;if(p<0||p<i(a)){e.left+=l+c+h}}else{if(f>0){d=e.left-t.collisionPosition.marginLeft+l+c+h-o;
if(d>0||i(d)<f){e.left+=l+c+h}}}},top:function(e,t){var n=t.within,r=n.offset.top+n.scrollTop,s=n.height,o=n.isWindow?n.scrollTop:n.offset.top,u=e.top-t.collisionPosition.marginTop,a=u-o,f=u+t.collisionHeight-s-o,l=t.my[1]==="top",c=l?-t.elemHeight:t.my[1]==="bottom"?t.elemHeight:0,h=t.at[1]==="top"?t.targetHeight:t.at[1]==="bottom"?-t.targetHeight:0,p=-2*t.offset[1],d,v;
a<0?(v=e.top+c+h+p+t.collisionHeight-s-r,e.top+c+h+p>a&&(v<0||v<i(a))&&(e.top+=c+h+p)):f>0&&(d=e.top-t.collisionPosition.marginTop+c+h+p-o,e.top+c+h+p>f&&(d>0||i(d)<f)&&(e.top+=c+h+p))
}},flipfit:{left:function(){e.ui.position.flip.left.apply(this,arguments),e.ui.position.fit.left.apply(this,arguments)
},top:function(){e.ui.position.flip.top.apply(this,arguments),e.ui.position.fit.top.apply(this,arguments)
}}},function(){var t,n,r,i,s,o=document.getElementsByTagName("body")[0],u=document.createElement("div");
t=document.createElement(o?"div":"body"),r={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},o&&e.extend(r,{position:"absolute",left:"-1000px",top:"-1000px"});
for(s in r){t.style[s]=r[s]}t.appendChild(u),n=o||document.documentElement,n.insertBefore(t,n.firstChild),u.style.cssText="position: absolute; left: 10.7432222px;",i=e(u).offset().left,e.support.offsetFractions=i>10&&i<11,t.innerHTML="",n.removeChild(t)
}(),e.uiBackCompat!==!1&&function(e){var n=e.fn.position;e.fn.position=function(r){if(!r||!r.offset){return n.call(this,r)
}var i=r.offset.split(" "),s=r.at.split(" ");return i.length===1&&(i[1]=i[0]),/^\d/.test(i[0])&&(i[0]="+"+i[0]),/^\d/.test(i[1])&&(i[1]="+"+i[1]),s.length===1&&(/left|center|right/.test(s[0])?s[1]="center":(s[1]=s[0],s[0]="center")),n.call(this,e.extend(r,{at:s[0]+i[0]+" "+s[1]+i[1],offset:t}))
}}(jQuery)})(jQuery);(function(e,t){e.widget("ui.draggable",e.ui.mouse,{version:"1.9.2",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},_create:function(){this.options.helper=="original"&&!/^(?:r|a|f)/.test(this.element.css("position"))&&(this.element[0].style.position="relative"),this.options.addClasses&&this.element.addClass("ui-draggable"),this.options.disabled&&this.element.addClass("ui-draggable-disabled"),this._mouseInit()
},_destroy:function(){this.element.removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"),this._mouseDestroy()
},_mouseCapture:function(t){var n=this.options;return this.helper||n.disabled||e(t.target).is(".ui-resizable-handle")?!1:(this.handle=this._getHandle(t),this.handle?(e(n.iframeFix===!0?"iframe":n.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:1000}).css(e(this).offset()).appendTo("body")
}),!0):!1)},_mouseStart:function(t){var n=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.offset=this.positionAbs=this.element.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},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,n.cursorAt&&this._adjustOffsetFromHelper(n.cursorAt),n.containment&&this._setContainment(),this._trigger("start",t)===!1?(this._clear(),!1):(this._cacheHelperProportions(),e.ui.ddmanager&&!n.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t),this._mouseDrag(t,!0),e.ui.ddmanager&&e.ui.ddmanager.dragStart(this,t),!0)
},_mouseDrag:function(t,n){this.position=this._generatePosition(t),this.positionAbs=this._convertPositionTo("absolute");
if(!n){var r=this._uiHash();if(this._trigger("drag",t,r)===!1){return this._mouseUp({}),!1}this.position=r.position
}if(!this.options.axis||this.options.axis!="y"){this.helper[0].style.left=this.position.left+"px"}if(!this.options.axis||this.options.axis!="x"){this.helper[0].style.top=this.position.top+"px"
}return e.ui.ddmanager&&e.ui.ddmanager.drag(this,t),!1},_mouseStop:function(t){var n=!1;e.ui.ddmanager&&!this.options.dropBehaviour&&(n=e.ui.ddmanager.drop(this,t)),this.dropped&&(n=this.dropped,this.dropped=!1);
var r=this.element[0],i=!1;while(r&&(r=r.parentNode)){r==document&&(i=!0)}if(!i&&this.options.helper==="original"){return !1
}if(this.options.revert=="invalid"&&!n||this.options.revert=="valid"&&n||this.options.revert===!0||e.isFunction(this.options.revert)&&this.options.revert.call(this.element,n)){var s=this;
e(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){s._trigger("stop",t)!==!1&&s._clear()
})}else{this._trigger("stop",t)!==!1&&this._clear()}return !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){var n=!this.options.handle||!e(this.options.handle,this.element).length?!0:!1;
return e(this.options.handle,this.element).find("*").andSelf().each(function(){this==t.target&&(n=!0)
}),n},_createHelper:function(t){var n=this.options,r=e.isFunction(n.helper)?e(n.helper.apply(this.element[0],[t])):n.helper=="clone"?this.element.clone().removeAttr("id"):this.element;
return r.parents("body").length||r.appendTo(n.appendTo=="parent"?this.element[0].parentNode:n.appendTo),r[0]!=this.element[0]&&!/(fixed|absolute)/.test(r.css("position"))&&r.css("position","absolute"),r
},_adjustOffsetFromHelper:function(t){typeof t=="string"&&(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(){this.offsetParent=this.helper.offsetParent();var t=this.offsetParent.offset();
this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&e.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop());
if(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&e.ui.ie){t={top:0,left:0}
}return{top:t.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}
},_getRelativeOffset:function(){if(this.cssPosition=="relative"){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=this.options;t.containment=="parent"&&(t.containment=this.helper[0].parentNode);
if(t.containment=="document"||t.containment=="window"){this.containment=[t.containment=="document"?0:e(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,t.containment=="document"?0:e(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,(t.containment=="document"?0:e(window).scrollLeft())+e(t.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(t.containment=="document"?0:e(window).scrollTop())+(e(t.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]
}if(!/^(document|window|parent)$/.test(t.containment)&&t.containment.constructor!=Array){var n=e(t.containment),r=n[0];
if(!r){return}var i=n.offset(),s=e(r).css("overflow")!="hidden";this.containment=[(parseInt(e(r).css("borderLeftWidth"),10)||0)+(parseInt(e(r).css("paddingLeft"),10)||0),(parseInt(e(r).css("borderTopWidth"),10)||0)+(parseInt(e(r).css("paddingTop"),10)||0),(s?Math.max(r.scrollWidth,r.offsetWidth):r.offsetWidth)-(parseInt(e(r).css("borderLeftWidth"),10)||0)-(parseInt(e(r).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(s?Math.max(r.scrollHeight,r.offsetHeight):r.offsetHeight)-(parseInt(e(r).css("borderTopWidth"),10)||0)-(parseInt(e(r).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relative_container=n
}else{t.containment.constructor==Array&&(this.containment=t.containment)}},_convertPositionTo:function(t,n){n||(n=this.position);
var r=t=="absolute"?1:-1,i=this.options,s=this.cssPosition!="absolute"||this.scrollParent[0]!=document&&!!e.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,o=/(html|body)/i.test(s[0].tagName);
return{top:n.top+this.offset.relative.top*r+this.offset.parent.top*r-(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():o?0:s.scrollTop())*r,left:n.left+this.offset.relative.left*r+this.offset.parent.left*r-(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():o?0:s.scrollLeft())*r}
},_generatePosition:function(t){var n=this.options,r=this.cssPosition!="absolute"||this.scrollParent[0]!=document&&!!e.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,i=/(html|body)/i.test(r[0].tagName),s=t.pageX,o=t.pageY;
if(this.originalPosition){var u;if(this.containment){if(this.relative_container){var a=this.relative_container.offset();
u=[this.containment[0]+a.left,this.containment[1]+a.top,this.containment[2]+a.left,this.containment[3]+a.top]
}else{u=this.containment}t.pageX-this.offset.click.left<u[0]&&(s=u[0]+this.offset.click.left),t.pageY-this.offset.click.top<u[1]&&(o=u[1]+this.offset.click.top),t.pageX-this.offset.click.left>u[2]&&(s=u[2]+this.offset.click.left),t.pageY-this.offset.click.top>u[3]&&(o=u[3]+this.offset.click.top)
}if(n.grid){var f=n.grid[1]?this.originalPageY+Math.round((o-this.originalPageY)/n.grid[1])*n.grid[1]:this.originalPageY;
o=u?f-this.offset.click.top<u[1]||f-this.offset.click.top>u[3]?f-this.offset.click.top<u[1]?f+n.grid[1]:f-n.grid[1]:f:f;
var l=n.grid[0]?this.originalPageX+Math.round((s-this.originalPageX)/n.grid[0])*n.grid[0]:this.originalPageX;
s=u?l-this.offset.click.left<u[0]||l-this.offset.click.left>u[2]?l-this.offset.click.left<u[0]?l+n.grid[0]:l-n.grid[0]:l:l
}}return{top:o-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():i?0:r.scrollTop()),left:s-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():i?0:r.scrollLeft())}
},_clear:function(){this.helper.removeClass("ui-draggable-dragging"),this.helper[0]!=this.element[0]&&!this.cancelHelperRemoval&&this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1
},_trigger:function(t,n,r){return r=r||this._uiHash(),e.ui.plugin.call(this,t,[n,r]),t=="drag"&&(this.positionAbs=this._convertPositionTo("absolute")),e.Widget.prototype._trigger.call(this,t,n,r)
},plugins:{},_uiHash:function(e){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}
}}),e.ui.plugin.add("draggable","connectToSortable",{start:function(t,n){var r=e(this).data("draggable"),i=r.options,s=e.extend({},n,{item:r.element});
r.sortables=[],e(i.connectToSortable).each(function(){var n=e.data(this,"sortable");n&&!n.options.disabled&&(r.sortables.push({instance:n,shouldRevert:n.options.revert}),n.refreshPositions(),n._trigger("activate",t,s))
})},stop:function(t,n){var r=e(this).data("draggable"),i=e.extend({},n,{item:r.element});e.each(r.sortables,function(){this.instance.isOver?(this.instance.isOver=0,r.cancelHelperRemoval=!0,this.instance.cancelHelperRemoval=!1,this.shouldRevert&&(this.instance.options.revert=!0),this.instance._mouseStop(t),this.instance.options.helper=this.instance.options._helper,r.options.helper=="original"&&this.instance.currentItem.css({top:"auto",left:"auto"})):(this.instance.cancelHelperRemoval=!1,this.instance._trigger("deactivate",t,i))
})},drag:function(t,n){var r=e(this).data("draggable"),i=this,s=function(t){var n=this.offset.click.top,r=this.offset.click.left,i=this.positionAbs.top,s=this.positionAbs.left,o=t.height,u=t.width,a=t.top,f=t.left;
return e.ui.isOver(i+n,s+r,a,f,o,u)};e.each(r.sortables,function(s){var o=!1,u=this;this.instance.positionAbs=r.positionAbs,this.instance.helperProportions=r.helperProportions,this.instance.offset.click=r.offset.click,this.instance._intersectsWith(this.instance.containerCache)&&(o=!0,e.each(r.sortables,function(){return this.instance.positionAbs=r.positionAbs,this.instance.helperProportions=r.helperProportions,this.instance.offset.click=r.offset.click,this!=u&&this.instance._intersectsWith(this.instance.containerCache)&&e.ui.contains(u.instance.element[0],this.instance.element[0])&&(o=!1),o
})),o?(this.instance.isOver||(this.instance.isOver=1,this.instance.currentItem=e(i).clone().removeAttr("id").appendTo(this.instance.element).data("sortable-item",!0),this.instance.options._helper=this.instance.options.helper,this.instance.options.helper=function(){return n.helper[0]
},t.target=this.instance.currentItem[0],this.instance._mouseCapture(t,!0),this.instance._mouseStart(t,!0,!0),this.instance.offset.click.top=r.offset.click.top,this.instance.offset.click.left=r.offset.click.left,this.instance.offset.parent.left-=r.offset.parent.left-this.instance.offset.parent.left,this.instance.offset.parent.top-=r.offset.parent.top-this.instance.offset.parent.top,r._trigger("toSortable",t),r.dropped=this.instance.element,r.currentItem=r.element,this.instance.fromOutside=r),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(),r._trigger("fromSortable",t),r.dropped=!1)
})}}),e.ui.plugin.add("draggable","cursor",{start:function(t,n){var r=e("body"),i=e(this).data("draggable").options;
r.css("cursor")&&(i._cursor=r.css("cursor")),r.css("cursor",i.cursor)},stop:function(t,n){var r=e(this).data("draggable").options;
r._cursor&&e("body").css("cursor",r._cursor)}}),e.ui.plugin.add("draggable","opacity",{start:function(t,n){var r=e(n.helper),i=e(this).data("draggable").options;
r.css("opacity")&&(i._opacity=r.css("opacity")),r.css("opacity",i.opacity)},stop:function(t,n){var r=e(this).data("draggable").options;
r._opacity&&e(n.helper).css("opacity",r._opacity)}}),e.ui.plugin.add("draggable","scroll",{start:function(t,n){var r=e(this).data("draggable");
r.scrollParent[0]!=document&&r.scrollParent[0].tagName!="HTML"&&(r.overflowOffset=r.scrollParent.offset())
},drag:function(t,n){var r=e(this).data("draggable"),i=r.options,s=!1;if(r.scrollParent[0]!=document&&r.scrollParent[0].tagName!="HTML"){if(!i.axis||i.axis!="x"){r.overflowOffset.top+r.scrollParent[0].offsetHeight-t.pageY<i.scrollSensitivity?r.scrollParent[0].scrollTop=s=r.scrollParent[0].scrollTop+i.scrollSpeed:t.pageY-r.overflowOffset.top<i.scrollSensitivity&&(r.scrollParent[0].scrollTop=s=r.scrollParent[0].scrollTop-i.scrollSpeed)
}if(!i.axis||i.axis!="y"){r.overflowOffset.left+r.scrollParent[0].offsetWidth-t.pageX<i.scrollSensitivity?r.scrollParent[0].scrollLeft=s=r.scrollParent[0].scrollLeft+i.scrollSpeed:t.pageX-r.overflowOffset.left<i.scrollSensitivity&&(r.scrollParent[0].scrollLeft=s=r.scrollParent[0].scrollLeft-i.scrollSpeed)
}}else{if(!i.axis||i.axis!="x"){t.pageY-e(document).scrollTop()<i.scrollSensitivity?s=e(document).scrollTop(e(document).scrollTop()-i.scrollSpeed):e(window).height()-(t.pageY-e(document).scrollTop())<i.scrollSensitivity&&(s=e(document).scrollTop(e(document).scrollTop()+i.scrollSpeed))
}if(!i.axis||i.axis!="y"){t.pageX-e(document).scrollLeft()<i.scrollSensitivity?s=e(document).scrollLeft(e(document).scrollLeft()-i.scrollSpeed):e(window).width()-(t.pageX-e(document).scrollLeft())<i.scrollSensitivity&&(s=e(document).scrollLeft(e(document).scrollLeft()+i.scrollSpeed))
}}s!==!1&&e.ui.ddmanager&&!i.dropBehaviour&&e.ui.ddmanager.prepareOffsets(r,t)}}),e.ui.plugin.add("draggable","snap",{start:function(t,n){var r=e(this).data("draggable"),i=r.options;
r.snapElements=[],e(i.snap.constructor!=String?i.snap.items||":data(draggable)":i.snap).each(function(){var t=e(this),n=t.offset();
this!=r.element[0]&&r.snapElements.push({item:this,width:t.outerWidth(),height:t.outerHeight(),top:n.top,left:n.left})
})},drag:function(t,n){var r=e(this).data("draggable"),i=r.options,s=i.snapTolerance,o=n.offset.left,u=o+r.helperProportions.width,a=n.offset.top,f=a+r.helperProportions.height;
for(var l=r.snapElements.length-1;l>=0;l--){var c=r.snapElements[l].left,h=c+r.snapElements[l].width,p=r.snapElements[l].top,d=p+r.snapElements[l].height;
if(!(c-s<o&&o<h+s&&p-s<a&&a<d+s||c-s<o&&o<h+s&&p-s<f&&f<d+s||c-s<u&&u<h+s&&p-s<a&&a<d+s||c-s<u&&u<h+s&&p-s<f&&f<d+s)){r.snapElements[l].snapping&&r.options.snap.release&&r.options.snap.release.call(r.element,t,e.extend(r._uiHash(),{snapItem:r.snapElements[l].item})),r.snapElements[l].snapping=!1;
continue}if(i.snapMode!="inner"){var v=Math.abs(p-f)<=s,m=Math.abs(d-a)<=s,g=Math.abs(c-u)<=s,y=Math.abs(h-o)<=s;
v&&(n.position.top=r._convertPositionTo("relative",{top:p-r.helperProportions.height,left:0}).top-r.margins.top),m&&(n.position.top=r._convertPositionTo("relative",{top:d,left:0}).top-r.margins.top),g&&(n.position.left=r._convertPositionTo("relative",{top:0,left:c-r.helperProportions.width}).left-r.margins.left),y&&(n.position.left=r._convertPositionTo("relative",{top:0,left:h}).left-r.margins.left)
}var b=v||m||g||y;if(i.snapMode!="outer"){var v=Math.abs(p-a)<=s,m=Math.abs(d-f)<=s,g=Math.abs(c-o)<=s,y=Math.abs(h-u)<=s;
v&&(n.position.top=r._convertPositionTo("relative",{top:p,left:0}).top-r.margins.top),m&&(n.position.top=r._convertPositionTo("relative",{top:d-r.helperProportions.height,left:0}).top-r.margins.top),g&&(n.position.left=r._convertPositionTo("relative",{top:0,left:c}).left-r.margins.left),y&&(n.position.left=r._convertPositionTo("relative",{top:0,left:h-r.helperProportions.width}).left-r.margins.left)
}!r.snapElements[l].snapping&&(v||m||g||y||b)&&r.options.snap.snap&&r.options.snap.snap.call(r.element,t,e.extend(r._uiHash(),{snapItem:r.snapElements[l].item})),r.snapElements[l].snapping=v||m||g||y||b
}}}),e.ui.plugin.add("draggable","stack",{start:function(t,n){var r=e(this).data("draggable").options,i=e.makeArray(e(r.stack)).sort(function(t,n){return(parseInt(e(t).css("zIndex"),10)||0)-(parseInt(e(n).css("zIndex"),10)||0)
});if(!i.length){return}var s=parseInt(i[0].style.zIndex)||0;e(i).each(function(e){this.style.zIndex=s+e
}),this[0].style.zIndex=s+i.length}}),e.ui.plugin.add("draggable","zIndex",{start:function(t,n){var r=e(n.helper),i=e(this).data("draggable").options;
r.css("zIndex")&&(i._zIndex=r.css("zIndex")),r.css("zIndex",i.zIndex)},stop:function(t,n){var r=e(this).data("draggable").options;
r._zIndex&&e(n.helper).css("zIndex",r._zIndex)}})})(jQuery);(function(e,t){e.widget("ui.droppable",{version:"1.9.2",widgetEventPrefix:"drop",options:{accept:"*",activeClass:!1,addClasses:!0,greedy:!1,hoverClass:!1,scope:"default",tolerance:"intersect"},_create:function(){var t=this.options,n=t.accept;
this.isover=0,this.isout=1,this.accept=e.isFunction(n)?n:function(e){return e.is(n)},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(){var t=e.ui.ddmanager.droppables[this.options.scope];for(var n=0;n<t.length;n++){t[n]==this&&t.splice(n,1)
}this.element.removeClass("ui-droppable ui-droppable-disabled")},_setOption:function(t,n){t=="accept"&&(this.accept=e.isFunction(n)?n:function(e){return e.is(n)
}),e.Widget.prototype._setOption.apply(this,arguments)},_activate:function(t){var n=e.ui.ddmanager.current;
this.options.activeClass&&this.element.addClass(this.options.activeClass),n&&this._trigger("activate",t,this.ui(n))
},_deactivate:function(t){var n=e.ui.ddmanager.current;this.options.activeClass&&this.element.removeClass(this.options.activeClass),n&&this._trigger("deactivate",t,this.ui(n))
},_over:function(t){var n=e.ui.ddmanager.current;if(!n||(n.currentItem||n.element)[0]==this.element[0]){return
}this.accept.call(this.element[0],n.currentItem||n.element)&&(this.options.hoverClass&&this.element.addClass(this.options.hoverClass),this._trigger("over",t,this.ui(n)))
},_out:function(t){var n=e.ui.ddmanager.current;if(!n||(n.currentItem||n.element)[0]==this.element[0]){return
}this.accept.call(this.element[0],n.currentItem||n.element)&&(this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("out",t,this.ui(n)))
},_drop:function(t,n){var r=n||e.ui.ddmanager.current;if(!r||(r.currentItem||r.element)[0]==this.element[0]){return !1
}var i=!1;return this.element.find(":data(droppable)").not(".ui-draggable-dragging").each(function(){var t=e.data(this,"droppable");
if(t.options.greedy&&!t.options.disabled&&t.options.scope==r.options.scope&&t.accept.call(t.element[0],r.currentItem||r.element)&&e.ui.intersect(r,e.extend(t,{offset:t.element.offset()}),t.options.tolerance)){return i=!0,!1
}}),i?!1:this.accept.call(this.element[0],r.currentItem||r.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(r)),this.element):!1
},ui:function(e){return{draggable:e.currentItem||e.element,helper:e.helper,position:e.position,offset:e.positionAbs}
}}),e.ui.intersect=function(t,n,r){if(!n.offset){return !1}var i=(t.positionAbs||t.position.absolute).left,s=i+t.helperProportions.width,o=(t.positionAbs||t.position.absolute).top,u=o+t.helperProportions.height,a=n.offset.left,f=a+n.proportions.width,l=n.offset.top,c=l+n.proportions.height;
switch(r){case"fit":return a<=i&&s<=f&&l<=o&&u<=c;case"intersect":return a<i+t.helperProportions.width/2&&s-t.helperProportions.width/2<f&&l<o+t.helperProportions.height/2&&u-t.helperProportions.height/2<c;
case"pointer":var h=(t.positionAbs||t.position.absolute).left+(t.clickOffset||t.offset.click).left,p=(t.positionAbs||t.position.absolute).top+(t.clickOffset||t.offset.click).top,d=e.ui.isOver(p,h,l,a,n.proportions.height,n.proportions.width);
return d;case"touch":return(o>=l&&o<=c||u>=l&&u<=c||o<l&&u>c)&&(i>=a&&i<=f||s>=a&&s<=f||i<a&&s>f);default:return !1
}},e.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(t,n){var r=e.ui.ddmanager.droppables[t.options.scope]||[],i=n?n.type:null,s=(t.currentItem||t.element).find(":data(droppable)").andSelf();
e:for(var o=0;o<r.length;o++){if(r[o].options.disabled||t&&!r[o].accept.call(r[o].element[0],t.currentItem||t.element)){continue
}for(var u=0;u<s.length;u++){if(s[u]==r[o].element[0]){r[o].proportions.height=0;continue e}}r[o].visible=r[o].element.css("display")!="none";
if(!r[o].visible){continue}i=="mousedown"&&r[o]._activate.call(r[o],n),r[o].offset=r[o].element.offset(),r[o].proportions={width:r[o].element[0].offsetWidth,height:r[o].element[0].offsetHeight}
}},drop:function(t,n){var r=!1;return e.each(e.ui.ddmanager.droppables[t.options.scope]||[],function(){if(!this.options){return
}!this.options.disabled&&this.visible&&e.ui.intersect(t,this,this.options.tolerance)&&(r=this._drop.call(this,n)||r),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],t.currentItem||t.element)&&(this.isout=1,this.isover=0,this._deactivate.call(this,n))
}),r},dragStart:function(t,n){t.element.parentsUntil("body").bind("scroll.droppable",function(){t.options.refreshPositions||e.ui.ddmanager.prepareOffsets(t,n)
})},drag:function(t,n){t.options.refreshPositions&&e.ui.ddmanager.prepareOffsets(t,n),e.each(e.ui.ddmanager.droppables[t.options.scope]||[],function(){if(this.options.disabled||this.greedyChild||!this.visible){return
}var r=e.ui.intersect(t,this,this.options.tolerance),i=!r&&this.isover==1?"isout":r&&this.isover==0?"isover":null;
if(!i){return}var s;if(this.options.greedy){var o=this.options.scope,u=this.element.parents(":data(droppable)").filter(function(){return e.data(this,"droppable").options.scope===o
});u.length&&(s=e.data(u[0],"droppable"),s.greedyChild=i=="isover"?1:0)}s&&i=="isover"&&(s.isover=0,s.isout=1,s._out.call(s,n)),this[i]=1,this[i=="isout"?"isover":"isout"]=0,this[i=="isover"?"_over":"_out"].call(this,n),s&&i=="isout"&&(s.isout=0,s.isover=1,s._over.call(s,n))
})},dragStop:function(t,n){t.element.parentsUntil("body").unbind("scroll.droppable"),t.options.refreshPositions||e.ui.ddmanager.prepareOffsets(t,n)
}}})(jQuery);(function(e,t){e.widget("ui.resizable",e.ui.mouse,{version:"1.9.2",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:1000},_create:function(){var t=this,n=this.options;
this.element.addClass("ui-resizable"),e.extend(this,{_aspectRatio:!!n.aspectRatio,aspectRatio:n.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:n.helper||n.ghost||n.animate?n.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("resizable",this.element.data("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=n.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");
if(this.handles.constructor==String){this.handles=="all"&&(this.handles="n,e,s,w,se,sw,ne,nw");var r=this.handles.split(",");
this.handles={};for(var i=0;i<r.length;i++){var s=e.trim(r[i]),o="ui-resizable-"+s,u=e('<div class="ui-resizable-handle '+o+'"></div>');
u.css({zIndex:n.zIndex}),"se"==s&&u.addClass("ui-icon ui-icon-gripsmall-diagonal-se"),this.handles[s]=".ui-resizable-"+s,this.element.append(u)
}}this._renderAxis=function(t){t=t||this.element;for(var n in this.handles){this.handles[n].constructor==String&&(this.handles[n]=e(this.handles[n],this.element).show());
if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var r=e(this.handles[n],this.element),i=0;
i=/sw|ne|nw|se|n|s/.test(n)?r.outerHeight():r.outerWidth();var s=["padding",/ne|nw|n/.test(n)?"Top":/se|sw|s/.test(n)?"Bottom":/^e$/.test(n)?"Right":"Left"].join("");
t.css(s,i),this._proportionallyResize()}if(!e(this.handles[n]).length){continue}}},this._renderAxis(this.element),this._handles=e(".ui-resizable-handle",this.element).disableSelection(),this._handles.mouseover(function(){if(!t.resizing){if(this.className){var e=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)
}t.axis=e&&e[1]?e[1]:"se"}}),n.autoHide&&(this._handles.hide(),e(this.element).addClass("ui-resizable-autohide").mouseenter(function(){if(n.disabled){return
}e(this).removeClass("ui-resizable-autohide"),t._handles.show()}).mouseleave(function(){if(n.disabled){return
}t.resizing||(e(this).addClass("ui-resizable-autohide"),t._handles.hide())})),this._mouseInit()},_destroy:function(){this._mouseDestroy();
var t=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()
};if(this.elementIsWrapper){t(this.element);var n=this.element;this.originalElement.css({position:n.css("position"),width:n.outerWidth(),height:n.outerHeight(),top:n.css("top"),left:n.css("left")}).insertAfter(n),n.remove()
}return this.originalElement.css("resize",this.originalResizeStyle),t(this.originalElement),this},_mouseCapture:function(t){var n=!1;
for(var r in this.handles){e(this.handles[r])[0]==t.target&&(n=!0)}return !this.options.disabled&&n},_mouseStart:function(t){var r=this.options,i=this.element.position(),s=this.element;
this.resizing=!0,this.documentScroll={top:e(document).scrollTop(),left:e(document).scrollLeft()},(s.is(".ui-draggable")||/absolute/.test(s.css("position")))&&s.css({position:"absolute",top:i.top,left:i.left}),this._renderProxy();
var o=n(this.helper.css("left")),u=n(this.helper.css("top"));r.containment&&(o+=e(r.containment).scrollLeft()||0,u+=e(r.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:o,top:u},this.size=this._helper?{width:s.outerWidth(),height:s.outerHeight()}:{width:s.width(),height:s.height()},this.originalSize=this._helper?{width:s.outerWidth(),height:s.outerHeight()}:{width:s.width(),height:s.height()},this.originalPosition={left:o,top:u},this.sizeDiff={width:s.outerWidth()-s.width(),height:s.outerHeight()-s.height()},this.originalMousePosition={left:t.pageX,top:t.pageY},this.aspectRatio=typeof r.aspectRatio=="number"?r.aspectRatio:this.originalSize.width/this.originalSize.height||1;
var a=e(".ui-resizable-"+this.axis).css("cursor");return e("body").css("cursor",a=="auto"?this.axis+"-resize":a),s.addClass("ui-resizable-resizing"),this._propagate("start",t),!0
},_mouseDrag:function(e){var t=this.helper,n=this.options,r={},i=this,s=this.originalMousePosition,o=this.axis,u=e.pageX-s.left||0,a=e.pageY-s.top||0,f=this._change[o];
if(!f){return !1}var l=f.apply(this,[e,u,a]);this._updateVirtualBoundaries(e.shiftKey);if(this._aspectRatio||e.shiftKey){l=this._updateRatio(l,e)
}return l=this._respectSize(l,e),this._propagate("resize",e),t.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"}),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),this._updateCache(l),this._trigger("resize",e,this.ui()),!1
},_mouseStop:function(t){this.resizing=!1;var n=this.options,r=this;if(this._helper){var i=this._proportionallyResizeElements,s=i.length&&/textarea/i.test(i[0].nodeName),o=s&&e.ui.hasScroll(i[0],"left")?0:r.sizeDiff.height,u=s?0:r.sizeDiff.width,a={width:r.helper.width()-u,height:r.helper.height()-o},f=parseInt(r.element.css("left"),10)+(r.position.left-r.originalPosition.left)||null,l=parseInt(r.element.css("top"),10)+(r.position.top-r.originalPosition.top)||null;
n.animate||this.element.css(e.extend(a,{top:l,left:f})),r.helper.height(r.size.height),r.helper.width(r.size.width),this._helper&&!n.animate&&this._proportionallyResize()
}return 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=this.options,n,i,s,o,u;u={minWidth:r(t.minWidth)?t.minWidth:0,maxWidth:r(t.maxWidth)?t.maxWidth:Infinity,minHeight:r(t.minHeight)?t.minHeight:0,maxHeight:r(t.maxHeight)?t.maxHeight:Infinity};
if(this._aspectRatio||e){n=u.minHeight*this.aspectRatio,s=u.minWidth/this.aspectRatio,i=u.maxHeight*this.aspectRatio,o=u.maxWidth/this.aspectRatio,n>u.minWidth&&(u.minWidth=n),s>u.minHeight&&(u.minHeight=s),i<u.maxWidth&&(u.maxWidth=i),o<u.maxHeight&&(u.maxHeight=o)
}this._vBoundaries=u},_updateCache:function(e){var t=this.options;this.offset=this.helper.offset(),r(e.left)&&(this.position.left=e.left),r(e.top)&&(this.position.top=e.top),r(e.height)&&(this.size.height=e.height),r(e.width)&&(this.size.width=e.width)
},_updateRatio:function(e,t){var n=this.options,i=this.position,s=this.size,o=this.axis;return r(e.height)?e.width=e.height*this.aspectRatio:r(e.width)&&(e.height=e.width/this.aspectRatio),o=="sw"&&(e.left=i.left+(s.width-e.width),e.top=null),o=="nw"&&(e.top=i.top+(s.height-e.height),e.left=i.left+(s.width-e.width)),e
},_respectSize:function(e,t){var n=this.helper,i=this._vBoundaries,s=this._aspectRatio||t.shiftKey,o=this.axis,u=r(e.width)&&i.maxWidth&&i.maxWidth<e.width,a=r(e.height)&&i.maxHeight&&i.maxHeight<e.height,f=r(e.width)&&i.minWidth&&i.minWidth>e.width,l=r(e.height)&&i.minHeight&&i.minHeight>e.height;
f&&(e.width=i.minWidth),l&&(e.height=i.minHeight),u&&(e.width=i.maxWidth),a&&(e.height=i.maxHeight);var c=this.originalPosition.left+this.originalSize.width,h=this.position.top+this.size.height,p=/sw|nw|w/.test(o),d=/nw|ne|n/.test(o);
f&&p&&(e.left=c-i.minWidth),u&&p&&(e.left=c-i.maxWidth),l&&d&&(e.top=h-i.minHeight),a&&d&&(e.top=h-i.maxHeight);
var v=!e.width&&!e.height;return v&&!e.left&&e.top?e.top=null:v&&!e.top&&e.left&&(e.left=null),e},_proportionallyResize:function(){var t=this.options;
if(!this._proportionallyResizeElements.length){return}var n=this.helper||this.element;for(var r=0;r<this._proportionallyResizeElements.length;
r++){var i=this._proportionallyResizeElements[r];if(!this.borderDif){var s=[i.css("borderTopWidth"),i.css("borderRightWidth"),i.css("borderBottomWidth"),i.css("borderLeftWidth")],o=[i.css("paddingTop"),i.css("paddingRight"),i.css("paddingBottom"),i.css("paddingLeft")];
this.borderDif=e.map(s,function(e,t){var n=parseInt(e,10)||0,r=parseInt(o[t],10)||0;return n+r})}i.css({height:n.height()-this.borderDif[0]-this.borderDif[2]||0,width:n.width()-this.borderDif[1]-this.borderDif[3]||0})
}},_renderProxy:function(){var t=this.element,n=this.options;this.elementOffset=t.offset();if(this._helper){this.helper=this.helper||e('<div style="overflow:hidden;"></div>');
var r=e.ui.ie6?1:0,i=e.ui.ie6?2:-1;this.helper.addClass(this._helper).css({width:this.element.outerWidth()+i,height:this.element.outerHeight()+i,position:"absolute",left:this.elementOffset.left-r+"px",top:this.elementOffset.top-r+"px",zIndex:++n.zIndex}),this.helper.appendTo("body").disableSelection()
}else{this.helper=this.element}},_change:{e:function(e,t,n){return{width:this.originalSize.width+t}},w:function(e,t,n){var r=this.options,i=this.originalSize,s=this.originalPosition;
return{left:s.left+t,width:i.width-t}},n:function(e,t,n){var r=this.options,i=this.originalSize,s=this.originalPosition;
return{top:s.top+n,height:i.height-n}},s:function(e,t,n){return{height:this.originalSize.height+n}},se:function(t,n,r){return e.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[t,n,r]))
},sw:function(t,n,r){return e.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[t,n,r]))
},ne:function(t,n,r){return e.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[t,n,r]))
},nw:function(t,n,r){return e.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[t,n,r]))
}},_propagate:function(t,n){e.ui.plugin.call(this,t,[n,this.ui()]),t!="resize"&&this._trigger(t,n,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","alsoResize",{start:function(t,n){var r=e(this).data("resizable"),i=r.options,s=function(t){e(t).each(function(){var t=e(this);
t.data("resizable-alsoresize",{width:parseInt(t.width(),10),height:parseInt(t.height(),10),left:parseInt(t.css("left"),10),top:parseInt(t.css("top"),10)})
})};typeof i.alsoResize=="object"&&!i.alsoResize.parentNode?i.alsoResize.length?(i.alsoResize=i.alsoResize[0],s(i.alsoResize)):e.each(i.alsoResize,function(e){s(e)
}):s(i.alsoResize)},resize:function(t,n){var r=e(this).data("resizable"),i=r.options,s=r.originalSize,o=r.originalPosition,u={height:r.size.height-s.height||0,width:r.size.width-s.width||0,top:r.position.top-o.top||0,left:r.position.left-o.left||0},a=function(t,r){e(t).each(function(){var t=e(this),i=e(this).data("resizable-alsoresize"),s={},o=r&&r.length?r:t.parents(n.originalElement[0]).length?["width","height"]:["width","height","top","left"];
e.each(o,function(e,t){var n=(i[t]||0)+(u[t]||0);n&&n>=0&&(s[t]=n||null)}),t.css(s)})};typeof i.alsoResize=="object"&&!i.alsoResize.nodeType?e.each(i.alsoResize,function(e,t){a(e,t)
}):a(i.alsoResize)},stop:function(t,n){e(this).removeData("resizable-alsoresize")}}),e.ui.plugin.add("resizable","animate",{stop:function(t,n){var r=e(this).data("resizable"),i=r.options,s=r._proportionallyResizeElements,o=s.length&&/textarea/i.test(s[0].nodeName),u=o&&e.ui.hasScroll(s[0],"left")?0:r.sizeDiff.height,a=o?0:r.sizeDiff.width,f={width:r.size.width-a,height:r.size.height-u},l=parseInt(r.element.css("left"),10)+(r.position.left-r.originalPosition.left)||null,c=parseInt(r.element.css("top"),10)+(r.position.top-r.originalPosition.top)||null;
r.element.animate(e.extend(f,c&&l?{top:c,left:l}:{}),{duration:i.animateDuration,easing:i.animateEasing,step:function(){var n={width:parseInt(r.element.css("width"),10),height:parseInt(r.element.css("height"),10),top:parseInt(r.element.css("top"),10),left:parseInt(r.element.css("left"),10)};
s&&s.length&&e(s[0]).css({width:n.width,height:n.height}),r._updateCache(n),r._propagate("resize",t)}})
}}),e.ui.plugin.add("resizable","containment",{start:function(t,r){var i=e(this).data("resizable"),s=i.options,o=i.element,u=s.containment,a=u instanceof e?u.get(0):/parent/.test(u)?o.parent().get(0):u;
if(!a){return}i.containerElement=e(a);if(/document/.test(u)||u==document){i.containerOffset={left:0,top:0},i.containerPosition={left:0,top:0},i.parentData={element:e(document),left:0,top:0,width:e(document).width(),height:e(document).height()||document.body.parentNode.scrollHeight}
}else{var f=e(a),l=[];e(["Top","Right","Left","Bottom"]).each(function(e,t){l[e]=n(f.css("padding"+t))
}),i.containerOffset=f.offset(),i.containerPosition=f.position(),i.containerSize={height:f.innerHeight()-l[3],width:f.innerWidth()-l[1]};
var c=i.containerOffset,h=i.containerSize.height,p=i.containerSize.width,d=e.ui.hasScroll(a,"left")?a.scrollWidth:p,v=e.ui.hasScroll(a)?a.scrollHeight:h;
i.parentData={element:a,left:c.left,top:c.top,width:d,height:v}}},resize:function(t,n){var r=e(this).data("resizable"),i=r.options,s=r.containerSize,o=r.containerOffset,u=r.size,a=r.position,f=r._aspectRatio||t.shiftKey,l={top:0,left:0},c=r.containerElement;
c[0]!=document&&/static/.test(c.css("position"))&&(l=o),a.left<(r._helper?o.left:0)&&(r.size.width=r.size.width+(r._helper?r.position.left-o.left:r.position.left-l.left),f&&(r.size.height=r.size.width/r.aspectRatio),r.position.left=i.helper?o.left:0),a.top<(r._helper?o.top:0)&&(r.size.height=r.size.height+(r._helper?r.position.top-o.top:r.position.top),f&&(r.size.width=r.size.height*r.aspectRatio),r.position.top=r._helper?o.top:0),r.offset.left=r.parentData.left+r.position.left,r.offset.top=r.parentData.top+r.position.top;
var h=Math.abs((r._helper?r.offset.left-l.left:r.offset.left-l.left)+r.sizeDiff.width),p=Math.abs((r._helper?r.offset.top-l.top:r.offset.top-o.top)+r.sizeDiff.height),d=r.containerElement.get(0)==r.element.parent().get(0),v=/relative|absolute/.test(r.containerElement.css("position"));
d&&v&&(h-=r.parentData.left),h+r.size.width>=r.parentData.width&&(r.size.width=r.parentData.width-h,f&&(r.size.height=r.size.width/r.aspectRatio)),p+r.size.height>=r.parentData.height&&(r.size.height=r.parentData.height-p,f&&(r.size.width=r.size.height*r.aspectRatio))
},stop:function(t,n){var r=e(this).data("resizable"),i=r.options,s=r.position,o=r.containerOffset,u=r.containerPosition,a=r.containerElement,f=e(r.helper),l=f.offset(),c=f.outerWidth()-r.sizeDiff.width,h=f.outerHeight()-r.sizeDiff.height;
r._helper&&!i.animate&&/relative/.test(a.css("position"))&&e(this).css({left:l.left-u.left-o.left,width:c,height:h}),r._helper&&!i.animate&&/static/.test(a.css("position"))&&e(this).css({left:l.left-u.left-o.left,width:c,height:h})
}}),e.ui.plugin.add("resizable","ghost",{start:function(t,n){var r=e(this).data("resizable"),i=r.options,s=r.size;
r.ghost=r.originalElement.clone(),r.ghost.css({opacity:0.25,display:"block",position:"relative",height:s.height,width:s.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof i.ghost=="string"?i.ghost:""),r.ghost.appendTo(r.helper)
},resize:function(t,n){var r=e(this).data("resizable"),i=r.options;r.ghost&&r.ghost.css({position:"relative",height:r.size.height,width:r.size.width})
},stop:function(t,n){var r=e(this).data("resizable"),i=r.options;r.ghost&&r.helper&&r.helper.get(0).removeChild(r.ghost.get(0))
}}),e.ui.plugin.add("resizable","grid",{resize:function(t,n){var r=e(this).data("resizable"),i=r.options,s=r.size,o=r.originalSize,u=r.originalPosition,a=r.axis,f=i._aspectRatio||t.shiftKey;
i.grid=typeof i.grid=="number"?[i.grid,i.grid]:i.grid;var l=Math.round((s.width-o.width)/(i.grid[0]||1))*(i.grid[0]||1),c=Math.round((s.height-o.height)/(i.grid[1]||1))*(i.grid[1]||1);
/^(se|s|e)$/.test(a)?(r.size.width=o.width+l,r.size.height=o.height+c):/^(ne)$/.test(a)?(r.size.width=o.width+l,r.size.height=o.height+c,r.position.top=u.top-c):/^(sw)$/.test(a)?(r.size.width=o.width+l,r.size.height=o.height+c,r.position.left=u.left-l):(r.size.width=o.width+l,r.size.height=o.height+c,r.position.top=u.top-c,r.position.left=u.left-l)
}});var n=function(e){return parseInt(e,10)||0},r=function(e){return !isNaN(parseInt(e,10))}})(jQuery);
(function(e,t){e.widget("ui.selectable",e.ui.mouse,{version:"1.9.2",options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch"},_create:function(){var t=this;
this.element.addClass("ui-selectable"),this.dragged=!1;var n;this.refresh=function(){n=e(t.options.filter,t.element[0]),n.addClass("ui-selectee"),n.each(function(){var t=e(this),n=t.offset();
e.data(this,"selectable-item",{element:this,$element:t,left:n.left,top:n.top,right:n.left+t.outerWidth(),bottom:n.top+t.outerHeight(),startselected:!1,selected:t.hasClass("ui-selected"),selecting:t.hasClass("ui-selecting"),unselecting:t.hasClass("ui-unselecting")})
})},this.refresh(),this.selectees=n.addClass("ui-selectee"),this._mouseInit(),this.helper=e("<div class='ui-selectable-helper'></div>")
},_destroy:function(){this.selectees.removeClass("ui-selectee").removeData("selectable-item"),this.element.removeClass("ui-selectable ui-selectable-disabled"),this._mouseDestroy()
},_mouseStart:function(t){var n=this;this.opos=[t.pageX,t.pageY];if(this.options.disabled){return}var r=this.options;
this.selectees=e(r.filter,this.element[0]),this._trigger("start",t),e(r.appendTo).append(this.helper),this.helper.css({left:t.clientX,top:t.clientY,width:0,height:0}),r.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var r=e.data(this,"selectable-item");
r.startselected=!0,!t.metaKey&&!t.ctrlKey&&(r.$element.removeClass("ui-selected"),r.selected=!1,r.$element.addClass("ui-unselecting"),r.unselecting=!0,n._trigger("unselecting",t,{unselecting:r.element}))
}),e(t.target).parents().andSelf().each(function(){var r=e.data(this,"selectable-item");if(r){var i=!t.metaKey&&!t.ctrlKey||!r.$element.hasClass("ui-selected");
return r.$element.removeClass(i?"ui-unselecting":"ui-selected").addClass(i?"ui-selecting":"ui-unselecting"),r.unselecting=!i,r.selecting=i,r.selected=i,i?n._trigger("selecting",t,{selecting:r.element}):n._trigger("unselecting",t,{unselecting:r.element}),!1
}})},_mouseDrag:function(t){var n=this;this.dragged=!0;if(this.options.disabled){return}var r=this.options,i=this.opos[0],s=this.opos[1],o=t.pageX,u=t.pageY;
if(i>o){var a=o;o=i,i=a}if(s>u){var a=u;u=s,s=a}return this.helper.css({left:i,top:s,width:o-i,height:u-s}),this.selectees.each(function(){var a=e.data(this,"selectable-item");
if(!a||a.element==n.element[0]){return}var f=!1;r.tolerance=="touch"?f=!(a.left>o||a.right<i||a.top>u||a.bottom<s):r.tolerance=="fit"&&(f=a.left>i&&a.right<o&&a.top>s&&a.bottom<u),f?(a.selected&&(a.$element.removeClass("ui-selected"),a.selected=!1),a.unselecting&&(a.$element.removeClass("ui-unselecting"),a.unselecting=!1),a.selecting||(a.$element.addClass("ui-selecting"),a.selecting=!0,n._trigger("selecting",t,{selecting:a.element}))):(a.selecting&&((t.metaKey||t.ctrlKey)&&a.startselected?(a.$element.removeClass("ui-selecting"),a.selecting=!1,a.$element.addClass("ui-selected"),a.selected=!0):(a.$element.removeClass("ui-selecting"),a.selecting=!1,a.startselected&&(a.$element.addClass("ui-unselecting"),a.unselecting=!0),n._trigger("unselecting",t,{unselecting:a.element}))),a.selected&&!t.metaKey&&!t.ctrlKey&&!a.startselected&&(a.$element.removeClass("ui-selected"),a.selected=!1,a.$element.addClass("ui-unselecting"),a.unselecting=!0,n._trigger("unselecting",t,{unselecting:a.element})))
}),!1},_mouseStop:function(t){var n=this;this.dragged=!1;var r=this.options;return e(".ui-unselecting",this.element[0]).each(function(){var r=e.data(this,"selectable-item");
r.$element.removeClass("ui-unselecting"),r.unselecting=!1,r.startselected=!1,n._trigger("unselected",t,{unselected:r.element})
}),e(".ui-selecting",this.element[0]).each(function(){var r=e.data(this,"selectable-item");r.$element.removeClass("ui-selecting").addClass("ui-selected"),r.selecting=!1,r.selected=!0,r.startselected=!0,n._trigger("selected",t,{selected:r.element})
}),this._trigger("stop",t),this.helper.remove(),!1}})})(jQuery);(function(e,t){e.widget("ui.sortable",e.ui.mouse,{version:"1.9.2",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:1000},_create:function(){var e=this.options;
this.containerCache={},this.element.addClass("ui-sortable"),this.refresh(),this.floating=this.items.length?e.axis==="x"||/left|right/.test(this.items[0].item.css("float"))||/inline|table-cell/.test(this.items[0].item.css("display")):!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 e=this.items.length-1;e>=0;e--){this.items[e].item.removeData(this.widgetName+"-item")}return this
},_setOption:function(t,n){t==="disabled"?(this.options[t]=n,this.widget().toggleClass("ui-sortable-disabled",!!n)):e.Widget.prototype._setOption.apply(this,arguments)
},_mouseCapture:function(t,n){var r=this;if(this.reverting){return !1}if(this.options.disabled||this.options.type=="static"){return !1
}this._refreshItems(t);var i=null,s=e(t.target).parents().each(function(){if(e.data(this,r.widgetName+"-item")==r){return i=e(this),!1
}});e.data(t.target,r.widgetName+"-item")==r&&(i=e(t.target));if(!i){return !1}if(this.options.handle&&!n){var o=!1;
e(this.options.handle,i).find("*").andSelf().each(function(){this==t.target&&(o=!0)});if(!o){return !1
}}return this.currentItem=i,this._removeCurrentsFromItems(),!0},_mouseStart:function(t,n,r){var i=this.options;
this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(t),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},e.extend(this.offset,{click:{left:t.pageX-this.offset.left,top:t.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(t),this.originalPageX=t.pageX,this.originalPageY=t.pageY,i.cursorAt&&this._adjustOffsetFromHelper(i.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!=this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),i.containment&&this._setContainment(),i.cursor&&(e("body").css("cursor")&&(this._storedCursor=e("body").css("cursor")),e("body").css("cursor",i.cursor)),i.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",i.opacity)),i.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",i.zIndex)),this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",t,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions();
if(!r){for(var s=this.containers.length-1;s>=0;s--){this.containers[s]._trigger("activate",t,this._uiHash(this))
}}return e.ui.ddmanager&&(e.ui.ddmanager.current=this),e.ui.ddmanager&&!i.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t),this.dragging=!0,this.helper.addClass("ui-sortable-helper"),this._mouseDrag(t),!0
},_mouseDrag:function(t){this.position=this._generatePosition(t),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs);
if(this.options.scroll){var n=this.options,r=!1;this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-t.pageY<n.scrollSensitivity?this.scrollParent[0].scrollTop=r=this.scrollParent[0].scrollTop+n.scrollSpeed:t.pageY-this.overflowOffset.top<n.scrollSensitivity&&(this.scrollParent[0].scrollTop=r=this.scrollParent[0].scrollTop-n.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-t.pageX<n.scrollSensitivity?this.scrollParent[0].scrollLeft=r=this.scrollParent[0].scrollLeft+n.scrollSpeed:t.pageX-this.overflowOffset.left<n.scrollSensitivity&&(this.scrollParent[0].scrollLeft=r=this.scrollParent[0].scrollLeft-n.scrollSpeed)):(t.pageY-e(document).scrollTop()<n.scrollSensitivity?r=e(document).scrollTop(e(document).scrollTop()-n.scrollSpeed):e(window).height()-(t.pageY-e(document).scrollTop())<n.scrollSensitivity&&(r=e(document).scrollTop(e(document).scrollTop()+n.scrollSpeed)),t.pageX-e(document).scrollLeft()<n.scrollSensitivity?r=e(document).scrollLeft(e(document).scrollLeft()-n.scrollSpeed):e(window).width()-(t.pageX-e(document).scrollLeft())<n.scrollSensitivity&&(r=e(document).scrollLeft(e(document).scrollLeft()+n.scrollSpeed))),r!==!1&&e.ui.ddmanager&&!n.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t)
}this.positionAbs=this._convertPositionTo("absolute");if(!this.options.axis||this.options.axis!="y"){this.helper[0].style.left=this.position.left+"px"
}if(!this.options.axis||this.options.axis!="x"){this.helper[0].style.top=this.position.top+"px"}for(var i=this.items.length-1;
i>=0;i--){var s=this.items[i],o=s.item[0],u=this._intersectsWithPointer(s);if(!u){continue}if(s.instance!==this.currentContainer){continue
}if(o!=this.currentItem[0]&&this.placeholder[u==1?"next":"prev"]()[0]!=o&&!e.contains(this.placeholder[0],o)&&(this.options.type=="semi-dynamic"?!e.contains(this.element[0],o):!0)){this.direction=u==1?"down":"up";
if(this.options.tolerance!="pointer"&&!this._intersectsWithSides(s)){break}this._rearrange(t,s),this._trigger("change",t,this._uiHash());
break}}return this._contactContainers(t),e.ui.ddmanager&&e.ui.ddmanager.drag(this,t),this._trigger("sort",t,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1
},_mouseStop:function(t,n){if(!t){return}e.ui.ddmanager&&!this.options.dropBehaviour&&e.ui.ddmanager.drop(this,t);
if(this.options.revert){var r=this,i=this.placeholder.offset();this.reverting=!0,e(this.helper).animate({left:i.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft),top:i.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)},parseInt(this.options.revert,10)||500,function(){r._clear(t)
})}else{this._clear(t,n)}return !1},cancel:function(){if(this.dragging){this._mouseUp({target:null}),this.options.helper=="original"?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):this.currentItem.show();
for(var t=this.containers.length-1;t>=0;t--){this.containers[t]._trigger("deactivate",null,this._uiHash(this)),this.containers[t].containerCache.over&&(this.containers[t]._trigger("out",null,this._uiHash(this)),this.containers[t].containerCache.over=0)
}}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.options.helper!="original"&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),e.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?e(this.domPosition.prev).after(this.currentItem):e(this.domPosition.parent).prepend(this.currentItem)),this
},serialize:function(t){var n=this._getItemsAsjQuery(t&&t.connected),r=[];return t=t||{},e(n).each(function(){var n=(e(t.item||this).attr(t.attribute||"id")||"").match(t.expression||/(.+)[-=_](.+)/);
n&&r.push((t.key||n[1]+"[]")+"="+(t.key&&t.expression?n[1]:n[2]))}),!r.length&&t.key&&r.push(t.key+"="),r.join("&")
},toArray:function(t){var n=this._getItemsAsjQuery(t&&t.connected),r=[];return t=t||{},n.each(function(){r.push(e(t.item||this).attr(t.attribute||"id")||"")
}),r},_intersectsWith:function(e){var t=this.positionAbs.left,n=t+this.helperProportions.width,r=this.positionAbs.top,i=r+this.helperProportions.height,s=e.left,o=s+e.width,u=e.top,a=u+e.height,f=this.offset.click.top,l=this.offset.click.left,c=r+f>u&&r+f<a&&t+l>s&&t+l<o;
return this.options.tolerance=="pointer"||this.options.forcePointerForContainers||this.options.tolerance!="pointer"&&this.helperProportions[this.floating?"width":"height"]>e[this.floating?"width":"height"]?c:s<t+this.helperProportions.width/2&&n-this.helperProportions.width/2<o&&u<r+this.helperProportions.height/2&&i-this.helperProportions.height/2<a
},_intersectsWithPointer:function(t){var n=this.options.axis==="x"||e.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,t.top,t.height),r=this.options.axis==="y"||e.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,t.left,t.width),i=n&&r,s=this._getDragVerticalDirection(),o=this._getDragHorizontalDirection();
return i?this.floating?o&&o=="right"||s=="down"?2:1:s&&(s=="down"?2:1):!1},_intersectsWithSides:function(t){var n=e.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,t.top+t.height/2,t.height),r=e.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,t.left+t.width/2,t.width),i=this._getDragVerticalDirection(),s=this._getDragHorizontalDirection();
return this.floating&&s?s=="right"&&r||s=="left"&&!r:i&&(i=="down"&&n||i=="up"&&!n)},_getDragVerticalDirection:function(){var e=this.positionAbs.top-this.lastPositionAbs.top;
return e!=0&&(e>0?"down":"up")},_getDragHorizontalDirection:function(){var e=this.positionAbs.left-this.lastPositionAbs.left;
return e!=0&&(e>0?"right":"left")},refresh:function(e){return this._refreshItems(e),this.refreshPositions(),this
},_connectWith:function(){var e=this.options;return e.connectWith.constructor==String?[e.connectWith]:e.connectWith
},_getItemsAsjQuery:function(t){var n=[],r=[],i=this._connectWith();if(i&&t){for(var s=i.length-1;s>=0;
s--){var o=e(i[s]);for(var u=o.length-1;u>=0;u--){var a=e.data(o[u],this.widgetName);a&&a!=this&&!a.options.disabled&&r.push([e.isFunction(a.options.items)?a.options.items.call(a.element):e(a.options.items,a.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),a])
}}}r.push([e.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):e(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]);
for(var s=r.length-1;s>=0;s--){r[s][0].each(function(){n.push(this)})}return e(n)},_removeCurrentsFromItems:function(){var t=this.currentItem.find(":data("+this.widgetName+"-item)");
this.items=e.grep(this.items,function(e){for(var n=0;n<t.length;n++){if(t[n]==e.item[0]){return !1}}return !0
})},_refreshItems:function(t){this.items=[],this.containers=[this];var n=this.items,r=[[e.isFunction(this.options.items)?this.options.items.call(this.element[0],t,{item:this.currentItem}):e(this.options.items,this.element),this]],i=this._connectWith();
if(i&&this.ready){for(var s=i.length-1;s>=0;s--){var o=e(i[s]);for(var u=o.length-1;u>=0;u--){var a=e.data(o[u],this.widgetName);
a&&a!=this&&!a.options.disabled&&(r.push([e.isFunction(a.options.items)?a.options.items.call(a.element[0],t,{item:this.currentItem}):e(a.options.items,a.element),a]),this.containers.push(a))
}}}for(var s=r.length-1;s>=0;s--){var f=r[s][1],l=r[s][0];for(var u=0,c=l.length;u<c;u++){var h=e(l[u]);
h.data(this.widgetName+"-item",f),n.push({item:h,instance:f,width:0,height:0,left:0,top:0})}}},refreshPositions:function(t){this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset());
for(var n=this.items.length-1;n>=0;n--){var r=this.items[n];if(r.instance!=this.currentContainer&&this.currentContainer&&r.item[0]!=this.currentItem[0]){continue
}var i=this.options.toleranceElement?e(this.options.toleranceElement,r.item):r.item;t||(r.width=i.outerWidth(),r.height=i.outerHeight());
var s=i.offset();r.left=s.left,r.top=s.top}if(this.options.custom&&this.options.custom.refreshContainers){this.options.custom.refreshContainers.call(this)
}else{for(var n=this.containers.length-1;n>=0;n--){var s=this.containers[n].element.offset();this.containers[n].containerCache.left=s.left,this.containers[n].containerCache.top=s.top,this.containers[n].containerCache.width=this.containers[n].element.outerWidth(),this.containers[n].containerCache.height=this.containers[n].element.outerHeight()
}}return this},_createPlaceholder:function(t){t=t||this;var n=t.options;if(!n.placeholder||n.placeholder.constructor==String){var r=n.placeholder;
n.placeholder={element:function(){var n=e(document.createElement(t.currentItem[0].nodeName)).addClass(r||t.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper")[0];
return r||(n.style.visibility="hidden"),n},update:function(e,i){if(r&&!n.forcePlaceholderSize){return
}i.height()||i.height(t.currentItem.innerHeight()-parseInt(t.currentItem.css("paddingTop")||0,10)-parseInt(t.currentItem.css("paddingBottom")||0,10)),i.width()||i.width(t.currentItem.innerWidth()-parseInt(t.currentItem.css("paddingLeft")||0,10)-parseInt(t.currentItem.css("paddingRight")||0,10))
}}}t.placeholder=e(n.placeholder.element.call(t.element,t.currentItem)),t.currentItem.after(t.placeholder),n.placeholder.update(t,t.placeholder)
},_contactContainers:function(t){var n=null,r=null;for(var i=this.containers.length-1;i>=0;i--){if(e.contains(this.currentItem[0],this.containers[i].element[0])){continue
}if(this._intersectsWith(this.containers[i].containerCache)){if(n&&e.contains(this.containers[i].element[0],n.element[0])){continue
}n=this.containers[i],r=i}else{this.containers[i].containerCache.over&&(this.containers[i]._trigger("out",t,this._uiHash(this)),this.containers[i].containerCache.over=0)
}}if(!n){return}if(this.containers.length===1){this.containers[r]._trigger("over",t,this._uiHash(this)),this.containers[r].containerCache.over=1
}else{var s=10000,o=null,u=this.containers[r].floating?"left":"top",a=this.containers[r].floating?"width":"height",f=this.positionAbs[u]+this.offset.click[u];
for(var l=this.items.length-1;l>=0;l--){if(!e.contains(this.containers[r].element[0],this.items[l].item[0])){continue
}if(this.items[l].item[0]==this.currentItem[0]){continue}var c=this.items[l].item.offset()[u],h=!1;Math.abs(c-f)>Math.abs(c+this.items[l][a]-f)&&(h=!0,c+=this.items[l][a]),Math.abs(c-f)<s&&(s=Math.abs(c-f),o=this.items[l],this.direction=h?"up":"down")
}if(!o&&!this.options.dropOnEmpty){return}this.currentContainer=this.containers[r],o?this._rearrange(t,o,null,!0):this._rearrange(t,null,this.containers[r].element,!0),this._trigger("change",t,this._uiHash()),this.containers[r]._trigger("change",t,this._uiHash(this)),this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[r]._trigger("over",t,this._uiHash(this)),this.containers[r].containerCache.over=1
}},_createHelper:function(t){var n=this.options,r=e.isFunction(n.helper)?e(n.helper.apply(this.element[0],[t,this.currentItem])):n.helper=="clone"?this.currentItem.clone():this.currentItem;
return r.parents("body").length||e(n.appendTo!="parent"?n.appendTo:this.currentItem[0].parentNode)[0].appendChild(r[0]),r[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")}),(r[0].style.width==""||n.forceHelperSize)&&r.width(this.currentItem.width()),(r[0].style.height==""||n.forceHelperSize)&&r.height(this.currentItem.height()),r
},_adjustOffsetFromHelper:function(t){typeof t=="string"&&(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(){this.offsetParent=this.helper.offsetParent();var t=this.offsetParent.offset();
this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&e.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop());
if(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&e.ui.ie){t={top:0,left:0}
}return{top:t.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}
},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var e=this.currentItem.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.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 t=this.options;t.containment=="parent"&&(t.containment=this.helper[0].parentNode);
if(t.containment=="document"||t.containment=="window"){this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,e(t.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(e(t.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]
}if(!/^(document|window|parent)$/.test(t.containment)){var n=e(t.containment)[0],r=e(t.containment).offset(),i=e(n).css("overflow")!="hidden";
this.containment=[r.left+(parseInt(e(n).css("borderLeftWidth"),10)||0)+(parseInt(e(n).css("paddingLeft"),10)||0)-this.margins.left,r.top+(parseInt(e(n).css("borderTopWidth"),10)||0)+(parseInt(e(n).css("paddingTop"),10)||0)-this.margins.top,r.left+(i?Math.max(n.scrollWidth,n.offsetWidth):n.offsetWidth)-(parseInt(e(n).css("borderLeftWidth"),10)||0)-(parseInt(e(n).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,r.top+(i?Math.max(n.scrollHeight,n.offsetHeight):n.offsetHeight)-(parseInt(e(n).css("borderTopWidth"),10)||0)-(parseInt(e(n).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]
}},_convertPositionTo:function(t,n){n||(n=this.position);var r=t=="absolute"?1:-1,i=this.options,s=this.cssPosition!="absolute"||this.scrollParent[0]!=document&&!!e.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,o=/(html|body)/i.test(s[0].tagName);
return{top:n.top+this.offset.relative.top*r+this.offset.parent.top*r-(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():o?0:s.scrollTop())*r,left:n.left+this.offset.relative.left*r+this.offset.parent.left*r-(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():o?0:s.scrollLeft())*r}
},_generatePosition:function(t){var n=this.options,r=this.cssPosition!="absolute"||this.scrollParent[0]!=document&&!!e.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,i=/(html|body)/i.test(r[0].tagName);
this.cssPosition=="relative"&&(this.scrollParent[0]==document||this.scrollParent[0]==this.offsetParent[0])&&(this.offset.relative=this._getRelativeOffset());
var s=t.pageX,o=t.pageY;if(this.originalPosition){this.containment&&(t.pageX-this.offset.click.left<this.containment[0]&&(s=this.containment[0]+this.offset.click.left),t.pageY-this.offset.click.top<this.containment[1]&&(o=this.containment[1]+this.offset.click.top),t.pageX-this.offset.click.left>this.containment[2]&&(s=this.containment[2]+this.offset.click.left),t.pageY-this.offset.click.top>this.containment[3]&&(o=this.containment[3]+this.offset.click.top));
if(n.grid){var u=this.originalPageY+Math.round((o-this.originalPageY)/n.grid[1])*n.grid[1];o=this.containment?u-this.offset.click.top<this.containment[1]||u-this.offset.click.top>this.containment[3]?u-this.offset.click.top<this.containment[1]?u+n.grid[1]:u-n.grid[1]:u:u;
var a=this.originalPageX+Math.round((s-this.originalPageX)/n.grid[0])*n.grid[0];s=this.containment?a-this.offset.click.left<this.containment[0]||a-this.offset.click.left>this.containment[2]?a-this.offset.click.left<this.containment[0]?a+n.grid[0]:a-n.grid[0]:a:a
}}return{top:o-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():i?0:r.scrollTop()),left:s-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():i?0:r.scrollLeft())}
},_rearrange:function(e,t,n,r){n?n[0].appendChild(this.placeholder[0]):t.item[0].parentNode.insertBefore(this.placeholder[0],this.direction=="down"?t.item[0]:t.item[0].nextSibling),this.counter=this.counter?++this.counter:1;
var i=this.counter;this._delay(function(){i==this.counter&&this.refreshPositions(!r)})},_clear:function(t,n){this.reverting=!1;
var r=[];!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null;
if(this.helper[0]==this.currentItem[0]){for(var i in this._storedCSS){if(this._storedCSS[i]=="auto"||this._storedCSS[i]=="static"){this._storedCSS[i]=""
}}this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else{this.currentItem.show()
}this.fromOutside&&!n&&r.push(function(e){this._trigger("receive",e,this._uiHash(this.fromOutside))}),(this.fromOutside||this.domPosition.prev!=this.currentItem.prev().not(".ui-sortable-helper")[0]||this.domPosition.parent!=this.currentItem.parent()[0])&&!n&&r.push(function(e){this._trigger("update",e,this._uiHash())
}),this!==this.currentContainer&&(n||(r.push(function(e){this._trigger("remove",e,this._uiHash())}),r.push(function(e){return function(t){e._trigger("receive",t,this._uiHash(this))
}}.call(this,this.currentContainer)),r.push(function(e){return function(t){e._trigger("update",t,this._uiHash(this))
}}.call(this,this.currentContainer))));for(var i=this.containers.length-1;i>=0;i--){n||r.push(function(e){return function(t){e._trigger("deactivate",t,this._uiHash(this))
}}.call(this,this.containers[i])),this.containers[i].containerCache.over&&(r.push(function(e){return function(t){e._trigger("out",t,this._uiHash(this))
}}.call(this,this.containers[i])),this.containers[i].containerCache.over=0)}this._storedCursor&&e("body").css("cursor",this._storedCursor),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex",this._storedZIndex=="auto"?"":this._storedZIndex),this.dragging=!1;
if(this.cancelHelperRemoval){if(!n){this._trigger("beforeStop",t,this._uiHash());for(var i=0;i<r.length;
i++){r[i].call(this,t)}this._trigger("stop",t,this._uiHash())}return this.fromOutside=!1,!1}n||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;
if(!n){for(var i=0;i<r.length;i++){r[i].call(this,t)}this._trigger("stop",t,this._uiHash())}return this.fromOutside=!1,!0
},_trigger:function(){e.Widget.prototype._trigger.apply(this,arguments)===!1&&this.cancel()},_uiHash:function(t){var n=t||this;
return{helper:n.helper,placeholder:n.placeholder||e([]),position:n.position,originalPosition:n.originalPosition,offset:n.positionAbs,item:n.currentItem,sender:t?t.element:null}
}})})(jQuery);(function(e,t){var n=0;e.widget("ui.autocomplete",{version:"1.9.2",defaultElement:"<input>",options:{appendTo:"body",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 t,n,r;
this.isMultiLine=this._isMultiLine(),this.valueMethod=this.element[this.element.is("input,textarea")?"val":"text"],this.isNewMenu=!0,this.element.addClass("ui-autocomplete-input").attr("autocomplete","off"),this._on(this.element,{keydown:function(i){if(this.element.prop("readOnly")){t=!0,r=!0,n=!0;
return}t=!1,r=!1,n=!1;var s=e.ui.keyCode;switch(i.keyCode){case s.PAGE_UP:t=!0,this._move("previousPage",i);
break;case s.PAGE_DOWN:t=!0,this._move("nextPage",i);break;case s.UP:t=!0,this._keyEvent("previous",i);
break;case s.DOWN:t=!0,this._keyEvent("next",i);break;case s.ENTER:case s.NUMPAD_ENTER:this.menu.active&&(t=!0,i.preventDefault(),this.menu.select(i));
break;case s.TAB:this.menu.active&&this.menu.select(i);break;case s.ESCAPE:this.menu.element.is(":visible")&&(this._value(this.term),this.close(i),i.preventDefault());
break;default:n=!0,this._searchTimeout(i)}},keypress:function(r){if(t){t=!1,r.preventDefault();return
}if(n){return}var i=e.ui.keyCode;switch(r.keyCode){case i.PAGE_UP:this._move("previousPage",r);break;
case i.PAGE_DOWN:this._move("nextPage",r);break;case i.UP:this._keyEvent("previous",r);break;case i.DOWN:this._keyEvent("next",r)
}},input:function(e){if(r){r=!1,e.preventDefault();return}this._searchTimeout(e)},focus:function(){this.selectedItem=null,this.previous=this._value()
},blur:function(e){if(this.cancelBlur){delete this.cancelBlur;return}clearTimeout(this.searching),this.close(e),this._change(e)
}}),this._initSource(),this.menu=e("<ul>").addClass("ui-autocomplete").appendTo(this.document.find(this.options.appendTo||"body")[0]).menu({input:e(),role:null}).zIndex(this.element.zIndex()+1).hide().data("menu"),this._on(this.menu.element,{mousedown:function(t){t.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur
});var n=this.menu.element[0];e(t.target).closest(".ui-menu-item").length||this._delay(function(){var t=this;
this.document.one("mousedown",function(r){r.target!==t.element[0]&&r.target!==n&&!e.contains(n,r.target)&&t.close()
})})},menufocus:function(t,n){if(this.isNewMenu){this.isNewMenu=!1;if(t.originalEvent&&/^mouse/.test(t.originalEvent.type)){this.menu.blur(),this.document.one("mousemove",function(){e(t.target).trigger(t.originalEvent)
});return}}var r=n.item.data("ui-autocomplete-item")||n.item.data("item.autocomplete");!1!==this._trigger("focus",t,{item:r})?t.originalEvent&&/^key/.test(t.originalEvent.type)&&this._value(r.value):this.liveRegion.text(r.value)
},menuselect:function(e,t){var n=t.item.data("ui-autocomplete-item")||t.item.data("item.autocomplete"),r=this.previous;
this.element[0]!==this.document[0].activeElement&&(this.element.focus(),this.previous=r,this._delay(function(){this.previous=r,this.selectedItem=n
})),!1!==this._trigger("select",e,{item:n})&&this._value(n.value),this.term=this._value(),this.close(e),this.selectedItem=n
}}),this.liveRegion=e("<span>",{role:"status","aria-live":"polite"}).addClass("ui-helper-hidden-accessible").insertAfter(this.element),e.fn.bgiframe&&this.menu.element.bgiframe(),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(e,t){this._super(e,t),e==="source"&&this._initSource(),e==="appendTo"&&this.menu.element.appendTo(this.document.find(t||"body")[0]),e==="disabled"&&t&&this.xhr&&this.xhr.abort()
},_isMultiLine:function(){return this.element.is("textarea")?!0:this.element.is("input")?!1:this.element.prop("isContentEditable")
},_initSource:function(){var t,n,r=this;e.isArray(this.options.source)?(t=this.options.source,this.source=function(n,r){r(e.ui.autocomplete.filter(t,n.term))
}):typeof this.options.source=="string"?(n=this.options.source,this.source=function(t,i){r.xhr&&r.xhr.abort(),r.xhr=e.ajax({url:n,data:t,dataType:"json",success:function(e){i(e)
},error:function(){i([])}})}):this.source=this.options.source},_searchTimeout:function(e){clearTimeout(this.searching),this.searching=this._delay(function(){this.term!==this._value()&&(this.selectedItem=null,this.search(null,e))
},this.options.delay)},search:function(e,t){e=e!=null?e:this._value(),this.term=this._value();if(e.length<this.options.minLength){return this.close(t)
}if(this._trigger("search",t)===!1){return}return this._search(e)},_search:function(e){this.pending++,this.element.addClass("ui-autocomplete-loading"),this.cancelSearch=!1,this.source({term:e},this._response())
},_response:function(){var e=this,t=++n;return function(r){t===n&&e.__response(r),e.pending--,e.pending||e.element.removeClass("ui-autocomplete-loading")
}},__response:function(e){e&&(e=this._normalize(e)),this._trigger("response",null,{content:e}),!this.options.disabled&&e&&e.length&&!this.cancelSearch?(this._suggest(e),this._trigger("open")):this._close()
},close:function(e){this.cancelSearch=!0,this._close(e)},_close:function(e){this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this._trigger("close",e))
},_change:function(e){this.previous!==this._value()&&this._trigger("change",e,{item:this.selectedItem})
},_normalize:function(t){return t.length&&t[0].label&&t[0].value?t:e.map(t,function(t){return typeof t=="string"?{label:t,value:t}:e.extend({label:t.label||t.value,value:t.value||t.label},t)
})},_suggest:function(t){var n=this.menu.element.empty().zIndex(this.element.zIndex()+1);this._renderMenu(n,t),this.menu.refresh(),n.show(),this._resizeMenu(),n.position(e.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next()
},_resizeMenu:function(){var e=this.menu.element;e.outerWidth(Math.max(e.width("").outerWidth()+1,this.element.outerWidth()))
},_renderMenu:function(t,n){var r=this;e.each(n,function(e,n){r._renderItemData(t,n)})},_renderItemData:function(e,t){return this._renderItem(e,t).data("ui-autocomplete-item",t)
},_renderItem:function(t,n){return e("<li>").append(e("<a>").text(n.label)).appendTo(t)},_move:function(e,t){if(!this.menu.element.is(":visible")){this.search(null,t);
return}if(this.menu.isFirstItem()&&/^previous/.test(e)||this.menu.isLastItem()&&/^next/.test(e)){this._value(this.term),this.menu.blur();
return}this.menu[e](t)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)
},_keyEvent:function(e,t){if(!this.isMultiLine||this.menu.element.is(":visible")){this._move(e,t),t.preventDefault()
}}}),e.extend(e.ui.autocomplete,{escapeRegex:function(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")
},filter:function(t,n){var r=new RegExp(e.ui.autocomplete.escapeRegex(n),"i");return e.grep(t,function(e){return r.test(e.label||e.value||e)
})}}),e.widget("ui.autocomplete",e.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(e){return e+(e>1?" results are":" result is")+" available, use up and down arrow keys to navigate."
}}},__response:function(e){var t;this._superApply(arguments);if(this.options.disabled||this.cancelSearch){return
}e&&e.length?t=this.options.messages.results(e.length):t=this.options.messages.noResults,this.liveRegion.text(t)
}})})(jQuery);(function(e,t){var n,r,i,s,o="ui-button ui-widget ui-state-default ui-corner-all",u="ui-state-hover ui-state-active ",a="ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only",f=function(){var t=e(this).find(":ui-button");
setTimeout(function(){t.button("refresh")},1)},l=function(t){var n=t.name,r=t.form,i=e([]);return n&&(r?i=e(r).find("[name='"+n+"']"):i=e("[name='"+n+"']",t.ownerDocument).filter(function(){return !this.form
})),i};e.widget("ui.button",{version:"1.9.2",defaultElement:"<button>",options:{disabled:null,text:!0,label:null,icons:{primary:null,secondary:null}},_create:function(){this.element.closest("form").unbind("reset"+this.eventNamespace).bind("reset"+this.eventNamespace,f),typeof this.options.disabled!="boolean"?this.options.disabled=!!this.element.prop("disabled"):this.element.prop("disabled",this.options.disabled),this._determineButtonType(),this.hasTitle=!!this.buttonElement.attr("title");
var t=this,u=this.options,a=this.type==="checkbox"||this.type==="radio",c=a?"":"ui-state-active",h="ui-state-focus";
u.label===null&&(u.label=this.type==="input"?this.buttonElement.val():this.buttonElement.html()),this._hoverable(this.buttonElement),this.buttonElement.addClass(o).attr("role","button").bind("mouseenter"+this.eventNamespace,function(){if(u.disabled){return
}this===n&&e(this).addClass("ui-state-active")}).bind("mouseleave"+this.eventNamespace,function(){if(u.disabled){return
}e(this).removeClass(c)}).bind("click"+this.eventNamespace,function(e){u.disabled&&(e.preventDefault(),e.stopImmediatePropagation())
}),this.element.bind("focus"+this.eventNamespace,function(){t.buttonElement.addClass(h)}).bind("blur"+this.eventNamespace,function(){t.buttonElement.removeClass(h)
}),a&&(this.element.bind("change"+this.eventNamespace,function(){if(s){return}t.refresh()}),this.buttonElement.bind("mousedown"+this.eventNamespace,function(e){if(u.disabled){return
}s=!1,r=e.pageX,i=e.pageY}).bind("mouseup"+this.eventNamespace,function(e){if(u.disabled){return}if(r!==e.pageX||i!==e.pageY){s=!0
}})),this.type==="checkbox"?this.buttonElement.bind("click"+this.eventNamespace,function(){if(u.disabled||s){return !1
}e(this).toggleClass("ui-state-active"),t.buttonElement.attr("aria-pressed",t.element[0].checked)}):this.type==="radio"?this.buttonElement.bind("click"+this.eventNamespace,function(){if(u.disabled||s){return !1
}e(this).addClass("ui-state-active"),t.buttonElement.attr("aria-pressed","true");var n=t.element[0];l(n).not(n).map(function(){return e(this).button("widget")[0]
}).removeClass("ui-state-active").attr("aria-pressed","false")}):(this.buttonElement.bind("mousedown"+this.eventNamespace,function(){if(u.disabled){return !1
}e(this).addClass("ui-state-active"),n=this,t.document.one("mouseup",function(){n=null})}).bind("mouseup"+this.eventNamespace,function(){if(u.disabled){return !1
}e(this).removeClass("ui-state-active")}).bind("keydown"+this.eventNamespace,function(t){if(u.disabled){return !1
}(t.keyCode===e.ui.keyCode.SPACE||t.keyCode===e.ui.keyCode.ENTER)&&e(this).addClass("ui-state-active")
}).bind("keyup"+this.eventNamespace,function(){e(this).removeClass("ui-state-active")}),this.buttonElement.is("a")&&this.buttonElement.keyup(function(t){t.keyCode===e.ui.keyCode.SPACE&&e(this).click()
})),this._setOption("disabled",u.disabled),this._resetButton()},_determineButtonType:function(){var e,t,n;
this.element.is("[type=checkbox]")?this.type="checkbox":this.element.is("[type=radio]")?this.type="radio":this.element.is("input")?this.type="input":this.type="button",this.type==="checkbox"||this.type==="radio"?(e=this.element.parents().last(),t="label[for='"+this.element.attr("id")+"']",this.buttonElement=e.find(t),this.buttonElement.length||(e=e.length?e.siblings():this.element.siblings(),this.buttonElement=e.filter(t),this.buttonElement.length||(this.buttonElement=e.find(t))),this.element.addClass("ui-helper-hidden-accessible"),n=this.element.is(":checked"),n&&this.buttonElement.addClass("ui-state-active"),this.buttonElement.prop("aria-pressed",n)):this.buttonElement=this.element
},widget:function(){return this.buttonElement},_destroy:function(){this.element.removeClass("ui-helper-hidden-accessible"),this.buttonElement.removeClass(o+" "+u+" "+a).removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html()),this.hasTitle||this.buttonElement.removeAttr("title")
},_setOption:function(e,t){this._super(e,t);if(e==="disabled"){t?this.element.prop("disabled",!0):this.element.prop("disabled",!1);
return}this._resetButton()},refresh:function(){var t=this.element.is("input, button")?this.element.is(":disabled"):this.element.hasClass("ui-button-disabled");
t!==this.options.disabled&&this._setOption("disabled",t),this.type==="radio"?l(this.element[0]).each(function(){e(this).is(":checked")?e(this).button("widget").addClass("ui-state-active").attr("aria-pressed","true"):e(this).button("widget").removeClass("ui-state-active").attr("aria-pressed","false")
}):this.type==="checkbox"&&(this.element.is(":checked")?this.buttonElement.addClass("ui-state-active").attr("aria-pressed","true"):this.buttonElement.removeClass("ui-state-active").attr("aria-pressed","false"))
},_resetButton:function(){if(this.type==="input"){this.options.label&&this.element.val(this.options.label);
return}var t=this.buttonElement.removeClass(a),n=e("<span></span>",this.document[0]).addClass("ui-button-text").html(this.options.label).appendTo(t.empty()).text(),r=this.options.icons,i=r.primary&&r.secondary,s=[];
r.primary||r.secondary?(this.options.text&&s.push("ui-button-text-icon"+(i?"s":r.primary?"-primary":"-secondary")),r.primary&&t.prepend("<span class='ui-button-icon-primary ui-icon "+r.primary+"'></span>"),r.secondary&&t.append("<span class='ui-button-icon-secondary ui-icon "+r.secondary+"'></span>"),this.options.text||(s.push(i?"ui-button-icons-only":"ui-button-icon-only"),this.hasTitle||t.attr("title",e.trim(n)))):s.push("ui-button-text-only"),t.addClass(s.join(" "))
}}),e.widget("ui.buttonset",{version:"1.9.2",options:{items:"button, input[type=button], input[type=submit], input[type=reset], input[type=checkbox], input[type=radio], a, :data(button)"},_create:function(){this.element.addClass("ui-buttonset")
},_init:function(){this.refresh()},_setOption:function(e,t){e==="disabled"&&this.buttons.button("option",e,t),this._super(e,t)
},refresh:function(){var t=this.element.css("direction")==="rtl";this.buttons=this.element.find(this.options.items).filter(":ui-button").button("refresh").end().not(":ui-button").button().end().map(function(){return e(this).button("widget")[0]
}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass(t?"ui-corner-right":"ui-corner-left").end().filter(":last").addClass(t?"ui-corner-left":"ui-corner-right").end().end()
},_destroy:function(){this.element.removeClass("ui-buttonset"),this.buttons.map(function(){return e(this).button("widget")[0]
}).removeClass("ui-corner-left ui-corner-right").end().button("destroy")}})})(jQuery);(function($,undefined){function Datepicker(){this.debug=!1,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},$.extend(this._defaults,this.regional[""]),this.dpDiv=bindHover($('<div id="'+this._mainDivId+'" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>'))
}function bindHover(e){var t="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";
return e.delegate(t,"mouseout",function(){$(this).removeClass("ui-state-hover"),this.className.indexOf("ui-datepicker-prev")!=-1&&$(this).removeClass("ui-datepicker-prev-hover"),this.className.indexOf("ui-datepicker-next")!=-1&&$(this).removeClass("ui-datepicker-next-hover")
}).delegate(t,"mouseover",function(){$.datepicker._isDisabledDatepicker(instActive.inline?e.parent()[0]:instActive.input[0])||($(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),$(this).addClass("ui-state-hover"),this.className.indexOf("ui-datepicker-prev")!=-1&&$(this).addClass("ui-datepicker-prev-hover"),this.className.indexOf("ui-datepicker-next")!=-1&&$(this).addClass("ui-datepicker-next-hover"))
})}function extendRemove(e,t){$.extend(e,t);for(var n in t){if(t[n]==null||t[n]==undefined){e[n]=t[n]
}}return e}$.extend($.ui,{datepicker:{version:"1.9.2"}});var PROP_NAME="datepicker",dpuuid=(new Date).getTime(),instActive;
$.extend(Datepicker.prototype,{markerClassName:"hasDatepicker",maxRows:4,log:function(){this.debug&&console.log.apply("",arguments)
},_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(e){return extendRemove(this._defaults,e||{}),this
},_attachDatepicker:function(target,settings){var inlineSettings=null;for(var attrName in this._defaults){var attrValue=target.getAttribute("date:"+attrName);
if(attrValue){inlineSettings=inlineSettings||{};try{inlineSettings[attrName]=eval(attrValue)}catch(err){inlineSettings[attrName]=attrValue
}}}var nodeName=target.nodeName.toLowerCase(),inline=nodeName=="div"||nodeName=="span";target.id||(this.uuid+=1,target.id="dp"+this.uuid);
var inst=this._newInst($(target),inline);inst.settings=$.extend({},settings||{},inlineSettings||{}),nodeName=="input"?this._connectDatepicker(target,inst):inline&&this._inlineDatepicker(target,inst)
},_newInst:function(e,t){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:t,dpDiv:t?bindHover($('<div class="'+this._inlineClass+' ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>')):this.dpDiv}
},_connectDatepicker:function(e,t){var n=$(e);t.append=$([]),t.trigger=$([]);if(n.hasClass(this.markerClassName)){return
}this._attachments(n,t),n.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp).bind("setData.datepicker",function(e,n,r){t.settings[n]=r
}).bind("getData.datepicker",function(e,n){return this._get(t,n)}),this._autoSize(t),$.data(e,PROP_NAME,t),t.settings.disabled&&this._disableDatepicker(e)
},_attachments:function(e,t){var n=this._get(t,"appendText"),r=this._get(t,"isRTL");t.append&&t.append.remove(),n&&(t.append=$('<span class="'+this._appendClass+'">'+n+"</span>"),e[r?"before":"after"](t.append)),e.unbind("focus",this._showDatepicker),t.trigger&&t.trigger.remove();
var i=this._get(t,"showOn");(i=="focus"||i=="both")&&e.focus(this._showDatepicker);if(i=="button"||i=="both"){var s=this._get(t,"buttonText"),o=this._get(t,"buttonImage");
t.trigger=$(this._get(t,"buttonImageOnly")?$("<img/>").addClass(this._triggerClass).attr({src:o,alt:s,title:s}):$('<button type="button"></button>').addClass(this._triggerClass).html(o==""?s:$("<img/>").attr({src:o,alt:s,title:s}))),e[r?"before":"after"](t.trigger),t.trigger.click(function(){return $.datepicker._datepickerShowing&&$.datepicker._lastInput==e[0]?$.datepicker._hideDatepicker():$.datepicker._datepickerShowing&&$.datepicker._lastInput!=e[0]?($.datepicker._hideDatepicker(),$.datepicker._showDatepicker(e[0])):$.datepicker._showDatepicker(e[0]),!1
})}},_autoSize:function(e){if(this._get(e,"autoSize")&&!e.inline){var t=new Date(2009,11,20),n=this._get(e,"dateFormat");
if(n.match(/[DM]/)){var r=function(e){var t=0,n=0;for(var r=0;r<e.length;r++){e[r].length>t&&(t=e[r].length,n=r)
}return n};t.setMonth(r(this._get(e,n.match(/MM/)?"monthNames":"monthNamesShort"))),t.setDate(r(this._get(e,n.match(/DD/)?"dayNames":"dayNamesShort"))+20-t.getDay())
}e.input.attr("size",this._formatDate(e,t).length)}},_inlineDatepicker:function(e,t){var n=$(e);if(n.hasClass(this.markerClassName)){return
}n.addClass(this.markerClassName).append(t.dpDiv).bind("setData.datepicker",function(e,n,r){t.settings[n]=r
}).bind("getData.datepicker",function(e,n){return this._get(t,n)}),$.data(e,PROP_NAME,t),this._setDate(t,this._getDefaultDate(t),!0),this._updateDatepicker(t),this._updateAlternate(t),t.settings.disabled&&this._disableDatepicker(e),t.dpDiv.css("display","block")
},_dialogDatepicker:function(e,t,n,r,i){var s=this._dialogInst;if(!s){this.uuid+=1;var o="dp"+this.uuid;
this._dialogInput=$('<input type="text" id="'+o+'" style="position: absolute; top: -100px; width: 0px;"/>'),this._dialogInput.keydown(this._doKeyDown),$("body").append(this._dialogInput),s=this._dialogInst=this._newInst(this._dialogInput,!1),s.settings={},$.data(this._dialogInput[0],PROP_NAME,s)
}extendRemove(s.settings,r||{}),t=t&&t.constructor==Date?this._formatDate(s,t):t,this._dialogInput.val(t),this._pos=i?i.length?i:[i.pageX,i.pageY]:null;
if(!this._pos){var u=document.documentElement.clientWidth,a=document.documentElement.clientHeight,f=document.documentElement.scrollLeft||document.body.scrollLeft,l=document.documentElement.scrollTop||document.body.scrollTop;
this._pos=[u/2-100+f,a/2-150+l]}return this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),s.settings.onSelect=n,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),$.blockUI&&$.blockUI(this.dpDiv),$.data(this._dialogInput[0],PROP_NAME,s),this
},_destroyDatepicker:function(e){var t=$(e),n=$.data(e,PROP_NAME);if(!t.hasClass(this.markerClassName)){return
}var r=e.nodeName.toLowerCase();$.removeData(e,PROP_NAME),r=="input"?(n.append.remove(),n.trigger.remove(),t.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)):(r=="div"||r=="span")&&t.removeClass(this.markerClassName).empty()
},_enableDatepicker:function(e){var t=$(e),n=$.data(e,PROP_NAME);if(!t.hasClass(this.markerClassName)){return
}var r=e.nodeName.toLowerCase();if(r=="input"){e.disabled=!1,n.trigger.filter("button").each(function(){this.disabled=!1
}).end().filter("img").css({opacity:"1.0",cursor:""})}else{if(r=="div"||r=="span"){var i=t.children("."+this._inlineClass);
i.children().removeClass("ui-state-disabled"),i.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)
}}this._disabledInputs=$.map(this._disabledInputs,function(t){return t==e?null:t})},_disableDatepicker:function(e){var t=$(e),n=$.data(e,PROP_NAME);
if(!t.hasClass(this.markerClassName)){return}var r=e.nodeName.toLowerCase();if(r=="input"){e.disabled=!0,n.trigger.filter("button").each(function(){this.disabled=!0
}).end().filter("img").css({opacity:"0.5",cursor:"default"})}else{if(r=="div"||r=="span"){var i=t.children("."+this._inlineClass);
i.children().addClass("ui-state-disabled"),i.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)
}}this._disabledInputs=$.map(this._disabledInputs,function(t){return t==e?null:t}),this._disabledInputs[this._disabledInputs.length]=e
},_isDisabledDatepicker:function(e){if(!e){return !1}for(var t=0;t<this._disabledInputs.length;t++){if(this._disabledInputs[t]==e){return !0
}}return !1},_getInst:function(e){try{return $.data(e,PROP_NAME)}catch(t){throw"Missing instance data for this datepicker"
}},_optionDatepicker:function(e,t,n){var r=this._getInst(e);if(arguments.length==2&&typeof t=="string"){return t=="defaults"?$.extend({},$.datepicker._defaults):r?t=="all"?$.extend({},r.settings):this._get(r,t):null
}var i=t||{};typeof t=="string"&&(i={},i[t]=n);if(r){this._curInst==r&&this._hideDatepicker();var s=this._getDateDatepicker(e,!0),o=this._getMinMaxDate(r,"min"),u=this._getMinMaxDate(r,"max");
extendRemove(r.settings,i),o!==null&&i.dateFormat!==undefined&&i.minDate===undefined&&(r.settings.minDate=this._formatDate(r,o)),u!==null&&i.dateFormat!==undefined&&i.maxDate===undefined&&(r.settings.maxDate=this._formatDate(r,u)),this._attachments($(e),r),this._autoSize(r),this._setDate(r,s),this._updateAlternate(r),this._updateDatepicker(r)
}},_changeDatepicker:function(e,t,n){this._optionDatepicker(e,t,n)},_refreshDatepicker:function(e){var t=this._getInst(e);
t&&this._updateDatepicker(t)},_setDateDatepicker:function(e,t){var n=this._getInst(e);n&&(this._setDate(n,t),this._updateDatepicker(n),this._updateAlternate(n))
},_getDateDatepicker:function(e,t){var n=this._getInst(e);return n&&!n.inline&&this._setDateFromField(n,t),n?this._getDate(n):null
},_doKeyDown:function(e){var t=$.datepicker._getInst(e.target),n=!0,r=t.dpDiv.is(".ui-datepicker-rtl");
t._keyEvent=!0;if($.datepicker._datepickerShowing){switch(e.keyCode){case 9:$.datepicker._hideDatepicker(),n=!1;
break;case 13:var i=$("td."+$.datepicker._dayOverClass+":not(."+$.datepicker._currentClass+")",t.dpDiv);
i[0]&&$.datepicker._selectDay(e.target,t.selectedMonth,t.selectedYear,i[0]);var s=$.datepicker._get(t,"onSelect");
if(s){var o=$.datepicker._formatDate(t);s.apply(t.input?t.input[0]:null,[o,t])}else{$.datepicker._hideDatepicker()
}return !1;case 27:$.datepicker._hideDatepicker();break;case 33:$.datepicker._adjustDate(e.target,e.ctrlKey?-$.datepicker._get(t,"stepBigMonths"):-$.datepicker._get(t,"stepMonths"),"M");
break;case 34:$.datepicker._adjustDate(e.target,e.ctrlKey?+$.datepicker._get(t,"stepBigMonths"):+$.datepicker._get(t,"stepMonths"),"M");
break;case 35:(e.ctrlKey||e.metaKey)&&$.datepicker._clearDate(e.target),n=e.ctrlKey||e.metaKey;break;
case 36:(e.ctrlKey||e.metaKey)&&$.datepicker._gotoToday(e.target),n=e.ctrlKey||e.metaKey;break;case 37:(e.ctrlKey||e.metaKey)&&$.datepicker._adjustDate(e.target,r?1:-1,"D"),n=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&$.datepicker._adjustDate(e.target,e.ctrlKey?-$.datepicker._get(t,"stepBigMonths"):-$.datepicker._get(t,"stepMonths"),"M");
break;case 38:(e.ctrlKey||e.metaKey)&&$.datepicker._adjustDate(e.target,-7,"D"),n=e.ctrlKey||e.metaKey;
break;case 39:(e.ctrlKey||e.metaKey)&&$.datepicker._adjustDate(e.target,r?-1:1,"D"),n=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&$.datepicker._adjustDate(e.target,e.ctrlKey?+$.datepicker._get(t,"stepBigMonths"):+$.datepicker._get(t,"stepMonths"),"M");
break;case 40:(e.ctrlKey||e.metaKey)&&$.datepicker._adjustDate(e.target,7,"D"),n=e.ctrlKey||e.metaKey;
break;default:n=!1}}else{e.keyCode==36&&e.ctrlKey?$.datepicker._showDatepicker(this):n=!1}n&&(e.preventDefault(),e.stopPropagation())
},_doKeyPress:function(e){var t=$.datepicker._getInst(e.target);if($.datepicker._get(t,"constrainInput")){var n=$.datepicker._possibleChars($.datepicker._get(t,"dateFormat")),r=String.fromCharCode(e.charCode==undefined?e.keyCode:e.charCode);
return e.ctrlKey||e.metaKey||r<" "||!n||n.indexOf(r)>-1}},_doKeyUp:function(e){var t=$.datepicker._getInst(e.target);
if(t.input.val()!=t.lastVal){try{var n=$.datepicker.parseDate($.datepicker._get(t,"dateFormat"),t.input?t.input.val():null,$.datepicker._getFormatConfig(t));
n&&($.datepicker._setDateFromField(t),$.datepicker._updateAlternate(t),$.datepicker._updateDatepicker(t))
}catch(r){$.datepicker.log(r)}}return !0},_showDatepicker:function(e){e=e.target||e,e.nodeName.toLowerCase()!="input"&&(e=$("input",e.parentNode)[0]);
if($.datepicker._isDisabledDatepicker(e)||$.datepicker._lastInput==e){return}var t=$.datepicker._getInst(e);
$.datepicker._curInst&&$.datepicker._curInst!=t&&($.datepicker._curInst.dpDiv.stop(!0,!0),t&&$.datepicker._datepickerShowing&&$.datepicker._hideDatepicker($.datepicker._curInst.input[0]));
var n=$.datepicker._get(t,"beforeShow"),r=n?n.apply(e,[e,t]):{};if(r===!1){return}extendRemove(t.settings,r),t.lastVal=null,$.datepicker._lastInput=e,$.datepicker._setDateFromField(t),$.datepicker._inDialog&&(e.value=""),$.datepicker._pos||($.datepicker._pos=$.datepicker._findPos(e),$.datepicker._pos[1]+=e.offsetHeight);
var i=!1;$(e).parents().each(function(){return i|=$(this).css("position")=="fixed",!i});var s={left:$.datepicker._pos[0],top:$.datepicker._pos[1]};
$.datepicker._pos=null,t.dpDiv.empty(),t.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),$.datepicker._updateDatepicker(t),s=$.datepicker._checkOffset(t,s,i),t.dpDiv.css({position:$.datepicker._inDialog&&$.blockUI?"static":i?"fixed":"absolute",display:"none",left:s.left+"px",top:s.top+"px"});
if(!t.inline){var o=$.datepicker._get(t,"showAnim"),u=$.datepicker._get(t,"duration"),a=function(){var e=t.dpDiv.find("iframe.ui-datepicker-cover");
if(!!e.length){var n=$.datepicker._getBorders(t.dpDiv);e.css({left:-n[0],top:-n[1],width:t.dpDiv.outerWidth(),height:t.dpDiv.outerHeight()})
}};t.dpDiv.zIndex($(e).zIndex()+1),$.datepicker._datepickerShowing=!0,$.effects&&($.effects.effect[o]||$.effects[o])?t.dpDiv.show(o,$.datepicker._get(t,"showOptions"),u,a):t.dpDiv[o||"show"](o?u:null,a),(!o||!u)&&a(),t.input.is(":visible")&&!t.input.is(":disabled")&&t.input.focus(),$.datepicker._curInst=t
}},_updateDatepicker:function(e){this.maxRows=4;var t=$.datepicker._getBorders(e.dpDiv);instActive=e,e.dpDiv.empty().append(this._generateHTML(e)),this._attachHandlers(e);
var n=e.dpDiv.find("iframe.ui-datepicker-cover");!n.length||n.css({left:-t[0],top:-t[1],width:e.dpDiv.outerWidth(),height:e.dpDiv.outerHeight()}),e.dpDiv.find("."+this._dayOverClass+" a").mouseover();
var r=this._getNumberOfMonths(e),i=r[1],s=17;e.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),i>1&&e.dpDiv.addClass("ui-datepicker-multi-"+i).css("width",s*i+"em"),e.dpDiv[(r[0]!=1||r[1]!=1?"add":"remove")+"Class"]("ui-datepicker-multi"),e.dpDiv[(this._get(e,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),e==$.datepicker._curInst&&$.datepicker._datepickerShowing&&e.input&&e.input.is(":visible")&&!e.input.is(":disabled")&&e.input[0]!=document.activeElement&&e.input.focus();
if(e.yearshtml){var o=e.yearshtml;setTimeout(function(){o===e.yearshtml&&e.yearshtml&&e.dpDiv.find("select.ui-datepicker-year:first").replaceWith(e.yearshtml),o=e.yearshtml=null
},0)}},_getBorders:function(e){var t=function(e){return{thin:1,medium:2,thick:3}[e]||e};return[parseFloat(t(e.css("border-left-width"))),parseFloat(t(e.css("border-top-width")))]
},_checkOffset:function(e,t,n){var r=e.dpDiv.outerWidth(),i=e.dpDiv.outerHeight(),s=e.input?e.input.outerWidth():0,o=e.input?e.input.outerHeight():0,u=document.documentElement.clientWidth+(n?0:$(document).scrollLeft()),a=document.documentElement.clientHeight+(n?0:$(document).scrollTop());
return t.left-=this._get(e,"isRTL")?r-s:0,t.left-=n&&t.left==e.input.offset().left?$(document).scrollLeft():0,t.top-=n&&t.top==e.input.offset().top+o?$(document).scrollTop():0,t.left-=Math.min(t.left,t.left+r>u&&u>r?Math.abs(t.left+r-u):0),t.top-=Math.min(t.top,t.top+i>a&&a>i?Math.abs(i+o):0),t
},_findPos:function(e){var t=this._getInst(e),n=this._get(t,"isRTL");while(e&&(e.type=="hidden"||e.nodeType!=1||$.expr.filters.hidden(e))){e=e[n?"previousSibling":"nextSibling"]
}var r=$(e).offset();return[r.left,r.top]},_hideDatepicker:function(e){var t=this._curInst;if(!t||e&&t!=$.data(e,PROP_NAME)){return
}if(this._datepickerShowing){var n=this._get(t,"showAnim"),r=this._get(t,"duration"),i=function(){$.datepicker._tidyDialog(t)
};$.effects&&($.effects.effect[n]||$.effects[n])?t.dpDiv.hide(n,$.datepicker._get(t,"showOptions"),r,i):t.dpDiv[n=="slideDown"?"slideUp":n=="fadeIn"?"fadeOut":"hide"](n?r:null,i),n||i(),this._datepickerShowing=!1;
var s=this._get(t,"onClose");s&&s.apply(t.input?t.input[0]:null,[t.input?t.input.val():"",t]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),$.blockUI&&($.unblockUI(),$("body").append(this.dpDiv))),this._inDialog=!1
}},_tidyDialog:function(e){e.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(e){if(!$.datepicker._curInst){return
}var t=$(e.target),n=$.datepicker._getInst(t[0]);(t[0].id!=$.datepicker._mainDivId&&t.parents("#"+$.datepicker._mainDivId).length==0&&!t.hasClass($.datepicker.markerClassName)&&!t.closest("."+$.datepicker._triggerClass).length&&$.datepicker._datepickerShowing&&(!$.datepicker._inDialog||!$.blockUI)||t.hasClass($.datepicker.markerClassName)&&$.datepicker._curInst!=n)&&$.datepicker._hideDatepicker()
},_adjustDate:function(e,t,n){var r=$(e),i=this._getInst(r[0]);if(this._isDisabledDatepicker(r[0])){return
}this._adjustInstDate(i,t+(n=="M"?this._get(i,"showCurrentAtPos"):0),n),this._updateDatepicker(i)},_gotoToday:function(e){var t=$(e),n=this._getInst(t[0]);
if(this._get(n,"gotoCurrent")&&n.currentDay){n.selectedDay=n.currentDay,n.drawMonth=n.selectedMonth=n.currentMonth,n.drawYear=n.selectedYear=n.currentYear
}else{var r=new Date;n.selectedDay=r.getDate(),n.drawMonth=n.selectedMonth=r.getMonth(),n.drawYear=n.selectedYear=r.getFullYear()
}this._notifyChange(n),this._adjustDate(t)},_selectMonthYear:function(e,t,n){var r=$(e),i=this._getInst(r[0]);
i["selected"+(n=="M"?"Month":"Year")]=i["draw"+(n=="M"?"Month":"Year")]=parseInt(t.options[t.selectedIndex].value,10),this._notifyChange(i),this._adjustDate(r)
},_selectDay:function(e,t,n,r){var i=$(e);if($(r).hasClass(this._unselectableClass)||this._isDisabledDatepicker(i[0])){return
}var s=this._getInst(i[0]);s.selectedDay=s.currentDay=$("a",r).html(),s.selectedMonth=s.currentMonth=t,s.selectedYear=s.currentYear=n,this._selectDate(e,this._formatDate(s,s.currentDay,s.currentMonth,s.currentYear))
},_clearDate:function(e){var t=$(e),n=this._getInst(t[0]);this._selectDate(t,"")},_selectDate:function(e,t){var n=$(e),r=this._getInst(n[0]);
t=t!=null?t:this._formatDate(r),r.input&&r.input.val(t),this._updateAlternate(r);var i=this._get(r,"onSelect");
i?i.apply(r.input?r.input[0]:null,[t,r]):r.input&&r.input.trigger("change"),r.inline?this._updateDatepicker(r):(this._hideDatepicker(),this._lastInput=r.input[0],typeof r.input[0]!="object"&&r.input.focus(),this._lastInput=null)
},_updateAlternate:function(e){var t=this._get(e,"altField");if(t){var n=this._get(e,"altFormat")||this._get(e,"dateFormat"),r=this._getDate(e),i=this.formatDate(n,r,this._getFormatConfig(e));
$(t).each(function(){$(this).val(i)})}},noWeekends:function(e){var t=e.getDay();return[t>0&&t<6,""]},iso8601Week:function(e){var t=new Date(e.getTime());
t.setDate(t.getDate()+4-(t.getDay()||7));var n=t.getTime();return t.setMonth(0),t.setDate(1),Math.floor(Math.round((n-t)/86400000)/7)+1
},parseDate:function(e,t,n){if(e==null||t==null){throw"Invalid arguments"}t=typeof t=="object"?t.toString():t+"";
if(t==""){return null}var r=(n?n.shortYearCutoff:null)||this._defaults.shortYearCutoff;r=typeof r!="string"?r:(new Date).getFullYear()%100+parseInt(r,10);
var i=(n?n.dayNamesShort:null)||this._defaults.dayNamesShort,s=(n?n.dayNames:null)||this._defaults.dayNames,o=(n?n.monthNamesShort:null)||this._defaults.monthNamesShort,u=(n?n.monthNames:null)||this._defaults.monthNames,a=-1,f=-1,l=-1,c=-1,h=!1,p=function(t){var n=y+1<e.length&&e.charAt(y+1)==t;
return n&&y++,n},d=function(e){var n=p(e),r=e=="@"?14:e=="!"?20:e=="y"&&n?4:e=="o"?3:2,i=new RegExp("^\\d{1,"+r+"}"),s=t.substring(g).match(i);
if(!s){throw"Missing number at position "+g}return g+=s[0].length,parseInt(s[0],10)},v=function(e,n,r){var i=$.map(p(e)?r:n,function(e,t){return[[t,e]]
}).sort(function(e,t){return -(e[1].length-t[1].length)}),s=-1;$.each(i,function(e,n){var r=n[1];if(t.substr(g,r.length).toLowerCase()==r.toLowerCase()){return s=n[0],g+=r.length,!1
}});if(s!=-1){return s+1}throw"Unknown name at position "+g},m=function(){if(t.charAt(g)!=e.charAt(y)){throw"Unexpected literal at position "+g
}g++},g=0;for(var y=0;y<e.length;y++){if(h){e.charAt(y)=="'"&&!p("'")?h=!1:m()}else{switch(e.charAt(y)){case"d":l=d("d");
break;case"D":v("D",i,s);break;case"o":c=d("o");break;case"m":f=d("m");break;case"M":f=v("M",o,u);break;
case"y":a=d("y");break;case"@":var b=new Date(d("@"));a=b.getFullYear(),f=b.getMonth()+1,l=b.getDate();
break;case"!":var b=new Date((d("!")-this._ticksTo1970)/10000);a=b.getFullYear(),f=b.getMonth()+1,l=b.getDate();
break;case"'":p("'")?m():h=!0;break;default:m()}}}if(g<t.length){var w=t.substr(g);if(!/^\s+/.test(w)){throw"Extra/unparsed characters found in date: "+w
}}a==-1?a=(new Date).getFullYear():a<100&&(a+=(new Date).getFullYear()-(new Date).getFullYear()%100+(a<=r?0:-100));
if(c>-1){f=1,l=c;do{var E=this._getDaysInMonth(a,f-1);if(l<=E){break}f++,l-=E}while(!0)}var b=this._daylightSavingAdjust(new Date(a,f-1,l));
if(b.getFullYear()!=a||b.getMonth()+1!=f||b.getDate()!=l){throw"Invalid date"}return b},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*24*60*60*10000000,formatDate:function(e,t,n){if(!t){return""
}var r=(n?n.dayNamesShort:null)||this._defaults.dayNamesShort,i=(n?n.dayNames:null)||this._defaults.dayNames,s=(n?n.monthNamesShort:null)||this._defaults.monthNamesShort,o=(n?n.monthNames:null)||this._defaults.monthNames,u=function(t){var n=h+1<e.length&&e.charAt(h+1)==t;
return n&&h++,n},a=function(e,t,n){var r=""+t;if(u(e)){while(r.length<n){r="0"+r}}return r},f=function(e,t,n,r){return u(e)?r[t]:n[t]
},l="",c=!1;if(t){for(var h=0;h<e.length;h++){if(c){e.charAt(h)=="'"&&!u("'")?c=!1:l+=e.charAt(h)}else{switch(e.charAt(h)){case"d":l+=a("d",t.getDate(),2);
break;case"D":l+=f("D",t.getDay(),r,i);break;case"o":l+=a("o",Math.round(((new Date(t.getFullYear(),t.getMonth(),t.getDate())).getTime()-(new Date(t.getFullYear(),0,0)).getTime())/86400000),3);
break;case"m":l+=a("m",t.getMonth()+1,2);break;case"M":l+=f("M",t.getMonth(),s,o);break;case"y":l+=u("y")?t.getFullYear():(t.getYear()%100<10?"0":"")+t.getYear()%100;
break;case"@":l+=t.getTime();break;case"!":l+=t.getTime()*10000+this._ticksTo1970;break;case"'":u("'")?l+="'":c=!0;
break;default:l+=e.charAt(h)}}}}return l},_possibleChars:function(e){var t="",n=!1,r=function(t){var n=i+1<e.length&&e.charAt(i+1)==t;
return n&&i++,n};for(var i=0;i<e.length;i++){if(n){e.charAt(i)=="'"&&!r("'")?n=!1:t+=e.charAt(i)}else{switch(e.charAt(i)){case"d":case"m":case"y":case"@":t+="0123456789";
break;case"D":case"M":return null;case"'":r("'")?t+="'":n=!0;break;default:t+=e.charAt(i)}}}return t},_get:function(e,t){return e.settings[t]!==undefined?e.settings[t]:this._defaults[t]
},_setDateFromField:function(e,t){if(e.input.val()==e.lastVal){return}var n=this._get(e,"dateFormat"),r=e.lastVal=e.input?e.input.val():null,i,s;
i=s=this._getDefaultDate(e);var o=this._getFormatConfig(e);try{i=this.parseDate(n,r,o)||s}catch(u){this.log(u),r=t?"":r
}e.selectedDay=i.getDate(),e.drawMonth=e.selectedMonth=i.getMonth(),e.drawYear=e.selectedYear=i.getFullYear(),e.currentDay=r?i.getDate():0,e.currentMonth=r?i.getMonth():0,e.currentYear=r?i.getFullYear():0,this._adjustInstDate(e)
},_getDefaultDate:function(e){return this._restrictMinMax(e,this._determineDate(e,this._get(e,"defaultDate"),new Date))
},_determineDate:function(e,t,n){var r=function(e){var t=new Date;return t.setDate(t.getDate()+e),t},i=function(t){try{return $.datepicker.parseDate($.datepicker._get(e,"dateFormat"),t,$.datepicker._getFormatConfig(e))
}catch(n){}var r=(t.toLowerCase().match(/^c/)?$.datepicker._getDate(e):null)||new Date,i=r.getFullYear(),s=r.getMonth(),o=r.getDate(),u=/([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,a=u.exec(t);
while(a){switch(a[2]||"d"){case"d":case"D":o+=parseInt(a[1],10);break;case"w":case"W":o+=parseInt(a[1],10)*7;
break;case"m":case"M":s+=parseInt(a[1],10),o=Math.min(o,$.datepicker._getDaysInMonth(i,s));break;case"y":case"Y":i+=parseInt(a[1],10),o=Math.min(o,$.datepicker._getDaysInMonth(i,s))
}a=u.exec(t)}return new Date(i,s,o)},s=t==null||t===""?n:typeof t=="string"?i(t):typeof t=="number"?isNaN(t)?n:r(t):new Date(t.getTime());
return s=s&&s.toString()=="Invalid Date"?n:s,s&&(s.setHours(0),s.setMinutes(0),s.setSeconds(0),s.setMilliseconds(0)),this._daylightSavingAdjust(s)
},_daylightSavingAdjust:function(e){return e?(e.setHours(e.getHours()>12?e.getHours()+2:0),e):null},_setDate:function(e,t,n){var r=!t,i=e.selectedMonth,s=e.selectedYear,o=this._restrictMinMax(e,this._determineDate(e,t,new Date));
e.selectedDay=e.currentDay=o.getDate(),e.drawMonth=e.selectedMonth=e.currentMonth=o.getMonth(),e.drawYear=e.selectedYear=e.currentYear=o.getFullYear(),(i!=e.selectedMonth||s!=e.selectedYear)&&!n&&this._notifyChange(e),this._adjustInstDate(e),e.input&&e.input.val(r?"":this._formatDate(e))
},_getDate:function(e){var t=!e.currentYear||e.input&&e.input.val()==""?null:this._daylightSavingAdjust(new Date(e.currentYear,e.currentMonth,e.currentDay));
return t},_attachHandlers:function(e){var t=this._get(e,"stepMonths"),n="#"+e.id.replace(/\\\\/g,"\\");
e.dpDiv.find("[data-handler]").map(function(){var e={prev:function(){window["DP_jQuery_"+dpuuid].datepicker._adjustDate(n,-t,"M")
},next:function(){window["DP_jQuery_"+dpuuid].datepicker._adjustDate(n,+t,"M")},hide:function(){window["DP_jQuery_"+dpuuid].datepicker._hideDatepicker()
},today:function(){window["DP_jQuery_"+dpuuid].datepicker._gotoToday(n)},selectDay:function(){return window["DP_jQuery_"+dpuuid].datepicker._selectDay(n,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1
},selectMonth:function(){return window["DP_jQuery_"+dpuuid].datepicker._selectMonthYear(n,this,"M"),!1
},selectYear:function(){return window["DP_jQuery_"+dpuuid].datepicker._selectMonthYear(n,this,"Y"),!1
}};$(this).bind(this.getAttribute("data-event"),e[this.getAttribute("data-handler")])})},_generateHTML:function(e){var t=new Date;
t=this._daylightSavingAdjust(new Date(t.getFullYear(),t.getMonth(),t.getDate()));var n=this._get(e,"isRTL"),r=this._get(e,"showButtonPanel"),i=this._get(e,"hideIfNoPrevNext"),s=this._get(e,"navigationAsDateFormat"),o=this._getNumberOfMonths(e),u=this._get(e,"showCurrentAtPos"),a=this._get(e,"stepMonths"),f=o[0]!=1||o[1]!=1,l=this._daylightSavingAdjust(e.currentDay?new Date(e.currentYear,e.currentMonth,e.currentDay):new Date(9999,9,9)),c=this._getMinMaxDate(e,"min"),h=this._getMinMaxDate(e,"max"),p=e.drawMonth-u,d=e.drawYear;
p<0&&(p+=12,d--);if(h){var v=this._daylightSavingAdjust(new Date(h.getFullYear(),h.getMonth()-o[0]*o[1]+1,h.getDate()));
v=c&&v<c?c:v;while(this._daylightSavingAdjust(new Date(d,p,1))>v){p--,p<0&&(p=11,d--)}}e.drawMonth=p,e.drawYear=d;
var m=this._get(e,"prevText");m=s?this.formatDate(m,this._daylightSavingAdjust(new Date(d,p-a,1)),this._getFormatConfig(e)):m;
var g=this._canAdjustMonth(e,-1,d,p)?'<a class="ui-datepicker-prev ui-corner-all" data-handler="prev" data-event="click" title="'+m+'"><span class="ui-icon ui-icon-circle-triangle-'+(n?"e":"w")+'">'+m+"</span></a>":i?"":'<a class="ui-datepicker-prev ui-corner-all ui-state-disabled" title="'+m+'"><span class="ui-icon ui-icon-circle-triangle-'+(n?"e":"w")+'">'+m+"</span></a>",y=this._get(e,"nextText");
y=s?this.formatDate(y,this._daylightSavingAdjust(new Date(d,p+a,1)),this._getFormatConfig(e)):y;var b=this._canAdjustMonth(e,1,d,p)?'<a class="ui-datepicker-next ui-corner-all" data-handler="next" data-event="click" title="'+y+'"><span class="ui-icon ui-icon-circle-triangle-'+(n?"w":"e")+'">'+y+"</span></a>":i?"":'<a class="ui-datepicker-next ui-corner-all ui-state-disabled" title="'+y+'"><span class="ui-icon ui-icon-circle-triangle-'+(n?"w":"e")+'">'+y+"</span></a>",w=this._get(e,"currentText"),E=this._get(e,"gotoCurrent")&&e.currentDay?l:t;
w=s?this.formatDate(w,E,this._getFormatConfig(e)):w;var S=e.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(e,"closeText")+"</button>",x=r?'<div class="ui-datepicker-buttonpane ui-widget-content">'+(n?S:"")+(this._isInRange(e,E)?'<button type="button" class="ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all" data-handler="today" data-event="click">'+w+"</button>":"")+(n?"":S)+"</div>":"",T=parseInt(this._get(e,"firstDay"),10);
T=isNaN(T)?0:T;var N=this._get(e,"showWeek"),C=this._get(e,"dayNames"),k=this._get(e,"dayNamesShort"),L=this._get(e,"dayNamesMin"),A=this._get(e,"monthNames"),O=this._get(e,"monthNamesShort"),M=this._get(e,"beforeShowDay"),_=this._get(e,"showOtherMonths"),D=this._get(e,"selectOtherMonths"),P=this._get(e,"calculateWeek")||this.iso8601Week,H=this._getDefaultDate(e),B="";
for(var j=0;j<o[0];j++){var F="";this.maxRows=4;for(var I=0;I<o[1];I++){var q=this._daylightSavingAdjust(new Date(d,p,e.selectedDay)),R=" ui-corner-all",U="";
if(f){U+='<div class="ui-datepicker-group';if(o[1]>1){switch(I){case 0:U+=" ui-datepicker-group-first",R=" ui-corner-"+(n?"right":"left");
break;case o[1]-1:U+=" ui-datepicker-group-last",R=" ui-corner-"+(n?"left":"right");break;default:U+=" ui-datepicker-group-middle",R=""
}}U+='">'}U+='<div class="ui-datepicker-header ui-widget-header ui-helper-clearfix'+R+'">'+(/all|left/.test(R)&&j==0?n?b:g:"")+(/all|right/.test(R)&&j==0?n?g:b:"")+this._generateMonthYearHeader(e,p,d,c,h,j>0||I>0,A,O)+'</div><table class="ui-datepicker-calendar"><thead>'+"<tr>";
var z=N?'<th class="ui-datepicker-week-col">'+this._get(e,"weekHeader")+"</th>":"";for(var W=0;W<7;W++){var X=(W+T)%7;
z+="<th"+((W+T+6)%7>=5?' class="ui-datepicker-week-end"':"")+">"+'<span title="'+C[X]+'">'+L[X]+"</span></th>"
}U+=z+"</tr></thead><tbody>";var V=this._getDaysInMonth(d,p);d==e.selectedYear&&p==e.selectedMonth&&(e.selectedDay=Math.min(e.selectedDay,V));
var J=(this._getFirstDayOfMonth(d,p)-T+7)%7,K=Math.ceil((J+V)/7),Q=f?this.maxRows>K?this.maxRows:K:K;
this.maxRows=Q;var G=this._daylightSavingAdjust(new Date(d,p,1-J));for(var Y=0;Y<Q;Y++){U+="<tr>";var Z=N?'<td class="ui-datepicker-week-col">'+this._get(e,"calculateWeek")(G)+"</td>":"";
for(var W=0;W<7;W++){var et=M?M.apply(e.input?e.input[0]:null,[G]):[!0,""],tt=G.getMonth()!=p,nt=tt&&!D||!et[0]||c&&G<c||h&&G>h;
Z+='<td class="'+((W+T+6)%7>=5?" ui-datepicker-week-end":"")+(tt?" ui-datepicker-other-month":"")+(G.getTime()==q.getTime()&&p==e.selectedMonth&&e._keyEvent||H.getTime()==G.getTime()&&H.getTime()==q.getTime()?" "+this._dayOverClass:"")+(nt?" "+this._unselectableClass+" ui-state-disabled":"")+(tt&&!_?"":" "+et[1]+(G.getTime()==l.getTime()?" "+this._currentClass:"")+(G.getTime()==t.getTime()?" ui-datepicker-today":""))+'"'+((!tt||_)&&et[2]?' title="'+et[2]+'"':"")+(nt?"":' data-handler="selectDay" data-event="click" data-month="'+G.getMonth()+'" data-year="'+G.getFullYear()+'"')+">"+(tt&&!_?"&#xa0;":nt?'<span class="ui-state-default">'+G.getDate()+"</span>":'<a class="ui-state-default'+(G.getTime()==t.getTime()?" ui-state-highlight":"")+(G.getTime()==l.getTime()?" ui-state-active":"")+(tt?" ui-priority-secondary":"")+'" href="#">'+G.getDate()+"</a>")+"</td>",G.setDate(G.getDate()+1),G=this._daylightSavingAdjust(G)
}U+=Z+"</tr>"}p++,p>11&&(p=0,d++),U+="</tbody></table>"+(f?"</div>"+(o[0]>0&&I==o[1]-1?'<div class="ui-datepicker-row-break"></div>':""):""),F+=U
}B+=F}return B+=x+($.ui.ie6&&!e.inline?'<iframe src="javascript:false;" class="ui-datepicker-cover" frameborder="0"></iframe>':""),e._keyEvent=!1,B
},_generateMonthYearHeader:function(e,t,n,r,i,s,o,u){var a=this._get(e,"changeMonth"),f=this._get(e,"changeYear"),l=this._get(e,"showMonthAfterYear"),c='<div class="ui-datepicker-title">',h="";
if(s||!a){h+='<span class="ui-datepicker-month">'+o[t]+"</span>"}else{var p=r&&r.getFullYear()==n,d=i&&i.getFullYear()==n;
h+='<select class="ui-datepicker-month" data-handler="selectMonth" data-event="change">';for(var v=0;
v<12;v++){(!p||v>=r.getMonth())&&(!d||v<=i.getMonth())&&(h+='<option value="'+v+'"'+(v==t?' selected="selected"':"")+">"+u[v]+"</option>")
}h+="</select>"}l||(c+=h+(s||!a||!f?"&#xa0;":""));if(!e.yearshtml){e.yearshtml="";if(s||!f){c+='<span class="ui-datepicker-year">'+n+"</span>"
}else{var m=this._get(e,"yearRange").split(":"),g=(new Date).getFullYear(),y=function(e){var t=e.match(/c[+-].*/)?n+parseInt(e.substring(1),10):e.match(/[+-].*/)?g+parseInt(e,10):parseInt(e,10);
return isNaN(t)?g:t},b=y(m[0]),w=Math.max(b,y(m[1]||""));b=r?Math.max(b,r.getFullYear()):b,w=i?Math.min(w,i.getFullYear()):w,e.yearshtml+='<select class="ui-datepicker-year" data-handler="selectYear" data-event="change">';
for(;b<=w;b++){e.yearshtml+='<option value="'+b+'"'+(b==n?' selected="selected"':"")+">"+b+"</option>"
}e.yearshtml+="</select>",c+=e.yearshtml,e.yearshtml=null}}return c+=this._get(e,"yearSuffix"),l&&(c+=(s||!a||!f?"&#xa0;":"")+h),c+="</div>",c
},_adjustInstDate:function(e,t,n){var r=e.drawYear+(n=="Y"?t:0),i=e.drawMonth+(n=="M"?t:0),s=Math.min(e.selectedDay,this._getDaysInMonth(r,i))+(n=="D"?t:0),o=this._restrictMinMax(e,this._daylightSavingAdjust(new Date(r,i,s)));
e.selectedDay=o.getDate(),e.drawMonth=e.selectedMonth=o.getMonth(),e.drawYear=e.selectedYear=o.getFullYear(),(n=="M"||n=="Y")&&this._notifyChange(e)
},_restrictMinMax:function(e,t){var n=this._getMinMaxDate(e,"min"),r=this._getMinMaxDate(e,"max"),i=n&&t<n?n:t;
return i=r&&i>r?r:i,i},_notifyChange:function(e){var t=this._get(e,"onChangeMonthYear");t&&t.apply(e.input?e.input[0]:null,[e.selectedYear,e.selectedMonth+1,e])
},_getNumberOfMonths:function(e){var t=this._get(e,"numberOfMonths");return t==null?[1,1]:typeof t=="number"?[1,t]:t
},_getMinMaxDate:function(e,t){return this._determineDate(e,this._get(e,t+"Date"),null)},_getDaysInMonth:function(e,t){return 32-this._daylightSavingAdjust(new Date(e,t,32)).getDate()
},_getFirstDayOfMonth:function(e,t){return(new Date(e,t,1)).getDay()},_canAdjustMonth:function(e,t,n,r){var i=this._getNumberOfMonths(e),s=this._daylightSavingAdjust(new Date(n,r+(t<0?t:i[0]*i[1]),1));
return t<0&&s.setDate(this._getDaysInMonth(s.getFullYear(),s.getMonth())),this._isInRange(e,s)},_isInRange:function(e,t){var n=this._getMinMaxDate(e,"min"),r=this._getMinMaxDate(e,"max");
return(!n||t.getTime()>=n.getTime())&&(!r||t.getTime()<=r.getTime())},_getFormatConfig:function(e){var t=this._get(e,"shortYearCutoff");
return t=typeof t!="string"?t:(new Date).getFullYear()%100+parseInt(t,10),{shortYearCutoff:t,dayNamesShort:this._get(e,"dayNamesShort"),dayNames:this._get(e,"dayNames"),monthNamesShort:this._get(e,"monthNamesShort"),monthNames:this._get(e,"monthNames")}
},_formatDate:function(e,t,n,r){t||(e.currentDay=e.selectedDay,e.currentMonth=e.selectedMonth,e.currentYear=e.selectedYear);
var i=t?typeof t=="object"?t:this._daylightSavingAdjust(new Date(r,n,t)):this._daylightSavingAdjust(new Date(e.currentYear,e.currentMonth,e.currentDay));
return this.formatDate(this._get(e,"dateFormat"),i,this._getFormatConfig(e))}}),$.fn.datepicker=function(e){if(!this.length){return this
}$.datepicker.initialized||($(document).mousedown($.datepicker._checkExternalClick).find(document.body).append($.datepicker.dpDiv),$.datepicker.initialized=!0);
var t=Array.prototype.slice.call(arguments,1);return typeof e!="string"||e!="isDisabled"&&e!="getDate"&&e!="widget"?e=="option"&&arguments.length==2&&typeof arguments[1]=="string"?$.datepicker["_"+e+"Datepicker"].apply($.datepicker,[this[0]].concat(t)):this.each(function(){typeof e=="string"?$.datepicker["_"+e+"Datepicker"].apply($.datepicker,[this].concat(t)):$.datepicker._attachDatepicker(this,e)
}):$.datepicker["_"+e+"Datepicker"].apply($.datepicker,[this[0]].concat(t))},$.datepicker=new Datepicker,$.datepicker.initialized=!1,$.datepicker.uuid=(new Date).getTime(),$.datepicker.version="1.9.2",window["DP_jQuery_"+dpuuid]=$
})(jQuery);(function(e,t){var n=!1;e.widget("ui.menu",{version:"1.9.2",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.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,e.proxy(function(e){this.options.disabled&&e.preventDefault()
},this)),this.options.disabled&&this.element.addClass("ui-state-disabled").attr("aria-disabled","true"),this._on({"mousedown .ui-menu-item > a":function(e){e.preventDefault()
},"click .ui-state-disabled > a":function(e){e.preventDefault()},"click .ui-menu-item:has(a)":function(t){var r=e(t.target).closest(".ui-menu-item");
!n&&r.not(".ui-state-disabled").length&&(n=!0,this.select(t),r.has(".ui-menu").length?this.expand(t):this.element.is(":focus")||(this.element.trigger("focus",[!0]),this.active&&this.active.parents(".ui-menu").length===1&&clearTimeout(this.timer)))
},"mouseenter .ui-menu-item":function(t){var n=e(t.currentTarget);n.siblings().children(".ui-state-active").removeClass("ui-state-active"),this.focus(t,n)
},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(e,t){var n=this.active||this.element.children(".ui-menu-item").eq(0);
t||this.focus(e,n)},blur:function(t){this._delay(function(){e.contains(this.element[0],this.document[0].activeElement)||this.collapseAll(t)
})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(t){e(t.target).closest(".ui-menu").length||this.collapseAll(t),n=!1
}})},_destroy:function(){this.element.removeAttr("aria-activedescendant").find(".ui-menu").andSelf().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 t=e(this);
t.data("ui-menu-submenu-carat")&&t.remove()}),this.element.find(".ui-menu-divider").removeClass("ui-menu-divider ui-widget-content")
},_keydown:function(t){function a(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}var n,r,i,s,o,u=!0;
switch(t.keyCode){case e.ui.keyCode.PAGE_UP:this.previousPage(t);break;case e.ui.keyCode.PAGE_DOWN:this.nextPage(t);
break;case e.ui.keyCode.HOME:this._move("first","first",t);break;case e.ui.keyCode.END:this._move("last","last",t);
break;case e.ui.keyCode.UP:this.previous(t);break;case e.ui.keyCode.DOWN:this.next(t);break;case e.ui.keyCode.LEFT:this.collapse(t);
break;case e.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(t);break;
case e.ui.keyCode.ENTER:case e.ui.keyCode.SPACE:this._activate(t);break;case e.ui.keyCode.ESCAPE:this.collapse(t);
break;default:u=!1,r=this.previousFilter||"",i=String.fromCharCode(t.keyCode),s=!1,clearTimeout(this.filterTimer),i===r?s=!0:i=r+i,o=new RegExp("^"+a(i),"i"),n=this.activeMenu.children(".ui-menu-item").filter(function(){return o.test(e(this).children("a").text())
}),n=s&&n.index(this.active.next())!==-1?this.active.nextAll(".ui-menu-item"):n,n.length||(i=String.fromCharCode(t.keyCode),o=new RegExp("^"+a(i),"i"),n=this.activeMenu.children(".ui-menu-item").filter(function(){return o.test(e(this).children("a").text())
})),n.length?(this.focus(t,n),n.length>1?(this.previousFilter=i,this.filterTimer=this._delay(function(){delete this.previousFilter
},1000)):delete this.previousFilter):delete this.previousFilter}u&&t.preventDefault()},_activate:function(e){this.active.is(".ui-state-disabled")||(this.active.children("a[aria-haspopup='true']").length?this.expand(e):this.select(e))
},refresh:function(){var t,n=this.options.icons.submenu,r=this.element.find(this.options.menus);r.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 t=e(this),r=t.prev("a"),i=e("<span>").addClass("ui-menu-icon ui-icon "+n).data("ui-menu-submenu-carat",!0);
r.attr("aria-haspopup","true").prepend(i),t.attr("aria-labelledby",r.attr("id"))}),t=r.add(this.element),t.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()}),t.children(":not(.ui-menu-item)").each(function(){var t=e(this);
/[^\-—–\s]/.test(t.text())||t.addClass("ui-widget-content ui-menu-divider")}),t.children(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!e.contains(this.element[0],this.active[0])&&this.blur()
},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},focus:function(e,t){var n,r;
this.blur(e,e&&e.type==="focus"),this._scrollIntoView(t),this.active=t.first(),r=this.active.children("a").addClass("ui-state-focus"),this.options.role&&this.element.attr("aria-activedescendant",r.attr("id")),this.active.parent().closest(".ui-menu-item").children("a:first").addClass("ui-state-active"),e&&e.type==="keydown"?this._close():this.timer=this._delay(function(){this._close()
},this.delay),n=t.children(".ui-menu"),n.length&&/^mouse/.test(e.type)&&this._startOpening(n),this.activeMenu=t.parent(),this._trigger("focus",e,{item:t})
},_scrollIntoView:function(t){var n,r,i,s,o,u;this._hasScroll()&&(n=parseFloat(e.css(this.activeMenu[0],"borderTopWidth"))||0,r=parseFloat(e.css(this.activeMenu[0],"paddingTop"))||0,i=t.offset().top-this.activeMenu.offset().top-n-r,s=this.activeMenu.scrollTop(),o=this.activeMenu.height(),u=t.height(),i<0?this.activeMenu.scrollTop(s+i):i+u>o&&this.activeMenu.scrollTop(s+i-o+u))
},blur:function(e,t){t||clearTimeout(this.timer);if(!this.active){return}this.active.children("a").removeClass("ui-state-focus"),this.active=null,this._trigger("blur",e,{item:this.active})
},_startOpening:function(e){clearTimeout(this.timer);if(e.attr("aria-hidden")!=="true"){return}this.timer=this._delay(function(){this._close(),this._open(e)
},this.delay)},_open:function(t){var n=e.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(t.parents(".ui-menu")).hide().attr("aria-hidden","true"),t.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(n)
},collapseAll:function(t,n){clearTimeout(this.timer),this.timer=this._delay(function(){var r=n?this.element:e(t&&t.target).closest(this.element.find(".ui-menu"));
r.length||(r=this.element),this._close(r),this.blur(t),this.activeMenu=r},this.delay)},_close:function(e){e||(e=this.active?this.active.parent():this.element),e.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false").end().find("a.ui-state-active").removeClass("ui-state-active")
},collapse:function(e){var t=this.active&&this.active.parent().closest(".ui-menu-item",this.element);
t&&t.length&&(this._close(),this.focus(e,t))},expand:function(e){var t=this.active&&this.active.children(".ui-menu ").children(".ui-menu-item").first();
t&&t.length&&(this._open(t.parent()),this._delay(function(){this.focus(e,t)}))},next:function(e){this._move("next","first",e)
},previous:function(e){this._move("prev","last",e)},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(e,t,n){var r;
this.active&&(e==="first"||e==="last"?r=this.active[e==="first"?"prevAll":"nextAll"](".ui-menu-item").eq(-1):r=this.active[e+"All"](".ui-menu-item").eq(0));
if(!r||!r.length||!this.active){r=this.activeMenu.children(".ui-menu-item")[t]()}this.focus(n,r)},nextPage:function(t){var n,r,i;
if(!this.active){this.next(t);return}if(this.isLastItem()){return}this._hasScroll()?(r=this.active.offset().top,i=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return n=e(this),n.offset().top-r-i<0
}),this.focus(t,n)):this.focus(t,this.activeMenu.children(".ui-menu-item")[this.active?"last":"first"]())
},previousPage:function(t){var n,r,i;if(!this.active){this.next(t);return}if(this.isFirstItem()){return
}this._hasScroll()?(r=this.active.offset().top,i=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return n=e(this),n.offset().top-r+i>0
}),this.focus(t,n)):this.focus(t,this.activeMenu.children(".ui-menu-item").first())},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")
},select:function(t){this.active=this.active||e(t.target).closest(".ui-menu-item");var n={item:this.active};
this.active.has(".ui-menu").length||this.collapseAll(t,!0),this._trigger("select",t,n)}})})(jQuery);(function(e,t){e.widget("ui.progressbar",{version:"1.9.2",options:{value:0,max:100},min:0,_create:function(){this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min,"aria-valuemax":this.options.max,"aria-valuenow":this._value()}),this.valueDiv=e("<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>").appendTo(this.element),this.oldValue=this._value(),this._refreshValue()
},_destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.valueDiv.remove()
},value:function(e){return e===t?this._value():(this._setOption("value",e),this)},_setOption:function(e,t){e==="value"&&(this.options.value=t,this._refreshValue(),this._value()===this.options.max&&this._trigger("complete")),this._super(e,t)
},_value:function(){var e=this.options.value;return typeof e!="number"&&(e=0),Math.min(this.options.max,Math.max(this.min,e))
},_percentage:function(){return 100*this._value()/this.options.max},_refreshValue:function(){var e=this.value(),t=this._percentage();
this.oldValue!==e&&(this.oldValue=e,this._trigger("change")),this.valueDiv.toggle(e>this.min).toggleClass("ui-corner-right",e===this.options.max).width(t.toFixed(0)+"%"),this.element.attr("aria-valuenow",e)
}})})(jQuery);(function(e,t){var n=5;e.widget("ui.slider",e.ui.mouse,{version:"1.9.2",widgetEventPrefix:"slide",options:{animate:!1,distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null},_create:function(){var t,r,i=this.options,s=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),o="<a class='ui-slider-handle ui-state-default ui-corner-all' href='#'></a>",u=[];
this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget"+" ui-widget-content"+" ui-corner-all"+(i.disabled?" ui-slider-disabled ui-disabled":"")),this.range=e([]),i.range&&(i.range===!0&&(i.values||(i.values=[this._valueMin(),this._valueMin()]),i.values.length&&i.values.length!==2&&(i.values=[i.values[0],i.values[0]])),this.range=e("<div></div>").appendTo(this.element).addClass("ui-slider-range ui-widget-header"+(i.range==="min"||i.range==="max"?" ui-slider-range-"+i.range:""))),r=i.values&&i.values.length||1;
for(t=s.length;t<r;t++){u.push(o)}this.handles=s.add(e(u.join("")).appendTo(this.element)),this.handle=this.handles.eq(0),this.handles.add(this.range).filter("a").click(function(e){e.preventDefault()
}).mouseenter(function(){i.disabled||e(this).addClass("ui-state-hover")}).mouseleave(function(){e(this).removeClass("ui-state-hover")
}).focus(function(){i.disabled?e(this).blur():(e(".ui-slider .ui-state-focus").removeClass("ui-state-focus"),e(this).addClass("ui-state-focus"))
}).blur(function(){e(this).removeClass("ui-state-focus")}),this.handles.each(function(t){e(this).data("ui-slider-handle-index",t)
}),this._on(this.handles,{keydown:function(t){var r,i,s,o,u=e(t.target).data("ui-slider-handle-index");
switch(t.keyCode){case e.ui.keyCode.HOME:case e.ui.keyCode.END:case e.ui.keyCode.PAGE_UP:case e.ui.keyCode.PAGE_DOWN:case e.ui.keyCode.UP:case e.ui.keyCode.RIGHT:case e.ui.keyCode.DOWN:case e.ui.keyCode.LEFT:t.preventDefault();
if(!this._keySliding){this._keySliding=!0,e(t.target).addClass("ui-state-active"),r=this._start(t,u);
if(r===!1){return}}}o=this.options.step,this.options.values&&this.options.values.length?i=s=this.values(u):i=s=this.value();
switch(t.keyCode){case e.ui.keyCode.HOME:s=this._valueMin();break;case e.ui.keyCode.END:s=this._valueMax();
break;case e.ui.keyCode.PAGE_UP:s=this._trimAlignValue(i+(this._valueMax()-this._valueMin())/n);break;
case e.ui.keyCode.PAGE_DOWN:s=this._trimAlignValue(i-(this._valueMax()-this._valueMin())/n);break;case e.ui.keyCode.UP:case e.ui.keyCode.RIGHT:if(i===this._valueMax()){return
}s=this._trimAlignValue(i+o);break;case e.ui.keyCode.DOWN:case e.ui.keyCode.LEFT:if(i===this._valueMin()){return
}s=this._trimAlignValue(i-o)}this._slide(t,u,s)},keyup:function(t){var n=e(t.target).data("ui-slider-handle-index");
this._keySliding&&(this._keySliding=!1,this._stop(t,n),this._change(t,n),e(t.target).removeClass("ui-state-active"))
}}),this._refreshValue(),this._animateOff=!1},_destroy:function(){this.handles.remove(),this.range.remove(),this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-slider-disabled ui-widget ui-widget-content ui-corner-all"),this._mouseDestroy()
},_mouseCapture:function(t){var n,r,i,s,o,u,a,f,l=this,c=this.options;return c.disabled?!1:(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),n={x:t.pageX,y:t.pageY},r=this._normValueFromMouse(n),i=this._valueMax()-this._valueMin()+1,this.handles.each(function(t){var n=Math.abs(r-l.values(t));
i>n&&(i=n,s=e(this),o=t)}),c.range===!0&&this.values(1)===c.min&&(o+=1,s=e(this.handles[o])),u=this._start(t,o),u===!1?!1:(this._mouseSliding=!0,this._handleIndex=o,s.addClass("ui-state-active").focus(),a=s.offset(),f=!e(t.target).parents().andSelf().is(".ui-slider-handle"),this._clickOffset=f?{left:0,top:0}:{left:t.pageX-a.left-s.width()/2,top:t.pageY-a.top-s.height()/2-(parseInt(s.css("borderTopWidth"),10)||0)-(parseInt(s.css("borderBottomWidth"),10)||0)+(parseInt(s.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(t,o,r),this._animateOff=!0,!0))
},_mouseStart:function(){return !0},_mouseDrag:function(e){var t={x:e.pageX,y:e.pageY},n=this._normValueFromMouse(t);
return this._slide(e,this._handleIndex,n),!1},_mouseStop:function(e){return this.handles.removeClass("ui-state-active"),this._mouseSliding=!1,this._stop(e,this._handleIndex),this._change(e,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1
},_detectOrientation:function(){this.orientation=this.options.orientation==="vertical"?"vertical":"horizontal"
},_normValueFromMouse:function(e){var t,n,r,i,s;return this.orientation==="horizontal"?(t=this.elementSize.width,n=e.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(t=this.elementSize.height,n=e.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),r=n/t,r>1&&(r=1),r<0&&(r=0),this.orientation==="vertical"&&(r=1-r),i=this._valueMax()-this._valueMin(),s=this._valueMin()+r*i,this._trimAlignValue(s)
},_start:function(e,t){var n={handle:this.handles[t],value:this.value()};return this.options.values&&this.options.values.length&&(n.value=this.values(t),n.values=this.values()),this._trigger("start",e,n)
},_slide:function(e,t,n){var r,i,s;this.options.values&&this.options.values.length?(r=this.values(t?0:1),this.options.values.length===2&&this.options.range===!0&&(t===0&&n>r||t===1&&n<r)&&(n=r),n!==this.values(t)&&(i=this.values(),i[t]=n,s=this._trigger("slide",e,{handle:this.handles[t],value:n,values:i}),r=this.values(t?0:1),s!==!1&&this.values(t,n,!0))):n!==this.value()&&(s=this._trigger("slide",e,{handle:this.handles[t],value:n}),s!==!1&&this.value(n))
},_stop:function(e,t){var n={handle:this.handles[t],value:this.value()};this.options.values&&this.options.values.length&&(n.value=this.values(t),n.values=this.values()),this._trigger("stop",e,n)
},_change:function(e,t){if(!this._keySliding&&!this._mouseSliding){var n={handle:this.handles[t],value:this.value()};
this.options.values&&this.options.values.length&&(n.value=this.values(t),n.values=this.values()),this._trigger("change",e,n)
}},value:function(e){if(arguments.length){this.options.value=this._trimAlignValue(e),this._refreshValue(),this._change(null,0);
return}return this._value()},values:function(t,n){var r,i,s;if(arguments.length>1){this.options.values[t]=this._trimAlignValue(n),this._refreshValue(),this._change(null,t);
return}if(!arguments.length){return this._values()}if(!e.isArray(arguments[0])){return this.options.values&&this.options.values.length?this._values(t):this.value()
}r=this.options.values,i=arguments[0];for(s=0;s<r.length;s+=1){r[s]=this._trimAlignValue(i[s]),this._change(null,s)
}this._refreshValue()},_setOption:function(t,n){var r,i=0;e.isArray(this.options.values)&&(i=this.options.values.length),e.Widget.prototype._setOption.apply(this,arguments);
switch(t){case"disabled":n?(this.handles.filter(".ui-state-focus").blur(),this.handles.removeClass("ui-state-hover"),this.handles.prop("disabled",!0),this.element.addClass("ui-disabled")):(this.handles.prop("disabled",!1),this.element.removeClass("ui-disabled"));
break;case"orientation":this._detectOrientation(),this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation),this._refreshValue();
break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;
case"values":this._animateOff=!0,this._refreshValue();for(r=0;r<i;r+=1){this._change(null,r)}this._animateOff=!1;
break;case"min":case"max":this._animateOff=!0,this._refreshValue(),this._animateOff=!1}},_value:function(){var e=this.options.value;
return e=this._trimAlignValue(e),e},_values:function(e){var t,n,r;if(arguments.length){return t=this.options.values[e],t=this._trimAlignValue(t),t
}n=this.options.values.slice();for(r=0;r<n.length;r+=1){n[r]=this._trimAlignValue(n[r])}return n},_trimAlignValue:function(e){if(e<=this._valueMin()){return this._valueMin()
}if(e>=this._valueMax()){return this._valueMax()}var t=this.options.step>0?this.options.step:1,n=(e-this._valueMin())%t,r=e-n;
return Math.abs(n)*2>=t&&(r+=n>0?t:-t),parseFloat(r.toFixed(5))},_valueMin:function(){return this.options.min
},_valueMax:function(){return this.options.max},_refreshValue:function(){var t,n,r,i,s,o=this.options.range,u=this.options,a=this,f=this._animateOff?!1:u.animate,l={};
this.options.values&&this.options.values.length?this.handles.each(function(r){n=(a.values(r)-a._valueMin())/(a._valueMax()-a._valueMin())*100,l[a.orientation==="horizontal"?"left":"bottom"]=n+"%",e(this).stop(1,1)[f?"animate":"css"](l,u.animate),a.options.range===!0&&(a.orientation==="horizontal"?(r===0&&a.range.stop(1,1)[f?"animate":"css"]({left:n+"%"},u.animate),r===1&&a.range[f?"animate":"css"]({width:n-t+"%"},{queue:!1,duration:u.animate})):(r===0&&a.range.stop(1,1)[f?"animate":"css"]({bottom:n+"%"},u.animate),r===1&&a.range[f?"animate":"css"]({height:n-t+"%"},{queue:!1,duration:u.animate}))),t=n
}):(r=this.value(),i=this._valueMin(),s=this._valueMax(),n=s!==i?(r-i)/(s-i)*100:0,l[this.orientation==="horizontal"?"left":"bottom"]=n+"%",this.handle.stop(1,1)[f?"animate":"css"](l,u.animate),o==="min"&&this.orientation==="horizontal"&&this.range.stop(1,1)[f?"animate":"css"]({width:n+"%"},u.animate),o==="max"&&this.orientation==="horizontal"&&this.range[f?"animate":"css"]({width:100-n+"%"},{queue:!1,duration:u.animate}),o==="min"&&this.orientation==="vertical"&&this.range.stop(1,1)[f?"animate":"css"]({height:n+"%"},u.animate),o==="max"&&this.orientation==="vertical"&&this.range[f?"animate":"css"]({height:100-n+"%"},{queue:!1,duration:u.animate}))
}})})(jQuery);jQuery.effects||function(e,t){var n=e.uiBackCompat!==!1,r="ui-effects-";e.effects={effect:{}},function(t,n){function p(e,t,n){var r=a[t.type]||{};
return e==null?n||!t.def?null:t.def:(e=r.floor?~~e:parseFloat(e),isNaN(e)?t.def:r.mod?(e+r.mod)%r.mod:0>e?0:r.max<e?r.max:e)
}function d(e){var n=o(),r=n._rgba=[];return e=e.toLowerCase(),h(s,function(t,i){var s,o=i.re.exec(e),a=o&&i.parse(o),f=i.space||"rgba";
if(a){return s=n[f](a),n[u[f].cache]=s[u[f].cache],r=n._rgba=s._rgba,!1}}),r.length?(r.join()==="0,0,0,0"&&t.extend(r,c.transparent),n):c[e]
}function v(e,t,n){return n=(n+1)%1,n*6<1?e+(t-e)*n*6:n*2<1?t:n*3<2?e+(t-e)*(2/3-n)*6:e}var r="backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor".split(" "),i=/^([\-+])=\s*(\d+\.?\d*)/,s=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,parse:function(e){return[e[1],e[2],e[3],e[4]]
}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,parse:function(e){return[e[1]*2.55,e[2]*2.55,e[3]*2.55,e[4]]
}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(e){return[parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16)]
}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(e){return[parseInt(e[1]+e[1],16),parseInt(e[2]+e[2],16),parseInt(e[3]+e[3],16)]
}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(e){return[e[1],e[2]/100,e[3]/100,e[4]]
}}],o=t.Color=function(e,n,r,i){return new t.Color.fn.parse(e,n,r,i)},u={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},a={"byte":{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},f=o.support={},l=t("<p>")[0],c,h=t.each;
l.style.cssText="background-color:rgba(1,1,1,.5)",f.rgba=l.style.backgroundColor.indexOf("rgba")>-1,h(u,function(e,t){t.cache="_"+e,t.props.alpha={idx:3,type:"percent",def:1}
}),o.fn=t.extend(o.prototype,{parse:function(r,i,s,a){if(r===n){return this._rgba=[null,null,null,null],this
}if(r.jquery||r.nodeType){r=t(r).css(i),i=n}var f=this,l=t.type(r),v=this._rgba=[];i!==n&&(r=[r,i,s,a],l="array");
if(l==="string"){return this.parse(d(r)||c._default)}if(l==="array"){return h(u.rgba.props,function(e,t){v[t.idx]=p(r[t.idx],t)
}),this}if(l==="object"){return r instanceof o?h(u,function(e,t){r[t.cache]&&(f[t.cache]=r[t.cache].slice())
}):h(u,function(t,n){var i=n.cache;h(n.props,function(e,t){if(!f[i]&&n.to){if(e==="alpha"||r[e]==null){return
}f[i]=n.to(f._rgba)}f[i][t.idx]=p(r[e],t,!0)}),f[i]&&e.inArray(null,f[i].slice(0,3))<0&&(f[i][3]=1,n.from&&(f._rgba=n.from(f[i])))
}),this}},is:function(e){var t=o(e),n=!0,r=this;return h(u,function(e,i){var s,o=t[i.cache];return o&&(s=r[i.cache]||i.to&&i.to(r._rgba)||[],h(i.props,function(e,t){if(o[t.idx]!=null){return n=o[t.idx]===s[t.idx],n
}})),n}),n},_space:function(){var e=[],t=this;return h(u,function(n,r){t[r.cache]&&e.push(n)}),e.pop()
},transition:function(e,t){var n=o(e),r=n._space(),i=u[r],s=this.alpha()===0?o("transparent"):this,f=s[i.cache]||i.to(s._rgba),l=f.slice();
return n=n[i.cache],h(i.props,function(e,r){var i=r.idx,s=f[i],o=n[i],u=a[r.type]||{};if(o===null){return
}s===null?l[i]=o:(u.mod&&(o-s>u.mod/2?s+=u.mod:s-o>u.mod/2&&(s-=u.mod)),l[i]=p((o-s)*t+s,r))}),this[r](l)
},blend:function(e){if(this._rgba[3]===1){return this}var n=this._rgba.slice(),r=n.pop(),i=o(e)._rgba;
return o(t.map(n,function(e,t){return(1-r)*i[t]+r*e}))},toRgbaString:function(){var e="rgba(",n=t.map(this._rgba,function(e,t){return e==null?t>2?1:0:e
});return n[3]===1&&(n.pop(),e="rgb("),e+n.join()+")"},toHslaString:function(){var e="hsla(",n=t.map(this.hsla(),function(e,t){return e==null&&(e=t>2?1:0),t&&t<3&&(e=Math.round(e*100)+"%"),e
});return n[3]===1&&(n.pop(),e="hsl("),e+n.join()+")"},toHexString:function(e){var n=this._rgba.slice(),r=n.pop();
return e&&n.push(~~(r*255)),"#"+t.map(n,function(e){return e=(e||0).toString(16),e.length===1?"0"+e:e
}).join("")},toString:function(){return this._rgba[3]===0?"transparent":this.toRgbaString()}}),o.fn.parse.prototype=o.fn,u.hsla.to=function(e){if(e[0]==null||e[1]==null||e[2]==null){return[null,null,null,e[3]]
}var t=e[0]/255,n=e[1]/255,r=e[2]/255,i=e[3],s=Math.max(t,n,r),o=Math.min(t,n,r),u=s-o,a=s+o,f=a*0.5,l,c;
return o===s?l=0:t===s?l=60*(n-r)/u+360:n===s?l=60*(r-t)/u+120:l=60*(t-n)/u+240,f===0||f===1?c=f:f<=0.5?c=u/a:c=u/(2-a),[Math.round(l)%360,c,f,i==null?1:i]
},u.hsla.from=function(e){if(e[0]==null||e[1]==null||e[2]==null){return[null,null,null,e[3]]}var t=e[0]/360,n=e[1],r=e[2],i=e[3],s=r<=0.5?r*(1+n):r+n-r*n,o=2*r-s;
return[Math.round(v(o,s,t+1/3)*255),Math.round(v(o,s,t)*255),Math.round(v(o,s,t-1/3)*255),i]},h(u,function(e,r){var s=r.props,u=r.cache,a=r.to,f=r.from;
o.fn[e]=function(e){a&&!this[u]&&(this[u]=a(this._rgba));if(e===n){return this[u].slice()}var r,i=t.type(e),l=i==="array"||i==="object"?e:arguments,c=this[u].slice();
return h(s,function(e,t){var n=l[i==="object"?e:t.idx];n==null&&(n=c[t.idx]),c[t.idx]=p(n,t)}),f?(r=o(f(c)),r[u]=c,r):o(c)
},h(s,function(n,r){if(o.fn[n]){return}o.fn[n]=function(s){var o=t.type(s),u=n==="alpha"?this._hsla?"hsla":"rgba":e,a=this[u](),f=a[r.idx],l;
return o==="undefined"?f:(o==="function"&&(s=s.call(this,f),o=t.type(s)),s==null&&r.empty?this:(o==="string"&&(l=i.exec(s),l&&(s=f+parseFloat(l[2])*(l[1]==="+"?1:-1))),a[r.idx]=s,this[u](a)))
}})}),h(r,function(e,n){t.cssHooks[n]={set:function(e,r){var i,s,u="";if(t.type(r)!=="string"||(i=d(r))){r=o(i||r);
if(!f.rgba&&r._rgba[3]!==1){s=n==="backgroundColor"?e.parentNode:e;while((u===""||u==="transparent")&&s&&s.style){try{u=t.css(s,"backgroundColor"),s=s.parentNode
}catch(a){}}r=r.blend(u&&u!=="transparent"?u:"_default")}r=r.toRgbaString()}try{e.style[n]=r}catch(l){}}},t.fx.step[n]=function(e){e.colorInit||(e.start=o(e.elem,n),e.end=o(e.end),e.colorInit=!0),t.cssHooks[n].set(e.elem,e.start.transition(e.end,e.pos))
}}),t.cssHooks.borderColor={expand:function(e){var t={};return h(["Top","Right","Bottom","Left"],function(n,r){t["border"+r+"Color"]=e
}),t}},c=t.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}
}(jQuery),function(){function i(){var t=this.ownerDocument.defaultView?this.ownerDocument.defaultView.getComputedStyle(this,null):this.currentStyle,n={},r,i;
if(t&&t.length&&t[0]&&t[t[0]]){i=t.length;while(i--){r=t[i],typeof t[r]=="string"&&(n[e.camelCase(r)]=t[r])
}}else{for(r in t){typeof t[r]=="string"&&(n[r]=t[r])}}return n}function s(t,n){var i={},s,o;for(s in n){o=n[s],t[s]!==o&&!r[s]&&(e.fx.step[s]||!isNaN(parseFloat(o)))&&(i[s]=o)
}return i}var n=["add","remove","toggle"],r={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};
e.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(t,n){e.fx.step[n]=function(e){if(e.end!=="none"&&!e.setAttr||e.pos===1&&!e.setAttr){jQuery.style(e.elem,n,e.end),e.setAttr=!0
}}}),e.effects.animateClass=function(t,r,o,u){var a=e.speed(r,o,u);return this.queue(function(){var r=e(this),o=r.attr("class")||"",u,f=a.children?r.find("*").andSelf():r;
f=f.map(function(){var t=e(this);return{el:t,start:i.call(this)}}),u=function(){e.each(n,function(e,n){t[n]&&r[n+"Class"](t[n])
})},u(),f=f.map(function(){return this.end=i.call(this.el[0]),this.diff=s(this.start,this.end),this}),r.attr("class",o),f=f.map(function(){var t=this,n=e.Deferred(),r=jQuery.extend({},a,{queue:!1,complete:function(){n.resolve(t)
}});return this.el.animate(this.diff,r),n.promise()}),e.when.apply(e,f.get()).done(function(){u(),e.each(arguments,function(){var t=this.el;
e.each(this.diff,function(e){t.css(e,"")})}),a.complete.call(r[0])})})},e.fn.extend({_addClass:e.fn.addClass,addClass:function(t,n,r,i){return n?e.effects.animateClass.call(this,{add:t},n,r,i):this._addClass(t)
},_removeClass:e.fn.removeClass,removeClass:function(t,n,r,i){return n?e.effects.animateClass.call(this,{remove:t},n,r,i):this._removeClass(t)
},_toggleClass:e.fn.toggleClass,toggleClass:function(n,r,i,s,o){return typeof r=="boolean"||r===t?i?e.effects.animateClass.call(this,r?{add:n}:{remove:n},i,s,o):this._toggleClass(n,r):e.effects.animateClass.call(this,{toggle:n},r,i,s)
},switchClass:function(t,n,r,i,s){return e.effects.animateClass.call(this,{add:n,remove:t},r,i,s)}})}(),function(){function i(t,n,r,i){e.isPlainObject(t)&&(n=t,t=t.effect),t={effect:t},n==null&&(n={}),e.isFunction(n)&&(i=n,r=null,n={});
if(typeof n=="number"||e.fx.speeds[n]){i=r,r=n,n={}}return e.isFunction(r)&&(i=r,r=null),n&&e.extend(t,n),r=r||n.duration,t.duration=e.fx.off?0:typeof r=="number"?r:r in e.fx.speeds?e.fx.speeds[r]:e.fx.speeds._default,t.complete=i||n.complete,t
}function s(t){return !t||typeof t=="number"||e.fx.speeds[t]?!0:typeof t=="string"&&!e.effects.effect[t]?n&&e.effects[t]?!1:!0:!1
}e.extend(e.effects,{version:"1.9.2",save:function(e,t){for(var n=0;n<t.length;n++){t[n]!==null&&e.data(r+t[n],e[0].style[t[n]])
}},restore:function(e,n){var i,s;for(s=0;s<n.length;s++){n[s]!==null&&(i=e.data(r+n[s]),i===t&&(i=""),e.css(n[s],i))
}},setMode:function(e,t){return t==="toggle"&&(t=e.is(":hidden")?"show":"hide"),t},getBaseline:function(e,t){var n,r;
switch(e[0]){case"top":n=0;break;case"middle":n=0.5;break;case"bottom":n=1;break;default:n=e[0]/t.height
}switch(e[1]){case"left":r=0;break;case"center":r=0.5;break;case"right":r=1;break;default:r=e[1]/t.width
}return{x:r,y:n}},createWrapper:function(t){if(t.parent().is(".ui-effects-wrapper")){return t.parent()
}var n={width:t.outerWidth(!0),height:t.outerHeight(!0),"float":t.css("float")},r=e("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),i={width:t.width(),height:t.height()},s=document.activeElement;
try{s.id}catch(o){s=document.body}return t.wrap(r),(t[0]===s||e.contains(t[0],s))&&e(s).focus(),r=t.parent(),t.css("position")==="static"?(r.css({position:"relative"}),t.css({position:"relative"})):(e.extend(n,{position:t.css("position"),zIndex:t.css("z-index")}),e.each(["top","left","bottom","right"],function(e,r){n[r]=t.css(r),isNaN(parseInt(n[r],10))&&(n[r]="auto")
}),t.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),t.css(i),r.css(n).show()},removeWrapper:function(t){var n=document.activeElement;
return t.parent().is(".ui-effects-wrapper")&&(t.parent().replaceWith(t),(t[0]===n||e.contains(t[0],n))&&e(n).focus()),t
},setTransition:function(t,n,r,i){return i=i||{},e.each(n,function(e,n){var s=t.cssUnit(n);s[0]>0&&(i[n]=s[0]*r+s[1])
}),i}}),e.fn.extend({effect:function(){function a(n){function u(){e.isFunction(i)&&i.call(r[0]),e.isFunction(n)&&n()
}var r=e(this),i=t.complete,s=t.mode;(r.is(":hidden")?s==="hide":s==="show")?u():o.call(r[0],t,u)}var t=i.apply(this,arguments),r=t.mode,s=t.queue,o=e.effects.effect[t.effect],u=!o&&n&&e.effects[t.effect];
return e.fx.off||!o&&!u?r?this[r](t.duration,t.complete):this.each(function(){t.complete&&t.complete.call(this)
}):o?s===!1?this.each(a):this.queue(s||"fx",a):u.call(this,{options:t,duration:t.duration,callback:t.complete,mode:t.mode})
},_show:e.fn.show,show:function(e){if(s(e)){return this._show.apply(this,arguments)}var t=i.apply(this,arguments);
return t.mode="show",this.effect.call(this,t)},_hide:e.fn.hide,hide:function(e){if(s(e)){return this._hide.apply(this,arguments)
}var t=i.apply(this,arguments);return t.mode="hide",this.effect.call(this,t)},__toggle:e.fn.toggle,toggle:function(t){if(s(t)||typeof t=="boolean"||e.isFunction(t)){return this.__toggle.apply(this,arguments)
}var n=i.apply(this,arguments);return n.mode="toggle",this.effect.call(this,n)},cssUnit:function(t){var n=this.css(t),r=[];
return e.each(["em","px","%","pt"],function(e,t){n.indexOf(t)>0&&(r=[parseFloat(n),t])}),r}})}(),function(){var t={};
e.each(["Quad","Cubic","Quart","Quint","Expo"],function(e,n){t[n]=function(t){return Math.pow(t,e+2)}
}),e.extend(t,{Sine:function(e){return 1-Math.cos(e*Math.PI/2)},Circ:function(e){return 1-Math.sqrt(1-e*e)
},Elastic:function(e){return e===0||e===1?e:-Math.pow(2,8*(e-1))*Math.sin(((e-1)*80-7.5)*Math.PI/15)},Back:function(e){return e*e*(3*e-2)
},Bounce:function(e){var t,n=4;while(e<((t=Math.pow(2,--n))-1)/11){}return 1/Math.pow(4,3-n)-7.5625*Math.pow((t*3-2)/22-e,2)
}}),e.each(t,function(t,n){e.easing["easeIn"+t]=n,e.easing["easeOut"+t]=function(e){return 1-n(1-e)},e.easing["easeInOut"+t]=function(e){return e<0.5?n(e*2)/2:1-n(e*-2+2)/2
}})}()}(jQuery);(function(e,t){e.effects.effect.bounce=function(t,n){var r=e(this),i=["position","top","bottom","left","right","height","width"],s=e.effects.setMode(r,t.mode||"effect"),o=s==="hide",u=s==="show",a=t.direction||"up",f=t.distance,l=t.times||5,c=l*2+(u||o?1:0),h=t.duration/c,p=t.easing,d=a==="up"||a==="down"?"top":"left",v=a==="up"||a==="left",m,g,y,b=r.queue(),w=b.length;
(u||o)&&i.push("opacity"),e.effects.save(r,i),r.show(),e.effects.createWrapper(r),f||(f=r[d==="top"?"outerHeight":"outerWidth"]()/3),u&&(y={opacity:1},y[d]=0,r.css("opacity",0).css(d,v?-f*2:f*2).animate(y,h,p)),o&&(f/=Math.pow(2,l-1)),y={},y[d]=0;
for(m=0;m<l;m++){g={},g[d]=(v?"-=":"+=")+f,r.animate(g,h,p).animate(y,h,p),f=o?f*2:f/2}o&&(g={opacity:0},g[d]=(v?"-=":"+=")+f,r.animate(g,h,p)),r.queue(function(){o&&r.hide(),e.effects.restore(r,i),e.effects.removeWrapper(r),n()
}),w>1&&b.splice.apply(b,[1,0].concat(b.splice(w,c+1))),r.dequeue()}})(jQuery);(function(e,t){e.effects.effect.drop=function(t,n){var r=e(this),i=["position","top","bottom","left","right","opacity","height","width"],s=e.effects.setMode(r,t.mode||"hide"),o=s==="show",u=t.direction||"left",a=u==="up"||u==="down"?"top":"left",f=u==="up"||u==="left"?"pos":"neg",l={opacity:o?1:0},c;
e.effects.save(r,i),r.show(),e.effects.createWrapper(r),c=t.distance||r[a==="top"?"outerHeight":"outerWidth"](!0)/2,o&&r.css("opacity",0).css(a,f==="pos"?-c:c),l[a]=(o?f==="pos"?"+=":"-=":f==="pos"?"-=":"+=")+c,r.animate(l,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){s==="hide"&&r.hide(),e.effects.restore(r,i),e.effects.removeWrapper(r),n()
}})}})(jQuery);(function(e,t){e.effects.effect.fade=function(t,n){var r=e(this),i=e.effects.setMode(r,t.mode||"toggle");
r.animate({opacity:i},{queue:!1,duration:t.duration,easing:t.easing,complete:n})}})(jQuery);(function(e,t){e.effects.effect.pulsate=function(t,n){var r=e(this),i=e.effects.setMode(r,t.mode||"show"),s=i==="show",o=i==="hide",u=s||i==="hide",a=(t.times||5)*2+(u?1:0),f=t.duration/a,l=0,c=r.queue(),h=c.length,p;
if(s||!r.is(":visible")){r.css("opacity",0).show(),l=1}for(p=1;p<a;p++){r.animate({opacity:l},f,t.easing),l=1-l
}r.animate({opacity:l},f,t.easing),r.queue(function(){o&&r.hide(),n()}),h>1&&c.splice.apply(c,[1,0].concat(c.splice(h,a+1))),r.dequeue()
}})(jQuery);(function(e,t){e.effects.effect.shake=function(t,n){var r=e(this),i=["position","top","bottom","left","right","height","width"],s=e.effects.setMode(r,t.mode||"effect"),o=t.direction||"left",u=t.distance||20,a=t.times||3,f=a*2+1,l=Math.round(t.duration/f),c=o==="up"||o==="down"?"top":"left",h=o==="up"||o==="left",p={},d={},v={},m,g=r.queue(),y=g.length;
e.effects.save(r,i),r.show(),e.effects.createWrapper(r),p[c]=(h?"-=":"+=")+u,d[c]=(h?"+=":"-=")+u*2,v[c]=(h?"-=":"+=")+u*2,r.animate(p,l,t.easing);
for(m=1;m<a;m++){r.animate(d,l,t.easing).animate(v,l,t.easing)}r.animate(d,l,t.easing).animate(p,l/2,t.easing).queue(function(){s==="hide"&&r.hide(),e.effects.restore(r,i),e.effects.removeWrapper(r),n()
}),y>1&&g.splice.apply(g,[1,0].concat(g.splice(y,f+1))),r.dequeue()}})(jQuery);(function(e,t){e.effects.effect.slide=function(t,n){var r=e(this),i=["position","top","bottom","left","right","width","height"],s=e.effects.setMode(r,t.mode||"show"),o=s==="show",u=t.direction||"left",a=u==="up"||u==="down"?"top":"left",f=u==="up"||u==="left",l,c={};
e.effects.save(r,i),r.show(),l=t.distance||r[a==="top"?"outerHeight":"outerWidth"](!0),e.effects.createWrapper(r).css({overflow:"hidden"}),o&&r.css(a,f?isNaN(l)?"-"+l:-l:l),c[a]=(o?f?"+=":"-=":f?"-=":"+=")+l,r.animate(c,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){s==="hide"&&r.hide(),e.effects.restore(r,i),e.effects.removeWrapper(r),n()
}})}})(jQuery);(function(e,t){e.effects.effect.transfer=function(t,n){var r=e(this),i=e(t.to),s=i.css("position")==="fixed",o=e("body"),u=s?o.scrollTop():0,a=s?o.scrollLeft():0,f=i.offset(),l={top:f.top-u,left:f.left-a,height:i.innerHeight(),width:i.innerWidth()},c=r.offset(),h=e('<div class="ui-effects-transfer"></div>').appendTo(document.body).addClass(t.className).css({top:c.top-u,left:c.left-a,height:r.innerHeight(),width:r.innerWidth(),position:s?"fixed":"absolute"}).animate(l,t.duration,t.easing,function(){h.remove(),n()
})}})(jQuery);jQuery.cookie=function(key,value,options){if(arguments.length>1&&(value===null||typeof value!=="object")){options=jQuery.extend({},options);
if(value===null){options.expires=-1}if(typeof options.expires==="number"){var days=options.expires,t=options.expires=new Date();
t.setDate(t.getDate()+days)}return(document.cookie=[encodeURIComponent(key),"=",options.raw?String(value):encodeURIComponent(String(value)),options.expires?"; expires="+options.expires.toUTCString():"",options.path?"; path="+options.path:"",options.domain?"; domain="+options.domain:"",options.secure?"; secure":""].join(""))
}options=value||{};var result,decode=options.raw?function(s){return s}:decodeURIComponent;return(result=new RegExp("(?:^|; )"+encodeURIComponent(key)+"=([^;]*)").exec(document.cookie))?decode(result[1]):null
};(function($){var locationWrapper={put:function(hash,win){(win||window).location.hash=this.encoder(hash)
},get:function(win){var hash=((win||window).location.hash).replace(/^#/,"");try{return $.browser.mozilla?hash:decodeURIComponent(hash)
}catch(error){return hash}},encoder:encodeURIComponent};var iframeWrapper={id:"__jQuery_history",init:function(){var html='<iframe id="'+this.id+'" style="display:none" src="javascript:false;" />';
$("body").prepend(html);return this},_document:function(){return $("#"+this.id)[0].contentWindow.document
},put:function(hash){var doc=this._document();doc.open();doc.close();locationWrapper.put(hash,doc)},get:function(){return locationWrapper.get(this._document())
}};function initObjects(options){options=$.extend({unescape:false},options||{});locationWrapper.encoder=encoder(options.unescape);
function encoder(unescape_){if(unescape_===true){return function(hash){return hash}}if(typeof unescape_=="string"&&(unescape_=partialDecoder(unescape_.split("")))||typeof unescape_=="function"){return function(hash){return unescape_(encodeURIComponent(hash))
}}return encodeURIComponent}function partialDecoder(chars){var re=new RegExp($.map(chars,encodeURIComponent).join("|"),"ig");
return function(enc){return enc.replace(re,decodeURIComponent)}}}var implementations={};implementations.base={callback:undefined,type:undefined,check:function(){},load:function(hash){},init:function(callback,options){initObjects(options);
self.callback=callback;self._options=options;self._init()},_init:function(){},_options:{}};implementations.timer={_appState:undefined,_init:function(){var current_hash=locationWrapper.get();
self._appState=current_hash;self.callback(current_hash);setInterval(self.check,100)},check:function(){var current_hash=locationWrapper.get();
if(current_hash!=self._appState){self._appState=current_hash;self.callback(current_hash)}},load:function(hash){if(hash!=self._appState){locationWrapper.put(hash);
self._appState=hash;self.callback(hash)}}};implementations.iframeTimer={_appState:undefined,_init:function(){var current_hash=locationWrapper.get();
self._appState=current_hash;iframeWrapper.init();window.setTimeout(function(){iframeWrapper.put(current_hash);
self.callback(current_hash);setInterval(self.check,100)},180)},check:function(){var iframe_hash=iframeWrapper.get(),location_hash=locationWrapper.get();
if(location_hash!=iframe_hash){if(location_hash==self._appState){self._appState=iframe_hash;locationWrapper.put(iframe_hash);
self.callback(iframe_hash)}else{self._appState=location_hash;iframeWrapper.put(location_hash);self.callback(location_hash)
}}},load:function(hash){if(hash!=self._appState){locationWrapper.put(hash);iframeWrapper.put(hash);self._appState=hash;
self.callback(hash)}}};implementations.hashchangeEvent={_init:function(){self.callback(locationWrapper.get());
$(window).bind("hashchange",self.check)},check:function(){self.callback(locationWrapper.get())},load:function(hash){locationWrapper.put(hash)
}};var self=$.extend({},implementations.base);if($.browser.msie&&($.browser.version<8||document.documentMode<8)){self.type="iframeTimer"
}else{if("onhashchange" in window){self.type="hashchangeEvent"}else{self.type="timer"}}$.extend(self,implementations[self.type]);
$.history=self})(jQuery);(function(a){var b=function(a,c){var d=/[^\w\-\.:]/.test(a)?new Function(b.arg+",tmpl","var _e=tmpl.encode"+b.helper+",_s='"+a.replace(b.regexp,b.func)+"';return _s;"):b.cache[a]=b.cache[a]||b(b.load(a));
return c?d(c,b):function(a){return d(a,b)}};b.cache={},b.load=function(a){return document.getElementById(a).innerHTML
},b.regexp=/([\s'\\])(?![^%]*%\})|(?:\{%(=|#)([\s\S]+?)%\})|(\{%)|(%\})/g,b.func=function(a,b,c,d,e,f){if(b){return{"\n":"\\n","\r":"\\r","\t":"\\t"," ":" "}[a]||"\\"+a
}if(c){return c==="="?"'+_e("+d+")+'":"'+("+d+"||'')+'"}if(e){return"';"}if(f){return"_s+='"}},b.encReg=/[<>&"'\x00]/g,b.encMap={"<":"&lt;",">":"&gt;","&":"&amp;",'"':"&quot;","'":"&#39;"},b.encode=function(a){return String(a||"").replace(b.encReg,function(a){return b.encMap[a]||""
})},b.arg="o",b.helper=",print=function(s,e){_s+=e&&(s||'')||_e(s);},include=function(s,d){_s+=tmpl(s,d);}",typeof define=="function"&&define.amd?define(function(){return b
}):a.tmpl=b})(this);(function(b){var a=function(c){return parseInt(c,10)||0};b.each(["min","max"],function(d,c){b.fn[c+"Size"]=function(g){var f,e;
if(g){if(g.width!==undefined){this.css(c+"-width",g.width)}if(g.height!==undefined){this.css(c+"-height",g.height)
}return this}else{f=this.css(c+"-width");e=this.css(c+"-height");return{width:(c==="max"&&(f===undefined||f==="none"||a(f)===-1)&&Number.MAX_VALUE)||a(f),height:(c==="max"&&(e===undefined||e==="none"||a(e)===-1)&&Number.MAX_VALUE)||a(e)}
}}});b.fn.isVisible=function(){return this.is(":visible")};b.each(["border","margin","padding"],function(d,c){b.fn[c]=function(e){if(e){if(e.top!==undefined){this.css(c+"-top"+(c==="border"?"-width":""),e.top)
}if(e.bottom!==undefined){this.css(c+"-bottom"+(c==="border"?"-width":""),e.bottom)}if(e.left!==undefined){this.css(c+"-left"+(c==="border"?"-width":""),e.left)
}if(e.right!==undefined){this.css(c+"-right"+(c==="border"?"-width":""),e.right)}return this}else{return{top:a(this.css(c+"-top"+(c==="border"?"-width":""))),bottom:a(this.css(c+"-bottom"+(c==="border"?"-width":""))),left:a(this.css(c+"-left"+(c==="border"?"-width":""))),right:a(this.css(c+"-right"+(c==="border"?"-width":"")))}
}}})})(jQuery);(function(a){a.uniform={options:{selectClass:"selector",radioClass:"radio",checkboxClass:"checker",fileClass:"uploader",filenameClass:"filename",fileBtnClass:"action",fileDefaultText:"No file selected",fileBtnText:"Choose File",checkedClass:"checked",focusClass:"focus",disabledClass:"disabled",buttonClass:"button",activeClass:"active",hoverClass:"hover",useID:true,idPrefix:"uniform",resetSelector:false,autoHide:true},elements:[]};
if(a.browser.msie&&a.browser.version<7){a.support.selectOpacity=false}else{a.support.selectOpacity=true
}a.fn.uniform=function(k){k=a.extend(a.uniform.options,k);var d=this;if(k.resetSelector!=false){a(k.resetSelector).mouseup(function(){function l(){a.uniform.update(d)
}setTimeout(l,10)})}function j(l){$el=a(l);$el.addClass($el.attr("type"));b(l)}function g(l){a(l).addClass("uniform");
b(l)}function i(o){var m=a(o);var p=a("<div>"),l=a("<span>");p.addClass(k.buttonClass);if(k.useID&&m.attr("id")!=""){p.attr("id",k.idPrefix+"-"+m.attr("id"))
}var n;if(m.is("a")||m.is("button")){n=m.text()}else{if(m.is(":submit")||m.is(":reset")||m.is("input[type=button]")){n=m.attr("value")
}}n=n==""?m.is(":reset")?"Reset":"Submit":n;l.html(n);m.css("opacity",0);m.wrap(p);m.wrap(l);p=m.closest("div");
l=m.closest("span");if(m.is(":disabled")){p.addClass(k.disabledClass)}p.bind({"mouseenter.uniform":function(){p.addClass(k.hoverClass)
},"mouseleave.uniform":function(){p.removeClass(k.hoverClass);p.removeClass(k.activeClass)},"mousedown.uniform touchbegin.uniform":function(){p.addClass(k.activeClass)
},"mouseup.uniform touchend.uniform":function(){p.removeClass(k.activeClass)},"click.uniform touchend.uniform":function(r){if(a(r.target).is("span")||a(r.target).is("div")){if(o[0].dispatchEvent){var q=document.createEvent("MouseEvents");
q.initEvent("click",true,true);o[0].dispatchEvent(q)}else{o[0].click()}}}});o.bind({"focus.uniform":function(){p.addClass(k.focusClass)
},"blur.uniform":function(){p.removeClass(k.focusClass)}});a.uniform.noSelect(p);b(o)}function e(o){var m=a(o);
var p=a("<div />"),l=a("<span />");if(!m.css("display")=="none"&&k.autoHide){p.hide()}p.addClass(k.selectClass);
if(k.useID&&o.attr("id")!=""){p.attr("id",k.idPrefix+"-"+o.attr("id"))}var n=o.find(":selected:first");
if(n.length==0){n=o.find("option:first")}l.html(n.html());o.css("opacity",0);o.wrap(p);o.before(l);p=o.parent("div");
l=o.siblings("span");o.bind({"change.uniform":function(){l.text(o.find(":selected").html());p.removeClass(k.activeClass)
},"focus.uniform":function(){p.addClass(k.focusClass)},"blur.uniform":function(){p.removeClass(k.focusClass);
p.removeClass(k.activeClass)},"mousedown.uniform touchbegin.uniform":function(){p.addClass(k.activeClass)
},"mouseup.uniform touchend.uniform":function(){p.removeClass(k.activeClass)},"click.uniform touchend.uniform":function(){p.removeClass(k.activeClass)
},"mouseenter.uniform":function(){p.addClass(k.hoverClass)},"mouseleave.uniform":function(){p.removeClass(k.hoverClass);
p.removeClass(k.activeClass)},"keyup.uniform":function(){l.text(o.find(":selected").html())}});if(a(o).attr("disabled")){p.addClass(k.disabledClass)
}a.uniform.noSelect(l);b(o)}function f(n){var m=a(n);var o=a("<div />"),l=a("<span />");if(!m.css("display")=="none"&&k.autoHide){o.hide()
}o.addClass(k.checkboxClass);if(k.useID&&n.attr("id")!=""){o.attr("id",k.idPrefix+"-"+n.attr("id"))}a(n).wrap(o);
a(n).wrap(l);l=n.parent();o=l.parent();a(n).css("opacity",0).bind({"focus.uniform":function(){o.addClass(k.focusClass)
},"blur.uniform":function(){o.removeClass(k.focusClass)},"click.uniform touchend.uniform":function(){if(!a(n).attr("checked")){l.removeClass(k.checkedClass)
}else{l.addClass(k.checkedClass)}},"mousedown.uniform touchbegin.uniform":function(){o.addClass(k.activeClass)
},"mouseup.uniform touchend.uniform":function(){o.removeClass(k.activeClass)},"mouseenter.uniform":function(){o.addClass(k.hoverClass)
},"mouseleave.uniform":function(){o.removeClass(k.hoverClass);o.removeClass(k.activeClass)}});if(a(n).attr("checked")){l.addClass(k.checkedClass)
}if(a(n).attr("disabled")){o.addClass(k.disabledClass)}b(n)}function c(n){var m=a(n);var o=a("<div />"),l=a("<span />");
if(!m.css("display")=="none"&&k.autoHide){o.hide()}o.addClass(k.radioClass);if(k.useID&&n.attr("id")!=""){o.attr("id",k.idPrefix+"-"+n.attr("id"))
}a(n).wrap(o);a(n).wrap(l);l=n.parent();o=l.parent();a(n).css("opacity",0).bind({"focus.uniform":function(){o.addClass(k.focusClass)
},"blur.uniform":function(){o.removeClass(k.focusClass)},"click.uniform touchend.uniform":function(){if(!a(n).attr("checked")){l.removeClass(k.checkedClass)
}else{var p=k.radioClass.split(" ")[0];a("."+p+" span."+k.checkedClass+":has([name='"+a(n).attr("name")+"'])").removeClass(k.checkedClass);
l.addClass(k.checkedClass)}},"mousedown.uniform touchend.uniform":function(){if(!a(n).is(":disabled")){o.addClass(k.activeClass)
}},"mouseup.uniform touchbegin.uniform":function(){o.removeClass(k.activeClass)},"mouseenter.uniform touchend.uniform":function(){o.addClass(k.hoverClass)
},"mouseleave.uniform":function(){o.removeClass(k.hoverClass);o.removeClass(k.activeClass)}});if(a(n).attr("checked")){l.addClass(k.checkedClass)
}if(a(n).attr("disabled")){o.addClass(k.disabledClass)}b(n)}function h(q){var o=a(q);var r=a("<div />"),p=a("<span>"+k.fileDefaultText+"</span>"),m=a("<span>"+k.fileBtnText+"</span>");
if(!o.css("display")=="none"&&k.autoHide){r.hide()}r.addClass(k.fileClass);p.addClass(k.filenameClass);
m.addClass(k.fileBtnClass);if(k.useID&&o.attr("id")!=""){r.attr("id",k.idPrefix+"-"+o.attr("id"))}o.wrap(r);
o.after(m);o.after(p);r=o.closest("div");p=o.siblings("."+k.filenameClass);m=o.siblings("."+k.fileBtnClass);
if(!o.attr("size")){var l=r.width();o.attr("size",l/10)}var n=function(){var s=o.val();if(s===""){s=k.fileDefaultText
}else{s=s.split(/[\/\\]+/);s=s[(s.length-1)]}p.text(s)};n();o.css("opacity",0).bind({"focus.uniform":function(){r.addClass(k.focusClass)
},"blur.uniform":function(){r.removeClass(k.focusClass)},"mousedown.uniform":function(){if(!a(q).is(":disabled")){r.addClass(k.activeClass)
}},"mouseup.uniform":function(){r.removeClass(k.activeClass)},"mouseenter.uniform":function(){r.addClass(k.hoverClass)
},"mouseleave.uniform":function(){r.removeClass(k.hoverClass);r.removeClass(k.activeClass)}});if(a.browser.msie){o.bind("click.uniform.ie7",function(){setTimeout(n,0)
})}else{o.bind("change.uniform",n)}if(o.attr("disabled")){r.addClass(k.disabledClass)}a.uniform.noSelect(p);
a.uniform.noSelect(m);b(q)}a.uniform.restore=function(l){if(l==undefined){l=a(a.uniform.elements)}a(l).each(function(){if(a(this).is(":checkbox")){a(this).unwrap().unwrap()
}else{if(a(this).is("select")){a(this).siblings("span").remove();a(this).unwrap()}else{if(a(this).is(":radio")){a(this).unwrap().unwrap()
}else{if(a(this).is(":file")){a(this).siblings("span").remove();a(this).unwrap()}else{if(a(this).is("button, :submit, :reset, a, input[type='button']")){a(this).unwrap().unwrap()
}}}}}a(this).unbind(".uniform");a(this).css("opacity","1");var m=a.inArray(a(l),a.uniform.elements);a.uniform.elements.splice(m,1)
})};function b(l){l=a(l).get();if(l.length>1){a.each(l,function(m,n){a.uniform.elements.push(n)})}else{a.uniform.elements.push(l)
}}a.uniform.noSelect=function(l){function m(){return false}a(l).each(function(){this.onselectstart=this.ondragstart=m;
a(this).mousedown(m).css({MozUserSelect:"none"})})};a.uniform.update=function(l){if(l==undefined){l=a(a.uniform.elements)
}l=a(l);l.each(function(){var n=a(this);if(n.is("select")){var m=n.siblings("span");var p=n.parent("div");
p.removeClass(k.hoverClass+" "+k.focusClass+" "+k.activeClass);m.html(n.find(":selected").html());if(n.is(":disabled")){p.addClass(k.disabledClass)
}else{p.removeClass(k.disabledClass)}}else{if(n.is(":checkbox")){var m=n.closest("span");var p=n.closest("div");
p.removeClass(k.hoverClass+" "+k.focusClass+" "+k.activeClass);m.removeClass(k.checkedClass);if(n.is(":checked")){m.addClass(k.checkedClass)
}if(n.is(":disabled")){p.addClass(k.disabledClass)}else{p.removeClass(k.disabledClass)}}else{if(n.is(":radio")){var m=n.closest("span");
var p=n.closest("div");p.removeClass(k.hoverClass+" "+k.focusClass+" "+k.activeClass);m.removeClass(k.checkedClass);
if(n.is(":checked")){m.addClass(k.checkedClass)}if(n.is(":disabled")){p.addClass(k.disabledClass)}else{p.removeClass(k.disabledClass)
}}else{if(n.is(":file")){var p=n.parent("div");var o=n.siblings(k.filenameClass);btnTag=n.siblings(k.fileBtnClass);
p.removeClass(k.hoverClass+" "+k.focusClass+" "+k.activeClass);o.text(n.val());if(n.is(":disabled")){p.addClass(k.disabledClass)
}else{p.removeClass(k.disabledClass)}}else{if(n.is(":submit")||n.is(":reset")||n.is("button")||n.is("a")||l.is("input[type=button]")){var p=n.closest("div");
p.removeClass(k.hoverClass+" "+k.focusClass+" "+k.activeClass);if(n.is(":disabled")){p.addClass(k.disabledClass)
}else{p.removeClass(k.disabledClass)}}}}}}})};return this.each(function(){if(a.support.selectOpacity){var l=a(this);
if(l.is("select")){if(l.attr("multiple")!=true){if(l.attr("size")==undefined||l.attr("size")<=1){e(l)
}}}else{if(l.is(":checkbox")){f(l)}else{if(l.is(":radio")){c(l)}else{if(l.is(":file")){h(l)}else{if(l.is(":text, :password, input[type='email']")){j(l)
}else{if(l.is("textarea")){g(l)}else{if(l.is("a")||l.is(":submit")||l.is(":reset")||l.is("button")||l.is("input[type=button]")){i(l)
}}}}}}}}})}})(jQuery);(function(factory){if(typeof define==="function"&&define.amd){define(["jquery","jquery.ui.widget"],factory)
}else{factory(window.jQuery)}}(function($){$.support.xhrFileUpload=!!(window.XMLHttpRequestUpload&&window.FileReader);
$.support.xhrFormDataFileUpload=!!window.FormData;$.widget("blueimp.fileupload",{options:{dropZone:$(document),pasteZone:$(document),fileInput:undefined,replaceFileInput:true,paramName:undefined,singleFileUploads:true,limitMultiFileUploads:undefined,sequentialUploads:false,limitConcurrentUploads:undefined,forceIframeTransport:false,redirect:undefined,redirectParamName:undefined,postMessage:undefined,multipart:true,maxChunkSize:undefined,uploadedBytes:undefined,recalculateProgress:true,progressInterval:100,bitrateInterval:500,autoUpload:true,formData:function(form){return form.serializeArray()
},add:function(e,data){if(data.autoUpload||(data.autoUpload!==false&&($(this).data("blueimp-fileupload")||$(this).data("fileupload")).options.autoUpload)){data.submit()
}},processData:false,contentType:false,cache:false},_refreshOptionsList:["fileInput","dropZone","pasteZone","multipart","forceIframeTransport"],_BitrateTimer:function(){this.timestamp=+(new Date());
this.loaded=0;this.bitrate=0;this.getBitrate=function(now,loaded,interval){var timeDiff=now-this.timestamp;
if(!this.bitrate||!interval||timeDiff>interval){this.bitrate=(loaded-this.loaded)*(1000/timeDiff)*8;this.loaded=loaded;
this.timestamp=now}return this.bitrate}},_isXHRUpload:function(options){return !options.forceIframeTransport&&((!options.multipart&&$.support.xhrFileUpload)||$.support.xhrFormDataFileUpload)
},_getFormData:function(options){var formData;if(typeof options.formData==="function"){return options.formData(options.form)
}if($.isArray(options.formData)){return options.formData}if(options.formData){formData=[];$.each(options.formData,function(name,value){formData.push({name:name,value:value})
});return formData}return[]},_getTotal:function(files){var total=0;$.each(files,function(index,file){total+=file.size||1
});return total},_initProgressObject:function(obj){obj._progress={loaded:0,total:0,bitrate:0}},_onProgress:function(e,data){if(e.lengthComputable){var now=+(new Date()),loaded;
if(data._time&&data.progressInterval&&(now-data._time<data.progressInterval)&&e.loaded!==e.total){return
}data._time=now;loaded=Math.floor(e.loaded/e.total*(data.chunkSize||data._progress.total))+(data.uploadedBytes||0);
this._progress.loaded+=(loaded-data._progress.loaded);this._progress.bitrate=this._bitrateTimer.getBitrate(now,this._progress.loaded,data.bitrateInterval);
data._progress.loaded=data.loaded=loaded;data._progress.bitrate=data.bitrate=data._bitrateTimer.getBitrate(now,loaded,data.bitrateInterval);
this._trigger("progress",e,data);this._trigger("progressall",e,this._progress)}},_initProgressListener:function(options){var that=this,xhr=options.xhr?options.xhr():$.ajaxSettings.xhr();
if(xhr.upload){$(xhr.upload).bind("progress",function(e){var oe=e.originalEvent;e.lengthComputable=oe.lengthComputable;
e.loaded=oe.loaded;e.total=oe.total;that._onProgress(e,options)});options.xhr=function(){return xhr}}},_initXHRData:function(options){var formData,file=options.files[0],multipart=options.multipart||!$.support.xhrFileUpload,paramName=options.paramName[0];
options.headers=options.headers||{};if(options.contentRange){options.headers["Content-Range"]=options.contentRange
}if(!multipart){options.headers["Content-Disposition"]='attachment; filename="'+encodeURI(file.name)+'"';
options.contentType=file.type;options.data=options.blob||file}else{if($.support.xhrFormDataFileUpload){if(options.postMessage){formData=this._getFormData(options);
if(options.blob){formData.push({name:paramName,value:options.blob})}else{$.each(options.files,function(index,file){formData.push({name:options.paramName[index]||paramName,value:file})
})}}else{if(options.formData instanceof FormData){formData=options.formData}else{formData=new FormData();
$.each(this._getFormData(options),function(index,field){formData.append(field.name,field.value)})}if(options.blob){options.headers["Content-Disposition"]='attachment; filename="'+encodeURI(file.name)+'"';
formData.append(paramName,options.blob,file.name)}else{$.each(options.files,function(index,file){if((window.Blob&&file instanceof Blob)||(window.File&&file instanceof File)){formData.append(options.paramName[index]||paramName,file,file.name)
}})}}options.data=formData}}options.blob=null},_initIframeSettings:function(options){options.dataType="iframe "+(options.dataType||"");
options.formData=this._getFormData(options);if(options.redirect&&$("<a></a>").prop("href",options.url).prop("host")!==location.host){options.formData.push({name:options.redirectParamName||"redirect",value:options.redirect})
}},_initDataSettings:function(options){if(this._isXHRUpload(options)){if(!this._chunkedUpload(options,true)){if(!options.data){this._initXHRData(options)
}this._initProgressListener(options)}if(options.postMessage){options.dataType="postmessage "+(options.dataType||"")
}}else{this._initIframeSettings(options,"iframe")}},_getParamName:function(options){var fileInput=$(options.fileInput),paramName=options.paramName;
if(!paramName){paramName=[];fileInput.each(function(){var input=$(this),name=input.prop("name")||"files[]",i=(input.prop("files")||[1]).length;
while(i){paramName.push(name);i-=1}});if(!paramName.length){paramName=[fileInput.prop("name")||"files[]"]
}}else{if(!$.isArray(paramName)){paramName=[paramName]}}return paramName},_initFormSettings:function(options){if(!options.form||!options.form.length){options.form=$(options.fileInput.prop("form"));
if(!options.form.length){options.form=$(this.options.fileInput.prop("form"))}}options.paramName=this._getParamName(options);
if(!options.url){options.url=options.form.prop("action")||location.href}options.type=(options.type||options.form.prop("method")||"").toUpperCase();
if(options.type!=="POST"&&options.type!=="PUT"&&options.type!=="PATCH"){options.type="POST"}if(!options.formAcceptCharset){options.formAcceptCharset=options.form.attr("accept-charset")
}},_getAJAXSettings:function(data){var options=$.extend({},this.options,data);this._initFormSettings(options);
this._initDataSettings(options);return options},_getDeferredState:function(deferred){if(deferred.state){return deferred.state()
}if(deferred.isResolved()){return"resolved"}if(deferred.isRejected()){return"rejected"}return"pending"
},_enhancePromise:function(promise){promise.success=promise.done;promise.error=promise.fail;promise.complete=promise.always;
return promise},_getXHRPromise:function(resolveOrReject,context,args){var dfd=$.Deferred(),promise=dfd.promise();
context=context||this.options.context||promise;if(resolveOrReject===true){dfd.resolveWith(context,args)
}else{if(resolveOrReject===false){dfd.rejectWith(context,args)}}promise.abort=dfd.promise;return this._enhancePromise(promise)
},_addConvenienceMethods:function(e,data){var that=this;data.submit=function(){if(this.state()!=="pending"){data.jqXHR=this.jqXHR=(that._trigger("submit",e,this)!==false)&&that._onSend(e,this)
}return this.jqXHR||that._getXHRPromise()};data.abort=function(){if(this.jqXHR){return this.jqXHR.abort()
}return this._getXHRPromise()};data.state=function(){if(this.jqXHR){return that._getDeferredState(this.jqXHR)
}};data.progress=function(){return this._progress}},_getUploadedBytes:function(jqXHR){var range=jqXHR.getResponseHeader("Range"),parts=range&&range.split("-"),upperBytesPos=parts&&parts.length>1&&parseInt(parts[1],10);
return upperBytesPos&&upperBytesPos+1},_chunkedUpload:function(options,testOnly){var that=this,file=options.files[0],fs=file.size,ub=options.uploadedBytes=options.uploadedBytes||0,mcs=options.maxChunkSize||fs,slice=file.slice||file.webkitSlice||file.mozSlice,dfd=$.Deferred(),promise=dfd.promise(),jqXHR,upload;
if(!(this._isXHRUpload(options)&&slice&&(ub||mcs<fs))||options.data){return false}if(testOnly){return true
}if(ub>=fs){file.error="Uploaded bytes exceed file size";return this._getXHRPromise(false,options.context,[null,"error",file.error])
}upload=function(){var o=$.extend({},options),currentLoaded=o._progress.loaded;o.blob=slice.call(file,ub,ub+mcs,file.type);
o.chunkSize=o.blob.size;o.contentRange="bytes "+ub+"-"+(ub+o.chunkSize-1)+"/"+fs;that._initXHRData(o);
that._initProgressListener(o);jqXHR=((that._trigger("chunksend",null,o)!==false&&$.ajax(o))||that._getXHRPromise(false,o.context)).done(function(result,textStatus,jqXHR){ub=that._getUploadedBytes(jqXHR)||(ub+o.chunkSize);
if(o._progress.loaded===currentLoaded){that._onProgress($.Event("progress",{lengthComputable:true,loaded:ub-o.uploadedBytes,total:ub-o.uploadedBytes}),o)
}options.uploadedBytes=o.uploadedBytes=ub;o.result=result;o.textStatus=textStatus;o.jqXHR=jqXHR;that._trigger("chunkdone",null,o);
that._trigger("chunkalways",null,o);if(ub<fs){upload()}else{dfd.resolveWith(o.context,[result,textStatus,jqXHR])
}}).fail(function(jqXHR,textStatus,errorThrown){o.jqXHR=jqXHR;o.textStatus=textStatus;o.errorThrown=errorThrown;
that._trigger("chunkfail",null,o);that._trigger("chunkalways",null,o);dfd.rejectWith(o.context,[jqXHR,textStatus,errorThrown])
})};this._enhancePromise(promise);promise.abort=function(){return jqXHR.abort()};upload();return promise
},_beforeSend:function(e,data){if(this._active===0){this._trigger("start");this._bitrateTimer=new this._BitrateTimer();
this._progress.loaded=this._progress.total=0;this._progress.bitrate=0}if(!data._progress){data._progress={}
}data._progress.loaded=data.loaded=data.uploadedBytes||0;data._progress.total=data.total=this._getTotal(data.files)||1;
data._progress.bitrate=data.bitrate=0;this._active+=1;this._progress.loaded+=data.loaded;this._progress.total+=data.total
},_onDone:function(result,textStatus,jqXHR,options){var total=options._progress.total;if(options._progress.loaded<total){this._onProgress($.Event("progress",{lengthComputable:true,loaded:total,total:total}),options)
}options.result=result;options.textStatus=textStatus;options.jqXHR=jqXHR;this._trigger("done",null,options)
},_onFail:function(jqXHR,textStatus,errorThrown,options){options.jqXHR=jqXHR;options.textStatus=textStatus;
options.errorThrown=errorThrown;this._trigger("fail",null,options);if(options.recalculateProgress){this._progress.loaded-=options._progress.loaded;
this._progress.total-=options._progress.total}},_onAlways:function(jqXHRorResult,textStatus,jqXHRorError,options){this._active-=1;
this._trigger("always",null,options);if(this._active===0){this._trigger("stop")}},_onSend:function(e,data){if(!data.submit){this._addConvenienceMethods(e,data)
}var that=this,jqXHR,aborted,slot,pipe,options=that._getAJAXSettings(data),send=function(){that._sending+=1;
options._bitrateTimer=new that._BitrateTimer();jqXHR=jqXHR||(((aborted||that._trigger("send",e,options)===false)&&that._getXHRPromise(false,options.context,aborted))||that._chunkedUpload(options)||$.ajax(options)).done(function(result,textStatus,jqXHR){that._onDone(result,textStatus,jqXHR,options)
}).fail(function(jqXHR,textStatus,errorThrown){that._onFail(jqXHR,textStatus,errorThrown,options)}).always(function(jqXHRorResult,textStatus,jqXHRorError){that._sending-=1;
that._onAlways(jqXHRorResult,textStatus,jqXHRorError,options);if(options.limitConcurrentUploads&&options.limitConcurrentUploads>that._sending){var nextSlot=that._slots.shift();
while(nextSlot){if(that._getDeferredState(nextSlot)==="pending"){nextSlot.resolve();break}nextSlot=that._slots.shift()
}}});return jqXHR};this._beforeSend(e,options);if(this.options.sequentialUploads||(this.options.limitConcurrentUploads&&this.options.limitConcurrentUploads<=this._sending)){if(this.options.limitConcurrentUploads>1){slot=$.Deferred();
this._slots.push(slot);pipe=slot.pipe(send)}else{pipe=(this._sequence=this._sequence.pipe(send,send))
}pipe.abort=function(){aborted=[undefined,"abort","abort"];if(!jqXHR){if(slot){slot.rejectWith(options.context,aborted)
}return send()}return jqXHR.abort()};return this._enhancePromise(pipe)}return send()},_onAdd:function(e,data){var that=this,result=true,options=$.extend({},this.options,data),limit=options.limitMultiFileUploads,paramName=this._getParamName(options),paramNameSet,paramNameSlice,fileSet,i;
if(!(options.singleFileUploads||limit)||!this._isXHRUpload(options)){fileSet=[data.files];paramNameSet=[paramName]
}else{if(!options.singleFileUploads&&limit){fileSet=[];paramNameSet=[];for(i=0;i<data.files.length;i+=limit){fileSet.push(data.files.slice(i,i+limit));
paramNameSlice=paramName.slice(i,i+limit);if(!paramNameSlice.length){paramNameSlice=paramName}paramNameSet.push(paramNameSlice)
}}else{paramNameSet=paramName}}data.originalFiles=data.files;$.each(fileSet||data.files,function(index,element){var newData=$.extend({},data);
newData.files=fileSet?element:[element];newData.paramName=paramNameSet[index];that._initProgressObject(newData);
that._addConvenienceMethods(e,newData);result=that._trigger("add",e,newData);return result});return result
},_replaceFileInput:function(input){var inputClone=input.clone(true);$("<form></form>").append(inputClone)[0].reset();
input.after(inputClone).detach();$.cleanData(input.unbind("remove"));this.options.fileInput=this.options.fileInput.map(function(i,el){if(el===input[0]){return inputClone[0]
}return el});if(input[0]===this.element[0]){this.element=inputClone}},_handleFileTreeEntry:function(entry,path){var that=this,dfd=$.Deferred(),errorHandler=function(e){if(e&&!e.entry){e.entry=entry
}dfd.resolve([e])},dirReader;path=path||"";if(entry.isFile){if(entry._file){entry._file.relativePath=path;
dfd.resolve(entry._file)}else{entry.file(function(file){file.relativePath=path;dfd.resolve(file)},errorHandler)
}}else{if(entry.isDirectory){dirReader=entry.createReader();dirReader.readEntries(function(entries){that._handleFileTreeEntries(entries,path+entry.name+"/").done(function(files){dfd.resolve(files)
}).fail(errorHandler)},errorHandler)}else{dfd.resolve([])}}return dfd.promise()},_handleFileTreeEntries:function(entries,path){var that=this;
return $.when.apply($,$.map(entries,function(entry){return that._handleFileTreeEntry(entry,path)})).pipe(function(){return Array.prototype.concat.apply([],arguments)
})},_getDroppedFiles:function(dataTransfer){dataTransfer=dataTransfer||{};var items=dataTransfer.items;
if(items&&items.length&&(items[0].webkitGetAsEntry||items[0].getAsEntry)){return this._handleFileTreeEntries($.map(items,function(item){var entry;
if(item.webkitGetAsEntry){entry=item.webkitGetAsEntry();if(entry){entry._file=item.getAsFile()}return entry
}return item.getAsEntry()}))}return $.Deferred().resolve($.makeArray(dataTransfer.files)).promise()},_getSingleFileInputFiles:function(fileInput){fileInput=$(fileInput);
var entries=fileInput.prop("webkitEntries")||fileInput.prop("entries"),files,value;if(entries&&entries.length){return this._handleFileTreeEntries(entries)
}files=$.makeArray(fileInput.prop("files"));if(!files.length){value=fileInput.prop("value");if(!value){return $.Deferred().resolve([]).promise()
}files=[{name:value.replace(/^.*\\/,"")}]}else{if(files[0].name===undefined&&files[0].fileName){$.each(files,function(index,file){file.name=file.fileName;
file.size=file.fileSize})}}return $.Deferred().resolve(files).promise()},_getFileInputFiles:function(fileInput){if(!(fileInput instanceof $)||fileInput.length===1){return this._getSingleFileInputFiles(fileInput)
}return $.when.apply($,$.map(fileInput,this._getSingleFileInputFiles)).pipe(function(){return Array.prototype.concat.apply([],arguments)
})},_onChange:function(e){var that=this,data={fileInput:$(e.target),form:$(e.target.form)};this._getFileInputFiles(data.fileInput).always(function(files){data.files=files;
if(that.options.replaceFileInput){that._replaceFileInput(data.fileInput)}if(that._trigger("change",e,data)!==false){that._onAdd(e,data)
}})},_onPaste:function(e){var cbd=e.originalEvent.clipboardData,items=(cbd&&cbd.items)||[],data={files:[]};
$.each(items,function(index,item){var file=item.getAsFile&&item.getAsFile();if(file){data.files.push(file)
}});if(this._trigger("paste",e,data)===false||this._onAdd(e,data)===false){return false}},_onDrop:function(e){var that=this,dataTransfer=e.dataTransfer=e.originalEvent.dataTransfer,data={};
if(dataTransfer&&dataTransfer.files&&dataTransfer.files.length){e.preventDefault()}this._getDroppedFiles(dataTransfer).always(function(files){data.files=files;
if(that._trigger("drop",e,data)!==false){that._onAdd(e,data)}})},_onDragOver:function(e){var dataTransfer=e.dataTransfer=e.originalEvent.dataTransfer;
if(this._trigger("dragover",e)===false){return false}if(dataTransfer&&$.inArray("Files",dataTransfer.types)!==-1){dataTransfer.dropEffect="copy";
e.preventDefault()}},_initEventHandlers:function(){if(this._isXHRUpload(this.options)){this._on(this.options.dropZone,{dragover:this._onDragOver,drop:this._onDrop});
this._on(this.options.pasteZone,{paste:this._onPaste})}this._on(this.options.fileInput,{change:this._onChange})
},_destroyEventHandlers:function(){this._off(this.options.dropZone,"dragover drop");this._off(this.options.pasteZone,"paste");
this._off(this.options.fileInput,"change")},_setOption:function(key,value){var refresh=$.inArray(key,this._refreshOptionsList)!==-1;
if(refresh){this._destroyEventHandlers()}this._super(key,value);if(refresh){this._initSpecialOptions();
this._initEventHandlers()}},_initSpecialOptions:function(){var options=this.options;if(options.fileInput===undefined){options.fileInput=this.element.is('input[type="file"]')?this.element:this.element.find('input[type="file"]')
}else{if(!(options.fileInput instanceof $)){options.fileInput=$(options.fileInput)}}if(!(options.dropZone instanceof $)){options.dropZone=$(options.dropZone)
}if(!(options.pasteZone instanceof $)){options.pasteZone=$(options.pasteZone)}},_create:function(){var options=this.options;
$.extend(options,$(this.element[0].cloneNode(false)).data());this._initSpecialOptions();this._slots=[];
this._sequence=this._getXHRPromise(true);this._sending=this._active=0;this._initProgressObject(this);
this._initEventHandlers()},progress:function(){return this._progress},add:function(data){var that=this;
if(!data||this.options.disabled){return}if(data.fileInput&&!data.files){this._getFileInputFiles(data.fileInput).always(function(files){data.files=files;
that._onAdd(null,data)})}else{data.files=$.makeArray(data.files);this._onAdd(null,data)}},send:function(data){if(data&&!this.options.disabled){if(data.fileInput&&!data.files){var that=this,dfd=$.Deferred(),promise=dfd.promise(),jqXHR,aborted;
promise.abort=function(){aborted=true;if(jqXHR){return jqXHR.abort()}dfd.reject(null,"abort","abort");
return promise};this._getFileInputFiles(data.fileInput).always(function(files){if(aborted){return}data.files=files;
jqXHR=that._onSend(null,data).then(function(result,textStatus,jqXHR){dfd.resolve(result,textStatus,jqXHR)
},function(jqXHR,textStatus,errorThrown){dfd.reject(jqXHR,textStatus,errorThrown)})});return this._enhancePromise(promise)
}data.files=$.makeArray(data.files);if(data.files.length){return this._onSend(null,data)}}return this._getXHRPromise(false,data&&data.context)
}})}));(function(factory){if(typeof define==="function"&&define.amd){define(["jquery","tmpl","load-image","./jquery.fileupload-fp"],factory)
}else{factory(window.jQuery,window.tmpl,window.loadImage)}}(function($,tmpl,loadImage){$.widget("blueimp.fileupload",$.blueimp.fileupload,{options:{autoUpload:false,maxNumberOfFiles:undefined,maxFileSize:undefined,minFileSize:undefined,acceptFileTypes:/.+$/i,previewSourceFileTypes:/^image\/(gif|jpeg|png)$/,previewSourceMaxFileSize:5000000,previewMaxWidth:80,previewMaxHeight:80,previewAsCanvas:true,uploadTemplateId:"template-upload",downloadTemplateId:"template-download",filesContainer:undefined,prependFiles:false,dataType:"json",add:function(e,data){var that=$(this).data("blueimp-fileupload")||$(this).data("fileupload"),options=that.options,files=data.files;
$(this).fileupload("process",data).done(function(){that._adjustMaxNumberOfFiles(-files.length);data.maxNumberOfFilesAdjusted=true;
data.files.valid=data.isValidated=that._validate(files);data.context=that._renderUpload(files).data("data",data);
options.filesContainer[options.prependFiles?"prepend":"append"](data.context);that._renderPreviews(data);
that._forceReflow(data.context);that._transition(data.context).done(function(){if((that._trigger("added",e,data)!==false)&&(options.autoUpload||data.autoUpload)&&data.autoUpload!==false&&data.isValidated){data.submit()
}})})},send:function(e,data){var that=$(this).data("blueimp-fileupload")||$(this).data("fileupload");
if(!data.isValidated){if(!data.maxNumberOfFilesAdjusted){that._adjustMaxNumberOfFiles(-data.files.length);
data.maxNumberOfFilesAdjusted=true}if(!that._validate(data.files)){return false}}if(data.context&&data.dataType&&data.dataType.substr(0,6)==="iframe"){data.context.find(".progress").addClass(!$.support.transition&&"progress-animated").attr("aria-valuenow",100).find(".bar").css("width","100%")
}return that._trigger("sent",e,data)},done:function(e,data){var that=$(this).data("fileupload"),template,preview;
if(!that){return}if(data.context){data.context.each(function(index){var file=($.isArray(data.result)&&data.result[index])||{error:"emptyResult"};
if(file.error&&that._adjustMaxNumberOfFiles){that._adjustMaxNumberOfFiles(1)}that._transition($(this)).done(function(){var node=$(this);
template=that._renderDownload([file]).css("height",node.height()).replaceAll(node);that._forceReflow(template);
that._transition(template).done(function(){data.context=$(this);that._trigger("completed",e,data)})})
})}else{template=that._renderDownload(data.result).appendTo(that.options.filesContainer);that._forceReflow(template);
that._transition(template).done(function(){data.context=$(this);that._trigger("completed",e,data)})}},fail:function(e,data){var that=$(this).data("blueimp-fileupload")||$(this).data("fileupload"),template,deferred;
if(data.maxNumberOfFilesAdjusted){that._adjustMaxNumberOfFiles(data.files.length)}if(data.context){data.context.each(function(index){if(data.errorThrown!=="abort"){var file=data.files[index];
file.error=file.error||data.errorThrown||true;deferred=that._addFinishedDeferreds();that._transition($(this)).done(function(){var node=$(this);
template=that._renderDownload([file]).replaceAll(node);that._forceReflow(template);that._transition(template).done(function(){data.context=$(this);
that._trigger("failed",e,data);that._trigger("finished",e,data);deferred.resolve()})})}else{deferred=that._addFinishedDeferreds();
that._transition($(this)).done(function(){$(this).remove();that._trigger("failed",e,data);that._trigger("finished",e,data);
deferred.resolve()})}})}else{if(data.errorThrown!=="abort"){data.context=that._renderUpload(data.files).appendTo(that.options.filesContainer).data("data",data);
that._forceReflow(data.context);deferred=that._addFinishedDeferreds();that._transition(data.context).done(function(){data.context=$(this);
that._trigger("failed",e,data);that._trigger("finished",e,data);deferred.resolve()})}else{that._trigger("failed",e,data);
that._trigger("finished",e,data);that._addFinishedDeferreds().resolve()}}},progress:function(e,data){if(data.context){var progress=Math.floor(data.loaded/data.total*100);
data.context.find(".progress").attr("aria-valuenow",progress).find(".bar").css("width",progress+"%")}},progressall:function(e,data){var $this=$(this),progress=Math.floor(data.loaded/data.total*100),globalProgressNode=$this.find(".fileupload-progress"),extendedProgressNode=globalProgressNode.find(".progress-extended");
if(extendedProgressNode.length){extendedProgressNode.html(($this.data("blueimp-fileupload")||$this.data("fileupload"))._renderExtendedProgress(data))
}globalProgressNode.find(".progress").attr("aria-valuenow",progress).find(".bar").css("width",progress+"%")
},start:function(e){var that=$(this).data("blueimp-fileupload")||$(this).data("fileupload");that._resetFinishedDeferreds();
that._transition($(this).find(".fileupload-progress")).done(function(){that._trigger("started",e)})},stop:function(e){var that=$(this).data("blueimp-fileupload")||$(this).data("fileupload"),deferred=that._addFinishedDeferreds();
$.when.apply($,that._getFinishedDeferreds()).done(function(){that._trigger("stopped",e)});that._transition($(this).find(".fileupload-progress")).done(function(){$(this).find(".progress").attr("aria-valuenow","0").find(".bar").css("width","0%");
$(this).find(".progress-extended").html("&nbsp;");deferred.resolve()})},destroy:function(e,data){var that=$(this).data("blueimp-fileupload")||$(this).data("fileupload");
if(data.url){$.ajax(data);that._adjustMaxNumberOfFiles(1)}that._transition(data.context).done(function(){$(this).remove();
that._trigger("destroyed",e,data)})}},_resetFinishedDeferreds:function(){this._finishedUploads=[]},_addFinishedDeferreds:function(deferred){if(!deferred){deferred=$.Deferred()
}this._finishedUploads.push(deferred);return deferred},_getFinishedDeferreds:function(){return this._finishedUploads
},_getFilesFromResponse:function(data){if(data.result&&$.isArray(data.result.files)){return data.result.files
}return[]},_enableDragToDesktop:function(){var link=$(this),url=link.prop("href"),name=link.prop("download"),type="application/octet-stream";
link.bind("dragstart",function(e){try{e.originalEvent.dataTransfer.setData("DownloadURL",[type,name,url].join(":"))
}catch(err){}})},_adjustMaxNumberOfFiles:function(operand){if(typeof this.options.maxNumberOfFiles==="number"){this.options.maxNumberOfFiles+=operand;
if(this.options.maxNumberOfFiles<1){this._disableFileInputButton()}else{this._enableFileInputButton()
}}},_formatFileSize:function(bytes){if(typeof bytes!=="number"){return""}if(bytes>=1000000000){return(bytes/1000000000).toFixed(2)+" GB"
}if(bytes>=1000000){return(bytes/1000000).toFixed(2)+" MB"}return(bytes/1000).toFixed(2)+" KB"},_formatBitrate:function(bits){if(typeof bits!=="number"){return""
}if(bits>=1000000000){return(bits/1000000000).toFixed(2)+" Gbit/s"}if(bits>=1000000){return(bits/1000000).toFixed(2)+" Mbit/s"
}if(bits>=1000){return(bits/1000).toFixed(2)+" kbit/s"}return bits.toFixed(2)+" bit/s"},_formatTime:function(seconds){var date=new Date(seconds*1000),days=Math.floor(seconds/86400);
days=days?days+"d ":"";return days+("0"+date.getUTCHours()).slice(-2)+":"+("0"+date.getUTCMinutes()).slice(-2)+":"+("0"+date.getUTCSeconds()).slice(-2)
},_formatPercentage:function(floatValue){return(floatValue*100).toFixed(2)+" %"},_renderExtendedProgress:function(data){return this._formatBitrate(data.bitrate)+" | "+this._formatTime((data.total-data.loaded)*8/data.bitrate)+" | "+this._formatPercentage(data.loaded/data.total)+" | "+this._formatFileSize(data.loaded)+" / "+this._formatFileSize(data.total)
},_hasError:function(file){if(file.error){return file.error}if(this.options.maxNumberOfFiles<0){return"Maximum number of files exceeded"
}if(!(this.options.acceptFileTypes.test(file.type)||this.options.acceptFileTypes.test(file.name))){return"Filetype not allowed"
}if(this.options.maxFileSize&&file.size>this.options.maxFileSize){return"File is too big"}if(typeof file.size==="number"&&file.size<this.options.minFileSize){return"File is too small"
}return null},_validate:function(files){var that=this,valid=!!files.length;$.each(files,function(index,file){file.error=that._hasError(file);
if(file.error){valid=false}});return valid},_renderTemplate:function(func,files){if(!func){return $()
}var result=func({files:files,formatFileSize:this._formatFileSize,options:this.options});if(result instanceof $){return result
}return $(this.options.templatesContainer).html(result).children()},_renderPreview:function(file,node){var that=this,options=this.options,dfd=$.Deferred();
return((loadImage&&loadImage(file,function(img){node.append(img);that._forceReflow(node);that._transition(node).done(function(){dfd.resolveWith(node)
});if(!$.contains(that.document[0].body,node[0])){dfd.resolveWith(node)}node.on("remove",function(){dfd.resolveWith(node)
})},{maxWidth:options.previewMaxWidth,maxHeight:options.previewMaxHeight,canvas:options.previewAsCanvas}))||dfd.resolveWith(node))&&dfd
},_renderPreviews:function(data){var that=this,options=this.options;data.context.find(".preview span").each(function(index,element){var file=data.files[index];
if(options.previewSourceFileTypes.test(file.type)&&($.type(options.previewSourceMaxFileSize)!=="number"||file.size<options.previewSourceMaxFileSize)){that._processingQueue=that._processingQueue.pipe(function(){var dfd=$.Deferred(),ev=$.Event("previewdone",{target:element});
that._renderPreview(file,$(element)).done(function(){that._trigger(ev.type,ev,data);dfd.resolveWith(that)
});return dfd.promise()})}});return this._processingQueue},_renderUpload:function(files){return this._renderTemplate(this.options.uploadTemplate,files)
},_renderDownload:function(files){return this._renderTemplate(this.options.downloadTemplate,files).find("a[download]").each(this._enableDragToDesktop).end()
},_startHandler:function(e){e.preventDefault();var button=$(e.currentTarget),template=button.closest(".template-upload"),data=template.data("data");
if(data&&data.submit&&!data.jqXHR&&data.submit()){button.prop("disabled",true)}},_cancelHandler:function(e){e.preventDefault();
var template=$(e.currentTarget).closest(".template-upload"),data=template.data("data")||{};if(!data.jqXHR){data.errorThrown="abort";
this._trigger("fail",e,data)}else{data.jqXHR.abort()}},_deleteHandler:function(e){e.preventDefault();
var button=$(e.currentTarget);this._trigger("destroy",e,$.extend({context:button.closest(".template-download"),type:"DELETE",dataType:this.options.dataType},button.data()))
},_forceReflow:function(node){return $.support.transition&&node.length&&node[0].offsetWidth},_transition:function(node){var dfd=$.Deferred();
if($.support.transition&&node.hasClass("fade")&&node.is(":visible")){node.bind($.support.transition.end,function(e){if(e.target===node[0]){node.unbind($.support.transition.end);
dfd.resolveWith(node)}}).toggleClass("in")}else{node.toggleClass("in");dfd.resolveWith(node)}return dfd
},_initButtonBarEventHandlers:function(){var fileUploadButtonBar=this.element.find(".fileupload-buttonbar"),filesList=this.options.filesContainer;
this._on(fileUploadButtonBar.find(".start"),{click:function(e){e.preventDefault();filesList.find(".start").click()
}});this._on(fileUploadButtonBar.find(".cancel"),{click:function(e){e.preventDefault();filesList.find(".cancel").click()
}});this._on(fileUploadButtonBar.find(".delete"),{click:function(e){e.preventDefault();filesList.find(".toggle:checked").closest(".template-download").find(".delete").click();
fileUploadButtonBar.find(".toggle").prop("checked",false)}});this._on(fileUploadButtonBar.find(".toggle"),{change:function(e){filesList.find(".toggle").prop("checked",$(e.currentTarget).is(":checked"))
}})},_destroyButtonBarEventHandlers:function(){this._off(this.element.find(".fileupload-buttonbar").find(".start, .cancel, .delete"),"click");
this._off(this.element.find(".fileupload-buttonbar .toggle"),"change.")},_initEventHandlers:function(){this._super();
this._on(this.options.filesContainer,{"click .start":this._startHandler,"click .cancel":this._cancelHandler,"click .delete":this._deleteHandler});
this._initButtonBarEventHandlers()},_destroyEventHandlers:function(){this._destroyButtonBarEventHandlers();
this._off(this.options.filesContainer,"click");this._super()},_enableFileInputButton:function(){this.element.find(".fileinput-button input").prop("disabled",false).parent().removeClass("disabled")
},_disableFileInputButton:function(){this.element.find(".fileinput-button input").prop("disabled",true).parent().addClass("disabled")
},_initTemplates:function(){var options=this.options;options.templatesContainer=this.document[0].createElement(options.filesContainer.prop("nodeName"));
if(tmpl){if(options.uploadTemplateId){options.uploadTemplate=tmpl(options.uploadTemplateId)}if(options.downloadTemplateId){options.downloadTemplate=tmpl(options.downloadTemplateId)
}}},_initFilesContainer:function(){var options=this.options;if(options.filesContainer===undefined){options.filesContainer=this.element.find(".files")
}else{if(!(options.filesContainer instanceof $)){options.filesContainer=$(options.filesContainer)}}},_stringToRegExp:function(str){var parts=str.split("/"),modifiers=parts.pop();
parts.shift();return new RegExp(parts.join("/"),modifiers)},_initRegExpOptions:function(){var options=this.options;
if($.type(options.acceptFileTypes)==="string"){options.acceptFileTypes=this._stringToRegExp(options.acceptFileTypes)
}if($.type(options.previewSourceFileTypes)==="string"){options.previewSourceFileTypes=this._stringToRegExp(options.previewSourceFileTypes)
}},_initSpecialOptions:function(){this._super();this._initFilesContainer();this._initTemplates();this._initRegExpOptions()
},_setOption:function(key,value){this._super(key,value);if(key==="maxNumberOfFiles"){this._adjustMaxNumberOfFiles(0)
}},_create:function(){this._super();this._refreshOptionsList.push("filesContainer","uploadTemplateId","downloadTemplateId");
if(!this._processingQueue){this._processingQueue=$.Deferred().resolveWith(this).promise();this.process=function(){return this._processingQueue
}}this._resetFinishedDeferreds()},enable:function(){var wasDisabled=false;if(this.options.disabled){wasDisabled=true
}this._super();if(wasDisabled){this.element.find("input, button").prop("disabled",false);this._enableFileInputButton()
}},disable:function(){if(!this.options.disabled){this.element.find("input, button").prop("disabled",true);
this._disableFileInputButton()}this._super()}})}));(function(factory){if(typeof define==="function"&&define.amd){define(["jquery"],factory)
}else{factory(window.jQuery)}}(function($){var counter=0;$.ajaxTransport("iframe",function(options){if(options.async){var form,iframe,addParamChar;
return{send:function(_,completeCallback){form=$('<form style="display:none;"></form>');form.attr("accept-charset",options.formAcceptCharset);
addParamChar=/\?/.test(options.url)?"&":"?";if(options.type==="DELETE"){options.url=options.url+addParamChar+"_method=DELETE";
options.type="POST"}else{if(options.type==="PUT"){options.url=options.url+addParamChar+"_method=PUT";
options.type="POST"}else{if(options.type==="PATCH"){options.url=options.url+addParamChar+"_method=PATCH";
options.type="POST"}}}iframe=$('<iframe src="javascript:false;" name="iframe-transport-'+(counter+=1)+'"></iframe>').bind("load",function(){var fileInputClones,paramNames=$.isArray(options.paramName)?options.paramName:[options.paramName];
iframe.unbind("load").bind("load",function(){var response;try{response=iframe.contents();if(!response.length||!response[0].firstChild){throw new Error()
}}catch(e){response=undefined}completeCallback(200,"success",{"iframe":response});$('<iframe src="javascript:false;"></iframe>').appendTo(form);
form.remove()});form.prop("target",iframe.prop("name")).prop("action",options.url).prop("method",options.type);
if(options.formData){$.each(options.formData,function(index,field){$('<input type="hidden"/>').prop("name",field.name).val(field.value).appendTo(form)
})}if(options.fileInput&&options.fileInput.length&&options.type==="POST"){fileInputClones=options.fileInput.clone();
options.fileInput.after(function(index){return fileInputClones[index]});if(options.paramName){options.fileInput.each(function(index){$(this).prop("name",paramNames[index]||options.paramName)
})}form.append(options.fileInput).prop("enctype","multipart/form-data").prop("encoding","multipart/form-data")
}form.submit();if(fileInputClones&&fileInputClones.length){options.fileInput.each(function(index,input){var clone=$(fileInputClones[index]);
$(input).prop("name",clone.prop("name"));clone.replaceWith(input)})}});form.append(iframe).appendTo(document.body)
},abort:function(){if(iframe){iframe.unbind("load").prop("src","javascript".concat(":false;"))}if(form){form.remove()
}}}}});$.ajaxSetup({converters:{"iframe text":function(iframe){return iframe&&$(iframe[0].body).text()
},"iframe json":function(iframe){return iframe&&$.parseJSON($(iframe[0].body).text())},"iframe html":function(iframe){return iframe&&$(iframe[0].body).html()
},"iframe script":function(iframe){return iframe&&$.globalEval($(iframe[0].body).text())}}})}));(function(){this.MooTools={version:"1.4.5",build:"ab8ea8824dc3b24b6666867a2c4ed58ebb762cf0"};
var o=this.typeOf=function(i){if(i==null){return"null"}if(i.$family!=null){return i.$family()}if(i.nodeName){if(i.nodeType==1){return"element"
}if(i.nodeType==3){return(/\S/).test(i.nodeValue)?"textnode":"whitespace"}}else{if(typeof i.length=="number"){if(i.callee){return"arguments"
}if("item" in i){return"collection"}}}return typeof i};var j=this.instanceOf=function(t,i){if(t==null){return false
}var s=t.$constructor||t.constructor;while(s){if(s===i){return true}s=s.parent}if(!t.hasOwnProperty){return false
}return t instanceof i};var f=this.Function;var p=true;for(var k in {toString:1}){p=null}if(p){p=["hasOwnProperty","valueOf","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","constructor"]
}f.prototype.overloadSetter=function(s){var i=this;return function(u,t){if(u==null){return this}if(s||typeof u!="string"){for(var v in u){i.call(this,v,u[v])
}if(p){for(var w=p.length;w--;){v=p[w];if(u.hasOwnProperty(v)){i.call(this,v,u[v])}}}}else{i.call(this,u,t)
}return this}};f.prototype.overloadGetter=function(s){var i=this;return function(u){var v,t;if(typeof u!="string"){v=u
}else{if(arguments.length>1){v=arguments}else{if(s){v=[u]}}}if(v){t={};for(var w=0;w<v.length;w++){t[v[w]]=i.call(this,v[w])
}}else{t=i.call(this,u)}return t}};f.prototype.extend=function(i,s){this[i]=s}.overloadSetter();f.prototype.implement=function(i,s){this.prototype[i]=s
}.overloadSetter();var n=Array.prototype.slice;f.from=function(i){return(o(i)=="function")?i:function(){return i
}};Array.from=function(i){if(i==null){return[]}return(a.isEnumerable(i)&&typeof i!="string")?(o(i)=="array")?i:n.call(i):[i]
};Number.from=function(s){var i=parseFloat(s);return isFinite(i)?i:null};String.from=function(i){return i+""
};f.implement({hide:function(){this.$hidden=true;return this},protect:function(){this.$protected=true;
return this}});var a=this.Type=function(u,t){if(u){var s=u.toLowerCase();var i=function(v){return(o(v)==s)
};a["is"+u]=i;if(t!=null){t.prototype.$family=(function(){return s}).hide()}}if(t==null){return null}t.extend(this);
t.$constructor=a;t.prototype.$constructor=t;return t};var e=Object.prototype.toString;a.isEnumerable=function(i){return(i!=null&&typeof i.length=="number"&&e.call(i)!="[object Function]")
};var q={};var r=function(i){var s=o(i.prototype);return q[s]||(q[s]=[])};var b=function(t,x){if(x&&x.$hidden){return
}var s=r(this);for(var u=0;u<s.length;u++){var w=s[u];if(o(w)=="type"){b.call(w,t,x)}else{w.call(this,t,x)
}}var v=this.prototype[t];if(v==null||!v.$protected){this.prototype[t]=x}if(this[t]==null&&o(x)=="function"){m.call(this,t,function(i){return x.apply(i,n.call(arguments,1))
})}};var m=function(i,t){if(t&&t.$hidden){return}var s=this[i];if(s==null||!s.$protected){this[i]=t}};
a.implement({implement:b.overloadSetter(),extend:m.overloadSetter(),alias:function(i,s){b.call(this,i,this.prototype[s])
}.overloadSetter(),mirror:function(i){r(this).push(i);return this}});new a("Type",a);var d=function(s,x,v){var u=(x!=Object),B=x.prototype;
if(u){x=new a(s,x)}for(var y=0,w=v.length;y<w;y++){var C=v[y],A=x[C],z=B[C];if(A){A.protect()}if(u&&z){x.implement(C,z.protect())
}}if(u){var t=B.propertyIsEnumerable(v[0]);x.forEachMethod=function(G){if(!t){for(var F=0,D=v.length;
F<D;F++){G.call(B,B[v[F]],v[F])}}for(var E in B){G.call(B,B[E],E)}}}return d};d("String",String,["charAt","charCodeAt","concat","indexOf","lastIndexOf","match","quote","replace","search","slice","split","substr","substring","trim","toLowerCase","toUpperCase"])("Array",Array,["pop","push","reverse","shift","sort","splice","unshift","concat","join","slice","indexOf","lastIndexOf","filter","forEach","every","map","some","reduce","reduceRight"])("Number",Number,["toExponential","toFixed","toLocaleString","toPrecision"])("Function",f,["apply","call","bind"])("RegExp",RegExp,["exec","test"])("Object",Object,["create","defineProperty","defineProperties","keys","getPrototypeOf","getOwnPropertyDescriptor","getOwnPropertyNames","preventExtensions","isExtensible","seal","isSealed","freeze","isFrozen"])("Date",Date,["now"]);
Object.extend=m.overloadSetter();Date.extend("now",function(){return +(new Date)});new a("Boolean",Boolean);
Number.prototype.$family=function(){return isFinite(this)?"number":"null"}.hide();Number.extend("random",function(s,i){return Math.floor(Math.random()*(i-s+1)+s)
});var g=Object.prototype.hasOwnProperty;Object.extend("forEach",function(i,t,u){for(var s in i){if(g.call(i,s)){t.call(u,i[s],s,i)
}}});Object.each=Object.forEach;Array.implement({forEach:function(u,v){for(var t=0,s=this.length;t<s;
t++){if(t in this){u.call(v,this[t],t,this)}}},each:function(i,s){Array.forEach(this,i,s);return this
}});var l=function(i){switch(o(i)){case"array":return i.clone();case"object":return Object.clone(i);default:return i
}};Array.implement("clone",function(){var s=this.length,t=new Array(s);while(s--){t[s]=l(this[s])}return t
});var h=function(s,i,t){switch(o(t)){case"object":if(o(s[i])=="object"){Object.merge(s[i],t)}else{s[i]=Object.clone(t)
}break;case"array":s[i]=t.clone();break;default:s[i]=t}return s};Object.extend({merge:function(z,u,t){if(o(u)=="string"){return h(z,u,t)
}for(var y=1,s=arguments.length;y<s;y++){var w=arguments[y];for(var x in w){h(z,x,w[x])}}return z},clone:function(i){var t={};
for(var s in i){t[s]=l(i[s])}return t},append:function(w){for(var v=1,t=arguments.length;v<t;v++){var s=arguments[v]||{};
for(var u in s){w[u]=s[u]}}return w}});["Object","WhiteSpace","TextNode","Collection","Arguments"].each(function(i){new a(i)
});var c=Date.now();String.extend("uniqueID",function(){return(c++).toString(36)})})();Array.implement({every:function(c,d){for(var b=0,a=this.length>>>0;
b<a;b++){if((b in this)&&!c.call(d,this[b],b,this)){return false}}return true},filter:function(d,f){var c=[];
for(var e,b=0,a=this.length>>>0;b<a;b++){if(b in this){e=this[b];if(d.call(f,e,b,this)){c.push(e)}}}return c
},indexOf:function(c,d){var b=this.length>>>0;for(var a=(d<0)?Math.max(0,b+d):d||0;a<b;a++){if(this[a]===c){return a
}}return -1},map:function(c,e){var d=this.length>>>0,b=Array(d);for(var a=0;a<d;a++){if(a in this){b[a]=c.call(e,this[a],a,this)
}}return b},some:function(c,d){for(var b=0,a=this.length>>>0;b<a;b++){if((b in this)&&c.call(d,this[b],b,this)){return true
}}return false},clean:function(){return this.filter(function(a){return a!=null})},invoke:function(a){var b=Array.slice(arguments,1);
return this.map(function(c){return c[a].apply(c,b)})},associate:function(c){var d={},b=Math.min(this.length,c.length);
for(var a=0;a<b;a++){d[c[a]]=this[a]}return d},link:function(c){var a={};for(var e=0,b=this.length;e<b;
e++){for(var d in c){if(c[d](this[e])){a[d]=this[e];delete c[d];break}}}return a},contains:function(a,b){return this.indexOf(a,b)!=-1
},append:function(a){this.push.apply(this,a);return this},getLast:function(){return(this.length)?this[this.length-1]:null
},getRandom:function(){return(this.length)?this[Number.random(0,this.length-1)]:null},include:function(a){if(!this.contains(a)){this.push(a)
}return this},combine:function(c){for(var b=0,a=c.length;b<a;b++){this.include(c[b])}return this},erase:function(b){for(var a=this.length;
a--;){if(this[a]===b){this.splice(a,1)}}return this},empty:function(){this.length=0;return this},flatten:function(){var d=[];
for(var b=0,a=this.length;b<a;b++){var c=typeOf(this[b]);if(c=="null"){continue}d=d.concat((c=="array"||c=="collection"||c=="arguments"||instanceOf(this[b],Array))?Array.flatten(this[b]):this[b])
}return d},pick:function(){for(var b=0,a=this.length;b<a;b++){if(this[b]!=null){return this[b]}}return null
},hexToRgb:function(b){if(this.length!=3){return null}var a=this.map(function(c){if(c.length==1){c+=c
}return c.toInt(16)});return(b)?a:"rgb("+a+")"},rgbToHex:function(d){if(this.length<3){return null}if(this.length==4&&this[3]==0&&!d){return"transparent"
}var b=[];for(var a=0;a<3;a++){var c=(this[a]-0).toString(16);b.push((c.length==1)?"0"+c:c)}return(d)?b:"#"+b.join("")
}});String.implement({test:function(a,b){return((typeOf(a)=="regexp")?a:new RegExp(""+a,b)).test(this)
},contains:function(a,b){return(b)?(b+this+b).indexOf(b+a+b)>-1:String(this).indexOf(a)>-1},trim:function(){return String(this).replace(/^\s+|\s+$/g,"")
},clean:function(){return String(this).replace(/\s+/g," ").trim()},camelCase:function(){return String(this).replace(/-\D/g,function(a){return a.charAt(1).toUpperCase()
})},hyphenate:function(){return String(this).replace(/[A-Z]/g,function(a){return("-"+a.charAt(0).toLowerCase())
})},capitalize:function(){return String(this).replace(/\b[a-z]/g,function(a){return a.toUpperCase()})
},escapeRegExp:function(){return String(this).replace(/([-.*+?^${}()|[\]\/\\])/g,"\\$1")},toInt:function(a){return parseInt(this,a||10)
},toFloat:function(){return parseFloat(this)},hexToRgb:function(b){var a=String(this).match(/^#?(\w{1,2})(\w{1,2})(\w{1,2})$/);
return(a)?a.slice(1).hexToRgb(b):null},rgbToHex:function(b){var a=String(this).match(/\d{1,3}/g);return(a)?a.rgbToHex(b):null
},substitute:function(a,b){return String(this).replace(b||(/\\?\{([^{}]+)\}/g),function(d,c){if(d.charAt(0)=="\\"){return d.slice(1)
}return(a[c]!=null)?a[c]:""})}});Number.implement({limit:function(b,a){return Math.min(a,Math.max(b,this))
},round:function(a){a=Math.pow(10,a||0).toFixed(a<0?-a:0);return Math.round(this*a)/a},times:function(b,c){for(var a=0;
a<this;a++){b.call(c,a,this)}},toFloat:function(){return parseFloat(this)},toInt:function(a){return parseInt(this,a||10)
}});Number.alias("each","times");(function(b){var a={};b.each(function(c){if(!Number[c]){a[c]=function(){return Math[c].apply(null,[this].concat(Array.from(arguments)))
}}});Number.implement(a)})(["abs","acos","asin","atan","atan2","ceil","cos","exp","floor","log","max","min","pow","sin","sqrt","tan"]);
Function.extend({attempt:function(){for(var b=0,a=arguments.length;b<a;b++){try{return arguments[b]()
}catch(c){}}return null}});Function.implement({attempt:function(a,c){try{return this.apply(c,Array.from(a))
}catch(b){}return null},bind:function(e){var a=this,b=arguments.length>1?Array.slice(arguments,1):null,d=function(){};
var c=function(){var g=e,h=arguments.length;if(this instanceof c){d.prototype=a.prototype;g=new d}var f=(!b&&!h)?a.call(g):a.apply(g,b&&h?b.concat(Array.slice(arguments)):b||arguments);
return g==e?f:g};return c},pass:function(b,c){var a=this;if(b!=null){b=Array.from(b)}return function(){return a.apply(c,b||arguments)
}},delay:function(b,c,a){return setTimeout(this.pass((a==null?[]:a),c),b)},periodical:function(c,b,a){return setInterval(this.pass((a==null?[]:a),b),c)
}});(function(){var a=Object.prototype.hasOwnProperty;Object.extend({subset:function(d,g){var f={};for(var e=0,b=g.length;
e<b;e++){var c=g[e];if(c in d){f[c]=d[c]}}return f},map:function(b,e,f){var d={};for(var c in b){if(a.call(b,c)){d[c]=e.call(f,b[c],c,b)
}}return d},filter:function(b,e,g){var d={};for(var c in b){var f=b[c];if(a.call(b,c)&&e.call(g,f,c,b)){d[c]=f
}}return d},every:function(b,d,e){for(var c in b){if(a.call(b,c)&&!d.call(e,b[c],c)){return false}}return true
},some:function(b,d,e){for(var c in b){if(a.call(b,c)&&d.call(e,b[c],c)){return true}}return false},keys:function(b){var d=[];
for(var c in b){if(a.call(b,c)){d.push(c)}}return d},values:function(c){var b=[];for(var d in c){if(a.call(c,d)){b.push(c[d])
}}return b},getLength:function(b){return Object.keys(b).length},keyOf:function(b,d){for(var c in b){if(a.call(b,c)&&b[c]===d){return c
}}return null},contains:function(b,c){return Object.keyOf(b,c)!=null},toQueryString:function(b,c){var d=[];
Object.each(b,function(h,g){if(c){g=c+"["+g+"]"}var f;switch(typeOf(h)){case"object":f=Object.toQueryString(h,g);
break;case"array":var e={};h.each(function(k,j){e[j]=k});f=Object.toQueryString(e,g);break;default:f=g+"="+encodeURIComponent(h)
}if(h!=null){d.push(f)}});return d.join("&")}})})();(function(){var j=this.document;var g=j.window=this;
var a=navigator.userAgent.toLowerCase(),b=navigator.platform.toLowerCase(),h=a.match(/(opera|ie|firefox|chrome|version)[\s\/:]([\w\d\.]+)?.*?(safari|version[\s\/:]([\w\d\.]+)|$)/)||[null,"unknown",0],d=h[1]=="ie"&&j.documentMode;
var n=this.Browser={extend:Function.prototype.extend,name:(h[1]=="version")?h[3]:h[1],version:d||parseFloat((h[1]=="opera"&&h[4])?h[4]:h[2]),Platform:{name:a.match(/ip(?:ad|od|hone)/)?"ios":(a.match(/(?:webos|android)/)||b.match(/mac|win|linux/)||["other"])[0]},Features:{xpath:!!(j.evaluate),air:!!(g.runtime),query:!!(j.querySelector),json:!!(g.JSON)},Plugins:{}};
n[n.name]=true;n[n.name+parseInt(n.version,10)]=true;n.Platform[n.Platform.name]=true;n.Request=(function(){var p=function(){return new XMLHttpRequest()
};var o=function(){return new ActiveXObject("MSXML2.XMLHTTP")};var e=function(){return new ActiveXObject("Microsoft.XMLHTTP")
};return Function.attempt(function(){p();return p},function(){o();return o},function(){e();return e})
})();n.Features.xhr=!!(n.Request);var i=(Function.attempt(function(){return navigator.plugins["Shockwave Flash"].description
},function(){return new ActiveXObject("ShockwaveFlash.ShockwaveFlash").GetVariable("$version")})||"0 r0").match(/\d+/g);
n.Plugins.Flash={version:Number(i[0]||"0."+i[1])||0,build:Number(i[2])||0};n.exec=function(o){if(!o){return o
}if(g.execScript){g.execScript(o)}else{var e=j.createElement("script");e.setAttribute("type","text/javascript");
e.text=o;j.head.appendChild(e);j.head.removeChild(e)}return o};String.implement("stripScripts",function(o){var e="";
var p=this.replace(/<script[^>]*>([\s\S]*?)<\/script>/gi,function(q,r){e+=r+"\n";return""});if(o===true){n.exec(e)
}else{if(typeOf(o)=="function"){o(e,p)}}return p});n.extend({Document:this.Document,Window:this.Window,Element:this.Element,Event:this.Event});
this.Window=this.$constructor=new Type("Window",function(){});this.$family=Function.from("window").hide();
Window.mirror(function(e,o){g[e]=o});this.Document=j.$constructor=new Type("Document",function(){});j.$family=Function.from("document").hide();
Document.mirror(function(e,o){j[e]=o});j.html=j.documentElement;if(!j.head){j.head=j.getElementsByTagName("head")[0]
}if(j.execCommand){try{j.execCommand("BackgroundImageCache",false,true)}catch(f){}}if(this.attachEvent&&!this.addEventListener){var c=function(){this.detachEvent("onunload",c);
j.head=j.html=j.window=null};this.attachEvent("onunload",c)}var l=Array.from;try{l(j.html.childNodes)
}catch(f){Array.from=function(o){if(typeof o!="string"&&Type.isEnumerable(o)&&typeOf(o)!="array"){var e=o.length,p=new Array(e);
while(e--){p[e]=o[e]}return p}return l(o)};var k=Array.prototype,m=k.slice;["pop","push","reverse","shift","sort","splice","unshift","concat","join","slice"].each(function(e){var o=k[e];
Array[e]=function(p){return o.apply(Array.from(p),m.call(arguments,1))}})}})();(function(){var a=this.Class=new Type("Class",function(h){if(instanceOf(h,Function)){h={initialize:h}
}var g=function(){e(this);if(g.$prototyping){return this}this.$caller=null;var i=(this.initialize)?this.initialize.apply(this,arguments):this;
this.$caller=this.caller=null;return i}.extend(this).implement(h);g.$constructor=a;g.prototype.$constructor=g;
g.prototype.parent=c;return g});var c=function(){if(!this.$caller){throw new Error('The method "parent" cannot be called.')
}var g=this.$caller.$name,h=this.$caller.$owner.parent,i=(h)?h.prototype[g]:null;if(!i){throw new Error('The method "'+g+'" has no parent.')
}return i.apply(this,arguments)};var e=function(g){for(var h in g){var j=g[h];switch(typeOf(j)){case"object":var i=function(){};
i.prototype=j;g[h]=e(new i);break;case"array":g[h]=j.clone();break}}return g};var b=function(g,h,j){if(j.$origin){j=j.$origin
}var i=function(){if(j.$protected&&this.$caller==null){throw new Error('The method "'+h+'" cannot be called.')
}var l=this.caller,m=this.$caller;this.caller=m;this.$caller=i;var k=j.apply(this,arguments);this.$caller=m;
this.caller=l;return k}.extend({$owner:g,$origin:j,$name:h});return i};var f=function(h,i,g){if(a.Mutators.hasOwnProperty(h)){i=a.Mutators[h].call(this,i);
if(i==null){return this}}if(typeOf(i)=="function"){if(i.$hidden){return this}this.prototype[h]=(g)?i:b(this,h,i)
}else{Object.merge(this.prototype,h,i)}return this};var d=function(g){g.$prototyping=true;var h=new g;
delete g.$prototyping;return h};a.implement("implement",f.overloadSetter());a.Mutators={Extends:function(g){this.parent=g;
this.prototype=d(g)},Implements:function(g){Array.from(g).each(function(j){var h=new j;for(var i in h){f.call(this,i,h[i],true)
}},this)}}})();(function(){this.Chain=new Class({$chain:[],chain:function(){this.$chain.append(Array.flatten(arguments));
return this},callChain:function(){return(this.$chain.length)?this.$chain.shift().apply(this,arguments):false
},clearChain:function(){this.$chain.empty();return this}});var a=function(b){return b.replace(/^on([A-Z])/,function(c,d){return d.toLowerCase()
})};this.Events=new Class({$events:{},addEvent:function(d,c,b){d=a(d);this.$events[d]=(this.$events[d]||[]).include(c);
if(b){c.internal=true}return this},addEvents:function(b){for(var c in b){this.addEvent(c,b[c])}return this
},fireEvent:function(e,c,b){e=a(e);var d=this.$events[e];if(!d){return this}c=Array.from(c);d.each(function(f){if(b){f.delay(b,this,c)
}else{f.apply(this,c)}},this);return this},removeEvent:function(e,d){e=a(e);var c=this.$events[e];if(c&&!d.internal){var b=c.indexOf(d);
if(b!=-1){delete c[b]}}return this},removeEvents:function(d){var e;if(typeOf(d)=="object"){for(e in d){this.removeEvent(e,d[e])
}return this}if(d){d=a(d)}for(e in this.$events){if(d&&d!=e){continue}var c=this.$events[e];for(var b=c.length;
b--;){if(b in c){this.removeEvent(e,c[b])}}}return this}});this.Options=new Class({setOptions:function(){var b=this.options=Object.merge.apply(null,[{},this.options].append(arguments));
if(this.addEvent){for(var c in b){if(typeOf(b[c])!="function"||!(/^on[A-Z]/).test(c)){continue}this.addEvent(c,b[c]);
delete b[c]}}return this}})})();(function(){if(!window.attachEvent){return}var doc=document;var g=window.PIE;
if(!g){g=window.PIE={F:"-pie-",Sa:"Pie",Pa:"pie_",Jb:{TD:1,TH:1}};try{doc.execCommand("BackgroundImageCache",false,true)
}catch(L){}g.J=function(){for(var a=4,b=doc.createElement("div"),c=b.getElementsByTagName("i");b.innerHTML="<!--[if gt IE "+ ++a+"]><i></i><![endif]-->",c[0];
){}return a}();if(g.J===6){g.F=g.F.replace(/^-/,"")}g.Ab=doc.documentMode||g.J;(function(){var a,b=0,c={};
g.p={Ga:function(e){if(!a){a=doc.createDocumentFragment();a.namespaces.add("css3vml","urn:schemas-microsoft-com:vml")
}return a.createElement("css3vml:"+e)},ta:function(e){return e&&e._pieId||(e._pieId=++b)},fb:function(e){var f,h,j,d,i=arguments;
f=1;for(h=i.length;f<h;f++){d=i[f];for(j in d){if(d.hasOwnProperty(j)){e[j]=d[j]}}}return e},Pb:function(e,f,h){var j=c[e],d,i;
if(j){Object.prototype.toString.call(j)==="[object Array]"?j.push([f,h]):f.call(h,j)}else{i=c[e]=[[f,h]];
d=new Image;d.onload=function(){j=c[e]={i:d.width,f:d.height};for(var k=0,m=i.length;k<m;k++){i[k][0].call(i[k][1],j)
}d.onload=null};d.src=e}}}})();g.ia=function(){this.hb=[];this.Db={}};g.ia.prototype={aa:function(a){var b=g.p.ta(a),c=this.Db,e=this.hb;
if(!(b in c)){c[b]=e.length;e.push(a)}},Ma:function(a){a=g.p.ta(a);var b=this.Db;if(a&&a in b){delete this.hb[b[a]];
delete b[a]}},Ia:function(){for(var a=this.hb,b=a.length;b--;){a[b]&&a[b]()}}};g.ya=new g.ia;g.ya.Tc=function(){var a=this;
if(!a.Uc){setInterval(function(){a.Ia()},250);a.Uc=1}};g.G=new g.ia;window.attachEvent("onbeforeunload",function(){g.G.Ia()
});g.G.Ea=function(a,b,c){a.attachEvent(b,c);this.aa(function(){a.detachEvent(b,c)})};(function(){function a(){g.za.Ia()
}g.za=new g.ia;g.G.Ea(window,"onresize",a)})();(function(){function a(){g.Ra.Ia()}g.Ra=new g.ia;g.G.Ea(window,"onscroll",a);
g.za.aa(a)})();(function(){function a(){c=g.Qa.wc()}function b(){if(c){for(var e=0,f=c.length;e<f;e++){g.attach(c[e])
}c=0}}var c;g.G.Ea(window,"onbeforeprint",a);g.G.Ea(window,"onafterprint",b)})();g.hd=function(){function a(i){this.V=i
}var b=doc.createElement("length-calc"),c=doc.documentElement,e=b.style,f={},h=["mm","cm","in","pt","pc"],j=h.length,d={};
e.position="absolute";e.top=e.left="-9999px";for(c.appendChild(b);j--;){b.style.width="100"+h[j];f[h[j]]=b.offsetWidth/100
}c.removeChild(b);a.prototype={ib:/(px|em|ex|mm|cm|in|pt|pc|%)$/,vb:function(){var i=this.Lc;if(i===void 0){i=this.Lc=parseFloat(this.V)
}return i},ab:function(){var i=this.ad;if(!i){i=this.ad=(i=this.V.match(this.ib))&&i[0]||"px"}return i
},a:function(i,k){var m=this.vb(),l=this.ab();switch(l){case"px":return m;case"%":return m*(typeof k==="function"?k():k)/100;
case"em":return m*this.tb(i);case"ex":return m*this.tb(i)/2;default:return m*f[l]}},tb:function(i){var k=i.currentStyle.fontSize;
if(k.indexOf("px")>0){return parseFloat(k)}else{b.style.width="1em";i.appendChild(b);k=b.offsetWidth;
b.parentNode===i&&i.removeChild(b);return k}}};g.k=function(i){return d[i]||(d[i]=new a(i))};return a
}();g.Na=function(){function a(f){this.U=f}var b=g.k("50%"),c={top:1,center:1,bottom:1},e={left:1,center:1,right:1};
a.prototype={Dc:function(){if(!this.sb){var f=this.U,h=f.length,j=g.u,d=j.ja,i=g.k("0");d=d.fa;i=["left",i,"top",i];
if(h===1){f.push(new j.Ta(d,"center"));h++}if(h===2){d&(f[0].h|f[1].h)&&f[0].d in c&&f[1].d in e&&f.push(f.shift());
if(f[0].h&d){if(f[0].d==="center"){i[1]=b}else{i[0]=f[0].d}}else{if(f[0].Y()){i[1]=g.k(f[0].d)}}if(f[1].h&d){if(f[1].d==="center"){i[3]=b
}else{i[2]=f[1].d}}else{if(f[1].Y()){i[3]=g.k(f[1].d)}}}this.sb=i}return this.sb},coords:function(f,h,j){var d=this.Dc(),i=d[1].a(f,h);
f=d[3].a(f,j);return{x:d[0]==="right"?h-i:i,y:d[2]==="bottom"?j-f:f}}};return a}();g.Rb=function(){function a(b){this.V=b
}a.prototype={ib:/[a-z]+$/i,ab:function(){return this.lc||(this.lc=this.V.match(this.ib)[0].toLowerCase())
},vc:function(){var b=this.fc,c;if(b===undefined){b=this.ab();c=parseFloat(this.V,10);b=this.fc=b==="deg"?c:b==="rad"?c/Math.PI*180:b==="grad"?c/400*360:b==="turn"?c*360:0
}return b}};return a}();g.$b=function(){function a(c){this.V=c}var b={};a.Sc=/\s*rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d+|\d*\.\d+)\s*\)\s*/;
a.gb={aliceblue:"F0F8FF",antiquewhite:"FAEBD7",aqua:"0FF",aquamarine:"7FFFD4",azure:"F0FFFF",beige:"F5F5DC",bisque:"FFE4C4",black:"000",blanchedalmond:"FFEBCD",blue:"00F",blueviolet:"8A2BE2",brown:"A52A2A",burlywood:"DEB887",cadetblue:"5F9EA0",chartreuse:"7FFF00",chocolate:"D2691E",coral:"FF7F50",cornflowerblue:"6495ED",cornsilk:"FFF8DC",crimson:"DC143C",cyan:"0FF",darkblue:"00008B",darkcyan:"008B8B",darkgoldenrod:"B8860B",darkgray:"A9A9A9",darkgreen:"006400",darkkhaki:"BDB76B",darkmagenta:"8B008B",darkolivegreen:"556B2F",darkorange:"FF8C00",darkorchid:"9932CC",darkred:"8B0000",darksalmon:"E9967A",darkseagreen:"8FBC8F",darkslateblue:"483D8B",darkslategray:"2F4F4F",darkturquoise:"00CED1",darkviolet:"9400D3",deeppink:"FF1493",deepskyblue:"00BFFF",dimgray:"696969",dodgerblue:"1E90FF",firebrick:"B22222",floralwhite:"FFFAF0",forestgreen:"228B22",fuchsia:"F0F",gainsboro:"DCDCDC",ghostwhite:"F8F8FF",gold:"FFD700",goldenrod:"DAA520",gray:"808080",green:"008000",greenyellow:"ADFF2F",honeydew:"F0FFF0",hotpink:"FF69B4",indianred:"CD5C5C",indigo:"4B0082",ivory:"FFFFF0",khaki:"F0E68C",lavender:"E6E6FA",lavenderblush:"FFF0F5",lawngreen:"7CFC00",lemonchiffon:"FFFACD",lightblue:"ADD8E6",lightcoral:"F08080",lightcyan:"E0FFFF",lightgoldenrodyellow:"FAFAD2",lightgreen:"90EE90",lightgrey:"D3D3D3",lightpink:"FFB6C1",lightsalmon:"FFA07A",lightseagreen:"20B2AA",lightskyblue:"87CEFA",lightslategray:"789",lightsteelblue:"B0C4DE",lightyellow:"FFFFE0",lime:"0F0",limegreen:"32CD32",linen:"FAF0E6",magenta:"F0F",maroon:"800000",mediumauqamarine:"66CDAA",mediumblue:"0000CD",mediumorchid:"BA55D3",mediumpurple:"9370D8",mediumseagreen:"3CB371",mediumslateblue:"7B68EE",mediumspringgreen:"00FA9A",mediumturquoise:"48D1CC",mediumvioletred:"C71585",midnightblue:"191970",mintcream:"F5FFFA",mistyrose:"FFE4E1",moccasin:"FFE4B5",navajowhite:"FFDEAD",navy:"000080",oldlace:"FDF5E6",olive:"808000",olivedrab:"688E23",orange:"FFA500",orangered:"FF4500",orchid:"DA70D6",palegoldenrod:"EEE8AA",palegreen:"98FB98",paleturquoise:"AFEEEE",palevioletred:"D87093",papayawhip:"FFEFD5",peachpuff:"FFDAB9",peru:"CD853F",pink:"FFC0CB",plum:"DDA0DD",powderblue:"B0E0E6",purple:"800080",red:"F00",rosybrown:"BC8F8F",royalblue:"4169E1",saddlebrown:"8B4513",salmon:"FA8072",sandybrown:"F4A460",seagreen:"2E8B57",seashell:"FFF5EE",sienna:"A0522D",silver:"C0C0C0",skyblue:"87CEEB",slateblue:"6A5ACD",slategray:"708090",snow:"FFFAFA",springgreen:"00FF7F",steelblue:"4682B4",tan:"D2B48C",teal:"008080",thistle:"D8BFD8",tomato:"FF6347",turquoise:"40E0D0",violet:"EE82EE",wheat:"F5DEB3",white:"FFF",whitesmoke:"F5F5F5",yellow:"FF0",yellowgreen:"9ACD32"};
a.prototype={parse:function(){if(!this.Ca){var c=this.V,e;if(e=c.match(a.Sc)){this.Ca="rgb("+e[1]+","+e[2]+","+e[3]+")";
this.qb=parseFloat(e[4])}else{if((e=c.toLowerCase()) in a.gb){c="#"+a.gb[e]}this.Ca=c;this.qb=c==="transparent"?0:1
}}},O:function(c){this.parse();return this.Ca==="currentColor"?c.currentStyle.color:this.Ca},la:function(){this.parse();
return this.qb}};g.pa=function(c){return b[c]||(b[c]=new a(c))};return a}();g.u=function(){function a(c){this.Ha=c;
this.ch=0;this.U=[];this.wa=0}var b=a.ja={xa:1,ob:2,ea:4,ac:8,pb:16,fa:32,A:64,ga:128,ha:256,Aa:512,dc:1024,URL:2048};
a.Ta=function(c,e){this.h=c;this.d=e};a.Ta.prototype={db:function(){return this.h&b.A||this.h&b.ga&&this.d==="0"
},Y:function(){return this.db()||this.h&b.Aa}};a.prototype={dd:/\s/,Mc:/^[\+\-]?(\d*\.)?\d+/,url:/^url\(\s*("([^"]*)"|'([^']*)'|([!#$%&*-~]*))\s*\)/i,zb:/^\-?[_a-z][\w-]*/i,Yc:/^("([^"]*)"|'([^']*)')/,Fc:/^#([\da-f]{6}|[\da-f]{3})/i,bd:{px:b.A,em:b.A,ex:b.A,mm:b.A,cm:b.A,"in":b.A,pt:b.A,pc:b.A,deg:b.xa,rad:b.xa,grad:b.xa},sc:{rgb:1,rgba:1,hsl:1,hsla:1},next:function(c){function e(t,n){t=new a.Ta(t,n);
if(!c){k.U.push(t);k.wa++}return t}function f(){k.wa++;return null}var h,j,d,i,k=this;if(this.wa<this.U.length){return this.U[this.wa++]
}for(;this.dd.test(this.Ha.charAt(this.ch));){this.ch++}if(this.ch>=this.Ha.length){return f()}j=this.ch;
h=this.Ha.substring(this.ch);d=h.charAt(0);switch(d){case"#":if(i=h.match(this.Fc)){this.ch+=i[0].length;
return e(b.ea,i[0])}break;case'"':case"'":if(i=h.match(this.Yc)){this.ch+=i[0].length;return e(b.dc,i[2]||i[3]||"")
}break;case"/":case",":this.ch++;return e(b.ha,d);case"u":if(i=h.match(this.url)){this.ch+=i[0].length;
return e(b.URL,i[2]||i[3]||i[4]||"")}}if(i=h.match(this.Mc)){d=i[0];this.ch+=d.length;if(h.charAt(d.length)==="%"){this.ch++;
return e(b.Aa,d+"%")}if(i=h.substring(d.length).match(this.zb)){d+=i[0];this.ch+=i[0].length;return e(this.bd[i[0].toLowerCase()]||b.ac,d)
}return e(b.ga,d)}if(i=h.match(this.zb)){d=i[0];this.ch+=d.length;if(d.toLowerCase() in g.$b.gb||d==="currentColor"){return e(b.ea,d)
}if(h.charAt(d.length)==="("){this.ch++;if(d.toLowerCase() in this.sc){h=function(t){return t&&t.h&b.ga
};i=function(t){return t&&t.h&(b.ga|b.Aa)};var m=function(t,n){return t&&t.d===n},l=function(){return k.next(1)
};if((d.charAt(0)==="r"?i(l()):h(l()))&&m(l(),",")&&i(l())&&m(l(),",")&&i(l())&&(d==="rgb"||d==="hsa"||m(l(),",")&&h(l()))&&m(l(),")")){return e(b.ea,this.Ha.substring(j,this.ch))
}return f()}return e(b.pb,d)}return e(b.fa,d)}this.ch++;return e(b.ob,d)},z:function(){return this.U[this.wa---2]
},all:function(){for(;this.next();){}return this.U},da:function(c,e){for(var f=[],h,j;h=this.next();){if(c(h)){j=true;
this.z();break}f.push(h)}return e&&!j?null:f}};return a}();var M=function(a){this.e=a};M.prototype={K:0,Qc:function(){var a=this.Ua,b;
return !a||(b=this.o())&&(a.x!==b.x||a.y!==b.y)},Vc:function(){var a=this.Ua,b;return !a||(b=this.o())&&(a.i!==b.i||a.f!==b.f)
},ub:function(){var a=this.e.getBoundingClientRect();return{x:a.left,y:a.top,i:a.right-a.left,f:a.bottom-a.top}
},o:function(){return this.K?this.Da||(this.Da=this.ub()):this.ub()},Ec:function(){return !!this.Ua},Ja:function(){++this.K
},La:function(){if(!--this.K){if(this.Da){this.Ua=this.Da}this.Da=null}}};(function(){function a(b){var c=g.p.ta(b);
return function(){if(this.K){var e=this.rb||(this.rb={});return c in e?e[c]:(e[c]=b.call(this))}else{return b.call(this)
}}}g.s={K:0,$:function(b){function c(e){this.e=e}g.p.fb(c.prototype,g.s,b);c.kc={};return c},m:function(){var b=this.qa(),c=this.constructor.kc;
return b?b in c?c[b]:(c[b]=this.ba(b)):null},qa:a(function(){var b=this.e,c=this.constructor,e=b.style;
b=b.currentStyle;var f=this.na,h=this.va,j=c.ic||(c.ic=g.F+f);c=c.jc||(c.jc=g.Sa+h.charAt(0).toUpperCase()+h.substring(1));
return e[c]||b.getAttribute(j)||e[h]||b.getAttribute(f)}),g:a(function(){return !!this.m()}),D:a(function(){var b=this.qa(),c=b!==this.gc;
this.gc=b;return c}),ma:a,Ja:function(){++this.K},La:function(){--this.K||delete this.rb}}})();g.Tb=g.s.$({na:g.F+"background",va:g.Sa+"Background",nc:{scroll:1,fixed:1,local:1},Ka:{"repeat-x":1,"repeat-y":1,repeat:1,"no-repeat":1},Nc:{"padding-box":1,"border-box":1,"content-box":1},rc:{"padding-box":1,"border-box":1},Rc:{top:1,right:1,bottom:1,left:1,center:1},Wc:{contain:1,cover:1},ba:function(a){function b(u){return u.Y()||u.h&i&&u.d in t
}function c(u){return u.Y()&&g.k(u.d)||u.d==="auto"&&"auto"}var e=this.e.currentStyle,f,h,j=g.u.ja,d=j.ha,i=j.fa,k=j.ea,m,l,t=this.Rc,n,p,s=null;
if(this.$a()){a=new g.u(a);s={M:[]};for(h={};f=a.next();){m=f.h;l=f.d;if(!h.P&&m&j.pb&&l==="linear-gradient"){n={ca:[],P:l};
for(p={};f=a.next();){m=f.h;l=f.d;if(m&j.ob&&l===")"){p.color&&n.ca.push(p);n.ca.length>1&&g.p.fb(h,n);
break}if(m&k){if(n.Xa||n.bb){f=a.z();if(f.h!==d){break}a.next()}p={color:g.pa(l)};f=a.next();if(f.Y()){p.Fb=g.k(f.d)
}else{a.z()}}else{if(m&j.xa&&!n.Xa&&!p.color&&!n.ca.length){n.Xa=new g.Rb(f.d)}else{if(b(f)&&!n.bb&&!p.color&&!n.ca.length){a.z();
n.bb=new g.Na(a.da(function(u){return !b(u)},false))}else{if(m&d&&l===","){if(p.color){n.ca.push(p);p={}
}}else{break}}}}}}else{if(!h.P&&m&j.URL){h.Cb=l;h.P="image"}else{if(b(f)&&!h.size){a.z();h.Ya=new g.Na(a.da(function(u){return !b(u)
},false))}else{if(m&i){if(l in this.Ka){h.Bb=l}else{if(l in this.Nc){h.kd=l;if(l in this.rc){h.clip=l
}}else{if(l in this.nc){h.jd=l}}}}else{if(m&k&&!s.color){s.color=g.pa(l)}else{if(m&d){if(l==="/"){f=a.next();
m=f.h;l=f.d;if(m&i&&l in this.Wc){h.size=l}else{if(l=c(f)){h.size={i:l,f:c(a.next())||a.z()&&l}}}}else{if(l===","&&h.P){s.M.push(h);
h={}}}}else{return null}}}}}}}h.P&&s.M.push(h)}else{this.Nb(function(){var u=e.backgroundPositionX,w=e.backgroundPositionY,r=e.backgroundImage,o=e.backgroundColor;
s={};if(o!=="transparent"){s.color=g.pa(o)}if(r!=="none"){s.M=[{P:"image",Cb:(new g.u(r)).next().d,Bb:e.backgroundRepeat,Ya:new g.Na((new g.u(u+" "+w)).all())}]
}})}return s&&(s.color||s.M&&s.M[0])?s:null},Nb:function(a){var b=this.e.runtimeStyle,c=b.backgroundImage,e=b.backgroundColor;
if(c){b.backgroundImage=""}if(e){b.backgroundColor=""}a=a.call(this);if(c){b.backgroundImage=c}if(e){b.backgroundColor=e
}return a},qa:g.s.ma(function(){return this.$a()||this.Nb(function(){var a=this.e.currentStyle;return a.backgroundColor+" "+a.backgroundImage+" "+a.backgroundRepeat+" "+a.backgroundPositionX+" "+a.backgroundPositionY
})}),$a:g.s.ma(function(){var a=this.e;return a.style[this.va]||a.currentStyle.getAttribute(this.na)}),Eb:function(){var a=0;
if(g.J<7){a=this.e;a=""+(a.style[g.Sa+"PngFix"]||a.currentStyle.getAttribute(g.F+"png-fix"))==="true"
}return a},g:g.s.ma(function(){return(this.$a()||this.Eb())&&!!this.m()})});g.Xb=g.s.$({Ib:["Top","Right","Bottom","Left"],Kc:{thin:"1px",medium:"3px",thick:"5px"},ba:function(){var a={},b={},c={},e=false,f=true,h=true,j=true;
this.Ob(function(){for(var d=this.e.currentStyle,i=0,k,m,l,t,n,p,s;i<4;i++){l=this.Ib[i];s=l.charAt(0).toLowerCase();
k=b[s]=d["border"+l+"Style"];m=d["border"+l+"Color"];l=d["border"+l+"Width"];if(i>0){if(k!==t){h=false
}if(m!==n){f=false}if(l!==p){j=false}}t=k;n=m;p=l;c[s]=g.pa(m);l=a[s]=g.k(b[s]==="none"?"0":this.Kc[l]||l);
if(l.a(this.e)>0){e=true}}});return e?{nb:a,Zc:b,tc:c,ed:j,uc:f,$c:h}:null},qa:g.s.ma(function(){var a=this.e,b=a.currentStyle,c;
a.tagName in g.Jb&&a.offsetParent.currentStyle.borderCollapse==="collapse"||this.Ob(function(){c=b.borderWidth+"|"+b.borderStyle+"|"+b.borderColor
});return c}),Ob:function(a){var b=this.e.runtimeStyle,c=b.borderWidth,e=b.borderColor;if(c){b.borderWidth=""
}if(e){b.borderColor=""}a=a.call(this);if(c){b.borderWidth=c}if(e){b.borderColor=e}return a}});(function(){g.Oa=g.s.$({na:"border-radius",va:"borderRadius",ba:function(b){var c=null,e,f,h,j,d=false;
if(b){f=new g.u(b);var i=function(){for(var k=[],m;(h=f.next())&&h.Y();){j=g.k(h.d);m=j.vb();if(m<0){return null
}if(m>0){d=true}k.push(j)}return k.length>0&&k.length<5?{tl:k[0],tr:k[1]||k[0],br:k[2]||k[0],bl:k[3]||k[1]||k[0]}:null
};if(b=i()){if(h){if(h.h&g.u.ja.ha&&h.d==="/"){e=i()}}else{e=b}if(d&&b&&e){c={x:b,y:e}}}}return c}});
var a=g.k("0");a={tl:a,tr:a,br:a,bl:a};g.Oa.Qb={x:a,y:a}})();g.Vb=g.s.$({na:"border-image",va:"borderImage",Ka:{stretch:1,round:1,repeat:1,space:1},ba:function(a){var b=null,c,e,f,h,j,d,i=0,k,m=g.u.ja,l=m.fa,t=m.ga,n=m.A,p=m.Aa;
if(a){c=new g.u(a);b={};for(var s=function(r){return r&&r.h&m.ha&&r.d==="/"},u=function(r){return r&&r.h&l&&r.d==="fill"
},w=function(){h=c.da(function(r){return !(r.h&(t|p))});if(u(c.next())&&!b.fill){b.fill=true}else{c.z()
}if(s(c.next())){i++;j=c.da(function(){return !(e.h&(t|p|n))&&!(e.h&l&&e.d==="auto")});if(s(c.next())){i++;
d=c.da(function(){return !(e.h&(t|n))})}}else{c.z()}};e=c.next();){a=e.h;f=e.d;if(a&(t|p)&&!h){c.z();
w()}else{if(u(e)&&!b.fill){b.fill=true;w()}else{if(a&l&&this.Ka[f]&&!b.repeat){b.repeat={f:f};if(e=c.next()){if(e.h&l&&this.Ka[e.d]){b.repeat.kb=e.d
}else{c.z()}}}else{if(a&m.URL&&!b.src){b.src=f}else{return null}}}}}if(!b.src||!h||h.length<1||h.length>4||j&&j.length>4||i===1&&j.length<1||d&&d.length>4||i===2&&d.length<1){return null
}if(!b.repeat){b.repeat={f:"stretch"}}if(!b.repeat.kb){b.repeat.kb=b.repeat.f}a=function(r,o){return{T:o(r[0]),S:o(r[1]||r[0]),L:o(r[2]||r[0]),Q:o(r[3]||r[1]||r[0])}
};b.slice=a(h,function(r){return g.k(r.h&t?r.d+"px":r.d)});b.width=j&&j.length>0?a(j,function(r){return r.h&(n|p)?g.k(r.d):r.d
}):(k=this.e.currentStyle)&&{T:g.k(k.borderTopWidth),S:g.k(k.borderRightWidth),L:g.k(k.borderBottomWidth),Q:g.k(k.borderLeftWidth)};
b.ua=a(d||[0],function(r){return r.h&n?g.k(r.d):r.d})}return b}});g.Zb=g.s.$({na:"box-shadow",va:"boxShadow",ba:function(a){var b,c=g.k,e=g.u.ja,f;
if(a){f=new g.u(a);b={ua:[],cb:[]};for(a=function(){for(var h,j,d,i,k,m;h=f.next();){d=h.d;j=h.h;if(j&e.ha&&d===","){break
}else{if(h.db()&&!k){f.z();k=f.da(function(l){return !l.db()})}else{if(j&e.ea&&!i){i=d}else{if(j&e.fa&&d==="inset"&&!m){m=true
}else{return false}}}}}h=k&&k.length;if(h>1&&h<5){(m?b.cb:b.ua).push({fd:c(k[0].d),gd:c(k[1].d),blur:c(k[2]?k[2].d:"0"),Xc:c(k[3]?k[3].d:"0"),color:g.pa(i||"currentColor")});
return true}return false};a();){}}return b&&(b.cb.length||b.ua.length)?b:null}});g.ec=g.s.$({qa:g.s.ma(function(){var a=this.e.currentStyle;
return a.visibility+"|"+a.display}),ba:function(){var a=this.e,b=a.runtimeStyle;a=a.currentStyle;var c=b.visibility,e;
b.visibility="";e=a.visibility;b.visibility=c;return{cd:e!=="hidden",xc:a.display!=="none"}},g:function(){return false
}});g.B={Z:function(a){function b(c,e,f,h){this.e=c;this.q=e;this.j=f;this.parent=h}g.p.fb(b.prototype,g.B,a);
return b},eb:false,R:function(){return false},Kb:function(){this.n();this.g()&&this.X()},jb:function(){this.eb=true
},Lb:function(){this.g()?this.X():this.n()},Wa:function(a,b){this.Hb(a);for(var c=this.ka||(this.ka=[]),e=a+1,f=c.length,h;
e<f;e++){if(h=c[e]){break}}c[a]=b;this.w().insertBefore(b,h||null)},ra:function(a){var b=this.ka;return b&&b[a]||null
},Hb:function(a){var b=this.ra(a),c=this.Ba;if(b&&c){c.removeChild(b);this.ka[a]=null}},sa:function(a,b,c,e){var f=this.Va||(this.Va={}),h=f[a];
if(!h){h=f[a]=g.p.Ga("shape");if(b){h.appendChild(h[b]=g.p.Ga(b))}if(e){c=this.ra(e);if(!c){this.Wa(e,doc.createElement("group"+e));
c=this.ra(e)}}c.appendChild(h);a=h.style;a.position="absolute";a.left=a.top=0;a.behavior="url(#default#VML)"
}return h},Za:function(a){var b=this.Va,c=b&&b[a];if(c){c.parentNode.removeChild(c);delete b[a]}return !!c
},xb:function(a){var b=this.e,c=this.q.o(),e=c.i,f=c.f,h,j,d,i,k,m;c=a.x.tl.a(b,e);h=a.y.tl.a(b,f);j=a.x.tr.a(b,e);
d=a.y.tr.a(b,f);i=a.x.br.a(b,e);k=a.y.br.a(b,f);m=a.x.bl.a(b,e);a=a.y.bl.a(b,f);e=Math.min(e/(c+j),f/(d+k),e/(m+i),f/(h+a));
if(e<1){c*=e;h*=e;j*=e;d*=e;i*=e;k*=e;m*=e;a*=e}return{x:{tl:c,tr:j,br:i,bl:m},y:{tl:h,tr:d,br:k,bl:a}}
},oa:function(a,b,c){b=b||1;var e,f,h=this.q.o();f=h.i*b;h=h.f*b;var j=this.j.v,d=Math.floor,i=Math.ceil,k=a?a.T*b:0,m=a?a.S*b:0,l=a?a.L*b:0;
a=a?a.Q*b:0;var t,n,p,s,u;if(c||j.g()){e=this.xb(c||j.m());c=e.x.tl*b;j=e.y.tl*b;t=e.x.tr*b;n=e.y.tr*b;
p=e.x.br*b;s=e.y.br*b;u=e.x.bl*b;b=e.y.bl*b;f="m"+d(a)+","+d(j)+"qy"+d(c)+","+d(k)+"l"+i(f-t)+","+d(k)+"qx"+i(f-m)+","+d(n)+"l"+i(f-m)+","+i(h-s)+"qy"+i(f-p)+","+i(h-l)+"l"+d(u)+","+i(h-l)+"qx"+d(a)+","+i(h-b)+" x e"
}else{f="m"+d(a)+","+d(k)+"l"+i(f-m)+","+d(k)+"l"+i(f-m)+","+i(h-l)+"l"+d(a)+","+i(h-l)+"xe"}return f
},w:function(){var a=this.parent.ra(this.C),b;if(!a){a=doc.createElement(this.Fa);b=a.style;b.position="absolute";
b.top=b.left=0;this.parent.Wa(this.C,a)}return a},n:function(){this.parent.Hb(this.C);delete this.Va;
delete this.ka}};g.cc=g.B.Z({g:function(){var a=this.oc;for(var b in a){if(a.hasOwnProperty(b)&&a[b].g()){return true
}}return false},R:function(){return this.j.lb.D()},jb:function(){if(this.g()){var a=this.wb(),b=a,c;a=a.currentStyle;
var e=a.position,f=this.w().style,h=0,j=0;j=this.q.o();if(e==="fixed"&&g.J>6){h=j.x;j=j.y;b=e}else{do{b=b.offsetParent
}while(b&&b.currentStyle.position==="static");if(b){c=b.getBoundingClientRect();b=b.currentStyle;h=j.x-c.left-(parseFloat(b.borderLeftWidth)||0);
j=j.y-c.top-(parseFloat(b.borderTopWidth)||0)}else{b=doc.documentElement;h=j.x+b.scrollLeft-b.clientLeft;
j=j.y+b.scrollTop-b.clientTop}b="absolute"}f.position=b;f.left=h;f.top=j;f.zIndex=e==="static"?-1:a.zIndex;
this.eb=true}},Lb:function(){},Mb:function(){var a=this.j.lb.m();this.w().style.display=a.cd&&a.xc?"":"none"
},Kb:function(){this.g()?this.Mb():this.n()},wb:function(){var a=this.e;return a.tagName in g.Jb?a.offsetParent:a
},w:function(){var a=this.Ba,b;if(!a){b=this.wb();a=this.Ba=doc.createElement("css3-container");a.style.direction="ltr";
this.Mb();b.parentNode.insertBefore(a,b)}return a},n:function(){var a=this.Ba,b;if(a&&(b=a.parentNode)){b.removeChild(a)
}delete this.Ba;delete this.ka}});g.Sb=g.B.Z({C:2,Fa:"background",R:function(){var a=this.j;return a.H.D()||a.v.D()
},g:function(){var a=this.j;return a.N.g()||a.v.g()||a.H.g()||a.W.g()&&a.W.m().cb},X:function(){var a=this.q.o();
if(a.i&&a.f){this.yc();this.zc()}},yc:function(){var a=this.j.H.m(),b=this.q.o(),c=this.e,e=a&&a.color,f,h;
if(e&&e.la()>0){this.yb();a=this.sa("bgColor","fill",this.w(),1);f=b.i;b=b.f;a.stroked=false;a.coordsize=f*2+","+b*2;
a.coordorigin="1,1";a.path=this.oa(null,2);h=a.style;h.width=f;h.height=b;a.fill.color=e.O(c);c=e.la();
if(c<1){a.fill.opacity=c}}else{this.Za("bgColor")}},zc:function(){var a=this.j.H.m(),b=this.q.o();a=a&&a.M;
var c,e,f,h,j;if(a){this.yb();e=b.i;f=b.f;for(j=a.length;j--;){b=a[j];c=this.sa("bgImage"+j,"fill",this.w(),2);
c.stroked=false;c.fill.type="tile";c.fillcolor="none";c.coordsize=e*2+","+f*2;c.coordorigin="1,1";c.path=this.oa(0,2);
h=c.style;h.width=e;h.height=f;if(b.P==="linear-gradient"){this.mc(c,b)}else{c.fill.src=b.Cb;this.Pc(c,j)
}}}for(j=a?a.length:0;this.Za("bgImage"+j++);){}},Pc:function(a,b){g.p.Pb(a.fill.src,function(c){var e=a.fill,f=this.e,h=this.q.o(),j=h.i;
h=h.f;var d=this.j,i=d.I.m(),k=i&&i.nb;i=k?k.t.a(f):0;var m=k?k.r.a(f):0,l=k?k.b.a(f):0;k=k?k.l.a(f):0;
d=d.H.m().M[b];f=d.Ya?d.Ya.coords(f,j-c.i-k-m,h-c.f-i-l):{x:0,y:0};d=d.Bb;l=m=0;var t=j+1,n=h+1,p=g.J===8?0:1;
k=Math.round(f.x)+k+0.5;i=Math.round(f.y)+i+0.5;e.position=k/j+","+i/h;if(d&&d!=="repeat"){if(d==="repeat-x"||d==="no-repeat"){m=i+1;
n=i+c.f+p}if(d==="repeat-y"||d==="no-repeat"){l=k+1;t=k+c.i+p}a.style.clip="rect("+m+"px,"+t+"px,"+n+"px,"+l+"px)"
}},this)},mc:function(a,b){function c(B,C,z,F,H){if(z===0||z===180){return[F,C]}else{if(z===90||z===270){return[B,H]
}else{z=Math.tan(-z*t/180);B=z*B-C;C=-1/z;F=C*F-H;H=C-z;return[(F-B)/H,(z*F-C*B)/H]}}}function e(){w=m>=90&&m<270?i:0;
r=m<180?k:0;o=i-w;x=k-r}function f(){for(;m<0;){m+=360}m%=360}function h(B,C){var z=C[0]-B[0];B=C[1]-B[1];
return Math.abs(z===0?B:B===0?z:Math.sqrt(z*z+B*B))}var j=this.e,d=this.q.o(),i=d.i,k=d.f;a=a.fill;var m=b.Xa,l=b.bb;
b=b.ca;d=b.length;var t=Math.PI,n,p,s,u,w,r,o,x,q,y,A,D;if(l){l=l.coords(j,i,k);n=l.x;p=l.y}if(m){m=m.vc();
f();e();if(!l){n=w;p=r}l=c(n,p,m,o,x);s=l[0];u=l[1]}else{if(l){s=i-n;u=k-p}else{n=p=s=0;u=k}}l=s-n;q=u-p;
if(m===void 0){m=!l?q<0?90:270:!q?l<0?180:0:-Math.atan2(q,l)/t*180;f();e()}l=m%90?Math.atan2(l*i/k,q)/t*180:m+90;
l+=180;l%=360;y=h([n,p],[s,u]);s=h([w,r],c(w,r,m,o,x));u=[];p=h([n,p],c(n,p,m,w,r))/s*100;n=[];for(q=0;
q<d;q++){n.push(b[q].Fb?b[q].Fb.a(j,y):q===0?0:q===d-1?y:null)}for(q=1;q<d;q++){if(n[q]===null){A=n[q-1];
y=q;do{D=n[++y]}while(D===null);n[q]=A+(D-A)/(y-q+1)}n[q]=Math.max(n[q],n[q-1])}for(q=0;q<d;q++){u.push(p+n[q]/s*100+"% "+b[q].color.O(j))
}a.angle=l;a.type="gradient";a.method="sigma";a.color=b[0].color.O(j);a.color2=b[d-1].color.O(j);a.colors.value=u.join(",")
},yb:function(){var a=this.e.runtimeStyle;a.backgroundImage="url(about:blank)";a.backgroundColor="transparent"
},n:function(){g.B.n.call(this);var a=this.e.runtimeStyle;a.backgroundImage=a.backgroundColor=""}});g.Wb=g.B.Z({C:4,Fa:"border",qc:{TABLE:1,INPUT:1,TEXTAREA:1,SELECT:1,OPTION:1,IMG:1,HR:1,FIELDSET:1},Jc:{submit:1,button:1,reset:1},R:function(){var a=this.j;
return a.I.D()||a.v.D()},g:function(){var a=this.j;return(a.N.g()||a.v.g()||a.H.g())&&a.I.g()},X:function(){var a=this.e,b=this.j.I.m(),c=this.q.o(),e=c.i;
c=c.f;var f,h,j,d,i;if(b){this.Hc();b=this.Bc(2);d=0;for(i=b.length;d<i;d++){j=b[d];f=this.sa("borderPiece"+d,j.stroke?"stroke":"fill",this.w());
f.coordsize=e*2+","+c*2;f.coordorigin="1,1";f.path=j.path;h=f.style;h.width=e;h.height=c;f.filled=!!j.fill;
f.stroked=!!j.stroke;if(j.stroke){f=f.stroke;f.weight=j.mb+"px";f.color=j.color.O(a);f.dashstyle=j.stroke==="dashed"?"2 2":j.stroke==="dotted"?"1 1":"solid";
f.linestyle=j.stroke==="double"&&j.mb>2?"ThinThin":"Single"}else{f.fill.color=j.fill.O(a)}}for(;this.Za("borderPiece"+d++);
){}}},Hc:function(){var a=this.e,b=a.currentStyle,c=a.runtimeStyle,e=a.tagName,f=g.J===6,h;if(f&&e in this.qc||e==="BUTTON"||e==="INPUT"&&a.type in this.Jc){c.borderWidth="";
e=this.j.I.Ib;for(h=e.length;h--;){f=e[h];c["padding"+f]="";c["padding"+f]=g.k(b["padding"+f]).a(a)+g.k(b["border"+f+"Width"]).a(a)+(!g.J===8&&h%2?1:0)
}c.borderWidth=0}else{if(f){if(a.childNodes.length!==1||a.firstChild.tagName!=="ie6-mask"){b=doc.createElement("ie6-mask");
e=b.style;e.visibility="visible";for(e.zoom=1;e=a.firstChild;){b.appendChild(e)}a.appendChild(b);c.visibility="hidden"
}}else{c.borderColor="transparent"}}},Bc:function(a){var b=this.e,c,e,f,h=this.j.I,j=[],d,i,k,m,l=Math.round,t,n,p;
if(h.g()){c=h.m();h=c.nb;n=c.Zc;p=c.tc;if(c.ed&&c.$c&&c.uc){if(p.t.la()>0){c=h.t.a(b);k=c/2;j.push({path:this.oa({T:k,S:k,L:k,Q:k},a),stroke:n.t,color:p.t,mb:c})
}}else{a=a||1;c=this.q.o();e=c.i;f=c.f;c=l(h.t.a(b));k=l(h.r.a(b));m=l(h.b.a(b));b=l(h.l.a(b));var s={t:c,r:k,b:m,l:b};
b=this.j.v;if(b.g()){t=this.xb(b.m())}d=Math.floor;i=Math.ceil;var u=function(o,x){return t?t[o][x]:0
},w=function(o,x,q,y,A,D){var B=u("x",o),C=u("y",o),z=o.charAt(1)==="r";o=o.charAt(0)==="b";return B>0&&C>0?(D?"al":"ae")+(z?i(e-B):d(B))*a+","+(o?i(f-C):d(C))*a+","+(d(B)-x)*a+","+(d(C)-q)*a+","+y*65535+","+2949075*(A?1:-1):(D?"m":"l")+(z?e-x:x)*a+","+(o?f-q:q)*a
},r=function(o,x,q,y){var A=o==="t"?d(u("x","tl"))*a+","+i(x)*a:o==="r"?i(e-x)*a+","+d(u("y","tr"))*a:o==="b"?i(e-u("x","br"))*a+","+d(f-x)*a:d(x)*a+","+i(f-u("y","bl"))*a;
o=o==="t"?i(e-u("x","tr"))*a+","+i(x)*a:o==="r"?i(e-x)*a+","+i(f-u("y","br"))*a:o==="b"?d(u("x","bl"))*a+","+d(f-x)*a:d(x)*a+","+d(u("y","tl"))*a;
return q?(y?"m"+o:"")+"l"+A:(y?"m"+A:"")+"l"+o};b=function(o,x,q,y,A,D){var B=o==="l"||o==="r",C=s[o],z,F;
if(C>0&&n[o]!=="none"&&p[o].la()>0){z=s[B?o:x];x=s[B?x:o];F=s[B?o:q];q=s[B?q:o];if(n[o]==="dashed"||n[o]==="dotted"){j.push({path:w(y,z,x,D+45,0,1)+w(y,0,0,D,1,0),fill:p[o]});
j.push({path:r(o,C/2,0,1),stroke:n[o],mb:C,color:p[o]});j.push({path:w(A,F,q,D,0,1)+w(A,0,0,D-45,1,0),fill:p[o]})
}else{j.push({path:w(y,z,x,D+45,0,1)+r(o,C,0,0)+w(A,F,q,D,0,0)+(n[o]==="double"&&C>2?w(A,F-d(F/3),q-d(q/3),D-45,1,0)+r(o,i(C/3*2),1,0)+w(y,z-d(z/3),x-d(x/3),D,1,0)+"x "+w(y,d(z/3),d(x/3),D+45,0,1)+r(o,d(C/3),1,0)+w(A,d(F/3),d(q/3),D,0,0):"")+w(A,0,0,D-45,1,0)+r(o,0,1,0)+w(y,0,0,D,1,0),fill:p[o]})
}}};b("t","l","r","tl","tr",90);b("r","t","b","tr","br",0);b("b","r","l","br","bl",-90);b("l","b","t","bl","tl",-180)
}}return j},n:function(){g.B.n.call(this);this.e.runtimeStyle.borderColor=""}});g.Ub=g.B.Z({C:5,Oc:["t","tr","r","br","b","bl","l","tl","c"],R:function(){return this.j.N.D()
},g:function(){return this.j.N.g()},X:function(){this.w();var a=this.j.N.m(),b=this.q.o(),c=this.e,e=this.Gb;
g.p.Pb(a.src,function(f){function h(w,r,o,x,q){w=e[w].style;var y=Math.max;w.width=y(r,0);w.height=y(o,0);
w.left=x;w.top=q}function j(w,r,o){for(var x=0,q=w.length;x<q;x++){e[w[x]].imagedata[r]=o}}var d=b.i,i=b.f,k=a.width,m=k.T.a(c),l=k.S.a(c),t=k.L.a(c);
k=k.Q.a(c);var n=a.slice,p=n.T.a(c),s=n.S.a(c),u=n.L.a(c);n=n.Q.a(c);h("tl",k,m,0,0);h("t",d-k-l,m,k,0);
h("tr",l,m,d-l,0);h("r",l,i-m-t,d-l,m);h("br",l,t,d-l,i-t);h("b",d-k-l,t,k,i-t);h("bl",k,t,0,i-t);h("l",k,i-m-t,0,m);
h("c",d-k-l,i-m-t,k,m);j(["tl","t","tr"],"cropBottom",(f.f-p)/f.f);j(["tl","l","bl"],"cropRight",(f.i-n)/f.i);
j(["bl","b","br"],"cropTop",(f.f-u)/f.f);j(["tr","r","br"],"cropLeft",(f.i-s)/f.i);if(a.repeat.kb==="stretch"){j(["l","r","c"],"cropTop",p/f.f);
j(["l","r","c"],"cropBottom",u/f.f)}if(a.repeat.f==="stretch"){j(["t","b","c"],"cropLeft",n/f.i);j(["t","b","c"],"cropRight",s/f.i)
}e.c.style.display=a.fill?"":"none"},this)},w:function(){var a=this.parent.ra(this.C),b,c,e,f=this.Oc,h=f.length;
if(!a){a=doc.createElement("border-image");b=a.style;b.position="absolute";this.Gb={};for(e=0;e<h;e++){c=this.Gb[f[e]]=g.p.Ga("rect");
c.appendChild(g.p.Ga("imagedata"));b=c.style;b.behavior="url(#default#VML)";b.position="absolute";b.top=b.left=0;
c.imagedata.src=this.j.N.m().src;c.stroked=false;c.filled=false;a.appendChild(c)}this.parent.Wa(this.C,a)
}return a}});g.Yb=g.B.Z({C:1,Fa:"outset-box-shadow",R:function(){var a=this.j;return a.W.D()||a.v.D()
},g:function(){var a=this.j.W;return a.g()&&a.m().ua[0]},X:function(){function a(z,F,H,K,J,v,E){z=b.sa("shadow"+z+F,"fill",e,j-z);
F=z.fill;z.coordsize=m*2+","+l*2;z.coordorigin="1,1";z.stroked=false;z.filled=true;F.color=J.O(c);if(v){F.type="gradienttitle";
F.color2=F.color;F.opacity=0}z.path=E;u=z.style;u.left=H;u.top=K;u.width=m;u.height=l;return z}var b=this,c=this.e,e=this.w(),f=this.j,h=f.W.m().ua;
f=f.v.m();var j=h.length,d=j,i,k=this.q.o(),m=k.i,l=k.f;k=g.J===8?1:0;for(var t=["tl","tr","br","bl"],n,p,s,u,w,r,o,x,q,y,A,D,B,C;
d--;){p=h[d];w=p.fd.a(c);r=p.gd.a(c);i=p.Xc.a(c);o=p.blur.a(c);p=p.color;x=-i-o;if(!f&&o){f=g.Oa.Qb}x=this.oa({T:x,S:x,L:x,Q:x},2,f);
if(o){q=(i+o)*2+m;y=(i+o)*2+l;A=o*2/q;D=o*2/y;if(o-i>m/2||o-i>l/2){for(i=4;i--;){n=t[i];B=n.charAt(0)==="b";
C=n.charAt(1)==="r";n=a(d,n,w,r,p,o,x);s=n.fill;s.focusposition=(C?1-A:A)+","+(B?1-D:D);s.focussize="0,0";
n.style.clip="rect("+((B?y/2:0)+k)+"px,"+(C?q:q/2)+"px,"+(B?y:y/2)+"px,"+((C?q/2:0)+k)+"px)"}}else{n=a(d,"",w,r,p,o,x);
s=n.fill;s.focusposition=A+","+D;s.focussize=1-A*2+","+(1-D*2)}}else{n=a(d,"",w,r,p,o,x);w=p.la();if(w<1){n.fill.opacity=w
}}}}});g.bc=g.B.Z({C:6,Fa:"imgEl",R:function(){var a=this.j;return this.e.src!==this.hc||a.v.D()},g:function(){var a=this.j;
return a.v.g()||a.H.Eb()},X:function(){this.hc=j;this.Gc();var a=this.sa("img","fill",this.w()),b=a.fill,c=this.q.o(),e=c.i;
c=c.f;var f=this.j.I.m();f=f&&f.nb;var h=this.e,j=h.src,d=Math.round;a.stroked=false;b.type="frame";b.src=j;
b.position=(e?0.5/e:0)+","+(c?0.5/c:0);a.coordsize=e*2+","+c*2;a.coordorigin="1,1";a.path=this.oa(f?{T:d(f.t.a(h)),S:d(f.r.a(h)),L:d(f.b.a(h)),Q:d(f.l.a(h))}:0,2);
a=a.style;a.width=e;a.height=c},Gc:function(){this.e.runtimeStyle.filter="alpha(opacity=0)"},n:function(){g.B.n.call(this);
this.e.runtimeStyle.filter=""}});g.Qa=function(){function a(d){function i(){if(!z){var v,E,G=d.currentStyle,I=G.getAttribute(c)==="true";
J=G.getAttribute(e);J=g.Ab===8?J!=="false":J==="true";if(!C){C=1;d.runtimeStyle.zoom=1;G=d;for(var O=1;
G=G.previousSibling;){if(G.nodeType===1){O=0;break}}if(O){d.className+=" "+g.Pa+"first-child"}}y.Ja();
if(I&&(E=y.o())&&(v=doc.documentElement||doc.body)&&(E.y>v.clientHeight||E.x>v.clientWidth||E.y+E.f<0||E.x+E.i<0)){if(!H){H=1;
g.Ra.aa(i)}}else{z=1;H=C=0;g.Ra.Ma(i);A={H:new g.Tb(d),I:new g.Xb(d),N:new g.Vb(d),v:new g.Oa(d),W:new g.Zb(d),lb:new g.ec(d)};
D=[A.H,A.I,A.N,A.v,A.W,A.lb];v=new g.cc(d,y,A);E=[new g.Yb(d,y,A,v),new g.Sb(d,y,A,v),new g.Wb(d,y,A,v),new g.Ub(d,y,A,v)];
d.tagName==="IMG"&&E.push(new g.bc(d,y,A,v));v.oc=E;q=[v].concat(E);if(v=d.currentStyle.getAttribute(g.F+"watch-ancestors")){B=[];
v=parseInt(v,10);E=0;for(I=d.parentNode;I&&(v==="NaN"||E++<v);){B.push(I);I.attachEvent("onpropertychange",u);
I.attachEvent("onmouseenter",p);I.attachEvent("onmouseleave",s);I=I.parentNode}}if(J){g.ya.aa(m);g.ya.Tc()
}m(1)}if(!F){F=1;d.attachEvent("onmove",k);d.attachEvent("onresize",k);d.attachEvent("onpropertychange",l);
d.attachEvent("onmouseenter",p);d.attachEvent("onmouseleave",s);g.za.aa(k);g.G.aa(o)}y.La()}}function k(){y&&y.Ec()&&m()
}function m(v){if(!K){if(z){var E,G;w();if(v||y.Qc()){E=0;for(G=q.length;E<G;E++){q[E].jb()}}if(v||y.Vc()){E=0;
for(G=q.length;E<G;E++){q[E].Lb()}}r()}else{C||i()}}}function l(){var v,E,G;v=event;if(!K&&!(v&&v.propertyName in j)){if(z){w();
v=0;for(E=q.length;v<E;v++){G=q[v];G.eb||G.jb();G.R()&&G.Kb()}r()}else{C||i()}}}function t(){if(d){d.className+=f
}}function n(){if(d){d.className=d.className.replace(h,"")}}function p(){setTimeout(t,0)}function s(){setTimeout(n,0)
}function u(){var v=event.propertyName;if(v==="className"||v==="id"){l()}}function w(){y.Ja();for(var v=D.length;
v--;){D[v].Ja()}}function r(){for(var v=D.length;v--;){D[v].La()}y.La()}function o(){if(F){if(B){for(var v=0,E=B.length,G;
v<E;v++){G=B[v];G.detachEvent("onpropertychange",u);G.detachEvent("onmouseenter",p);G.detachEvent("onmouseleave",s)
}}d.detachEvent("onmove",m);d.detachEvent("onresize",m);d.detachEvent("onpropertychange",l);d.detachEvent("onmouseenter",p);
d.detachEvent("onmouseleave",s);g.G.Ma(o);F=0}}function x(){if(!K){var v,E;o();K=1;if(q){v=0;for(E=q.length;
v<E;v++){q[v].n()}}J&&g.ya.Ma(m);g.za.Ma(m);q=y=A=D=B=d=null}}var q,y=new M(d),A,D,B,C,z,F,H,K,J;this.Ic=i;
this.update=m;this.n=x;this.Ac=d}var b={},c=g.F+"lazy-init",e=g.F+"poll",f=" "+g.Pa+"hover",h=new RegExp("\\b"+g.Pa+"hover\\b","g"),j={background:1,bgColor:1,display:1};
a.Cc=function(d){var i=g.p.ta(d);return b[i]||(b[i]=new a(d))};a.n=function(d){d=g.p.ta(d);var i=b[d];
if(i){i.n();delete b[d]}};a.wc=function(){var d=[],i;if(b){for(var k in b){if(b.hasOwnProperty(k)){i=b[k];
d.push(i.Ac);i.n()}}b={}}return d};return a}();g.attach=function(a){g.Ab<9&&g.Qa.Cc(a).Ic()};g.detach=function(a){g.Qa.n(a)
}}})();!function($){var Tooltip=function(element,options){this.init("tooltip",element,options)};Tooltip.prototype={constructor:Tooltip,init:function(type,element,options){var eventIn,eventOut;
this.type=type;this.$element=$(element);this.options=this.getOptions(options);this.enabled=true;if(this.options.trigger!="manual"){eventIn=this.options.trigger=="hover"?"mouseenter":"focus";
eventOut=this.options.trigger=="hover"?"mouseleave":"blur";this.$element.on(eventIn,this.options.selector,$.proxy(this.enter,this));
this.$element.on(eventOut,this.options.selector,$.proxy(this.leave,this))}this.options.selector?(this._options=$.extend({},this.options,{trigger:"manual",selector:""})):this.fixTitle()
},getOptions:function(options){options=$.extend({},$.fn[this.type].defaults,options,this.$element.data());
if(options.delay&&typeof options.delay=="number"){options.delay={show:options.delay,hide:options.delay}
}return options},enter:function(e){var self=$(e.currentTarget)[this.type](this._options).data(this.type);
if(!self.options.delay||!self.options.delay.show){self.show()}else{self.hoverState="in";setTimeout(function(){if(self.hoverState=="in"){self.show()
}},self.options.delay.show)}},leave:function(e){var self=$(e.currentTarget)[this.type](this._options).data(this.type);
if(!self.options.delay||!self.options.delay.hide){self.hide()}else{self.hoverState="out";setTimeout(function(){if(self.hoverState=="out"){self.hide()
}},self.options.delay.hide)}},show:function(){var $tip,inside,pos,actualWidth,actualHeight,placement,tp;
if(this.hasContent()&&this.enabled){$tip=this.tip();this.setContent();if(this.options.animation){$tip.addClass("dp-fade")
}placement=typeof this.options.placement=="function"?this.options.placement.call(this,$tip[0],this.$element[0]):this.options.placement;
inside=/in/.test(placement);$tip.remove().css({top:0,left:0,display:"block"}).appendTo(inside?this.$element:$("#dp"));
pos=this.getPosition(inside);actualWidth=$tip[0].offsetWidth;actualHeight=$tip[0].offsetHeight;switch(inside?placement.split(" ")[1]:placement){case"bottom":tp={top:pos.top+pos.height,left:pos.left+pos.width/2-actualWidth/2};
break;case"top":tp={top:pos.top-actualHeight,left:pos.left+pos.width/2-actualWidth/2};break;case"left":tp={top:pos.top+pos.height/2-actualHeight/2,left:pos.left-actualWidth};
break;case"right":tp={top:pos.top+pos.height/2-actualHeight/2,left:pos.left+pos.width};break}var noArrow=false;
if(tp.top<0){tp.top=8;noArrow=true}if(tp.left<0){tp.left=8;noArrow=true}if(noArrow){$tip.find(".dp-arrow").hide()
}else{$tip.find(".dp-arrow").show()}$tip.css(tp).addClass("dp-"+placement).addClass("dp-in")}},setContent:function(){var $tip=this.tip();
$tip.find(".dp-tooltip-inner").html(this.getTitle());$tip.removeClass("dp-fade dp-in dp-top dp-bottom dp-left dp-right")
},hide:function(){var that=this,$tip=this.tip();$tip.removeClass("dp-in");function removeWithAnimation(){var timeout=setTimeout(function(){$tip.off($.support.transition.end).remove()
},500);$tip.one($.support.transition.end,function(){clearTimeout(timeout);$tip.remove()})}$.support.transition&&this.$tip.hasClass("dp-fade")?removeWithAnimation():$tip.remove()
},fixTitle:function(){var $e=this.$element;if($e.attr("title")||typeof($e.attr("data-original-title"))!="string"){$e.attr("data-original-title",$e.attr("title")||"").removeAttr("title")
}},hasContent:function(){return this.getTitle()},getPosition:function(inside){return $.extend({},(inside?{top:0,left:0}:this.$element.offset()),{width:this.$element[0].offsetWidth,height:this.$element[0].offsetHeight})
},getTitle:function(){var title,$e=this.$element,o=this.options;title=$e.attr("data-original-title")||(typeof o.title=="function"?o.title.call($e[0]):o.title);
title=(title||"").toString().replace(/(^\s*|\s*$)/,"");return title},tip:function(){return this.$tip=this.$tip||$(this.options.template)
},validate:function(){if(!this.$element[0].parentNode){this.hide();this.$element=null;this.options=null
}},enable:function(){this.enabled=true},disable:function(){this.enabled=false},toggleEnabled:function(){this.enabled=!this.enabled
},toggle:function(){this[this.tip().hasClass("dp-in")?"hide":"show"]()}};$.fn.tooltip=function(option){return this.each(function(){var $this=$(this),data=$this.data("tooltip"),options=typeof option=="object"&&option;
if(!data){$this.data("tooltip",(data=new Tooltip(this,options)))}if(typeof option=="string"){data[option]()
}})};$.fn.tooltip.Constructor=Tooltip;$.fn.tooltip.defaults={animation:true,delay:0,selector:false,placement:"top",trigger:"hover",title:"",template:'<div class="dp-tooltip"><div class="dp-tooltip-arrow"></div><div class="dp-tooltip-inner"></div></div>'}
}(window.jQuery);!function($){var toggle='[data-toggle="dp-dropdown"]',Dropdown=function(element){var $el=$(element).on("click.dropdown.data-api",this.toggle);
$("html").on("click.dropdown.data-api",function(){$el.parent().removeClass("dp-open")})};Dropdown.prototype={constructor:Dropdown,toggle:function(e){var $this=$(this),selector=$this.attr("data-target"),$parent,isActive;
if(!selector){selector=$this.attr("href");selector=selector&&selector.replace(/.*(?=#[^\s]*$)/,"")}$parent=$(selector);
$parent.length||($parent=$this.parent());isActive=$parent.hasClass("dp-open");clearMenus();!isActive&&$parent.toggleClass("dp-open");
return false}};function clearMenus(){$(toggle).parent().removeClass("dp-open")}$.fn.dropdown=function(option){return this.each(function(){var $this=$(this),data=$this.data("dropdown");
if(!data){$this.data("dropdown",(data=new Dropdown(this)))}if(typeof option=="string"){data[option].call($this)
}})};$.fn.dropdown.Constructor=Dropdown;$(function(){$("html").on("click.dropdown.data-api",clearMenus);
$("body").on("click.dropdown.data-api",toggle,Dropdown.prototype.toggle)})}(window.jQuery);!function($){var Modal=function(content,options){this.options=options;
this.$element=$(content).delegate('[data-dismiss="dp-modal"]',"click.dismiss.modal",$.proxy(this.hide,this))
};Modal.prototype={constructor:Modal,toggle:function(){return this[!this.isShown?"show":"hide"]()},show:function(){var that=this;
if(this.isShown){return}$("body").addClass("dp-modal-open");this.isShown=true;this.$element.trigger("show");
escape.call(this);backdrop.call(this,function(){var transition=$.support.transition&&that.$element.hasClass("dp-fade");
!that.$element.parent().length&&that.$element.appendTo($("#dp"));that.$element.show();if(transition){that.$element[0].offsetWidth
}that.$element.addClass("dp-in");transition?that.$element.one($.support.transition.end,function(){that.$element.trigger("shown")
}):that.$element.trigger("shown")})},hide:function(e){e&&e.preventDefault();if(!this.isShown){return}var that=this;
this.isShown=false;$("body").removeClass("dp-modal-open");escape.call(this);this.$element.trigger("hide").removeClass("dp-in");
$.support.transition&&this.$element.hasClass("dp-fade")?hideWithTransition.call(this):hideModal.call(this)
}};function hideWithTransition(){var that=this,timeout=setTimeout(function(){that.$element.off($.support.transition.end);
hideModal.call(that)},500);this.$element.one($.support.transition.end,function(){clearTimeout(timeout);
hideModal.call(that)})}function hideModal(that){this.$element.hide().trigger("hidden");backdrop.call(this)
}function backdrop(callback){var that=this,animate=this.$element.hasClass("dp-fade")?"fade":"";if(this.isShown&&this.options.backdrop){var doAnimate=$.support.transition&&animate;
this.$backdrop=$('<div class="dp-modal-backdrop '+animate+'" />').appendTo($("#dp"));if(this.options.backdrop!="static"){this.$backdrop.click($.proxy(this.hide,this))
}if(doAnimate){this.$backdrop[0].offsetWidth}this.$backdrop.addClass("dp-in");doAnimate?this.$backdrop.one($.support.transition.end,callback):callback()
}else{if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("dp-in");$.support.transition&&this.$element.hasClass("dp-fade")?this.$backdrop.one($.support.transition.end,$.proxy(removeBackdrop,this)):removeBackdrop.call(this)
}else{if(callback){callback()}}}}function removeBackdrop(){this.$backdrop.remove();this.$backdrop=null
}function escape(){var that=this;if(this.isShown&&this.options.keyboard){$(document).on("keyup.dismiss.modal",function(e){e.which==27&&that.hide()
})}else{if(!this.isShown){$(document).off("keyup.dismiss.modal")}}}$.fn.modal=function(option){return this.each(function(){var $this=$(this),data=$this.data("modal"),options=$.extend({},$.fn.modal.defaults,$this.data(),typeof option=="object"&&option);
if(!data){$this.data("modal",(data=new Modal(this,options)))}if(typeof option=="string"){data[option]()
}else{if(options.show){data.show()}}})};$.fn.modal.defaults={backdrop:true,keyboard:true,show:true};$.fn.modal.Constructor=Modal;
$(function(){$("body").on("click.modal.data-api",'[data-toggle="dp-modal"]',function(e){var $this=$(this),href,$target=$($this.attr("data-target")||(href=$this.attr("href"))&&href.replace(/.*(?=#[^\s]+$)/,"")),option=$target.data("modal")?"toggle":$.extend({},$target.data(),$this.data());
e.preventDefault();$target.modal(option)})})}(window.jQuery);!function($){var Popover=function(element,options){this.init("popover",element,options)
};Popover.prototype=$.extend({},$.fn.tooltip.Constructor.prototype,{constructor:Popover,setContent:function(){var $tip=this.tip(),title=this.getTitle(),content=this.getContent();
$tip.find(".dp-popover-title")[$.type(title)=="object"?"append":"html"](title);$tip.find(".dp-popover-content > *")[$.type(content)=="object"?"append":"html"](content);
$tip.removeClass("dp-fade dp-top dp-bottom dp-left dp-right dp-in")},hasContent:function(){return this.getTitle()||this.getContent()
},getContent:function(){var content,$e=this.$element,o=this.options;content=$e.attr("data-content")||(typeof o.content=="function"?o.content.call($e[0]):o.content);
content=content.toString().replace(/(^\s*|\s*$)/,"");return content},tip:function(){if(!this.$tip){this.$tip=$(this.options.template)
}return this.$tip}});$.fn.popover=function(option){return this.each(function(){var $this=$(this),data=$this.data("popover"),options=typeof option=="object"&&option;
if(!data){$this.data("popover",(data=new Popover(this,options)))}if(typeof option=="string"){data[option]()
}})};$.fn.popover.Constructor=Popover;$.fn.popover.defaults=$.extend({},$.fn.tooltip.defaults,{placement:"right",content:"",template:'<div class="dp-popover"><div class="dp-arrow"></div><div class="dp-popover-inner"><h3 class="dp-popover-title"></h3><div class="dp-popover-content"><p></p></div></div></div>'})
}(window.jQuery);var Orb={};if(!window.console){window.console={}}["error","log","warn","info","debug","trace"].each(function(v){if(!window.console[v]){window.console[v]=function(){}
}});Orb.createNamespace=function(namespace,obj){var parts=namespace.split(".");var objcheck=window;parts.forEach(function(part){if(!objcheck[part]){objcheck[part]={}
}objcheck=objcheck[part]})};Orb.getNamespacedObject=function(fullname){var obj=window;fullname_parts=fullname.split(".");
var part=null;while(part=fullname_parts.shift()){if(obj[part]===undefined){console.warn("Orb.getNamespacedObject(%s) is an invalid name",fullname);
return null}obj=obj[part]}return obj};Orb.getUniqueId=function(prefix){if(!prefix){prefix=""}var id="";
do{id=prefix+Orb.uuid()}while(document.getElementById(id));return id};Orb.uuid=function(){return"orb_uuid_"+(++Orb.uuid_num)
};Orb.uuid_num=0;Orb.uuidRand=function(){var time=(new Date()).getTime();var rand=Number.random(1,999);
return"uuid_"+(++Orb.uuid_num)+"_"+time+"_"+rand};Orb.getEl=function(el){if(typeOf(el)=="element"){return el
}return document.getElementById(el)};$el=function(el){return Orb.getEl(el)};Orb.sleep=function(ms){var start=new Date().getTime();
for(var i=0;i<10000000;i++){if((new Date().getTime()-start)>ms){break}}};Orb.mouseInElement=function(mouseX,mouseY,el){var pos=el.offset();
var width=el.outerWidth();var height=el.outerHeight();if(mouseX<pos.left||mouseX>pos.left+width){return false
}if(mouseY<pos.top||mouseY>pos.top+height){return false}return true};Orb.findHighestZindex=function(els){if(!els){els=$("body > *")
}var highest=0;els.each(function(){var z=parseInt($(this).css("z-index"));if(z<1000000000&&z>highest){highest=z
}});return highest};Orb.escapeHtml=function(string){string=string||"";if(typeOf(string)=="element"){string=$(string).text()
}else{if(typeOf(string)!="string"){if(string.toString){string=string.toString()}console.error("Invalid type passed to Orb.escapeHtml: %o",string);
console.trace();return(typeof string)+""}}return string.replace(/&/g,"&amp;").replace(/>/g,"&gt;").replace(/</g,"&lt;").replace(/"/g,"&quot;")
};Orb.nl2br=function(string){return string.replace(/\r\n|\n/g,"<br />\n")};Orb.linkUrls=function(string){string=string||"";
return string.replace(/\b(https?:\/\/|www\.)([^\s]+)\b(.?)/gi,function(match,o1,o2,o3,offset,s){if(o3&&o3=="/"){o2+="/"
}if(o1=="www."){return'<a href="http://www.'+o2+'">'+match+"</a>"}else{return'<a href="'+o1+o2+'">'+match+"</a>"
}})};Orb.appendQueryData=function(url,k,v){var kev=k;if(v!==undefined){kev+="="+encodeURI(v)}if(url.indexOf("?")===-1){url+="?"+kev
}else{url+="&"+kev}return url};Orb.serializeFormElements=function(context,visitedEls){var postData=[];
if(!visitedEls){visitedEls=[]}context.each(function(){$(this).find("input, select, textarea").each(function(){if(visitedEls.indexOf(this)!==-1){return
}visitedEls.push(this);var el=$(this);var name=el.attr("name");if(!name){return}if(el.is(":checkbox, :radio")){if(el.is(":checked")){postData.push({name:name,value:el.val()})
}}else{if(el.is("input, textarea")){postData.push({name:name,value:el.val()})}else{if(el.is("select")){el.find("option").filter(":selected").each(function(){postData.push({name:name,value:$(this).val()})
})}}}})});return postData};Orb.strRepeat=function(str,count){var finalStr=[];while(count-->0){finalStr.push(str)
}return finalStr.join("")};Orb.strEndsWith=function(str,suffix){return str.indexOf(suffix,str.length-suffix.length)!==-1
};Orb.regexQuote=function(strRegex){return strRegex.replace(/([.?*+^$[\]\\(){}-])/g,"\\$1")};Orb.strIsEmail=function(email){if(email.indexOf("@")===-1){return false
}var parts=email.split("@");if(parts.length!=2){return false}var regexName=/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*$/i;
var regexDomain=/^(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+(?:[A-Z]{2,15})$/i;var regexIp=/^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/i;
if(!regexName.test(parts[0])){return false}if(!regexDomain.test(parts[1])&&!regexIp.test(parts[1])){return false
}return true};Orb.enablePhraseEl=function(phraseId,parentEl){var phraseEl,phraseClass=phraseId.replace(/\./g,"_");
if(parentEl){$(parentEl).find(".dp-phrase-switch").removeClass("dp-phrase-on");$(parentEl).find("."+phraseClass).addClass("dp-phrase-on")
}else{phraseEl=$("."+phraseClass);if(phraseEl[0]){$(phraseEl.parent()).find(".dp-phrase-text").removeClass("dp-phrase-on");
phraseEl.addClass("dp-phrase-on")}}};Orb.phraseTextEl=function(el,vars){if(!DeskPRO_Window.translate){return
}var phraseText=el.data("phrase-text");phraseText=DeskPRO_Window.translate.phraseWithString(phraseText,vars,true);
if(el.data("phrase-html")){el.html(phraseText)}else{el.text(phraseText)}return el};Orb.arrayChunk=function(array,size){var newArray=[],chunk=[],i;
for(i=0;i<array.length;i++){if(chunk.length==size){newArray.push(chunk);chunk=[]}if(chunk.length<size){chunk.push(array[i])
}}if(chunk.length){newArray.push(chunk)}return newArray};Orb.getSelectionCoords=function(sel){var range,rect;
if(sel.rangeCount){range=sel.getRangeAt(0).cloneRange();try{if(range.getClientRects){range.collapse(true);
rect=range.getClientRects()[0];if(rect){return null}return{left:rect.left,top:rect.top}}}catch(e){return null
}}else{if(sel.type&&sel.type!="Control"&&sel.createRange){range=sel.createRange();range.collapse(true);
if(range.boundingLeft&&range.boundingTop){return{left:range.boundingLeft,top:range.boundingTop}}}}return null
};(function(){var cleanupCallbacks=[];var origRemove=jQuery.fn.remove;var origEmpty=jQuery.fn.empty;jQuery.addElementCleanupCallback=function(fn){cleanupCallbacks.push(fn)
};jQuery.fn.empty=function(){var i;if(this.length){for(i=0;i<cleanupCallbacks.length;i++){cleanupCallbacks[i](this,"empty")
}}return origEmpty.apply(this,arguments)};jQuery.fn.remove=function(){var i;if(this.length){for(i=0;i<cleanupCallbacks.length;
i++){cleanupCallbacks[i](this,"remove")}}return origRemove.apply(this,arguments)}})();Orb.cancelEvent=function(ev){ev.stopPropagation();
ev.preventDefault()};Orb.shimClickCallback_shim=null;Orb.shimClickCallback_stack=[];Orb.shimClickCallback=function(callback,zIndex){if(!Orb.shimClickCallback_shim){Orb.shimClickCallback_shim=$("<div/>").hide();
Orb.shimClickCallback_shim.css({position:"absolute",top:0,right:0,left:0,bottom:0,background:"transparent"});
Orb.shimClickCallback_shim.appendTo("body");Orb.shimClickCallback_shim.on("click",function(ev){Orb.cancelEvent(ev);
Orb.shimClickCallbackPop(false,[ev])})}Orb.shimClickCallback_stack.push([callback,zIndex]);if(Orb.shimClickCallback_shim.data("zindex-class")){Orb.shimClickCallback_shim.removeClass(Orb.shimClickCallback_shim.data("zindex-class"))
}Orb.shimClickCallback_shim.addClass(zIndex).data("zindex-class",zIndex);Orb.shimClickCallback_shim.show()
};Orb.shimClickCallbackPop=function(no_callback,args){var lvl=Orb.shimClickCallback_stack.pop();if(lvl&&!no_callback){lvl[0].call(args)
}if(Orb.shimClickCallback_stack.length){if(Orb.shimClickCallback_shim.data("zindex-class")){Orb.shimClickCallback_shim.removeClass(Orb.shimClickCallback_shim.data("zindex-class"))
}Orb.shimClickCallback_shim.addClass(Orb.shimClickCallback_stack[Orb.shimClickCallback_stack.length-1][1]).data("zindex-class",Orb.shimClickCallback_stack[Orb.shimClickCallback_stack.length-1][1]);
Orb.shimClickCallback_shim.show()}else{Orb.shimClickCallback_shim.hide()}};Orb.resourceLoader={batches:{},batchesCallback:{},loadScript:function(src,callback){this.loadBatch([{type:"script",url:src}],callback)
},loadStylesheet:function(url,callback){this.loadBatch([{type:"css",url:url}],callback)},loadBatch:function(resources,callback){var batchId=Orb.uuid();
var head=$("head");this.batches[batchId]=[];this.batchesCallback[batchId]=callback;var res=null;while(res=resources.shift()){var resourceId=Orb.uuid();
var fn=function(){Orb.resourceLoader._resourceDoneLoading(batchId,resourceId)};if(res.type=="script"){var tag=document.createElement("script");
tag.type="text/javascript";tag.src=res.url}else{if(res.type=="stylesheet"){var tag=document.createElement("link");
tag.rel="stylesheet";tag.type="text/css";tag.href=res.url;tag.media="screen";if(res.media!=undefined){tag.media=res.media
}}}tag.onreadystatechange=function(){if(this.readyState=="complete"){fn()}};tag.onload=fn;this.batches[batchId].push(resourceId)
}},_resourceDoneLoading:function(batchId,resourceId){if(this.batches[batchId]==undefined){return false
}this.batches[batchId].erase(resourceId);if(!this.batches[batchId].length){var callback=this.batchesCallback[batchId];
delete this.batches[batchId];delete this.batchesCallback[batchId];callback()}}};Orb.DesktopNotify=(function(){if(window.webkitNotifications){var supported=true
}else{var supported=false}this.isSupported=function(){return supported};if(supported&&window.webkitNotifications.checkPermission()!=0){hasPermission=true
}var hasPermission=this.hasPermission=function(){return(supported&&window.webkitNotifications.checkPermission()!=0)
};this.askPermission=function(callback){if(!supported||hasPermission()){return}callback=callback||function(){};
window.webkitNotifications.requestPermission(callback)};this.show=function(options){if(!supported||!hasPermission()){return
}options=$.extend({},options,{iconUrl:null,title:"",content:"",click:null,show:null,close:null,error:null});
var notif=window.webkitNotifications.createNotification(options.iconUrl,options.title,options.content);
if(options.click){notif.onclick=options.click}if(options.show){notif.onshow=options.show}if(options.close){notif.onclose=options.close
}if(options.error){notif.onerror=options.error}return notif};this.showUrl=function(options){if(typeof options=="string"){options={url:options}
}var notif=window.webkitNotifications.createHTMLNotification(options.url);if(options.click){notif.onclick=options.click
}if(options.show){notif.onshow=options.show}if(options.close){notif.onclose=options.close}if(options.error){notif.onerror=options.error
}return notif};return this})();$.fn.single_double_click=function(single_click_callback,double_click_callback,timeout){timeout=timeout||250;
return this.each(function(){var clicks=0;var self=this;if($.browser.msie){$(this).bind("dblclick",function(event){clicks=2;
double_click_callback.call(self,event)});$(this).bind("click",function(event){setTimeout(function(){if(clicks!=2){single_click_callback.call(self,event)
}clicks=0},timeout)})}else{$(this).bind("click",function(event){clicks++;if(clicks==1){setTimeout(function(){if(clicks==1){single_click_callback.call(self,event)
}else{double_click_callback.call(self,event)}clicks=0},timeout)}})}})};jQuery.fn.extend({insertAtCaret:function(myValue){return this.each(function(i){if(document.selection){this.focus();
sel=document.selection.createRange();sel.text=myValue;this.focus()}else{if(this.selectionStart||this.selectionStart=="0"){var startPos=this.selectionStart;
var endPos=this.selectionEnd;var scrollTop=this.scrollTop;this.value=this.value.substring(0,startPos)+myValue+this.value.substring(endPos,this.value.length);
this.focus();this.selectionStart=startPos+myValue.length;this.selectionEnd=startPos+myValue.length;this.scrollTop=scrollTop
}else{this.value+=myValue;this.focus()}}})},setCaretPosition:function(caretPos){return $.proxy(function(){if(this.createTextRange){var range=this.createTextRange();
range.move("character",caretPos);range.select()}else{if(this.selectionStart){this.focus();this.setSelectionRange(caretPos,caretPos)
}else{this.focus()}}},this.get(0))},getCaretPosition:function(){return $.proxy(function(){if(document.selection&&document.selection.createRange){var range=document.selection.createRange();
var bookmark=range.getBookmark();return bookmark.charCodeAt(2)-2}else{if(this.setSelectionRange){return this.selectionStart
}else{return 0}}},this.get(0))}});function strtotime(str,now){var i,match,s,strTmp="",parse="";strTmp=str;
strTmp=strTmp.replace(/\s{2,}|^\s|\s$/g," ");strTmp=strTmp.replace(/[\t\r\n]/g,"");if(strTmp=="now"){return(new Date()).getTime()/1000
}else{if(!isNaN(parse=Date.parse(strTmp))){return(parse/1000)}else{if(now){now=new Date(now*1000)}else{now=new Date()
}}}strTmp=strTmp.toLowerCase();var __is={day:{"sun":0,"mon":1,"tue":2,"wed":3,"thu":4,"fri":5,"sat":6},mon:{"jan":0,"feb":1,"mar":2,"apr":3,"may":4,"jun":5,"jul":6,"aug":7,"sep":8,"oct":9,"nov":10,"dec":11}};
var process=function(m){var ago=(m[2]&&m[2]=="ago");var num=(num=m[0]=="last"?-1:1)*(ago?-1:1);switch(m[0]){case"last":case"next":switch(m[1].substring(0,3)){case"yea":now.setFullYear(now.getFullYear()+num);
break;case"mon":now.setMonth(now.getMonth()+num);break;case"wee":now.setDate(now.getDate()+(num*7));break;
case"day":now.setDate(now.getDate()+num);break;case"hou":now.setHours(now.getHours()+num);break;case"min":now.setMinutes(now.getMinutes()+num);
break;case"sec":now.setSeconds(now.getSeconds()+num);break;default:var day;if(typeof(day=__is.day[m[1].substring(0,3)])!="undefined"){var diff=day-now.getDay();
if(diff==0){diff=7*num}else{if(diff>0){if(m[0]=="last"){diff-=7}}else{if(m[0]=="next"){diff+=7}}}now.setDate(now.getDate()+diff)
}}break;default:if(/\d+/.test(m[0])){num*=parseInt(m[0],10);switch(m[1].substring(0,3)){case"yea":now.setFullYear(now.getFullYear()+num);
break;case"mon":now.setMonth(now.getMonth()+num);break;case"wee":now.setDate(now.getDate()+(num*7));break;
case"day":now.setDate(now.getDate()+num);break;case"hou":now.setHours(now.getHours()+num);break;case"min":now.setMinutes(now.getMinutes()+num);
break;case"sec":now.setSeconds(now.getSeconds()+num);break}}else{return false}break}return true};match=strTmp.match(/^(\d{2,4}-\d{2}-\d{2})(?:\s(\d{1,2}:\d{2}(:\d{2})?)?(?:\.(\d+))?)?$/);
if(match!=null){if(!match[2]){match[2]="00:00:00"}else{if(!match[3]){match[2]+=":00"}}s=match[1].split(/-/g);
for(i in __is.mon){if(__is.mon[i]==s[1]-1){s[1]=i}}s[0]=parseInt(s[0],10);s[0]=(s[0]>=0&&s[0]<=69)?"20"+(s[0]<10?"0"+s[0]:s[0]+""):(s[0]>=70&&s[0]<=99)?"19"+s[0]:s[0]+"";
return parseInt(this.strtotime(s[2]+" "+s[1]+" "+s[0]+" "+match[2])+(match[4]?match[4]/1000:""),10)}var regex="([+-]?\\d+\\s"+"(years?|months?|weeks?|days?|hours?|min|minutes?|sec|seconds?"+"|sun\\.?|sunday|mon\\.?|monday|tue\\.?|tuesday|wed\\.?|wednesday"+"|thu\\.?|thursday|fri\\.?|friday|sat\\.?|saturday)"+"|(last|next)\\s"+"(years?|months?|weeks?|days?|hours?|min|minutes?|sec|seconds?"+"|sun\\.?|sunday|mon\\.?|monday|tue\\.?|tuesday|wed\\.?|wednesday"+"|thu\\.?|thursday|fri\\.?|friday|sat\\.?|saturday))"+"(\\sago)?";
match=strTmp.match(new RegExp(regex,"gi"));if(match==null){return false}for(i=0;i<match.length;i++){if(!process(match[i].split(" "))){return false
}}return(now.getTime()/1000)}
/*! Copyright (c) 2008 Brandon Aaron (http://brandonaaron.net)
 * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
 * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
 */
(function($){var scrollbarWidth=0;
$.getScrollbarWidth=function(){if(!scrollbarWidth){if($.browser.msie){var $textarea1=$('<textarea cols="10" rows="2"></textarea>').css({position:"absolute",top:-1000,left:-1000}).appendTo("body"),$textarea2=$('<textarea cols="10" rows="2" style="overflow: hidden;"></textarea>').css({position:"absolute",top:-1000,left:-1000}).appendTo("body");
scrollbarWidth=$textarea1.width()-$textarea2.width();$textarea1.add($textarea2).remove()}else{var $div=$("<div />").css({width:100,height:100,overflow:"auto",position:"absolute",top:-1000,left:-1000}).prependTo("body").append("<div />").find("div").css({width:"100%",height:200});
scrollbarWidth=100-$div.width();$div.parent().remove()}}return scrollbarWidth}})(jQuery);(function($){$.fn.autoGrowInput=function(o){o=$.extend({maxWidth:1000,minWidth:0,comfortZone:10},o);
this.filter("input:text").each(function(){var minWidth=o.minWidth||$(this).width(),val="",input=$(this),testSubject=$("<tester/>").css({position:"absolute",top:-9999,left:-9999,width:"auto",fontSize:input.css("fontSize"),fontFamily:input.css("fontFamily"),fontWeight:input.css("fontWeight"),letterSpacing:input.css("letterSpacing"),whiteSpace:"nowrap"}),check=function(){if(val===(val=input.val())){return
}var escaped=val.replace(/&/g,"&amp;").replace(/\s/g,"&nbsp;").replace(/</g,"&lt;").replace(/>/g,"&gt;");
testSubject.html(escaped);var testerWidth=testSubject.width(),newWidth=(testerWidth+o.comfortZone)>=minWidth?testerWidth+o.comfortZone:minWidth,currentWidth=input.width(),isValidWidthChange=(newWidth<currentWidth&&newWidth>=minWidth)||(newWidth>minWidth&&newWidth<o.maxWidth);
if(isValidWidthChange){input.width(newWidth)}};testSubject.insertAfter(input);$(this).bind("keyup keydown blur update",check);
check()});return this}})(jQuery);if(!Date.prototype.toISOString){Date.prototype.toISOString=function(){function pad(n){return n<10?"0"+n:n
}return this.getUTCFullYear()+"-"+pad(this.getUTCMonth()+1)+"-"+pad(this.getUTCDate())+"T"+pad(this.getUTCHours())+":"+pad(this.getUTCMinutes())+":"+pad(this.getUTCSeconds())+"Z"
}}if(typeof DP_DEBUG=="undefined"||!DP_DEBUG){DP_DEBUG=false}var DP={console:{error:function(){},log:function(){},warn:function(){},info:function(){},debug:function(){},trace:function(){}},init:function(){if(typeof window.console!="undefined"){DP.console=window.console
}["error","log","warn","info","debug","trace"].each(function(v){if(!DP.console[v]){DP.console[v]=function(){}
}});delete DP.init},rteTextarea:function(field,options){options=options||{};if(!field){return}field=$(field);
if(!field.closest("body")){return}defaultOptions={script_url:ASSETS_BASE_URL+"/vendor/tiny_mce/tiny_mce_src.js",skin:"o2k7",skin_variant:"silver",theme:"advanced",plugins:"fullscreen,table,wordcount",theme_advanced_buttons1:"bold,italic,underline,|,justifyleft,justifycenter,justifyright,|,forecolor,backcolor,|,styleselect,fontselect,fontsizeselect",theme_advanced_buttons2:"bullist,numlist,|,outdent,indent,|,link,unlink,anchor,dp_media,image,|,hr,tablecontrols,|,pasteword,visualaid,code,removeformat,fullscreen",theme_advanced_buttons3:"",theme_advanced_toolbar_location:"top",theme_advanced_toolbar_align:"left",theme_advanced_resizing:true,theme_advanced_statusbar_location:"bottom",theme_advanced_path:false,relative_urls:false,width:"100%",content_css:ASSETS_BASE_URL+"/stylesheets/user/content-editor.css",style_formats:[{title:"Paragraph",block:"p"},{title:"Heading 1",block:"h2"},{title:"Heading 2",block:"h3"},{title:"Heading 3",block:"h4"},{title:"Heading 4",block:"h5"},{title:"Quote",block:"blockquote"},{title:"Code Box",block:"code",classes:"codebox"}]};
var oldsetup=options.setup||function(){};options.setup=function(ed){ed.addButton("dp_media",{title:"Upload Image",image:ASSETS_BASE_URL+"/images/agent/icons/picture_add.png",onclick:function(){MEDIA_MANAGER_WINDOW.bindToEditor(ed);
MEDIA_MANAGER_WINDOW.open()}});oldsetup(ed)};options=Object.merge(defaultOptions,options||{});return field.tinymce(options)
},convertTextToWysiwygHtml:function(text,pOneLine){if(!text.length){return""}text=text.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;");
if(pOneLine){text="<p>"+text.replace(/\r?\n/g,"</p>\n\n<p>")+"</p>"}else{text="<p>"+text.replace(/\r?\n/g,"<br>\n").replace(/<br>\n<br>\n/g,"</p>\n\n<p>")+"</p>"
}if(!$.browser.msie){text=text.replace(/<p><\/p>/g,"<p><br></p>")}return text},drawBox:function(w,h){if(this.lastBox){this.lastBox.remove();
this.lastBox=null}this.lastBox=$('<div style="background-color: #263343; position: absolute; width: '+w+"px; height: "+h+'px; z-index: 99999999;"></div>');
var left=($(window).width()/2)-(w/2);var top=($(window).height()/2)-(h/2);this.lastBox.css({left:left,top:top}).appendTo("body").show();
return this.lastBox},removeDrawnBox:function(){if(this.lastBox){this.lastBox.remove();this.lastBox=null
}},select:function(el,options){if(el.data("select2")){return}if(el.length&&el.length>1){el.each(function(){DP.select($(this),options)
});return}var options=options||{};if(el.data("style-type")){switch(el.data("style-type")){case"icons":var iconSize=el.data("select-icon-size");
if(!iconSize){iconSize=16}iconSize=parseInt(iconSize);var addCss="";var addCssLh="";if(iconSize!=16){addCss="padding-left: "+(iconSize+4)+"px; line-height: "+iconSize+"px";
addCssLh="line-height: "+iconSize+"px"}options.addWidth=iconSize+35;el.addClass("dpe_select-with-icon dpe_select-with-icon-"+iconSize);
options.addResultClass="with-icon";options.formatResult=function(result){if(typeof result.id==="undefined"){return Orb.escapeHtml(result.text)
}var opt=el.find('option[value="'+result.id+'"]');var name=Orb.escapeHtml(opt.text());if(opt.data("icon")){return'<div class="result-icon" style="background-image: url('+opt.data("icon")+");"+addCss+'">'+name+"</div>"
}else{return'<div class="result-icon no-icon" style="'+addCssLh+'">'+name+"</div>"}};options.formatSelection=function(data){var opt=el.find('option[value="'+data.id+'"]');
if(!opt){return""}var name=Orb.escapeHtml(opt.text());if(opt.data("icon")){return{type:"html",value:'<span class="choice-icon" style="background-image: url('+opt.data("icon")+"); padding-left: "+(iconSize+5)+'px">'+name+"</span>"}
}else{return name}};break;case"urgency":options.formatResult=function(data){var name=Orb.escapeHtml(data.text);
if(data.id<=0){return name}return'<span class="urgency urgency-'+data.id+'"><i>'+name+"</i></span>"};
options.formatSelection=function(data){var name=Orb.escapeHtml(data.text);if(data.id<=0){return name}return{type:"html",value:'<span class="urgency urgency-'+data.id+'"><i>'+name+"</i></span>"}
};break}}else{var withFullTitle=el.find("option[data-full-title]");if(withFullTitle[0]){withFullTitle.each(function(){$(this).data("single-title",$(this).text().trim());
$(this).text($(this).data("full-title"))});options.formatSelection=function(data){var n=$("<span/>").text(data.text);
return{type:"el",value:n}};options.formatResult=function(result){var opt=el.find('option[value="'+result.id+'"]');
if(!opt||!opt[0]){return $("<span/>").text(result.text||"")}var name=opt.data("single-title")||result.text;
name=$("<span/>").text(name);return name}}}if(el.data("select-nogrouptitle")){options.noGroupTitle=true
}if(el.data("select-width")=="auto"){var shrink;if(el.data("select-width-shrink")){shrink=parseInt(el.data("select-width-shrink"),10)
}else{shrink=15}if(el.parent().width()){options.width=el.parent().width()-shrink+"px"}else{var path=[];
var shown=[];var testEl=el.parent();while(testEl&&testEl.is(":hidden")){path.push(testEl);testEl=testEl.parent()
}if(testEl){for(var i=path.length-1;i>=0;i--){if(path[i].is(":hidden")){path[i].show();shown.push(path[i])
}}options.width=(el.parent().width()-shrink)+"px";for(var i=0;i<shown.length;i++){shown[i].hide()}}}}else{if(el.data("select-width")){options.width=el.data("select-width")
}else{options.width=function(){var select_el=el;var largest=0,label,charsize=6,tmp;select_el.find("> *").each(function(){var el=$(this);
if(el.is("optgroup")){tmp=$.trim(el.attr("label")).length*charsize;if(tmp>largest){largest=tmp}el.find("option").each(function(){var s_el=$(this);
tmp=($.trim(s_el.text()).length*charsize)+22;if(tmp>largest){largest=tmp}})}else{tmp=($.trim(el.text()).length*charsize)+10;
if(tmp>largest){largest=tmp}}});largest+=35;var maxWidth=parseInt(el.css("max-width"));if(largest>maxWidth){largest=maxWidth
}return largest+"px"}}}if(el.data("select-clear")){options.allowClear=true}if(el.data("placeholder")){options.placeholder=el.data("placeholder")
}if(el.data("autocomplete-url")){options=$.extend(true,{ajax:{url:el.data("autocomplete-url"),dataType:"json",quietMillis:250,data:function(term,page){return{q:term}
},results:function(data,page){if(data.results){data=data.results}var results=[];for(var i=0;i<data.length;
i++){results.push({id:data[i].id,text:data[i].name})}return{more:false,results:results}}},initSelection:function(element,callback){var data=[];
if(element.val().length){$.ajax({url:el.data("autocomplete-url"),method:"get",data:{ids:element.val().split(",")},success:function(json){if(json.results){json=json.results
}var data=[];for(var i=0;i<json.length;i++){data.push({id:json[i].id,text:json[i].name})}callback(data)
},failure:function(){callback([])}})}else{callback([])}callback(data)}},options);if(el.data("multiple")){options.multiple=true
}}el.find("option").each(function(){var opt=$(this);if(!$.trim(opt.text())){opt.html("&nbsp;")}});if(!options.addWidth){options.addWidth=18
}if(el.is("[multiple]")||options.multiple){options.addWidth=null;if(!options.width||options.width){options.width="95%"
}}options.formatNoMatches=function(){return""};if(el.data("invisible-trigger")){options.containerCssClass=(options.containerCssClass||"")+" invisible-trigger";
options.dropdownCssClass=(options.dropdownCssClass||"")+" invisible-trigger"}else{if(el.data("invisible-trigger-right")){options.containerCssClass=(options.containerCssClass||"")+" invisible-trigger right";
options.dropdownCssClass=(options.dropdownCssClass||"")+" invisible-trigger right"}}if(el.data("dropdown-css-class")){options.dropdownCssClass=(options.dropdownCssClass||"")+" "+el.data("dropdown-css-class")
}if(el.data("dropdown-nosearch")){options.dropdownCssClass=(options.dropdownCssClass||"")+" dp-select2-nosearch"
}if(el.data("label-bound")){var boundEl=$(el.data("label-bound"));var updateBoundEl=function(){var text=[];
el.find(":selected").each(function(){text.push($.trim($(this).text()))});boundEl.text(text.join(", "))
};$(el).on("change",updateBoundEl);updateBoundEl()}el.addClass("with-select2");el.select2(options)}};
DP.init();if(!Orb){var Orb={}}Orb.Class=function(properties){if(properties.DisableParentCall){function checkParentUse(obj){return false
}}else{if(typeof ORB_CLASS_DO_PARENT_DETECT=="undefined"){ORB_CLASS_DO_PARENT_DETECT=(function(){xyz}).toString().indexOf("xyz")!=-1
}function checkParentUse(obj){if(!ORB_CLASS_DO_PARENT_DETECT){return true}return obj.toString().indexOf("this.parent(")!=-1
}}delete properties.DisableParentCall;if(!properties.Extends){properties.Extends=function(){}}var parent_class=properties.Extends;
var parent_proto=parent_class.prototype;parent_class.__is_prototyping=true;var proto=new parent_class;
delete parent_class.__is_prototyping;delete properties.Extends;if(properties.Implements){for(var i=0,n=properties.Implements.length;
i!=n;++i){var mixin=properties.Implements[i];for(var name in mixin){if(!mixin.prototype||mixin.prototype.hasOwnProperty(name)){if(typeof mixin[name]=="function"){proto[name]=mixin[name]
}}}}}delete properties.Implements;var static_props=null;if(properties.ClassVars){static_props=properties.ClassVars;
delete properties.ClassVars}if(properties.destroy){properties.__destroy=properties.destroy;properties.destroy=(function(old){return function(){if(!this.OBJ_DESTROYED){old.apply(this)
}this.OBJ_DESTROYED=true}})(properties.__destroy)}else{properties.destroy=(function(){return function(){this.OBJ_DESTROYED=true
}})()}for(var name in properties){if(properties.prototype&&!properties.prototype.hasOwnProperty(name)){continue
}var value=properties[name];if(typeof value=="function"){if(name!="destroy"&&checkParentUse(value)){value=(function(func,name){return function(){this.parent=parent_proto[name];
return func.apply(this,arguments)}})(value,name)}proto[name]=value}else{console.error("[Orb.Class] Non-function property in class: %o extends %o",this,properties);
throw"Error: Non-function property in class";return}}var newClass;newClass=function(){if(newClass.__is_prototyping){return this
}this.CLASS=newClass;this.SUPER=parent_class;this.OBJ_ID=Orb.uuid();this.OBJ_DESTROYED=false;if(this.initialize){this.initialize.apply(this,arguments)
}return this};if(static_props){for(name in static_props){if(!static_props.prototype||static_props.prototype.hasOwnProperty(name)){newClass[name]=static_props[name]
}}}newClass.prototype=proto;newClass.constructor=newClass;delete properties;delete static_props;delete name;
delete value;delete checkParentUse;return newClass};Orb.createNamespace("Orb.Util");Orb.Util.Options={setOptions:function(setOptions){var options=$.extend(true,{},this.options||{},setOptions);
if(this.addEvent){for(var option in options){if(option=="defaultEventContext"){this.setDefaultEventContext(options[option]);
delete options[option]}else{if(typeof options[option]=="function"&&(/^on[A-Z]/).test(option)){this.addEvent(option,options[option]);
delete options[option]}}}}this.options=options;return this},getOption:function(option,default_value){if(typeof this.options[option]===undefined){return default_value
}return this.options[option]}};Orb.createNamespace("Orb.Util");Orb.Util.Events={__initEventsObj:function(){if(!this.__events){this.__events={};
this.__events_tagged={};this.__preventCleanupTagged=false}},setDefaultEventContext:function(context){this.__events_default_context=context
},normalizeEventName:function(type){return type.toLowerCase().replace(/^on/,"")},addEvent:function(type,fn,context,tags,beginning){this.__initEventsObj();
type=this.normalizeEventName(type);if(!context){context=this.__events_default_context}if(!this.__events[type]){this.__events[type]=[]
}if(beginning&&this.__events[type].length){var newVal=[];newVal.push([fn,context]);for(var i=0;i<this.__events[type].length;
i++){newVal.push(this.__events[type][i])}this.__events[type]=newVal}else{this.__events[type].push([fn,context])
}if(context&&context.OBJ_ID){tags=(tags||[]).push(context.OBJ_ID)}else{if(fn.OBJ_ID){tags=(tags||[]).push(fn.OBJ_ID)
}}if(tags){Array.each(tags,function(tag){if(!this.__events_tagged[tag]){this.__events_tagged[tag]=[]}this.__events_tagged[tag].push([type,fn,context])
},this)}return this},addEvents:function(events,context,tags){for(var type in events){this.addEvent(type,events[type],context,tags)
}return this},fireEvent:function(type,args,delay){this.__initEventsObj();type=this.normalizeEventName(type);
if(!this.__events[type]){return this}var defaultContext=this.__events_default_context||this;args=Array.from(args);
Object.each(this.__events[type],function(fn_info){if(delay){fn_info[0].delay(delay,fn_info[1]||defaultContext,args)
}else{fn_info[0].apply(fn_info[1]||defaultContext,args)}});return this},removeEvent:function(type,fn,context){var newFns=[],hasChange=false;
this.__initEventsObj();type=this.normalizeEventName(type);if(!this.__events[type]){return this}if(!context){context=null
}Array.each(this.__events[type],function(fn_info){if(fn_info[0]==fn&&fn_info[1]==context){hasChange=true
}else{newFns.push(fn_info)}});if(hasChange){this.__events[type]=newFns;if(!this.__preventCleanupTagged){this.__cleanupTaggedEvents()
}}return this},removeEvents:function(events,context){var type;this.__initEventsObj();this.__preventCleanupTagged=true;
for(type in this.__events){if(events&&events!=type){continue}var fns=this.__events[type];for(var i=fns.length;
i--;){if(i in fns){this.removeEvent(type,fns[i],context)}}}this.__preventCleanupTagged=false;this.__cleanupTaggedEvents();
return this},removeTaggedEvents:function(tag){if(!this.__events_tagged[tag]){return}this.__preventCleanupTagged=true;
Array.each(this.__events_tagged[tag],function(x){this.removeEvent(x[0],x[1],x[2])},this);this.__preventCleanupTagged=false;
this.__cleanupTaggedEvents()},__cleanupTaggedEvents:function(){return;Object.each(this.__events_tagged,function(tag_fns,tag){var newTaggedFns=[],hasChange=false;
Array.each(tag_fns,function(tag_fn){if(fn!=tag_fn){newTaggedFns.push(fn)}else{hasChange=true}});if(hasChange){if(newTaggedFns.length){this.__events_tagged[tag]=newTaggedFns
}else{delete this.__events_tagged[tag]}}else{newTaggedFns=null}},this)}};Orb.createNamespace("Orb.Util");
Orb.Util.TimeAgo={_watchTimer:null,refreshPeriod:60000,phrases:{"sec_less":"1 second","sec":"1 second","secs":"{0} seconds","min":"1 minute","mins":"{0} minutes","hour":"1 hour","hours":"{0} hours","day":"1 day","days":"{0} days","week":"1 week","weeks":"{0} weeks","month":"1 month","months":"{0} months","year":"1 year","years":"{0} years","ago":"ago"},get:function(date,ago,relativeCutoff,title){return this.getForMs(this.getDateDiff(date),ago,relativeCutoff,title)
},applyToElements:function(els){var self=this;els.each(function(el){$(el).addClass("timeago-auto-update");
self.refreshElements([el])});if(this._watchTimer===null){this._watchTimer=window.setInterval(this.refreshElements.bind(this),this.refreshPeriod)
}},applyToJquery:function($els){this.applyToElements($els.toArray())},refreshElements:function(els){if(!els){els=$(".timeago-auto-update").toArray()
}var self=this;els.each(function(el){if(!el||!el.parentNode){return}el=$(el);el.addClass("with-timeago");
if(!el.data("timeago")){var isTime=el.get(0).tagName.toLowerCase()=="time";var iso8601=isTime&&el.attr("datetime")?el.attr("datetime"):el.attr("title");
if(!iso8601||typeof iso8601!="string"){return}var s=iso8601.replace(/\.\d\d\d+/,"");s=s.replace(/-/,"/").replace(/-/,"/");
s=s.replace(/T/," ").replace(/Z/," UTC");s=s.replace(/([\+-]\d\d)\:?(\d\d)/," $1$2");var titleText=$.trim(el.text());
if(titleText.length>0){el.attr("title",titleText)}el.data("timeago",{datetime:new Date(s),relativeCutoff:el.data("relative-cutoff")||0,title:titleText})
}var data=el.data("timeago");if(!isNaN(data.datetime)){var ago=true;if(el.data("timeago-no-ago")=="1"){ago=false
}else{if(data.datetime>(new Date())){ago=false}}var text=self.get(data.datetime,ago,data.relativeCutoff,data.title);
el.text(text)}})},getRelativeInfo:function(ms){var secs=0,mins=0,hours=0,days=0,years=0;secs=parseInt(ms/1000);
years=parseInt(secs/29030400);secs-=years*29030400;days=parseInt(secs/86400);secs-=days*86400;hours=parseInt(secs/3600);
secs-=hours*3600;mins=parseInt(secs/60);secs-=mins*60;return{"secs":secs,"mins":mins,"hours":hours,"days":days,"years":years}
},getForMs:function(ms,ago,relativeCutoff,title){var info=this.getRelativeInfo(ms);var total_secs=parseInt(ms/1000);
if(title&&relativeCutoff&&total_secs>relativeCutoff){return title}if(total_secs<60){return this.getPhraseFor("sec",total_secs,ago)
}else{if(total_secs<=7200){return this.getPhraseFor("min",info.mins+(info.hours*60),ago)}else{if(total_secs<=86400){var fraction;
if(info.mins<=15){fraction=""}else{if(info.mins<=30){fraction="¼"}else{if(info.mins<=45){fraction="½"
}else{if(info.mins<=60){fraction="¾"}}}}var phrase_num=info.hours;var phrase_hours=info.hours+"";if(fraction!==""){phrase_num+=1;
phrase_hours=(info.hours||1)+""+fraction}return this.getPhraseFor("hour",phrase_hours,ago,phrase_num)
}else{if(total_secs<=259200){var phrase_days=this.getPhraseFor("day",info.days,ago);if(info.hours>0){phrase_days+=" "+this.getPhraseFor("hour",info.hours,ago)
}return phrase_days}else{if(total_secs<=2419200){return this.getPhraseFor("day",info.days,ago)}else{if(total_secs<=7257600){var weeks=parseInt(info.days/7);
return this.getPhraseFor("week",weeks,ago)}else{if(total_secs<=29030400){var months=parseInt(info.days/30);
return this.getPhraseFor("month",months,ago)}else{if(total_secs<=145152000){var phrase_years=this.getPhraseFor("year",info.years,ago);
if(info.months>0){phrase_years+=" "+this.getPhraseFor("month",info.months,ago)}return phrase_years}else{return this.getPhraseFor("year",info.years,ago)
}}}}}}}}},getDateDiff:function(date,secs){var now_ts=(new Date()).getTime();var date_ts=date.getTime();
var diff;if(now_ts<date_ts){diff=date_ts-now_ts}else{diff=now_ts-date_ts}if(diff<0){return 0}if(secs){diff/=1000
}return diff},getPhraseFor:function(type,num,ago,num_exact){if(!num_exact){num_exact=num}if(window.Orb_Util_TimeAgo_getPhraseFor){if(num<0){num=0
}return window.Orb_Util_TimeAgo_getPhraseFor(type,num,ago)}if(type=="sec"&&num_exact<=0){return this.phrases["sec_less"]
}var k=type;if(num_exact!=1){k+="s"}var phrase=this.phrases[k];if(ago){phrase+=" "+this.phrases["ago"]
}phrase=phrase.replace(/\{0\}/g,num);return phrase}};if(jQuery){jQuery.fn.timeago=function(){Orb.Util.TimeAgo.applyToJquery(this);
return this}}Orb.createNamespace("Orb.Compat.WebForms");Orb.Compat.WebForms.isPlaceholderSupported=function(){this.isSupported=null;
if(this.isSupported===null){this.isSupported=("placeholder" in document.createElement("input"))}return this.isSupported
};Orb.Compat.WebForms.placeholder=function(input){if(!input){return null}input_col=$(input);if(!input_col.length){return null
}input_col.each(function(){var input=$(this);if(input.placeholder&&this.isPlaceholderSupported()){return
}var placeholder=input.attr("placeholder");if(!placeholder||!placeholder.length){return}if(input.is(".has-placeholder")){return
}input.addClass("has-placeholder");if(input.val()===""||input.val()==placeholder){input.val(placeholder);
input.addClass("placeholder-visible")}input.focus(function(){if(input.is(".placeholder-visible")){input.val("");
input.removeClass("placeholder-visible")}});input.blur(function(){if(input.val()===""){input.addClass("placeholder-visible");
input.val(placeholder)}else{input.removeClass("placeholder-visible")}});if(input.get(0)&&input.get(0).form){$(input.get(0).form).submit(function(){if(input.is(".placeholder-visible")){input.val("")
}})}})};if(!Array.prototype.forEach){Array.prototype.forEach=function(fun){if(this===void 0||this===null){throw new TypeError()
}var t=Object(this);var len=t.length>>>0;if(typeof fun!=="function"){throw new TypeError()}var thisArg=arguments.length>=2?arguments[1]:void 0;
for(var i=0;i<len;i++){if(i in t){fun.call(thisArg,t[i],i,t)}}}}if(!Array.prototype.filter){Array.prototype.filter=function(fun){if(this===void 0||this===null){throw new TypeError()
}var t=Object(this);var len=t.length>>>0;if(typeof fun!="function"){throw new TypeError()}var res=[];
var thisArg=arguments.length>=2?arguments[1]:void 0;for(var i=0;i<len;i++){if(i in t){var val=t[i];if(fun.call(thisArg,val,i,t)){res.push(val)
}}}return res}}if(!Array.prototype.map){Array.prototype.map=function(fun){if(this===void 0||this===null){throw new TypeError()
}var t=Object(this);var len=t.length>>>0;if(typeof fun!=="function"){throw new TypeError()}var res=new Array(len);
var thisArg=arguments.length>=2?arguments[1]:void 0;for(var i=0;i<len;i++){if(i in t){res[i]=fun.call(thisArg,t[i],i,t)
}}return res}}Orb.createNamespace("DeskPRO");DeskPRO.IntervalCaller=new Orb.Class({Implements:[Orb.Util.Options],initialize:function(options){this.options={touchResets:true,touchRequired:true,resetTimeForce:0,callback:function(){},context:null,timeout:null,autostart:true};
this.setOptions(options);if(this.options.autostart){this.start()}this.touched=false;this.paused=false;
this.lastTime=new Date()},start:function(){if(this.timer){window.clearTimeout(this.timer);this.timer=null
}this.timer=window.setTimeout(this.exec.bind(this),this.options.timeout)},stop:function(){if(this.timer){window.clearTimeout(this.timer);
this.timer=null}},touch:function(){this.touched=true;if(this.options.touchResets){if(this.options.resetTimeForce){var now=new Date();
var diff=now.getTime()-this.lastTime.getTime();if(diff>this.options.resetTimeForce){return}}this.start()
}},exec:function(force){if(!force&&this.options.touchRequired&&!this.touched){this.start();return}this.lastTime=new Date();
this.touched=false;if(this.options.context){this.options.callback.apply(this.options.context)}else{this.options.callback()
}this.start()},execNow:function(){this.exec()},destroy:function(){this.stop();this.options=null;this.lastTime=null
}});Orb.createNamespace("DeskPRO");DeskPRO.MessageBroker=new Orb.Class({Implements:[Orb.Util.Events],sendMessage:function(name,data){this.fireEvent(name,[data,name]);
var nameparts=name.split(".");var cur_name=null;while(nameparts.pop()){cur_name=nameparts.join(".")+".*";
this.fireEvent(cur_name,[data,cur_name])}},addMessageListener:function(name,callback,context,tags){this.addEvent(name,callback,context,tags)
},removeMessageListener:function(name,callback,context){this.removeEvent(name,callback,context)},removeTaggedListeners:function(tag){this.removeTaggedEvents(tag)
}});Orb.createNamespace("DeskPRO");DeskPRO.BasicWindow=new Orb.Class({Implements:[Orb.Util.Options],initialize:function(options){$("html").addClass("window-active");
window.setTimeout(function(){$("html").addClass("window-active")},1000);var _winshow=function(){$(document).trigger("windowshow");
$("html").addClass("window-active")};var _winhide=function(){$(document).trigger("windowhide");$("html").removeClass("window-active")
};if(
/*@cc_on!@*/
false){document.onfocusin=_winshow;document.onfocusout=_winhide}else{window.onfocus=_winshow;
window.onblur=_winhide}window.onpageshow=_winshow();window.onpagehide=_winhide();this.DEBUG={};this.options=this.getDefaultOptions();
this.registry={};this.messageBroker=new DeskPRO.MessageBroker();this.translate=new DeskPRO.Translate();
if(options){this.setOptions(options)}this.init()},init:function(){},initPage:function(){},getDefaultOptions:function(){return{}
},getTranslate:function(){return this.translate},get:function(id,def){if(this.registry[id]===undefined){return def
}return this.registry[id]},set:function(id,value){this.registry[id]=value},getMessageBroker:function(){return this.messageBroker
},getDebug:function(name){if(this.DEBUG[name]===undefined){return false}return this.DEBUG[name]}});Orb.createNamespace("DeskPRO.UI");
DeskPRO.UI.SimpleTabs=new Orb.Class({Implements:[Orb.Util.Options,Orb.Util.Events],initialize:function(options){this.options={triggerElements:".tab-trigger",activeClassname:"on",context:document,autoSelectFirst:true,effect:null};
this.lastActiveTab=null;this.triggerEls=null;if(options){this.setOptions(options)}this.triggerEls=this.options.triggerElements;
if(typeOf(this.triggerEls)=="string"){this.triggerEls=$(this.triggerEls,this.options.context)}var self=this;
this.triggerEls.on("click",function(ev){ev.cancel=false;ev.tabEl=$(this);self.fireEvent("tabClick",[ev]);
if(!ev.cancel){self._handleTabClick(this,ev)}self.fireEvent("postTabClick",[ev])});if(this.options.autoSelectFirst){var firstTab=this.triggerEls.filter("."+this.options.activeClassname).filter(":visible").first();
if(!firstTab.length){firstTab=this.triggerEls.filter(":visible").first();if(!firstTab.length){firstTab=this.triggerEls.first()
}}if(firstTab.length){var self=this;this.triggerEls.each(function(){self.getContentElFromTab($(this)).hide()
});this.activateTab(firstTab)}}},addTriggerElement:function(el){var self=this;this.triggerEls.add(el);
el.on("click",function(ev){ev.cancel=false;ev.tabEl=$(this);self.fireEvent("tabClick",[ev]);if(!ev.cancel){self._handleTabClick(this,ev)
}})},_handleTabClick:function(el,event){var tab=$(el);this.activateTab(tab,event)},activateTab:function(tabEl,event){if(!tabEl){return
}tabEl=$(tabEl);if(this.lastActiveTab&&this.lastActiveTab.get(0)==tabEl.get(0)){return}var eventData={event:event||null,tabEl:tabEl,lastTabEl:this.lastActiveTab,tabContent:this.getContentElFromTab(tabEl),manager:this,cancel:false};
this.fireEvent("beforeTabSwitch",eventData);if(eventData.cancel){return}delete eventData["cancel"];var showFn=(function(){this.lastActiveTab=tabEl;
this.lastActiveTab.addClass(this.options.activeClassname);var x=eventData.tabContent.addClass(this.options.activeClassname);
this.lastActiveTabContent=eventData.tabContent;var parentContainer=eventData.tabContent.closest(".tabViewDetailContent, .with-page-fragment").first();
if(parentContainer){if(parentContainer.data("page-fragment")){parentContainer.data("page-fragment").updateUi()
}else{parentContainer.find(".with-scroll-handler").each(function(){if($(this).data("scroll_handler")){$(this).data("scroll_handler").updateSize()
}})}}if(this.lastActiveTab&&this.lastActiveTab.data("tab-on-show")){this.lastActiveTab.data("tab-on-show")(eventData)
}if(this.lastActiveTabContent&&this.lastActiveTabContent.data("tab-on-show")){this.lastActiveTabContent.data("tab-on-show")(eventData)
}this.fireEvent("tabSwitch",eventData);if(this.lastActiveTabContent.data("load-url")&&!this.lastActiveTabContent.data("tab-loaded")){this._triggerTabAjaxLoad(this.lastActiveTab,this.lastActiveTabContent,eventData)
}if(this.options.effect=="slide"){x.slideDown("fast")}else{if(this.options.effect=="fade"){x.fadeIn("fast")
}else{x.show()}}x.trigger("dp_simpletabs_show")}).bind(this);if(this.lastActiveTab){this.lastActiveTab.removeClass(this.options.activeClassname);
var x=this.getContentElFromTab(this.lastActiveTab).removeClass(this.options.activeClassname);this.lastActiveTab=null;
if(this.lastActiveTab&&this.lastActiveTab.data("tab-on-hide")){this.lastActiveTab.data("tab-on-hide")(eventData)
}if(this.lastActiveTabContent&&this.lastActiveTabContent.data("tab-on-hide")){this.lastActiveTabContent.data("tab-on-hide")(eventData)
}if(this.options.effect=="slide"){x.slideUp("fast",showFn)}else{if(this.options.effect=="fade"){x.fadeOut("fast",showFn)
}else{x.hide();showFn()}}x.trigger("dp_simpletabs_hide")}else{showFn()}},_triggerTabAjaxLoad:function(tabEl,contentEl,eventData){var self=this;
contentEl.data("tab-loaded",true);delete eventData["cancel"];this.fireEvent("beforeTabLoad",eventData);
if(eventData.cancel){return}$.ajax({url:contentEl.data("load-url"),method:"get",dataType:"html",success:function(html){delete eventData["cancel"];
self.fireEvent("beforeTabLoaded",eventData);if(eventData.cancel){return}contentEl.html(html);eventData.tabContent=self.getContentElFromTab(tabEl);
self.fireEvent("tabLoaded",eventData)}})},getActiveTab:function(){return this.lastActiveTab},getActiveTabContent:function(){return this.getContentElFromTab(this.getActiveTab())
},getContentElFromTab:function(tabEl){if(!tabEl||!tabEl.data||!tabEl.data("tab-for")){DP.console.error("tab has no tab-for: %o",tabEl);
if(console&&console.trace){console.trace()}return $()}if(tabEl.data("tab-for")=="NOOP"){return $()}var el=$(tabEl.data("tab-for"),this.options.context);
if(el.length<1){DP.console.error("no tab content exists for tab: %o",tabEl);console.trace()}return el
},destroy:function(){}});(function($){$.fn.dpTwoSelect=function(options){$(this).each(function(){dpTwoSelectInit($(this),options)
});return this};function dpTwoSelectInit(el,options){var structure=[],has_optgroup=false,uid=0,blankOption,debugMessge,setValue,findValue,placeholder,parentElWrapper,parentEl,childElWrapper,childEl;
options=$.extend({debug:Dp_EnableDebug||false,renderPlaceholders:function(){var wrap=$('<div class="dp-two-select" />');
wrap.append('<div class="dp-parent"><select /></div>');wrap.append('<div class="dp-child"><select /></div>');
return wrap}},options||{});if(options.debug){debugMessge=function(){if(console.log&&console.log.apply){console.log.apply(console,arguments)
}}}else{debugMessge=function(){}}debugMessge("dpTwoSelect: %o %o",el,options);el.find("> optgroup, > option").each(function(){var opt=$(this),sub_structure,has_selected,id;
if(opt.is("optgroup")){sub_structure=[];has_optgroup=true;has_selected=false;opt.find("> option").each(function(){id="dpid_"+(uid++);
sub_structure.push({id:id,value:$(this).val(),label:$.trim($(this).text()),isSelected:$(this).is(":selected"),el:$(this)});
if($(this).is(":selected")){has_selected=true}});id="dpid_"+(uid++);structure.push({id:id,label:$.trim(opt.attr("label")),isGroup:true,value:id,isSelected:has_selected,subs:sub_structure,el:opt})
}else{if(opt.val()===""){blankOption=opt;return}id="dpid_"+(uid++);structure.push({id:id,value:opt.val(),label:$.trim(opt.text()),isSelected:opt.is(":selected"),el:opt})
}});debugMessge("dpTwoSelect structure: %o",structure);if(!has_optgroup){debugMessge("dpTwoSelect no optgroup, skipping");
return}findValue=function(val){var iParent=null,iChild=null;$.each(structure,function(iP,optInfo){if(optInfo.isGroup){if(optInfo.value==val){iParent=iP;
return false}$.each(optInfo.subs,function(iC,subOptInfo){if(subOptInfo.value==val){iParent=iP;iChild=iC;
return false}});if(iParent){return false}}else{if(optInfo.value==val){iParent=iP;iChild=null;return false
}}});if(iParent===null){return null}return[iParent,iChild]};setValue=function(val){var idx=findValue(val),parentOptInfo,subBlankOption,selectedVal,childOptInfo=false;
if(!idx){if(blankOption){placeholder.removeClass("dp-show-child");parentEl.find("option").first().prop("selected",true);
el.find('option[value=""], option:not([value])').first().prop("selected",true).trigger("change")}else{setValue(parentEl.find("option").first().data("dp-id"))
}return false}parentOptInfo=structure[idx[0]];if(idx&&idx[1]!==null&&typeof idx[1]!=="undefined"){childOptInfo=parentOptInfo.subs[idx[1]]
}parentEl.find("option."+parentOptInfo.id).prop("selected",true);if(parentOptInfo.isGroup){childEl.get(0).innerHTML="";
if(blankOption){subBlankOption=blankOption.clone();if(!childOptInfo){subBlankOption.prop("selected",true);
selectedVal=subBlankOption.val()}childEl.append(subBlankOption.clone())}$.each(parentOptInfo.subs,function(i,optInfo){var opt=$("<option />");
opt.addClass(optInfo.id);opt.attr("value",optInfo.value);opt.text(optInfo.label);if(childOptInfo&&optInfo.id==childOptInfo.id){opt.prop("selected",true);
selectedVal=opt.val()}childEl.append(opt)});childEl.hide().show();placeholder.addClass("dp-show-child")
}else{selectedVal=parentOptInfo.value;placeholder.removeClass("dp-show-child")}el.find('option[value="'+selectedVal+'"]').prop("selected",true).trigger("change")
};el.hide().addClass("dp-two-select").data("dp-two-select",this);placeholder=options.renderPlaceholders(el,options);
placeholder.insertAfter(el);parentElWrapper=placeholder.find(".dp-parent");parentEl=parentElWrapper.find("select");
childElWrapper=placeholder.find(".dp-child");childEl=childElWrapper.find("select");if(blankOption){parentEl.append(blankOption.clone())
}$.each(structure,function(i,optInfo){var opt=$("<option />");opt.addClass(optInfo.id).data("dp-id",optInfo.id);
if(optInfo.isGroup){opt.attr("value",optInfo.id);opt.text(optInfo.label)}else{opt.attr("value",optInfo.value);
opt.text(optInfo.label)}parentEl.append(opt)});parentEl.on("change",function(){var opt=$(this).find("option:selected");
var val=opt.val();setValue(val)});childEl.on("change",function(){var val=$(this).val();el.find('option[value="'+val+'"]').prop("selected",true).trigger("change")
});setValue(el.find("option:selected").val());this.setValue=function(val){setValue(val)};this.getOptions=function(){return options
};this.getPlaceholder=function(){return placeholder};this.getParentEl=function(){return parentEl};this.getChildEl=function(){return childEl
}}})(jQuery);Orb.createNamespace("DeskPRO.UI");DeskPRO.UI.Overlay=new Orb.Class({Implements:[Orb.Util.Options,Orb.Util.Events],initialize:function(options){this.objectId=null;
this.options={triggerElement:null,contentMethod:"element",contentElement:null,contentAjax:{url:"",type:"GET",dataType:"html"},iframeUrl:null,iframeId:false,maxHeight:700,maxWidth:900,destroyOnClose:false,customClassname:"",classname:"",isModal:true,zIndex:10001,escapeClose:true,modalClickClose:true,objectGroup:"default",addClose:true,fullScreen:false,fullScreenMargin:"35px"};
this.isThisDestroyed=false;this.hasInit=false;this.hasSentAjax=false;this.elements={};if(options){this.setOptions(options)
}if(this.options.triggerElement){this.setupTriggerElement($(this.options.triggerElement))}if(this.options.zIndex=="none"){this.options.zIndex=""
}if(this.options.escapeClose){$(document).on("keydown",(function(ev){if(ev.which==27){this.closeOverlay()
}}).bind(this))}},getElement:function(){return this.getWrapper()},isOpen:function(){return this.isOverlayOpen()
},isOverlayOpen:function(){if(!this.hasInit){return false}return this.elements.wrapper.is(":visible")
},open:function(){return this.openOverlay()},openOverlay:function(){if(!this.initOverlay()){return}if(this.isOverlayOpen()){return
}var evData={overlay:this,cancel:false};this.fireEvent("beforeOverlayOpened",evData);if(evData.cancel){return
}var zindex=this.options.zIndex;if(zindex=="top"){var zindex=Orb.findHighestZindex()+1}this.elements.modal.css({"z-index":zindex,"position":"fixed","top":0,"right":0,"bottom":0,"left":0});
this.elements.modal.fadeIn(200);var topOffset=$(document).scrollTop();if(this.options.contentMethod=="iframe"){var w=$(window).width()-250;
var h=$(window).height()-150;if(w>this.options.maxWidth){w=this.options.maxWidth}if(h>this.options.maxHeight){h=this.options.maxHeight
}this.elements.wrapper.css({width:w,height:h});$("iframe:first",this.elements.wrapper).css({width:w,height:h-37});
var x=($(window).width()-this.elements.wrapperOuter.outerWidth())/2;var y=($(window).height()-this.elements.wrapperOuter.outerHeight())/2
}else{var w=this.elements.wrapperOuter.outerWidth();var pageW=$(window).width();var leftForCenter=(pageW/2)-(w/2);
var h=this.elements.wrapperOuter.outerHeight();var pageH=$(window).height();var topForCenter=(pageH/2)-(h/2);
this.elements.wrapperOuter.css({"top":topForCenter+topOffset,"left":leftForCenter})}if(true==this.getOption("fullScreen")){this.elements.wrapperOuter.css({"z-index":(zindex?zindex+1:""),"position":"fixed","left":this.getOption("fullScreenMargin"),"right":this.getOption("fullScreenMargin"),"top":this.getOption("fullScreenMargin"),"bottom":this.getOption("fullScreenMargin")})
}else{this.elements.wrapperOuter.css({"z-index":(zindex?zindex+1:""),"position":"fixed","left":leftForCenter})
}this.reposition();this.elements.wrapperOuter.fadeIn(450,(function(){this.fireEvent("overlayOpened",{overlay:this})
}).bind(this))},reposition:function(){if(this.getOption("fullScreen")){return}var w=this.elements.wrapperOuter.outerWidth();
var pageW=$(window).width();var leftForCenter=(pageW/2)-(w/2);var h=this.elements.wrapperOuter.outerHeight();
var pageH=$(window).height();var topForCenter=(pageH/2)-(h/2);var evData={overlay:this,wrapperOuter:this.elements.wrapperOuter,pageW:pageW,pageH:pageH,w:w,h:h,top:topForCenter,left:leftForCenter,setLeft:function(x){this.left=x
},setTop:function(x){this.top=x}};this.fireEvent("position",evData);this.elements.wrapperOuter.css({"top":evData.top,"left":evData.left})
},recalcForResize:function(){if(!this.isOpen()){return}this.reposition()},close:function(){return this.closeOverlay()
},closeOverlay:function(){if(!this.isOverlayOpen()){return}var eventData={overlay:this,cancelClose:false};
this.fireEvent("beforeOverlayClosed",eventData);if(eventData.cancelClose){return}this.elements.modal.fadeOut(450);
this.elements.wrapperOuter.fadeOut(200);this.fireEvent("overlayClosed",{overlay:this});this.fireEvent("close",{overlay:this});
if(this.options.destroyOnClose){this.destroy()}},initOverlay:function(){if(this.hasInit){return true}$(window).bind("resize."+this.OBJ_ID,this.recalcForResize.bind(this));
if(this.options.isModal){this.elements.modal=$('<div class="deskpro-overlay-overlay '+this.options.customClassname+'" style="display:none" />');
this.elements.modal.appendTo("body");if(this.options.modalClickClose){this.elements.modal.on("click",(function(ev){if(ev&&ev.deskpro&&ev.deskpro.cancelClose){return
}this.closeOverlay()}).bind(this))}}this.elements.wrapperOuter=$('<div class="deskpro-overlay-outer '+this.options.customClassname+" "+this.options.classname+'" style="display:none" />');
this.elements.wrapperOuter.appendTo("body");var overlayStyles="";if(true==this.getOption("fullScreen")){overlayStyles="height: 100%"
}this.elements.wrapper=$('<div class="deskpro-overlay '+this.options.customClassname+'" style="'+overlayStyles+'">');
this.elements.wrapper.appendTo(this.elements.wrapperOuter);switch(this.options.contentMethod){case"element":var el=$(this.options.contentElement);
if(el.data("overlay-apply-class")){this.elements.wrapperOuter.addClass(el.data("overlay-apply-class"))
}this._setContent(el);this.hasInit=true;return true;break;case"ajax":if(this.hasSentAjax){return false
}this.hasSentAjax=true;var ajaxConfig=Object.merge(this.options.contentAjax,{success:this._handleAjaxSuccess.bind(this)});
$.ajax(ajaxConfig);this.fireEvent("ajaxStart",{overlay:this});return false;break;case"iframe":var name="iframe_"+Orb.uuid();
var el=$('<iframe name="'+name+'" src="'+this.options.iframeUrl+'"></iframe>');if(this.options.iframeId){el.attr("id",this.options.iframeId)
}this._setContent(el);this.hasInit=true;this.elements.wrapper.addClass("no-pad").addClass("iframe");this.elements.wrapper.find("> .overlay-content").addClass("no-footer");
return true;break}DP.console.error("Unknown content method: %s",this.options.contentMethod);return false
},_handleAjaxSuccess:function(data){var dataEl=$(data);if(dataEl.length!=1){var el=$("<div />");el.append(dataEl)
}else{var el=dataEl}el.show();this._setContent(el);this.hasInit=true;var eventData={overlay:this,ajaxData:data};
this.fireEvent("ajaxDone",eventData);this.openOverlay()},_setContent:function(el){this.elements.wrapper.empty();
el.detach().appendTo(this.elements.wrapper);el.show();if(!$("div.overlay-content:first",el).length){var insideEl=el;
var el=$('<div class="overlay-content" />');insideEl.wrap(el)}if(this.options.title&&!this.elements.wrapper.find(".overlay-title")[0]){this.elements.wrapper.prepend('<div class="overlay-title"><h4></h4></div>').find("h4").text(this.options.title)
}if(this.options.addClose&&!$(".close-trigger, .close-overlay",this.elements.wrapper).length){$(".overlay-title:first",this.elements.wrapper).prepend('<a class="close close-trigger close-overlay">Close</a>')
}$(".overlay-close-trigger, .close-trigger, .close-overlay",this.elements.wrapper).first().on("click",(function(ev){ev.preventDefault();
this.closeOverlay()}).bind(this));if(!$(".overlay-footer:first",el).length){$("div.overlay-content:first",el).addClass("no-footer")
}this.reposition();this.fireEvent("contentSet",{overlay:this,contentEl:el,wrapperEl:this.elements.wrapper})
},setContent:function(el){this._setContent(el)},setupTriggerElement:function(el){el=$(el);var fn=(function(ev){this.openOverlay();
ev.preventDefault()}).bind(this);if(el.is(".dbl-click-trigger")){el.on("dblclick",fn)}else{el.on("click",fn)
}},getWrapper:function(){if(!this._hasInit){this.initOverlay()}return $(this.elements.wrapperOuter)},destroy:function(){this.fireEvent("beforeDestroy",[this]);
if(this.elements.wrapperOuter){this.elements.wrapperOuter.remove()}if(this.elements.modal){this.elements.modal.remove()
}this.isThisDestroyed=true;this.fireEvent("destroyed",[this]);$(window).unbind("."+this.OBJ_ID)},isDestroyed:function(){return this.isThisDestroyed
}});Orb.createNamespace("DeskPRO.User");DeskPRO.User.Window=new Orb.Class({Extends:DeskPRO.BasicWindow,init:function(){this.PAGE=null
},initPage:function(){var self=this;var isIE=(navigator.appVersion.toLowerCase().indexOf("msie")!=-1);
if(isIE){$("html").addClass("browser-ie")}if(!isIE){$(document).bind("drop dragover",function(e){e.preventDefault()
});$(document).bind("dragover",function(e){var timeout=window.dropZoneTimeout;if(!timeout){$("body").addClass("file-drag-over")
}else{clearTimeout(timeout)}window.dropZoneTimeout=setTimeout(function(){window.dropZoneTimeout=null;
$("body").removeClass("file-drag-over")},100)})}var calcHeights=function(){var h=$("#dp_sidebar").height();
$("#dp_content").css({"min-height":h})};if(!window.IS_ADMIN_CONTROLS){calcHeights()}if(this.PAGE){this.PAGE.initPage()
}this.elementHandlers={};this.initFeatures(document);this.initLanguageChoices();$("#dp_footer").css({"display":"block","opacity":1,"visibility":"visible"});
$(".dp-copy").css({"display":"block","opacity":1,"visibility":"visible"}).find("a").css({"display":"inline","opacity":1,"visibility":"visible"});
$('<style type="text/css">#dp_footer, .dp-copy { display: block !important; opacity: 1 !important; visibility: visible !important; } .dp-copy a { display: inline !important; opacity: 1 !important; visibility: visible !important; }</style>').appendTo("head");
if($("html").attr("dir")=="rtl"&&$("#share-this-js").length){var interval;interval=setInterval(function(){var wrapper=$("#stwrapper");
if(wrapper.length){wrapper.css({left:"",right:"-999px"});clearInterval(interval)}},100)}window.setTimeout(function(){self.sessionPing()
},600000);$(".dp-its-a-trap").find("input").on("change keypress",function(){$(this).val("")}).val("")
},sessionPing:function(){var self=this;$.ajax({url:BASE_PATH+"dp.php/session-ping.json?i=u",cache:false,complete:function(){window.setTimeout(function(){self.sessionPing()
},600000)},success:function(data){if(data.request_token){window.DP_REQUEST_TOKEN=data.request_token}}})
},initFeatures:function(contextEl){var self=this;$(".with-handler[data-element-handler]",contextEl).each(function(){var el=$(this);
var className=el.data("element-handler");var classObj=Orb.getNamespacedObject(className);if(!classObj){DP.console.error("Unknown portal handler `%s` on element %o",className,this);
return}if(!el.attr("id")){el.attr("id",Orb.getUniqueId("portal_"))}var obj=new classObj({el:el});self.elementHandlers[el.attr("id")]=obj
});$("form.with-form-validator",contextEl).each(function(){var v=new DeskPRO.Form.FormValidator($(this));
$(this).data("form-validator-inst",v)});$("a.in-overlay").on("click",function(ev){ev.preventDefault();
var el=$(this);var url=el.attr("href");if(url.indexOf("?")!==-1){url+="&_partial"}else{url+="?_partial"
}var overlay=new DeskPRO.UI.Overlay({contentMethod:"ajax",contentAjax:{url:url},destroyOnClose:true});
overlay.open()});$(".timeago").timeago();$("input.datepicker, .datepicker input").datepicker({dateFormat:"yy-mm-dd"});
$(document).on("click",".dp-bound-faded",function(){var parent=$(this).parent();var link=$("a[href]",parent).first();
window.location=link.attr("href")});$(".dp-inplace-drop").each(function(){var sel=$(this).find("select").first();
var label=$(this).find(".dp-opt-label");var updateTitle=function(){var opt=sel.find("option:selected").first();
if(!opt[0]){opt=sel.find("option").first()}label.text(opt.text());if(sel.data("bind-to")){var bound=$(sel.data("bind-to"));
bound.text(opt.text())}};sel.on("change",function(){updateTitle()});updateTitle()});if(typeof $.prototype.popover!="undefined"){$(".dp-help-pop").popover({placement:function(tip,element){var $element=$(element);
var pos=$.extend({},$element.offset(),{width:element.offsetWidth,height:element.offsetHeight});var actualWidth=355;
var actualHeight=200;var boundTop=$(document).scrollTop();var boundLeft=$(document).scrollLeft();var boundRight=boundLeft+$(window).width();
var boundBottom=boundTop+$(window).height();var elementAbove={top:pos.top-actualHeight,left:pos.left+pos.width/2-actualWidth/2};
var elementBelow={top:pos.top+pos.height,left:pos.left+pos.width/2-actualWidth/2};var elementLeft={top:pos.top+pos.height/2-actualHeight/2,left:pos.left-actualWidth};
var elementRight={top:pos.top+pos.height/2-actualHeight/2,left:pos.left+pos.width};var above=isWithinBounds(elementAbove);
var below=isWithinBounds(elementBelow);var left=isWithinBounds(elementLeft);var right=isWithinBounds(elementRight);
function isWithinBounds(elementPosition){return boundTop<elementPosition.top&&boundLeft<elementPosition.left&&boundRight>(elementPosition.left+actualWidth)&&boundBottom>(elementPosition.top+actualHeight)
}var position;if(above){position="top"}else{if(below){position="bottom"}else{if(left){position="left"
}else{position="right"}}}if($("html").attr("dir")=="rtl"){setTimeout(function(){var $tip=$(tip);$tip.css({left:"",right:""});
if(position=="top"||position=="bottom"){$tip.css({right:$(window).width()-pos.left-pos.width/2-$tip.width()/2,left:""})
}else{if(position=="left"){$tip.css({right:$(window).width()-pos.left,left:""})}else{if(position=="right"){$tip.css({right:$(window).width()-pos.left-pos.width-$tip.width(),left:""})
}}}},0)}return position}})}},initLanguageChoices:function(){var select=$("#dp_lang_chooser_form").find("select");
if(!select.length){return}var choices={},selected;select.find("option").each(function(){var $this=$(this);
choices[$this.attr("value")]={name:$this.html(),val:$this.attr("value"),flag:$this.data("flag")};if($this.attr("selected")){selected=$this.attr("value")
}});if(!selected){selected=select.find("option:first").attr("value")}var getChoiceHtml=function(choice){if(choice.flag&&choice.flag.length){return'<img src="'+ASSETS_BASE_URL+"/images/flags/"+choice.flag+'" class="flag" alt="" /> '+choice.name
}else{return'<span class="flag"></span> '+choice.name}};var choiceHtml=$('<span class="language-choice" />'),innerHtml=$('<span class="country-name" />').html(getChoiceHtml(choices[selected]));
choiceHtml.append(innerHtml);choiceHtml.append($('<span class="drop" />'));var choiceMenu=$('<ul class="language-options-list" />').css({display:"none",position:"absolute"});
for(var i in choices){var li=$("<li />").html(getChoiceHtml(choices[i]));(function(choice){li.click(function(){select.val(choice.val);
select.closest("form").submit();choiceMenu.hide();innerHtml.html(getChoiceHtml(choice))})})(choices[i]);
choiceMenu.append(li)}$("#dp").append(choiceMenu);innerHtml.css({width:choiceMenu.outerWidth()-24});var updatePos=function(){if(!choiceMenu.hasClass("open")){return
}var pos=choiceHtml.offset();choiceMenu.css({top:pos.top+choiceHtml.outerHeight(true)-1,left:pos.left})
};$(window).on("resize",updatePos);choiceHtml.click(function(){choiceMenu.addClass("open");updatePos();
choiceMenu.show()});select.hide();select.after(choiceHtml);$(document).click(function(e){if(!choiceHtml.find(e.target).length&&!choiceMenu.find(e.target).length){choiceMenu.hide().removeClass("open")
}})},showAutoSignInOverlay:function(){var overlay=$("#auto-sign-in-overlay"),overlayWidth=overlay.width();
overlay.css({left:Math.floor(($(document.body).width()-overlayWidth)/2)}).show()},getHandler:function(id){return this.handlers[id]
},hasHandler:function(id){return !!this.handlers[id]},setPageHandler:function(page){this.PAGE=page},getPageHandler:function(){return this.PAGE
}});function Orb_Util_TimeAgo_getPhraseFor(type,num,ago){var phrasepre="time";if(ago){phrasepre="time-ago"
}if(type=="min"){type="minute"}else{if(type=="mins"){type="minutes"}else{if(type=="sec"){type="second"
}else{if(type=="secs"){type="seconds"}}}}var phrasename="user.time."+phrasepre+"_x_"+type;if(num==1){var phrasename="user.time."+phrasepre+"_1_"+type
}if(type=="sec"&&num<=0){var phrasename="user.time."+phrasepre+"_less_second"}if(!window.DESKPRO_LANG||!DESKPRO_LANG[phrasename]){if(window.console&&window.console.warn){console.warn("Missing phrase %s",phrasename)
}return"timeago_missing_phrase: "+phrasename}return(DESKPRO_LANG[phrasename]||"").replace(/\{0\}/g,num)
}Orb.createNamespace("DeskPRO");DeskPRO.TouchCaller=new Orb.Class({Implements:[Orb.Util.Options],initialize:function(options){this.options={timeout:0,callback:function(){},context:null,alwaysChange:false};
this.setOptions(options);this.touched=null;this.lastTouch=null;this.lastTime=new Date();this.timeout=null
},touch:function(touch,force){if(touch===""){touch="(empty)"}if(typeof touch=="undefined"||touch==null){this.lastTouch=null;
touch=true}this.touched=touch;if(!force){if(!this.options.alwaysChange&&(this.lastTouch!==null&&this.lastTouch==touch)){return
}var now=new Date();var diff=now.getTime()-this.lastTime.getTime();if(diff<this.options.timeout){if(!this.timeout){this.timeout=window.setTimeout(this.exec.bind(this),this.options.timeout)
}return}}this.exec()},exec:function(){if(this.timeout){window.clearTimeout(this.timeout);this.timeout=null
}this.lastTouch=this.touched;this.touched=null;this.lastTime=new Date();if(this.options.context){this.options.callback.apply(this.options.context)
}else{this.options.callback()}},destroy:function(){if(this.timeout){window.clearTimeout(this.timeout);
this.timeout=null}this.options=null;this.lastTime=null}});Orb.createNamespace("DeskPRO");DeskPRO.Translate=new Orb.Class({initialize:function(loader){this.phrases={};
this.loader=loader||function(id){return"["+id+"]"};if(window.DESKPRO_LANG){this.phrases=window.DESKPRO_LANG
}},getPhraseText:function(phrase_name){if(typeof this.phrases[phrase_name]=="undefined"){this.phrases[phrase_name]=this.loader(phrase_name)
}if(typeof this.phrases[phrase_name]=="undefined"){return null}return this.phrases[phrase_name]},phrase:function(phrase_name,vars,raw){var text=this.getPhraseText(phrase_name)||"["+phrase_name+"]";
return this.phraseWithString(text,vars,raw)},phraseWithString:function(text,vars,raw){if(vars){if(typeof vars.count!="undefined"){text=this.choosePlural(text,vars.count)
}Object.each(vars,function(value,key){var re=new RegExp("{{s*"+Orb.regexQuote(key)+"s*}}","g");if(raw){text=text.replace(re,value)
}else{text=text.replace(re,Orb.escapeHtml(value))}})}return text},hasPhrase:function(phrase_name){if(this.getPhraseText(phrase_name)===null){return false
}return true},choosePlural:function(text,number){var parts=text.split("|");if(number==0||number!=1){return parts[1]
}else{return parts[0]}},testInterval:function(number,interval){var x=0;var number=parseInt(number);interval=interval.trim();
var leftDelimIndex=1;var leftIndex=2;var rightIndex=3;var rightDelimIndex=4;var intervalRe=/({\s*(\-?\d+[\s*,\s*\-?\d+]*)\s*})|([\[\]])\s*(-Inf|\-?\d+)\s*,\s*(\+?Inf|\-?\d+)\s*([\[\]])/;
var match=interval.exec(intervalRe);if(!match){if(window.console&&window.console.error){console.error("Invalid interval: %s",interval)
}return"invalid interval"}if(matches[1]){var nums=matches[2].split(",");for(x=0;x<nums.length;x++){if(number==parseInt(nums[x])){return true
}}}else{var leftNum=match[leftIndex];var rightNum=match[rightIndex];if(leftNum=="-Inf"){leftNum=Number.NEGATIVE_INFINITY
}else{if(leftNum=="Inf"){leftNum=Number.POSITIVE_INFINITY}}if(rightNum=="-Inf"){rightNum=Number.NEGATIVE_INFINITY
}else{if(rightNum=="Inf"){rightNum=Number.POSITIVE_INFINITY}}var leftDelim=match[leftDelimIndex];var rightDelim=match[rightDelimIndex];
if((("["==leftDelim&&number>=leftNum)||number>leftNum)&&(("]"==rightDelim&&number>=rightNum)||number>rightNum)){return true
}}return false}});Orb.createNamespace("DeskPRO.User.ElementHandler");DeskPRO.User.ElementHandler.ElementHandlerAbstract=new Orb.Class({Implements:[Orb.Util.Options],initialize:function(options){this.options={};
if(options){this.setOptions(options)}this.el=null;if(this.options.el){this.el=$(this.options.el)}this.init()
},init:function(){}});Orb.createNamespace("DeskPRO.User.ElementHandler");DeskPRO.User.ElementHandler.MoreLoader=new Orb.Class({Extends:DeskPRO.User.ElementHandler.ElementHandlerAbstract,init:function(){this.listEl=$(".content-list:first ul:first",this.el);
this.moreWrap=$(".content-more:first",this.el);this.moreBtn=$("button:first, a.button:first",this.el).first();
this.loadUrl=this.el.data("load-url");this.currentPage=1;var self=this;this.moreBtn.on("click",function(ev){ev.preventDefault();
ev.stopPropagation();self.loadNextPage()})},loadNextPage:function(){if(this.moreWrap.is(".loading")){return
}this.moreWrap.addClass("loading");var url=this.loadUrl.replace("{page}",this.currentPage+1);if(url.indexOf("?")===-1){url+="?_partial=more"
}else{url+="&_partial=more"}$.ajax({url:url,dataType:"html",context:this,success:function(html){this.insertNewItems(html.trim())
}})},insertNewItems:function(html){if(html.length){var els=$(html)}else{var els=null}this.currentPage++;
this.moreWrap.removeClass("loading");if(!els||!els.length||!els.last().is(".has-more")){this.moreWrap.remove()
}this.listEl.append(els)}});Orb.createNamespace("DeskPRO.User.ElementHandler");DeskPRO.User.ElementHandler.LoginBox=new Orb.Class({Extends:DeskPRO.User.ElementHandler.ElementHandlerAbstract,init:function(){this.loginBox=$("#dp_login_box");
this.loginSection=$(".dp-login-section",this.el);this.resetSection=$(".dp-reset-section",this.el);this._initResetSection()
},_initResetSection:function(){$(".forgot",this.el).on("click",(function(ev){ev.preventDefault();this.showReset()
}).bind(this));$(".back",this.resetSection).on("click",(function(ev){this.hideReset()}).bind(this));$(".dp-do-send",this.resetSection).on("click",(function(ev){ev.preventDefault();
this.sendReset()}).bind(this))},sendReset:function(){this.resetSection.addClass("loading");var postData={"email":$("#dp_login_email").val(),"_dp_security_token":$("#dp_login_box").find('[name="_dp_security_token"]').val()};
$.ajax({url:BASE_URL+"login/reset-password/send.json",type:"POST",data:postData,dataType:"json",context:this,success:function(){this.resetSection.removeClass("loading");
var descEl=$(".dp-reset-desc",this.resetSection);var sentEl=$(".dp-reset-sent",this.resetSection);descEl.slideUp("fast",function(){sentEl.slideDown()
})}})},showReset:function(){this.loginSection.slideUp("fast",(function(){this.resetSection.slideDown("fast")
}).bind(this))},hideReset:function(quick){if(quick){this.resetSection.hide();this.loginSection.show();
$(".dp-reset-desc",this.resetSection).show();$(".dp-reset-sent",this.resetSection).hide()}else{this.resetSection.slideUp("fast",(function(){this.loginSection.slideDown("fast");
$(".dp-reset-desc",this.resetSection).show();$(".dp-reset-sent",this.resetSection).hide()}).bind(this))
}}});Orb.createNamespace("DeskPRO.User.ElementHandler");DeskPRO.User.ElementHandler.NewTicket=new Orb.Class({Extends:DeskPRO.User.ElementHandler.ElementHandlerAbstract,init:function(){this.titleTxt=$("#newticket_ticket_subject");
this.messageTxt=$("#newticket_ticket_message");this.ticketForm=$("#dp_newticket_form");$("#dp_newticket_form").find("select").not(".no-dp-select").dpTwoSelect();
this._initSuggestionsBox();this._initFields();this._initLoginForm(this.el);this._initPreticketStatus()
},_initSuggestionsBox:function(){if(this.el.data("suggestions-url")){this.inlineSuggestions=new DeskPRO.User.InlineSuggestions({elementWrapper:this.el,titleText:this.titleTxt,contentText:this.messageTxt,onResolved:this.setTicketSolvedAjax.bind(this),onResolvedRedirect:this.setTicketSolvedRedirect.bind(this),onNotResolved:this.setTicketUnsolvedAjax.bind(this)})
}},setTicketSolvedAjax:function(content_type,content_id){this.setTicketSolvedStatusAjax(content_type,content_id,false)
},setTicketUnsolvedAjax:function(content_type,content_id){this.setTicketSolvedStatusAjax(content_type,content_id,true)
},setTicketSolvedStatusAjax:function(content_type,content_id,setUnsolved){var preticket_id=$("#dp_newticket_preticket_status_id").val();
if(preticket_id>0){url=BASE_URL+"tickets/new/content-solved-save.json?"+"preticket_status_id="+escape(preticket_id)+"&"+"content_type="+escape(content_type)+"&"+"content_id="+escape(content_id);
if(setUnsolved){url+="&add_unsolved=1"}$.ajax({url:url,type:"GET"})}},setTicketSolvedRedirect:function(url,content_type,content_id){var preticket_id=$("#dp_newticket_preticket_status_id").val();
if(preticket_id>0){url=BASE_URL+"tickets/new/content-solved-redirect?"+"preticket_status_id="+escape(preticket_id)+"&"+"content_type="+escape(content_type)+"&"+"content_id="+escape(content_id)+"&"+"url="+escape(url)
}window.location=url},_initFields:function(){this.depSelect=$("select.department_id, input.department_id",this.el).first();
this.departmentId=-1;var self=this;this.depSelect.on("change",function(){self.handleDepChange()});this.depSelect.data("original-name",this.depSelect.attr("name"));
$("select.category_id, select.priority_id, select.product_id, .dp-two-select select").on("change",function(){self.runChecks()
});this.handleDepChange()},handleDepChange:function(){this.setDepartment(this.depSelect.val())},setDepartment:function(department_id){if(department_id==this.departmentId){return
}this.clearAll();this.departmentId=department_id;var activeDepId=this.departmentId;if(!window.DESKPRO_TICKET_DISPLAY){return
}if(!activeDepId||!window.DESKPRO_TICKET_DISPLAY[activeDepId]){activeDepId=0}var depItems=window.DESKPRO_TICKET_DISPLAY[activeDepId];
this.depItems=depItems;this.depItemsWithChecked=false;DP.console.log("depItems %o",depItems);$(".ticket-display-field").hide();
Array.each(depItems,function(item){var itemId=this.getItemId(item);var itemEl=$("."+itemId).closest(".ticket-display-field");
itemEl.detach().appendTo("#fields_container");if(!item.check){itemEl.show()}else{itemEl.addClass("with-criteria");
this.depItemsWithChecked=true}},this);this.runChecksRecursionCount=0;if(this.depItemsWithChecked){this.runChecks()
}},runChecks:function(){if(this.runChecksRecursionCount>30){console.error("runChecks running too many times: %o",this.depItems);
return}var self=this;var changed=false;$(".with-criteria").each(function(){var el=$(this);var item=self.findItemForEl(el);
if(!item){return}if(item.check(ticketReader)){if(!el.is(":visible")){changed=true}el.show()}else{if(el.is(":visible")){changed=true
}el.hide()}});if(changed){this.runChecksRecursionCount++;this.runChecks();this.runChecksRecursionCount--
}},findItemForEl:function(el){var fieldId=el.data("field-id");var theitem=null;Array.each(this.depItems,function(item){if(item.id==fieldId){theitem=item;
return false}});return theitem},clearAll:function(){$(".ticket-display-field").hide().removeClass("field-enabled with-criteria")
},getItemId:function(item){var itemId=item.field_type;if(item.field_id){itemId+="_"+item.field_id}return itemId
},_initLoginForm:function(context){this.inlineLogin=new DeskPRO.User.InlineLoginForm({context:this.el})
},_initPreticketStatus:function(){$("input, select",this.ticketForm).on("change",(function(){this.updatePreticketStatus()
}).bind(this))},updatePreticketStatus:function(){var formData=this.ticketForm.serializeArray();$.ajax({url:BASE_URL+"tickets/new/save-status",type:"POST",data:formData,dataType:"json",success:function(data){$("#dp_newticket_preticket_status_id").val(data.preticket_status_id)
}})}});Orb.createNamespace("DeskPRO.User.ElementHandler");DeskPRO.User.ElementHandler.FormUploadHandler=new Orb.Class({Extends:DeskPRO.User.ElementHandler.ElementHandlerAbstract,init:function(){var self=this;
var dropZone=this.el;if(this.el.data("drop-document")=="1"){dropZone=$(document)}var options={url:this.el.data("upload-to"),dropZone:dropZone,autoUpload:true,formData:{security_token:this.el.data("security-token")},done:function(e,data){var that=$(this).data("fileupload"),template,preview;
if(!that){return}if(data.context){data.context.each(function(index){var file=($.isArray(data.result)&&data.result[index])||{error:"emptyResult"};
if(file.error&&that._adjustMaxNumberOfFiles){that._adjustMaxNumberOfFiles(1)}that._transition($(this)).done(function(){var node=$(this);
template=that._renderDownload([file]).css("height",node.height()).replaceAll(node);that._forceReflow(template);
that._transition(template).done(function(){data.context=$(this);that._trigger("completed",e,data)})})
})}else{template=that._renderDownload(data.result).appendTo(that.options.filesContainer);that._forceReflow(template);
that._transition(template).done(function(){data.context=$(this);that._trigger("completed",e,data)})}if(that.options.filesContainer){if(!that.options.filesContainer.find(".uploading")[0]){self.el.trigger("dp_upload_all_done")
}}}};this._handleOptions(options);this.el.fileupload(options);$(".dp-fallback",this.el).remove();$(".dp-good-upload",this.el).show()
},_handleOptions:function(options){var el=this.el;if(!options.namespace){options.namespace=Orb.uuid()
}if(!options.dropZone){options.dropZone=$(el)}if(typeof options.autoUpload=="undefined"){options.autoUpload=true
}if(options.uploadTemplate){var setel=options.uploadTemplate}else{var setel=$(".template-upload",el)}if(!setel.attr("id")){var id=Orb.getUniqueId("up");
setel.attr("id",id)}else{var id=setel.attr("id")}delete (options.uploadTemplate);options.uploadTemplateId=id;
if(options.downloadTemplate){var setel=options.downloadTemplate}else{var setel=$(".template-download",el)
}if(!setel.attr("id")){var id=Orb.getUniqueId("up");setel.attr("id",id)}else{var id=setel.attr("id")}delete (options.downloadTemplate);
options.downloadTemplateId=id;if(!options.filesContainer){options.filesContainer=$(el).find(".files")
}options.start=function(){$(el).find(".error").remove()};$(el).on("click",".remove-attach-trigger",function(ev){if($(this).hasClass("delete")){return
}ev.preventDefault();var el=$(this).closest("li");el.slideUp("fast",function(){el.remove()})})}});Orb.createNamespace("DeskPRO.User.ElementHandler");
DeskPRO.User.ElementHandler.TicketList=new Orb.Class({Extends:DeskPRO.User.ElementHandler.ElementHandlerAbstract,init:function(){$("a.close-ticket-trigger").on("click",function(ev){var text="Once a ticket is closed, our agents will not reply to it anymore. Are you sure you want to close this ticket?";
if(!confirm(text)){ev.preventDefault()}})}});Orb.createNamespace("DeskPRO.User.ElementHandler");DeskPRO.User.ElementHandler.TicketView=new Orb.Class({Extends:DeskPRO.User.ElementHandler.ElementHandlerAbstract,init:function(){$(".feedback-link",this.el).each(function(){var el=$(this);
$("a",this).on("click",function(ev){ev.preventDefault();window.open($(this).attr("href"),"feedback","status=no,toolbar=no,location=no,menubar=no,resizable=no,scrollbars=yes,height=310,width=720")
}).on("mouseover",function(){if($(this).is(".helpful")){el.addClass("rating-helpful").removeClass("rating-not-helpful")
}else{el.removeClass("rating-helpful").addClass("rating-not-helpful")}}).on("mouseout",function(){el.removeClass("rating-helpful").removeClass("rating-not-helpful")
})})}});Orb.createNamespace("DeskPRO.User.ElementHandler");DeskPRO.User.ElementHandler.InlineEmailManage=new Orb.Class({Extends:DeskPRO.User.ElementHandler.ElementHandlerAbstract,init:function(){var self=this;
this.emailField=$(".dp-email-field",this.el);this.newEmailField=$(".dp_inline_email_new",this.el);this.emailList=$(".dp-email-manage-list",this.el);
this.controlsEl=$(".dp-email-manage-controls",this.el);$('input[name="dp_inline_email_choice"]',this.controlsEl).on("click",function(){var val=$(this).val();
if(val=="NEW"){self.setNewMode()}else{self.emailField.val(val)}});this.emailError=$(".error-message",this.el);
this.newEmailField.on("keypress",function(ev){if(ev.keyCode==13){ev.preventDefault();ev.stopPropagation()
}});this.newEmailField.on("keyup",function(ev){if(self.mode=="new"){self.emailField.val(self.newEmailField.val())
}self.newEmailField.removeClass("error")});this.mode="normal";if($('input[name="dp_inline_email_choice_radio"]:checked').val()=="NEW"){this.setNewMode()
}$('input[name="dp_inline_email_choice_radio"]').not('[value="NEW"]').on("click",function(){self.setNormalMode();
self.emailField.val($(this).val())});$('input[name="dp_inline_email_choice_radio"][value="NEW"]').on("click",function(){self.emailField.val(self.newEmailField.val());
self.setNewMode()});var changeEmail=$(".change-email",this.el).on("click",function(ev){ev.preventDefault();
self.controlsEl.slideDown("fast");changeEmail.hide();changeEmailClose.show()});var changeEmailClose=$(".change-email-close",this.el).on("click",function(ev){ev.preventDefault();
if($('input[name="dp_inline_email_choice_radio"][value="NEW"]').is(":checked")){var email=self.newEmailField.val();
if(!email||email.indexOf("@")===-1){self.newEmailField.addClass("error").focus();return}}self.controlsEl.slideUp("fast");
changeEmail.show();changeEmailClose.hide()})},setNormalMode:function(){this.mode="normal"},setNewMode:function(){this.mode="new";
this.emailField.val(this.newEmailField.val())}});Orb.createNamespace("DeskPRO.User.ElementHandler");DeskPRO.User.ElementHandler.CommentFormLogin=new Orb.Class({Extends:DeskPRO.User.ElementHandler.ElementHandlerAbstract,init:function(){var self=this;
window.DP_LOGIN_NOTIFY=function(){$("#comments_form_login_area").empty();$.ajax({url:BASE_URL+"_misc/comment-form-login-partial",dataType:"html",success:function(html){$("#comments_form_login_area").html(html)
}})};this.el.find(".auth-popup").click(function(ev){ev.preventDefault();ev.stopPropagation();ev.stopImmediatePropagation();
window.open($(this).attr("href"),"dpauth","width=600,height=400,location=0,menubar=0,scrollbars=0,status=0,toolbar=0,resizable=0")
})}});Orb.createNamespace("DeskPRO.User.ElementHandler.Helper");DeskPRO.User.ElementHandler.FeedbackAgreeBtn=new Orb.Class({Extends:DeskPRO.User.ElementHandler.ElementHandlerAbstract,init:function(){var self=this;
if(this.el.hasClass("dp-feedback-closed")){return}this.el.find(".dp-feedback-btn").on("click",function(){self.voteOnElement(self.el)
})},voteOnElement:function(el){var rating;if(el.is(".dp-voted")){rating=0}else{rating=1}var parentRow=el.closest(".dp-feedback-row");
var old_num=parseInt($("em",el).first().text());if(rating){el.addClass("dp-voted");parentRow.addClass("dp-voted-row");
$("em",el).first().text(old_num+1)}else{el.removeClass("dp-voted");parentRow.removeClass("dp-voted-row");
$("em",el).first().text(old_num-1)}$.ajax({url:el.data("vote-url"),data:{rating:rating},dataType:"json",context:this,type:"POST",success:function(data){if(data.voted){el.addClass("dp-voted");
parentRow.addClass("dp-voted-row")}else{el.removeClass("dp-voted");parentRow.removeClass("dp-voted-row")
}$("em",el).first().text(data.total_rating)}})}});Orb.createNamespace("DeskPRO.User.ElementHandler");
DeskPRO.User.ElementHandler.OmniSearch=new Orb.Class({Extends:DeskPRO.User.ElementHandler.ElementHandlerAbstract,init:function(){var self=this;
this.backdrop=$('<div class="dp-backdrop" />').hide().appendTo("#dp");this.assistEl=$("#dp_search_assist");
this.searchboxEl=$("#dp_search");this.resultsEl=$("div.results",this.assistEl);$("#dp_search_assist").on("click",function(){$("#dp_omnisearch").submit()
});this.searchboxEl.on("focus",this.activateAssist.bind(this));this.backdrop.on("click",function(ev){ev.stopPropagation();
self.deactivateAssist()});this.isActivated=false;this.searchTimer=new DeskPRO.IntervalCaller({touchResets:true,touchRequired:true,resetTimeForce:1500,timeout:750,autostart:true,callback:this.updateResults.bind(this)});
this.searchboxEl.on("keyup",function(ev){if(!$(this).val().trim().length){self.close()}else{self.activateAssist();
if(ev.keyCode=="32"){self.searchTimer.exec(true)}else{self.searchTimer.touch()}}});this.searchboxEl.on("focus",function(){self.activateAssist()
});this.lastTerms=null;$(".foot a",this.assistEl).on("click",function(ev){var el=$(this);if(el.is(".no-omni-trigger")||el.closest("li").is(".no-omni-trigger")){return
}ev.preventDefault();ev.stopPropagation();var url=el.attr("href");url=Orb.appendQueryData(url,"q",self.searchboxEl.val().trim());
window.location=url})},activateAssist:function(){var wasActive=this.isActivated;this.isActivated=true;
this.updatePosition();if(!this.searchboxEl.val().trim().length){this.deactivateAssist()}else{this.open();
if(!wasActive){this.searchTimer.execNow()}}},open:function(){this.assistEl.show();this.backdrop.show()
},deactivateAssist:function(){this.isActivated=false;this.close()},close:function(){this.assistEl.hide();
this.backdrop.hide()},updatePosition:function(){var pos=this.searchboxEl.offset();var w=this.searchboxEl.outerWidth();
var h=this.searchboxEl.outerHeight();this.assistEl.css({top:pos.top+h+1,left:pos.left,width:w-1})},updateResults:function(){if(!this.isActivated){return
}var terms=this.searchboxEl.val().trim();if(terms==this.lastTerms||terms===""){return}this.lastTerms=terms;
this.searchboxEl.addClass("loading");$.ajax({url:BASE_URL+"search/omnisearch/"+encodeURI(terms),dataType:"html",context:this,complete:function(){this.searchboxEl.removeClass("loading")
},success:function(html){if(html.indexOf("<body")!==-1||html.indexOf("<html")!==-1){return}var wrap=$(html);
this.resultsEl.empty();if(!$("li",wrap).length){}else{this.resultsEl.append(wrap);if(this.resultsEl.find("li").length>=10){$("#dp_search_assist").find(".dp-more-link").show()
}else{$("#dp_search_assist").find(".dp-more-link").hide()}this.open()}}})}});Orb.createNamespace("DeskPRO.User.ElementHandler");
DeskPRO.User.SuggestedContentOverlay=new Orb.Class({Implements:[Orb.Util.Options,Orb.Util.Events],initialize:function(options){this.options={template:null,url:null,pageUrl:null,contentType:null,contentId:null,destroyOnClose:true,maxHeight:700,openNear:null};
this.setOptions(options);this.overlayEl=null;this.backdropEl=null;this.runningAjax=false},_initOverlay:function(){if(this._hasInit){return
}this._hasInit=true;var self=this;this.overlayEl=$(this.options.template).hide().appendTo("#dp");this.controlsWrap=$(".dp-controls",this.overlayEl).hide();
this.backdropEl=$('<div class="dp-backdrop dp-faded" />').appendTo("#dp");this.backdropEl.on("click",function(el){self.close()
});$(".dp-close-btn",this.overlayEl).on("click",function(ev){ev.preventDefault();self.close()});this.runningAjax=$.ajax({url:this.options.url,type:"GET",context:this,error:function(){this.close()
},success:function(html){this.controlsWrap.show();$(".dp-content-holder",this.overlayEl).empty().html(html);
$(".dp-section-toggle",this.controlsWrap).on("click",function(ev){ev.preventDefault();var toggleSel=$(this).data("toggle-section");
$(".dp-control-section",self.controlsWrap).fadeOut("fast",function(){window.setTimeout(function(){$(toggleSel,self.controlsWrap).fadeIn()
},150)})});$(".dp-toggle-sel",this.overlayEl).on("click",function(ev){ev.preventDefault();var el=$($(this).data("toggle-sel"),self.overlayEl);
if($(this).is(".open")){$(this).removeClass("open");el.slideUp()}else{if($(this).data("toggle-self")){$(this).slideUp("fast",function(){el.slideDown()
}).addClass("open")}else{el.slideDown();$(this).addClass("open")}}});if(self.options.pageUrl){$(".dp-open-full",this.overlayEl).on("click",function(ev){ev.preventDefault();
window.open(self.options.pageUrl);self.close()});$(".dp-open-full a",this.overlayEl).attr("href",self.options.pageUrl)
}this.fireEvent("init",[this.overlayEl,this.controlsEl,this])}})},open:function(){this._initOverlay();
var pos={top:40,left:100,width:null};this.fireEvent("preOpen",[pos,this]);if(pos.cancel){return}var h=this.overlayEl.height();
var w=this.overlayEl.width();var winH=$(window).height();var winW=$(window).width();h=winH*0.7;w=winW*0.6;
if(h<250){h=250}if(w<400){w=400}if(h>this.options.maxHeight){h=this.options.maxHeight}this.overlayEl.css("height",h);
this.overlayEl.css("width",w);this.overlayEl.css({top:(winH/2)-(h/2),left:(winW/2)-(w/2)});this.overlayEl.fadeIn("fast").addClass("open");
this.backdropEl.show()},close:function(){if(!this._hasInit){return}if(!this.overlayEl.is(".open")){return
}this.overlayEl.fadeOut("fast",(function(){if(this.options.destroyOnClose){this.destroy()}}).bind(this));
this.backdropEl.hide()},destroy:function(){if(this._hasInit){return}this.overlayEl.remove();this.backdropEl.remove();
this.overlayEl=null;this.backdropEl=null;if(this.runningAjax){this.runningAjax.abort();this.runningAjax=null
}}});Orb.createNamespace("DeskPRO.User.ElementHandler");DeskPRO.User.InlineSuggestions=new Orb.Class({Implements:[Orb.Util.Options,Orb.Util.Events],initialize:function(options){this.options={elementWrapper:null,titleText:"#__dp_nomatch",contentText:"#__dp_nomatch"};
this.setOptions(options);this.el=$(this.options.elementWrapper);this.titleTxt=$(this.options.titleText);
this.messageTxt=$(this.options.contentText);this._initSuggestionsBox()},_initSuggestionsBox:function(){this.suggestionsBox=$(".dp-related-search",this.el);
this.resultsEl=$(".results",this.suggestionsBox);this.moreLink=$(".more-link",this.suggestionsBox);this.lastSuggestions=null;
this.lastString=null;this.notAnsweredResults=[];this.hasStartedSearch=false;this.moreLink.on("click",(function(ev){this.moreLink.hide();
$("li",this.resultsEl).show()}).bind(this));this.suggestionsUrl=this.el.data("suggestions-url");this.sugTitleTimer=null;
this.sugMessageTimer=null;this.titleTxt.on("keypress",(function(){if(!this.hasStartedSearch){return}if(this.sugTitleTimer){return
}this.sugTitleTimer=this.updateSuggestions.delay(400,this)}).bind(this));this.titleTxt.on("blur",(function(){this.hasStartedSearch=true;
this.updateSuggestions()}).bind(this));this.messageTxt.on("keypress",(function(){if(!this.hasStartedSearch){return
}if(this.sugMessageTimer){return}this.sugMessageTimer=this.updateSuggestions.delay(1200,this)}).bind(this))
},updateSuggestions:function(){if(this.sugTitleTimer){window.clearTimeout(this.sugTitleTimer);this.sugTitleTimer=null
}if(this.sugMessageTimer){window.clearTimeout(this.sugMessageTimer);this.sugMessageTimer=null}var content=(this.titleTxt.val().trim()+" "+this.messageTxt.val().trim()).trim();
if(this.lastSearchString&&this.lastSearchString==content){return}this.lastSearchString=content;if(!content.length){this.suggestionsBox.hide();
return}if(this.doSuggestResend){return}if(this.isSuggestActive){this.doSuggestResend=true;return}this.isSuggestActive=true;
$.ajax({url:this.suggestionsUrl,dataType:"html",data:{"content":content},context:this,success:function(html){this.isSuggestActive=false;
if(this.doSuggestResend){this.doSuggestResend=false;this.updateSuggestions()}if(this.lastSuggestions&&this.lastSuggestions==html){return
}this.lastSuggestions=html;this.resultsEl.empty().html(html);if(this.notAnsweredResults.length){var x;
for(x=0;x<this.notAnsweredResults.length;x++){$("li."+this.notAnsweredResults[x],this.resultsEl).remove()
}}if(!$("li:first",this.resultsEl).length){this.suggestionsBox.hide();this.lastSuggestions=null}else{if(!this.moreLink.data("has-mored")){this.moreLink.data("has-mored",true);
var count=$("li",this.resultsEl).length;if(count>6){var remainCount=count-6;$(".count",this.moreLink).text(remainCount);
this.moreLink.show();$("li",this.resultsEl).slice(5).hide()}else{this.moreLink.hide()}}else{this.moreLink.hide()
}var self=this;$("li a[href]",this.suggestionsBox).on("click",function(ev){ev.preventDefault();self.openSuggestedContent($(this))
});this.suggestionsBox.show()}}})},openSuggestedContent:function(aEl){var origUrl=aEl.attr("href");var url=Orb.appendQueryData(origUrl,"_partial","overlaySuggest");
var contentType=aEl.data("content-type");var contentId=aEl.data("content-id");var self=this;var tplEl=$(".related-content-overlay-tpl",this.el);
if(!tplEl[0]){window.open(origUrl);return}var overlay=new DeskPRO.User.SuggestedContentOverlay({template:tplEl.get(0).innerHTML,url:url,pageUrl:origUrl,contentType:aEl.data("content-type"),contentId:aEl.data("content-id"),destroyOnClose:true,openNear:$(".dp-related-search",this.el),onInit:(function(overlayEl,controls,overlay){$(".dp-set-answered",controls).on("click",function(ev){ev.preventDefault();
self.fireEvent("resolved",[contentType,contentId,true])});$(".dp-answererd",controls).on("click",function(ev){ev.preventDefault();
var type=$(this).data("type");if(type=="close"){self.fireEvent("resolvedRedirect",[origUrl,contentType,contentId,this])
}else{overlay.close()}});$(".dp-not-answered",controls).on("click",function(ev){ev.preventDefault();self.fireEvent("notResolved",[contentType,contentId,true]);
aEl.parent().addClass("not-answered");self.notAnsweredResults.push(contentType+"-"+contentId);overlay.close()
})}).bind(this)});overlay.open()}});Orb.createNamespace("DeskPRO.User.ElementHandler");DeskPRO.User.InlineLoginForm=new Orb.Class({Implements:[Orb.Util.Options,Orb.Util.Events],initialize:function(options){var self=this;
this.options={emailSel:"#dp_inline_login_email",passwordSel:"#dp_inline_login_pass",context:null};this.setOptions(options);
this.context=this.options.context||document;this._initLoginForm($(".dp-inline-login",this.context))},_initLoginForm:function(wrapper){var self=this;
this.el=wrapper;this.loginWrapper=wrapper;this.passwordRow=$(".dp-inline-login-pass",wrapper);this.nonloginWrapper=$(".dp-inline-non-login",this.context);
this.loginBtn=$(".dp-login-trigger",wrapper);this.loginSection=$(".dp-login-section",this.el);this.resetSection=$(".dp-reset-section",this.el);
$(".dp-inline-login-open",wrapper).on("click",(function(ev){ev.preventDefault();ev.stopPropagation();
if(this.loginWrapper.is(".open")){this.closeLogin()}else{this.openLogin()}}).bind(this));this.loginBtn.on("click",(function(ev){ev.preventDefault();
ev.stopPropagation();this.processLogin()}).bind(this));$(this.options.passwordSel,wrapper).on("keypress",function(ev){if(ev.keyCode==13){ev.preventDefault();
if(self.isOpen()){self.processLogin()}}});$(this.options.emailSel,wrapper).on("keypress",function(ev){if(ev.keyCode==13){ev.preventDefault();
if(self.isOpen()){self.processLogin()}}});this._initResetSection()},isOpen:function(){return this.loginWrapper.is(".open")
},openLogin:function(){this.loginWrapper.addClass("open");this.passwordRow.slideDown("fast");this.nonloginWrapper.animate({opacity:"0.4",duration:"fast"})
},closeLogin:function(){this.passwordRow.slideUp("fast",(function(){this.loginWrapper.removeClass("open")
}).bind(this));this.nonloginWrapper.animate({opacity:"1",duration:"fast"})},processLogin:function(){var postData=[];
postData.push({name:"email",value:$(this.options.emailSel,this.context).val()});postData.push({name:"password",value:$(this.options.passwordSel,this.context).val()});
if(this.loginBtn.is(".mode-advanced")){postData.push({name:"mode",value:"advanced"})}$.ajax({url:BASE_URL+"login/inline-login",type:"POST",data:postData,dataType:"json",context:this,success:function(data){var newEl=$(data.html);
if(data.person_id){DeskPRO_Window.initFeatures(newEl);$("#dp_inline_login_row").replaceWith(newEl);this.nonloginWrapper.css({opacity:"1"})
}else{$("#dp_inline_login_row").replaceWith(newEl);$(".dp-inline-login-pass",newEl).show()}if(data.sections_replace){Object.each(data.sections_replace,function(html,id){$("#"+id).empty().replaceWith(html)
})}this._initLoginForm(newEl);this.fireEvent("success",[data,this])}})},_initResetSection:function(){$(".forgot",this.el).on("click",(function(ev){ev.preventDefault();
this.showReset()}).bind(this));$(".back",this.resetSection).on("click",(function(ev){this.hideReset()
}).bind(this));$(".dp-do-send",this.resetSection).on("click",(function(ev){ev.preventDefault();this.sendReset()
}).bind(this))},sendReset:function(){this.resetSection.addClass("loading");$.ajax({url:BASE_URL+"login/reset-password/send",type:"POST",data:{email:$(this.options.emailSel,this.el).val()},dataType:"json",context:this,success:function(){this.resetSection.removeClass("loading");
var descEl=$(".dp-reset-desc",this.resetSection);var sentEl=$(".dp-reset-sent",this.resetSection);descEl.slideUp("fast",function(){sentEl.slideDown()
})}})},showReset:function(){this.loginSection.slideUp("fast",(function(){this.resetSection.slideDown("fast")
}).bind(this))},hideReset:function(quick){if(quick){this.resetSection.hide();this.loginSection.show();
$(".dp-reset-desc",this.resetSection).show();$(".dp-reset-sent",this.resetSection).hide()}else{this.resetSection.slideUp("fast",(function(){this.loginSection.slideDown("fast");
$(".dp-reset-desc",this.resetSection).show();$(".dp-reset-sent",this.resetSection).hide()}).bind(this))
}}});Orb.createNamespace("DeskPRO.Form");DeskPRO.Form.FormValidator=new Orb.Class({Implements:[Orb.Util.Events],initialize:function(el){var self=this;
this.el=$(el);var attachWaitMessage=this.el.find(".attach-is-loading-warn");var submitting=false;if(this.el.is("form")){this.el.on("submit",function(ev){if(submitting){ev.preventDefault();
return}$(".dp-error").removeClass("dp-error");self.validateAll();if(self.hasErrors()){var debugbox=$("#debug_box");
if(debugbox[0]){var append=["Fields with errors:"];$(".dp-error").each(function(){var field=$(this).find("input, textarea, select").first();
append.push(field.attr("name")||field.attr("id")||field.val())});debugbox.text(debugbox.text()+"\n"+append.join("\n"))
}ev.preventDefault()}else{var isUploading=false;self.el.find(".form-upload-section").each(function(){if($(this).find(".uploading")[0]){isUploading=true;
$(this).one("dp_upload_all_done",function(ev){attachWaitMessage.hide();self.el.submit()});return false
}});if(isUploading){ev.preventDefault();attachWaitMessage.show()}else{submitting=true}}});$("[required]",self.el).each(function(){$(this).attr("required",false)
})}this.refreshElements()},refreshElements:function(){var el=this.el;this.formElements=$("[data-field-validators]",this.el).each(function(){var names,i,validators,className,classObj;
names=$(this).data("field-validators").split(",");validators=[];for(i=0;i<names.length;i++){if($(this).data("field-validators-inst")){Array.each($(this).data("field-validators-inst"),function(v){v.destroy()
});$(this).data("field-validators-inst",null)}var className=names[i].trim();var classObj=Orb.getNamespacedObject(className);
if(!classObj){DP.console.error("Unknown form validator `%s` on element %o",className,this);continue}var obj=new classObj($(this));
validators.push(obj)}if(validators.length){$(this).data("field-validators-inst",validators)}})},validateAll:function(){this.el.find(".dp-error.dp-error-static").removeClass("dp-error");
this.formElements.each(function(){var validators,i;if(!$(this).is(":visible")){return}validators=$(this).data("field-validators-inst");
for(i=0;i<validators.length;i++){validators[i].validate("submit")}})},hasErrors:function(){if($(".dp-error",this.el).filter(":visible").length>0){return true
}return false}});Orb.createNamespace("DeskPRO.Form");DeskPRO.Form.FieldValidator=new Orb.Class({Implements:[Orb.Util.Events],initialize:function(el){this.el=$(el);
if(this.el.data("val-wrap-sel")){this.wrapper=this.el.closest(this.el.data("val-wrap-sel"))}else{this.wrapper=this.el.closest(".dp-form-row, .dp-control-group").first()
}this.init()},init:function(){},setErrorCodes:function(codes){console.log("Errors on %o: %o",this,codes);
this.wrapper.removeClass("dp-error-"+this._getMyErrorCodes().join(" dp-error-"));if(codes&&codes.length){if(typeof codes=="string"){codes=[codes]
}this.wrapper.addClass("dp-error-"+codes.join(" dp-error-"));this.wrapper.addClass("dp-error")}else{if(!this.wrapper.is('[class*="dp-error-"]')){this.wrapper.removeClass("dp-error")
}}},hasError:function(){if(this.wrapper.is(".dp-error-"+this._getMyErrorCodes().join(", .dp-error-"))){return true
}return false},validate:function(action){},_getMyErrorCodes:function(){},destroy:function(){}});Orb.createNamespace("DeskPRO.Form");
DeskPRO.Form.LengthValidator=new Orb.Class({Extends:DeskPRO.Form.FieldValidator,init:function(){var self=this;
this.min=1;this.max=-1;this.excludeBlank=true;if(this.el.data("min-len")){this.min=parseInt(this.el.data("min-len"))
}if(this.el.data("max-len")){this.max=parseInt(this.el.data("max-len"))}if(this.el.data("exclude-blank")){this.excludeBlank=parseInt(this.el.data("exclude-blank"));
this.excludeBlank=this.excludeBlank?true:false}this.el.on("change",function(){self.validate()})},validate:function(action){var len=0;
if(this.el.is("select")){if(this.excludeBlank){$("option:selected",this.el).each(function(){if($(this).val()!="0"&&$(this).val().trim()!==""){len++
}})}else{len=$("option:selected",this.el).length}}else{len=this.el.val().trim().length}var errorCodes=[];
if(this.min>-1&&len<this.min){errorCodes.push("len_too_short")}if(this.max>-1&&len>this.max){errorCodes.push("len_too_long")
}this.setErrorCodes(errorCodes)},_getMyErrorCodes:function(){return["len_too_long","len_too_short"]}});
Orb.createNamespace("DeskPRO.Form");DeskPRO.Form.EmailValidator=new Orb.Class({Extends:DeskPRO.Form.FieldValidator,init:function(){var self=this;
this.el.on("change",function(){self.validate("change")})},validate:function(action){var len=0;var val=this.el.val().trim();
if(val.length<3||val.indexOf("@")<1){this.setErrorCodes(["invalid_email"])}else{this.setErrorCodes([])
}},_getMyErrorCodes:function(){return["invalid_email"]}});Orb.createNamespace("DeskPRO.Form");DeskPRO.Form.RegexValidator=new Orb.Class({Extends:DeskPRO.Form.FieldValidator,init:function(){var self=this;
this.el.on("change",function(){self.validate("change")})},validate:function(action){var len=0;var val=this.el.val().trim();
if(!this.regex){if(this.el.data("regex-modifiers")){this.regex=new RegExp(this.el.data("regex"),this.el.data("regex-modifiers"))
}else{this.regex=new RegExp(this.el.data("regex"))}}if(!this.regex.test(val)){this.setErrorCodes(["pattern_no_match"])
}else{this.setErrorCodes([])}},_getMyErrorCodes:function(){return["pattern_no_match"]}});Orb.createNamespace("DeskPRO.Form");
DeskPRO.Form.TwoLevelSelectValidator=new Orb.Class({Extends:DeskPRO.Form.FieldValidator,init:function(){var self=this;
this.parentSel=$("select.parent-option",this.el);this.childSel=$(".dp-sub-options > select",this.el);
this.parentSel.on("change",function(){self.validate("change")});this.childSel.on("change",function(){self.validate("change")
})},validate:function(action){if(action=="change"&&!this.hasError()){return}var errorCodes=[];var visibleChild=this.childSel.filter(":visible");
if(visibleChild.length){var val=$("option:selected",visibleChild).val();if(val===""||val=="0"){errorCodes.push("select_child_value")
}}else{var val=$("option:selected",this.parentSel).val();if(val===""||val=="0"){errorCodes.push("select_value")
}}this.setErrorCodes(errorCodes)},_getMyErrorCodes:function(){return["select_value","select_child_value"]
}});