/* * jQuery JavaScript Library v1.5.2 * http://jquery.com/ * * Copyright 2011, John Resig * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * * Includes Sizzle.js * http://sizzlejs.com/ * Copyright 2011, The Dojo Foundation * Released under the MIT, BSD, and GPL Licenses. * * Date: Thu Mar 31 15:28:23 2011 -0400 */ (function(aR,aP){function af(b){return aL.isWindow(b)?b:b.nodeType===9?b.defaultView||b.parentWindow:!1}function al(e){if(!cn[e]){var d=aL("<"+e+">").appendTo("body"),f=d.css("display");d.remove();if(f==="none"||f===""){f="block"}cn[e]=f}return cn[e]}function an(e,d){var f={};aL.each(ao.concat.apply([],ao.slice(0,d)),function(){f[this]=e});return f}function c2(){try{return new aR.ActiveXObject("Microsoft.XMLHTTP")}catch(a){}}function cu(){try{return new aR.XMLHttpRequest}catch(a){}}function cw(){aL(aR).unload(function(){for(var b in cz){cz[b](0,1)}})}function cI(B,A){B.dataFilter&&(A=B.dataFilter(A,B.dataType));var z=B.dataTypes,y={},x,w,v=z.length,u,t=z[0],s,r,q,d,b;for(x=1;x=0===h})}function cj(b){return !b||!b.parentNode||b.parentNode.nodeType===11}function ct(d,c){return(d&&d!=="*"?d+".":"")+c.replace(aj,"`").replace(ah,"&")}function cv(J){var I,H,G,F,E,D,C,B,A,z,y,x,w,v=[],u=[],r=aL._data(this,"events");if(J.liveFired!==this&&r&&r.live&&!J.target.disabled&&(!J.button||J.type!=="click")){J.namespace&&(x=new RegExp("(^|\\.)"+J.namespace.split(".").join("\\.(?:.*\\.)?")+"(\\.|$)")),J.liveFired=this;var d=r.live.slice(0);for(C=0;CH){break}J.currentTarget=F.elem,J.data=F.handleObj.data,J.handleObj=F.handleObj,w=F.handleObj.origHandler.apply(F.elem,arguments);if(w===!1||J.isPropagationStopped()){H=F.level,w===!1&&(I=!1);if(J.isImmediatePropagationStopped()){break}}}return I}}function cA(b,h,g){var d=aL.extend({},g[0]);d.type=b,d.originalEvent={},d.liveFired=aP,aL.event.handle.call(h,d),d.isDefaultPrevented()&&g[0].preventDefault()}function ab(){return !0}function ac(){return !1}function aB(d){for(var c in d){if(c!=="toJSON"){return !1}}return !0}function aD(b,h,g){if(g===aP&&b.nodeType===1){g=b.getAttribute("data-"+h);if(typeof g==="string"){try{g=g==="true"?!0:g==="false"?!1:g==="null"?null:aL.isNaN(g)?aF.test(g)?aL.parseJSON(g):g:parseFloat(g)}catch(d){}aL.data(b,h,g)}else{g=aP}}return g}var aN=aR.document,aL=function(){function J(){if(!bh.isReady){try{aN.documentElement.doScroll("left")}catch(d){setTimeout(J,1);return}bh.ready()}}var bh=function(e,d){return new bh.fn.init(e,d,be)},bg=aR.jQuery,bf=aR.$,be,bd=/^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]+)$)/,bc=/\S/,bb=/^\s+/,ba=/\s+$/,Z=/\d/,Y=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,X=/^[\],:{}\s]*$/,W=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,V=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,T=/(?:^|:|,)(?:\s*\[)+/g,R=/(webkit)[ \/]([\w.]+)/,P=/(opera)(?:.*version)?[ \/]([\w.]+)/,N=/(msie) ([\w.]+)/,L=/(mozilla)(?:.*? rv:([\w.]+))?/,I=navigator.userAgent,H,c,b,a=Object.prototype.toString,U=Object.prototype.hasOwnProperty,S=Array.prototype.push,Q=Array.prototype.slice,O=String.prototype.trim,M=Array.prototype.indexOf,K={};bh.fn=bh.prototype={constructor:bh,init:function(d,p,o){var n,m,l,h;if(!d){return this}if(d.nodeType){this.context=this[0]=d,this.length=1;return this}if(d==="body"&&!p&&aN.body){this.context=aN,this[0]=aN.body,this.selector="body",this.length=1;return this}if(typeof d==="string"){n=bd.exec(d);if(!n||!n[1]&&p){return !p||p.jquery?(p||o).find(d):this.constructor(p).find(d)}if(n[1]){p=p instanceof bh?p[0]:p,h=p?p.ownerDocument||p:aN,l=Y.exec(d),l?bh.isPlainObject(p)?(d=[aN.createElement(l[1])],bh.fn.attr.call(d,p,!0)):d=[h.createElement(l[1])]:(l=bh.buildFragment([n[1]],[h]),d=(l.cacheable?bh.clone(l.fragment):l.fragment).childNodes);return bh.merge(this,d)}m=aN.getElementById(n[2]);if(m&&m.parentNode){if(m.id!==n[2]){return o.find(d)}this.length=1,this[0]=m}this.context=aN,this.selector=d;return this}if(bh.isFunction(d)){return o.ready(d)}d.selector!==aP&&(this.selector=d.selector,this.context=d.context);return bh.makeArray(d,this)},selector:"",jquery:"1.5.2",length:0,size:function(){return this.length},toArray:function(){return Q.call(this,0)},get:function(d){return d==null?this.toArray():d<0?this[this.length+d]:this[d]},pushStack:function(f,d,h){var g=this.constructor();bh.isArray(f)?S.apply(g,f):bh.merge(g,f),g.prevObject=this,g.context=this.context,d==="find"?g.selector=this.selector+(this.selector?" ":"")+h:d&&(g.selector=this.selector+"."+d+"("+h+")");return g},each:function(e,d){return bh.each(this,e,d)},ready:function(d){bh.bindReady(),c.done(d);return this},eq:function(d){return d===-1?this.slice(d):this.slice(d,+d+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(Q.apply(this,arguments),"slice",Q.call(arguments).join(","))},map:function(d){return this.pushStack(bh.map(this,function(e,f){return d.call(e,f,e)}))},end:function(){return this.prevObject||this.constructor(null)},push:S,sort:[].sort,splice:[].splice},bh.fn.init.prototype=bh.fn,bh.extend=bh.fn.extend=function(){var u,t,s,r,q,p,o=arguments[0]||{},n=1,m=arguments.length,d=!1;typeof o==="boolean"&&(d=o,o=arguments[1]||{},n=2),typeof o!=="object"&&!bh.isFunction(o)&&(o={}),m===n&&(o=this,--n);for(;n0){return}c.resolveWith(aN,[bh]),bh.fn.trigger&&bh(aN).trigger("ready").unbind("ready")}},bindReady:function(){if(!c){c=bh._Deferred();if(aN.readyState==="complete"){return setTimeout(bh.ready,1)}if(aN.addEventListener){aN.addEventListener("DOMContentLoaded",b,!1),aR.addEventListener("load",bh.ready,!1)}else{if(aN.attachEvent){aN.attachEvent("onreadystatechange",b),aR.attachEvent("onload",bh.ready);var d=!1;try{d=aR.frameElement==null}catch(f){}aN.documentElement.doScroll&&d&&J()}}}},isFunction:function(d){return bh.type(d)==="function"},isArray:Array.isArray||function(d){return bh.type(d)==="array"},isWindow:function(d){return d&&typeof d==="object"&&"setInterval" in d},isNaN:function(d){return d==null||!Z.test(d)||isNaN(d)},type:function(d){return d==null?String(d):K[a.call(d)]||"object"},isPlainObject:function(d){if(!d||bh.type(d)!=="object"||d.nodeType||bh.isWindow(d)){return !1}if(d.constructor&&!U.call(d,"constructor")&&!U.call(d.constructor.prototype,"isPrototypeOf")){return !1}var e;for(e in d){}return e===aP||U.call(d,e)},isEmptyObject:function(e){for(var d in e){return !1}return !0},error:function(d){throw d},parseJSON:function(d){if(typeof d!=="string"||!d){return null}d=bh.trim(d);if(X.test(d.replace(W,"@").replace(V,"]").replace(T,""))){return aR.JSON&&aR.JSON.parse?aR.JSON.parse(d):(new Function("return "+d))()}bh.error("Invalid JSON: "+d)},parseXML:function(d,g,f){aR.DOMParser?(f=new DOMParser,g=f.parseFromString(d,"text/xml")):(g=new ActiveXObject("Microsoft.XMLDOM"),g.async="false",g.loadXML(d)),f=g.documentElement,(!f||!f.nodeName||f.nodeName==="parsererror")&&bh.error("Invalid XML: "+d);return g},noop:function(){},globalEval:function(f){if(f&&bc.test(f)){var d=aN.head||aN.getElementsByTagName("head")[0]||aN.documentElement,g=aN.createElement("script");bh.support.scriptEval()?g.appendChild(aN.createTextNode(f)):g.text=f,d.insertBefore(g,d.firstChild),d.removeChild(g)}},nodeName:function(e,d){return e.nodeName&&e.nodeName.toUpperCase()===d.toUpperCase()},each:function(d,q,p){var o,n=0,m=d.length,l=m===aP||bh.isFunction(d);if(p){if(l){for(o in d){if(q.apply(d[o],p)===!1){break}}}else{for(;n1?aH.call(arguments,0):a,--l||k.resolveWith(k,aH.call(d,0))}}var d=arguments,n=0,m=d.length,l=m,k=m<=1&&f&&aL.isFunction(f.promise)?f:aL.Deferred();if(m>1){for(;n
a";var u=v.getElementsByTagName("*"),t=v.getElementsByTagName("a")[0],s=aN.createElement("select"),r=s.appendChild(aN.createElement("option")),q=v.getElementsByTagName("input")[0];if(u&&u.length&&t){aL.support={leadingWhitespace:v.firstChild.nodeType===3,tbody:!v.getElementsByTagName("tbody").length,htmlSerialize:!!v.getElementsByTagName("link").length,style:/red/.test(t.getAttribute("style")),hrefNormalized:t.getAttribute("href")==="/a",opacity:/^0.55$/.test(t.style.opacity),cssFloat:!!t.style.cssFloat,checkOn:q.value==="on",optSelected:r.selected,deleteExpando:!0,optDisabled:!1,checkClone:!1,noCloneEvent:!0,noCloneChecked:!0,boxModel:null,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableHiddenOffsets:!0,reliableMarginRight:!0},q.checked=!0,aL.support.noCloneChecked=q.cloneNode(!0).checked,s.disabled=!0,aL.support.optDisabled=!r.disabled;var p=null;aL.support.scriptEval=function(){if(p===null){var h=aN.documentElement,l=aN.createElement("script"),k="script"+aL.now();try{l.appendChild(aN.createTextNode("window."+k+"=1;"))}catch(j){}h.insertBefore(l,h.firstChild),aR[k]?(p=!0,delete aR[k]):p=!1,h.removeChild(l)}return p};try{delete v.test}catch(o){aL.support.deleteExpando=!1}!v.addEventListener&&v.attachEvent&&v.fireEvent&&(v.attachEvent("onclick",function d(){aL.support.noCloneEvent=!1,v.detachEvent("onclick",d)}),v.cloneNode(!0).fireEvent("onclick")),v=aN.createElement("div"),v.innerHTML="";var c=aN.createDocumentFragment();c.appendChild(v.firstChild),aL.support.checkClone=c.cloneNode(!0).cloneNode(!0).lastChild.checked,aL(function(){var g=aN.createElement("div"),f=aN.getElementsByTagName("body")[0];if(f){g.style.width=g.style.paddingLeft="1px",f.appendChild(g),aL.boxModel=aL.support.boxModel=g.offsetWidth===2,"zoom" in g.style&&(g.style.display="inline",g.style.zoom=1,aL.support.inlineBlockNeedsLayout=g.offsetWidth===2,g.style.display="",g.innerHTML="
",aL.support.shrinkWrapBlocks=g.offsetWidth!==2),g.innerHTML="
t
";var h=g.getElementsByTagName("td");aL.support.reliableHiddenOffsets=h[0].offsetHeight===0,h[0].style.display="",h[1].style.display="none",aL.support.reliableHiddenOffsets=aL.support.reliableHiddenOffsets&&h[0].offsetHeight===0,g.innerHTML="",aN.defaultView&&aN.defaultView.getComputedStyle&&(g.style.width="1px",g.style.marginRight="0",aL.support.reliableMarginRight=(parseInt(aN.defaultView.getComputedStyle(g,null).marginRight,10)||0)===0),f.removeChild(g).style.display="none",g=h=null}});var a=function(f){var e=aN.createElement("div");f="on"+f;if(!e.attachEvent){return !0}var g=f in e;g||(e.setAttribute(f,"return;"),g=typeof e[f]==="function");return g};aL.support.submitBubbles=a("submit"),aL.support.changeBubbles=a("change"),v=u=t=null}}();var aF=/^(?:\{.*\}|\[.*\])$/;aL.extend({cache:{},uuid:0,expando:"jQuery"+(aL.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(b){b=b.nodeType?aL.cache[b[aL.expando]]:b[aL.expando];return !!b&&!aB(b)},data:function(t,s,r,q){if(aL.acceptData(t)){var p=aL.expando,o=typeof s==="string",n,m=t.nodeType,d=m?aL.cache:t,b=m?t[aL.expando]:t[aL.expando]&&aL.expando;if((!b||q&&b&&!d[b][p])&&o&&r===aP){return}b||(m?t[aL.expando]=b=++aL.uuid:b=aL.expando),d[b]||(d[b]={},m||(d[b].toJSON=aL.noop));if(typeof s==="object"||typeof s==="function"){q?d[b][p]=aL.extend(d[b][p],s):d[b]=aL.extend(d[b],s)}n=d[b],q&&(n[p]||(n[p]={}),n=n[p]),r!==aP&&(n[s]=r);if(s==="events"&&!n[s]){return n[p]&&n[p].events}return o?n[s]:n}},removeData:function(s,r,q){if(aL.acceptData(s)){var p=aL.expando,o=s.nodeType,n=o?aL.cache:s,m=o?s[aL.expando]:aL.expando;if(!n[m]){return}if(r){var d=q?n[m][p]:n[m];if(d){delete d[r];if(!aB(d)){return}}}if(q){delete n[m][p];if(!aB(n[m])){return}}var a=n[m][p];aL.support.deleteExpando||n!=aR?delete n[m]:n[m]=null,a?(n[m]={},o||(n[m].toJSON=aL.noop),n[m][p]=a):o&&(aL.support.deleteExpando?delete s[aL.expando]:s.removeAttribute?s.removeAttribute(aL.expando):s[aL.expando]=null)}},_data:function(e,d,f){return aL.data(e,d,f,!0)},acceptData:function(d){if(d.nodeName){var c=aL.noData[d.nodeName.toLowerCase()];if(c){return c!==!0&&d.getAttribute("classid")===c}}return !0}}),aL.fn.extend({data:function(b,p){var o=null;if(typeof b==="undefined"){if(this.length){o=aL.data(this[0]);if(this[0].nodeType===1){var n=this[0].attributes,m;for(var l=0,h=n.length;l-1){return !0}}return !1},val:function(v){if(!arguments.length){var u=this[0];if(u){if(aL.nodeName(u,"option")){var t=u.attributes.value;return !t||t.specified?u.value:u.text}if(aL.nodeName(u,"select")){var s=u.selectedIndex,r=[],q=u.options,p=u.type==="select-one";if(s<0){return null}for(var o=p?s:0,l=p?s+1:q.length;o=0}else{if(aL.nodeName(this,"select")){var g=aL.makeArray(h);aL("option",this).each(function(){this.selected=aL.inArray(aL(this).val(),g)>=0}),g.length||(this.selectedIndex=-1)}else{this.value=h}}}})}}),aL.extend({attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(t,s,r,q){if(!t||t.nodeType===3||t.nodeType===8||t.nodeType===2){return aP}if(q&&s in aL.attrFn){return aL(t)[s](r)}var p=t.nodeType!==1||!aL.isXMLDoc(t),o=r!==aP;s=p&&aL.props[s]||s;if(t.nodeType===1){var n=ax.test(s);if(s==="selected"&&!aL.support.optSelected){var m=t.parentNode;m&&(m.selectedIndex,m.parentNode&&m.parentNode.selectedIndex)}if((s in t||t[s]!==aP)&&p&&!n){o&&(s==="type"&&aw.test(t.nodeName)&&t.parentNode&&aL.error("type property can't be changed"),r===null?t.nodeType===1&&t.removeAttribute(s):t[s]=r);if(aL.nodeName(t,"form")&&t.getAttributeNode(s)){return t.getAttributeNode(s).nodeValue}if(s==="tabIndex"){var d=t.getAttributeNode("tabIndex");return d&&d.specified?d.value:au.test(t.nodeName)||ar.test(t.nodeName)&&t.href?0:aP}return t[s]}if(!aL.support.style&&p&&s==="style"){o&&(t.style.cssText=""+r);return t.style.cssText}o&&t.setAttribute(s,""+r);if(!t.attributes[s]&&(t.hasAttribute&&!t.hasAttribute(s))){return aP}var b=!aL.support.hrefNormalized&&p&&n?t.getAttribute(s,2):t.getAttribute(s);return b===null?aP:b}o&&(t[s]=r);return t[s]}});var am=/\.(.*)$/,ak=/^(?:textarea|input|select)$/i,aj=/\./g,ah=/ /g,ae=/[^\w\s.|`]/g,ad=function(b){return b.replace(ae,"\\$&")};aL.event={add:function(D,C,B,A){if(D.nodeType!==3&&D.nodeType!==8){try{aL.isWindow(D)&&(D!==aR&&!D.frameElement)&&(D=aR)}catch(z){}if(B===!1){B=ac}else{if(!B){return}}var y,x;B.handler&&(y=B,B=y.handler),B.guid||(B.guid=aL.guid++);var w=aL._data(D);if(!w){return}var v=w.events,u=w.handle;v||(w.events=v={}),u||(w.handle=u=function(c){return typeof aL!=="undefined"&&aL.event.triggered!==c.type?aL.event.handle.apply(u.elem,arguments):aP}),u.elem=D,C=C.split(" ");var t,s=0,d;while(t=C[s++]){x=y?aL.extend({},y):{handler:B,data:A},t.indexOf(".")>-1?(d=t.split("."),t=d.shift(),x.namespace=d.slice(0).sort().join(".")):(d=[],x.namespace=""),x.type=t,x.guid||(x.guid=B.guid);var b=v[t],a=aL.event.special[t]||{};if(!b){b=v[t]=[];if(!a.setup||a.setup.call(D,A,d,u)===!1){D.addEventListener?D.addEventListener(t,u,!1):D.attachEvent&&D.attachEvent("on"+t,u)}}a.add&&(a.add.call(D,x),x.handler.guid||(x.handler.guid=B.guid)),b.push(x),aL.event.global[t]=!0}D=null}},global:{},remove:function(L,K,J,I){if(L.nodeType!==3&&L.nodeType!==8){J===!1&&(J=ac);var H,G,F,E,D=0,C,B,A,z,y,x,w,v=aL.hasData(L)&&aL._data(L),d=v&&v.events;if(!v||!d){return}K&&K.type&&(J=K.handler,K=K.type);if(!K||typeof K==="string"&&K.charAt(0)==="."){K=K||"";for(G in d){aL.event.remove(L,G+K)}return}K=K.split(" ");while(G=K[D++]){w=G,x=null,C=G.indexOf(".")<0,B=[],C||(B=G.split("."),G=B.shift(),A=new RegExp("(^|\\.)"+aL.map(B.slice(0).sort(),ad).join("\\.(?:.*\\.)?")+"(\\.|$)")),y=d[G];if(!y){continue}if(!J){for(E=0;E=0&&(B.type=y=y.slice(0,-1),B.exclusive=!0),z||(B.stopPropagation(),aL.event.global[y]&&aL.each(aL.cache,function(){var a=aL.expando,c=this[a];c&&c.events&&c.events[y]&&aL.event.trigger(B,A,c.handle.elem)}));if(!z||z.nodeType===3||z.nodeType===8){return aP}B.result=aP,B.target=z,A=aL.makeArray(A),A.unshift(B)}B.currentTarget=z;var w=aL._data(z,"handle");w&&w.apply(z,A);var v=z.parentNode||z.ownerDocument;try{z&&z.nodeName&&aL.noData[z.nodeName.toLowerCase()]||z["on"+y]&&z["on"+y].apply(z,A)===!1&&(B.result=!1,B.preventDefault())}catch(u){}if(!B.isPropagationStopped()&&v){aL.event.trigger(B,A,v,!0)}else{if(!B.isDefaultPrevented()){var t,s=B.target,r=y.replace(am,""),q=aL.nodeName(s,"a")&&r==="click",d=aL.event.special[r]||{};if((!d._default||d._default.call(z,B)===!1)&&!q&&!(s&&s.nodeName&&aL.noData[s.nodeName.toLowerCase()])){try{s[r]&&(t=s["on"+r],t&&(s["on"+r]=null),aL.event.triggered=B.type,s[r]())}catch(b){}t&&(s["on"+r]=t),aL.event.triggered=aP}}}},handle:function(x){var w,v,u,t,s,r=[],q=aL.makeArray(arguments);x=q[0]=aL.event.fix(x||aR.event),x.currentTarget=this,w=x.type.indexOf(".")<0&&!x.exclusive,w||(u=x.type.split("."),x.type=u.shift(),r=u.slice(0).sort(),t=new RegExp("(^|\\.)"+r.join("\\.(?:.*\\.)?")+"(\\.|$)")),x.namespace=x.namespace||r.join("."),s=aL._data(this,"events"),v=(s||{})[x.type];if(s&&v){v=v.slice(0);for(var p=0,d=v.length;p-1?aL.map(e.options,function(b){return b.selected}).join("-"):"":e.nodeName.toLowerCase()==="select"&&(f=e.selectedIndex);return f},cC=function cC(b){var h=b.target,g,d;if(ak.test(h.nodeName)&&!h.readOnly){g=aL._data(h,"_change_data"),d=cE(h),(b.type!=="focusout"||h.type!=="radio")&&aL._data(h,"_change_data",d);if(g===aP||d===g){return}if(g!=null||d){b.type="change",b.liveFired=aP,aL.event.trigger(b,arguments[1],h)}}};aL.event.special.change={filters:{focusout:cC,beforedeactivate:cC,click:function(e){var d=e.target,f=d.type;(f==="radio"||f==="checkbox"||d.nodeName.toLowerCase()==="select")&&cC.call(this,e)},keydown:function(e){var d=e.target,f=d.type;(e.keyCode===13&&d.nodeName.toLowerCase()!=="textarea"||e.keyCode===32&&(f==="checkbox"||f==="radio")||f==="select-multiple")&&cC.call(this,e)},beforeactivate:function(d){var c=d.target;aL._data(c,"_change_data",cE(c))}},setup:function(e,d){if(this.type==="file"){return !1}for(var f in cG){aL.event.add(this,f+".specialChange",cG[f])}return ak.test(this.nodeName)},teardown:function(b){aL.event.remove(this,".specialChange");return ak.test(this.nodeName)}},cG=aL.event.special.change.filters,cG.focus=cG.beforeactivate}aN.addEventListener&&aL.each({focus:"focusin",blur:"focusout"},function(d,c){function g(b){var e=aL.event.fix(b);e.type=c,e.originalEvent={},aL.event.trigger(e,null,e.target),e.isDefaultPrevented()&&b.preventDefault()}var h=0;aL.event.special[c]={setup:function(){h++===0&&aN.addEventListener(d,g,!0)},teardown:function(){--h===0&&aN.removeEventListener(d,g,!0)}}}),aL.each(["bind","one"],function(b,d){aL.fn[d]=function(c,p,o){if(typeof c==="object"){for(var n in c){this[d](n,p,c[n],o)}return this}if(aL.isFunction(p)||p===!1){o=p,p=aP}var m=d==="one"?aL.proxy(o,function(e){aL(this).unbind(e,m);return o.apply(this,arguments)}):o;if(c==="unload"&&d!=="one"){this.one(c,p,o)}else{for(var l=0,k=this.length;l0?this.bind(c,b,e):this.trigger(c)},aL.attrFn&&(aL.attrFn[c]=!0)}),function(){function c(t,s,r,q,p,o){for(var n=0,m=q.length;n0){k=l;break}}}l=l[t]}q[n]=k}}}function d(t,s,r,q,p,o){for(var n=0,m=q.length;n+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,K=0,J=Object.prototype.toString,I=!1,H=!0,G=/\\/g,F=/\W/;[0,0].sort(function(){H=!1;return 0});var E=function(Q,O,N,M){N=N||[],O=O||aN;var v=O;if(O.nodeType!==1&&O.nodeType!==9){return[]}if(!Q||typeof Q!=="string"){return N}var p,m,l,k,f,a,V,U,T=!0,S=E.isXML(O),R=[],P=Q;do{L.exec(""),p=L.exec(P);if(p){P=p[3],R.push(p[1]);if(p[2]){k=p[3];break}}}while(p);if(R.length>1&&C.exec(Q)){if(R.length===2&&D.relative[R[0]]){m=b(R[0]+R[1],O)}else{m=D.relative[R[0]]?[O]:E(R.shift(),O);while(R.length){Q=R.shift(),D.relative[Q]&&(Q+=R.shift()),m=b(Q,m)}}}else{!M&&R.length>1&&O.nodeType===9&&!S&&D.match.ID.test(R[0])&&!D.match.ID.test(R[R.length-1])&&(f=E.find(R.shift(),O,S),O=f.expr?E.filter(f.expr,f.set)[0]:f.set[0]);if(O){f=M?{expr:R.pop(),set:z(M)}:E.find(R.pop(),R.length===1&&(R[0]==="~"||R[0]==="+")&&O.parentNode?O.parentNode:O,S),m=f.expr?E.filter(f.expr,f.set):f.set,R.length>0?l=z(m):T=!1;while(R.length){a=R.pop(),V=a,D.relative[a]?V=R.pop():a="",V==null&&(V=O),D.relative[a](l,V,S)}}else{l=R=[]}}l||(l=m),l||E.error(a||Q);if(J.call(l)==="[object Array]"){if(T){if(O&&O.nodeType===1){for(U=0;l[U]!=null;U++){l[U]&&(l[U]===!0||l[U].nodeType===1&&E.contains(O,l[U]))&&N.push(m[U])}}else{for(U=0;l[U]!=null;U++){l[U]&&l[U].nodeType===1&&N.push(m[U])}}}else{N.push.apply(N,l)}}else{z(l,N)}k&&(E(k,v,N,M),E.uniqueSort(N));return N};E.uniqueSort=function(f){if(x){I=H,f.sort(x);if(I){for(var e=1;e0},E.find=function(s,r,q){var p;if(!s){return[]}for(var o=0,n=D.order.length;o":function(j,h){var o,n=typeof h==="string",m=0,l=j.length;if(n&&!F.test(h)){h=h.toLowerCase();for(;m=0)?q||p.push(l):q&&(j[m]=!1))}return !1},ID:function(e){return e[1].replace(G,"")},TAG:function(f,e){return f[1].replace(G,"").toLowerCase()},CHILD:function(f){if(f[1]==="nth"){f[2]||E.error(f[0]),f[2]=f[2].replace(/^\+|\s*/g,"");var e=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(f[2]==="even"&&"2n"||f[2]==="odd"&&"2n+1"||!/\D/.test(f[2])&&"0n+"+f[2]||f[2]);f[2]=e[1]+(e[2]||1)-0,f[3]=e[3]-0}else{f[2]&&E.error(f[0])}f[0]=K++;return f},ATTR:function(j,h,o,n,m,l){var k=j[1]=j[1].replace(G,"");!l&&D.attrMap[k]&&(j[1]=D.attrMap[k]),j[4]=(j[4]||j[5]||"").replace(G,""),j[2]==="~="&&(j[4]=" "+j[4]+" ");return j},PSEUDO:function(a,m,l,k,j){if(a[1]==="not"){if((L.exec(a[3])||"").length>1||/^\w/.test(a[3])){a[3]=E(a[3],null,null,m)}else{var h=E.filter(a[3],m,l,!0^j);l||k.push.apply(k,h);return !1}}else{if(D.match.POS.test(a[0])||D.match.CHILD.test(a[0])){return !0}}return a},POS:function(e){e.unshift(!0);return e}},filters:{enabled:function(e){return e.disabled===!1&&e.type!=="hidden"},disabled:function(e){return e.disabled===!0},checked:function(e){return e.checked===!0},selected:function(e){e.parentNode&&e.parentNode.selectedIndex;return e.selected===!0},parent:function(e){return !!e.firstChild},empty:function(e){return !e.firstChild},has:function(f,e,g){return !!E(g[3],f).length},header:function(e){return/h\d/i.test(e.nodeName)},text:function(f){var e=f.getAttribute("type"),g=f.type;return"text"===g&&(e===g||e===null)},radio:function(e){return"radio"===e.type},checkbox:function(e){return"checkbox"===e.type},file:function(e){return"file"===e.type},password:function(e){return"password"===e.type},submit:function(e){return"submit"===e.type},image:function(e){return"image"===e.type},reset:function(e){return"reset"===e.type},button:function(e){return"button"===e.type||e.nodeName.toLowerCase()==="button"},input:function(e){return/input|select|textarea|button/i.test(e.nodeName)}},setFilters:{first:function(f,e){return e===0},last:function(f,e,h,g){return e===g.length-1},even:function(f,e){return e%2===0},odd:function(f,e){return e%2===1},lt:function(f,e,g){return eg[3]-0},nth:function(f,e,g){return g[3]-0===e},eq:function(f,e,g){return g[3]-0===e}},filter:{PSEUDO:function(r,q,p,o){var n=q[1],m=D.filters[n];if(m){return m(r,p,q,o)}if(n==="contains"){return(r.textContent||r.innerText||E.getText([r])||"").indexOf(q[3])>=0}if(n==="not"){var l=q[3];for(var k=0,j=l.length;k=0}},ID:function(f,e){return f.nodeType===1&&f.getAttribute("id")===e},TAG:function(f,e){return e==="*"&&f.nodeType===1||f.nodeName.toLowerCase()===e},CLASS:function(f,e){return(" "+(f.className||f.getAttribute("class"))+" ").indexOf(e)>-1},ATTR:function(j,h){var o=h[1],n=D.attrHandle[o]?D.attrHandle[o](j):j[o]!=null?j[o]:j.getAttribute(o),m=n+"",l=h[2],k=h[4];return n==null?l==="!=":l==="="?m===k:l==="*="?m.indexOf(k)>=0:l==="~="?(" "+m+" ").indexOf(k)>=0:k?l==="!="?m!==k:l==="^="?m.indexOf(k)===0:l==="$="?m.substr(m.length-k.length)===k:l==="|="?m===k||m.substr(0,k.length+1)===k+"-":!1:m&&n!==!1},POS:function(h,g,m,l){var k=g[2],j=D.setFilters[k];if(j){return j(h,m,g,l)}}}},C=D.match.POS,B=function(f,e){return"\\"+(e-0+1)};for(var A in D.match){D.match[A]=new RegExp(D.match[A].source+/(?![^\[]*\])(?![^\(]*\))/.source),D.leftMatch[A]=new RegExp(/(^(?:.|\r|\n)*?)/.source+D.match[A].source.replace(/\\(\d+)/g,B))}var z=function(f,e){f=Array.prototype.slice.call(f,0);if(e){e.push.apply(e,f);return e}return f};try{Array.prototype.slice.call(aN.documentElement.childNodes,0)[0].nodeType}catch(y){z=function(g,f){var k=0,j=f||[];if(J.call(g)==="[object Array]"){Array.prototype.push.apply(j,g)}else{if(typeof g.length==="number"){for(var h=g.length;k",g.insertBefore(f,g.firstChild),aN.getElementById(h)&&(D.find.ID=function(j,m,l){if(typeof m.getElementById!=="undefined"&&!l){var k=m.getElementById(j[1]);return k?k.id===j[1]||typeof k.getAttributeNode!=="undefined"&&k.getAttributeNode("id").nodeValue===j[1]?[k]:aP:[]}},D.filter.ID=function(j,e){var k=typeof j.getAttributeNode!=="undefined"&&j.getAttributeNode("id");return j.nodeType===1&&k&&k.nodeValue===e}),g.removeChild(f),g=f=null}(),function(){var e=aN.createElement("div");e.appendChild(aN.createComment("")),e.getElementsByTagName("*").length>0&&(D.find.TAG=function(g,f){var k=f.getElementsByTagName(g[1]);if(g[1]==="*"){var j=[];for(var h=0;k[h];h++){k[h].nodeType===1&&j.push(k[h])}k=j}return k}),e.innerHTML="",e.firstChild&&typeof e.firstChild.getAttribute!=="undefined"&&e.firstChild.getAttribute("href")!=="#"&&(D.attrHandle.href=function(f){return f.getAttribute("href",2)}),e=null}(),aN.querySelectorAll&&function(){var g=E,f=aN.createElement("div"),j="__sizzle__";f.innerHTML="

";if(!f.querySelectorAll||f.querySelectorAll(".TEST").length!==0){E=function(Q,P,O,N){P=P||aN;if(!N&&!E.isXML(P)){var M=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(Q);if(M&&(P.nodeType===1||P.nodeType===9)){if(M[1]){return z(P.getElementsByTagName(Q),O)}if(M[2]&&D.find.CLASS&&P.getElementsByClassName){return z(P.getElementsByClassName(M[2]),O)}}if(P.nodeType===9){if(Q==="body"&&P.body){return z([P.body],O)}if(M&&M[3]){var v=P.getElementById(M[3]);if(!v||!v.parentNode){return z([],O)}if(v.id===M[3]){return z([v],O)}}try{return z(P.querySelectorAll(Q),O)}catch(u){}}else{if(P.nodeType===1&&P.nodeName.toLowerCase()!=="object"){var t=P,p=P.getAttribute("id"),l=p||j,k=P.parentNode,a=/^\s*[+~]/.test(Q);p?l=l.replace(/'/g,"\\$&"):P.setAttribute("id",l),a&&k&&(P=P.parentNode);try{if(!a||k){return z(P.querySelectorAll("[id='"+l+"'] "+Q),O)}}catch(R){}finally{p||t.removeAttribute("id")}}}}return g(Q,P,O,N)};for(var h in g){E[h]=g[h]}f=null}}(),function(){var h=aN.documentElement,g=h.matchesSelector||h.mozMatchesSelector||h.webkitMatchesSelector||h.msMatchesSelector;if(g){var l=!g.call(aN.createElement("div"),"div"),k=!1;try{g.call(aN.documentElement,"[test!='']:sizzle")}catch(j){k=!0}E.matchesSelector=function(e,o){o=o.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!E.isXML(e)){try{if(k||!D.match.PSEUDO.test(o)&&!/!=/.test(o)){var n=g.call(e,o);if(n||!l||e.document&&e.document.nodeType!==11){return n}}}catch(m){}}return E(o,null,null,[e]).length>0}}}(),function(){var e=aN.createElement("div");e.innerHTML="
";if(e.getElementsByClassName&&e.getElementsByClassName("e").length!==0){e.lastChild.className="e";if(e.getElementsByClassName("e").length===1){return}D.order.splice(1,0,"CLASS"),D.find.CLASS=function(g,f,h){if(typeof f.getElementsByClassName!=="undefined"&&!h){return f.getElementsByClassName(g[1])}},e=null}}(),aN.documentElement.contains?E.contains=function(f,e){return f!==e&&(f.contains?f.contains(e):!0)}:aN.documentElement.compareDocumentPosition?E.contains=function(f,e){return !!(f.compareDocumentPosition(e)&16)}:E.contains=function(){return !1},E.isXML=function(f){var e=(f?f.ownerDocument||f:0).documentElement;return e?e.nodeName!=="HTML":!1};var b=function(k,j){var q,p=[],o="",n=j.nodeType?[j]:j;while(q=D.match.PSEUDO.exec(k)){o+=q[0],k=k.replace(D.match.PSEUDO,"")}k=D.relative[k]?k+"*":k;for(var m=0,l=n.length;m0){for(var l=o;l0},closest:function(v,u){var t=[],s,r,q=this[0];if(aL.isArray(v)){var p,o,n={},m=1;if(q&&v.length){for(s=0,r=v.length;s-1:aL(q).is(p))&&t.push({selector:o,elem:q,level:m})}q=q.parentNode,m++}}return t}var d=cm.test(v)?aL(v,u||this.context):null;for(s=0,r=this.length;s-1:aL.find.matchesSelector(q,v)){t.push(q);break}q=q.parentNode;if(!q||!q.ownerDocument||q===u){break}}}t=t.length>1?aL.unique(t):t;return this.pushStack(t,"closest",v)},index:function(b){if(!b||typeof b==="string"){return aL.inArray(this[0],b?aL(b):this.parent().children())}return aL.inArray(b.jquery?b[0]:b,this)},add:function(f,d){var h=typeof f==="string"?aL(f,d):aL.makeArray(f),g=aL.merge(this.get(),h);return this.pushStack(cj(h[0])||cj(g[0])?g:aL.unique(g))},andSelf:function(){return this.add(this.prevObject)}}),aL.each({parent:function(d){var c=d.parentNode;return c&&c.nodeType!==11?c:null},parents:function(b){return aL.dir(b,"parentNode")},parentsUntil:function(e,d,f){return aL.dir(e,"parentNode",f)},next:function(b){return aL.nth(b,2,"nextSibling")},prev:function(b){return aL.nth(b,2,"previousSibling")},nextAll:function(b){return aL.dir(b,"nextSibling")},prevAll:function(b){return aL.dir(b,"previousSibling")},nextUntil:function(e,d,f){return aL.dir(e,"nextSibling",f)},prevUntil:function(e,d,f){return aL.dir(e,"previousSibling",f)},siblings:function(b){return aL.sibling(b.parentNode.firstChild,b)},children:function(b){return aL.sibling(b.firstChild)},contents:function(b){return aL.nodeName(b,"iframe")?b.contentDocument||b.contentWindow.document:aL.makeArray(b.childNodes)}},function(d,c){aL.fn[d]=function(j,h){var b=aL.map(this,c,j),a=co.call(arguments);cs.test(d)||(h=j),h&&typeof h==="string"&&(b=aL.filter(h,b)),b=this.length>1&&!cl[d]?aL.unique(b):b,(this.length>1||cq.test(h))&&cr.test(d)&&(b=b.reverse());return this.pushStack(b,d,a.join(","))}}),aL.extend({filter:function(e,d,f){f&&(e=":not("+e+")");return d.length===1?aL.find.matchesSelector(d[0],e)?[d[0]]:[]:aL.find.matches(e,d)},dir:function(b,k,j){var h=[],d=b[k];while(d&&d.nodeType!==9&&(j===aP||d.nodeType!==1||!aL(d).is(j))){d.nodeType===1&&h.push(d),d=d[k]}return h},nth:function(g,f,k,j){f=f||1;var h=0;for(;g;g=g[k]){if(g.nodeType===1&&++h===f){break}}return g},sibling:function(e,d){var f=[];for(;e;e=e.nextSibling){e.nodeType===1&&e!==d&&f.push(e)}return f}});var b6=/ jQuery\d+="(?:\d+|null)"/g,b4=/^\s+/,b2=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,b0=/<([\w:]+)/,a8=/",""],legend:[1,"
","
"],thead:[1,"","
"],tr:[2,"","
"],td:[3,"","
"],col:[2,"","
"],area:[1,"",""],_default:[0,"",""]};a0.optgroup=a0.option,a0.tbody=a0.tfoot=a0.colgroup=a0.caption=a0.thead,a0.th=a0.td,aL.support.htmlSerialize||(a0._default=[1,"div
","
"]),aL.fn.extend({text:function(b){if(aL.isFunction(b)){return this.each(function(a){var d=aL(this);d.text(b.call(this,a,d.text()))})}if(typeof b!=="object"&&b!==aP){return this.empty().append((this[0]&&this[0].ownerDocument||aN).createTextNode(b))}return aL.text(this)},wrapAll:function(d){if(aL.isFunction(d)){return this.each(function(a){aL(this).wrapAll(d.call(this,a))})}if(this[0]){var c=aL(d,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&c.insertBefore(this[0]),c.map(function(){var b=this;while(b.firstChild&&b.firstChild.nodeType===1){b=b.firstChild}return b}).append(this)}return this},wrapInner:function(b){if(aL.isFunction(b)){return this.each(function(a){aL(this).wrapInner(b.call(this,a))})}return this.each(function(){var a=aL(this),d=a.contents();d.length?d.wrapAll(b):a.append(b)})},wrap:function(b){return this.each(function(){aL(this).wrapAll(b)})},unwrap:function(){return this.parent().each(function(){aL.nodeName(this,"body")||aL(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(b){this.nodeType===1&&this.appendChild(b)})},prepend:function(){return this.domManip(arguments,!0,function(b){this.nodeType===1&&this.insertBefore(b,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode){return this.domManip(arguments,!1,function(c){this.parentNode.insertBefore(c,this)})}if(arguments.length){var b=aL(arguments[0]);b.push.apply(b,this.toArray());return this.pushStack(b,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode){return this.domManip(arguments,!1,function(c){this.parentNode.insertBefore(c,this.nextSibling)})}if(arguments.length){var b=this.pushStack(this,"after",arguments);b.push.apply(b,aL(arguments[0]).toArray());return b}},remove:function(f,d){for(var h=0,g;(g=this[h])!=null;h++){if(!f||aL.filter(f,[g]).length){!d&&g.nodeType===1&&(aL.cleanData(g.getElementsByTagName("*")),aL.cleanData([g])),g.parentNode&&g.parentNode.removeChild(g)}}return this},empty:function(){for(var d=0,c;(c=this[d])!=null;d++){c.nodeType===1&&aL.cleanData(c.getElementsByTagName("*"));while(c.firstChild){c.removeChild(c.firstChild)}}return this},clone:function(d,c){d=d==null?!1:d,c=c==null?d:c;return this.map(function(){return aL.clone(this,d,c)})},html:function(b){if(b===aP){return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(b6,""):null}if(typeof b!=="string"||a4.test(b)||!aL.support.leadingWhitespace&&b4.test(b)||a0[(b0.exec(b)||["",""])[1].toLowerCase()]){aL.isFunction(b)?this.each(function(a){var e=aL(this);e.html(b.call(this,a,e.html()))}):this.empty().append(b)}else{b=b.replace(b2,"<$1>");try{for(var h=0,g=this.length;h1&&o0?this.clone(!0):this).get();aL(m[k])[c](a),n=n.concat(a)}return this.pushStack(n,d,m.selector)}}),aL.extend({clone:function(j,d,o){var n=j.cloneNode(!0),m,l,k;if((!aL.support.noCloneEvent||!aL.support.noCloneChecked)&&(j.nodeType===1||j.nodeType===11)&&!aL.isXMLDoc(j)){ck(j,n),m=b9(j),l=b9(n);for(k=0;m[k];++k){ck(m[k],l[k])}}if(d){aT(j,n);if(o){m=b9(j),l=b9(n);for(k=0;m[k];++k){aT(m[k],l[k])}}}return n},clean:function(B,A,z,y){A=A||aN,typeof A.createElement==="undefined"&&(A=A.ownerDocument||A[0]&&A[0].ownerDocument||aN);var x=[];for(var w=0,v;(v=B[w])!=null;w++){typeof v==="number"&&(v+="");if(!v){continue}if(typeof v!=="string"||a6.test(v)){if(typeof v==="string"){v=v.replace(b2,"<$1>");var u=(b0.exec(v)||["",""])[1].toLowerCase(),t=a0[u]||a0._default,s=t[0],r=A.createElement("div");r.innerHTML=t[1]+v+t[2];while(s--){r=r.lastChild}if(!aL.support.tbody){var q=a8.test(v),d=u==="table"&&!q?r.firstChild&&r.firstChild.childNodes:t[1]===""&&!q?r.childNodes:[];for(var c=d.length-1;c>=0;--c){aL.nodeName(d[c],"tbody")&&!d[c].childNodes.length&&d[c].parentNode.removeChild(d[c])}}!aL.support.leadingWhitespace&&b4.test(v)&&r.insertBefore(A.createTextNode(b4.exec(v)[0]),r.firstChild),v=r.childNodes}}else{v=A.createTextNode(v)}v.nodeType?x.push(v):x=aL.merge(x,v)}if(z){for(w=0;x[w];w++){!y||!aL.nodeName(x[w],"script")||x[w].type&&x[w].type.toLowerCase()!=="text/javascript"?(x[w].nodeType===1&&x.splice.apply(x,[w+1,0].concat(aL.makeArray(x[w].getElementsByTagName("script")))),z.appendChild(x[w])):y.push(x[w].parentNode?x[w].parentNode.removeChild(x[w]):x[w])}}return x},cleanData:function(t){var s,r,q=aL.cache,p=aL.expando,o=aL.event.special,n=aL.support.deleteExpando;for(var m=0,l;(l=t[m])!=null;m++){if(l.nodeName&&aL.noData[l.nodeName.toLowerCase()]){continue}r=l[aL.expando];if(r){s=q[r]&&q[r][p];if(s&&s.events){for(var d in s.events){o[d]?aL.event.remove(l,d):aL.removeEvent(l,d,s.handle)}s.handle&&(s.handle.elem=null)}n?delete l[aL.expando]:l.removeAttribute&&l.removeAttribute(aL.expando),delete q[r]}}}});var b5=/alpha\([^)]*\)/i,b3=/opacity=([^)]*)/,b1=/-([a-z])/ig,a9=/([A-Z]|^ms)/g,a7=/^-?\d+(?:px)?$/i,a5=/^-?\d/,a3={position:"absolute",visibility:"hidden",display:"block"},a1=["Left","Right"],aZ=["Top","Bottom"],aY,aX,aW,aV=function(d,c){return c.toUpperCase()};aL.fn.css=function(b,d){if(arguments.length===2&&d===aP){return this}return aL.access(this,b,d,!0,function(f,h,g){return g!==aP?aL.style(f,h,g):aL.css(f,h)})},aL.extend({cssHooks:{opacity:{get:function(e,d){if(d){var f=aY(e,"opacity","opacity");return f===""?"1":f}return e.style.opacity}}},cssNumber:{zIndex:!0,fontWeight:!0,opacity:!0,zoom:!0,lineHeight:!0},cssProps:{"float":aL.support.cssFloat?"cssFloat":"styleFloat"},style:function(r,q,p,o){if(r&&r.nodeType!==3&&r.nodeType!==8&&r.style){var n,m=aL.camelCase(q),l=r.style,d=aL.cssHooks[m];q=aL.cssProps[m]||m;if(p===aP){if(d&&"get" in d&&(n=d.get(r,!1,o))!==aP){return n}return l[q]}if(typeof p==="number"&&isNaN(p)||p==null){return}typeof p==="number"&&!aL.cssNumber[m]&&(p+="px");if(!d||!("set" in d)||(p=d.set(r,p))!==aP){try{l[q]=p}catch(b){}}}},css:function(b,m,l){var k,j=aL.camelCase(m),d=aL.cssHooks[j];m=aL.cssProps[j]||j;if(d&&"get" in d&&(k=d.get(b,!0,l))!==aP){return k}if(aY){return aY(b,m,j)}},swap:function(g,f,k){var j={};for(var h in f){j[h]=g.style[h],g.style[h]=f[h]}k.call(g);for(h in f){g.style[h]=j[h]}},camelCase:function(b){return b.replace(b1,aV)}}),aL.curCSS=aL.css,aL.each(["height","width"],function(d,c){aL.cssHooks[c]={get:function(b,j,h){var g;if(j){b.offsetWidth!==0?g=aU(b,c,h):aL.swap(b,a3,function(){g=aU(b,c,h)});if(g<=0){g=aY(b,c,c),g==="0px"&&aW&&(g=aW(b,c,c));if(g!=null){return g===""||g==="auto"?"0px":g}}if(g<0||g==null){g=b.style[c];return g===""||g==="auto"?"0px":g}return typeof g==="string"?g:g+"px"}},set:function(f,e){if(!a7.test(e)){return e}e=parseFloat(e);if(e>=0){return e+"px"}}}}),aL.support.opacity||(aL.cssHooks.opacity={get:function(d,c){return b3.test((c&&d.currentStyle?d.currentStyle.filter:d.style.filter)||"")?parseFloat(RegExp.$1)/100+"":c?"1":""},set:function(g,d){var k=g.style;k.zoom=1;var j=aL.isNaN(d)?"":"alpha(opacity="+d*100+")",h=k.filter||"";k.filter=b5.test(h)?h.replace(b5,j):k.filter+" "+j}}),aL(function(){aL.support.reliableMarginRight||(aL.cssHooks.marginRight={get:function(e,d){var f;aL.swap(e,{display:"inline-block"},function(){d?f=aY(e,"margin-right","marginRight"):f=e.style.marginRight});return f}})}),aN.defaultView&&aN.defaultView.getComputedStyle&&(aX=function(b,m,l){var k,j,d;l=l.replace(a9,"-$1").toLowerCase();if(!(j=b.ownerDocument.defaultView)){return aP}if(d=j.getComputedStyle(b,null)){k=d.getPropertyValue(l),k===""&&!aL.contains(b.ownerDocument.documentElement,b)&&(k=aL.style(b,l))}return k}),aN.documentElement.currentStyle&&(aW=function(h,g){var m,l=h.currentStyle&&h.currentStyle[g],k=h.runtimeStyle&&h.runtimeStyle[g],j=h.style;!a7.test(l)&&a5.test(l)&&(m=j.left,k&&(h.runtimeStyle.left=h.currentStyle.left),j.left=g==="fontSize"?"1em":l||0,l=j.pixelLeft+"px",j.left=m,k&&(h.runtimeStyle.left=k));return l===""?"auto":l}),aY=aX||aW,aL.expr&&aL.expr.filters&&(aL.expr.filters.hidden=function(e){var d=e.offsetWidth,f=e.offsetHeight;return d===0&&f===0||!aL.support.reliableHiddenOffsets&&(e.style.display||aL.css(e,"display"))==="none"},aL.expr.filters.visible=function(b){return !aL.expr.filters.hidden(b)});var aS=/%20/g,aQ=/\[\]$/,aO=/\r?\n/g,aM=/#.*$/,aK=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,aI=/^(?:color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,aG=/^(?:about|app|app\-storage|.+\-extension|file|widget):$/,aE=/^(?:GET|HEAD)$/,aC=/^\/\//,c0=/\?/,cZ=/)<[^<]*)*<\/script>/gi,cY=/^(?:select|textarea)/i,cX=/\s+/,cW=/([?&])_=[^&]*/,cV=/(^|\-)([a-z])/g,cU=function(e,d,f){return d+f.toUpperCase()},cT=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,cS=aL.fn.load,cR={},cQ={},cP,cO;try{cP=aN.location.href}catch(cN){cP=aN.createElement("a"),cP.href="",cP=cP.href}cO=cT.exec(cP.toLowerCase())||[],aL.fn.extend({load:function(b,n,m){if(typeof b!=="string"&&cS){return cS.apply(this,arguments)}if(!this.length){return this}var l=b.indexOf(" ");if(l>=0){var k=b.slice(l,b.length);b=b.slice(0,l)}var j="GET";n&&(aL.isFunction(n)?(m=n,n=aP):typeof n==="object"&&(n=aL.param(n,aL.ajaxSettings.traditional),j="POST"));var d=this;aL.ajax({url:b,type:j,dataType:"html",data:n,complete:function(f,e,g){g=f.responseText,f.isResolved()&&(f.done(function(c){g=c}),d.html(k?aL("
").append(g.replace(cZ,"")).find(k):g)),m&&d.each(m,[g,e,f])}});return this},serialize:function(){return aL.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?aL.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||cY.test(this.nodeName)||aI.test(this.type))}).map(function(e,d){var f=aL(this).val();return f==null?null:aL.isArray(f)?aL.map(f,function(b,g){return{name:d.name,value:b.replace(aO,"\r\n")}}):{name:d.name,value:f.replace(aO,"\r\n")}}).get()}}),aL.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(d,c){aL.fn[c]=function(b){return this.bind(c,b)}}),aL.each(["get","post"],function(b,d){aL[d]=function(c,k,j,h){aL.isFunction(k)&&(h=h||j,j=k,k=aP);return aL.ajax({type:d,url:c,data:k,success:j,dataType:h})}}),aL.extend({getScript:function(b,d){return aL.get(b,aP,d,"script")},getJSON:function(e,d,f){return aL.get(e,d,f,"json")},ajaxSetup:function(e,d){d?aL.extend(!0,e,aL.ajaxSettings,d):(d=e,e=aL.extend(!0,aL.ajaxSettings,d));for(var f in {context:1,url:1}){f in d?e[f]=d[f]:f in aL.ajaxSettings&&(e[f]=aL.ajaxSettings[f])}return e},ajaxSettings:{url:cP,isLocal:aG.test(cO[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":"*/*"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":aR.String,"text html":!0,"text json":aL.parseJSON,"text xml":aL.parseXML}},ajaxPrefilter:cM(cR),ajaxTransport:cM(cQ),ajax:function(T,S){function A(o,j,g,f){if(E!==2){E=2,G&&clearTimeout(G),H=aP,J=f||"",B.readyState=o?4:0;var e,s,r,p=g?cJ(R,B,g):aP,m,k;if(o>=200&&o<300||o===304){if(R.ifModified){if(m=B.getResponseHeader("Last-Modified")){aL.lastModified[L]=m}if(k=B.getResponseHeader("Etag")){aL.etag[L]=k}}if(o===304){j="notmodified",e=!0}else{try{s=cI(R,p),j="success",e=!0}catch(h){j="parsererror",r=h}}}else{r=j;if(!j||o){j="error",o<0&&(o=0)}}B.status=o,B.statusText=j,e?O.resolveWith(Q,[s,j,B]):O.rejectWith(Q,[B,j,r]),B.statusCode(M),M=aP,D&&P.trigger("ajax"+(e?"Success":"Error"),[B,R,e?s:r]),N.resolveWith(Q,[B,j]),D&&(P.trigger("ajaxComplete",[B,R]),--aL.active||aL.event.trigger("ajaxStop"))}}typeof T==="object"&&(S=T,T=aP),S=S||{};var R=aL.ajaxSetup({},S),Q=R.context||R,P=Q!==R&&(Q.nodeType||Q instanceof aL)?aL(Q):aL.event,O=aL.Deferred(),N=aL._Deferred(),M=R.statusCode||{},L,K={},J,I,H,G,F,E=0,D,C,B={readyState:0,setRequestHeader:function(e,c){E||(K[e.toLowerCase().replace(cV,cU)]=c);return this},getAllResponseHeaders:function(){return E===2?J:null},getResponseHeader:function(e){var f;if(E===2){if(!I){I={};while(f=aK.exec(J)){I[f[1].toLowerCase()]=f[2]}}f=I[e.toLowerCase()]}return f===aP?null:f},overrideMimeType:function(c){E||(R.mimeType=c);return this},abort:function(c){c=c||"abort",H&&H.abort(c),A(0,c);return this}};O.promise(B),B.success=B.done,B.error=B.fail,B.complete=N.done,B.statusCode=function(e){if(e){var c;if(E<2){for(c in e){M[c]=[M[c],e[c]]}}else{c=e[B.status],B.then(c,c)}}return this},R.url=((T||R.url)+"").replace(aM,"").replace(aC,cO[1]+"//"),R.dataTypes=aL.trim(R.dataType||"*").toLowerCase().split(cX),R.crossDomain==null&&(F=cT.exec(R.url.toLowerCase()),R.crossDomain=F&&(F[1]!=cO[1]||F[2]!=cO[2]||(F[3]||(F[1]==="http:"?80:443))!=(cO[3]||(cO[1]==="http:"?80:443)))),R.data&&R.processData&&typeof R.data!=="string"&&(R.data=aL.param(R.data,R.traditional)),cL(cR,R,S,B);if(E===2){return !1}D=R.global,R.type=R.type.toUpperCase(),R.hasContent=!aE.test(R.type),D&&aL.active++===0&&aL.event.trigger("ajaxStart");if(!R.hasContent){R.data&&(R.url+=(c0.test(R.url)?"&":"?")+R.data),L=R.url;if(R.cache===!1){var z=aL.now(),d=R.url.replace(cW,"$1_="+z);R.url=d+(d===R.url?(c0.test(R.url)?"&":"?")+"_="+z:"")}}if(R.data&&R.hasContent&&R.contentType!==!1||S.contentType){K["Content-Type"]=R.contentType}R.ifModified&&(L=L||R.url,aL.lastModified[L]&&(K["If-Modified-Since"]=aL.lastModified[L]),aL.etag[L]&&(K["If-None-Match"]=aL.etag[L])),K.Accept=R.dataTypes[0]&&R.accepts[R.dataTypes[0]]?R.accepts[R.dataTypes[0]]+(R.dataTypes[0]!=="*"?", */*; q=0.01":""):R.accepts["*"];for(C in R.headers){B.setRequestHeader(C,R.headers[C])}if(R.beforeSend&&(R.beforeSend.call(Q,B,R)===!1||E===2)){B.abort();return !1}for(C in {success:1,error:1,complete:1}){B[C](R[C])}H=cL(cQ,R,S,B);if(H){B.readyState=1,D&&P.trigger("ajaxSend",[B,R]),R.async&&R.timeout>0&&(G=setTimeout(function(){B.abort("timeout")},R.timeout));try{E=1,H.send(K,A)}catch(b){status<2?A(-1,b):aL.error(b)}}else{A(-1,"No Transport")}return B},param:function(b,k){var j=[],h=function(e,c){c=aL.isFunction(c)?c():c,j[j.length]=encodeURIComponent(e)+"="+encodeURIComponent(c)};k===aP&&(k=aL.ajaxSettings.traditional);if(aL.isArray(b)||b.jquery&&!aL.isPlainObject(b)){aL.each(b,function(){h(this.name,this.value)})}else{for(var d in b){cK(d,b[d],k,h)}}return j.join("&").replace(aS,"+")}}),aL.extend({active:0,lastModified:{},etag:{}});var cF=aL.now(),cD=/(\=)\?(&|$)|\?\?/i;aL.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return aL.expando+"_"+cF++}}),aL.ajaxPrefilter("json jsonp",function(v,u,t){var s=typeof v.data==="string";if(v.dataTypes[0]==="jsonp"||u.jsonpCallback||u.jsonp!=null||v.jsonp!==!1&&(cD.test(v.url)||s&&cD.test(v.data))){var r,q=v.jsonpCallback=aL.isFunction(v.jsonpCallback)?v.jsonpCallback():v.jsonpCallback,p=aR[q],o=v.url,n=v.data,d="$1"+q+"$2",a=function(){aR[q]=p,r&&aL.isFunction(p)&&aR[q](r[0])};v.jsonp!==!1&&(o=o.replace(cD,d),v.url===o&&(s&&(n=n.replace(cD,d)),v.data===n&&(o+=(/\?/.test(o)?"&":"?")+v.jsonp+"="+q))),v.url=o,v.data=n,aR[q]=function(b){r=[b]},t.then(a,a),v.converters["script json"]=function(){r||aL.error(q+" was not called");return r[0]},v.dataTypes[0]="json";return"script"}}),aL.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(b){aL.globalEval(b);return b}}}),aL.ajaxPrefilter("script",function(b){b.cache===aP&&(b.cache=!1),b.crossDomain&&(b.type="GET",b.global=!1)}),aL.ajaxTransport("script",function(b){if(b.crossDomain){var f,c=aN.head||aN.getElementsByTagName("head")[0]||aN.documentElement;return{send:function(d,a){f=aN.createElement("script"),f.async="async",b.scriptCharset&&(f.charset=b.scriptCharset),f.src=b.url,f.onload=f.onreadystatechange=function(e,g){if(!f.readyState||/loaded|complete/.test(f.readyState)){f.onload=f.onreadystatechange=null,c&&f.parentNode&&c.removeChild(f),f=aP,g||a(200,"success")}},c.insertBefore(f,c.firstChild)},abort:function(){f&&f.onload(0,1)}}}});var cB=aL.now(),cz,cx;aL.ajaxSettings.xhr=aR.ActiveXObject?function(){return !this.isLocal&&cu()||c2()}:cu,cx=aL.ajaxSettings.xhr(),aL.support.ajax=!!cx,aL.support.cors=cx&&"withCredentials" in cx,cx=aP,aL.support.ajax&&aL.ajaxTransport(function(b){if(!b.crossDomain||aL.support.cors){var d;return{send:function(n,m){var l=b.xhr(),k,c;b.username?l.open(b.type,b.url,b.async,b.username,b.password):l.open(b.type,b.url,b.async);if(b.xhrFields){for(c in b.xhrFields){l[c]=b.xhrFields[c]}}b.mimeType&&l.overrideMimeType&&l.overrideMimeType(b.mimeType),!b.crossDomain&&!n["X-Requested-With"]&&(n["X-Requested-With"]="XMLHttpRequest");try{for(c in n){l.setRequestHeader(c,n[c])}}catch(a){}l.send(b.hasContent&&b.data||null),d=function(v,u){var t,s,r,q,h;try{if(d&&(u||l.readyState===4)){d=aP,k&&(l.onreadystatechange=aL.noop,delete cz[k]);if(u){l.readyState!==4&&l.abort()}else{t=l.status,r=l.getAllResponseHeaders(),q={},h=l.responseXML,h&&h.documentElement&&(q.xml=h),q.text=l.responseText;try{s=l.statusText}catch(g){s=""}t||!b.isLocal||b.crossDomain?t===1223&&(t=204):t=q.text?200:404}}}catch(f){u||m(-1,f)}q&&m(t,s,q,r)},b.async&&l.readyState!==4?(cz||(cz={},cw()),k=cB++,l.onreadystatechange=cz[k]=d):d()},abort:function(){d&&d(0,1)}}}});var cn={},av=/^(?:toggle|show|hide)$/,at=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,aq,ao=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];aL.fn.extend({show:function(j,d,o){var n,m;if(j||j===0){return this.animate(an("show",3),j,d,o)}for(var l=0,k=this.length;l=0;b--){f[b].elem===this&&(d&&f[b](!0),f.splice(b,1))}}),d||this.dequeue();return this}}),aL.each({slideDown:an("show",1),slideUp:an("hide",1),slideToggle:an("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(d,c){aL.fn[d]=function(b,f,e){return this.animate(c,b,f,e)}}),aL.extend({speed:function(f,d,h){var g=f&&typeof f==="object"?aL.extend({},f):{complete:h||!h&&d||aL.isFunction(f)&&f,duration:f,easing:h&&d||d&&!aL.isFunction(d)&&d};g.duration=aL.fx.off?0:typeof g.duration==="number"?g.duration:g.duration in aL.fx.speeds?aL.fx.speeds[g.duration]:aL.fx.speeds._default,g.old=g.complete,g.complete=function(){g.queue!==!1&&aL(this).dequeue(),aL.isFunction(g.old)&&g.old.call(this)};return g},easing:{linear:function(f,e,h,g){return h+g*f},swing:function(f,e,h,g){return(-Math.cos(f*Math.PI)/2+0.5)*g+h}},timers:[],fx:function(e,d,f){this.options=d,this.elem=e,this.prop=f,d.orig||(d.orig={})}}),aL.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this),(aL.fx.step[this.prop]||aL.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 d,c=aL.css(this.elem,this.prop);return isNaN(d=parseFloat(c))?!c||c==="auto"?0:c:d},custom:function(h,d,m){function j(b){return l.step(b)}var l=this,k=aL.fx;this.startTime=aL.now(),this.start=h,this.end=d,this.unit=m||this.unit||(aL.cssNumber[this.prop]?"":"px"),this.now=this.start,this.pos=this.state=0,j.elem=this.elem,j()&&aL.timers.push(j)&&!aq&&(aq=setInterval(k.tick,k.interval))},show:function(){this.options.orig[this.prop]=aL.style(this.elem,this.prop),this.options.show=!0,this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur()),aL(this.elem).show()},hide:function(){this.options.orig[this.prop]=aL.style(this.elem,this.prop),this.options.hide=!0,this.custom(this.cur(),0)},step:function(t){var s=aL.now(),r=!0;if(t||s>=this.options.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),this.options.curAnim[this.prop]=!0;for(var q in this.options.curAnim){this.options.curAnim[q]!==!0&&(r=!1)}if(r){if(this.options.overflow!=null&&!aL.support.shrinkWrapBlocks){var p=this.elem,o=this.options;aL.each(["","X","Y"],function(e,c){p.style["overflow"+c]=o.overflow[e]})}this.options.hide&&aL(this.elem).hide();if(this.options.hide||this.options.show){for(var n in this.options.curAnim){aL.style(this.elem,n,this.options.orig[n])}}this.options.complete.call(this.elem)}return !1}var m=s-this.startTime;this.state=m/this.options.duration;var l=this.options.specialEasing&&this.options.specialEasing[this.prop],d=this.options.easing||(aL.easing.swing?"swing":"linear");this.pos=aL.easing[l||d](this.state,m,0,1,this.options.duration),this.now=this.start+(this.end-this.start)*this.pos,this.update();return !0}},aL.extend(aL.fx,{tick:function(){var d=aL.timers;for(var c=0;c
";aL.extend(c.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"}),c.innerHTML=k,d.insertBefore(c,d.firstChild),p=c.firstChild,o=p.firstChild,m=p.nextSibling.firstChild.firstChild,this.doesNotAddBorder=o.offsetTop!==5,this.doesAddBorderForTableAndCells=m.offsetTop===5,o.style.position="fixed",o.style.top="20px",this.supportsFixedPosition=o.offsetTop===20||o.offsetTop===15,o.style.position=o.style.top="",p.style.overflow="hidden",p.style.position="relative",this.subtractsBorderForOverflowNotVisible=o.offsetTop===-5,this.doesNotIncludeMarginInBodyOffset=d.offsetTop!==l,d.removeChild(c),aL.offset.initialize=aL.noop},bodyOffset:function(e){var d=e.offsetTop,f=e.offsetLeft;aL.offset.initialize(),aL.offset.doesNotIncludeMarginInBodyOffset&&(d+=parseFloat(aL.css(e,"marginTop"))||0,f+=parseFloat(aL.css(e,"marginLeft"))||0);return{top:d,left:f}},setOffset:function(z,y,x){var w=aL.css(z,"position");w==="static"&&(z.style.position="relative");var v=aL(z),u=v.offset(),t=aL.css(z,"top"),s=aL.css(z,"left"),r=(w==="absolute"||w==="fixed")&&aL.inArray("auto",[t,s])>-1,q={},p={},o,d;r&&(p=v.position()),o=r?p.top:parseInt(t,10)||0,d=r?p.left:parseInt(s,10)||0,aL.isFunction(y)&&(y=y.call(z,x,u)),y.top!=null&&(q.top=y.top-u.top+o),y.left!=null&&(q.left=y.left-u.left+d),"using" in y?y.using.call(z,q):v.css(q)}},aL.fn.extend({position:function(){if(!this[0]){return null}var f=this[0],d=this.offsetParent(),h=this.offset(),g=ag.test(d[0].nodeName)?{top:0,left:0}:d.offset();h.top-=parseFloat(aL.css(f,"marginTop"))||0,h.left-=parseFloat(aL.css(f,"marginLeft"))||0,g.top+=parseFloat(aL.css(d[0],"borderTopWidth"))||0,g.left+=parseFloat(aL.css(d[0],"borderLeftWidth"))||0;return{top:h.top-g.top,left:h.left-g.left}},offsetParent:function(){return this.map(function(){var b=this.offsetParent||aN.body;while(b&&(!ag.test(b.nodeName)&&aL.css(b,"position")==="static")){b=b.offsetParent}return b})}}),aL.each(["Left","Top"],function(b,f){var d="scroll"+f;aL.fn[d]=function(h){var e=this[0],a;if(!e){return null}if(h!==aP){return this.each(function(){a=af(this),a?a.scrollTo(b?aL(a).scrollLeft():h,b?h:aL(a).scrollTop()):this[d]=h})}a=af(e);return a?"pageXOffset" in a?a[b?"pageYOffset":"pageXOffset"]:aL.support.boxModel&&a.document.documentElement[d]||a.document.body[d]:e[d]}}),aL.each(["Height","Width"],function(b,f){var d=f.toLowerCase();aL.fn["inner"+f]=function(){return this[0]?parseFloat(aL.css(this[0],d,"padding")):null},aL.fn["outer"+f]=function(c){return this[0]?parseFloat(aL.css(this[0],d,c?"margin":"border")):null},aL.fn[d]=function(c){var l=this[0];if(!l){return c==null?null:this}if(aL.isFunction(c)){return this.each(function(a){var g=aL(this);g[d](c.call(this,a,g[d]()))})}if(aL.isWindow(l)){var k=l.document.documentElement["client"+f];return l.document.compatMode==="CSS1Compat"&&k||l.document.body["client"+f]||k}if(l.nodeType===9){return Math.max(l.documentElement["client"+f],l.body["scroll"+f],l.documentElement["scroll"+f],l.body["offset"+f],l.documentElement["offset"+f])}if(c===aP){var j=aL.css(l,d),e=parseFloat(j);return aL.isNaN(e)?j:e}return this.css(d,typeof c==="string"?c:c+"px")}}),aR.jQuery=aR.$=aL})(window); /* * jQuery UI 1.8 * * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT (MIT-LICENSE.txt) * and GPL (GPL-LICENSE.txt) licenses. * * http://docs.jquery.com/UI */ jQuery.ui||(function(a){a.ui={version:"1.8",plugin:{add:function(c,d,f){var e=a.ui[c].prototype;for(var b in f){e.plugins[b]=e.plugins[b]||[];e.plugins[b].push([d,f[b]])}},call:function(b,d,c){var f=b.plugins[d];if(!f||!b.element[0].parentNode){return}for(var e=0;e0){return true}e[b]=1;d=(e[b]>0);e[b]=0;return d},isOverAxis:function(c,b,d){return(c>b)&&(c<(b+d))},isOver:function(g,c,f,e,b,d){return a.ui.isOverAxis(g,f,b)&&a.ui.isOverAxis(c,e,d)},keyCode:{BACKSPACE:8,CAPS_LOCK:20,COMMA:188,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38}};a.fn.extend({_focus:a.fn.focus,focus:function(b,c){return typeof b==="number"?this.each(function(){var d=this;setTimeout(function(){a(d).focus();(c&&c.call(d))},b)}):this._focus.apply(this,arguments)},enableSelection:function(){return this.attr("unselectable","off").css("MozUserSelect","").unbind("selectstart.ui")},disableSelection:function(){return this.attr("unselectable","on").css("MozUserSelect","none").bind("selectstart.ui",function(){return false})},scrollParent:function(){var b;if((a.browser.msie&&(/(static|relative)/).test(this.css("position")))||(/absolute/).test(this.css("position"))){b=this.parents().filter(function(){return(/(relative|absolute|fixed)/).test(a.curCSS(this,"position",1))&&(/(auto|scroll)/).test(a.curCSS(this,"overflow",1)+a.curCSS(this,"overflow-y",1)+a.curCSS(this,"overflow-x",1))}).eq(0)}else{b=this.parents().filter(function(){return(/(auto|scroll)/).test(a.curCSS(this,"overflow",1)+a.curCSS(this,"overflow-y",1)+a.curCSS(this,"overflow-x",1))}).eq(0)}return(/fixed/).test(this.css("position"))||!b.length?a(document):b},zIndex:function(e){if(e!==undefined){return this.css("zIndex",e)}if(this.length){var c=a(this[0]),b,d;while(c.length&&c[0]!==document){b=c.css("position");if(b=="absolute"||b=="relative"||b=="fixed"){d=parseInt(c.css("zIndex"));if(!isNaN(d)&&d!=0){return d}}c=c.parent()}}return 0}});a.extend(a.expr[":"],{data:function(d,c,b){return !!a.data(d,b[3])},focusable:function(c){var d=c.nodeName.toLowerCase(),b=a.attr(c,"tabindex");return(/input|select|textarea|button|object/.test(d)?!c.disabled:"a"==d||"area"==d?c.href||!isNaN(b):!isNaN(b))&&!a(c)["area"==d?"parents":"closest"](":hidden").length},tabbable:function(c){var b=a.attr(c,"tabindex");return(isNaN(b)||b>=0)&&a(c).is(":focusable")}})})(jQuery); /* * jQuery UI Widget 1.8 * * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT (MIT-LICENSE.txt) * and GPL (GPL-LICENSE.txt) licenses. * * http://docs.jquery.com/UI/Widget */ (function(b){var a=b.fn.remove;b.fn.remove=function(c,d){return this.each(function(){if(!d){if(!c||b.filter(c,[this]).length){b("*",this).add(this).each(function(){b(this).triggerHandler("remove")})}}return a.call(b(this),c,d)})};b.widget=function(d,f,c){var e=d.split(".")[0],h;d=d.split(".")[1];h=e+"-"+d;if(!c){c=f;f=b.Widget}b.expr[":"][h]=function(j){return !!b.data(j,d)};b[e]=b[e]||{};b[e][d]=function(j,k){if(arguments.length){this._createWidget(j,k)}};var g=new f();g.options=b.extend({},g.options);b[e][d].prototype=b.extend(true,g,{namespace:e,widgetName:d,widgetEventPrefix:b[e][d].prototype.widgetEventPrefix||d,widgetBaseClass:h},c);b.widget.bridge(d,b[e][d])};b.widget.bridge=function(d,c){b.fn[d]=function(g){var e=typeof g==="string",f=Array.prototype.slice.call(arguments,1),h=this;g=!e&&f.length?b.extend.apply(null,[true,g].concat(f)):g;if(e&&g.substring(0,1)==="_"){return h}if(e){this.each(function(){var j=b.data(this,d),k=j&&b.isFunction(j[g])?j[g].apply(j,f):j;if(k!==j&&k!==undefined){h=k;return false}})}else{this.each(function(){var j=b.data(this,d);if(j){if(g){j.option(g)}j._init()}else{b.data(this,d,new c(g,this))}})}return h}};b.Widget=function(c,d){if(arguments.length){this._createWidget(c,d)}};b.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",options:{disabled:false},_createWidget:function(d,e){this.element=b(e).data(this.widgetName,this);this.options=b.extend(true,{},this.options,b.metadata&&b.metadata.get(e)[this.widgetName],d);var c=this;this.element.bind("remove."+this.widgetName,function(){c.destroy()});this._create();this._init()},_create:function(){},_init:function(){},destroy:function(){this.element.unbind("."+this.widgetName).removeData(this.widgetName);this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled")},widget:function(){return this.element},option:function(e,f){var d=e,c=this;if(arguments.length===0){return b.extend({},c.options)}if(typeof e==="string"){if(f===undefined){return this.options[e]}d={};d[e]=f}b.each(d,function(g,h){c._setOption(g,h)});return c},_setOption:function(c,d){this.options[c]=d;if(c==="disabled"){this.widget()[d?"addClass":"removeClass"](this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled").attr("aria-disabled",d)}return this},enable:function(){return this._setOption("disabled",false)},disable:function(){return this._setOption("disabled",true)},_trigger:function(d,e,f){var h=this.options[d];e=b.Event(e);e.type=(d===this.widgetEventPrefix?d:this.widgetEventPrefix+d).toLowerCase();f=f||{};if(e.originalEvent){for(var c=b.event.props.length,g;c;){g=b.event.props[--c];e[g]=e.originalEvent[g]}}this.element.trigger(e,f);return !(b.isFunction(h)&&h.call(this.element[0],e,f)===false||e.isDefaultPrevented())}}})(jQuery); /* * jQuery UI Mouse 1.8 * * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT (MIT-LICENSE.txt) * and GPL (GPL-LICENSE.txt) licenses. * * http://docs.jquery.com/UI/Mouse * * Depends: * jquery.ui.widget.js */ (function(a){a.widget("ui.mouse",{options:{cancel:":input,option",distance:1,delay:0},_mouseInit:function(){var b=this;this.element.bind("mousedown."+this.widgetName,function(c){return b._mouseDown(c)}).bind("click."+this.widgetName,function(c){if(b._preventClickEvent){b._preventClickEvent=false;c.stopImmediatePropagation();return false}});this.started=false},_mouseDestroy:function(){this.element.unbind("."+this.widgetName)},_mouseDown:function(d){d.originalEvent=d.originalEvent||{};if(d.originalEvent.mouseHandled){return}(this._mouseStarted&&this._mouseUp(d));this._mouseDownEvent=d;var c=this,e=(d.which==1),b=(typeof this.options.cancel=="string"?a(d.target).parents().add(d.target).filter(this.options.cancel).length:false);if(!e||b||!this._mouseCapture(d)){return true}this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){c.mouseDelayMet=true},this.options.delay)}if(this._mouseDistanceMet(d)&&this._mouseDelayMet(d)){this._mouseStarted=(this._mouseStart(d)!==false);if(!this._mouseStarted){d.preventDefault();return true}}this._mouseMoveDelegate=function(f){return c._mouseMove(f)};this._mouseUpDelegate=function(f){return c._mouseUp(f)};a(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);(a.browser.safari||d.preventDefault());d.originalEvent.mouseHandled=true;return true},_mouseMove:function(b){if(a.browser.msie&&!b.button){return this._mouseUp(b)}if(this._mouseStarted){this._mouseDrag(b);return b.preventDefault()}if(this._mouseDistanceMet(b)&&this._mouseDelayMet(b)){this._mouseStarted=(this._mouseStart(this._mouseDownEvent,b)!==false);(this._mouseStarted?this._mouseDrag(b):this._mouseUp(b))}return !this._mouseStarted},_mouseUp:function(b){a(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;this._preventClickEvent=(b.target==this._mouseDownEvent.target);this._mouseStop(b)}return false},_mouseDistanceMet:function(b){return(Math.max(Math.abs(this._mouseDownEvent.pageX-b.pageX),Math.abs(this._mouseDownEvent.pageY-b.pageY))>=this.options.distance)},_mouseDelayMet:function(b){return this.mouseDelayMet},_mouseStart:function(b){},_mouseDrag:function(b){},_mouseStop:function(b){},_mouseCapture:function(b){return true}})})(jQuery);(function(a){a.widget("ui.draggable",a.ui.mouse,{widgetEventPrefix:"drag",options:{addClasses:true,appendTo:"parent",axis:false,connectToSortable:false,containment:false,cursor:"auto",cursorAt:false,grid:false,handle:false,helper:"original",iframeFix:false,opacity:false,refreshPositions:false,revert:false,revertDuration:500,scope:"default",scroll:true,scrollSensitivity:20,scrollSpeed:20,snap:false,snapMode:"both",snapTolerance:20,stack:false,zIndex:false},_create:function(){if(this.options.helper=="original"&&!(/^(?:r|a|f)/).test(this.element.css("position"))){this.element[0].style.position="relative"}(this.options.addClasses&&this.element.addClass("ui-draggable"));(this.options.disabled&&this.element.addClass("ui-draggable-disabled"));this._mouseInit()},destroy:function(){if(!this.element.data("draggable")){return}this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled");this._mouseDestroy();return this},_mouseCapture:function(b){var c=this.options;if(this.helper||c.disabled||a(b.target).is(".ui-resizable-handle")){return false}this.handle=this._getHandle(b);if(!this.handle){return false}return true},_mouseStart:function(b){var c=this.options;this.helper=this._createHelper(b);this._cacheHelperProportions();if(a.ui.ddmanager){a.ui.ddmanager.current=this}this._cacheMargins();this.cssPosition=this.helper.css("position");this.scrollParent=this.helper.scrollParent();this.offset=this.positionAbs=this.element.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};a.extend(this.offset,{click:{left:b.pageX-this.offset.left,top:b.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this.position=this._generatePosition(b);this.originalPageX=b.pageX;this.originalPageY=b.pageY;(c.cursorAt&&this._adjustOffsetFromHelper(c.cursorAt));if(c.containment){this._setContainment()}if(this._trigger("start",b)===false){this._clear();return false}this._cacheHelperProportions();if(a.ui.ddmanager&&!c.dropBehaviour){a.ui.ddmanager.prepareOffsets(this,b)}this.helper.addClass("ui-draggable-dragging");this._mouseDrag(b,true);return true},_mouseDrag:function(b,d){this.position=this._generatePosition(b);this.positionAbs=this._convertPositionTo("absolute");if(!d){var c=this._uiHash();if(this._trigger("drag",b,c)===false){this._mouseUp({});return false}this.position=c.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"}if(a.ui.ddmanager){a.ui.ddmanager.drag(this,b)}return false},_mouseStop:function(c){var d=false;if(a.ui.ddmanager&&!this.options.dropBehaviour){d=a.ui.ddmanager.drop(this,c)}if(this.dropped){d=this.dropped;this.dropped=false}if(!this.element[0]||!this.element[0].parentNode){return false}if((this.options.revert=="invalid"&&!d)||(this.options.revert=="valid"&&d)||this.options.revert===true||(a.isFunction(this.options.revert)&&this.options.revert.call(this.element,d))){var b=this;a(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){if(b._trigger("stop",c)!==false){b._clear()}})}else{if(this._trigger("stop",c)!==false){this._clear()}}return false},cancel:function(){if(this.helper.is(".ui-draggable-dragging")){this._mouseUp({})}else{this._clear()}return this},_getHandle:function(b){var c=!this.options.handle||!a(this.options.handle,this.element).length?true:false;a(this.options.handle,this.element).find("*").andSelf().each(function(){if(this==b.target){c=true}});return c},_createHelper:function(c){var d=this.options;var b=a.isFunction(d.helper)?a(d.helper.apply(this.element[0],[c])):(d.helper=="clone"?this.element.clone():this.element);if(!b.parents("body").length){b.appendTo((d.appendTo=="parent"?this.element[0].parentNode:d.appendTo))}if(b[0]!=this.element[0]&&!(/(fixed|absolute)/).test(b.css("position"))){b.css("position","absolute")}return b},_adjustOffsetFromHelper:function(b){if(typeof b=="string"){b=b.split(" ")}if(a.isArray(b)){b={left:+b[0],top:+b[1]||0}}if("left" in b){this.offset.click.left=b.left+this.margins.left}if("right" in b){this.offset.click.left=this.helperProportions.width-b.right+this.margins.left}if("top" in b){this.offset.click.top=b.top+this.margins.top}if("bottom" in b){this.offset.click.top=this.helperProportions.height-b.bottom+this.margins.top}},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var b=this.offsetParent.offset();if(this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0])){b.left+=this.scrollParent.scrollLeft();b.top+=this.scrollParent.scrollTop()}if((this.offsetParent[0]==document.body)||(this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&a.browser.msie)){b={top:0,left:0}}return{top:b.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:b.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var b=this.element.position();return{top:b.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:b.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else{return{top:0,left:0}}},_cacheMargins:function(){this.margins={left:(parseInt(this.element.css("marginLeft"),10)||0),top:(parseInt(this.element.css("marginTop"),10)||0)}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e=this.options;if(e.containment=="parent"){e.containment=this.helper[0].parentNode}if(e.containment=="document"||e.containment=="window"){this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,a(e.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(a(e.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]}if(!(/^(document|window|parent)$/).test(e.containment)&&e.containment.constructor!=Array){var c=a(e.containment)[0];if(!c){return}var d=a(e.containment).offset();var b=(a(c).css("overflow")!="hidden");this.containment=[d.left+(parseInt(a(c).css("borderLeftWidth"),10)||0)+(parseInt(a(c).css("paddingLeft"),10)||0)-this.margins.left,d.top+(parseInt(a(c).css("borderTopWidth"),10)||0)+(parseInt(a(c).css("paddingTop"),10)||0)-this.margins.top,d.left+(b?Math.max(c.scrollWidth,c.offsetWidth):c.offsetWidth)-(parseInt(a(c).css("borderLeftWidth"),10)||0)-(parseInt(a(c).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,d.top+(b?Math.max(c.scrollHeight,c.offsetHeight):c.offsetHeight)-(parseInt(a(c).css("borderTopWidth"),10)||0)-(parseInt(a(c).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}else{if(e.containment.constructor==Array){this.containment=e.containment}}},_convertPositionTo:function(f,h){if(!h){h=this.position}var c=f=="absolute"?1:-1;var e=this.options,b=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,g=(/(html|body)/i).test(b[0].tagName);return{top:(h.top+this.offset.relative.top*c+this.offset.parent.top*c-(a.browser.safari&&a.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():(g?0:b.scrollTop()))*c)),left:(h.left+this.offset.relative.left*c+this.offset.parent.left*c-(a.browser.safari&&a.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():g?0:b.scrollLeft())*c))}},_generatePosition:function(e){var h=this.options,b=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,j=(/(html|body)/i).test(b[0].tagName);var d=e.pageX;var c=e.pageY;if(this.originalPosition){if(this.containment){if(e.pageX-this.offset.click.leftthis.containment[2]){d=this.containment[2]+this.offset.click.left}if(e.pageY-this.offset.click.top>this.containment[3]){c=this.containment[3]+this.offset.click.top}}if(h.grid){var g=this.originalPageY+Math.round((c-this.originalPageY)/h.grid[1])*h.grid[1];c=this.containment?(!(g-this.offset.click.topthis.containment[3])?g:(!(g-this.offset.click.topthis.containment[2])?f:(!(f-this.offset.click.left').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1000}).css(a(this).offset()).appendTo("body")})},stop:function(b,c){a("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)})}});a.ui.plugin.add("draggable","opacity",{start:function(c,d){var b=a(d.helper),e=a(this).data("draggable").options;if(b.css("opacity")){e._opacity=b.css("opacity")}b.css("opacity",e.opacity)},stop:function(b,c){var d=a(this).data("draggable").options;if(d._opacity){a(c.helper).css("opacity",d._opacity)}}});a.ui.plugin.add("draggable","scroll",{start:function(c,d){var b=a(this).data("draggable");if(b.scrollParent[0]!=document&&b.scrollParent[0].tagName!="HTML"){b.overflowOffset=b.scrollParent.offset()}},drag:function(d,e){var c=a(this).data("draggable"),f=c.options,b=false;if(c.scrollParent[0]!=document&&c.scrollParent[0].tagName!="HTML"){if(!f.axis||f.axis!="x"){if((c.overflowOffset.top+c.scrollParent[0].offsetHeight)-d.pageY=0;v--){var s=g.snapElements[v].left,n=s+g.snapElements[v].width,m=g.snapElements[v].top,A=m+g.snapElements[v].height;if(!((s-y0?h.left-k:Math.max(0,h.left)},top:function(h,j){var l=f(window),k=h.top+j.elemHeight-l.height()-l.scrollTop();h.top=k>0?h.top-k:Math.max(0,h.top)}},flip:{left:function(j,k){if(k.at[0]==="center"){return}var m=f(window),l=j.left+k.elemWidth-m.width()-m.scrollLeft(),h=k.my[0]==="left"?-k.elemWidth:k.my[0]==="right"?k.elemWidth:0,n=-2*k.offset[0];j.left+=j.left<0?h+k.targetWidth+n:l>0?h-k.targetWidth+n:0},top:function(j,l){if(l.at[1]==="center"){return}var n=f(window),m=j.top+l.elemHeight-n.height()-n.scrollTop(),h=l.my[1]==="top"?-l.elemHeight:l.my[1]==="bottom"?l.elemHeight:0,k=l.at[1]==="top"?l.targetHeight:-l.targetHeight,o=-2*l.offset[1];j.top+=j.top<0?h+l.targetHeight+o:m>0?h+k+o:0}}};if(!f.offset.setOffset){f.offset.setOffset=function(m,j){if(/static/.test(f.curCSS(m,"position"))){m.style.position="relative"}var l=f(m),o=l.offset(),h=parseInt(f.curCSS(m,"top",true),10)||0,n=parseInt(f.curCSS(m,"left",true),10)||0,k={top:(j.top-o.top)+h,left:(j.left-o.left)+n};if("using" in j){j.using.call(m,k)}else{l.css(k)}};f.fn.offset=function(h){var j=this[0];if(!j||!j.ownerDocument){return null}if(h){return this.each(function(){f.offset.setOffset(this,h)})}return b.call(this)}}}(jQuery));(function(c){c.widget("ui.resizable",c.ui.mouse,{widgetEventPrefix:"resize",options:{alsoResize:false,animate:false,animateDuration:"slow",animateEasing:"swing",aspectRatio:false,autoHide:false,containment:false,ghost:false,grid:false,handles:"e,s,se",helper:false,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:1000},_create:function(){var e=this,j=this.options;this.element.addClass("ui-resizable");c.extend(this,{_aspectRatio:!!(j.aspectRatio),aspectRatio:j.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:j.helper||j.ghost||j.animate?j.helper||"ui-resizable-helper":null});if(this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)){if(/relative/.test(this.element.css("position"))&&c.browser.opera){this.element.css({position:"relative",top:"auto",left:"auto"})}this.element.wrap(c('
').css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")}));this.element=this.element.parent().data("resizable",this.element.data("resizable"));this.elementIsWrapper=true;this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")});this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0});this.originalResizeStyle=this.originalElement.css("resize");this.originalElement.css("resize","none");this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"}));this.originalElement.css({margin:this.originalElement.css("margin")});this._proportionallyResize()}this.handles=j.handles||(!c(".ui-resizable-handle",this.element).length?"e,s,se":{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"});if(this.handles.constructor==String){if(this.handles=="all"){this.handles="n,e,s,w,se,sw,ne,nw"}var k=this.handles.split(",");this.handles={};for(var f=0;f');if(/sw|se|ne|nw/.test(h)){g.css({zIndex:++j.zIndex})}if("se"==h){g.addClass("ui-icon ui-icon-gripsmall-diagonal-se")}this.handles[h]=".ui-resizable-"+h;this.element.append(g)}}this._renderAxis=function(p){p=p||this.element;for(var m in this.handles){if(this.handles[m].constructor==String){this.handles[m]=c(this.handles[m],this.element).show()}if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var n=c(this.handles[m],this.element),o=0;o=/sw|ne|nw|se|n|s/.test(m)?n.outerHeight():n.outerWidth();var l=["padding",/ne|nw|n/.test(m)?"Top":/se|sw|s/.test(m)?"Bottom":/^e$/.test(m)?"Right":"Left"].join("");p.css(l,o);this._proportionallyResize()}if(!c(this.handles[m]).length){continue}}};this._renderAxis(this.element);this._handles=c(".ui-resizable-handle",this.element).disableSelection();this._handles.mouseover(function(){if(!e.resizing){if(this.className){var l=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)}e.axis=l&&l[1]?l[1]:"se"}});if(j.autoHide){this._handles.hide();c(this.element).addClass("ui-resizable-autohide").hover(function(){c(this).removeClass("ui-resizable-autohide");e._handles.show()},function(){if(!e.resizing){c(this).addClass("ui-resizable-autohide");e._handles.hide()}})}this._mouseInit()},destroy:function(){this._mouseDestroy();var d=function(f){c(f).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};if(this.elementIsWrapper){d(this.element);var e=this.element;e.after(this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")})).remove()}this.originalElement.css("resize",this.originalResizeStyle);d(this.originalElement);return this},_mouseCapture:function(e){var f=false;for(var d in this.handles){if(c(this.handles[d])[0]==e.target){f=true}}return !this.options.disabled&&f},_mouseStart:function(f){var j=this.options,e=this.element.position(),d=this.element;this.resizing=true;this.documentScroll={top:c(document).scrollTop(),left:c(document).scrollLeft()};if(d.is(".ui-draggable")||(/absolute/).test(d.css("position"))){d.css({position:"absolute",top:e.top,left:e.left})}if(c.browser.opera&&(/relative/).test(d.css("position"))){d.css({position:"relative",top:"auto",left:"auto"})}this._renderProxy();var k=b(this.helper.css("left")),g=b(this.helper.css("top"));if(j.containment){k+=c(j.containment).scrollLeft()||0;g+=c(j.containment).scrollTop()||0}this.offset=this.helper.offset();this.position={left:k,top:g};this.size=this._helper?{width:d.outerWidth(),height:d.outerHeight()}:{width:d.width(),height:d.height()};this.originalSize=this._helper?{width:d.outerWidth(),height:d.outerHeight()}:{width:d.width(),height:d.height()};this.originalPosition={left:k,top:g};this.sizeDiff={width:d.outerWidth()-d.width(),height:d.outerHeight()-d.height()};this.originalMousePosition={left:f.pageX,top:f.pageY};this.aspectRatio=(typeof j.aspectRatio=="number")?j.aspectRatio:((this.originalSize.width/this.originalSize.height)||1);var h=c(".ui-resizable-"+this.axis).css("cursor");c("body").css("cursor",h=="auto"?this.axis+"-resize":h);d.addClass("ui-resizable-resizing");this._propagate("start",f);return true},_mouseDrag:function(d){var g=this.helper,f=this.options,m={},q=this,j=this.originalMousePosition,n=this.axis;var r=(d.pageX-j.left)||0,p=(d.pageY-j.top)||0;var h=this._change[n];if(!h){return false}var l=h.apply(this,[d,r,p]),k=c.browser.msie&&c.browser.version<7,e=this.sizeDiff;if(this._aspectRatio||d.shiftKey){l=this._updateRatio(l,d)}l=this._respectSize(l,d);this._propagate("resize",d);g.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"});if(!this._helper&&this._proportionallyResizeElements.length){this._proportionallyResize()}this._updateCache(l);this._trigger("resize",d,this.ui());return false},_mouseStop:function(g){this.resizing=false;var h=this.options,m=this;if(this._helper){var f=this._proportionallyResizeElements,d=f.length&&(/textarea/i).test(f[0].nodeName),e=d&&c.ui.hasScroll(f[0],"left")?0:m.sizeDiff.height,k=d?0:m.sizeDiff.width;var n={width:(m.size.width-k),height:(m.size.height-e)},j=(parseInt(m.element.css("left"),10)+(m.position.left-m.originalPosition.left))||null,l=(parseInt(m.element.css("top"),10)+(m.position.top-m.originalPosition.top))||null;if(!h.animate){this.element.css(c.extend(n,{top:l,left:j}))}m.helper.height(m.size.height);m.helper.width(m.size.width);if(this._helper&&!h.animate){this._proportionallyResize()}}c("body").css("cursor","auto");this.element.removeClass("ui-resizable-resizing");this._propagate("stop",g);if(this._helper){this.helper.remove()}return false},_updateCache:function(d){var e=this.options;this.offset=this.helper.offset();if(a(d.left)){this.position.left=d.left}if(a(d.top)){this.position.top=d.top}if(a(d.height)){this.size.height=d.height}if(a(d.width)){this.size.width=d.width}},_updateRatio:function(g,f){var h=this.options,j=this.position,e=this.size,d=this.axis;if(g.height){g.width=(e.height*this.aspectRatio)}else{if(g.width){g.height=(e.width/this.aspectRatio)}}if(d=="sw"){g.left=j.left+(e.width-g.width);g.top=null}if(d=="nw"){g.top=j.top+(e.height-g.height);g.left=j.left+(e.width-g.width)}return g},_respectSize:function(l,f){var j=this.helper,h=this.options,r=this._aspectRatio||f.shiftKey,q=this.axis,t=a(l.width)&&h.maxWidth&&(h.maxWidthl.width),s=a(l.height)&&h.minHeight&&(h.minHeight>l.height);if(g){l.width=h.minWidth}if(s){l.height=h.minHeight}if(t){l.width=h.maxWidth}if(m){l.height=h.maxHeight}var e=this.originalPosition.left+this.originalSize.width,p=this.position.top+this.size.height;var k=/sw|nw|w/.test(q),d=/nw|ne|n/.test(q);if(g&&k){l.left=e-h.minWidth}if(t&&k){l.left=e-h.maxWidth}if(s&&d){l.top=p-h.minHeight}if(m&&d){l.top=p-h.maxHeight}var n=!l.width&&!l.height;if(n&&!l.left&&l.top){l.top=null}else{if(n&&!l.top&&l.left){l.left=null}}return l},_proportionallyResize:function(){var j=this.options;if(!this._proportionallyResizeElements.length){return}var f=this.helper||this.element;for(var e=0;e');var d=c.browser.msie&&c.browser.version<7,f=(d?1:0),g=(d?2:-1);this.helper.addClass(this._helper).css({width:this.element.outerWidth()+g,height:this.element.outerHeight()+g,position:"absolute",left:this.elementOffset.left-f+"px",top:this.elementOffset.top-f+"px",zIndex:++h.zIndex});this.helper.appendTo("body").disableSelection()}else{this.helper=this.element}},_change:{e:function(f,e,d){return{width:this.originalSize.width+e}},w:function(g,e,d){var j=this.options,f=this.originalSize,h=this.originalPosition;return{left:h.left+e,width:f.width-e}},n:function(g,e,d){var j=this.options,f=this.originalSize,h=this.originalPosition;return{top:h.top+d,height:f.height-d}},s:function(f,e,d){return{height:this.originalSize.height+d}},se:function(f,e,d){return c.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[f,e,d]))},sw:function(f,e,d){return c.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[f,e,d]))},ne:function(f,e,d){return c.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[f,e,d]))},nw:function(f,e,d){return c.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[f,e,d]))}},_propagate:function(e,d){c.ui.plugin.call(this,e,[d,this.ui()]);(e!="resize"&&this._trigger(e,d,this.ui()))},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}});c.extend(c.ui.resizable,{version:"1.8"});c.ui.plugin.add("resizable","alsoResize",{start:function(e,f){var d=c(this).data("resizable"),h=d.options;var g=function(j){c(j).each(function(){c(this).data("resizable-alsoresize",{width:parseInt(c(this).width(),10),height:parseInt(c(this).height(),10),left:parseInt(c(this).css("left"),10),top:parseInt(c(this).css("top"),10)})})};if(typeof(h.alsoResize)=="object"&&!h.alsoResize.parentNode){if(h.alsoResize.length){h.alsoResize=h.alsoResize[0];g(h.alsoResize)}else{c.each(h.alsoResize,function(j,k){g(j)})}}else{g(h.alsoResize)}},resize:function(f,h){var e=c(this).data("resizable"),j=e.options,g=e.originalSize,l=e.originalPosition;var k={height:(e.size.height-g.height)||0,width:(e.size.width-g.width)||0,top:(e.position.top-l.top)||0,left:(e.position.left-l.left)||0},d=function(m,n){c(m).each(function(){var q=c(this),r=c(this).data("resizable-alsoresize"),p={},o=n&&n.length?n:["width","height","top","left"];c.each(o||["width","height","top","left"],function(s,u){var t=(r[u]||0)+(k[u]||0);if(t&&t>=0){p[u]=t||null}});if(/relative/.test(q.css("position"))&&c.browser.opera){e._revertToRelativePosition=true;q.css({position:"absolute",top:"auto",left:"auto"})}q.css(p)})};if(typeof(j.alsoResize)=="object"&&!j.alsoResize.nodeType){c.each(j.alsoResize,function(m,n){d(m,n)})}else{d(j.alsoResize)}},stop:function(e,f){var d=c(this).data("resizable");if(d._revertToRelativePosition&&c.browser.opera){d._revertToRelativePosition=false;el.css({position:"relative"})}c(this).removeData("resizable-alsoresize-start")}});c.ui.plugin.add("resizable","animate",{stop:function(h,n){var p=c(this).data("resizable"),j=p.options;var g=p._proportionallyResizeElements,d=g.length&&(/textarea/i).test(g[0].nodeName),e=d&&c.ui.hasScroll(g[0],"left")?0:p.sizeDiff.height,l=d?0:p.sizeDiff.width;var f={width:(p.size.width-l),height:(p.size.height-e)},k=(parseInt(p.element.css("left"),10)+(p.position.left-p.originalPosition.left))||null,m=(parseInt(p.element.css("top"),10)+(p.position.top-p.originalPosition.top))||null;p.element.animate(c.extend(f,m&&k?{top:m,left:k}:{}),{duration:j.animateDuration,easing:j.animateEasing,step:function(){var o={width:parseInt(p.element.css("width"),10),height:parseInt(p.element.css("height"),10),top:parseInt(p.element.css("top"),10),left:parseInt(p.element.css("left"),10)};if(g&&g.length){c(g[0]).css({width:o.width,height:o.height})}p._updateCache(o);p._propagate("resize",h)}})}});c.ui.plugin.add("resizable","containment",{start:function(e,r){var t=c(this).data("resizable"),j=t.options,l=t.element;var f=j.containment,k=(f instanceof c)?f.get(0):(/parent/.test(f))?l.parent().get(0):f;if(!k){return}t.containerElement=c(k);if(/document/.test(f)||f==document){t.containerOffset={left:0,top:0};t.containerPosition={left:0,top:0};t.parentData={element:c(document),left:0,top:0,width:c(document).width(),height:c(document).height()||document.body.parentNode.scrollHeight}}else{var n=c(k),h=[];c(["Top","Right","Left","Bottom"]).each(function(p,o){h[p]=b(n.css("padding"+o))});t.containerOffset=n.offset();t.containerPosition=n.position();t.containerSize={height:(n.innerHeight()-h[3]),width:(n.innerWidth()-h[1])};var q=t.containerOffset,d=t.containerSize.height,m=t.containerSize.width,g=(c.ui.hasScroll(k,"left")?k.scrollWidth:m),s=(c.ui.hasScroll(k)?k.scrollHeight:d);t.parentData={element:k,left:q.left,top:q.top,width:g,height:s}}},resize:function(f,q){var t=c(this).data("resizable"),h=t.options,e=t.containerSize,p=t.containerOffset,m=t.size,n=t.position,r=t._aspectRatio||f.shiftKey,d={top:0,left:0},g=t.containerElement;if(g[0]!=document&&(/static/).test(g.css("position"))){d=p}if(n.left<(t._helper?p.left:0)){t.size.width=t.size.width+(t._helper?(t.position.left-p.left):(t.position.left-d.left));if(r){t.size.height=t.size.width/h.aspectRatio}t.position.left=h.helper?p.left:0}if(n.top<(t._helper?p.top:0)){t.size.height=t.size.height+(t._helper?(t.position.top-p.top):t.position.top);if(r){t.size.width=t.size.height*h.aspectRatio}t.position.top=t._helper?p.top:0}t.offset.left=t.parentData.left+t.position.left;t.offset.top=t.parentData.top+t.position.top;var l=Math.abs((t._helper?t.offset.left-d.left:(t.offset.left-d.left))+t.sizeDiff.width),s=Math.abs((t._helper?t.offset.top-d.top:(t.offset.top-p.top))+t.sizeDiff.height);var k=t.containerElement.get(0)==t.element.parent().get(0),j=/relative|absolute/.test(t.containerElement.css("position"));if(k&&j){l-=t.parentData.left}if(l+t.size.width>=t.parentData.width){t.size.width=t.parentData.width-l;if(r){t.size.height=t.size.width/t.aspectRatio}}if(s+t.size.height>=t.parentData.height){t.size.height=t.parentData.height-s;if(r){t.size.width=t.size.height*t.aspectRatio}}},stop:function(e,n){var q=c(this).data("resizable"),f=q.options,l=q.position,m=q.containerOffset,d=q.containerPosition,g=q.containerElement;var j=c(q.helper),r=j.offset(),p=j.outerWidth()-q.sizeDiff.width,k=j.outerHeight()-q.sizeDiff.height;if(q._helper&&!f.animate&&(/relative/).test(g.css("position"))){c(this).css({left:r.left-d.left-m.left,width:p,height:k})}if(q._helper&&!f.animate&&(/static/).test(g.css("position"))){c(this).css({left:r.left-d.left-m.left,width:p,height:k})}}});c.ui.plugin.add("resizable","ghost",{start:function(f,g){var d=c(this).data("resizable"),h=d.options,e=d.size;d.ghost=d.originalElement.clone();d.ghost.css({opacity:0.25,display:"block",position:"relative",height:e.height,width:e.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof h.ghost=="string"?h.ghost:"");d.ghost.appendTo(d.helper)},resize:function(e,f){var d=c(this).data("resizable"),g=d.options;if(d.ghost){d.ghost.css({position:"relative",height:d.size.height,width:d.size.width})}},stop:function(e,f){var d=c(this).data("resizable"),g=d.options;if(d.ghost&&d.helper){d.helper.get(0).removeChild(d.ghost.get(0))}}});c.ui.plugin.add("resizable","grid",{resize:function(d,m){var p=c(this).data("resizable"),g=p.options,k=p.size,h=p.originalSize,j=p.originalPosition,n=p.axis,l=g._aspectRatio||d.shiftKey;g.grid=typeof g.grid=="number"?[g.grid,g.grid]:g.grid;var f=Math.round((k.width-h.width)/(g.grid[0]||1))*(g.grid[0]||1),e=Math.round((k.height-h.height)/(g.grid[1]||1))*(g.grid[1]||1);if(/^(se|s|e)$/.test(n)){p.size.width=h.width+f;p.size.height=h.height+e}else{if(/^(ne)$/.test(n)){p.size.width=h.width+f;p.size.height=h.height+e;p.position.top=j.top-e}else{if(/^(sw)$/.test(n)){p.size.width=h.width+f;p.size.height=h.height+e;p.position.left=j.left-f}else{p.size.width=h.width+f;p.size.height=h.height+e;p.position.top=j.top-e;p.position.left=j.left-f}}}}});var b=function(d){return parseInt(d,10)||0};var a=function(d){return !isNaN(parseInt(d,10))}})(jQuery);(function(a){a.widget("ui.sortable",a.ui.mouse,{widgetEventPrefix:"sort",options:{appendTo:"parent",axis:false,connectWith:false,containment:false,cursor:"auto",cursorAt:false,dropOnEmpty:true,forcePlaceholderSize:false,forceHelperSize:false,grid:false,handle:false,helper:"original",items:"> *",opacity:false,placeholder:false,revert:false,scroll:true,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1000},_create:function(){var b=this.options;this.containerCache={};this.element.addClass("ui-sortable");this.refresh();this.floating=this.items.length?(/left|right/).test(this.items[0].item.css("float")):false;this.offset=this.element.offset();this._mouseInit()},destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled").removeData("sortable").unbind(".sortable");this._mouseDestroy();for(var b=this.items.length-1;b>=0;b--){this.items[b].item.removeData("sortable-item")}return this},_mouseCapture:function(e,f){if(this.reverting){return false}if(this.options.disabled||this.options.type=="static"){return false}this._refreshItems(e);var d=null,c=this,b=a(e.target).parents().each(function(){if(a.data(this,"sortable-item")==c){d=a(this);return false}});if(a.data(e.target,"sortable-item")==c){d=a(e.target)}if(!d){return false}if(this.options.handle&&!f){var g=false;a(this.options.handle,d).find("*").andSelf().each(function(){if(this==e.target){g=true}});if(!g){return false}}this.currentItem=d;this._removeCurrentsFromItems();return true},_mouseStart:function(e,f,b){var g=this.options,c=this;this.currentContainer=this;this.refreshPositions();this.helper=this._createHelper(e);this._cacheHelperProportions();this._cacheMargins();this.scrollParent=this.helper.scrollParent();this.offset=this.currentItem.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};this.helper.css("position","absolute");this.cssPosition=this.helper.css("position");a.extend(this.offset,{click:{left:e.pageX-this.offset.left,top:e.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this._generatePosition(e);this.originalPageX=e.pageX;this.originalPageY=e.pageY;(g.cursorAt&&this._adjustOffsetFromHelper(g.cursorAt));this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]};if(this.helper[0]!=this.currentItem[0]){this.currentItem.hide()}this._createPlaceholder();if(g.containment){this._setContainment()}if(g.cursor){if(a("body").css("cursor")){this._storedCursor=a("body").css("cursor")}a("body").css("cursor",g.cursor)}if(g.opacity){if(this.helper.css("opacity")){this._storedOpacity=this.helper.css("opacity")}this.helper.css("opacity",g.opacity)}if(g.zIndex){if(this.helper.css("zIndex")){this._storedZIndex=this.helper.css("zIndex")}this.helper.css("zIndex",g.zIndex)}if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"){this.overflowOffset=this.scrollParent.offset()}this._trigger("start",e,this._uiHash());if(!this._preserveHelperProportions){this._cacheHelperProportions()}if(!b){for(var d=this.containers.length-1;d>=0;d--){this.containers[d]._trigger("activate",e,c._uiHash(this))}}if(a.ui.ddmanager){a.ui.ddmanager.current=this}if(a.ui.ddmanager&&!g.dropBehaviour){a.ui.ddmanager.prepareOffsets(this,e)}this.dragging=true;this.helper.addClass("ui-sortable-helper");this._mouseDrag(e);return true},_mouseDrag:function(f){this.position=this._generatePosition(f);this.positionAbs=this._convertPositionTo("absolute");if(!this.lastPositionAbs){this.lastPositionAbs=this.positionAbs}if(this.options.scroll){var g=this.options,b=false;if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"){if((this.overflowOffset.top+this.scrollParent[0].offsetHeight)-f.pageY=0;d--){var e=this.items[d],c=e.item[0],h=this._intersectsWithPointer(e);if(!h){continue}if(c!=this.currentItem[0]&&this.placeholder[h==1?"next":"prev"]()[0]!=c&&!a.ui.contains(this.placeholder[0],c)&&(this.options.type=="semi-dynamic"?!a.ui.contains(this.element[0],c):true)){this.direction=h==1?"down":"up";if(this.options.tolerance=="pointer"||this._intersectsWithSides(e)){this._rearrange(f,e)}else{break}this._trigger("change",f,this._uiHash());break}}this._contactContainers(f);if(a.ui.ddmanager){a.ui.ddmanager.drag(this,f)}this._trigger("sort",f,this._uiHash());this.lastPositionAbs=this.positionAbs;return false},_mouseStop:function(c,d){if(!c){return}if(a.ui.ddmanager&&!this.options.dropBehaviour){a.ui.ddmanager.drop(this,c)}if(this.options.revert){var b=this;var e=b.placeholder.offset();b.reverting=true;a(this.helper).animate({left:e.left-this.offset.parent.left-b.margins.left+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft),top:e.top-this.offset.parent.top-b.margins.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)},parseInt(this.options.revert,10)||500,function(){b._clear(c)})}else{this._clear(c,d)}return false},cancel:function(){var b=this;if(this.dragging){this._mouseUp();if(this.options.helper=="original"){this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else{this.currentItem.show()}for(var c=this.containers.length-1;c>=0;c--){this.containers[c]._trigger("deactivate",null,b._uiHash(this));if(this.containers[c].containerCache.over){this.containers[c]._trigger("out",null,b._uiHash(this));this.containers[c].containerCache.over=0}}}if(this.placeholder[0].parentNode){this.placeholder[0].parentNode.removeChild(this.placeholder[0])}if(this.options.helper!="original"&&this.helper&&this.helper[0].parentNode){this.helper.remove()}a.extend(this,{helper:null,dragging:false,reverting:false,_noFinalSort:null});if(this.domPosition.prev){a(this.domPosition.prev).after(this.currentItem)}else{a(this.domPosition.parent).prepend(this.currentItem)}return this},serialize:function(d){var b=this._getItemsAsjQuery(d&&d.connected);var c=[];d=d||{};a(b).each(function(){var e=(a(d.item||this).attr(d.attribute||"id")||"").match(d.expression||(/(.+)[-=_](.+)/));if(e){c.push((d.key||e[1]+"[]")+"="+(d.key&&d.expression?e[1]:e[2]))}});return c.join("&")},toArray:function(d){var b=this._getItemsAsjQuery(d&&d.connected);var c=[];d=d||{};b.each(function(){c.push(a(d.item||this).attr(d.attribute||"id")||"")});return c},_intersectsWith:function(n){var e=this.positionAbs.left,d=e+this.helperProportions.width,m=this.positionAbs.top,k=m+this.helperProportions.height;var f=n.left,c=f+n.width,o=n.top,j=o+n.height;var p=this.offset.click.top,h=this.offset.click.left;var g=(m+p)>o&&(m+p)f&&(e+h)n[this.floating?"width":"height"])){return g}else{return(f0?"down":"up")},_getDragHorizontalDirection:function(){var b=this.positionAbs.left-this.lastPositionAbs.left;return b!=0&&(b>0?"right":"left")},refresh:function(b){this._refreshItems(b);this.refreshPositions();return this},_connectWith:function(){var b=this.options;return b.connectWith.constructor==String?[b.connectWith]:b.connectWith},_getItemsAsjQuery:function(b){var l=this;var g=[];var e=[];var h=this._connectWith();if(h&&b){for(var d=h.length-1;d>=0;d--){var k=a(h[d]);for(var c=k.length-1;c>=0;c--){var f=a.data(k[c],"sortable");if(f&&f!=this&&!f.options.disabled){e.push([a.isFunction(f.options.items)?f.options.items.call(f.element):a(f.options.items,f.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),f])}}}}e.push([a.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):a(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]);for(var d=e.length-1;d>=0;d--){e[d][0].each(function(){g.push(this)})}return a(g)},_removeCurrentsFromItems:function(){var d=this.currentItem.find(":data(sortable-item)");for(var c=0;c=0;e--){var m=a(l[e]);for(var d=m.length-1;d>=0;d--){var g=a.data(m[d],"sortable");if(g&&g!=this&&!g.options.disabled){f.push([a.isFunction(g.options.items)?g.options.items.call(g.element[0],b,{item:this.currentItem}):a(g.options.items,g.element),g]);this.containers.push(g)}}}}for(var e=f.length-1;e>=0;e--){var k=f[e][1];var c=f[e][0];for(var d=0,n=c.length;d=0;d--){var e=this.items[d];var c=this.options.toleranceElement?a(this.options.toleranceElement,e.item):e.item;if(!b){e.width=c.outerWidth();e.height=c.outerHeight()}var f=c.offset();e.left=f.left;e.top=f.top}if(this.options.custom&&this.options.custom.refreshContainers){this.options.custom.refreshContainers.call(this)}else{for(var d=this.containers.length-1;d>=0;d--){var f=this.containers[d].element.offset();this.containers[d].containerCache.left=f.left;this.containers[d].containerCache.top=f.top;this.containers[d].containerCache.width=this.containers[d].element.outerWidth();this.containers[d].containerCache.height=this.containers[d].element.outerHeight()}}return this},_createPlaceholder:function(d){var b=d||this,e=b.options;if(!e.placeholder||e.placeholder.constructor==String){var c=e.placeholder;e.placeholder={element:function(){var f=a(document.createElement(b.currentItem[0].nodeName)).addClass(c||b.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper")[0];if(!c){f.style.visibility="hidden"}return f},update:function(f,g){if(c&&!e.forcePlaceholderSize){return}if(!g.height()){g.height(b.currentItem.innerHeight()-parseInt(b.currentItem.css("paddingTop")||0,10)-parseInt(b.currentItem.css("paddingBottom")||0,10))}if(!g.width()){g.width(b.currentItem.innerWidth()-parseInt(b.currentItem.css("paddingLeft")||0,10)-parseInt(b.currentItem.css("paddingRight")||0,10))}}}}b.placeholder=a(e.placeholder.element.call(b.element,b.currentItem));b.currentItem.after(b.placeholder);e.placeholder.update(b,b.placeholder)},_contactContainers:function(b){var d=null,k=null;for(var f=this.containers.length-1;f>=0;f--){if(a.ui.contains(this.currentItem[0],this.containers[f].element[0])){continue}if(this._intersectsWith(this.containers[f].containerCache)){if(d&&a.ui.contains(this.containers[f].element[0],d.element[0])){continue}d=this.containers[f];k=f}else{if(this.containers[f].containerCache.over){this.containers[f]._trigger("out",b,this._uiHash(this));this.containers[f].containerCache.over=0}}}if(!d){return}if(this.containers.length===1){this.containers[k]._trigger("over",b,this._uiHash(this));this.containers[k].containerCache.over=1}else{if(this.currentContainer!=this.containers[k]){var h=10000;var g=null;var c=this.positionAbs[this.containers[k].floating?"left":"top"];for(var e=this.items.length-1;e>=0;e--){if(!a.ui.contains(this.containers[k].element[0],this.items[e].item[0])){continue}var l=this.items[e][this.containers[k].floating?"left":"top"];if(Math.abs(l-c)this.containment[2]){d=this.containment[2]+this.offset.click.left}if(e.pageY-this.offset.click.top>this.containment[3]){c=this.containment[3]+this.offset.click.top}}if(h.grid){var g=this.originalPageY+Math.round((c-this.originalPageY)/h.grid[1])*h.grid[1];c=this.containment?(!(g-this.offset.click.topthis.containment[3])?g:(!(g-this.offset.click.topthis.containment[2])?f:(!(f-this.offset.click.left=0;c--){if(a.ui.contains(this.containers[c].element[0],this.currentItem[0])&&!e){f.push((function(g){return function(h){g._trigger("receive",h,this._uiHash(this))}}).call(this,this.containers[c]));f.push((function(g){return function(h){g._trigger("update",h,this._uiHash(this))}}).call(this,this.containers[c]))}}}for(var c=this.containers.length-1;c>=0;c--){if(!e){f.push((function(g){return function(h){g._trigger("deactivate",h,this._uiHash(this))}}).call(this,this.containers[c]))}if(this.containers[c].containerCache.over){f.push((function(g){return function(h){g._trigger("out",h,this._uiHash(this))}}).call(this,this.containers[c]));this.containers[c].containerCache.over=0}}if(this._storedCursor){a("body").css("cursor",this._storedCursor)}if(this._storedOpacity){this.helper.css("opacity",this._storedOpacity)}if(this._storedZIndex){this.helper.css("zIndex",this._storedZIndex=="auto"?"":this._storedZIndex)}this.dragging=false;if(this.cancelHelperRemoval){if(!e){this._trigger("beforeStop",d,this._uiHash());for(var c=0;c")).appendTo(document.body).hide().addClass(a+m.dialogClass).css({zIndex:m.zIndex}).attr("tabIndex",-1).css("outline",0).keydown(function(n){if(m.closeOnEscape&&n.keyCode&&n.keyCode===b.ui.keyCode.ESCAPE){l.close(n);n.preventDefault()}}).attr({role:"dialog","aria-labelledby":d}).mousedown(function(n){l.moveToTop(false,n)}),f=l.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(k),e=(l.uiDialogTitlebar=b("
")).addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(k),h=b('').addClass("ui-dialog-titlebar-close ui-corner-all").attr("role","button").hover(function(){h.addClass("ui-state-hover")},function(){h.removeClass("ui-state-hover")}).focus(function(){h.addClass("ui-state-focus")}).blur(function(){h.removeClass("ui-state-focus")}).click(function(n){l.close(n);return false}).appendTo(e),g=(l.uiDialogTitlebarCloseText=b("")).addClass("ui-icon ui-icon-closethick").text(m.closeText).appendTo(h),c=b("").addClass("ui-dialog-title").attr("id",d).html(j).prependTo(e);if(b.isFunction(m.beforeclose)&&!b.isFunction(m.beforeClose)){m.beforeClose=m.beforeclose}e.find("*").add(e).disableSelection();if(m.draggable&&b.fn.draggable){l._makeDraggable()}if(m.resizable&&b.fn.resizable){l._makeResizable()}l._createButtons(m.buttons);l._isOpen=false;if(b.fn.bgiframe){k.bgiframe()}},_init:function(){if(this.options.autoOpen){this.open()}},destroy:function(){var c=this;if(c.overlay){c.overlay.destroy()}c.uiDialog.hide();c.element.unbind(".dialog").removeData("dialog").removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body");c.uiDialog.remove();if(c.originalTitle){c.element.attr("title",c.originalTitle)}return c},widget:function(){return this.uiDialog},close:function(e){var c=this,d;if(false===c._trigger("beforeClose",e)){return}if(c.overlay){c.overlay.destroy()}c.uiDialog.unbind("keypress.ui-dialog");c._isOpen=false;if(c.options.hide){c.uiDialog.hide(c.options.hide,function(){c._trigger("close",e)})}else{c.uiDialog.hide();c._trigger("close",e)}b.ui.dialog.overlay.resize();if(c.options.modal){d=0;b(".ui-dialog").each(function(){if(this!==c.uiDialog[0]){d=Math.max(d,b(this).css("z-index"))}});b.ui.dialog.maxZ=d}return c},isOpen:function(){return this._isOpen},moveToTop:function(g,f){var c=this,e=c.options,d;if((e.modal&&!g)||(!e.stack&&!e.modal)){return c._trigger("focus",f)}if(e.zIndex>b.ui.dialog.maxZ){b.ui.dialog.maxZ=e.zIndex}if(c.overlay){b.ui.dialog.maxZ+=1;c.overlay.$el.css("z-index",b.ui.dialog.overlay.maxZ=b.ui.dialog.maxZ)}d={scrollTop:c.element.attr("scrollTop"),scrollLeft:c.element.attr("scrollLeft")};b.ui.dialog.maxZ+=1;c.uiDialog.css("z-index",b.ui.dialog.maxZ);c.element.attr(d);c._trigger("focus",f);return c},open:function(){if(this._isOpen){return}var d=this,e=d.options,c=d.uiDialog;d.overlay=e.modal?new b.ui.dialog.overlay(d):null;if(c.next().length){c.appendTo("body")}d._size();d._position(e.position);c.show(e.show);d.moveToTop(true);if(e.modal){c.bind("keypress.ui-dialog",function(h){if(h.keyCode!==b.ui.keyCode.TAB){return}var g=b(":tabbable",this),j=g.filter(":first"),f=g.filter(":last");if(h.target===f[0]&&!h.shiftKey){j.focus(1);return false}else{if(h.target===j[0]&&h.shiftKey){f.focus(1);return false}}})}b([]).add(c.find(".ui-dialog-content :tabbable:first")).add(c.find(".ui-dialog-buttonpane :tabbable:first")).add(c).filter(":first").focus();d._trigger("open");d._isOpen=true;return d},_createButtons:function(f){var e=this,c=false,d=b("
").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix");e.uiDialog.find(".ui-dialog-buttonpane").remove();if(typeof f==="object"&&f!==null){b.each(f,function(){return !(c=true)})}if(c){b.each(f,function(g,j){var h=b('').text(g).click(function(){j.apply(e.element[0],arguments)}).appendTo(d);if(b.fn.button){h.button()}});d.appendTo(e.uiDialog)}},_makeDraggable:function(){var c=this,f=c.options,g=b(document),e;function d(h){return{position:h.position,offset:h.offset}}c.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(h,j){e=f.height==="auto"?"auto":b(this).height();b(this).height(b(this).height()).addClass("ui-dialog-dragging");c._trigger("dragStart",h,d(j))},drag:function(h,j){c._trigger("drag",h,d(j))},stop:function(h,j){f.position=[j.position.left-g.scrollLeft(),j.position.top-g.scrollTop()];b(this).removeClass("ui-dialog-dragging").height(e);c._trigger("dragStop",h,d(j));b.ui.dialog.overlay.resize()}})},_makeResizable:function(h){h=(h===undefined?this.options.resizable:h);var d=this,g=d.options,c=d.uiDialog.css("position"),f=(typeof h==="string"?h:"n,e,s,w,se,sw,ne,nw");function e(j){return{originalPosition:j.originalPosition,originalSize:j.originalSize,position:j.position,size:j.size}}d.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:d.element,maxWidth:g.maxWidth,maxHeight:g.maxHeight,minWidth:g.minWidth,minHeight:d._minHeight(),handles:f,start:function(j,k){b(this).addClass("ui-dialog-resizing");d._trigger("resizeStart",j,e(k))},resize:function(j,k){d._trigger("resize",j,e(k))},stop:function(j,k){b(this).removeClass("ui-dialog-resizing");g.height=b(this).height();g.width=b(this).width();d._trigger("resizeStop",j,e(k));b.ui.dialog.overlay.resize()}}).css("position",c).find(".ui-resizable-se").addClass("ui-icon ui-icon-grip-diagonal-se")},_minHeight:function(){var c=this.options;if(c.height==="auto"){return c.minHeight}else{return Math.min(c.minHeight,c.height)}},_position:function(d){var e=[],f=[0,0],c;d=d||b.ui.dialog.prototype.options.position;if(typeof d==="string"||(typeof d==="object"&&"0" in d)){e=d.split?d.split(" "):[d[0],d[1]];if(e.length===1){e[1]=e[0]}b.each(["left","top"],function(h,g){if(+e[h]===e[h]){f[h]=e[h];e[h]=g}})}else{if(typeof d==="object"){if("left" in d){e[0]="left";f[0]=d.left}else{if("right" in d){e[0]="right";f[0]=-d.right}}if("top" in d){e[1]="top";f[1]=d.top}else{if("bottom" in d){e[1]="bottom";f[1]=-d.bottom}}}}c=this.uiDialog.is(":visible");if(!c){this.uiDialog.show()}this.uiDialog.css({top:0,left:0}).position({my:e.join(" "),at:e.join(" "),offset:f.join(" "),of:window,collision:"fit",using:function(h){var g=b(this).css(h).offset().top;if(g<0){b(this).css("top",h.top-g)}}});if(!c){this.uiDialog.hide()}},_setOption:function(f,g){var d=this,c=d.uiDialog,h=c.is(":data(resizable)"),e=false;switch(f){case"beforeclose":f="beforeClose";break;case"buttons":d._createButtons(g);break;case"closeText":d.uiDialogTitlebarCloseText.text(""+g);break;case"dialogClass":c.removeClass(d.options.dialogClass).addClass(a+g);break;case"disabled":if(g){c.addClass("ui-dialog-disabled")}else{c.removeClass("ui-dialog-disabled")}break;case"draggable":if(g){d._makeDraggable()}else{c.draggable("destroy")}break;case"height":e=true;break;case"maxHeight":if(h){c.resizable("option","maxHeight",g)}e=true;break;case"maxWidth":if(h){c.resizable("option","maxWidth",g)}e=true;break;case"minHeight":if(h){c.resizable("option","minHeight",g)}e=true;break;case"minWidth":if(h){c.resizable("option","minWidth",g)}e=true;break;case"position":d._position(g);break;case"resizable":if(h&&!g){c.resizable("destroy")}if(h&&typeof g==="string"){c.resizable("option","handles",g)}if(!h&&g!==false){d._makeResizable(g)}break;case"title":b(".ui-dialog-title",d.uiDialogTitlebar).html(""+(g||" "));break;case"width":e=true;break}b.Widget.prototype._setOption.apply(d,arguments);if(e){d._size()}},_size:function(){var d=this.options,c;this.element.css("width","auto").hide();c=this.uiDialog.css({height:"auto",width:d.width}).height();this.element.css(d.height==="auto"?{minHeight:Math.max(d.minHeight-c,0),height:"auto"}:{minHeight:0,height:Math.max(d.height-c,0)}).show();if(this.uiDialog.is(":data(resizable)")){this.uiDialog.resizable("option","minHeight",this._minHeight())}}});b.extend(b.ui.dialog,{version:"1.8",uuid:0,maxZ:0,getTitleId:function(c){var d=c.attr("id");if(!d){this.uuid+=1;d=this.uuid}return"ui-dialog-title-"+d},overlay:function(c){this.$el=b.ui.dialog.overlay.create(c)}});b.extend(b.ui.dialog.overlay,{instances:[],oldInstances:[],maxZ:0,events:b.map("focus,mousedown,mouseup,keydown,keypress,click".split(","),function(c){return c+".dialog-overlay"}).join(" "),create:function(d){if(this.instances.length===0){setTimeout(function(){if(b.ui.dialog.overlay.instances.length){b(document).bind(b.ui.dialog.overlay.events,function(e){return(b(e.target).zIndex()>=b.ui.dialog.overlay.maxZ)})}},1);b(document).bind("keydown.dialog-overlay",function(e){if(d.options.closeOnEscape&&e.keyCode&&e.keyCode===b.ui.keyCode.ESCAPE){d.close(e);e.preventDefault()}});b(window).bind("resize.dialog-overlay",b.ui.dialog.overlay.resize)}var c=(this.oldInstances.pop()||b("
").addClass("ui-widget-overlay")).appendTo(document.body).css({width:this.width(),height:this.height()});if(b.fn.bgiframe){c.bgiframe()}this.instances.push(c);return c},destroy:function(c){this.oldInstances.push(this.instances.splice(b.inArray(c,this.instances),1)[0]);if(this.instances.length===0){b([document,window]).unbind(".dialog-overlay")}c.remove();var d=0;b.each(this.instances,function(){d=Math.max(d,this.css("z-index"))});this.maxZ=d},height:function(){var d,c;if(b.browser.msie&&b.browser.version<7){d=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);c=Math.max(document.documentElement.offsetHeight,document.body.offsetHeight);if(d1){return}switch(d.type){case"touchstart":if($(d.changedTouches[0].target).is("select")){return}iPadTouchStart(d);d.preventDefault();return false;break;case"touchmove":cancelHold();b="mousemove";d.preventDefault();break;case"touchend":if(cancelMouseUp){cancelMouseUp=false;d.preventDefault();return false}cancelHold();b="mouseup";break;default:return}var e=d.changedTouches,f=e[0],c=document.createEvent("MouseEvent");c.initMouseEvent(b,true,true,window,1,f.screenX,f.screenY,f.clientX,f.clientY,false,false,false,false,a,null);f.target.dispatchEvent(c);if(b=="mouseup"&&tapValid&&f.target==lastTap){c=document.createEvent("MouseEvent");c.initMouseEvent("click",true,true,window,1,f.screenX,f.screenY,f.clientX,f.clientY,false,false,false,false,a,null);f.target.dispatchEvent(c)}}var _canLog=true;function _log(g,f){if(!_canLog){return}var b=Array.prototype.slice.apply(arguments,[1]);var c=new Date();var a=c.getHours()+":"+c.getMinutes()+":"+c.getSeconds()+"."+c.getMilliseconds();b[0]=a+" - "+b[0];try{switch(g){case"info":window.console.info.apply(window.console,b);break;case"warn":window.console.warn.apply(window.console,b);break;default:window.console.log.apply(window.console,b);break}}catch(d){if(!window.console){_canLog=false}}}function logMsg(a){Array.prototype.unshift.apply(arguments,["debug"]);_log.apply(this,arguments)}var getDynaTreePersistData=null;var DTNodeStatus_Error=-1;var DTNodeStatus_Loading=1;var DTNodeStatus_Ok=0;(function($){var Class={create:function(){return function(){this.initialize.apply(this,arguments)}}};function getDtNodeFromElement(el){var iMax=5;while(el&&iMax--){if(el.dtnode){return el.dtnode}el=el.parentNode}return null}function noop(){}var DynaTreeNode=Class.create();DynaTreeNode.prototype={initialize:function(parent,tree,data){this.parent=parent;this.tree=tree;if(typeof data==="string"){data={title:data}}if(data.key===undefined){data.key="_"+tree._nodeCount++}this.data=$.extend({},$.ui.dynatree.nodedatadefaults,data);this.li=null;this.span=null;this.ul=null;this.childList=null;this.isLoading=false;this.hasSubSel=false;this.bExpanded=false;this.bSelected=false},toString:function(){return"DynaTreeNode<"+this.data.key+">: '"+this.data.title+"'"},toDict:function(recursive,callback){var dict=$.extend({},this.data);dict.activate=(this.tree.activeNode===this);dict.focus=(this.tree.focusNode===this);dict.expand=this.bExpanded;dict.select=this.bSelected;if(callback){callback(dict)}if(recursive&&this.childList){dict.children=[];for(var i=0,l=this.childList.length;i1){res+=cache.tagConnector}}else{if(this.hasChildren()!==false){res+=cache.tagExpander}else{res+=cache.tagConnector}}if(opts.checkbox&&data.hideCheckbox!==true&&!data.isStatusNode){res+=cache.tagCheckbox}if(data.icon){res+=""}else{if(data.icon===false){noop()}else{res+=cache.tagNodeIcon}}var nodeTitle="";if(opts.onCustomRender){nodeTitle=opts.onCustomRender.call(tree,this)||""}if(!nodeTitle){var tooltip=data.tooltip?" title='"+data.tooltip+"'":"";if(opts.noLink||data.noLink){nodeTitle=""+data.title+""}else{nodeTitle=""+data.title+""}}res+=nodeTitle;return res},_fixOrder:function(){var cl=this.childList;if(!cl||!this.ul){return}var childLI=this.ul.firstChild;for(var i=0,l=cl.length-1;i1){this.ul.className=cn.container+" "+cn.noConnector}else{this.ul.className=cn.container}}else{if(parent){if(!this.li){this.li=document.createElement("li");this.li.dtnode=this;if(data.key&&opts.generateIds){this.li.id=opts.idPrefix+data.key}this.span=document.createElement("span");this.span.className=cn.title;this.li.appendChild(this.span);if(!parent.ul){parent.ul=document.createElement("ul");parent.ul.style.display="none";parent.li.appendChild(parent.ul)}parent.ul.appendChild(this.li)}this.span.innerHTML=this._getInnerHtml();var cnList=[];cnList.push(cn.node);if(data.isFolder){cnList.push(cn.folder)}if(this.bExpanded){cnList.push(cn.expanded)}if(this.hasChildren()!==false){cnList.push(cn.hasChildren)}if(data.isLazy&&this.childList===null){cnList.push(cn.lazy)}if(isLastSib){cnList.push(cn.lastsib)}if(this.bSelected){cnList.push(cn.selected)}if(this.hasSubSel){cnList.push(cn.partsel)}if(tree.activeNode===this){cnList.push(cn.active)}if(data.addClass){cnList.push(data.addClass)}cnList.push(cn.combinedExpanderPrefix+(this.bExpanded?"e":"c")+(data.isLazy&&this.childList===null?"d":"")+(isLastSib?"l":""));cnList.push(cn.combinedIconPrefix+(this.bExpanded?"e":"c")+(data.isFolder?"f":""));this.span.className=cnList.join(" ");this.li.className=isLastSib?cn.lastsib:"";if(opts.onRender){opts.onRender.call(tree,this,this.span)}}}if((this.bExpanded||includeInvisible===true)&&this.childList){for(var i=0,l=this.childList.length;ib.data.title?1:-1};cl.sort(cmp);if(deep){for(var i=0,l=cl.length;i0){this.childList[0].focus()}else{this.focus()}}break;case DTNodeStatus_Loading:this.isLoading=true;$(this.span).addClass(this.tree.options.classNames.nodeLoading);if(!this.parent){this._setStatusNode({title:this.tree.options.strings.loading+info,tooltip:tooltip,addClass:this.tree.options.classNames.nodeWait})}break;case DTNodeStatus_Error:this.isLoading=false;this._setStatusNode({title:this.tree.options.strings.loadError+info,tooltip:tooltip,addClass:this.tree.options.classNames.nodeError});break;default:throw"Bad LazyNodeStatus: '"+lts+"'."}},_parentList:function(includeRoot,includeSelf){var l=[];var dtn=includeSelf?this:this.parent;while(dtn){if(includeRoot||dtn.parent){l.unshift(dtn)}dtn=dtn.parent}return l},getLevel:function(){var level=0;var dtn=this.parent;while(dtn){level++;dtn=dtn.parent}return level},_getTypeForOuterNodeEvent:function(event){var cns=this.tree.options.classNames;var target=event.target;if(target.className.indexOf(cns.node)<0){return null}var eventX=event.pageX-target.offsetLeft;var eventY=event.pageY-target.offsetTop;for(var i=0,l=target.childNodes.length;i=x&&eventX<=(x+nx)&&eventY>=y&&eventY<=(y+ny)){if(cn.className==cns.title){return"title"}else{if(cn.className==cns.expander){return"expander"}else{if(cn.className==cns.checkbox){return"checkbox"}else{if(cn.className==cns.nodeIcon){return"icon"}}}}}}return"prefix"},getEventTargetType:function(event){var tcn=event&&event.target?event.target.className:"";var cns=this.tree.options.classNames;if(tcn===cns.title){return"title"}else{if(tcn===cns.expander){return"expander"}else{if(tcn===cns.checkbox){return"checkbox"}else{if(tcn===cns.nodeIcon){return"icon"}else{if(tcn===cns.empty||tcn===cns.vline||tcn===cns.connector){return"prefix"}else{if(tcn.indexOf(cns.node)>=0){return this._getTypeForOuterNodeEvent(event)}}}}}}return null},isVisible:function(){var parents=this._parentList(true,false);for(var i=0,l=parents.length;ia").focus()}catch(e){}},isFocused:function(){return(this.tree.tnFocused===this)},_activate:function(flag,fireEvents){this.tree.logDebug("dtnode._activate(%o, fireEvents=%o) - %o",flag,fireEvents,this);var opts=this.tree.options;if(this.data.isStatusNode){return}if(fireEvents&&opts.onQueryActivate&&opts.onQueryActivate.call(this.tree,flag,this)===false){return}if(flag){if(this.tree.activeNode){if(this.tree.activeNode===this){return}this.tree.activeNode.deactivate()}if(opts.activeVisible){this.makeVisible()}this.tree.activeNode=this;if(opts.persist){$.cookie(opts.cookieId+"-active",this.data.key,opts.cookie)}this.tree.persistence.activeKey=this.data.key;$(this.span).addClass(opts.classNames.active);if(fireEvents&&opts.onActivate){opts.onActivate.call(this.tree,this)}}else{if(this.tree.activeNode===this){if(opts.onQueryActivate&&opts.onQueryActivate.call(this.tree,false,this)===false){return}$(this.span).removeClass(opts.classNames.active);if(opts.persist){$.cookie(opts.cookieId+"-active","",opts.cookie)}this.tree.persistence.activeKey=null;this.tree.activeNode=null;if(fireEvents&&opts.onDeactivate){opts.onDeactivate.call(this.tree,this)}}}},activate:function(){this._activate(true,true)},activateSilently:function(){this._activate(true,false)},deactivate:function(){this._activate(false,true)},isActive:function(){return(this.tree.activeNode===this)},_userActivate:function(){var activate=true;var expand=false;if(this.data.isFolder){switch(this.tree.options.clickFolderMode){case 2:activate=false;expand=true;break;case 3:activate=expand=true;break}}if(this.parent===null){expand=false}if(expand){this.toggleExpand();this.focus()}if(activate){this.activate()}},_setSubSel:function(hasSubSel){if(hasSubSel){this.hasSubSel=true;$(this.span).addClass(this.tree.options.classNames.partsel)}else{this.hasSubSel=false;$(this.span).removeClass(this.tree.options.classNames.partsel)}},_fixSelectionState:function(){var p,i,l;if(this.bSelected){this.visit(function(node){node.parent._setSubSel(true);node._select(true,false,false)});p=this.parent;while(p){p._setSubSel(true);var allChildsSelected=true;for(i=0,l=p.childList.length;i=0;i--){sib=parents[i].getNextSibling();if(sib){break}}}if(sib){sib.focus()}break;default:handled=false}if(handled){event.preventDefault()}},_onKeypress:function(event){},_onFocus:function(event){var opts=this.tree.options;if(event.type=="blur"||event.type=="focusout"){if(opts.onBlur){opts.onBlur.call(this.tree,this)}if(this.tree.tnFocused){$(this.tree.tnFocused.span).removeClass(opts.classNames.focused)}this.tree.tnFocused=null;if(opts.persist){$.cookie(opts.cookieId+"-focus","",opts.cookie)}}else{if(event.type=="focus"||event.type=="focusin"){if(this.tree.tnFocused&&this.tree.tnFocused!==this){this.tree.logDebug("dtnode.onFocus: out of sync: curFocus: %o",this.tree.tnFocused);$(this.tree.tnFocused.span).removeClass(opts.classNames.focused)}this.tree.tnFocused=this;if(opts.onFocus){opts.onFocus.call(this.tree,this)}$(this.tree.tnFocused.span).addClass(opts.classNames.focused);if(opts.persist){$.cookie(opts.cookieId+"-focus",this.data.key,opts.cookie)}}}},visit:function(fn,includeSelf){var res=true;if(includeSelf===true){res=fn(this);if(res===false||res=="skip"){return res}}if(this.childList){for(var i=0,l=this.childList.length;i reloading %s...",this,keyPath,child);var self=this;child.reloadChildren(function(node,isOk){if(isOk){tree.logDebug("%s._loadKeyPath(%s) -> reloaded %s.",node,keyPath,node);callback.call(tree,child,"loaded");node._loadKeyPath(segList.join(tree.options.keyPathSeparator),callback)}else{tree.logWarning("%s._loadKeyPath(%s) -> reloadChildren() failed.",self,keyPath);callback.call(tree,child,"error")}})}else{callback.call(tree,child,"loaded");child._loadKeyPath(segList.join(tree.options.keyPathSeparator),callback)}}return}}tree.logWarning("Node not found: "+seg);return},resetLazy:function(){if(this.parent===null){throw"Use tree.reload() instead"}else{if(!this.data.isLazy){throw"node.resetLazy() requires lazy nodes."}}this.expand(false);this.removeChildren()},_addChildNode:function(dtnode,beforeNode){var tree=this.tree;var opts=tree.options;var pers=tree.persistence;dtnode.parent=this;if(this.childList===null){this.childList=[]}else{if(!beforeNode){if(this.childList.length>0){$(this.childList[this.childList.length-1].span).removeClass(opts.classNames.lastsib)}}}if(beforeNode){var iBefore=$.inArray(beforeNode,this.childList);if(iBefore<0){throw" must be a child of "}this.childList.splice(iBefore,0,dtnode)}else{this.childList.push(dtnode)}var isInitializing=tree.isInitializing();if(opts.persist&&pers.cookiesFound&&isInitializing){if(pers.activeKey==dtnode.data.key){tree.activeNode=dtnode}if(pers.focusedKey==dtnode.data.key){tree.focusNode=dtnode}dtnode.bExpanded=($.inArray(dtnode.data.key,pers.expandedKeyList)>=0);dtnode.bSelected=($.inArray(dtnode.data.key,pers.selectedKeyList)>=0)}else{if(dtnode.data.activate){tree.activeNode=dtnode;if(opts.persist){pers.activeKey=dtnode.data.key}}if(dtnode.data.focus){tree.focusNode=dtnode;if(opts.persist){pers.focusedKey=dtnode.data.key}}dtnode.bExpanded=(dtnode.data.expand===true);if(dtnode.bExpanded&&opts.persist){pers.addExpand(dtnode.data.key)}dtnode.bSelected=(dtnode.data.select===true);if(dtnode.bSelected&&opts.persist){pers.addSelect(dtnode.data.key)}}if(opts.minExpandLevel>=dtnode.getLevel()){this.bExpanded=true}if(dtnode.bSelected&&opts.selectMode==3){var p=this;while(p){if(!p.hasSubSel){p._setSubSel(true)}p=p.parent}}if(tree.bEnableUpdate){this.render()}return dtnode},addChild:function(obj,beforeNode){if(typeof(obj)=="string"){throw"Invalid data type for "+obj}else{if(!obj||obj.length===0){return}else{if(obj instanceof DynaTreeNode){return this._addChildNode(obj,beforeNode)}}}if(!obj.length){obj=[obj]}var prevFlag=this.tree.enableUpdate(false);var tnFirst=null;for(var i=0,l=obj.length;i=0){this.expandedKeyList.splice(idx,1);$.cookie(this.cookieId+"-expand",this.expandedKeyList.join(","),this.cookieOpts)}},addSelect:function(key){this._log("addSelect(%o)",key);if($.inArray(key,this.selectedKeyList)<0){this.selectedKeyList.push(key);$.cookie(this.cookieId+"-select",this.selectedKeyList.join(","),this.cookieOpts)}},clearSelect:function(key){this._log("clearSelect(%o)",key);var idx=$.inArray(key,this.selectedKeyList);if(idx>=0){this.selectedKeyList.splice(idx,1);$.cookie(this.cookieId+"-select",this.selectedKeyList.join(","),this.cookieOpts)}},isReloading:function(){return this.cookiesFound===true},toDict:function(){return{cookiesFound:this.cookiesFound,activeKey:this.activeKey,focusedKey:this.activeKey,expandedKeyList:this.expandedKeyList,selectedKeyList:this.selectedKeyList}},lastentry:undefined};var DynaTree=Class.create();DynaTree.version="$Version: 1.1.1$";DynaTree.prototype={initialize:function($widget){this.phase="init";this.$widget=$widget;this.options=$widget.options;this.$tree=$widget.element;this.timer=null;this.divTree=this.$tree.get(0);_initDragAndDrop(this)},_load:function(callback){var $widget=this.$widget;var opts=this.options;this.bEnableUpdate=true;this._nodeCount=1;this.activeNode=null;this.focusNode=null;if(opts.rootVisible!==undefined){_log("warn","Option 'rootVisible' is no longer supported.")}if(opts.minExpandLevel<1){_log("warn","Option 'minExpandLevel' must be >= 1.");opts.minExpandLevel=1}if(opts.classNames!==$.ui.dynatree.prototype.options.classNames){opts.classNames=$.extend({},$.ui.dynatree.prototype.options.classNames,opts.classNames)}if(opts.ajaxDefaults!==$.ui.dynatree.prototype.options.ajaxDefaults){opts.ajaxDefaults=$.extend({},$.ui.dynatree.prototype.options.ajaxDefaults,opts.ajaxDefaults)}if(opts.dnd!==$.ui.dynatree.prototype.options.dnd){opts.dnd=$.extend({},$.ui.dynatree.prototype.options.dnd,opts.dnd)}if(!opts.imagePath){$("script").each(function(){var _rexDtLibName=/.*dynatree[^\/]*\.js$/i;if(this.src.search(_rexDtLibName)>=0){if(this.src.indexOf("/")>=0){opts.imagePath=this.src.slice(0,this.src.lastIndexOf("/"))+"/skin/"}else{opts.imagePath="skin/"}logMsg("Guessing imagePath from '%s': '%s'",this.src,opts.imagePath);return false}})}this.persistence=new DynaTreeStatus(opts.cookieId,opts.cookie);if(opts.persist){if(!$.cookie){_log("warn","Please include jquery.cookie.js to use persistence.")}this.persistence.read()}this.logDebug("DynaTree.persistence: %o",this.persistence.toDict());this.cache={tagEmpty:"",tagVline:"",tagExpander:"",tagConnector:"",tagNodeIcon:"",tagCheckbox:"",lastentry:undefined};if(opts.children||(opts.initAjax&&opts.initAjax.url)||opts.initId){$(this.divTree).empty()}var $ulInitialize=this.$tree.find(">ul:first").hide();this.tnRoot=new DynaTreeNode(null,this,{});this.tnRoot.bExpanded=true;this.tnRoot.render();this.divTree.appendChild(this.tnRoot.ul);var root=this.tnRoot;var isReloading=(opts.persist&&this.persistence.isReloading());var isLazy=false;var prevFlag=this.enableUpdate(false);this.logDebug("Dynatree._load(): read tree structure...");if(opts.children){root.addChild(opts.children)}else{if(opts.initAjax&&opts.initAjax.url){isLazy=true;root.data.isLazy=true;this._reloadAjax(callback)}else{if(opts.initId){this._createFromTag(root,$("#"+opts.initId))}else{this._createFromTag(root,$ulInitialize);$ulInitialize.remove()}}}this._checkConsistency();this.logDebug("Dynatree._load(): render nodes...");this.enableUpdate(prevFlag);this.logDebug("Dynatree._load(): bind events...");this.$widget.bind();this.logDebug("Dynatree._load(): postInit...");this.phase="postInit";if(opts.persist){this.persistence.write()}if(this.focusNode&&this.focusNode.isVisible()){this.logDebug("Focus on init: %o",this.focusNode);this.focusNode.focus()}if(!isLazy&&opts.onPostInit){opts.onPostInit.call(this,isReloading,false)}this.phase="idle"},_reloadAjax:function(callback){var opts=this.options;if(!opts.initAjax||!opts.initAjax.url){throw"tree.reload() requires 'initAjax' mode."}var pers=this.persistence;var ajaxOpts=$.extend({},opts.initAjax);if(ajaxOpts.addActiveKey){ajaxOpts.data.activeKey=pers.activeKey}if(ajaxOpts.addFocusedKey){ajaxOpts.data.focusedKey=pers.focusedKey}if(ajaxOpts.addExpandedKeyList){ajaxOpts.data.expandedKeyList=pers.expandedKeyList.join(",")}if(ajaxOpts.addSelectedKeyList){ajaxOpts.data.selectedKeyList=pers.selectedKeyList.join(",")}if(opts.onPostInit){if(ajaxOpts.success){this.logWarning("initAjax: success callback is ignored when onPostInit was specified.")}if(ajaxOpts.error){this.logWarning("initAjax: error callback is ignored when onPostInit was specified.")}var isReloading=pers.isReloading();ajaxOpts.success=function(dtnode){opts.onPostInit.call(dtnode.tree,isReloading,false);if(callback){callback.call(dtnode.tree,"ok")}};ajaxOpts.error=function(dtnode){opts.onPostInit.call(dtnode.tree,isReloading,true);if(callback){callback.call(dtnode.tree,"error")}}}this.logDebug("Dynatree._init(): send Ajax request...");this.tnRoot.appendAjax(ajaxOpts)},toString:function(){return"Dynatree '"+this.$tree.attr("id")+"'"},toDict:function(){return this.tnRoot.toDict(true)},serializeArray:function(stopOnParents){var nodeList=this.getSelectedNodes(stopOnParents),name=this.$tree.attr("name")||this.$tree.attr("id"),arr=[];for(var i=0,l=nodeList.length;i=2){Array.prototype.unshift.apply(arguments,["debug"]);_log.apply(this,arguments)}},logInfo:function(msg){if(this.options.debugLevel>=1){Array.prototype.unshift.apply(arguments,["info"]);_log.apply(this,arguments)}},logWarning:function(msg){Array.prototype.unshift.apply(arguments,["warn"]);_log.apply(this,arguments)},isInitializing:function(){return(this.phase=="init"||this.phase=="postInit")},isReloading:function(){return(this.phase=="init"||this.phase=="postInit")&&this.options.persist&&this.persistence.cookiesFound},isUserEvent:function(){return(this.phase=="userEvent")},redraw:function(){this.tnRoot.render(false,false)},renderInvisibleNodes:function(){this.tnRoot.render(false,true)},reload:function(callback){this._load(callback)},getRoot:function(){return this.tnRoot},enable:function(){this.$widget.enable()},disable:function(){this.$widget.disable()},getNodeByKey:function(key){var el=document.getElementById(this.options.idPrefix+key);if(el){return el.dtnode?el.dtnode:null}var match=null;this.visit(function(node){if(node.data.key==key){match=node;return false}},true);return match},getActiveNode:function(){return this.activeNode},reactivate:function(setFocus){var node=this.activeNode;if(node){this.activeNode=null;node.activate();if(setFocus){node.focus()}}},getSelectedNodes:function(stopOnParents){var nodeList=[];this.tnRoot.visit(function(node){if(node.bSelected){nodeList.push(node);if(stopOnParents===true){return"skip"}}});return nodeList},activateKey:function(key){var dtnode=(key===null)?null:this.getNodeByKey(key);if(!dtnode){if(this.activeNode){this.activeNode.deactivate()}this.activeNode=null;return null}dtnode.focus();dtnode.activate();return dtnode},loadKeyPath:function(keyPath,callback){var segList=keyPath.split(this.options.keyPathSeparator);if(segList[0]===""){segList.shift()}if(segList[0]==this.tnRoot.data.key){this.logDebug("Removed leading root key.");segList.shift()}keyPath=segList.join(this.options.keyPathSeparator);return this.tnRoot._loadKeyPath(keyPath,callback)},selectKey:function(key,select){var dtnode=this.getNodeByKey(key);if(!dtnode){return null}dtnode.select(select);return dtnode},enableUpdate:function(bEnable){if(this.bEnableUpdate==bEnable){return bEnable}this.bEnableUpdate=bEnable;if(bEnable){this.redraw()}return !bEnable},count:function(){return this.tnRoot.countChildren()},visit:function(fn,includeRoot){return this.tnRoot.visit(fn,includeRoot)},_createFromTag:function(parentTreeNode,$ulParent){var self=this;$ulParent.find(">li").each(function(){var $li=$(this);var $liSpan=$li.find(">span:first");var title;if($liSpan.length){title=$liSpan.html()}else{title=$li.html();var iPos=title.search(/