/*
 * jQuery JavaScript Library v1.3.2
 * http://jquery.com/
 *
 * Copyright (c) 2009 John Resig
 * Dual licensed under the MIT and GPL licenses.
 * http://docs.jquery.com/License
 *
 * Date: 2009-02-19 17:34:21 -0500 (Thu, 19 Feb 2009)
 * Revision: 6246
 */
(function(){var n=this,g,B=n.jQuery,r=n.$,q=n.jQuery=n.$=function(H,I){return new q.fn.init(H,I);},G=/^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,f=/^.[^:#\[\.,]*$/;q.fn=q.prototype={init:function(H,K){H=H||document;if(H.nodeType){this[0]=H;this.length=1;this.context=H;return this;}if(typeof H==="string"){var J=G.exec(H);if(J&&(J[1]||!K)){if(J[1]){H=q.clean([J[1]],K);}else{var L=document.getElementById(J[3]);if(L&&L.id!=J[3]){return q().find(H);}var I=q(L||[]);I.context=document;I.selector=H;return I;}}else{return q(K).find(H);}}else{if(q.isFunction(H)){return q(document).ready(H);}}if(H.selector&&H.context){this.selector=H.selector;this.context=H.context;}return this.setArray(q.isArray(H)?H:q.makeArray(H));},selector:"",jquery:"1.3.2",size:function(){return this.length;},get:function(H){return H===g?Array.prototype.slice.call(this):this[H];},pushStack:function(I,K,H){var J=q(I);J.prevObject=this;J.context=this.context;if(K==="find"){J.selector=this.selector+(this.selector?" ":"")+H;}else{if(K){J.selector=this.selector+"."+K+"("+H+")";}}return J;},setArray:function(H){this.length=0;Array.prototype.push.apply(this,H);return this;},each:function(I,H){return q.each(this,I,H);},index:function(H){return q.inArray(H&&H.jquery?H[0]:H,this);},attr:function(I,K,J){var H=I;if(typeof I==="string"){if(K===g){return this[0]&&q[J||"attr"](this[0],I);}else{H={};H[I]=K;}}return this.each(function(L){for(I in H){q.attr(J?this.style:this,I,q.prop(this,H[I],J,L,I));}});},css:function(H,I){if((H=="width"||H=="height")&&parseFloat(I)<0){I=g;}return this.attr(H,I,"curCSS");},text:function(I){if(typeof I!=="object"&&I!=null){return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(I));}var H="";q.each(I||this,function(){q.each(this.childNodes,function(){if(this.nodeType!=8){H+=this.nodeType!=1?this.nodeValue:q.fn.text([this]);}});});return H;},wrapAll:function(H){if(this[0]){var I=q(H,this[0].ownerDocument).clone();if(this[0].parentNode){I.insertBefore(this[0]);}I.map(function(){var J=this;while(J.firstChild){J=J.firstChild;}return J;}).append(this);}return this;},wrapInner:function(H){return this.each(function(){q(this).contents().wrapAll(H);});},wrap:function(H){return this.each(function(){q(this).wrapAll(H);});},append:function(){return this.domManip(arguments,true,function(H){if(this.nodeType==1){this.appendChild(H);}});},prepend:function(){return this.domManip(arguments,true,function(H){if(this.nodeType==1){this.insertBefore(H,this.firstChild);}});},before:function(){return this.domManip(arguments,false,function(H){this.parentNode.insertBefore(H,this);});},after:function(){return this.domManip(arguments,false,function(H){this.parentNode.insertBefore(H,this.nextSibling);});},end:function(){return this.prevObject||q([]);},push:[].push,sort:[].sort,splice:[].splice,find:function(H){if(this.length===1){var I=this.pushStack([],"find",H);I.length=0;q.find(H,this[0],I);return I;}else{return this.pushStack(q.unique(q.map(this,function(J){return q.find(H,J);})),"find",H);}},clone:function(J){var H=this.map(function(){if(!q.support.noCloneEvent&&!q.isXMLDoc(this)){var L=this.outerHTML;if(!L){var M=this.ownerDocument.createElement("div");M.appendChild(this.cloneNode(true));L=M.innerHTML;}return q.clean([L.replace(/ jQuery\d+="(?:\d+|null)"/g,"").replace(/^\s*/,"")])[0];}else{return this.cloneNode(true);}});if(J===true){var K=this.find("*").andSelf(),I=0;H.find("*").andSelf().each(function(){if(this.nodeName!==K[I].nodeName){return;}var L=q.data(K[I],"events");for(var N in L){for(var M in L[N]){q.event.add(this,N,L[N][M],L[N][M].data);}}I++;});}return H;},filter:function(H){return this.pushStack(q.isFunction(H)&&q.grep(this,function(J,I){return H.call(J,I);})||q.multiFilter(H,q.grep(this,function(I){return I.nodeType===1;})),"filter",H);},closest:function(H){var J=q.expr.match.POS.test(H)?q(H):null,I=0;return this.map(function(){var K=this;while(K&&K.ownerDocument){if(J?J.index(K)>-1:q(K).is(H)){q.data(K,"closest",I);return K;}K=K.parentNode;I++;}});},not:function(H){if(typeof H==="string"){if(f.test(H)){return this.pushStack(q.multiFilter(H,this,true),"not",H);}else{H=q.multiFilter(H,this);}}var I=H.length&&H[H.length-1]!==g&&!H.nodeType;return this.filter(function(){return I?q.inArray(this,H)<0:this!=H;});},add:function(H){return this.pushStack(q.unique(q.merge(this.get(),typeof H==="string"?q(H):q.makeArray(H))));},is:function(H){return !!H&&q.multiFilter(H,this).length>0;},hasClass:function(H){return !!H&&this.is("."+H);},val:function(N){if(N===g){var H=this[0];if(H){if(q.nodeName(H,"option")){return(H.attributes.value||{}).specified?H.value:H.text;}if(q.nodeName(H,"select")){var L=H.selectedIndex,O=[],P=H.options,K=H.type=="select-one";if(L<0){return null;}for(var I=K?L:0,M=K?L+1:P.length;I<M;I++){var J=P[I];if(J.selected){N=q(J).val();if(K){return N;}O.push(N);}}return O;}return(H.value||"").replace(/\r/g,"");}return g;}if(typeof N==="number"){N+="";}return this.each(function(){if(this.nodeType!=1){return;}if(q.isArray(N)&&/radio|checkbox/.test(this.type)){this.checked=(q.inArray(this.value,N)>=0||q.inArray(this.name,N)>=0);}else{if(q.nodeName(this,"select")){var Q=q.makeArray(N);q("option",this).each(function(){this.selected=(q.inArray(this.value,Q)>=0||q.inArray(this.text,Q)>=0);});if(!Q.length){this.selectedIndex=-1;}}else{this.value=N;}}});},html:function(H){return H===g?(this[0]?this[0].innerHTML.replace(/ jQuery\d+="(?:\d+|null)"/g,""):null):this.empty().append(H);},replaceWith:function(H){return this.after(H).remove();},eq:function(H){return this.slice(H,+H+1);},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments),"slice",Array.prototype.slice.call(arguments).join(","));},map:function(H){return this.pushStack(q.map(this,function(J,I){return H.call(J,I,J);}));},andSelf:function(){return this.add(this.prevObject);},domManip:function(M,P,O){if(this[0]){var L=(this[0].ownerDocument||this[0]).createDocumentFragment(),I=q.clean(M,(this[0].ownerDocument||this[0]),L),K=L.firstChild;if(K){for(var J=0,H=this.length;J<H;J++){O.call(N(this[J],K),this.length>1||J>0?L.cloneNode(true):L);}}if(I){q.each(I,C);}}return this;function N(Q,R){return P&&q.nodeName(Q,"table")&&q.nodeName(R,"tr")?(Q.getElementsByTagName("tbody")[0]||Q.appendChild(Q.ownerDocument.createElement("tbody"))):Q;}}};q.fn.init.prototype=q.fn;function C(H,I){if(I.src){q.ajax({url:I.src,async:false,dataType:"script"});}else{q.globalEval(I.text||I.textContent||I.innerHTML||"");}if(I.parentNode){I.parentNode.removeChild(I);}}function e(){return +new Date;}q.extend=q.fn.extend=function(){var M=arguments[0]||{},K=1,L=arguments.length,H=false,J;if(typeof M==="boolean"){H=M;M=arguments[1]||{};K=2;}if(typeof M!=="object"&&!q.isFunction(M)){M={};}if(L==K){M=this;--K;}for(;K<L;K++){if((J=arguments[K])!=null){for(var I in J){var N=M[I],O=J[I];if(M===O){continue;}if(H&&O&&typeof O==="object"&&!O.nodeType){M[I]=q.extend(H,N||(O.length!=null?[]:{}),O);}else{if(O!==g){M[I]=O;}}}}}return M;};var b=/z-?index|font-?weight|opacity|zoom|line-?height/i,s=document.defaultView||{},v=Object.prototype.toString;q.extend({noConflict:function(H){n.$=r;if(H){n.jQuery=B;}return q;},isFunction:function(H){return v.call(H)==="[object Function]";},isArray:function(H){return v.call(H)==="[object Array]";},isXMLDoc:function(H){return H.nodeType===9&&H.documentElement.nodeName!=="HTML"||!!H.ownerDocument&&q.isXMLDoc(H.ownerDocument);},globalEval:function(J){if(J&&/\S/.test(J)){var I=document.getElementsByTagName("head")[0]||document.documentElement,H=document.createElement("script");H.type="text/javascript";if(q.support.scriptEval){H.appendChild(document.createTextNode(J));}else{H.text=J;}I.insertBefore(H,I.firstChild);I.removeChild(H);}},nodeName:function(I,H){return I.nodeName&&I.nodeName.toUpperCase()==H.toUpperCase();},each:function(J,N,I){var H,K=0,L=J.length;if(I){if(L===g){for(H in J){if(N.apply(J[H],I)===false){break;}}}else{for(;K<L;){if(N.apply(J[K++],I)===false){break;}}}}else{if(L===g){for(H in J){if(N.call(J[H],H,J[H])===false){break;}}}else{for(var M=J[0];K<L&&N.call(M,K,M)!==false;M=J[++K]){}}}return J;},prop:function(K,L,J,I,H){if(q.isFunction(L)){L=L.call(K,I);}return typeof L==="number"&&J=="curCSS"&&!b.test(H)?L+"px":L;},className:{add:function(H,I){q.each((I||"").split(/\s+/),function(J,K){if(H.nodeType==1&&!q.className.has(H.className,K)){H.className+=(H.className?" ":"")+K;}});},remove:function(H,I){if(H.nodeType==1){H.className=I!==g?q.grep(H.className.split(/\s+/),function(J){return !q.className.has(I,J);}).join(" "):"";}},has:function(I,H){return I&&q.inArray(H,(I.className||I).toString().split(/\s+/))>-1;}},swap:function(K,J,L){var H={};for(var I in J){H[I]=K.style[I];K.style[I]=J[I];}L.call(K);for(var I in J){K.style[I]=H[I];}},css:function(K,I,M,H){if(I=="width"||I=="height"){var O,J={position:"absolute",visibility:"hidden",display:"block"},N=I=="width"?["Left","Right"]:["Top","Bottom"];function L(){O=I=="width"?K.offsetWidth:K.offsetHeight;if(H==="border"){return;}q.each(N,function(){if(!H){O-=parseFloat(q.curCSS(K,"padding"+this,true))||0;}if(H==="margin"){O+=parseFloat(q.curCSS(K,"margin"+this,true))||0;}else{O-=parseFloat(q.curCSS(K,"border"+this+"Width",true))||0;}});}if(K.offsetWidth!==0){L();}else{q.swap(K,J,L);}return Math.max(0,Math.round(O));}return q.curCSS(K,I,M);},curCSS:function(L,I,J){var O,H=L.style;if(I=="opacity"&&!q.support.opacity){O=q.attr(H,"opacity");return O==""?"1":O;}if(I.match(/float/i)){I=z;}if(!J&&H&&H[I]){O=H[I];}else{if(s.getComputedStyle){if(I.match(/float/i)){I="float";}I=I.replace(/([A-Z])/g,"-$1").toLowerCase();var P=s.getComputedStyle(L,null);if(P){O=P.getPropertyValue(I);}if(I=="opacity"&&O==""){O="1";}}else{if(L.currentStyle){var M=I.replace(/\-(\w)/g,function(Q,R){return R.toUpperCase();});O=L.currentStyle[I]||L.currentStyle[M];if(!/^\d+(px)?$/i.test(O)&&/^\d/.test(O)){var K=H.left,N=L.runtimeStyle.left;L.runtimeStyle.left=L.currentStyle.left;H.left=O||0;O=H.pixelLeft+"px";H.left=K;L.runtimeStyle.left=N;}}}}return O;},clean:function(I,N,L){N=N||document;if(typeof N.createElement==="undefined"){N=N.ownerDocument||N[0]&&N[0].ownerDocument||document;}if(!L&&I.length===1&&typeof I[0]==="string"){var K=/^<(\w+)\s*\/?>$/.exec(I[0]);if(K){return[N.createElement(K[1])];}}var J=[],H=[],O=N.createElement("div");q.each(I,function(S,V){if(typeof V==="number"){V+="";}if(!V){return;}if(typeof V==="string"){V=V.replace(/(<(\w+)[^>]*?)\/>/g,function(X,Y,W){return W.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?X:Y+"></"+W+">";});var R=V.replace(/^\s+/,"").substring(0,10).toLowerCase();var T=!R.indexOf("<opt")&&[1,"<select multiple='multiple'>","</select>"]||!R.indexOf("<leg")&&[1,"<fieldset>","</fieldset>"]||R.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"<table>","</table>"]||!R.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!R.indexOf("<td")||!R.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||!R.indexOf("<col")&&[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"]||!q.support.htmlSerialize&&[1,"div<div>","</div>"]||[0,"",""];O.innerHTML=T[1]+V+T[2];while(T[0]--){O=O.lastChild;}if(!q.support.tbody){var U=/<tbody/i.test(V),Q=!R.indexOf("<table")&&!U?O.firstChild&&O.firstChild.childNodes:T[1]=="<table>"&&!U?O.childNodes:[];for(var P=Q.length-1;P>=0;--P){if(q.nodeName(Q[P],"tbody")&&!Q[P].childNodes.length){Q[P].parentNode.removeChild(Q[P]);}}}if(!q.support.leadingWhitespace&&/^\s/.test(V)){O.insertBefore(N.createTextNode(V.match(/^\s*/)[0]),O.firstChild);}V=q.makeArray(O.childNodes);}if(V.nodeType){J.push(V);}else{J=q.merge(J,V);}});if(L){for(var M=0;J[M];M++){if(q.nodeName(J[M],"script")&&(!J[M].type||J[M].type.toLowerCase()==="text/javascript")){H.push(J[M].parentNode?J[M].parentNode.removeChild(J[M]):J[M]);}else{if(J[M].nodeType===1){J.splice.apply(J,[M+1,0].concat(q.makeArray(J[M].getElementsByTagName("script"))));}L.appendChild(J[M]);}}return H;}return J;},attr:function(M,J,N){if(!M||M.nodeType==3||M.nodeType==8){return g;}var K=!q.isXMLDoc(M),O=N!==g;J=K&&q.props[J]||J;if(M.tagName){var I=/href|src|style/.test(J);if(J=="selected"&&M.parentNode){M.parentNode.selectedIndex;}if(J in M&&K&&!I){if(O){if(J=="type"&&q.nodeName(M,"input")&&M.parentNode){throw"type property can't be changed";}M[J]=N;}if(q.nodeName(M,"form")&&M.getAttributeNode(J)){return M.getAttributeNode(J).nodeValue;}if(J=="tabIndex"){var L=M.getAttributeNode("tabIndex");return L&&L.specified?L.value:M.nodeName.match(/(button|input|object|select|textarea)/i)?0:M.nodeName.match(/^(a|area)$/i)&&M.href?0:g;}return M[J];}if(!q.support.style&&K&&J=="style"){return q.attr(M.style,"cssText",N);}if(O){M.setAttribute(J,""+N);}var H=!q.support.hrefNormalized&&K&&I?M.getAttribute(J,2):M.getAttribute(J);return H===null?g:H;}if(!q.support.opacity&&J=="opacity"){if(O){M.zoom=1;M.filter=(M.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(N)+""=="NaN"?"":"alpha(opacity="+N*100+")");}return M.filter&&M.filter.indexOf("opacity=")>=0?(parseFloat(M.filter.match(/opacity=([^)]*)/)[1])/100)+"":"";}J=J.replace(/-([a-z])/ig,function(P,Q){return Q.toUpperCase();});if(O){M[J]=N;}return M[J];},trim:function(H){return(H||"").replace(/^\s+|\s+$/g,"");},makeArray:function(J){var H=[];if(J!=null){var I=J.length;if(I==null||typeof J==="string"||q.isFunction(J)||J.setInterval){H[0]=J;}else{while(I){H[--I]=J[I];}}}return H;},inArray:function(J,K){for(var H=0,I=K.length;H<I;H++){if(K[H]===J){return H;}}return -1;},merge:function(K,H){var I=0,J,L=K.length;if(!q.support.getAll){while((J=H[I++])!=null){if(J.nodeType!=8){K[L++]=J;}}}else{while((J=H[I++])!=null){K[L++]=J;}}return K;},unique:function(N){var I=[],H={};try{for(var J=0,K=N.length;J<K;J++){var M=q.data(N[J]);if(!H[M]){H[M]=true;I.push(N[J]);}}}catch(L){I=N;}return I;},grep:function(I,M,H){var J=[];for(var K=0,L=I.length;K<L;K++){if(!H!=!M(I[K],K)){J.push(I[K]);}}return J;},map:function(H,M){var I=[];for(var J=0,K=H.length;J<K;J++){var L=M(H[J],J);if(L!=null){I[I.length]=L;}}return I.concat.apply([],I);}});var F=navigator.userAgent.toLowerCase();q.browser={version:(F.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[0,"0"])[1],safari:/webkit/.test(F),opera:/opera/.test(F),msie:/msie/.test(F)&&!/opera/.test(F),mozilla:/mozilla/.test(F)&&!/(compatible|webkit)/.test(F)};q.each({parent:function(H){return H.parentNode;},parents:function(H){return q.dir(H,"parentNode");},next:function(H){return q.nth(H,2,"nextSibling");},prev:function(H){return q.nth(H,2,"previousSibling");},nextAll:function(H){return q.dir(H,"nextSibling");},prevAll:function(H){return q.dir(H,"previousSibling");},siblings:function(H){return q.sibling(H.parentNode.firstChild,H);},children:function(H){return q.sibling(H.firstChild);},contents:function(H){return q.nodeName(H,"iframe")?H.contentDocument||H.contentWindow.document:q.makeArray(H.childNodes);}},function(H,I){q.fn[H]=function(J){var K=q.map(this,I);if(J&&typeof J=="string"){K=q.multiFilter(J,K);}return this.pushStack(q.unique(K),H,J);};});q.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(H,I){q.fn[H]=function(J){var M=[],O=q(J);for(var N=0,K=O.length;N<K;N++){var L=(N>0?this.clone(true):this).get();q.fn[I].apply(q(O[N]),L);M=M.concat(L);}return this.pushStack(M,H,J);};});q.each({removeAttr:function(H){q.attr(this,H,"");if(this.nodeType==1){this.removeAttribute(H);}},addClass:function(H){q.className.add(this,H);},removeClass:function(H){q.className.remove(this,H);},toggleClass:function(I,H){if(typeof H!=="boolean"){H=!q.className.has(this,I);}q.className[H?"add":"remove"](this,I);},remove:function(H){if(!H||q.filter(H,[this]).length){q("*",this).add([this]).each(function(){q.event.remove(this);q.removeData(this);});if(this.parentNode){this.parentNode.removeChild(this);}}},empty:function(){q(this).children().remove();while(this.firstChild){this.removeChild(this.firstChild);}}},function(H,I){q.fn[H]=function(){return this.each(I,arguments);};});function k(H,I){return H[0]&&parseInt(q.curCSS(H[0],I,true),10)||0;}var h="jQuery"+e(),y=0,D={};q.extend({cache:{},data:function(I,H,J){I=I==n?D:I;var K=I[h];if(!K){K=I[h]=++y;}if(H&&!q.cache[K]){q.cache[K]={};}if(J!==g){q.cache[K][H]=J;}return H?q.cache[K][H]:K;},removeData:function(I,H){I=I==n?D:I;var K=I[h];if(H){if(q.cache[K]){delete q.cache[K][H];H="";for(H in q.cache[K]){break;}if(!H){q.removeData(I);}}}else{try{delete I[h];}catch(J){if(I.removeAttribute){I.removeAttribute(h);}}delete q.cache[K];}},queue:function(I,H,K){if(I){H=(H||"fx")+"queue";var J=q.data(I,H);if(!J||q.isArray(K)){J=q.data(I,H,q.makeArray(K));}else{if(K){J.push(K);}}}return J;},dequeue:function(K,J){var H=q.queue(K,J),I=H.shift();if(!J||J==="fx"){I=H[0];}if(I!==g){I.call(K);}}});q.fn.extend({data:function(H,J){var K=H.split(".");K[1]=K[1]?"."+K[1]:"";if(J===g){var I=this.triggerHandler("getData"+K[1]+"!",[K[0]]);if(I===g&&this.length){I=q.data(this[0],H);}return I===g&&K[1]?this.data(K[0]):I;}else{return this.trigger("setData"+K[1]+"!",[K[0],J]).each(function(){q.data(this,H,J);});}},removeData:function(H){return this.each(function(){q.removeData(this,H);});},queue:function(H,I){if(typeof H!=="string"){I=H;H="fx";}if(I===g){return q.queue(this[0],H);}return this.each(function(){var J=q.queue(this,H,I);if(H=="fx"&&J.length==1){J[0].call(this);}});},dequeue:function(H){return this.each(function(){q.dequeue(this,H);});}});
/*
 * Sizzle CSS Selector Engine - v0.9.3
 *  Copyright 2009, The Dojo Foundation
 *  Released under the MIT, BSD, and GPL Licenses.
 *  More information: http://sizzlejs.com/
 */
(function(){var U=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?/g,O=0,K=Object.prototype.toString;var I=function(ab,X,ae,af){ae=ae||[];X=X||document;if(X.nodeType!==1&&X.nodeType!==9){return[];}if(!ab||typeof ab!=="string"){return ae;}var ac=[],Z,ai,al,W,ag,Y,aa=true;U.lastIndex=0;while((Z=U.exec(ab))!==null){ac.push(Z[1]);if(Z[2]){Y=RegExp.rightContext;break;}}if(ac.length>1&&P.exec(ab)){if(ac.length===2&&L.relative[ac[0]]){ai=M(ac[0]+ac[1],X);}else{ai=L.relative[ac[0]]?[X]:I(ac.shift(),X);while(ac.length){ab=ac.shift();if(L.relative[ab]){ab+=ac.shift();}ai=M(ab,ai);}}}else{var ah=af?{expr:ac.pop(),set:H(af)}:I.find(ac.pop(),ac.length===1&&X.parentNode?X.parentNode:X,T(X));ai=I.filter(ah.expr,ah.set);if(ac.length>0){al=H(ai);}else{aa=false;}while(ac.length){var ak=ac.pop(),aj=ak;if(!L.relative[ak]){ak="";}else{aj=ac.pop();}if(aj==null){aj=X;}L.relative[ak](al,aj,T(X));}}if(!al){al=ai;}if(!al){throw"Syntax error, unrecognized expression: "+(ak||ab);}if(K.call(al)==="[object Array]"){if(!aa){ae.push.apply(ae,al);}else{if(X.nodeType===1){for(var ad=0;al[ad]!=null;ad++){if(al[ad]&&(al[ad]===true||al[ad].nodeType===1&&N(X,al[ad]))){ae.push(ai[ad]);}}}else{for(var ad=0;al[ad]!=null;ad++){if(al[ad]&&al[ad].nodeType===1){ae.push(ai[ad]);}}}}}else{H(al,ae);}if(Y){I(Y,X,ae,af);if(J){hasDuplicate=false;ae.sort(J);if(hasDuplicate){for(var ad=1;ad<ae.length;ad++){if(ae[ad]===ae[ad-1]){ae.splice(ad--,1);}}}}}return ae;};I.matches=function(W,X){return I(W,null,null,X);};I.find=function(ad,W,ae){var ac,aa;if(!ad){return[];}for(var Z=0,Y=L.order.length;Z<Y;Z++){var ab=L.order[Z],aa;if((aa=L.match[ab].exec(ad))){var X=RegExp.leftContext;if(X.substr(X.length-1)!=="\\"){aa[1]=(aa[1]||"").replace(/\\/g,"");ac=L.find[ab](aa,W,ae);if(ac!=null){ad=ad.replace(L.match[ab],"");break;}}}}if(!ac){ac=W.getElementsByTagName("*");}return{set:ac,expr:ad};};I.filter=function(ag,af,aj,Z){var Y=ag,al=[],ad=af,ab,W,ac=af&&af[0]&&T(af[0]);while(ag&&af.length){for(var ae in L.filter){if((ab=L.match[ae].exec(ag))!=null){var X=L.filter[ae],ak,ai;W=false;if(ad==al){al=[];}if(L.preFilter[ae]){ab=L.preFilter[ae](ab,ad,aj,al,Z,ac);if(!ab){W=ak=true;}else{if(ab===true){continue;}}}if(ab){for(var aa=0;(ai=ad[aa])!=null;aa++){if(ai){ak=X(ai,ab,aa,ad);var ah=Z^!!ak;if(aj&&ak!=null){if(ah){W=true;}else{ad[aa]=false;}}else{if(ah){al.push(ai);W=true;}}}}}if(ak!==g){if(!aj){ad=al;}ag=ag.replace(L.match[ae],"");if(!W){return[];}break;}}}if(ag==Y){if(W==null){throw"Syntax error, unrecognized expression: "+ag;}else{break;}}Y=ag;}return ad;};var L=I.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF_-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF_-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*_-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF_-]|\\.)+)(?:\((['"]*)((?:\([^\)]+\)|[^\2\(\)]*)+)\2\))?/},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(W){return W.getAttribute("href");}},relative:{"+":function(ad,W,ac){var aa=typeof W==="string",ae=aa&&!/\W/.test(W),ab=aa&&!ae;if(ae&&!ac){W=W.toUpperCase();}for(var Z=0,Y=ad.length,X;Z<Y;Z++){if((X=ad[Z])){while((X=X.previousSibling)&&X.nodeType!==1){}ad[Z]=ab||X&&X.nodeName===W?X||false:X===W;}}if(ab){I.filter(W,ad,true);}},">":function(ac,X,ad){var aa=typeof X==="string";if(aa&&!/\W/.test(X)){X=ad?X:X.toUpperCase();for(var Y=0,W=ac.length;Y<W;Y++){var ab=ac[Y];if(ab){var Z=ab.parentNode;ac[Y]=Z.nodeName===X?Z:false;}}}else{for(var Y=0,W=ac.length;Y<W;Y++){var ab=ac[Y];if(ab){ac[Y]=aa?ab.parentNode:ab.parentNode===X;}}if(aa){I.filter(X,ac,true);}}},"":function(Z,X,ab){var Y=O++,W=V;if(!X.match(/\W/)){var aa=X=ab?X:X.toUpperCase();W=S;}W("parentNode",X,Y,Z,aa,ab);},"~":function(Z,X,ab){var Y=O++,W=V;if(typeof X==="string"&&!X.match(/\W/)){var aa=X=ab?X:X.toUpperCase();W=S;}W("previousSibling",X,Y,Z,aa,ab);}},find:{ID:function(X,Y,Z){if(typeof Y.getElementById!=="undefined"&&!Z){var W=Y.getElementById(X[1]);return W?[W]:[];}},NAME:function(Y,ab,ac){if(typeof ab.getElementsByName!=="undefined"){var X=[],aa=ab.getElementsByName(Y[1]);for(var Z=0,W=aa.length;Z<W;Z++){if(aa[Z].getAttribute("name")===Y[1]){X.push(aa[Z]);}}return X.length===0?null:X;}},TAG:function(W,X){return X.getElementsByTagName(W[1]);}},preFilter:{CLASS:function(Z,X,Y,W,ac,ad){Z=" "+Z[1].replace(/\\/g,"")+" ";if(ad){return Z;}for(var aa=0,ab;(ab=X[aa])!=null;aa++){if(ab){if(ac^(ab.className&&(" "+ab.className+" ").indexOf(Z)>=0)){if(!Y){W.push(ab);}}else{if(Y){X[aa]=false;}}}}return false;},ID:function(W){return W[1].replace(/\\/g,"");},TAG:function(X,W){for(var Y=0;W[Y]===false;Y++){}return W[Y]&&T(W[Y])?X[1]:X[1].toUpperCase();},CHILD:function(W){if(W[1]=="nth"){var X=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(W[2]=="even"&&"2n"||W[2]=="odd"&&"2n+1"||!/\D/.test(W[2])&&"0n+"+W[2]||W[2]);W[2]=(X[1]+(X[2]||1))-0;W[3]=X[3]-0;}W[0]=O++;return W;},ATTR:function(aa,X,Y,W,ab,ac){var Z=aa[1].replace(/\\/g,"");if(!ac&&L.attrMap[Z]){aa[1]=L.attrMap[Z];}if(aa[2]==="~="){aa[4]=" "+aa[4]+" ";}return aa;},PSEUDO:function(aa,X,Y,W,ab){if(aa[1]==="not"){if(aa[3].match(U).length>1||/^\w/.test(aa[3])){aa[3]=I(aa[3],null,null,X);}else{var Z=I.filter(aa[3],X,Y,true^ab);if(!Y){W.push.apply(W,Z);}return false;}}else{if(L.match.POS.test(aa[0])||L.match.CHILD.test(aa[0])){return true;}}return aa;},POS:function(W){W.unshift(true);return W;}},filters:{enabled:function(W){return W.disabled===false&&W.type!=="hidden";},disabled:function(W){return W.disabled===true;},checked:function(W){return W.checked===true;},selected:function(W){W.parentNode.selectedIndex;return W.selected===true;},parent:function(W){return !!W.firstChild;},empty:function(W){return !W.firstChild;},has:function(Y,X,W){return !!I(W[3],Y).length;},header:function(W){return/h\d/i.test(W.nodeName);},text:function(W){return"text"===W.type;},radio:function(W){return"radio"===W.type;},checkbox:function(W){return"checkbox"===W.type;},file:function(W){return"file"===W.type;},password:function(W){return"password"===W.type;},submit:function(W){return"submit"===W.type;},image:function(W){return"image"===W.type;},reset:function(W){return"reset"===W.type;},button:function(W){return"button"===W.type||W.nodeName.toUpperCase()==="BUTTON";},input:function(W){return/input|select|textarea|button/i.test(W.nodeName);}},setFilters:{first:function(X,W){return W===0;},last:function(Y,X,W,Z){return X===Z.length-1;},even:function(X,W){return W%2===0;},odd:function(X,W){return W%2===1;},lt:function(Y,X,W){return X<W[3]-0;},gt:function(Y,X,W){return X>W[3]-0;},nth:function(Y,X,W){return W[3]-0==X;},eq:function(Y,X,W){return W[3]-0==X;}},filter:{PSEUDO:function(ac,Y,Z,ad){var X=Y[1],aa=L.filters[X];if(aa){return aa(ac,Z,Y,ad);}else{if(X==="contains"){return(ac.textContent||ac.innerText||"").indexOf(Y[3])>=0;}else{if(X==="not"){var ab=Y[3];for(var Z=0,W=ab.length;Z<W;Z++){if(ab[Z]===ac){return false;}}return true;}}}},CHILD:function(W,Z){var ac=Z[1],X=W;switch(ac){case"only":case"first":while(X=X.previousSibling){if(X.nodeType===1){return false;}}if(ac=="first"){return true;}X=W;case"last":while(X=X.nextSibling){if(X.nodeType===1){return false;}}return true;case"nth":var Y=Z[2],af=Z[3];if(Y==1&&af==0){return true;}var ab=Z[0],ae=W.parentNode;if(ae&&(ae.sizcache!==ab||!W.nodeIndex)){var aa=0;for(X=ae.firstChild;X;X=X.nextSibling){if(X.nodeType===1){X.nodeIndex=++aa;}}ae.sizcache=ab;}var ad=W.nodeIndex-af;if(Y==0){return ad==0;}else{return(ad%Y==0&&ad/Y>=0);}}},ID:function(X,W){return X.nodeType===1&&X.getAttribute("id")===W;},TAG:function(X,W){return(W==="*"&&X.nodeType===1)||X.nodeName===W;},CLASS:function(X,W){return(" "+(X.className||X.getAttribute("class"))+" ").indexOf(W)>-1;},ATTR:function(ab,Z){var Y=Z[1],W=L.attrHandle[Y]?L.attrHandle[Y](ab):ab[Y]!=null?ab[Y]:ab.getAttribute(Y),ac=W+"",aa=Z[2],X=Z[4];return W==null?aa==="!=":aa==="="?ac===X:aa==="*="?ac.indexOf(X)>=0:aa==="~="?(" "+ac+" ").indexOf(X)>=0:!X?ac&&W!==false:aa==="!="?ac!=X:aa==="^="?ac.indexOf(X)===0:aa==="$="?ac.substr(ac.length-X.length)===X:aa==="|="?ac===X||ac.substr(0,X.length+1)===X+"-":false;},POS:function(aa,X,Y,ab){var W=X[2],Z=L.setFilters[W];if(Z){return Z(aa,Y,X,ab);}}}};var P=L.match.POS;for(var R in L.match){L.match[R]=RegExp(L.match[R].source+/(?![^\[]*\])(?![^\(]*\))/.source);}var H=function(X,W){X=Array.prototype.slice.call(X);if(W){W.push.apply(W,X);return W;}return X;};try{Array.prototype.slice.call(document.documentElement.childNodes);}catch(Q){H=function(aa,Z){var X=Z||[];if(K.call(aa)==="[object Array]"){Array.prototype.push.apply(X,aa);}else{if(typeof aa.length==="number"){for(var Y=0,W=aa.length;Y<W;Y++){X.push(aa[Y]);}}else{for(var Y=0;aa[Y];Y++){X.push(aa[Y]);}}}return X;};}var J;if(document.documentElement.compareDocumentPosition){J=function(X,W){var Y=X.compareDocumentPosition(W)&4?-1:X===W?0:1;if(Y===0){hasDuplicate=true;}return Y;};}else{if("sourceIndex" in document.documentElement){J=function(X,W){var Y=X.sourceIndex-W.sourceIndex;if(Y===0){hasDuplicate=true;}return Y;};}else{if(document.createRange){J=function(Z,X){var Y=Z.ownerDocument.createRange(),W=X.ownerDocument.createRange();Y.selectNode(Z);Y.collapse(true);W.selectNode(X);W.collapse(true);var aa=Y.compareBoundaryPoints(Range.START_TO_END,W);if(aa===0){hasDuplicate=true;}return aa;};}}}(function(){var X=document.createElement("form"),Y="script"+(new Date).getTime();X.innerHTML="<input name='"+Y+"'/>";var W=document.documentElement;W.insertBefore(X,W.firstChild);if(!!document.getElementById(Y)){L.find.ID=function(aa,ab,ac){if(typeof ab.getElementById!=="undefined"&&!ac){var Z=ab.getElementById(aa[1]);return Z?Z.id===aa[1]||typeof Z.getAttributeNode!=="undefined"&&Z.getAttributeNode("id").nodeValue===aa[1]?[Z]:g:[];}};L.filter.ID=function(ab,Z){var aa=typeof ab.getAttributeNode!=="undefined"&&ab.getAttributeNode("id");return ab.nodeType===1&&aa&&aa.nodeValue===Z;};}W.removeChild(X);})();(function(){var W=document.createElement("div");W.appendChild(document.createComment(""));if(W.getElementsByTagName("*").length>0){L.find.TAG=function(X,ab){var aa=ab.getElementsByTagName(X[1]);if(X[1]==="*"){var Z=[];for(var Y=0;aa[Y];Y++){if(aa[Y].nodeType===1){Z.push(aa[Y]);}}aa=Z;}return aa;};}W.innerHTML="<a href='#'></a>";if(W.firstChild&&typeof W.firstChild.getAttribute!=="undefined"&&W.firstChild.getAttribute("href")!=="#"){L.attrHandle.href=function(X){return X.getAttribute("href",2);};}})();if(document.querySelectorAll){(function(){var W=I,X=document.createElement("div");X.innerHTML="<p class='TEST'></p>";if(X.querySelectorAll&&X.querySelectorAll(".TEST").length===0){return;}I=function(ab,aa,Y,Z){aa=aa||document;if(!Z&&aa.nodeType===9&&!T(aa)){try{return H(aa.querySelectorAll(ab),Y);}catch(ac){}}return W(ab,aa,Y,Z);};I.find=W.find;I.filter=W.filter;I.selectors=W.selectors;I.matches=W.matches;})();}if(document.getElementsByClassName&&document.documentElement.getElementsByClassName){(function(){var W=document.createElement("div");W.innerHTML="<div class='test e'></div><div class='test'></div>";if(W.getElementsByClassName("e").length===0){return;}W.lastChild.className="e";if(W.getElementsByClassName("e").length===1){return;}L.order.splice(1,0,"CLASS");L.find.CLASS=function(X,Y,Z){if(typeof Y.getElementsByClassName!=="undefined"&&!Z){return Y.getElementsByClassName(X[1]);}};})();}function S(X,ac,ab,ag,ad,af){var ae=X=="previousSibling"&&!af;for(var Z=0,Y=ag.length;Z<Y;Z++){var W=ag[Z];if(W){if(ae&&W.nodeType===1){W.sizcache=ab;W.sizset=Z;}W=W[X];var aa=false;while(W){if(W.sizcache===ab){aa=ag[W.sizset];break;}if(W.nodeType===1&&!af){W.sizcache=ab;W.sizset=Z;}if(W.nodeName===ac){aa=W;break;}W=W[X];}ag[Z]=aa;}}}function V(X,ac,ab,ag,ad,af){var ae=X=="previousSibling"&&!af;for(var Z=0,Y=ag.length;Z<Y;Z++){var W=ag[Z];if(W){if(ae&&W.nodeType===1){W.sizcache=ab;W.sizset=Z;}W=W[X];var aa=false;while(W){if(W.sizcache===ab){aa=ag[W.sizset];break;}if(W.nodeType===1){if(!af){W.sizcache=ab;W.sizset=Z;}if(typeof ac!=="string"){if(W===ac){aa=true;break;}}else{if(I.filter(ac,[W]).length>0){aa=W;break;}}}W=W[X];}ag[Z]=aa;}}}var N=document.compareDocumentPosition?function(X,W){return X.compareDocumentPosition(W)&16;}:function(X,W){return X!==W&&(X.contains?X.contains(W):true);};var T=function(W){return W.nodeType===9&&W.documentElement.nodeName!=="HTML"||!!W.ownerDocument&&T(W.ownerDocument);};var M=function(W,ad){var Z=[],aa="",ab,Y=ad.nodeType?[ad]:ad;while((ab=L.match.PSEUDO.exec(W))){aa+=ab[0];W=W.replace(L.match.PSEUDO,"");}W=L.relative[W]?W+"*":W;for(var ac=0,X=Y.length;ac<X;ac++){I(W,Y[ac],Z);}return I.filter(aa,Z);};q.find=I;q.filter=I.filter;q.expr=I.selectors;q.expr[":"]=q.expr.filters;I.selectors.filters.hidden=function(W){return W.offsetWidth===0||W.offsetHeight===0;};I.selectors.filters.visible=function(W){return W.offsetWidth>0||W.offsetHeight>0;};I.selectors.filters.animated=function(W){return q.grep(q.timers,function(X){return W===X.elem;}).length;};q.multiFilter=function(Y,W,X){if(X){Y=":not("+Y+")";}return I.matches(Y,W);};q.dir=function(Y,X){var W=[],Z=Y[X];while(Z&&Z!=document){if(Z.nodeType==1){W.push(Z);}Z=Z[X];}return W;};q.nth=function(aa,W,Y,Z){W=W||1;var X=0;for(;aa;aa=aa[Y]){if(aa.nodeType==1&&++X==W){break;}}return aa;};q.sibling=function(Y,X){var W=[];for(;Y;Y=Y.nextSibling){if(Y.nodeType==1&&Y!=X){W.push(Y);}}return W;};return;n.Sizzle=I;})();q.event={add:function(L,I,K,N){if(L.nodeType==3||L.nodeType==8){return;}if(L.setInterval&&L!=n){L=n;}if(!K.guid){K.guid=this.guid++;}if(N!==g){var J=K;K=this.proxy(J);K.data=N;}var H=q.data(L,"events")||q.data(L,"events",{}),M=q.data(L,"handle")||q.data(L,"handle",function(){return typeof q!=="undefined"&&!q.event.triggered?q.event.handle.apply(arguments.callee.elem,arguments):g;});M.elem=L;q.each(I.split(/\s+/),function(P,Q){var R=Q.split(".");Q=R.shift();K.type=R.slice().sort().join(".");var O=H[Q];if(q.event.specialAll[Q]){q.event.specialAll[Q].setup.call(L,N,R);}if(!O){O=H[Q]={};if(!q.event.special[Q]||q.event.special[Q].setup.call(L,N,R)===false){if(L.addEventListener){L.addEventListener(Q,M,false);}else{if(L.attachEvent){L.attachEvent("on"+Q,M);}}}}O[K.guid]=K;q.event.global[Q]=true;});L=null;},guid:1,global:{},remove:function(N,K,M){if(N.nodeType==3||N.nodeType==8){return;}var J=q.data(N,"events"),I,H;if(J){if(K===g||(typeof K==="string"&&K.charAt(0)==".")){for(var L in J){this.remove(N,L+(K||""));}}else{if(K.type){M=K.handler;K=K.type;}q.each(K.split(/\s+/),function(P,R){var T=R.split(".");R=T.shift();var Q=RegExp("(^|\\.)"+T.slice().sort().join(".*\\.")+"(\\.|$)");if(J[R]){if(M){delete J[R][M.guid];}else{for(var S in J[R]){if(Q.test(J[R][S].type)){delete J[R][S];}}}if(q.event.specialAll[R]){q.event.specialAll[R].teardown.call(N,T);}for(I in J[R]){break;}if(!I){if(!q.event.special[R]||q.event.special[R].teardown.call(N,T)===false){if(N.removeEventListener){N.removeEventListener(R,q.data(N,"handle"),false);}else{if(N.detachEvent){N.detachEvent("on"+R,q.data(N,"handle"));}}}I=null;delete J[R];}}});}for(I in J){break;}if(!I){var O=q.data(N,"handle");if(O){O.elem=null;}q.removeData(N,"events");q.removeData(N,"handle");}}},trigger:function(L,N,K,H){var J=L.type||L;if(!H){L=typeof L==="object"?L[h]?L:q.extend(q.Event(J),L):q.Event(J);if(J.indexOf("!")>=0){L.type=J=J.slice(0,-1);L.exclusive=true;}if(!K){L.stopPropagation();if(this.global[J]){q.each(q.cache,function(){if(this.events&&this.events[J]){q.event.trigger(L,N,this.handle.elem);}});}}if(!K||K.nodeType==3||K.nodeType==8){return g;}L.result=g;L.target=K;N=q.makeArray(N);N.unshift(L);}L.currentTarget=K;var M=q.data(K,"handle");if(M){M.apply(K,N);}if((!K[J]||(q.nodeName(K,"a")&&J=="click"))&&K["on"+J]&&K["on"+J].apply(K,N)===false){L.result=false;}if(!H&&K[J]&&!L.isDefaultPrevented()&&!(q.nodeName(K,"a")&&J=="click")){this.triggered=true;try{K[J]();}catch(O){}}this.triggered=false;if(!L.isPropagationStopped()){var I=K.parentNode||K.ownerDocument;if(I){q.event.trigger(L,N,I,true);}}},handle:function(N){var M,H;N=arguments[0]=q.event.fix(N||n.event);N.currentTarget=this;var O=N.type.split(".");N.type=O.shift();M=!O.length&&!N.exclusive;var L=RegExp("(^|\\.)"+O.slice().sort().join(".*\\.")+"(\\.|$)");H=(q.data(this,"events")||{})[N.type];for(var J in H){var K=H[J];if(M||L.test(K.type)){N.handler=K;N.data=K.data;var I=K.apply(this,arguments);if(I!==g){N.result=I;if(I===false){N.preventDefault();N.stopPropagation();}}if(N.isImmediatePropagationStopped()){break;}}}},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(K){if(K[h]){return K;}var I=K;K=q.Event(I);for(var J=this.props.length,M;J;){M=this.props[--J];K[M]=I[M];}if(!K.target){K.target=K.srcElement||document;}if(K.target.nodeType==3){K.target=K.target.parentNode;}if(!K.relatedTarget&&K.fromElement){K.relatedTarget=K.fromElement==K.target?K.toElement:K.fromElement;}if(K.pageX==null&&K.clientX!=null){var L=document.documentElement,H=document.body;K.pageX=K.clientX+(L&&L.scrollLeft||H&&H.scrollLeft||0)-(L.clientLeft||0);K.pageY=K.clientY+(L&&L.scrollTop||H&&H.scrollTop||0)-(L.clientTop||0);}if(!K.which&&((K.charCode||K.charCode===0)?K.charCode:K.keyCode)){K.which=K.charCode||K.keyCode;}if(!K.metaKey&&K.ctrlKey){K.metaKey=K.ctrlKey;}if(!K.which&&K.button){K.which=(K.button&1?1:(K.button&2?3:(K.button&4?2:0)));}return K;},proxy:function(I,H){H=H||function(){return I.apply(this,arguments);};H.guid=I.guid=I.guid||H.guid||this.guid++;return H;},special:{ready:{setup:E,teardown:function(){}}},specialAll:{live:{setup:function(H,I){q.event.add(this,I[0],c);},teardown:function(J){if(J.length){var H=0,I=RegExp("(^|\\.)"+J[0]+"(\\.|$)");q.each((q.data(this,"events").live||{}),function(){if(I.test(this.type)){H++;}});if(H<1){q.event.remove(this,J[0],c);}}}}}};q.Event=function(H){if(!this.preventDefault){return new q.Event(H);}if(H&&H.type){this.originalEvent=H;this.type=H.type;}else{this.type=H;}this.timeStamp=e();this[h]=true;};function m(){return false;}function x(){return true;}q.Event.prototype={preventDefault:function(){this.isDefaultPrevented=x;var H=this.originalEvent;if(!H){return;}if(H.preventDefault){H.preventDefault();}H.returnValue=false;},stopPropagation:function(){this.isPropagationStopped=x;var H=this.originalEvent;if(!H){return;}if(H.stopPropagation){H.stopPropagation();}H.cancelBubble=true;},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=x;this.stopPropagation();},isDefaultPrevented:m,isPropagationStopped:m,isImmediatePropagationStopped:m};var a=function(I){var H=I.relatedTarget;while(H&&H!=this){try{H=H.parentNode;}catch(J){H=this;}}if(H!=this){I.type=I.data;q.event.handle.apply(this,arguments);}};q.each({mouseover:"mouseenter",mouseout:"mouseleave"},function(I,H){q.event.special[H]={setup:function(){q.event.add(this,I,a,H);},teardown:function(){q.event.remove(this,I,a);}};});q.fn.extend({bind:function(I,J,H){return I=="unload"?this.one(I,J,H):this.each(function(){q.event.add(this,I,H||J,H&&J);});},one:function(J,K,I){var H=q.event.proxy(I||K,function(L){q(this).unbind(L,H);return(I||K).apply(this,arguments);});return this.each(function(){q.event.add(this,J,H,I&&K);});},unbind:function(I,H){return this.each(function(){q.event.remove(this,I,H);});},trigger:function(H,I){return this.each(function(){q.event.trigger(H,I,this);});},triggerHandler:function(H,J){if(this[0]){var I=q.Event(H);I.preventDefault();I.stopPropagation();q.event.trigger(I,J,this[0]);return I.result;}},toggle:function(J){var H=arguments,I=1;while(I<H.length){q.event.proxy(J,H[I++]);}return this.click(q.event.proxy(J,function(K){this.lastToggle=(this.lastToggle||0)%I;K.preventDefault();return H[this.lastToggle++].apply(this,arguments)||false;}));},hover:function(H,I){return this.mouseenter(H).mouseleave(I);},ready:function(H){E();if(q.isReady){H.call(document,q);}else{q.readyList.push(H);}return this;},live:function(J,I){var H=q.event.proxy(I);H.guid+=this.selector+J;q(document).bind(j(J,this.selector),this.selector,H);return this;},die:function(I,H){q(document).unbind(j(I,this.selector),H?{guid:H.guid+this.selector+I}:null);return this;}});function c(K){var H=RegExp("(^|\\.)"+K.type+"(\\.|$)"),J=true,I=[];q.each(q.data(this,"events").live||[],function(L,M){if(H.test(M.type)){var N=q(K.target).closest(M.data)[0];if(N){I.push({elem:N,fn:M});}}});I.sort(function(M,L){return q.data(M.elem,"closest")-q.data(L.elem,"closest");});q.each(I,function(){if(this.fn.call(this.elem,K,this.fn.data)===false){return(J=false);}});return J;}function j(I,H){return["live",I,H.replace(/\./g,"`").replace(/ /g,"|")].join(".");}q.extend({isReady:false,readyList:[],ready:function(){if(!q.isReady){q.isReady=true;if(q.readyList){q.each(q.readyList,function(){this.call(document,q);});q.readyList=null;}q(document).triggerHandler("ready");}}});var A=false;function E(){if(A){return;}A=true;if(document.addEventListener){document.addEventListener("DOMContentLoaded",function(){document.removeEventListener("DOMContentLoaded",arguments.callee,false);q.ready();},false);}else{if(document.attachEvent){document.attachEvent("onreadystatechange",function(){if(document.readyState==="complete"){document.detachEvent("onreadystatechange",arguments.callee);q.ready();}});if(document.documentElement.doScroll&&n==n.top){(function(){if(q.isReady){return;}try{document.documentElement.doScroll("left");}catch(H){setTimeout(arguments.callee,0);return;}q.ready();})();}}}q.event.add(n,"load",q.ready);}q.each(("blur,focus,load,resize,scroll,unload,click,dblclick,mousedown,mouseup,mousemove,mouseover,mouseout,mouseenter,mouseleave,change,select,submit,keydown,keypress,keyup,error").split(","),function(I,H){q.fn[H]=function(J){return J?this.bind(H,J):this.trigger(H);};});q(n).bind("unload",function(){for(var H in q.cache){if(H!=1&&q.cache[H].handle){q.event.remove(q.cache[H].handle.elem);}}});(function(){q.support={};var I=document.documentElement,J=document.createElement("script"),N=document.createElement("div"),M="script"+(new Date).getTime();N.style.display="none";N.innerHTML='   <link/><table></table><a href="/a" style="color:red;float:left;opacity:.5;">a</a><select><option>text</option></select><object><param/></object>';var K=N.getElementsByTagName("*"),H=N.getElementsByTagName("a")[0];if(!K||!K.length||!H){return;}q.support={leadingWhitespace:N.firstChild.nodeType==3,tbody:!N.getElementsByTagName("tbody").length,objectAll:!!N.getElementsByTagName("object")[0].getElementsByTagName("*").length,htmlSerialize:!!N.getElementsByTagName("link").length,style:/red/.test(H.getAttribute("style")),hrefNormalized:H.getAttribute("href")==="/a",opacity:H.style.opacity==="0.5",cssFloat:!!H.style.cssFloat,scriptEval:false,noCloneEvent:true,boxModel:null};J.type="text/javascript";try{J.appendChild(document.createTextNode("window."+M+"=1;"));}catch(L){}I.insertBefore(J,I.firstChild);if(n[M]){q.support.scriptEval=true;delete n[M];}I.removeChild(J);if(N.attachEvent&&N.fireEvent){N.attachEvent("onclick",function(){q.support.noCloneEvent=false;N.detachEvent("onclick",arguments.callee);});N.cloneNode(true).fireEvent("onclick");}q(function(){var O=document.createElement("div");O.style.width=O.style.paddingLeft="1px";document.body.appendChild(O);q.boxModel=q.support.boxModel=O.offsetWidth===2;document.body.removeChild(O).style.display="none";});})();var z=q.support.cssFloat?"cssFloat":"styleFloat";q.props={"for":"htmlFor","class":"className","float":z,cssFloat:z,styleFloat:z,readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",tabindex:"tabIndex"};q.fn.extend({_load:q.fn.load,load:function(J,M,N){if(typeof J!=="string"){return this._load(J);}var L=J.indexOf(" ");if(L>=0){var H=J.slice(L,J.length);J=J.slice(0,L);}var K="GET";if(M){if(q.isFunction(M)){N=M;M=null;}else{if(typeof M==="object"){M=q.param(M);K="POST";}}}var I=this;q.ajax({url:J,type:K,dataType:"html",data:M,complete:function(P,O){if(O=="success"||O=="notmodified"){I.html(H?q("<div/>").append(P.responseText.replace(/<script(.|\s)*?\/script>/g,"")).find(H):P.responseText);}if(N){I.each(N,[P.responseText,O,P]);}}});return this;},serialize:function(){return q.param(this.serializeArray());},serializeArray:function(){return this.map(function(){return this.elements?q.makeArray(this.elements):this;}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password|search/i.test(this.type));}).map(function(H,I){var J=q(this).val();return J==null?null:q.isArray(J)?q.map(J,function(L,K){return{name:I.name,value:L};}):{name:I.name,value:J};}).get();}});q.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(H,I){q.fn[I]=function(J){return this.bind(I,J);};});var u=e();q.extend({get:function(H,J,K,I){if(q.isFunction(J)){K=J;J=null;}return q.ajax({type:"GET",url:H,data:J,success:K,dataType:I});},getScript:function(H,I){return q.get(H,null,I,"script");},getJSON:function(H,I,J){return q.get(H,I,J,"json");},post:function(H,J,K,I){if(q.isFunction(J)){K=J;J={};}return q.ajax({type:"POST",url:H,data:J,success:K,dataType:I});},ajaxSetup:function(H){q.extend(q.ajaxSettings,H);},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return n.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest();},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},ajax:function(P){P=q.extend(true,P,q.extend(true,{},q.ajaxSettings,P));var Z,I=/=\?(&|$)/g,U,Y,J=P.type.toUpperCase();if(P.data&&P.processData&&typeof P.data!=="string"){P.data=q.param(P.data);}if(P.dataType=="jsonp"){if(J=="GET"){if(!P.url.match(I)){P.url+=(P.url.match(/\?/)?"&":"?")+(P.jsonp||"callback")+"=?";}}else{if(!P.data||!P.data.match(I)){P.data=(P.data?P.data+"&":"")+(P.jsonp||"callback")+"=?";}}P.dataType="json";}if(P.dataType=="json"&&(P.data&&P.data.match(I)||P.url.match(I))){Z="jsonp"+u++;if(P.data){P.data=(P.data+"").replace(I,"="+Z+"$1");}P.url=P.url.replace(I,"="+Z+"$1");P.dataType="script";n[Z]=function(aa){Y=aa;L();O();n[Z]=g;try{delete n[Z];}catch(ab){}if(K){K.removeChild(W);}};}if(P.dataType=="script"&&P.cache==null){P.cache=false;}if(P.cache===false&&J=="GET"){var H=e();var X=P.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+H+"$2");P.url=X+((X==P.url)?(P.url.match(/\?/)?"&":"?")+"_="+H:"");}if(P.data&&J=="GET"){P.url+=(P.url.match(/\?/)?"&":"?")+P.data;P.data=null;}if(P.global&&!q.active++){q.event.trigger("ajaxStart");}var T=/^(\w+:)?\/\/([^\/?#]+)/.exec(P.url);if(P.dataType=="script"&&J=="GET"&&T&&(T[1]&&T[1]!=location.protocol||T[2]!=location.host)){var K=document.getElementsByTagName("head")[0];var W=document.createElement("script");W.src=P.url;if(P.scriptCharset){W.charset=P.scriptCharset;}if(!Z){var R=false;W.onload=W.onreadystatechange=function(){if(!R&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){R=true;L();O();W.onload=W.onreadystatechange=null;K.removeChild(W);}};}K.appendChild(W);return g;}var N=false;var M=P.xhr();if(P.username){M.open(J,P.url,P.async,P.username,P.password);}else{M.open(J,P.url,P.async);}try{if(P.data){M.setRequestHeader("Content-Type",P.contentType);}if(P.ifModified){M.setRequestHeader("If-Modified-Since",q.lastModified[P.url]||"Thu, 01 Jan 1970 00:00:00 GMT");}M.setRequestHeader("X-Requested-With","XMLHttpRequest");M.setRequestHeader("Accept",P.dataType&&P.accepts[P.dataType]?P.accepts[P.dataType]+", */*":P.accepts._default);}catch(V){}if(P.beforeSend&&P.beforeSend(M,P)===false){if(P.global&&!--q.active){q.event.trigger("ajaxStop");}M.abort();return false;}if(P.global){q.event.trigger("ajaxSend",[M,P]);}var Q=function(aa){if(M.readyState==0){if(S){clearInterval(S);S=null;if(P.global&&!--q.active){q.event.trigger("ajaxStop");}}}else{if(!N&&M&&(M.readyState==4||aa=="timeout")){N=true;if(S){clearInterval(S);S=null;}U=aa=="timeout"?"timeout":!q.httpSuccess(M)?"error":P.ifModified&&q.httpNotModified(M,P.url)?"notmodified":"success";if(U=="success"){try{Y=q.httpData(M,P.dataType,P);}catch(ac){U="parsererror";}}if(U=="success"){var ab;try{ab=M.getResponseHeader("Last-Modified");}catch(ac){}if(P.ifModified&&ab){q.lastModified[P.url]=ab;}if(!Z){L();}}else{q.handleError(P,M,U);}O();if(aa){M.abort();}if(P.async){M=null;}}}};if(P.async){var S=setInterval(Q,13);if(P.timeout>0){setTimeout(function(){if(M&&!N){Q("timeout");}},P.timeout);}}try{M.send(P.data);}catch(V){q.handleError(P,M,null,V);}if(!P.async){Q();}function L(){if(P.success){P.success(Y,U);}if(P.global){q.event.trigger("ajaxSuccess",[M,P]);}}function O(){if(P.complete){P.complete(M,U);}if(P.global){q.event.trigger("ajaxComplete",[M,P]);}if(P.global&&!--q.active){q.event.trigger("ajaxStop");}}return M;},handleError:function(I,K,H,J){if(I.error){I.error(K,H,J);}if(I.global){q.event.trigger("ajaxError",[K,I,J]);}},active:0,httpSuccess:function(I){try{return !I.status&&location.protocol=="file:"||(I.status>=200&&I.status<300)||I.status==304||I.status==1223;}catch(H){}return false;},httpNotModified:function(J,H){try{var K=J.getResponseHeader("Last-Modified");return J.status==304||K==q.lastModified[H];}catch(I){}return false;},httpData:function(M,K,J){var I=M.getResponseHeader("content-type"),H=K=="xml"||!K&&I&&I.indexOf("xml")>=0,L=H?M.responseXML:M.responseText;if(H&&L.documentElement.tagName=="parsererror"){throw"parsererror";}if(J&&J.dataFilter){L=J.dataFilter(L,K);}if(typeof L==="string"){if(K=="script"){q.globalEval(L);}if(K=="json"){L=n["eval"]("("+L+")");}}return L;},param:function(H){var J=[];function K(L,M){J[J.length]=encodeURIComponent(L)+"="+encodeURIComponent(M);}if(q.isArray(H)||H.jquery){q.each(H,function(){K(this.name,this.value);});}else{for(var I in H){if(q.isArray(H[I])){q.each(H[I],function(){K(I,this);});}else{K(I,q.isFunction(H[I])?H[I]():H[I]);}}}return J.join("&").replace(/%20/g,"+");}});var o={},p,d=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];function w(I,H){var J={};q.each(d.concat.apply([],d.slice(0,H)),function(){J[this]=I;});return J;}q.fn.extend({show:function(M,O){if(M){return this.animate(w("show",3),M,O);}else{for(var K=0,I=this.length;K<I;K++){var H=q.data(this[K],"olddisplay");this[K].style.display=H||"";if(q.css(this[K],"display")==="none"){var J=this[K].tagName,N;if(o[J]){N=o[J];}else{var L=q("<"+J+" />").appendTo("body");N=L.css("display");if(N==="none"){N="block";}L.remove();o[J]=N;}q.data(this[K],"olddisplay",N);}}for(var K=0,I=this.length;K<I;K++){this[K].style.display=q.data(this[K],"olddisplay")||"";}return this;}},hide:function(K,L){if(K){return this.animate(w("hide",3),K,L);}else{for(var J=0,I=this.length;J<I;J++){var H=q.data(this[J],"olddisplay");if(!H&&H!=="none"){q.data(this[J],"olddisplay",q.css(this[J],"display"));}}for(var J=0,I=this.length;J<I;J++){this[J].style.display="none";}return this;}},_toggle:q.fn.toggle,toggle:function(J,I){var H=typeof J==="boolean";return q.isFunction(J)&&q.isFunction(I)?this._toggle.apply(this,arguments):J==null||H?this.each(function(){var K=H?J:q(this).is(":hidden");q(this)[K?"show":"hide"]();}):this.animate(w("toggle",3),J,I);},fadeTo:function(H,J,I){return this.animate({opacity:J},H,I);},animate:function(L,I,K,J){var H=q.speed(I,K,J);return this[H.queue===false?"each":"queue"](function(){var N=q.extend({},H),P,O=this.nodeType==1&&q(this).is(":hidden"),M=this;for(P in L){if(L[P]=="hide"&&O||L[P]=="show"&&!O){return N.complete.call(this);}if((P=="height"||P=="width")&&this.style){N.display=q.css(this,"display");N.overflow=this.style.overflow;}}if(N.overflow!=null){this.style.overflow="hidden";}N.curAnim=q.extend({},L);q.each(L,function(R,V){var U=new q.fx(M,N,R);if(/toggle|show|hide/.test(V)){U[V=="toggle"?O?"show":"hide":V](L);}else{var T=V.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),W=U.cur(true)||0;if(T){var Q=parseFloat(T[2]),S=T[3]||"px";if(S!="px"){M.style[R]=(Q||1)+S;W=((Q||1)/U.cur(true))*W;M.style[R]=W+S;}if(T[1]){Q=((T[1]=="-="?-1:1)*Q)+W;}U.custom(W,Q,S);}else{U.custom(W,V,"");}}});return true;});},stop:function(I,H){var J=q.timers;if(I){this.queue([]);}this.each(function(){for(var K=J.length-1;K>=0;K--){if(J[K].elem==this){if(H){J[K](true);}J.splice(K,1);}}});if(!H){this.dequeue();}return this;}});q.each({slideDown:w("show",1),slideUp:w("hide",1),slideToggle:w("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(H,I){q.fn[H]=function(J,K){return this.animate(I,J,K);};});q.extend({speed:function(J,K,I){var H=typeof J==="object"?J:{complete:I||!I&&K||q.isFunction(J)&&J,duration:J,easing:I&&K||K&&!q.isFunction(K)&&K};H.duration=q.fx.off?0:typeof H.duration==="number"?H.duration:q.fx.speeds[H.duration]||q.fx.speeds._default;H.old=H.complete;H.complete=function(){if(H.queue!==false){q(this).dequeue();}if(q.isFunction(H.old)){H.old.call(this);}};return H;},easing:{linear:function(J,K,H,I){return H+I*J;},swing:function(J,K,H,I){return((-Math.cos(J*Math.PI)/2)+0.5)*I+H;}},timers:[],fx:function(I,H,J){this.options=H;this.elem=I;this.prop=J;if(!H.orig){H.orig={};}}});q.fx.prototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this);}(q.fx.step[this.prop]||q.fx.step._default)(this);if((this.prop=="height"||this.prop=="width")&&this.elem.style){this.elem.style.display="block";}},cur:function(I){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop];}var H=parseFloat(q.css(this.elem,this.prop,I));return H&&H>-10000?H:parseFloat(q.curCSS(this.elem,this.prop))||0;},custom:function(L,K,J){this.startTime=e();this.start=L;this.end=K;this.unit=J||this.unit||"px";this.now=this.start;this.pos=this.state=0;var H=this;function I(M){return H.step(M);}I.elem=this.elem;if(I()&&q.timers.push(I)&&!p){p=setInterval(function(){var N=q.timers;for(var M=0;M<N.length;M++){if(!N[M]()){N.splice(M--,1);}}if(!N.length){clearInterval(p);p=g;}},13);}},show:function(){this.options.orig[this.prop]=q.attr(this.elem.style,this.prop);this.options.show=true;this.custom(this.prop=="width"||this.prop=="height"?1:0,this.cur());q(this.elem).show();},hide:function(){this.options.orig[this.prop]=q.attr(this.elem.style,this.prop);this.options.hide=true;this.custom(this.cur(),0);},step:function(K){var J=e();if(K||J>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var H=true;for(var I in this.options.curAnim){if(this.options.curAnim[I]!==true){H=false;}}if(H){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(q.css(this.elem,"display")=="none"){this.elem.style.display="block";}}if(this.options.hide){q(this.elem).hide();}if(this.options.hide||this.options.show){for(var L in this.options.curAnim){q.attr(this.elem.style,L,this.options.orig[L]);}}this.options.complete.call(this.elem);}return false;}else{var M=J-this.startTime;this.state=M/this.options.duration;this.pos=q.easing[this.options.easing||(q.easing.swing?"swing":"linear")](this.state,M,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update();}return true;}};q.extend(q.fx,{speeds:{slow:600,fast:200,_default:400},step:{opacity:function(H){q.attr(H.elem.style,"opacity",H.now);},_default:function(H){if(H.elem.style&&H.elem.style[H.prop]!=null){H.elem.style[H.prop]=H.now+H.unit;}else{H.elem[H.prop]=H.now;}}}});if(document.documentElement.getBoundingClientRect){q.fn.offset=function(){if(!this[0]){return{top:0,left:0};}if(this[0]===this[0].ownerDocument.body){return q.offset.bodyOffset(this[0]);}var J=this[0].getBoundingClientRect(),M=this[0].ownerDocument,I=M.body,H=M.documentElement,O=H.clientTop||I.clientTop||0,N=H.clientLeft||I.clientLeft||0,L=J.top+(self.pageYOffset||q.boxModel&&H.scrollTop||I.scrollTop)-O,K=J.left+(self.pageXOffset||q.boxModel&&H.scrollLeft||I.scrollLeft)-N;return{top:L,left:K};};}else{q.fn.offset=function(){if(!this[0]){return{top:0,left:0};}if(this[0]===this[0].ownerDocument.body){return q.offset.bodyOffset(this[0]);}q.offset.initialized||q.offset.initialize();var M=this[0],J=M.offsetParent,I=M,R=M.ownerDocument,P,K=R.documentElement,N=R.body,O=R.defaultView,H=O.getComputedStyle(M,null),Q=M.offsetTop,L=M.offsetLeft;while((M=M.parentNode)&&M!==N&&M!==K){P=O.getComputedStyle(M,null);Q-=M.scrollTop,L-=M.scrollLeft;if(M===J){Q+=M.offsetTop,L+=M.offsetLeft;if(q.offset.doesNotAddBorder&&!(q.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(M.tagName))){Q+=parseInt(P.borderTopWidth,10)||0,L+=parseInt(P.borderLeftWidth,10)||0;}I=J,J=M.offsetParent;}if(q.offset.subtractsBorderForOverflowNotVisible&&P.overflow!=="visible"){Q+=parseInt(P.borderTopWidth,10)||0,L+=parseInt(P.borderLeftWidth,10)||0;}H=P;}if(H.position==="relative"||H.position==="static"){Q+=N.offsetTop,L+=N.offsetLeft;}if(H.position==="fixed"){Q+=Math.max(K.scrollTop,N.scrollTop),L+=Math.max(K.scrollLeft,N.scrollLeft);}return{top:Q,left:L};};}q.offset={initialize:function(){if(this.initialized){return;}var O=document.body,I=document.createElement("div"),K,J,Q,L,P,H,M=O.style.marginTop,N='<div style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;"><div></div></div><table style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;" cellpadding="0" cellspacing="0"><tr><td></td></tr></table>';P={position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"};for(H in P){I.style[H]=P[H];}I.innerHTML=N;O.insertBefore(I,O.firstChild);K=I.firstChild,J=K.firstChild,L=K.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(J.offsetTop!==5);this.doesAddBorderForTableAndCells=(L.offsetTop===5);K.style.overflow="hidden",K.style.position="relative";this.subtractsBorderForOverflowNotVisible=(J.offsetTop===-5);O.style.marginTop="1px";this.doesNotIncludeMarginInBodyOffset=(O.offsetTop===0);O.style.marginTop=M;O.removeChild(I);this.initialized=true;},bodyOffset:function(H){q.offset.initialized||q.offset.initialize();var J=H.offsetTop,I=H.offsetLeft;if(q.offset.doesNotIncludeMarginInBodyOffset){J+=parseInt(q.curCSS(H,"marginTop",true),10)||0,I+=parseInt(q.curCSS(H,"marginLeft",true),10)||0;}return{top:J,left:I};}};q.fn.extend({position:function(){var L=0,K=0,I;if(this[0]){var J=this.offsetParent(),M=this.offset(),H=/^body|html$/i.test(J[0].tagName)?{top:0,left:0}:J.offset();M.top-=k(this,"marginTop");M.left-=k(this,"marginLeft");H.top+=k(J,"borderTopWidth");H.left+=k(J,"borderLeftWidth");I={top:M.top-H.top,left:M.left-H.left};}return I;},offsetParent:function(){var H=this[0].offsetParent||document.body;while(H&&(!/^body|html$/i.test(H.tagName)&&q.css(H,"position")=="static")){H=H.offsetParent;}return q(H);}});q.each(["Left","Top"],function(I,H){var J="scroll"+H;q.fn[J]=function(K){if(!this[0]){return null;}return K!==g?this.each(function(){this==n||this==document?n.scrollTo(!I?K:q(n).scrollLeft(),I?K:q(n).scrollTop()):this[J]=K;}):this[0]==n||this[0]==document?self[I?"pageYOffset":"pageXOffset"]||q.boxModel&&document.documentElement[J]||document.body[J]:this[0][J];};});q.each(["Height","Width"],function(L,J){var H=L?"Left":"Top",K=L?"Right":"Bottom",I=J.toLowerCase();q.fn["inner"+J]=function(){return this[0]?q.css(this[0],I,false,"padding"):null;};q.fn["outer"+J]=function(N){return this[0]?q.css(this[0],I,false,N?"margin":"border"):null;};var M=J.toLowerCase();q.fn[M]=function(N){return this[0]==n?document.compatMode=="CSS1Compat"&&document.documentElement["client"+J]||document.body["client"+J]:this[0]==document?Math.max(document.documentElement["client"+J],document.body["scroll"+J],document.documentElement["scroll"+J],document.body["offset"+J],document.documentElement["offset"+J]):N===g?(this.length?q.css(this[0],M):null):this.css(M,typeof N==="string"?N:N+"px");};});})();jQuery.ui||(function(c){var j=c.fn.remove,d=c.browser.mozilla&&(parseFloat(c.browser.version)<1.9);c.ui={version:"1.7.1",plugin:{add:function(m,n,p){var o=c.ui[m].prototype;for(var k in p){o.plugins[k]=o.plugins[k]||[];o.plugins[k].push([n,p[k]]);}},call:function(k,n,m){var p=k.plugins[n];if(!p||!k.element[0].parentNode){return;}for(var o=0;o<p.length;o++){if(k.options[p[o][0]]){p[o][1].apply(k.element,m);}}}},contains:function(m,k){return document.compareDocumentPosition?m.compareDocumentPosition(k)&16:m!==k&&m.contains(k);},hasScroll:function(o,m){if(c(o).css("overflow")=="hidden"){return false;}var k=(m&&m=="left")?"scrollLeft":"scrollTop",n=false;if(o[k]>0){return true;}o[k]=1;n=(o[k]>0);o[k]=0;return n;},isOverAxis:function(m,k,n){return(m>k)&&(m<(k+n));},isOver:function(q,m,p,o,k,n){return c.ui.isOverAxis(q,p,k)&&c.ui.isOverAxis(m,o,n);},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}};if(d){var f=c.attr,e=c.fn.removeAttr,h="http://www.w3.org/2005/07/aaa",a=/^aria-/,b=/^wairole:/;c.attr=function(m,k,n){var o=n!==undefined;return(k=="role"?(o?f.call(this,m,k,"wairole:"+n):(f.apply(this,arguments)||"").replace(b,"")):(a.test(k)?(o?m.setAttributeNS(h,k.replace(a,"aaa:"),n):f.call(this,m,k.replace(a,"aaa:"))):f.apply(this,arguments)));};c.fn.removeAttr=function(k){return(a.test(k)?this.each(function(){this.removeAttributeNS(h,k.replace(a,""));}):e.call(this,k));};}c.fn.extend({remove:function(){c("*",this).add(this).each(function(){c(this).triggerHandler("remove");});return j.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 k;if((c.browser.msie&&(/(static|relative)/).test(this.css("position")))||(/absolute/).test(this.css("position"))){k=this.parents().filter(function(){return(/(relative|absolute|fixed)/).test(c.curCSS(this,"position",1))&&(/(auto|scroll)/).test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1));}).eq(0);}else{k=this.parents().filter(function(){return(/(auto|scroll)/).test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1));}).eq(0);}return(/fixed/).test(this.css("position"))||!k.length?c(document):k;}});c.extend(c.expr[":"],{data:function(n,m,k){return !!c.data(n,k[3]);},focusable:function(m){var n=m.nodeName.toLowerCase(),k=c.attr(m,"tabindex");return(/input|select|textarea|button|object/.test(n)?!m.disabled:"a"==n||"area"==n?m.href||!isNaN(k):!isNaN(k))&&!c(m)["area"==n?"parents":"closest"](":hidden").length;},tabbable:function(m){var k=c.attr(m,"tabindex");return(isNaN(k)||k>=0)&&c(m).is(":focusable");}});function g(o,p,q,n){function m(s){var r=c[o][p][s]||[];return(typeof r=="string"?r.split(/,?\s+/):r);}var k=m("getter");if(n.length==1&&typeof n[0]=="string"){k=k.concat(m("getterSetter"));}return(c.inArray(q,k)!=-1);}c.widget=function(m,k){var n=m.split(".")[0];m=m.split(".")[1];c.fn[m]=function(r){var p=(typeof r=="string"),q=Array.prototype.slice.call(arguments,1);if(p&&r.substring(0,1)=="_"){return this;}if(p&&g(n,m,r,q)){var o=c.data(this[0],m);return(o?o[r].apply(o,q):undefined);}return this.each(function(){var s=c.data(this,m);(!s&&!p&&c.data(this,m,new c[n][m](this,r))._init());(s&&p&&c.isFunction(s[r])&&s[r].apply(s,q));});};c[n]=c[n]||{};c[n][m]=function(q,p){var o=this;this.namespace=n;this.widgetName=m;this.widgetEventPrefix=c[n][m].eventPrefix||m;this.widgetBaseClass=n+"-"+m;this.options=c.extend({},c.widget.defaults,c[n][m].defaults,c.metadata&&c.metadata.get(q)[m],p);this.element=c(q).bind("setData."+m,function(s,r,u){if(s.target==q){return o._setData(r,u);}}).bind("getData."+m,function(s,r){if(s.target==q){return o._getData(r);}}).bind("remove",function(){return o.destroy();});};c[n][m].prototype=c.extend({},c.widget.prototype,k);c[n][m].getterSetter="option";};c.widget.prototype={_init:function(){},destroy:function(){this.element.removeData(this.widgetName).removeClass(this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled").removeAttr("aria-disabled");},option:function(n,o){var m=n,k=this;if(typeof n=="string"){if(o===undefined){return this._getData(n);}m={};m[n]=o;}c.each(m,function(p,q){k._setData(p,q);});},_getData:function(k){return this.options[k];},_setData:function(k,m){this.options[k]=m;if(k=="disabled"){this.element[m?"addClass":"removeClass"](this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled").attr("aria-disabled",m);}},enable:function(){this._setData("disabled",false);},disable:function(){this._setData("disabled",true);},_trigger:function(n,o,p){var r=this.options[n],k=(n==this.widgetEventPrefix?n:this.widgetEventPrefix+n);o=c.Event(o);o.type=k;if(o.originalEvent){for(var m=c.event.props.length,q;m;){q=c.event.props[--m];o[q]=o.originalEvent[q];}}this.element.trigger(o,p);return !(c.isFunction(r)&&r.call(this.element[0],o,p)===false||o.isDefaultPrevented());}};c.widget.defaults={disabled:false};c.ui.mouse={_mouseInit:function(){var k=this;this.element.bind("mousedown."+this.widgetName,function(m){return k._mouseDown(m);}).bind("click."+this.widgetName,function(m){if(k._preventClickEvent){k._preventClickEvent=false;m.stopImmediatePropagation();return false;}});if(c.browser.msie){this._mouseUnselectable=this.element.attr("unselectable");this.element.attr("unselectable","on");}this.started=false;},_mouseDestroy:function(){this.element.unbind("."+this.widgetName);(c.browser.msie&&this.element.attr("unselectable",this._mouseUnselectable));},_mouseDown:function(n){n.originalEvent=n.originalEvent||{};if(n.originalEvent.mouseHandled){return;}(this._mouseStarted&&this._mouseUp(n));this._mouseDownEvent=n;var m=this,o=(n.which==1),k=(typeof this.options.cancel=="string"?c(n.target).parents().add(n.target).filter(this.options.cancel).length:false);if(!o||k||!this._mouseCapture(n)){return true;}this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){m.mouseDelayMet=true;},this.options.delay);}if(this._mouseDistanceMet(n)&&this._mouseDelayMet(n)){this._mouseStarted=(this._mouseStart(n)!==false);if(!this._mouseStarted){n.preventDefault();return true;}}this._mouseMoveDelegate=function(p){return m._mouseMove(p);};this._mouseUpDelegate=function(p){return m._mouseUp(p);};c(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);(c.browser.safari||n.preventDefault());n.originalEvent.mouseHandled=true;return true;},_mouseMove:function(k){if(c.browser.msie&&!k.button){return this._mouseUp(k);}if(this._mouseStarted){this._mouseDrag(k);return k.preventDefault();}if(this._mouseDistanceMet(k)&&this._mouseDelayMet(k)){this._mouseStarted=(this._mouseStart(this._mouseDownEvent,k)!==false);(this._mouseStarted?this._mouseDrag(k):this._mouseUp(k));}return !this._mouseStarted;},_mouseUp:function(k){c(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;this._preventClickEvent=(k.target==this._mouseDownEvent.target);this._mouseStop(k);}return false;},_mouseDistanceMet:function(k){return(Math.max(Math.abs(this._mouseDownEvent.pageX-k.pageX),Math.abs(this._mouseDownEvent.pageY-k.pageY))>=this.options.distance);},_mouseDelayMet:function(k){return this.mouseDelayMet;},_mouseStart:function(k){},_mouseDrag:function(k){},_mouseStop:function(k){},_mouseCapture:function(k){return true;}};c.ui.mouse.defaults={cancel:null,distance:1,delay:0};})(jQuery);(function(a){a.widget("ui.draggable",a.extend({},a.ui.mouse,{_init: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();},_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.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._generatePosition(b);this.originalPageX=b.pageX;this.originalPageY=b.pageY;if(c.cursorAt){this._adjustOffsetFromHelper(c.cursorAt);}if(c.containment){this._setContainment();}this._trigger("start",b);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();this._trigger("drag",b,c);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.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(){b._trigger("stop",c);b._clear();});}else{this._trigger("stop",c);this._clear();}return false;},_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(b.left!=undefined){this.offset.click.left=b.left+this.margins.left;}if(b.right!=undefined){this.offset.click.left=this.helperProportions.width-b.right+this.margins.left;}if(b.top!=undefined){this.offset.click.top=b.top+this.margins.top;}if(b.bottom!=undefined){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&&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&&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);if(this.cssPosition=="relative"&&!(this.scrollParent[0]!=document&&this.scrollParent[0]!=this.offsetParent[0])){this.offset.relative=this._getRelativeOffset();}var d=e.pageX;var c=e.pageY;if(this.originalPosition){if(this.containment){if(e.pageX-this.offset.click.left<this.containment[0]){d=this.containment[0]+this.offset.click.left;}if(e.pageY-this.offset.click.top<this.containment[1]){c=this.containment[1]+this.offset.click.top;}if(e.pageX-this.offset.click.left>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.top<this.containment[1]||g-this.offset.click.top>this.containment[3])?g:(!(g-this.offset.click.top<this.containment[1])?g-h.grid[1]:g+h.grid[1])):g;var f=this.originalPageX+Math.round((d-this.originalPageX)/h.grid[0])*h.grid[0];d=this.containment?(!(f-this.offset.click.left<this.containment[0]||f-this.offset.click.left>this.containment[2])?f:(!(f-this.offset.click.left<this.containment[0])?f-h.grid[0]:f+h.grid[0])):f;}}return{top:(c-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():(j?0:b.scrollTop())))),left:(d-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():j?0:b.scrollLeft())))};},_clear:function(){this.helper.removeClass("ui-draggable-dragging");if(this.helper[0]!=this.element[0]&&!this.cancelHelperRemoval){this.helper.remove();}this.helper=null;this.cancelHelperRemoval=false;},_trigger:function(b,c,d){d=d||this._uiHash();a.ui.plugin.call(this,b,[c,d]);if(b=="drag"){this.positionAbs=this._convertPositionTo("absolute");}return a.widget.prototype._trigger.call(this,b,c,d);},plugins:{},_uiHash:function(b){return{helper:this.helper,position:this.position,absolutePosition:this.positionAbs,offset:this.positionAbs};}}));a.extend(a.ui.draggable,{version:"1.7.1",eventPrefix:"drag",defaults:{addClasses:true,appendTo:"parent",axis:false,cancel:":input,option",connectToSortable:false,containment:false,cursor:"auto",cursorAt:false,delay:0,distance:1,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}});a.ui.plugin.add("draggable","connectToSortable",{start:function(c,e){var d=a(this).data("draggable"),f=d.options,b=a.extend({},e,{item:d.element});d.sortables=[];a(f.connectToSortable).each(function(){var g=a.data(this,"sortable");if(g&&!g.options.disabled){d.sortables.push({instance:g,shouldRevert:g.options.revert});g._refreshItems();g._trigger("activate",c,b);}});},stop:function(c,e){var d=a(this).data("draggable"),b=a.extend({},e,{item:d.element});a.each(d.sortables,function(){if(this.instance.isOver){this.instance.isOver=0;d.cancelHelperRemoval=true;this.instance.cancelHelperRemoval=false;if(this.shouldRevert){this.instance.options.revert=true;}this.instance._mouseStop(c);this.instance.options.helper=this.instance.options._helper;if(d.options.helper=="original"){this.instance.currentItem.css({top:"auto",left:"auto"});}}else{this.instance.cancelHelperRemoval=false;this.instance._trigger("deactivate",c,b);}});},drag:function(c,f){var e=a(this).data("draggable"),b=this;var d=function(j){var q=this.offset.click.top,p=this.offset.click.left;var g=this.positionAbs.top,m=this.positionAbs.left;var k=j.height,n=j.width;var r=j.top,h=j.left;return a.ui.isOver(g+q,m+p,r,h,k,n);};a.each(e.sortables,function(g){this.instance.positionAbs=e.positionAbs;this.instance.helperProportions=e.helperProportions;this.instance.offset.click=e.offset.click;if(this.instance._intersectsWith(this.instance.containerCache)){if(!this.instance.isOver){this.instance.isOver=1;this.instance.currentItem=a(b).clone().appendTo(this.instance.element).data("sortable-item",true);this.instance.options._helper=this.instance.options.helper;this.instance.options.helper=function(){return f.helper[0];};c.target=this.instance.currentItem[0];this.instance._mouseCapture(c,true);this.instance._mouseStart(c,true,true);this.instance.offset.click.top=e.offset.click.top;this.instance.offset.click.left=e.offset.click.left;this.instance.offset.parent.left-=e.offset.parent.left-this.instance.offset.parent.left;this.instance.offset.parent.top-=e.offset.parent.top-this.instance.offset.parent.top;e._trigger("toSortable",c);e.dropped=this.instance.element;e.currentItem=e.element;this.instance.fromOutside=e;}if(this.instance.currentItem){this.instance._mouseDrag(c);}}else{if(this.instance.isOver){this.instance.isOver=0;this.instance.cancelHelperRemoval=true;this.instance.options.revert=false;this.instance._trigger("out",c,this.instance._uiHash(this.instance));this.instance._mouseStop(c,true);this.instance.options.helper=this.instance.options._helper;this.instance.currentItem.remove();if(this.instance.placeholder){this.instance.placeholder.remove();}e._trigger("fromSortable",c);e.dropped=false;}}});}});a.ui.plugin.add("draggable","cursor",{start:function(c,d){var b=a("body"),e=a(this).data("draggable").options;if(b.css("cursor")){e._cursor=b.css("cursor");}b.css("cursor",e.cursor);},stop:function(b,c){var d=a(this).data("draggable").options;if(d._cursor){a("body").css("cursor",d._cursor);}}});a.ui.plugin.add("draggable","iframeFix",{start:function(b,c){var d=a(this).data("draggable").options;a(d.iframeFix===true?"iframe":d.iframeFix).each(function(){a('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex: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<f.scrollSensitivity){c.scrollParent[0].scrollTop=b=c.scrollParent[0].scrollTop+f.scrollSpeed;}else{if(d.pageY-c.overflowOffset.top<f.scrollSensitivity){c.scrollParent[0].scrollTop=b=c.scrollParent[0].scrollTop-f.scrollSpeed;}}}if(!f.axis||f.axis!="y"){if((c.overflowOffset.left+c.scrollParent[0].offsetWidth)-d.pageX<f.scrollSensitivity){c.scrollParent[0].scrollLeft=b=c.scrollParent[0].scrollLeft+f.scrollSpeed;}else{if(d.pageX-c.overflowOffset.left<f.scrollSensitivity){c.scrollParent[0].scrollLeft=b=c.scrollParent[0].scrollLeft-f.scrollSpeed;}}}}else{if(!f.axis||f.axis!="x"){if(d.pageY-a(document).scrollTop()<f.scrollSensitivity){b=a(document).scrollTop(a(document).scrollTop()-f.scrollSpeed);}else{if(a(window).height()-(d.pageY-a(document).scrollTop())<f.scrollSensitivity){b=a(document).scrollTop(a(document).scrollTop()+f.scrollSpeed);}}}if(!f.axis||f.axis!="y"){if(d.pageX-a(document).scrollLeft()<f.scrollSensitivity){b=a(document).scrollLeft(a(document).scrollLeft()-f.scrollSpeed);}else{if(a(window).width()-(d.pageX-a(document).scrollLeft())<f.scrollSensitivity){b=a(document).scrollLeft(a(document).scrollLeft()+f.scrollSpeed);}}}}if(b!==false&&a.ui.ddmanager&&!f.dropBehaviour){a.ui.ddmanager.prepareOffsets(c,d);}}});a.ui.plugin.add("draggable","snap",{start:function(c,d){var b=a(this).data("draggable"),e=b.options;b.snapElements=[];a(e.snap.constructor!=String?(e.snap.items||":data(draggable)"):e.snap).each(function(){var g=a(this);var f=g.offset();if(this!=b.element[0]){b.snapElements.push({item:this,width:g.outerWidth(),height:g.outerHeight(),top:f.top,left:f.left});}});},drag:function(u,p){var g=a(this).data("draggable"),q=g.options;var y=q.snapTolerance;var x=p.offset.left,w=x+g.helperProportions.width,f=p.offset.top,e=f+g.helperProportions.height;for(var v=g.snapElements.length-1;v>=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-y<x&&x<n+y&&m-y<f&&f<A+y)||(s-y<x&&x<n+y&&m-y<e&&e<A+y)||(s-y<w&&w<n+y&&m-y<f&&f<A+y)||(s-y<w&&w<n+y&&m-y<e&&e<A+y))){if(g.snapElements[v].snapping){(g.options.snap.release&&g.options.snap.release.call(g.element,u,a.extend(g._uiHash(),{snapItem:g.snapElements[v].item})));}g.snapElements[v].snapping=false;continue;}if(q.snapMode!="inner"){var c=Math.abs(m-e)<=y;var z=Math.abs(A-f)<=y;var j=Math.abs(s-w)<=y;var k=Math.abs(n-x)<=y;if(c){p.position.top=g._convertPositionTo("relative",{top:m-g.helperProportions.height,left:0}).top-g.margins.top;}if(z){p.position.top=g._convertPositionTo("relative",{top:A,left:0}).top-g.margins.top;}if(j){p.position.left=g._convertPositionTo("relative",{top:0,left:s-g.helperProportions.width}).left-g.margins.left;}if(k){p.position.left=g._convertPositionTo("relative",{top:0,left:n}).left-g.margins.left;}}var h=(c||z||j||k);if(q.snapMode!="outer"){var c=Math.abs(m-f)<=y;var z=Math.abs(A-e)<=y;var j=Math.abs(s-x)<=y;var k=Math.abs(n-w)<=y;if(c){p.position.top=g._convertPositionTo("relative",{top:m,left:0}).top-g.margins.top;}if(z){p.position.top=g._convertPositionTo("relative",{top:A-g.helperProportions.height,left:0}).top-g.margins.top;}if(j){p.position.left=g._convertPositionTo("relative",{top:0,left:s}).left-g.margins.left;}if(k){p.position.left=g._convertPositionTo("relative",{top:0,left:n-g.helperProportions.width}).left-g.margins.left;}}if(!g.snapElements[v].snapping&&(c||z||j||k||h)){(g.options.snap.snap&&g.options.snap.snap.call(g.element,u,a.extend(g._uiHash(),{snapItem:g.snapElements[v].item})));}g.snapElements[v].snapping=(c||z||j||k||h);}}});a.ui.plugin.add("draggable","stack",{start:function(b,c){var e=a(this).data("draggable").options;var d=a.makeArray(a(e.stack.group)).sort(function(g,f){return(parseInt(a(g).css("zIndex"),10)||e.stack.min)-(parseInt(a(f).css("zIndex"),10)||e.stack.min);});a(d).each(function(f){this.style.zIndex=e.stack.min+f;});this[0].style.zIndex=e.stack.min+d.length;}});a.ui.plugin.add("draggable","zIndex",{start:function(c,d){var b=a(d.helper),e=a(this).data("draggable").options;if(b.css("zIndex")){e._zIndex=b.css("zIndex");}b.css("zIndex",e.zIndex);},stop:function(b,c){var d=a(this).data("draggable").options;if(d._zIndex){a(c.helper).css("zIndex",d._zIndex);}}});})(jQuery);(function(a){a.widget("ui.droppable",{_init:function(){var c=this.options,b=c.accept;this.isover=0;this.isout=1;this.options.accept=this.options.accept&&a.isFunction(this.options.accept)?this.options.accept:function(e){return e.is(b);};this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight};a.ui.ddmanager.droppables[this.options.scope]=a.ui.ddmanager.droppables[this.options.scope]||[];a.ui.ddmanager.droppables[this.options.scope].push(this);(this.options.addClasses&&this.element.addClass("ui-droppable"));},destroy:function(){var b=a.ui.ddmanager.droppables[this.options.scope];for(var c=0;c<b.length;c++){if(b[c]==this){b.splice(c,1);}}this.element.removeClass("ui-droppable ui-droppable-disabled").removeData("droppable").unbind(".droppable");},_setData:function(b,c){if(b=="accept"){this.options.accept=c&&a.isFunction(c)?c:function(e){return e.is(c);};}else{a.widget.prototype._setData.apply(this,arguments);}},_activate:function(c){var b=a.ui.ddmanager.current;if(this.options.activeClass){this.element.addClass(this.options.activeClass);}(b&&this._trigger("activate",c,this.ui(b)));},_deactivate:function(c){var b=a.ui.ddmanager.current;if(this.options.activeClass){this.element.removeClass(this.options.activeClass);}(b&&this._trigger("deactivate",c,this.ui(b)));},_over:function(c){var b=a.ui.ddmanager.current;if(!b||(b.currentItem||b.element)[0]==this.element[0]){return;}if(this.options.accept.call(this.element[0],(b.currentItem||b.element))){if(this.options.hoverClass){this.element.addClass(this.options.hoverClass);}this._trigger("over",c,this.ui(b));}},_out:function(c){var b=a.ui.ddmanager.current;if(!b||(b.currentItem||b.element)[0]==this.element[0]){return;}if(this.options.accept.call(this.element[0],(b.currentItem||b.element))){if(this.options.hoverClass){this.element.removeClass(this.options.hoverClass);}this._trigger("out",c,this.ui(b));}},_drop:function(c,d){var b=d||a.ui.ddmanager.current;if(!b||(b.currentItem||b.element)[0]==this.element[0]){return false;}var e=false;this.element.find(":data(droppable)").not(".ui-draggable-dragging").each(function(){var f=a.data(this,"droppable");if(f.options.greedy&&a.ui.intersect(b,a.extend(f,{offset:f.element.offset()}),f.options.tolerance)){e=true;return false;}});if(e){return false;}if(this.options.accept.call(this.element[0],(b.currentItem||b.element))){if(this.options.activeClass){this.element.removeClass(this.options.activeClass);}if(this.options.hoverClass){this.element.removeClass(this.options.hoverClass);}this._trigger("drop",c,this.ui(b));return this.element;}return false;},ui:function(b){return{draggable:(b.currentItem||b.element),helper:b.helper,position:b.position,absolutePosition:b.positionAbs,offset:b.positionAbs};}});a.extend(a.ui.droppable,{version:"1.7.1",eventPrefix:"drop",defaults:{accept:"*",activeClass:false,addClasses:true,greedy:false,hoverClass:false,scope:"default",tolerance:"intersect"}});a.ui.intersect=function(s,k,p){if(!k.offset){return false;}var e=(s.positionAbs||s.position.absolute).left,d=e+s.helperProportions.width,o=(s.positionAbs||s.position.absolute).top,n=o+s.helperProportions.height;var g=k.offset.left,c=g+k.proportions.width,q=k.offset.top,m=q+k.proportions.height;switch(p){case"fit":return(g<e&&d<c&&q<o&&n<m);break;case"intersect":return(g<e+(s.helperProportions.width/2)&&d-(s.helperProportions.width/2)<c&&q<o+(s.helperProportions.height/2)&&n-(s.helperProportions.height/2)<m);break;case"pointer":var h=((s.positionAbs||s.position.absolute).left+(s.clickOffset||s.offset.click).left),j=((s.positionAbs||s.position.absolute).top+(s.clickOffset||s.offset.click).top),f=a.ui.isOver(j,h,q,g,k.proportions.height,k.proportions.width);return f;break;case"touch":return((o>=q&&o<=m)||(n>=q&&n<=m)||(o<q&&n>m))&&((e>=g&&e<=c)||(d>=g&&d<=c)||(e<g&&d>c));break;default:return false;break;}};a.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(e,g){var b=a.ui.ddmanager.droppables[e.options.scope];var f=g?g.type:null;var h=(e.currentItem||e.element).find(":data(droppable)").andSelf();droppablesLoop:for(var d=0;d<b.length;d++){if(b[d].options.disabled||(e&&!b[d].options.accept.call(b[d].element[0],(e.currentItem||e.element)))){continue;}for(var c=0;c<h.length;c++){if(h[c]==b[d].element[0]){b[d].proportions.height=0;continue droppablesLoop;}}b[d].visible=b[d].element.css("display")!="none";if(!b[d].visible){continue;}b[d].offset=b[d].element.offset();b[d].proportions={width:b[d].element[0].offsetWidth,height:b[d].element[0].offsetHeight};if(f=="mousedown"){b[d]._activate.call(b[d],g);}}},drop:function(b,c){var d=false;a.each(a.ui.ddmanager.droppables[b.options.scope],function(){if(!this.options){return;}if(!this.options.disabled&&this.visible&&a.ui.intersect(b,this,this.options.tolerance)){d=this._drop.call(this,c);}if(!this.options.disabled&&this.visible&&this.options.accept.call(this.element[0],(b.currentItem||b.element))){this.isout=1;this.isover=0;this._deactivate.call(this,c);}});return d;},drag:function(b,c){if(b.options.refreshPositions){a.ui.ddmanager.prepareOffsets(b,c);}a.each(a.ui.ddmanager.droppables[b.options.scope],function(){if(this.options.disabled||this.greedyChild||!this.visible){return;}var e=a.ui.intersect(b,this,this.options.tolerance);var g=!e&&this.isover==1?"isout":(e&&this.isover==0?"isover":null);if(!g){return;}var f;if(this.options.greedy){var d=this.element.parents(":data(droppable):eq(0)");if(d.length){f=a.data(d[0],"droppable");f.greedyChild=(g=="isover"?1:0);}}if(f&&g=="isover"){f.isover=0;f.isout=1;f._out.call(f,c);}this[g]=1;this[g=="isout"?"isover":"isout"]=0;this[g=="isover"?"_over":"_out"].call(this,c);if(f&&g=="isout"){f.isout=0;f.isover=1;f._over.call(f,c);}});}};})(jQuery);(function(c){c.widget("ui.resizable",c.extend({},c.ui.mouse,{_init: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('<div class="ui-wrapper" style="overflow: hidden;"></div>').css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")}));this.element=this.element.parent().data("resizable",this.element.data("resizable"));this.elementIsWrapper=true;this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")});this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0});this.originalResizeStyle=this.originalElement.css("resize");this.originalElement.css("resize","none");this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"}));this.originalElement.css({margin:this.originalElement.css("margin")});this._proportionallyResize();}this.handles=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<k.length;f++){var h=c.trim(k[f]),d="ui-resizable-"+h;var g=c('<div class="ui-resizable-handle '+d+'"></div>');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(q){q=q||this.element;for(var n in this.handles){if(this.handles[n].constructor==String){this.handles[n]=c(this.handles[n],this.element).show();}if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var o=c(this.handles[n],this.element),p=0;p=/sw|ne|nw|se|n|s/.test(n)?o.outerHeight():o.outerWidth();var m=["padding",/ne|nw|n/.test(n)?"Top":/se|sw|s/.test(n)?"Bottom":/^e$/.test(n)?"Right":"Left"].join("");q.css(m,p);this._proportionallyResize();}if(!c(this.handles[n]).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 m=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i);}e.axis=m&&m[1]?m[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.parent().append(this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")})).end().remove();}this.originalElement.css("resize",this.originalResizeStyle);d(this.originalElement);},_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,n={},r=this,j=this.originalMousePosition,p=this.axis;var s=(d.pageX-j.left)||0,q=(d.pageY-j.top)||0;var h=this._change[p];if(!h){return false;}var m=h.apply(this,[d,s,q]),k=c.browser.msie&&c.browser.version<7,e=this.sizeDiff;if(this._aspectRatio||d.shiftKey){m=this._updateRatio(m,d);}m=this._respectSize(m,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(m);this._trigger("resize",d,this.ui());return false;},_mouseStop:function(g){this.resizing=false;var h=this.options,n=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:n.sizeDiff.height,k=d?0:n.sizeDiff.width;var p={width:(n.size.width-k),height:(n.size.height-e)},j=(parseInt(n.element.css("left"),10)+(n.position.left-n.originalPosition.left))||null,m=(parseInt(n.element.css("top"),10)+(n.position.top-n.originalPosition.top))||null;if(!h.animate){this.element.css(c.extend(p,{top:m,left:j}));}n.helper.height(n.size.height);n.helper.width(n.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(m,f){var j=this.helper,h=this.options,s=this._aspectRatio||f.shiftKey,r=this.axis,v=a(m.width)&&h.maxWidth&&(h.maxWidth<m.width),n=a(m.height)&&h.maxHeight&&(h.maxHeight<m.height),g=a(m.width)&&h.minWidth&&(h.minWidth>m.width),u=a(m.height)&&h.minHeight&&(h.minHeight>m.height);if(g){m.width=h.minWidth;}if(u){m.height=h.minHeight;}if(v){m.width=h.maxWidth;}if(n){m.height=h.maxHeight;}var e=this.originalPosition.left+this.originalSize.width,q=this.position.top+this.size.height;var k=/sw|nw|w/.test(r),d=/nw|ne|n/.test(r);if(g&&k){m.left=e-h.minWidth;}if(v&&k){m.left=e-h.maxWidth;}if(u&&d){m.top=q-h.minHeight;}if(n&&d){m.top=q-h.maxHeight;}var p=!m.width&&!m.height;if(p&&!m.left&&m.top){m.top=null;}else{if(p&&!m.top&&m.left){m.left=null;}}return m;},_proportionallyResize:function(){var j=this.options;if(!this._proportionallyResizeElements.length){return;}var f=this.helper||this.element;for(var e=0;e<this._proportionallyResizeElements.length;e++){var g=this._proportionallyResizeElements[e];if(!this.borderDif){var d=[g.css("borderTopWidth"),g.css("borderRightWidth"),g.css("borderBottomWidth"),g.css("borderLeftWidth")],h=[g.css("paddingTop"),g.css("paddingRight"),g.css("paddingBottom"),g.css("paddingLeft")];this.borderDif=c.map(d,function(k,n){var m=parseInt(k,10)||0,o=parseInt(h[n],10)||0;return m+o;});}if(c.browser.msie&&!(!(c(f).is(":hidden")||c(f).parents(":hidden").length))){continue;}g.css({height:(f.height()-this.borderDif[0]-this.borderDif[2])||0,width:(f.width()-this.borderDif[1]-this.borderDif[3])||0});}},_renderProxy:function(){var e=this.element,h=this.options;this.elementOffset=e.offset();if(this._helper){this.helper=this.helper||c('<div style="overflow:hidden;"></div>');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.7.1",eventPrefix:"resize",defaults:{alsoResize:false,animate:false,animateDuration:"slow",animateEasing:"swing",aspectRatio:false,autoHide:false,cancel:":input,option",containment:false,delay:0,distance:1,ghost:false,grid:false,handles:"e,s,se",helper:false,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:1000}});c.ui.plugin.add("resizable","alsoResize",{start:function(e,f){var d=c(this).data("resizable"),g=d.options;_store=function(h){c(h).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(g.alsoResize)=="object"&&!g.alsoResize.parentNode){if(g.alsoResize.length){g.alsoResize=g.alsoResize[0];_store(g.alsoResize);}else{c.each(g.alsoResize,function(h,j){_store(h);});}}else{_store(g.alsoResize);}},resize:function(f,h){var e=c(this).data("resizable"),j=e.options,g=e.originalSize,m=e.originalPosition;var k={height:(e.size.height-g.height)||0,width:(e.size.width-g.width)||0,top:(e.position.top-m.top)||0,left:(e.position.left-m.left)||0},d=function(n,o){c(n).each(function(){var r=c(this),s=c(this).data("resizable-alsoresize"),q={},p=o&&o.length?o:["width","height","top","left"];c.each(p||["width","height","top","left"],function(u,w){var v=(s[w]||0)+(k[w]||0);if(v&&v>=0){q[w]=v||null;}});if(/relative/.test(r.css("position"))&&c.browser.opera){e._revertToRelativePosition=true;r.css({position:"absolute",top:"auto",left:"auto"});}r.css(q);});};if(typeof(j.alsoResize)=="object"&&!j.alsoResize.nodeType){c.each(j.alsoResize,function(n,o){d(n,o);});}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,p){var q=c(this).data("resizable"),j=q.options;var g=q._proportionallyResizeElements,d=g.length&&(/textarea/i).test(g[0].nodeName),e=d&&c.ui.hasScroll(g[0],"left")?0:q.sizeDiff.height,m=d?0:q.sizeDiff.width;var f={width:(q.size.width-m),height:(q.size.height-e)},k=(parseInt(q.element.css("left"),10)+(q.position.left-q.originalPosition.left))||null,n=(parseInt(q.element.css("top"),10)+(q.position.top-q.originalPosition.top))||null;q.element.animate(c.extend(f,n&&k?{top:n,left:k}:{}),{duration:j.animateDuration,easing:j.animateEasing,step:function(){var o={width:parseInt(q.element.css("width"),10),height:parseInt(q.element.css("height"),10),top:parseInt(q.element.css("top"),10),left:parseInt(q.element.css("left"),10)};if(g&&g.length){c(g[0]).css({width:o.width,height:o.height});}q._updateCache(o);q._propagate("resize",h);}});}});c.ui.plugin.add("resizable","containment",{start:function(e,s){var v=c(this).data("resizable"),j=v.options,m=v.element;var f=j.containment,k=(f instanceof c)?f.get(0):(/parent/.test(f))?m.parent().get(0):f;if(!k){return;}v.containerElement=c(k);if(/document/.test(f)||f==document){v.containerOffset={left:0,top:0};v.containerPosition={left:0,top:0};v.parentData={element:c(document),left:0,top:0,width:c(document).width(),height:c(document).height()||document.body.parentNode.scrollHeight};}else{var q=c(k),h=[];c(["Top","Right","Left","Bottom"]).each(function(p,o){h[p]=b(q.css("padding"+o));});v.containerOffset=q.offset();v.containerPosition=q.position();v.containerSize={height:(q.innerHeight()-h[3]),width:(q.innerWidth()-h[1])};var r=v.containerOffset,d=v.containerSize.height,n=v.containerSize.width,g=(c.ui.hasScroll(k,"left")?k.scrollWidth:n),u=(c.ui.hasScroll(k)?k.scrollHeight:d);v.parentData={element:k,left:r.left,top:r.top,width:g,height:u};}},resize:function(f,r){var v=c(this).data("resizable"),h=v.options,e=v.containerSize,q=v.containerOffset,n=v.size,p=v.position,s=v._aspectRatio||f.shiftKey,d={top:0,left:0},g=v.containerElement;if(g[0]!=document&&(/static/).test(g.css("position"))){d=q;}if(p.left<(v._helper?q.left:0)){v.size.width=v.size.width+(v._helper?(v.position.left-q.left):(v.position.left-d.left));if(s){v.size.height=v.size.width/h.aspectRatio;}v.position.left=h.helper?q.left:0;}if(p.top<(v._helper?q.top:0)){v.size.height=v.size.height+(v._helper?(v.position.top-q.top):v.position.top);if(s){v.size.width=v.size.height*h.aspectRatio;}v.position.top=v._helper?q.top:0;}v.offset.left=v.parentData.left+v.position.left;v.offset.top=v.parentData.top+v.position.top;var m=Math.abs((v._helper?v.offset.left-d.left:(v.offset.left-d.left))+v.sizeDiff.width),u=Math.abs((v._helper?v.offset.top-d.top:(v.offset.top-q.top))+v.sizeDiff.height);var k=v.containerElement.get(0)==v.element.parent().get(0),j=/relative|absolute/.test(v.containerElement.css("position"));if(k&&j){m-=v.parentData.left;}if(m+v.size.width>=v.parentData.width){v.size.width=v.parentData.width-m;if(s){v.size.height=v.size.width/v.aspectRatio;}}if(u+v.size.height>=v.parentData.height){v.size.height=v.parentData.height-u;if(s){v.size.width=v.size.height*v.aspectRatio;}}},stop:function(e,p){var r=c(this).data("resizable"),f=r.options,m=r.position,n=r.containerOffset,d=r.containerPosition,g=r.containerElement;var j=c(r.helper),s=j.offset(),q=j.outerWidth()-r.sizeDiff.width,k=j.outerHeight()-r.sizeDiff.height;if(r._helper&&!f.animate&&(/relative/).test(g.css("position"))){c(this).css({left:s.left-d.left-n.left,width:q,height:k});}if(r._helper&&!f.animate&&(/static/).test(g.css("position"))){c(this).css({left:s.left-d.left-n.left,width:q,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,n){var q=c(this).data("resizable"),g=q.options,k=q.size,h=q.originalSize,j=q.originalPosition,p=q.axis,m=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(p)){q.size.width=h.width+f;q.size.height=h.height+e;}else{if(/^(ne)$/.test(p)){q.size.width=h.width+f;q.size.height=h.height+e;q.position.top=j.top-e;}else{if(/^(sw)$/.test(p)){q.size.width=h.width+f;q.size.height=h.height+e;q.position.left=j.left-f;}else{q.size.width=h.width+f;q.size.height=h.height+e;q.position.top=j.top-e;q.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.selectable",a.extend({},a.ui.mouse,{_init:function(){var b=this;this.element.addClass("ui-selectable");this.dragged=false;var c;this.refresh=function(){c=a(b.options.filter,b.element[0]);c.each(function(){var d=a(this);var e=d.offset();a.data(this,"selectable-item",{element:this,$element:d,left:e.left,top:e.top,right:e.left+d.outerWidth(),bottom:e.top+d.outerHeight(),startselected:false,selected:d.hasClass("ui-selected"),selecting:d.hasClass("ui-selecting"),unselecting:d.hasClass("ui-unselecting")});});};this.refresh();this.selectees=c.addClass("ui-selectee");this._mouseInit();this.helper=a(document.createElement("div")).css({border:"1px dotted black"}).addClass("ui-selectable-helper");},destroy:function(){this.element.removeClass("ui-selectable ui-selectable-disabled").removeData("selectable").unbind(".selectable");this._mouseDestroy();},_mouseStart:function(d){var b=this;this.opos=[d.pageX,d.pageY];if(this.options.disabled){return;}var c=this.options;this.selectees=a(c.filter,this.element[0]);this._trigger("start",d);a(c.appendTo).append(this.helper);this.helper.css({"z-index":100,position:"absolute",left:d.clientX,top:d.clientY,width:0,height:0});if(c.autoRefresh){this.refresh();}this.selectees.filter(".ui-selected").each(function(){var e=a.data(this,"selectable-item");e.startselected=true;if(!d.metaKey){e.$element.removeClass("ui-selected");e.selected=false;e.$element.addClass("ui-unselecting");e.unselecting=true;b._trigger("unselecting",d,{unselecting:e.element});}});a(d.target).parents().andSelf().each(function(){var e=a.data(this,"selectable-item");if(e){e.$element.removeClass("ui-unselecting").addClass("ui-selecting");e.unselecting=false;e.selecting=true;e.selected=true;b._trigger("selecting",d,{selecting:e.element});return false;}});},_mouseDrag:function(j){var c=this;this.dragged=true;if(this.options.disabled){return;}var e=this.options;var d=this.opos[0],h=this.opos[1],b=j.pageX,g=j.pageY;if(d>b){var f=b;b=d;d=f;}if(h>g){var f=g;g=h;h=f;}this.helper.css({left:d,top:h,width:b-d,height:g-h});this.selectees.each(function(){var k=a.data(this,"selectable-item");if(!k||k.element==c.element[0]){return;}var m=false;if(e.tolerance=="touch"){m=(!(k.left>b||k.right<d||k.top>g||k.bottom<h));}else{if(e.tolerance=="fit"){m=(k.left>d&&k.right<b&&k.top>h&&k.bottom<g);}}if(m){if(k.selected){k.$element.removeClass("ui-selected");k.selected=false;}if(k.unselecting){k.$element.removeClass("ui-unselecting");k.unselecting=false;}if(!k.selecting){k.$element.addClass("ui-selecting");k.selecting=true;c._trigger("selecting",j,{selecting:k.element});}}else{if(k.selecting){if(j.metaKey&&k.startselected){k.$element.removeClass("ui-selecting");k.selecting=false;k.$element.addClass("ui-selected");k.selected=true;}else{k.$element.removeClass("ui-selecting");k.selecting=false;if(k.startselected){k.$element.addClass("ui-unselecting");k.unselecting=true;}c._trigger("unselecting",j,{unselecting:k.element});}}if(k.selected){if(!j.metaKey&&!k.startselected){k.$element.removeClass("ui-selected");k.selected=false;k.$element.addClass("ui-unselecting");k.unselecting=true;c._trigger("unselecting",j,{unselecting:k.element});}}}});return false;},_mouseStop:function(d){var b=this;this.dragged=false;var c=this.options;a(".ui-unselecting",this.element[0]).each(function(){var e=a.data(this,"selectable-item");e.$element.removeClass("ui-unselecting");e.unselecting=false;e.startselected=false;b._trigger("unselected",d,{unselected:e.element});});a(".ui-selecting",this.element[0]).each(function(){var e=a.data(this,"selectable-item");e.$element.removeClass("ui-selecting").addClass("ui-selected");e.selecting=false;e.selected=true;e.startselected=true;b._trigger("selected",d,{selected:e.element});});this._trigger("stop",d);this.helper.remove();return false;}}));a.extend(a.ui.selectable,{version:"1.7.1",defaults:{appendTo:"body",autoRefresh:true,cancel:":input,option",delay:0,distance:0,filter:"*",tolerance:"touch"}});})(jQuery);(function(a){a.widget("ui.sortable",a.extend({},a.ui.mouse,{_init: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");}},_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;if(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<g.scrollSensitivity){this.scrollParent[0].scrollTop=b=this.scrollParent[0].scrollTop+g.scrollSpeed;}else{if(f.pageY-this.overflowOffset.top<g.scrollSensitivity){this.scrollParent[0].scrollTop=b=this.scrollParent[0].scrollTop-g.scrollSpeed;}}if((this.overflowOffset.left+this.scrollParent[0].offsetWidth)-f.pageX<g.scrollSensitivity){this.scrollParent[0].scrollLeft=b=this.scrollParent[0].scrollLeft+g.scrollSpeed;}else{if(f.pageX-this.overflowOffset.left<g.scrollSensitivity){this.scrollParent[0].scrollLeft=b=this.scrollParent[0].scrollLeft-g.scrollSpeed;}}}else{if(f.pageY-a(document).scrollTop()<g.scrollSensitivity){b=a(document).scrollTop(a(document).scrollTop()-g.scrollSpeed);}else{if(a(window).height()-(f.pageY-a(document).scrollTop())<g.scrollSensitivity){b=a(document).scrollTop(a(document).scrollTop()+g.scrollSpeed);}}if(f.pageX-a(document).scrollLeft()<g.scrollSensitivity){b=a(document).scrollLeft(a(document).scrollLeft()-g.scrollSpeed);}else{if(a(window).width()-(f.pageX-a(document).scrollLeft())<g.scrollSensitivity){b=a(document).scrollLeft(a(document).scrollLeft()+g.scrollSpeed);}}}if(b!==false&&a.ui.ddmanager&&!g.dropBehaviour){a.ui.ddmanager.prepareOffsets(this,f);}}this.positionAbs=this._convertPositionTo("absolute");if(!this.options.axis||this.options.axis!="y"){this.helper[0].style.left=this.position.left+"px";}if(!this.options.axis||this.options.axis!="x"){this.helper[0].style.top=this.position.top+"px";}for(var d=this.items.length-1;d>=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 true;},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)<j&&(e+h)>f&&(e+h)<c;if(this.options.tolerance=="pointer"||this.options.forcePointerForContainers||(this.options.tolerance!="pointer"&&this.helperProportions[this.floating?"width":"height"]>n[this.floating?"width":"height"])){return g;}else{return(f<e+(this.helperProportions.width/2)&&d-(this.helperProportions.width/2)<c&&o<m+(this.helperProportions.height/2)&&k-(this.helperProportions.height/2)<j);}},_intersectsWithPointer:function(d){var e=a.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,d.top,d.height),c=a.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,d.left,d.width),g=e&&c,b=this._getDragVerticalDirection(),f=this._getDragHorizontalDirection();if(!g){return false;}return this.floating?(((f&&f=="right")||b=="down")?2:1):(b&&(b=="down"?2:1));},_intersectsWithSides:function(e){var c=a.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,e.top+(e.height/2),e.height),d=a.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,e.left+(e.width/2),e.width),b=this._getDragVerticalDirection(),f=this._getDragHorizontalDirection();if(this.floating&&f){return((f=="right"&&d)||(f=="left"&&!d));}else{return b&&((b=="down"&&c)||(b=="up"&&!c));}},_getDragVerticalDirection:function(){var b=this.positionAbs.top-this.lastPositionAbs.top;return b!=0&&(b>0?"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();},_connectWith:function(){var b=this.options;return b.connectWith.constructor==String?[b.connectWith]:b.connectWith;},_getItemsAsjQuery:function(b){var m=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"),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"),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<this.items.length;c++){for(var b=0;b<d.length;b++){if(d[b]==this.items[c].item[0]){this.items.splice(c,1);}}}},_refreshItems:function(b){this.items=[];this.containers=[this];var h=this.items;var q=this;var f=[[a.isFunction(this.options.items)?this.options.items.call(this.element[0],b,{item:this.currentItem}):a(this.options.items,this.element),this]];var m=this._connectWith();if(m){for(var e=m.length-1;e>=0;e--){var n=a(m[e]);for(var d=n.length-1;d>=0;d--){var g=a.data(n[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,o=c.length;d<o;d++){var p=a(c[d]);p.data("sortable-item",k);h.push({item:p,instance:k,width:0,height:0,left:0,top:0});}}},refreshPositions:function(b){if(this.offsetParent&&this.helper){this.offset.parent=this._getParentOffset();}for(var d=this.items.length-1;d>=0;d--){var e=this.items[d];if(e.instance!=this.currentContainer&&this.currentContainer&&e.item[0]!=this.currentItem[0]){continue;}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();}}},_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(d){for(var c=this.containers.length-1;c>=0;c--){if(this._intersectsWith(this.containers[c].containerCache)){if(!this.containers[c].containerCache.over){if(this.currentContainer!=this.containers[c]){var h=10000;var g=null;var e=this.positionAbs[this.containers[c].floating?"left":"top"];for(var b=this.items.length-1;b>=0;b--){if(!a.ui.contains(this.containers[c].element[0],this.items[b].item[0])){continue;}var f=this.items[b][this.containers[c].floating?"left":"top"];if(Math.abs(f-e)<h){h=Math.abs(f-e);g=this.items[b];}}if(!g&&!this.options.dropOnEmpty){continue;}this.currentContainer=this.containers[c];g?this._rearrange(d,g,null,true):this._rearrange(d,null,this.containers[c].element,true);this._trigger("change",d,this._uiHash());this.containers[c]._trigger("change",d,this._uiHash(this));this.options.placeholder.update(this.currentContainer,this.placeholder);}this.containers[c]._trigger("over",d,this._uiHash(this));this.containers[c].containerCache.over=1;}}else{if(this.containers[c].containerCache.over){this.containers[c]._trigger("out",d,this._uiHash(this));this.containers[c].containerCache.over=0;}}}},_createHelper:function(c){var d=this.options;var b=a.isFunction(d.helper)?a(d.helper.apply(this.element[0],[c,this.currentItem])):(d.helper=="clone"?this.currentItem.clone():this.currentItem);if(!b.parents("body").length){a(d.appendTo!="parent"?d.appendTo:this.currentItem[0].parentNode)[0].appendChild(b[0]);}if(b[0]==this.currentItem[0]){this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")};}if(b[0].style.width==""||d.forceHelperSize){b.width(this.currentItem.width());}if(b[0].style.height==""||d.forceHelperSize){b.height(this.currentItem.height());}return b;},_adjustOffsetFromHelper:function(b){if(b.left!=undefined){this.offset.click.left=b.left+this.margins.left;}if(b.right!=undefined){this.offset.click.left=this.helperProportions.width-b.right+this.margins.left;}if(b.top!=undefined){this.offset.click.top=b.top+this.margins.top;}if(b.bottom!=undefined){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.currentItem.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.currentItem.css("marginLeft"),10)||0),top:(parseInt(this.currentItem.css("marginTop"),10)||0)};},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()};},_setContainment:function(){var e=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)){var c=a(e.containment)[0];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];}},_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&&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&&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);if(this.cssPosition=="relative"&&!(this.scrollParent[0]!=document&&this.scrollParent[0]!=this.offsetParent[0])){this.offset.relative=this._getRelativeOffset();}var d=e.pageX;var c=e.pageY;if(this.originalPosition){if(this.containment){if(e.pageX-this.offset.click.left<this.containment[0]){d=this.containment[0]+this.offset.click.left;}if(e.pageY-this.offset.click.top<this.containment[1]){c=this.containment[1]+this.offset.click.top;}if(e.pageX-this.offset.click.left>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.top<this.containment[1]||g-this.offset.click.top>this.containment[3])?g:(!(g-this.offset.click.top<this.containment[1])?g-h.grid[1]:g+h.grid[1])):g;var f=this.originalPageX+Math.round((d-this.originalPageX)/h.grid[0])*h.grid[0];d=this.containment?(!(f-this.offset.click.left<this.containment[0]||f-this.offset.click.left>this.containment[2])?f:(!(f-this.offset.click.left<this.containment[0])?f-h.grid[0]:f+h.grid[0])):f;}}return{top:(c-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():(j?0:b.scrollTop())))),left:(d-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():j?0:b.scrollLeft())))};},_rearrange:function(g,f,c,e){c?c[0].appendChild(this.placeholder[0]):f.item[0].parentNode.insertBefore(this.placeholder[0],(this.direction=="down"?f.item[0]:f.item[0].nextSibling));this.counter=this.counter?++this.counter:1;var d=this,b=this.counter;window.setTimeout(function(){if(b==d.counter){d.refreshPositions(!e);}},0);},_clear:function(d,e){this.reverting=false;var f=[],b=this;if(!this._noFinalSort&&this.currentItem[0].parentNode){this.placeholder.before(this.currentItem);}this._noFinalSort=null;if(this.helper[0]==this.currentItem[0]){for(var c in this._storedCSS){if(this._storedCSS[c]=="auto"||this._storedCSS[c]=="static"){this._storedCSS[c]="";}}this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper");}else{this.currentItem.show();}if(this.fromOutside&&!e){f.push(function(g){this._trigger("receive",g,this._uiHash(this.fromOutside));});}if((this.fromOutside||this.domPosition.prev!=this.currentItem.prev().not(".ui-sortable-helper")[0]||this.domPosition.parent!=this.currentItem.parent()[0])&&!e){f.push(function(g){this._trigger("update",g,this._uiHash());});}if(!a.ui.contains(this.element[0],this.currentItem[0])){if(!e){f.push(function(g){this._trigger("remove",g,this._uiHash());});}for(var c=this.containers.length-1;c>=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<f.length;c++){f[c].call(this,d);}this._trigger("stop",d,this._uiHash());}return false;}if(!e){this._trigger("beforeStop",d,this._uiHash());}this.placeholder[0].parentNode.removeChild(this.placeholder[0]);if(this.helper[0]!=this.currentItem[0]){this.helper.remove();}this.helper=null;if(!e){for(var c=0;c<f.length;c++){f[c].call(this,d);}this._trigger("stop",d,this._uiHash());}this.fromOutside=false;return true;},_trigger:function(){if(a.widget.prototype._trigger.apply(this,arguments)===false){this.cancel();}},_uiHash:function(c){var b=c||this;return{helper:b.helper,placeholder:b.placeholder||a([]),position:b.position,absolutePosition:b.positionAbs,offset:b.positionAbs,item:b.currentItem,sender:c?c.element:null};}}));a.extend(a.ui.sortable,{getter:"serialize toArray",version:"1.7.1",eventPrefix:"sort",defaults:{appendTo:"parent",axis:false,cancel:":input,option",connectWith:false,containment:false,cursor:"auto",cursorAt:false,delay:0,distance:1,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}});})(jQuery);(function(a){a.widget("ui.accordion",{_init:function(){var d=this.options,b=this;this.running=0;if(d.collapsible==a.ui.accordion.defaults.collapsible&&d.alwaysOpen!=a.ui.accordion.defaults.alwaysOpen){d.collapsible=!d.alwaysOpen;}if(d.navigation){var c=this.element.find("a").filter(d.navigationFilter);if(c.length){if(c.filter(d.header).length){this.active=c;}else{this.active=c.parent().parent().prev();c.addClass("ui-accordion-content-active");}}}this.element.addClass("ui-accordion ui-widget ui-helper-reset");if(this.element[0].nodeName=="UL"){this.element.children("li").addClass("ui-accordion-li-fix");}this.headers=this.element.find(d.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all").bind("mouseenter.accordion",function(){a(this).addClass("ui-state-hover");}).bind("mouseleave.accordion",function(){a(this).removeClass("ui-state-hover");}).bind("focus.accordion",function(){a(this).addClass("ui-state-focus");}).bind("blur.accordion",function(){a(this).removeClass("ui-state-focus");});this.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom");this.active=this._findActive(this.active||d.active).toggleClass("ui-state-default").toggleClass("ui-state-active").toggleClass("ui-corner-all").toggleClass("ui-corner-top");this.active.next().addClass("ui-accordion-content-active");a("<span/>").addClass("ui-icon "+d.icons.header).prependTo(this.headers);this.active.find(".ui-icon").toggleClass(d.icons.header).toggleClass(d.icons.headerSelected);if(a.browser.msie){this.element.find("a").css("zoom","1");}this.resize();this.element.attr("role","tablist");this.headers.attr("role","tab").bind("keydown",function(e){return b._keydown(e);}).next().attr("role","tabpanel");this.headers.not(this.active||"").attr("aria-expanded","false").attr("tabIndex","-1").next().hide();if(!this.active.length){this.headers.eq(0).attr("tabIndex","0");}else{this.active.attr("aria-expanded","true").attr("tabIndex","0");}if(!a.browser.safari){this.headers.find("a").attr("tabIndex","-1");}if(d.event){this.headers.bind((d.event)+".accordion",function(e){return b._clickHandler.call(b,e,this);});}},destroy:function(){var c=this.options;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role").unbind(".accordion").removeData("accordion");this.headers.unbind(".accordion").removeClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("tabindex");this.headers.find("a").removeAttr("tabindex");this.headers.children(".ui-icon").remove();var b=this.headers.next().css("display","").removeAttr("role").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active");if(c.autoHeight||c.fillHeight){b.css("height","");}},_setData:function(b,c){if(b=="alwaysOpen"){b="collapsible";c=!c;}a.widget.prototype._setData.apply(this,arguments);},_keydown:function(e){var g=this.options,f=a.ui.keyCode;if(g.disabled||e.altKey||e.ctrlKey){return;}var d=this.headers.length;var b=this.headers.index(e.target);var c=false;switch(e.keyCode){case f.RIGHT:case f.DOWN:c=this.headers[(b+1)%d];break;case f.LEFT:case f.UP:c=this.headers[(b-1+d)%d];break;case f.SPACE:case f.ENTER:return this._clickHandler({target:e.target},e.target);}if(c){a(e.target).attr("tabIndex","-1");a(c).attr("tabIndex","0");c.focus();return false;}return true;},resize:function(){var e=this.options,d;if(e.fillSpace){if(a.browser.msie){var b=this.element.parent().css("overflow");this.element.parent().css("overflow","hidden");}d=this.element.parent().height();if(a.browser.msie){this.element.parent().css("overflow",b);}this.headers.each(function(){d-=a(this).outerHeight();});var c=0;this.headers.next().each(function(){c=Math.max(c,a(this).innerHeight()-a(this).height());}).height(Math.max(0,d-c)).css("overflow","auto");}else{if(e.autoHeight){d=0;this.headers.next().each(function(){d=Math.max(d,a(this).outerHeight());}).height(d);}}},activate:function(b){var c=this._findActive(b)[0];this._clickHandler({target:c},c);},_findActive:function(b){return b?typeof b=="number"?this.headers.filter(":eq("+b+")"):this.headers.not(this.headers.not(b)):b===false?a([]):this.headers.filter(":eq(0)");},_clickHandler:function(b,f){var d=this.options;if(d.disabled){return false;}if(!b.target&&d.collapsible){this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").find(".ui-icon").removeClass(d.icons.headerSelected).addClass(d.icons.header);this.active.next().addClass("ui-accordion-content-active");var h=this.active.next(),e={options:d,newHeader:a([]),oldHeader:d.active,newContent:a([]),oldContent:h},c=(this.active=a([]));this._toggle(c,h,e);return false;}var g=a(b.currentTarget||f);var j=g[0]==this.active[0];if(this.running||(!d.collapsible&&j)){return false;}this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").find(".ui-icon").removeClass(d.icons.headerSelected).addClass(d.icons.header);this.active.next().addClass("ui-accordion-content-active");if(!j){g.removeClass("ui-state-default ui-corner-all").addClass("ui-state-active ui-corner-top").find(".ui-icon").removeClass(d.icons.header).addClass(d.icons.headerSelected);g.next().addClass("ui-accordion-content-active");}var c=g.next(),h=this.active.next(),e={options:d,newHeader:j&&d.collapsible?a([]):g,oldHeader:this.active,newContent:j&&d.collapsible?a([]):c.find("> *"),oldContent:h.find("> *")},k=this.headers.index(this.active[0])>this.headers.index(g[0]);this.active=j?a([]):g;this._toggle(c,h,e,j,k);return false;},_toggle:function(b,j,g,k,m){var d=this.options,p=this;this.toShow=b;this.toHide=j;this.data=g;var c=function(){if(!p){return;}return p._completed.apply(p,arguments);};this._trigger("changestart",null,this.data);this.running=j.size()===0?b.size():j.size();if(d.animated){var f={};if(d.collapsible&&k){f={toShow:a([]),toHide:j,complete:c,down:m,autoHeight:d.autoHeight||d.fillSpace};}else{f={toShow:b,toHide:j,complete:c,down:m,autoHeight:d.autoHeight||d.fillSpace};}if(!d.proxied){d.proxied=d.animated;}if(!d.proxiedDuration){d.proxiedDuration=d.duration;}d.animated=a.isFunction(d.proxied)?d.proxied(f):d.proxied;d.duration=a.isFunction(d.proxiedDuration)?d.proxiedDuration(f):d.proxiedDuration;var n=a.ui.accordion.animations,e=d.duration,h=d.animated;if(!n[h]){n[h]=function(o){this.slide(o,{easing:h,duration:e||700});};}n[h](f);}else{if(d.collapsible&&k){b.toggle();}else{j.hide();b.show();}c(true);}j.prev().attr("aria-expanded","false").attr("tabIndex","-1").blur();b.prev().attr("aria-expanded","true").attr("tabIndex","0").focus();},_completed:function(b){var c=this.options;this.running=b?0:--this.running;if(this.running){return;}if(c.clearStyle){this.toShow.add(this.toHide).css({height:"",overflow:""});}this._trigger("change",null,this.data);}});a.extend(a.ui.accordion,{version:"1.7.1",defaults:{active:null,alwaysOpen:true,animated:"slide",autoHeight:true,clearStyle:false,collapsible:false,event:"click",fillSpace:false,header:"> li > :first-child,> :not(li):even",icons:{header:"ui-icon-triangle-1-e",headerSelected:"ui-icon-triangle-1-s"},navigation:false,navigationFilter:function(){return this.href.toLowerCase()==location.href.toLowerCase();}},animations:{slide:function(k,h){k=a.extend({easing:"swing",duration:300},k,h);if(!k.toHide.size()){k.toShow.animate({height:"show"},k);return;}if(!k.toShow.size()){k.toHide.animate({height:"hide"},k);return;}var c=k.toShow.css("overflow"),g,d={},f={},e=["height","paddingTop","paddingBottom"],b;var j=k.toShow;b=j[0].style.width;j.width(parseInt(j.parent().width(),10)-parseInt(j.css("paddingLeft"),10)-parseInt(j.css("paddingRight"),10)-(parseInt(j.css("borderLeftWidth"),10)||0)-(parseInt(j.css("borderRightWidth"),10)||0));a.each(e,function(m,o){f[o]="hide";var n=(""+a.css(k.toShow[0],o)).match(/^([\d+-.]+)(.*)$/);d[o]={value:n[1],unit:n[2]||"px"};});k.toShow.css({height:0,overflow:"hidden"}).show();k.toHide.filter(":hidden").each(k.complete).end().filter(":visible").animate(f,{step:function(m,n){if(n.prop=="height"){g=(n.now-n.start)/(n.end-n.start);}k.toShow[0].style[n.prop]=(g*d[n.prop].value)+d[n.prop].unit;},duration:k.duration,easing:k.easing,complete:function(){if(!k.autoHeight){k.toShow.css("height","");}k.toShow.css("width",b);k.toShow.css({overflow:c});k.complete();}});},bounceslide:function(b){this.slide(b,{easing:b.down?"easeOutBounce":"swing",duration:b.down?1000:200});},easeslide:function(b){this.slide(b,{easing:"easeinout",duration:700});}}});})(jQuery);(function(c){var b={dragStart:"start.draggable",drag:"drag.draggable",dragStop:"stop.draggable",maxHeight:"maxHeight.resizable",minHeight:"minHeight.resizable",maxWidth:"maxWidth.resizable",minWidth:"minWidth.resizable",resizeStart:"start.resizable",resize:"drag.resizable",resizeStop:"stop.resizable"},a="ui-dialog ui-widget ui-widget-content ui-corner-all ";c.widget("ui.dialog",{_init:function(){this.originalTitle=this.element.attr("title");var n=this,o=this.options,k=o.title||this.originalTitle||"&nbsp;",e=c.ui.dialog.getTitleId(this.element),m=(this.uiDialog=c("<div/>")).appendTo(document.body).hide().addClass(a+o.dialogClass).css({position:"absolute",overflow:"hidden",zIndex:o.zIndex}).attr("tabIndex",-1).css("outline",0).keydown(function(p){(o.closeOnEscape&&p.keyCode&&p.keyCode==c.ui.keyCode.ESCAPE&&n.close(p));}).attr({role:"dialog","aria-labelledby":e}).mousedown(function(p){n.moveToTop(false,p);}),g=this.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(m),f=(this.uiDialogTitlebar=c("<div></div>")).addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(m),j=c('<a href="#"/>').addClass("ui-dialog-titlebar-close ui-corner-all").attr("role","button").hover(function(){j.addClass("ui-state-hover");},function(){j.removeClass("ui-state-hover");}).focus(function(){j.addClass("ui-state-focus");}).blur(function(){j.removeClass("ui-state-focus");}).mousedown(function(p){p.stopPropagation();}).click(function(p){n.close(p);return false;}).appendTo(f),h=(this.uiDialogTitlebarCloseText=c("<span/>")).addClass("ui-icon ui-icon-closethick").text(o.closeText).appendTo(j),d=c("<span/>").addClass("ui-dialog-title").attr("id",e).html(k).prependTo(f);f.find("*").add(f).disableSelection();(o.draggable&&c.fn.draggable&&this._makeDraggable());(o.resizable&&c.fn.resizable&&this._makeResizable());this._createButtons(o.buttons);this._isOpen=false;(o.bgiframe&&c.fn.bgiframe&&m.bgiframe());(o.autoOpen&&this.open());},destroy:function(){(this.overlay&&this.overlay.destroy());this.uiDialog.hide();this.element.unbind(".dialog").removeData("dialog").removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body");this.uiDialog.remove();(this.originalTitle&&this.element.attr("title",this.originalTitle));},close:function(e){var d=this;if(false===d._trigger("beforeclose",e)){return;}(d.overlay&&d.overlay.destroy());d.uiDialog.unbind("keypress.ui-dialog");(d.options.hide?d.uiDialog.hide(d.options.hide,function(){d._trigger("close",e);}):d.uiDialog.hide()&&d._trigger("close",e));c.ui.dialog.overlay.resize();d._isOpen=false;},isOpen:function(){return this._isOpen;},moveToTop:function(f,e){if((this.options.modal&&!f)||(!this.options.stack&&!this.options.modal)){return this._trigger("focus",e);}if(this.options.zIndex>c.ui.dialog.maxZ){c.ui.dialog.maxZ=this.options.zIndex;}(this.overlay&&this.overlay.$el.css("z-index",c.ui.dialog.overlay.maxZ=++c.ui.dialog.maxZ));var d={scrollTop:this.element.attr("scrollTop"),scrollLeft:this.element.attr("scrollLeft")};this.uiDialog.css("z-index",++c.ui.dialog.maxZ);this.element.attr(d);this._trigger("focus",e);},open:function(){if(this._isOpen){return;}var e=this.options,d=this.uiDialog;this.overlay=e.modal?new c.ui.dialog.overlay(this):null;(d.next().length&&d.appendTo("body"));this._size();this._position(e.position);d.show(e.show);this.moveToTop(true);(e.modal&&d.bind("keypress.ui-dialog",function(h){if(h.keyCode!=c.ui.keyCode.TAB){return;}var g=c(":tabbable",this),j=g.filter(":first")[0],f=g.filter(":last")[0];if(h.target==f&&!h.shiftKey){setTimeout(function(){j.focus();},1);}else{if(h.target==j&&h.shiftKey){setTimeout(function(){f.focus();},1);}}}));c([]).add(d.find(".ui-dialog-content :tabbable:first")).add(d.find(".ui-dialog-buttonpane :tabbable:first")).add(d).filter(":first").focus();this._trigger("open");this._isOpen=true;},_createButtons:function(g){var f=this,d=false,e=c("<div></div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix");this.uiDialog.find(".ui-dialog-buttonpane").remove();(typeof g=="object"&&g!==null&&c.each(g,function(){return !(d=true);}));if(d){c.each(g,function(h,j){c('<button type="button"></button>').addClass("ui-state-default ui-corner-all").text(h).click(function(){j.apply(f.element[0],arguments);}).hover(function(){c(this).addClass("ui-state-hover");},function(){c(this).removeClass("ui-state-hover");}).focus(function(){c(this).addClass("ui-state-focus");}).blur(function(){c(this).removeClass("ui-state-focus");}).appendTo(e);});e.appendTo(this.uiDialog);}},_makeDraggable:function(){var d=this,f=this.options,e;this.uiDialog.draggable({cancel:".ui-dialog-content",handle:".ui-dialog-titlebar",containment:"document",start:function(){e=f.height;c(this).height(c(this).height()).addClass("ui-dialog-dragging");(f.dragStart&&f.dragStart.apply(d.element[0],arguments));},drag:function(){(f.drag&&f.drag.apply(d.element[0],arguments));},stop:function(){c(this).removeClass("ui-dialog-dragging").height(e);(f.dragStop&&f.dragStop.apply(d.element[0],arguments));c.ui.dialog.overlay.resize();}});},_makeResizable:function(g){g=(g===undefined?this.options.resizable:g);var d=this,f=this.options,e=typeof g=="string"?g:"n,e,s,w,se,sw,ne,nw";this.uiDialog.resizable({cancel:".ui-dialog-content",alsoResize:this.element,maxWidth:f.maxWidth,maxHeight:f.maxHeight,minWidth:f.minWidth,minHeight:f.minHeight,start:function(){c(this).addClass("ui-dialog-resizing");(f.resizeStart&&f.resizeStart.apply(d.element[0],arguments));},resize:function(){(f.resize&&f.resize.apply(d.element[0],arguments));},handles:e,stop:function(){c(this).removeClass("ui-dialog-resizing");f.height=c(this).height();f.width=c(this).width();(f.resizeStop&&f.resizeStop.apply(d.element[0],arguments));c.ui.dialog.overlay.resize();}}).find(".ui-resizable-se").addClass("ui-icon ui-icon-grip-diagonal-se");},_position:function(j){var e=c(window),f=c(document),g=f.scrollTop(),d=f.scrollLeft(),h=g;if(c.inArray(j,["center","top","right","bottom","left"])>=0){j=[j=="right"||j=="left"?j:"center",j=="top"||j=="bottom"?j:"middle"];}if(j.constructor!=Array){j=["center","middle"];}if(j[0].constructor==Number){d+=j[0];}else{switch(j[0]){case"left":d+=0;break;case"right":d+=e.width()-this.uiDialog.outerWidth();break;default:case"center":d+=(e.width()-this.uiDialog.outerWidth())/2;}}if(j[1].constructor==Number){g+=j[1];}else{switch(j[1]){case"top":g+=0;break;case"bottom":g+=e.height()-this.uiDialog.outerHeight();break;default:case"middle":g+=(e.height()-this.uiDialog.outerHeight())/2;}}g=Math.max(g,h);this.uiDialog.css({top:g,left:d});},_setData:function(e,f){(b[e]&&this.uiDialog.data(b[e],f));switch(e){case"buttons":this._createButtons(f);break;case"closeText":this.uiDialogTitlebarCloseText.text(f);break;case"dialogClass":this.uiDialog.removeClass(this.options.dialogClass).addClass(a+f);break;case"draggable":(f?this._makeDraggable():this.uiDialog.draggable("destroy"));break;case"height":this.uiDialog.height(f);break;case"position":this._position(f);break;case"resizable":var d=this.uiDialog,g=this.uiDialog.is(":data(resizable)");(g&&!f&&d.resizable("destroy"));(g&&typeof f=="string"&&d.resizable("option","handles",f));(g||this._makeResizable(f));break;case"title":c(".ui-dialog-title",this.uiDialogTitlebar).html(f||"&nbsp;");break;case"width":this.uiDialog.width(f);break;}c.widget.prototype._setData.apply(this,arguments);},_size:function(){var e=this.options;this.element.css({height:0,minHeight:0,width:"auto"});var d=this.uiDialog.css({height:"auto",width:e.width}).height();this.element.css({minHeight:Math.max(e.minHeight-d,0),height:e.height=="auto"?"auto":Math.max(e.height-d,0)});}});c.extend(c.ui.dialog,{version:"1.7.1",defaults:{autoOpen:true,bgiframe:false,buttons:{},closeOnEscape:true,closeText:"close",dialogClass:"",draggable:true,hide:null,height:"auto",maxHeight:false,maxWidth:false,minHeight:150,minWidth:150,modal:false,position:"center",resizable:true,show:null,stack:true,title:"",width:300,zIndex:1000},getter:"isOpen",uuid:0,maxZ:0,getTitleId:function(d){return"ui-dialog-title-"+(d.attr("id")||++this.uuid);},overlay:function(d){this.$el=c.ui.dialog.overlay.create(d);}});c.extend(c.ui.dialog.overlay,{instances:[],maxZ:0,events:c.map("focus,mousedown,mouseup,keydown,keypress,click".split(","),function(d){return d+".dialog-overlay";}).join(" "),create:function(e){if(this.instances.length===0){setTimeout(function(){c(document).bind(c.ui.dialog.overlay.events,function(f){var g=c(f.target).parents(".ui-dialog").css("zIndex")||0;return(g>c.ui.dialog.overlay.maxZ);});},1);c(document).bind("keydown.dialog-overlay",function(f){(e.options.closeOnEscape&&f.keyCode&&f.keyCode==c.ui.keyCode.ESCAPE&&e.close(f));});c(window).bind("resize.dialog-overlay",c.ui.dialog.overlay.resize);}var d=c("<div></div>").appendTo(document.body).addClass("ui-widget-overlay").css({width:this.width(),height:this.height()});(e.options.bgiframe&&c.fn.bgiframe&&d.bgiframe());this.instances.push(d);return d;},destroy:function(d){this.instances.splice(c.inArray(this.instances,d),1);if(this.instances.length===0){c([document,window]).unbind(".dialog-overlay");}d.remove();},height:function(){if(c.browser.msie&&c.browser.version<7){var e=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);var d=Math.max(document.documentElement.offsetHeight,document.body.offsetHeight);if(e<d){return c(window).height()+"px";}else{return e+"px";}}else{return c(document).height()+"px";}},width:function(){if(c.browser.msie&&c.browser.version<7){var d=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth);var e=Math.max(document.documentElement.offsetWidth,document.body.offsetWidth);if(d<e){return c(window).width()+"px";}else{return d+"px";}}else{return c(document).width()+"px";}},resize:function(){var d=c([]);c.each(c.ui.dialog.overlay.instances,function(){d=d.add(this);});d.css({width:0,height:0}).css({width:c.ui.dialog.overlay.width(),height:c.ui.dialog.overlay.height()});}});c.extend(c.ui.dialog.overlay.prototype,{destroy:function(){c.ui.dialog.overlay.destroy(this.$el);}});})(jQuery);(function(a){a.widget("ui.slider",a.extend({},a.ui.mouse,{_init:function(){var b=this,c=this.options;this._keySliding=false;this._handleIndex=null;this._detectOrientation();this._mouseInit();this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget ui-widget-content ui-corner-all");this.range=a([]);if(c.range){if(c.range===true){this.range=a("<div></div>");if(!c.values){c.values=[this._valueMin(),this._valueMin()];}if(c.values.length&&c.values.length!=2){c.values=[c.values[0],c.values[0]];}}else{this.range=a("<div></div>");}this.range.appendTo(this.element).addClass("ui-slider-range");if(c.range=="min"||c.range=="max"){this.range.addClass("ui-slider-range-"+c.range);}this.range.addClass("ui-widget-header");}if(a(".ui-slider-handle",this.element).length==0){a('<a href="#"></a>').appendTo(this.element).addClass("ui-slider-handle");}if(c.values&&c.values.length){while(a(".ui-slider-handle",this.element).length<c.values.length){a('<a href="#"></a>').appendTo(this.element).addClass("ui-slider-handle");}}this.handles=a(".ui-slider-handle",this.element).addClass("ui-state-default ui-corner-all");this.handle=this.handles.eq(0);this.handles.add(this.range).filter("a").click(function(d){d.preventDefault();}).hover(function(){a(this).addClass("ui-state-hover");},function(){a(this).removeClass("ui-state-hover");}).focus(function(){a(".ui-slider .ui-state-focus").removeClass("ui-state-focus");a(this).addClass("ui-state-focus");}).blur(function(){a(this).removeClass("ui-state-focus");});this.handles.each(function(d){a(this).data("index.ui-slider-handle",d);});this.handles.keydown(function(j){var f=true;var e=a(this).data("index.ui-slider-handle");if(b.options.disabled){return;}switch(j.keyCode){case a.ui.keyCode.HOME:case a.ui.keyCode.END:case a.ui.keyCode.UP:case a.ui.keyCode.RIGHT:case a.ui.keyCode.DOWN:case a.ui.keyCode.LEFT:f=false;if(!b._keySliding){b._keySliding=true;a(this).addClass("ui-state-active");b._start(j,e);}break;}var g,d,h=b._step();if(b.options.values&&b.options.values.length){g=d=b.values(e);}else{g=d=b.value();}switch(j.keyCode){case a.ui.keyCode.HOME:d=b._valueMin();break;case a.ui.keyCode.END:d=b._valueMax();break;case a.ui.keyCode.UP:case a.ui.keyCode.RIGHT:if(g==b._valueMax()){return;}d=g+h;break;case a.ui.keyCode.DOWN:case a.ui.keyCode.LEFT:if(g==b._valueMin()){return;}d=g-h;break;}b._slide(j,e,d);return f;}).keyup(function(e){var d=a(this).data("index.ui-slider-handle");if(b._keySliding){b._stop(e,d);b._change(e,d);b._keySliding=false;a(this).removeClass("ui-state-active");}});this._refreshValue();},destroy:function(){this.handles.remove();this.range.remove();this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-slider-disabled ui-widget ui-widget-content ui-corner-all").removeData("slider").unbind(".slider");this._mouseDestroy();},_mouseCapture:function(d){var e=this.options;if(e.disabled){return false;}this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()};this.elementOffset=this.element.offset();var h={x:d.pageX,y:d.pageY};var k=this._normValueFromMouse(h);var c=this._valueMax()-this._valueMin()+1,f;var m=this,j;this.handles.each(function(n){var o=Math.abs(k-m.values(n));if(c>o){c=o;f=a(this);j=n;}});if(e.range==true&&this.values(1)==e.min){f=a(this.handles[++j]);}this._start(d,j);m._handleIndex=j;f.addClass("ui-state-active").focus();var g=f.offset();var b=!a(d.target).parents().andSelf().is(".ui-slider-handle");this._clickOffset=b?{left:0,top:0}:{left:d.pageX-g.left-(f.width()/2),top:d.pageY-g.top-(f.height()/2)-(parseInt(f.css("borderTopWidth"),10)||0)-(parseInt(f.css("borderBottomWidth"),10)||0)+(parseInt(f.css("marginTop"),10)||0)};k=this._normValueFromMouse(h);this._slide(d,j,k);return true;},_mouseStart:function(b){return true;},_mouseDrag:function(d){var b={x:d.pageX,y:d.pageY};var c=this._normValueFromMouse(b);this._slide(d,this._handleIndex,c);return false;},_mouseStop:function(b){this.handles.removeClass("ui-state-active");this._stop(b,this._handleIndex);this._change(b,this._handleIndex);this._handleIndex=null;this._clickOffset=null;return false;},_detectOrientation:function(){this.orientation=this.options.orientation=="vertical"?"vertical":"horizontal";},_normValueFromMouse:function(d){var c,h;if("horizontal"==this.orientation){c=this.elementSize.width;h=d.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0);}else{c=this.elementSize.height;h=d.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0);}var f=(h/c);if(f>1){f=1;}if(f<0){f=0;}if("vertical"==this.orientation){f=1-f;}var e=this._valueMax()-this._valueMin(),j=f*e,b=j%this.options.step,g=this._valueMin()+j-b;if(b>(this.options.step/2)){g+=this.options.step;}return parseFloat(g.toFixed(5));},_start:function(d,c){var b={handle:this.handles[c],value:this.value()};if(this.options.values&&this.options.values.length){b.value=this.values(c);b.values=this.values();}this._trigger("start",d,b);},_slide:function(f,e,d){var g=this.handles[e];if(this.options.values&&this.options.values.length){var b=this.values(e?0:1);if((e==0&&d>=b)||(e==1&&d<=b)){d=b;}if(d!=this.values(e)){var c=this.values();c[e]=d;var h=this._trigger("slide",f,{handle:this.handles[e],value:d,values:c});var b=this.values(e?0:1);if(h!==false){this.values(e,d,(f.type=="mousedown"&&this.options.animate),true);}}}else{if(d!=this.value()){var h=this._trigger("slide",f,{handle:this.handles[e],value:d});if(h!==false){this._setData("value",d,(f.type=="mousedown"&&this.options.animate));}}}},_stop:function(d,c){var b={handle:this.handles[c],value:this.value()};if(this.options.values&&this.options.values.length){b.value=this.values(c);b.values=this.values();}this._trigger("stop",d,b);},_change:function(d,c){var b={handle:this.handles[c],value:this.value()};if(this.options.values&&this.options.values.length){b.value=this.values(c);b.values=this.values();}this._trigger("change",d,b);},value:function(b){if(arguments.length){this._setData("value",b);this._change(null,0);}return this._value();},values:function(b,e,c,d){if(arguments.length>1){this.options.values[b]=e;this._refreshValue(c);if(!d){this._change(null,b);}}if(arguments.length){if(this.options.values&&this.options.values.length){return this._values(b);}else{return this.value();}}else{return this._values();}},_setData:function(b,d,c){a.widget.prototype._setData.apply(this,arguments);switch(b){case"orientation":this._detectOrientation();this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation);this._refreshValue(c);break;case"value":this._refreshValue(c);break;}},_step:function(){var b=this.options.step;return b;},_value:function(){var b=this.options.value;if(b<this._valueMin()){b=this._valueMin();}if(b>this._valueMax()){b=this._valueMax();}return b;},_values:function(b){if(arguments.length){var c=this.options.values[b];if(c<this._valueMin()){c=this._valueMin();}if(c>this._valueMax()){c=this._valueMax();}return c;}else{return this.options.values;}},_valueMin:function(){var b=this.options.min;return b;},_valueMax:function(){var b=this.options.max;return b;},_refreshValue:function(c){var f=this.options.range,d=this.options,n=this;if(this.options.values&&this.options.values.length){var j,h;this.handles.each(function(r,p){var q=(n.values(r)-n._valueMin())/(n._valueMax()-n._valueMin())*100;var o={};o[n.orientation=="horizontal"?"left":"bottom"]=q+"%";a(this).stop(1,1)[c?"animate":"css"](o,d.animate);if(n.options.range===true){if(n.orientation=="horizontal"){(r==0)&&n.range.stop(1,1)[c?"animate":"css"]({left:q+"%"},d.animate);(r==1)&&n.range[c?"animate":"css"]({width:(q-lastValPercent)+"%"},{queue:false,duration:d.animate});}else{(r==0)&&n.range.stop(1,1)[c?"animate":"css"]({bottom:(q)+"%"},d.animate);(r==1)&&n.range[c?"animate":"css"]({height:(q-lastValPercent)+"%"},{queue:false,duration:d.animate});}}lastValPercent=q;});}else{var k=this.value(),g=this._valueMin(),m=this._valueMax(),e=m!=g?(k-g)/(m-g)*100:0;var b={};b[n.orientation=="horizontal"?"left":"bottom"]=e+"%";this.handle.stop(1,1)[c?"animate":"css"](b,d.animate);(f=="min")&&(this.orientation=="horizontal")&&this.range.stop(1,1)[c?"animate":"css"]({width:e+"%"},d.animate);(f=="max")&&(this.orientation=="horizontal")&&this.range[c?"animate":"css"]({width:(100-e)+"%"},{queue:false,duration:d.animate});(f=="min")&&(this.orientation=="vertical")&&this.range.stop(1,1)[c?"animate":"css"]({height:e+"%"},d.animate);(f=="max")&&(this.orientation=="vertical")&&this.range[c?"animate":"css"]({height:(100-e)+"%"},{queue:false,duration:d.animate});}}}));a.extend(a.ui.slider,{getter:"value values",version:"1.7.1",eventPrefix:"slide",defaults:{animate:false,delay:0,distance:0,max:100,min:0,orientation:"horizontal",range:false,step:1,value:0,values:null}});})(jQuery);(function(a){a.widget("ui.tabs",{_init:function(){if(this.options.deselectable!==undefined){this.options.collapsible=this.options.deselectable;}this._tabify(true);},_setData:function(b,c){if(b=="selected"){if(this.options.collapsible&&c==this.options.selected){return;}this.select(c);}else{this.options[b]=c;if(b=="deselectable"){this.options.collapsible=c;}this._tabify();}},_tabId:function(b){return b.title&&b.title.replace(/\s/g,"_").replace(/[^A-Za-z0-9\-_:\.]/g,"")||this.options.idPrefix+a.data(b);},_sanitizeSelector:function(b){return b.replace(/:/g,"\\:");},_cookie:function(){var b=this.cookie||(this.cookie=this.options.cookie.name||"ui-tabs-"+a.data(this.list[0]));return a.cookie.apply(null,[b].concat(a.makeArray(arguments)));},_ui:function(c,b){return{tab:c,panel:b,index:this.anchors.index(c)};},_cleanup:function(){this.lis.filter(".ui-state-processing").removeClass("ui-state-processing").find("span:data(label.tabs)").each(function(){var b=a(this);b.html(b.data("label.tabs")).removeData("label.tabs");});},_tabify:function(p){this.list=this.element.children("ul:first");this.lis=a("li:has(a[href])",this.list);this.anchors=this.lis.map(function(){return a("a",this)[0];});this.panels=a([]);var q=this,d=this.options;var c=/^#.+/;this.anchors.each(function(s,o){var r=a(o).attr("href");var u=r.split("#")[0],v;if(u&&(u===location.toString().split("#")[0]||(v=a("base")[0])&&u===v.href)){r=o.hash;o.href=r;}if(c.test(r)){q.panels=q.panels.add(q._sanitizeSelector(r));}else{if(r!="#"){a.data(o,"href.tabs",r);a.data(o,"load.tabs",r.replace(/#.*$/,""));var x=q._tabId(o);o.href="#"+x;var w=a("#"+x);if(!w.length){w=a(d.panelTemplate).attr("id",x).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").insertAfter(q.panels[s-1]||q.list);w.data("destroy.tabs",true);}q.panels=q.panels.add(w);}else{d.disabled.push(s);}}});if(p){this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all");this.list.addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.lis.addClass("ui-state-default ui-corner-top");this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom");if(d.selected===undefined){if(location.hash){this.anchors.each(function(r,o){if(o.hash==location.hash){d.selected=r;return false;}});}if(typeof d.selected!="number"&&d.cookie){d.selected=parseInt(q._cookie(),10);}if(typeof d.selected!="number"&&this.lis.filter(".ui-tabs-selected").length){d.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"));}d.selected=d.selected||0;}else{if(d.selected===null){d.selected=-1;}}d.selected=((d.selected>=0&&this.anchors[d.selected])||d.selected<0)?d.selected:0;d.disabled=a.unique(d.disabled.concat(a.map(this.lis.filter(".ui-state-disabled"),function(r,o){return q.lis.index(r);}))).sort();if(a.inArray(d.selected,d.disabled)!=-1){d.disabled.splice(a.inArray(d.selected,d.disabled),1);}this.panels.addClass("ui-tabs-hide");this.lis.removeClass("ui-tabs-selected ui-state-active");if(d.selected>=0&&this.anchors.length){this.panels.eq(d.selected).removeClass("ui-tabs-hide");this.lis.eq(d.selected).addClass("ui-tabs-selected ui-state-active");q.element.queue("tabs",function(){q._trigger("show",null,q._ui(q.anchors[d.selected],q.panels[d.selected]));});this.load(d.selected);}a(window).bind("unload",function(){q.lis.add(q.anchors).unbind(".tabs");q.lis=q.anchors=q.panels=null;});}else{d.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"));}this.element[d.collapsible?"addClass":"removeClass"]("ui-tabs-collapsible");if(d.cookie){this._cookie(d.selected,d.cookie);}for(var g=0,n;(n=this.lis[g]);g++){a(n)[a.inArray(g,d.disabled)!=-1&&!a(n).hasClass("ui-tabs-selected")?"addClass":"removeClass"]("ui-state-disabled");}if(d.cache===false){this.anchors.removeData("cache.tabs");}this.lis.add(this.anchors).unbind(".tabs");if(d.event!="mouseover"){var f=function(r,o){if(o.is(":not(.ui-state-disabled)")){o.addClass("ui-state-"+r);}};var j=function(r,o){o.removeClass("ui-state-"+r);};this.lis.bind("mouseover.tabs",function(){f("hover",a(this));});this.lis.bind("mouseout.tabs",function(){j("hover",a(this));});this.anchors.bind("focus.tabs",function(){f("focus",a(this).closest("li"));});this.anchors.bind("blur.tabs",function(){j("focus",a(this).closest("li"));});}var b,h;if(d.fx){if(a.isArray(d.fx)){b=d.fx[0];h=d.fx[1];}else{b=h=d.fx;}}function e(o,r){o.css({display:""});if(a.browser.msie&&r.opacity){o[0].style.removeAttribute("filter");}}var k=h?function(o,r){a(o).closest("li").removeClass("ui-state-default").addClass("ui-tabs-selected ui-state-active");r.hide().removeClass("ui-tabs-hide").animate(h,h.duration||"normal",function(){e(r,h);q._trigger("show",null,q._ui(o,r[0]));});}:function(o,r){a(o).closest("li").removeClass("ui-state-default").addClass("ui-tabs-selected ui-state-active");r.removeClass("ui-tabs-hide");q._trigger("show",null,q._ui(o,r[0]));};var m=b?function(r,o){o.animate(b,b.duration||"normal",function(){q.lis.removeClass("ui-tabs-selected ui-state-active").addClass("ui-state-default");o.addClass("ui-tabs-hide");e(o,b);q.element.dequeue("tabs");});}:function(r,o,s){q.lis.removeClass("ui-tabs-selected ui-state-active").addClass("ui-state-default");o.addClass("ui-tabs-hide");q.element.dequeue("tabs");};this.anchors.bind(d.event+".tabs",function(){var r=this,u=a(this).closest("li"),o=q.panels.filter(":not(.ui-tabs-hide)"),s=a(q._sanitizeSelector(this.hash));if((u.hasClass("ui-tabs-selected")&&!d.collapsible)||u.hasClass("ui-state-disabled")||u.hasClass("ui-state-processing")||q._trigger("select",null,q._ui(this,s[0]))===false){this.blur();return false;}d.selected=q.anchors.index(this);q.abort();if(d.collapsible){if(u.hasClass("ui-tabs-selected")){d.selected=-1;if(d.cookie){q._cookie(d.selected,d.cookie);}q.element.queue("tabs",function(){m(r,o);}).dequeue("tabs");this.blur();return false;}else{if(!o.length){if(d.cookie){q._cookie(d.selected,d.cookie);}q.element.queue("tabs",function(){k(r,s);});q.load(q.anchors.index(this));this.blur();return false;}}}if(d.cookie){q._cookie(d.selected,d.cookie);}if(s.length){if(o.length){q.element.queue("tabs",function(){m(r,o);});}q.element.queue("tabs",function(){k(r,s);});q.load(q.anchors.index(this));}else{throw"jQuery UI Tabs: Mismatching fragment identifier.";}if(a.browser.msie){this.blur();}});this.anchors.bind("click.tabs",function(){return false;});},destroy:function(){var b=this.options;this.abort();this.element.unbind(".tabs").removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible").removeData("tabs");this.list.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.anchors.each(function(){var c=a.data(this,"href.tabs");if(c){this.href=c;}var d=a(this).unbind(".tabs");a.each(["href","load","cache"],function(e,f){d.removeData(f+".tabs");});});this.lis.unbind(".tabs").add(this.panels).each(function(){if(a.data(this,"destroy.tabs")){a(this).remove();}else{a(this).removeClass(["ui-state-default","ui-corner-top","ui-tabs-selected","ui-state-active","ui-state-hover","ui-state-focus","ui-state-disabled","ui-tabs-panel","ui-widget-content","ui-corner-bottom","ui-tabs-hide"].join(" "));}});if(b.cookie){this._cookie(null,b.cookie);}},add:function(e,d,c){if(c===undefined){c=this.anchors.length;}var b=this,g=this.options,j=a(g.tabTemplate.replace(/#\{href\}/g,e).replace(/#\{label\}/g,d)),h=!e.indexOf("#")?e.replace("#",""):this._tabId(a("a",j)[0]);j.addClass("ui-state-default ui-corner-top").data("destroy.tabs",true);var f=a("#"+h);if(!f.length){f=a(g.panelTemplate).attr("id",h).data("destroy.tabs",true);}f.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide");if(c>=this.lis.length){j.appendTo(this.list);f.appendTo(this.list[0].parentNode);}else{j.insertBefore(this.lis[c]);f.insertBefore(this.panels[c]);}g.disabled=a.map(g.disabled,function(m,k){return m>=c?++m:m;});this._tabify();if(this.anchors.length==1){j.addClass("ui-tabs-selected ui-state-active");f.removeClass("ui-tabs-hide");this.element.queue("tabs",function(){b._trigger("show",null,b._ui(b.anchors[0],b.panels[0]));});this.load(0);}this._trigger("add",null,this._ui(this.anchors[c],this.panels[c]));},remove:function(b){var d=this.options,e=this.lis.eq(b).remove(),c=this.panels.eq(b).remove();if(e.hasClass("ui-tabs-selected")&&this.anchors.length>1){this.select(b+(b+1<this.anchors.length?1:-1));}d.disabled=a.map(a.grep(d.disabled,function(g,f){return g!=b;}),function(g,f){return g>=b?--g:g;});this._tabify();this._trigger("remove",null,this._ui(e.find("a")[0],c[0]));},enable:function(b){var c=this.options;if(a.inArray(b,c.disabled)==-1){return;}this.lis.eq(b).removeClass("ui-state-disabled");c.disabled=a.grep(c.disabled,function(e,d){return e!=b;});this._trigger("enable",null,this._ui(this.anchors[b],this.panels[b]));},disable:function(c){var b=this,d=this.options;if(c!=d.selected){this.lis.eq(c).addClass("ui-state-disabled");d.disabled.push(c);d.disabled.sort();this._trigger("disable",null,this._ui(this.anchors[c],this.panels[c]));}},select:function(b){if(typeof b=="string"){b=this.anchors.index(this.anchors.filter("[href$="+b+"]"));}else{if(b===null){b=-1;}}if(b==-1&&this.options.collapsible){b=this.options.selected;}this.anchors.eq(b).trigger(this.options.event+".tabs");},load:function(e){var c=this,g=this.options,b=this.anchors.eq(e)[0],d=a.data(b,"load.tabs");this.abort();if(!d||this.element.queue("tabs").length!==0&&a.data(b,"cache.tabs")){this.element.dequeue("tabs");return;}this.lis.eq(e).addClass("ui-state-processing");if(g.spinner){var f=a("span",b);f.data("label.tabs",f.html()).html(g.spinner);}this.xhr=a.ajax(a.extend({},g.ajaxOptions,{url:d,success:function(j,h){a(c._sanitizeSelector(b.hash)).html(j);c._cleanup();if(g.cache){a.data(b,"cache.tabs",true);}c._trigger("load",null,c._ui(c.anchors[e],c.panels[e]));try{g.ajaxOptions.success(j,h);}catch(k){}c.element.dequeue("tabs");}}));},abort:function(){this.element.queue([]);this.panels.stop(false,true);if(this.xhr){this.xhr.abort();delete this.xhr;}this._cleanup();},url:function(c,b){this.anchors.eq(c).removeData("cache.tabs").data("load.tabs",b);},length:function(){return this.anchors.length;}});a.extend(a.ui.tabs,{version:"1.7.1",getter:"length",defaults:{ajaxOptions:null,cache:false,cookie:null,collapsible:false,disabled:[],event:"click",fx:null,idPrefix:"ui-tabs-",panelTemplate:"<div></div>",spinner:"<em>Loading&#8230;</em>",tabTemplate:'<li><a href="#{href}"><span>#{label}</span></a></li>'}});a.extend(a.ui.tabs.prototype,{rotation:null,rotate:function(d,f){var b=this,g=this.options;var c=b._rotate||(b._rotate=function(h){clearTimeout(b.rotation);b.rotation=setTimeout(function(){var j=g.selected;b.select(++j<b.anchors.length?j:0);},d);if(h){h.stopPropagation();}});var e=b._unrotate||(b._unrotate=!f?function(h){if(h.clientX){b.rotate(null);}}:function(h){t=g.selected;c();});if(d){this.element.bind("tabsshow",c);this.anchors.bind(g.event+".tabs",e);c();}else{clearTimeout(b.rotation);this.element.unbind("tabsshow",c);this.anchors.unbind(g.event+".tabs",e);delete this._rotate;delete this._unrotate;}}});})(jQuery);(function($){$.extend($.ui,{datepicker:{version:"1.7.1"}});var PROP_NAME="datepicker";function Datepicker(){this.debug=false;this._curInst=null;this._keyEvent=false;this._disabledInputs=[];this._datepickerShowing=false;this._inDialog=false;this._mainDivId="ui-datepicker-div";this._inlineClass="ui-datepicker-inline";this._appendClass="ui-datepicker-append";this._triggerClass="ui-datepicker-trigger";this._dialogClass="ui-datepicker-dialog";this._disableClass="ui-datepicker-disabled";this._unselectableClass="ui-datepicker-unselectable";this._currentClass="ui-datepicker-current-day";this._dayOverClass="ui-datepicker-days-cell-over";this.regional=[];this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],dateFormat:"mm/dd/yy",firstDay:0,isRTL:false};this._defaults={showOn:"focus",showAnim:"show",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:false,hideIfNoPrevNext:false,navigationAsDateFormat:false,gotoCurrent:false,changeMonth:false,changeYear:false,showMonthAfterYear:false,yearRange:"-10:+10",showOtherMonths:false,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"normal",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:true,showButtonPanel:false};$.extend(this._defaults,this.regional[""]);this.dpDiv=$('<div id="'+this._mainDivId+'" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all ui-helper-hidden-accessible"></div>');}$.extend(Datepicker.prototype,{markerClassName:"hasDatepicker",log:function(){if(this.debug){console.log.apply("",arguments);}},setDefaults:function(settings){extendRemove(this._defaults,settings||{});return this;},_attachDatepicker:function(target,settings){var inlineSettings=null;for(var attrName in this._defaults){var attrValue=target.getAttribute("date:"+attrName);if(attrValue){inlineSettings=inlineSettings||{};try{inlineSettings[attrName]=eval(attrValue);}catch(err){inlineSettings[attrName]=attrValue;}}}var nodeName=target.nodeName.toLowerCase();var inline=(nodeName=="div"||nodeName=="span");if(!target.id){target.id="dp"+(++this.uuid);}var inst=this._newInst($(target),inline);inst.settings=$.extend({},settings||{},inlineSettings||{});if(nodeName=="input"){this._connectDatepicker(target,inst);}else{if(inline){this._inlineDatepicker(target,inst);}}},_newInst:function(target,inline){var id=target[0].id.replace(/([:\[\]\.])/g,"\\\\$1");return{id:id,input:target,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:inline,dpDiv:(!inline?this.dpDiv:$('<div class="'+this._inlineClass+' ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>'))};},_connectDatepicker:function(target,inst){var input=$(target);inst.trigger=$([]);if(input.hasClass(this.markerClassName)){return;}var appendText=this._get(inst,"appendText");var isRTL=this._get(inst,"isRTL");if(appendText){input[isRTL?"before":"after"]('<span class="'+this._appendClass+'">'+appendText+"</span>");}var showOn=this._get(inst,"showOn");if(showOn=="focus"||showOn=="both"){input.focus(this._showDatepicker);}if(showOn=="button"||showOn=="both"){var buttonText=this._get(inst,"buttonText");var buttonImage=this._get(inst,"buttonImage");inst.trigger=$(this._get(inst,"buttonImageOnly")?$("<img/>").addClass(this._triggerClass).attr({src:buttonImage,alt:buttonText,title:buttonText}):$('<button type="button"></button>').addClass(this._triggerClass).html(buttonImage==""?buttonText:$("<img/>").attr({src:buttonImage,alt:buttonText,title:buttonText})));input[isRTL?"before":"after"](inst.trigger);inst.trigger.click(function(){if($.datepicker._datepickerShowing&&$.datepicker._lastInput==target){$.datepicker._hideDatepicker();}else{$.datepicker._showDatepicker(target);}return false;});}input.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).bind("setData.datepicker",function(event,key,value){inst.settings[key]=value;}).bind("getData.datepicker",function(event,key){return this._get(inst,key);});$.data(target,PROP_NAME,inst);},_inlineDatepicker:function(target,inst){var divSpan=$(target);if(divSpan.hasClass(this.markerClassName)){return;}divSpan.addClass(this.markerClassName).append(inst.dpDiv).bind("setData.datepicker",function(event,key,value){inst.settings[key]=value;}).bind("getData.datepicker",function(event,key){return this._get(inst,key);});$.data(target,PROP_NAME,inst);this._setDate(inst,this._getDefaultDate(inst));this._updateDatepicker(inst);this._updateAlternate(inst);},_dialogDatepicker:function(input,dateText,onSelect,settings,pos){var inst=this._dialogInst;if(!inst){var id="dp"+(++this.uuid);this._dialogInput=$('<input type="text" id="'+id+'" size="1" style="position: absolute; top: -100px;"/>');this._dialogInput.keydown(this._doKeyDown);$("body").append(this._dialogInput);inst=this._dialogInst=this._newInst(this._dialogInput,false);inst.settings={};$.data(this._dialogInput[0],PROP_NAME,inst);}extendRemove(inst.settings,settings||{});this._dialogInput.val(dateText);this._pos=(pos?(pos.length?pos:[pos.pageX,pos.pageY]):null);if(!this._pos){var browserWidth=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;var browserHeight=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;var scrollX=document.documentElement.scrollLeft||document.body.scrollLeft;var scrollY=document.documentElement.scrollTop||document.body.scrollTop;this._pos=[(browserWidth/2)-100+scrollX,(browserHeight/2)-150+scrollY];}this._dialogInput.css("left",this._pos[0]+"px").css("top",this._pos[1]+"px");inst.settings.onSelect=onSelect;this._inDialog=true;this.dpDiv.addClass(this._dialogClass);this._showDatepicker(this._dialogInput[0]);if($.blockUI){$.blockUI(this.dpDiv);}$.data(this._dialogInput[0],PROP_NAME,inst);return this;},_destroyDatepicker:function(target){var $target=$(target);var inst=$.data(target,PROP_NAME);if(!$target.hasClass(this.markerClassName)){return;}var nodeName=target.nodeName.toLowerCase();$.removeData(target,PROP_NAME);if(nodeName=="input"){inst.trigger.remove();$target.siblings("."+this._appendClass).remove().end().removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress);}else{if(nodeName=="div"||nodeName=="span"){$target.removeClass(this.markerClassName).empty();}}},_enableDatepicker:function(target){var $target=$(target);var inst=$.data(target,PROP_NAME);if(!$target.hasClass(this.markerClassName)){return;}var nodeName=target.nodeName.toLowerCase();if(nodeName=="input"){target.disabled=false;inst.trigger.filter("button").each(function(){this.disabled=false;}).end().filter("img").css({opacity:"1.0",cursor:""});}else{if(nodeName=="div"||nodeName=="span"){var inline=$target.children("."+this._inlineClass);inline.children().removeClass("ui-state-disabled");}}this._disabledInputs=$.map(this._disabledInputs,function(value){return(value==target?null:value);});},_disableDatepicker:function(target){var $target=$(target);var inst=$.data(target,PROP_NAME);if(!$target.hasClass(this.markerClassName)){return;}var nodeName=target.nodeName.toLowerCase();if(nodeName=="input"){target.disabled=true;inst.trigger.filter("button").each(function(){this.disabled=true;}).end().filter("img").css({opacity:"0.5",cursor:"default"});}else{if(nodeName=="div"||nodeName=="span"){var inline=$target.children("."+this._inlineClass);inline.children().addClass("ui-state-disabled");}}this._disabledInputs=$.map(this._disabledInputs,function(value){return(value==target?null:value);});this._disabledInputs[this._disabledInputs.length]=target;},_isDisabledDatepicker:function(target){if(!target){return false;}for(var i=0;i<this._disabledInputs.length;i++){if(this._disabledInputs[i]==target){return true;}}return false;},_getInst:function(target){try{return $.data(target,PROP_NAME);}catch(err){throw"Missing instance data for this datepicker";}},_optionDatepicker:function(target,name,value){var settings=name||{};if(typeof name=="string"){settings={};settings[name]=value;}var inst=this._getInst(target);if(inst){if(this._curInst==inst){this._hideDatepicker(null);}extendRemove(inst.settings,settings);var date=new Date();extendRemove(inst,{rangeStart:null,endDay:null,endMonth:null,endYear:null,selectedDay:date.getDate(),selectedMonth:date.getMonth(),selectedYear:date.getFullYear(),currentDay:date.getDate(),currentMonth:date.getMonth(),currentYear:date.getFullYear(),drawMonth:date.getMonth(),drawYear:date.getFullYear()});this._updateDatepicker(inst);}},_changeDatepicker:function(target,name,value){this._optionDatepicker(target,name,value);},_refreshDatepicker:function(target){var inst=this._getInst(target);if(inst){this._updateDatepicker(inst);}},_setDateDatepicker:function(target,date,endDate){var inst=this._getInst(target);if(inst){this._setDate(inst,date,endDate);this._updateDatepicker(inst);this._updateAlternate(inst);}},_getDateDatepicker:function(target){var inst=this._getInst(target);if(inst&&!inst.inline){this._setDateFromField(inst);}return(inst?this._getDate(inst):null);},_doKeyDown:function(event){var inst=$.datepicker._getInst(event.target);var handled=true;var isRTL=inst.dpDiv.is(".ui-datepicker-rtl");inst._keyEvent=true;if($.datepicker._datepickerShowing){switch(event.keyCode){case 9:$.datepicker._hideDatepicker(null,"");break;case 13:var sel=$("td."+$.datepicker._dayOverClass+", td."+$.datepicker._currentClass,inst.dpDiv);if(sel[0]){$.datepicker._selectDay(event.target,inst.selectedMonth,inst.selectedYear,sel[0]);}else{$.datepicker._hideDatepicker(null,$.datepicker._get(inst,"duration"));}return false;break;case 27:$.datepicker._hideDatepicker(null,$.datepicker._get(inst,"duration"));break;case 33:$.datepicker._adjustDate(event.target,(event.ctrlKey?-$.datepicker._get(inst,"stepBigMonths"):-$.datepicker._get(inst,"stepMonths")),"M");break;case 34:$.datepicker._adjustDate(event.target,(event.ctrlKey?+$.datepicker._get(inst,"stepBigMonths"):+$.datepicker._get(inst,"stepMonths")),"M");break;case 35:if(event.ctrlKey||event.metaKey){$.datepicker._clearDate(event.target);}handled=event.ctrlKey||event.metaKey;break;case 36:if(event.ctrlKey||event.metaKey){$.datepicker._gotoToday(event.target);}handled=event.ctrlKey||event.metaKey;break;case 37:if(event.ctrlKey||event.metaKey){$.datepicker._adjustDate(event.target,(isRTL?+1:-1),"D");}handled=event.ctrlKey||event.metaKey;if(event.originalEvent.altKey){$.datepicker._adjustDate(event.target,(event.ctrlKey?-$.datepicker._get(inst,"stepBigMonths"):-$.datepicker._get(inst,"stepMonths")),"M");}break;case 38:if(event.ctrlKey||event.metaKey){$.datepicker._adjustDate(event.target,-7,"D");}handled=event.ctrlKey||event.metaKey;break;case 39:if(event.ctrlKey||event.metaKey){$.datepicker._adjustDate(event.target,(isRTL?-1:+1),"D");}handled=event.ctrlKey||event.metaKey;if(event.originalEvent.altKey){$.datepicker._adjustDate(event.target,(event.ctrlKey?+$.datepicker._get(inst,"stepBigMonths"):+$.datepicker._get(inst,"stepMonths")),"M");}break;case 40:if(event.ctrlKey||event.metaKey){$.datepicker._adjustDate(event.target,+7,"D");}handled=event.ctrlKey||event.metaKey;break;default:handled=false;}}else{if(event.keyCode==36&&event.ctrlKey){$.datepicker._showDatepicker(this);}else{handled=false;}}if(handled){event.preventDefault();event.stopPropagation();}},_doKeyPress:function(event){var inst=$.datepicker._getInst(event.target);if($.datepicker._get(inst,"constrainInput")){var chars=$.datepicker._possibleChars($.datepicker._get(inst,"dateFormat"));var chr=String.fromCharCode(event.charCode==undefined?event.keyCode:event.charCode);return event.ctrlKey||(chr<" "||!chars||chars.indexOf(chr)>-1);}},_showDatepicker:function(input){input=input.target||input;if(input.nodeName.toLowerCase()!="input"){input=$("input",input.parentNode)[0];}if($.datepicker._isDisabledDatepicker(input)||$.datepicker._lastInput==input){return;}var inst=$.datepicker._getInst(input);var beforeShow=$.datepicker._get(inst,"beforeShow");extendRemove(inst.settings,(beforeShow?beforeShow.apply(input,[input,inst]):{}));$.datepicker._hideDatepicker(null,"");$.datepicker._lastInput=input;$.datepicker._setDateFromField(inst);if($.datepicker._inDialog){input.value="";}if(!$.datepicker._pos){$.datepicker._pos=$.datepicker._findPos(input);$.datepicker._pos[1]+=input.offsetHeight;}var isFixed=false;$(input).parents().each(function(){isFixed|=$(this).css("position")=="fixed";return !isFixed;});if(isFixed&&$.browser.opera){$.datepicker._pos[0]-=document.documentElement.scrollLeft;$.datepicker._pos[1]-=document.documentElement.scrollTop;}var offset={left:$.datepicker._pos[0],top:$.datepicker._pos[1]};$.datepicker._pos=null;inst.rangeStart=null;inst.dpDiv.css({position:"absolute",display:"block",top:"-1000px"});$.datepicker._updateDatepicker(inst);offset=$.datepicker._checkOffset(inst,offset,isFixed);inst.dpDiv.css({position:($.datepicker._inDialog&&$.blockUI?"static":(isFixed?"fixed":"absolute")),display:"none",left:offset.left+"px",top:offset.top+"px"});if(!inst.inline){var showAnim=$.datepicker._get(inst,"showAnim")||"show";var duration=$.datepicker._get(inst,"duration");var postProcess=function(){$.datepicker._datepickerShowing=true;if($.browser.msie&&parseInt($.browser.version,10)<7){$("iframe.ui-datepicker-cover").css({width:inst.dpDiv.width()+4,height:inst.dpDiv.height()+4});}};if($.effects&&$.effects[showAnim]){inst.dpDiv.show(showAnim,$.datepicker._get(inst,"showOptions"),duration,postProcess);}else{inst.dpDiv[showAnim](duration,postProcess);}if(duration==""){postProcess();}if(inst.input[0].type!="hidden"){inst.input[0].focus();}$.datepicker._curInst=inst;}},_updateDatepicker:function(inst){var dims={width:inst.dpDiv.width()+4,height:inst.dpDiv.height()+4};var self=this;inst.dpDiv.empty().append(this._generateHTML(inst)).find("iframe.ui-datepicker-cover").css({width:dims.width,height:dims.height}).end().find("button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a").bind("mouseout",function(){$(this).removeClass("ui-state-hover");if(this.className.indexOf("ui-datepicker-prev")!=-1){$(this).removeClass("ui-datepicker-prev-hover");}if(this.className.indexOf("ui-datepicker-next")!=-1){$(this).removeClass("ui-datepicker-next-hover");}}).bind("mouseover",function(){if(!self._isDisabledDatepicker(inst.inline?inst.dpDiv.parent()[0]:inst.input[0])){$(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover");$(this).addClass("ui-state-hover");if(this.className.indexOf("ui-datepicker-prev")!=-1){$(this).addClass("ui-datepicker-prev-hover");}if(this.className.indexOf("ui-datepicker-next")!=-1){$(this).addClass("ui-datepicker-next-hover");}}}).end().find("."+this._dayOverClass+" a").trigger("mouseover").end();var numMonths=this._getNumberOfMonths(inst);var cols=numMonths[1];var width=17;if(cols>1){inst.dpDiv.addClass("ui-datepicker-multi-"+cols).css("width",(width*cols)+"em");}else{inst.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width("");}inst.dpDiv[(numMonths[0]!=1||numMonths[1]!=1?"add":"remove")+"Class"]("ui-datepicker-multi");inst.dpDiv[(this._get(inst,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl");if(inst.input&&inst.input[0].type!="hidden"&&inst==$.datepicker._curInst){$(inst.input[0]).focus();}},_checkOffset:function(inst,offset,isFixed){var dpWidth=inst.dpDiv.outerWidth();var dpHeight=inst.dpDiv.outerHeight();var inputWidth=inst.input?inst.input.outerWidth():0;var inputHeight=inst.input?inst.input.outerHeight():0;var viewWidth=(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)+$(document).scrollLeft();var viewHeight=(window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight)+$(document).scrollTop();offset.left-=(this._get(inst,"isRTL")?(dpWidth-inputWidth):0);offset.left-=(isFixed&&offset.left==inst.input.offset().left)?$(document).scrollLeft():0;offset.top-=(isFixed&&offset.top==(inst.input.offset().top+inputHeight))?$(document).scrollTop():0;offset.left-=(offset.left+dpWidth>viewWidth&&viewWidth>dpWidth)?Math.abs(offset.left+dpWidth-viewWidth):0;offset.top-=(offset.top+dpHeight>viewHeight&&viewHeight>dpHeight)?Math.abs(offset.top+dpHeight+inputHeight*2-viewHeight):0;return offset;},_findPos:function(obj){while(obj&&(obj.type=="hidden"||obj.nodeType!=1)){obj=obj.nextSibling;}var position=$(obj).offset();return[position.left,position.top];},_hideDatepicker:function(input,duration){var inst=this._curInst;if(!inst||(input&&inst!=$.data(input,PROP_NAME))){return;}if(inst.stayOpen){this._selectDate("#"+inst.id,this._formatDate(inst,inst.currentDay,inst.currentMonth,inst.currentYear));}inst.stayOpen=false;if(this._datepickerShowing){duration=(duration!=null?duration:this._get(inst,"duration"));var showAnim=this._get(inst,"showAnim");var postProcess=function(){$.datepicker._tidyDialog(inst);};if(duration!=""&&$.effects&&$.effects[showAnim]){inst.dpDiv.hide(showAnim,$.datepicker._get(inst,"showOptions"),duration,postProcess);}else{inst.dpDiv[(duration==""?"hide":(showAnim=="slideDown"?"slideUp":(showAnim=="fadeIn"?"fadeOut":"hide")))](duration,postProcess);}if(duration==""){this._tidyDialog(inst);}var onClose=this._get(inst,"onClose");if(onClose){onClose.apply((inst.input?inst.input[0]:null),[(inst.input?inst.input.val():""),inst]);}this._datepickerShowing=false;this._lastInput=null;if(this._inDialog){this._dialogInput.css({position:"absolute",left:"0",top:"-100px"});if($.blockUI){$.unblockUI();$("body").append(this.dpDiv);}}this._inDialog=false;}this._curInst=null;},_tidyDialog:function(inst){inst.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar");},_checkExternalClick:function(event){if(!$.datepicker._curInst){return;}var $target=$(event.target);if(($target.parents("#"+$.datepicker._mainDivId).length==0)&&!$target.hasClass($.datepicker.markerClassName)&&!$target.hasClass($.datepicker._triggerClass)&&$.datepicker._datepickerShowing&&!($.datepicker._inDialog&&$.blockUI)){$.datepicker._hideDatepicker(null,"");}},_adjustDate:function(id,offset,period){var target=$(id);var inst=this._getInst(target[0]);if(this._isDisabledDatepicker(target[0])){return;}this._adjustInstDate(inst,offset+(period=="M"?this._get(inst,"showCurrentAtPos"):0),period);this._updateDatepicker(inst);},_gotoToday:function(id){var target=$(id);var inst=this._getInst(target[0]);if(this._get(inst,"gotoCurrent")&&inst.currentDay){inst.selectedDay=inst.currentDay;inst.drawMonth=inst.selectedMonth=inst.currentMonth;inst.drawYear=inst.selectedYear=inst.currentYear;}else{var date=new Date();inst.selectedDay=date.getDate();inst.drawMonth=inst.selectedMonth=date.getMonth();inst.drawYear=inst.selectedYear=date.getFullYear();}this._notifyChange(inst);this._adjustDate(target);},_selectMonthYear:function(id,select,period){var target=$(id);var inst=this._getInst(target[0]);inst._selectingMonthYear=false;inst["selected"+(period=="M"?"Month":"Year")]=inst["draw"+(period=="M"?"Month":"Year")]=parseInt(select.options[select.selectedIndex].value,10);this._notifyChange(inst);this._adjustDate(target);},_clickMonthYear:function(id){var target=$(id);var inst=this._getInst(target[0]);if(inst.input&&inst._selectingMonthYear&&!$.browser.msie){inst.input[0].focus();}inst._selectingMonthYear=!inst._selectingMonthYear;},_selectDay:function(id,month,year,td){var target=$(id);if($(td).hasClass(this._unselectableClass)||this._isDisabledDatepicker(target[0])){return;}var inst=this._getInst(target[0]);inst.selectedDay=inst.currentDay=$("a",td).html();inst.selectedMonth=inst.currentMonth=month;inst.selectedYear=inst.currentYear=year;if(inst.stayOpen){inst.endDay=inst.endMonth=inst.endYear=null;}this._selectDate(id,this._formatDate(inst,inst.currentDay,inst.currentMonth,inst.currentYear));if(inst.stayOpen){inst.rangeStart=this._daylightSavingAdjust(new Date(inst.currentYear,inst.currentMonth,inst.currentDay));this._updateDatepicker(inst);}},_clearDate:function(id){var target=$(id);var inst=this._getInst(target[0]);inst.stayOpen=false;inst.endDay=inst.endMonth=inst.endYear=inst.rangeStart=null;this._selectDate(target,"");},_selectDate:function(id,dateStr){var target=$(id);var inst=this._getInst(target[0]);dateStr=(dateStr!=null?dateStr:this._formatDate(inst));if(inst.input){inst.input.val(dateStr);}this._updateAlternate(inst);var onSelect=this._get(inst,"onSelect");if(onSelect){onSelect.apply((inst.input?inst.input[0]:null),[dateStr,inst]);}else{if(inst.input){inst.input.trigger("change");}}if(inst.inline){this._updateDatepicker(inst);}else{if(!inst.stayOpen){this._hideDatepicker(null,this._get(inst,"duration"));this._lastInput=inst.input[0];if(typeof(inst.input[0])!="object"){inst.input[0].focus();}this._lastInput=null;}}},_updateAlternate:function(inst){var altField=this._get(inst,"altField");if(altField){var altFormat=this._get(inst,"altFormat")||this._get(inst,"dateFormat");var date=this._getDate(inst);dateStr=this.formatDate(altFormat,date,this._getFormatConfig(inst));$(altField).each(function(){$(this).val(dateStr);});}},noWeekends:function(date){var day=date.getDay();return[(day>0&&day<6),""];},iso8601Week:function(date){var checkDate=new Date(date.getFullYear(),date.getMonth(),date.getDate());var firstMon=new Date(checkDate.getFullYear(),1-1,4);var firstDay=firstMon.getDay()||7;firstMon.setDate(firstMon.getDate()+1-firstDay);if(firstDay<4&&checkDate<firstMon){checkDate.setDate(checkDate.getDate()-3);return $.datepicker.iso8601Week(checkDate);}else{if(checkDate>new Date(checkDate.getFullYear(),12-1,28)){firstDay=new Date(checkDate.getFullYear()+1,1-1,4).getDay()||7;if(firstDay>4&&(checkDate.getDay()||7)<firstDay-3){return 1;}}}return Math.floor(((checkDate-firstMon)/86400000)/7)+1;},parseDate:function(format,value,settings){if(format==null||value==null){throw"Invalid arguments";}value=(typeof value=="object"?value.toString():value+"");if(value==""){return null;}var shortYearCutoff=(settings?settings.shortYearCutoff:null)||this._defaults.shortYearCutoff;var dayNamesShort=(settings?settings.dayNamesShort:null)||this._defaults.dayNamesShort;var dayNames=(settings?settings.dayNames:null)||this._defaults.dayNames;var monthNamesShort=(settings?settings.monthNamesShort:null)||this._defaults.monthNamesShort;var monthNames=(settings?settings.monthNames:null)||this._defaults.monthNames;var year=-1;var month=-1;var day=-1;var doy=-1;var literal=false;var lookAhead=function(match){var matches=(iFormat+1<format.length&&format.charAt(iFormat+1)==match);if(matches){iFormat++;}return matches;};var getNumber=function(match){lookAhead(match);var origSize=(match=="@"?14:(match=="y"?4:(match=="o"?3:2)));var size=origSize;var num=0;while(size>0&&iValue<value.length&&value.charAt(iValue)>="0"&&value.charAt(iValue)<="9"){num=num*10+parseInt(value.charAt(iValue++),10);size--;}if(size==origSize){throw"Missing number at position "+iValue;}return num;};var getName=function(match,shortNames,longNames){var names=(lookAhead(match)?longNames:shortNames);var size=0;for(var j=0;j<names.length;j++){size=Math.max(size,names[j].length);}var name="";var iInit=iValue;while(size>0&&iValue<value.length){name+=value.charAt(iValue++);for(var i=0;i<names.length;i++){if(name==names[i]){return i+1;}}size--;}throw"Unknown name at position "+iInit;};var checkLiteral=function(){if(value.charAt(iValue)!=format.charAt(iFormat)){throw"Unexpected literal at position "+iValue;}iValue++;};var iValue=0;for(var iFormat=0;iFormat<format.length;iFormat++){if(literal){if(format.charAt(iFormat)=="'"&&!lookAhead("'")){literal=false;}else{checkLiteral();}}else{switch(format.charAt(iFormat)){case"d":day=getNumber("d");break;case"D":getName("D",dayNamesShort,dayNames);break;case"o":doy=getNumber("o");break;case"m":month=getNumber("m");break;case"M":month=getName("M",monthNamesShort,monthNames);break;case"y":year=getNumber("y");break;case"@":var date=new Date(getNumber("@"));year=date.getFullYear();month=date.getMonth()+1;day=date.getDate();break;case"'":if(lookAhead("'")){checkLiteral();}else{literal=true;}break;default:checkLiteral();}}}if(year==-1){year=new Date().getFullYear();}else{if(year<100){year+=new Date().getFullYear()-new Date().getFullYear()%100+(year<=shortYearCutoff?0:-100);}}if(doy>-1){month=1;day=doy;do{var dim=this._getDaysInMonth(year,month-1);if(day<=dim){break;}month++;day-=dim;}while(true);}var date=this._daylightSavingAdjust(new Date(year,month-1,day));if(date.getFullYear()!=year||date.getMonth()+1!=month||date.getDate()!=day){throw"Invalid date";}return date;},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TIMESTAMP:"@",W3C:"yy-mm-dd",formatDate:function(format,date,settings){if(!date){return"";}var dayNamesShort=(settings?settings.dayNamesShort:null)||this._defaults.dayNamesShort;var dayNames=(settings?settings.dayNames:null)||this._defaults.dayNames;var monthNamesShort=(settings?settings.monthNamesShort:null)||this._defaults.monthNamesShort;var monthNames=(settings?settings.monthNames:null)||this._defaults.monthNames;var lookAhead=function(match){var matches=(iFormat+1<format.length&&format.charAt(iFormat+1)==match);if(matches){iFormat++;}return matches;};var formatNumber=function(match,value,len){var num=""+value;if(lookAhead(match)){while(num.length<len){num="0"+num;}}return num;};var formatName=function(match,value,shortNames,longNames){return(lookAhead(match)?longNames[value]:shortNames[value]);};var output="";var literal=false;if(date){for(var iFormat=0;iFormat<format.length;iFormat++){if(literal){if(format.charAt(iFormat)=="'"&&!lookAhead("'")){literal=false;}else{output+=format.charAt(iFormat);}}else{switch(format.charAt(iFormat)){case"d":output+=formatNumber("d",date.getDate(),2);break;case"D":output+=formatName("D",date.getDay(),dayNamesShort,dayNames);break;case"o":var doy=date.getDate();for(var m=date.getMonth()-1;m>=0;m--){doy+=this._getDaysInMonth(date.getFullYear(),m);}output+=formatNumber("o",doy,3);break;case"m":output+=formatNumber("m",date.getMonth()+1,2);break;case"M":output+=formatName("M",date.getMonth(),monthNamesShort,monthNames);break;case"y":output+=(lookAhead("y")?date.getFullYear():(date.getYear()%100<10?"0":"")+date.getYear()%100);break;case"@":output+=date.getTime();break;case"'":if(lookAhead("'")){output+="'";}else{literal=true;}break;default:output+=format.charAt(iFormat);}}}}return output;},_possibleChars:function(format){var chars="";var literal=false;for(var iFormat=0;iFormat<format.length;iFormat++){if(literal){if(format.charAt(iFormat)=="'"&&!lookAhead("'")){literal=false;}else{chars+=format.charAt(iFormat);}}else{switch(format.charAt(iFormat)){case"d":case"m":case"y":case"@":chars+="0123456789";break;case"D":case"M":return null;case"'":if(lookAhead("'")){chars+="'";}else{literal=true;}break;default:chars+=format.charAt(iFormat);}}}return chars;},_get:function(inst,name){return inst.settings[name]!==undefined?inst.settings[name]:this._defaults[name];},_setDateFromField:function(inst){var dateFormat=this._get(inst,"dateFormat");var dates=inst.input?inst.input.val():null;inst.endDay=inst.endMonth=inst.endYear=null;var date=defaultDate=this._getDefaultDate(inst);var settings=this._getFormatConfig(inst);try{date=this.parseDate(dateFormat,dates,settings)||defaultDate;}catch(event){this.log(event);date=defaultDate;}inst.selectedDay=date.getDate();inst.drawMonth=inst.selectedMonth=date.getMonth();inst.drawYear=inst.selectedYear=date.getFullYear();inst.currentDay=(dates?date.getDate():0);inst.currentMonth=(dates?date.getMonth():0);inst.currentYear=(dates?date.getFullYear():0);this._adjustInstDate(inst);},_getDefaultDate:function(inst){var date=this._determineDate(this._get(inst,"defaultDate"),new Date());var minDate=this._getMinMaxDate(inst,"min",true);var maxDate=this._getMinMaxDate(inst,"max");date=(minDate&&date<minDate?minDate:date);date=(maxDate&&date>maxDate?maxDate:date);return date;},_determineDate:function(date,defaultDate){var offsetNumeric=function(offset){var date=new Date();date.setDate(date.getDate()+offset);return date;};var offsetString=function(offset,getDaysInMonth){var date=new Date();var year=date.getFullYear();var month=date.getMonth();var day=date.getDate();var pattern=/([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g;var matches=pattern.exec(offset);while(matches){switch(matches[2]||"d"){case"d":case"D":day+=parseInt(matches[1],10);break;case"w":case"W":day+=parseInt(matches[1],10)*7;break;case"m":case"M":month+=parseInt(matches[1],10);day=Math.min(day,getDaysInMonth(year,month));break;case"y":case"Y":year+=parseInt(matches[1],10);day=Math.min(day,getDaysInMonth(year,month));break;}matches=pattern.exec(offset);}return new Date(year,month,day);};date=(date==null?defaultDate:(typeof date=="string"?offsetString(date,this._getDaysInMonth):(typeof date=="number"?(isNaN(date)?defaultDate:offsetNumeric(date)):date)));date=(date&&date.toString()=="Invalid Date"?defaultDate:date);if(date){date.setHours(0);date.setMinutes(0);date.setSeconds(0);date.setMilliseconds(0);}return this._daylightSavingAdjust(date);},_daylightSavingAdjust:function(date){if(!date){return null;}date.setHours(date.getHours()>12?date.getHours()+2:0);return date;},_setDate:function(inst,date,endDate){var clear=!(date);var origMonth=inst.selectedMonth;var origYear=inst.selectedYear;date=this._determineDate(date,new Date());inst.selectedDay=inst.currentDay=date.getDate();inst.drawMonth=inst.selectedMonth=inst.currentMonth=date.getMonth();inst.drawYear=inst.selectedYear=inst.currentYear=date.getFullYear();if(origMonth!=inst.selectedMonth||origYear!=inst.selectedYear){this._notifyChange(inst);}this._adjustInstDate(inst);if(inst.input){inst.input.val(clear?"":this._formatDate(inst));}},_getDate:function(inst){var startDate=(!inst.currentYear||(inst.input&&inst.input.val()=="")?null:this._daylightSavingAdjust(new Date(inst.currentYear,inst.currentMonth,inst.currentDay)));return startDate;},_generateHTML:function(inst){var today=new Date();today=this._daylightSavingAdjust(new Date(today.getFullYear(),today.getMonth(),today.getDate()));var isRTL=this._get(inst,"isRTL");var showButtonPanel=this._get(inst,"showButtonPanel");var hideIfNoPrevNext=this._get(inst,"hideIfNoPrevNext");var navigationAsDateFormat=this._get(inst,"navigationAsDateFormat");var numMonths=this._getNumberOfMonths(inst);var showCurrentAtPos=this._get(inst,"showCurrentAtPos");var stepMonths=this._get(inst,"stepMonths");var stepBigMonths=this._get(inst,"stepBigMonths");var isMultiMonth=(numMonths[0]!=1||numMonths[1]!=1);var currentDate=this._daylightSavingAdjust((!inst.currentDay?new Date(9999,9,9):new Date(inst.currentYear,inst.currentMonth,inst.currentDay)));var minDate=this._getMinMaxDate(inst,"min",true);var maxDate=this._getMinMaxDate(inst,"max");var drawMonth=inst.drawMonth-showCurrentAtPos;var drawYear=inst.drawYear;if(drawMonth<0){drawMonth+=12;drawYear--;}if(maxDate){var maxDraw=this._daylightSavingAdjust(new Date(maxDate.getFullYear(),maxDate.getMonth()-numMonths[1]+1,maxDate.getDate()));maxDraw=(minDate&&maxDraw<minDate?minDate:maxDraw);while(this._daylightSavingAdjust(new Date(drawYear,drawMonth,1))>maxDraw){drawMonth--;if(drawMonth<0){drawMonth=11;drawYear--;}}}inst.drawMonth=drawMonth;inst.drawYear=drawYear;var prevText=this._get(inst,"prevText");prevText=(!navigationAsDateFormat?prevText:this.formatDate(prevText,this._daylightSavingAdjust(new Date(drawYear,drawMonth-stepMonths,1)),this._getFormatConfig(inst)));var prev=(this._canAdjustMonth(inst,-1,drawYear,drawMonth)?'<a class="ui-datepicker-prev ui-corner-all" onclick="DP_jQuery.datepicker._adjustDate(\'#'+inst.id+"', -"+stepMonths+", 'M');\" title=\""+prevText+'"><span class="ui-icon ui-icon-circle-triangle-'+(isRTL?"e":"w")+'">'+prevText+"</span></a>":(hideIfNoPrevNext?"":'<a class="ui-datepicker-prev ui-corner-all ui-state-disabled" title="'+prevText+'"><span class="ui-icon ui-icon-circle-triangle-'+(isRTL?"e":"w")+'">'+prevText+"</span></a>"));var nextText=this._get(inst,"nextText");nextText=(!navigationAsDateFormat?nextText:this.formatDate(nextText,this._daylightSavingAdjust(new Date(drawYear,drawMonth+stepMonths,1)),this._getFormatConfig(inst)));var next=(this._canAdjustMonth(inst,+1,drawYear,drawMonth)?'<a class="ui-datepicker-next ui-corner-all" onclick="DP_jQuery.datepicker._adjustDate(\'#'+inst.id+"', +"+stepMonths+", 'M');\" title=\""+nextText+'"><span class="ui-icon ui-icon-circle-triangle-'+(isRTL?"w":"e")+'">'+nextText+"</span></a>":(hideIfNoPrevNext?"":'<a class="ui-datepicker-next ui-corner-all ui-state-disabled" title="'+nextText+'"><span class="ui-icon ui-icon-circle-triangle-'+(isRTL?"w":"e")+'">'+nextText+"</span></a>"));var currentText=this._get(inst,"currentText");var gotoDate=(this._get(inst,"gotoCurrent")&&inst.currentDay?currentDate:today);currentText=(!navigationAsDateFormat?currentText:this.formatDate(currentText,gotoDate,this._getFormatConfig(inst)));var controls=(!inst.inline?'<button type="button" class="ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all" onclick="DP_jQuery.datepicker._hideDatepicker();">'+this._get(inst,"closeText")+"</button>":"");var buttonPanel=(showButtonPanel)?'<div class="ui-datepicker-buttonpane ui-widget-content">'+(isRTL?controls:"")+(this._isInRange(inst,gotoDate)?'<button type="button" class="ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all" onclick="DP_jQuery.datepicker._gotoToday(\'#'+inst.id+"');\">"+currentText+"</button>":"")+(isRTL?"":controls)+"</div>":"";var firstDay=parseInt(this._get(inst,"firstDay"),10);firstDay=(isNaN(firstDay)?0:firstDay);var dayNames=this._get(inst,"dayNames");var dayNamesShort=this._get(inst,"dayNamesShort");var dayNamesMin=this._get(inst,"dayNamesMin");var monthNames=this._get(inst,"monthNames");var monthNamesShort=this._get(inst,"monthNamesShort");var beforeShowDay=this._get(inst,"beforeShowDay");var showOtherMonths=this._get(inst,"showOtherMonths");var calculateWeek=this._get(inst,"calculateWeek")||this.iso8601Week;var endDate=inst.endDay?this._daylightSavingAdjust(new Date(inst.endYear,inst.endMonth,inst.endDay)):currentDate;var defaultDate=this._getDefaultDate(inst);var html="";for(var row=0;row<numMonths[0];row++){var group="";for(var col=0;col<numMonths[1];col++){var selectedDate=this._daylightSavingAdjust(new Date(drawYear,drawMonth,inst.selectedDay));var cornerClass=" ui-corner-all";var calender="";if(isMultiMonth){calender+='<div class="ui-datepicker-group ui-datepicker-group-';switch(col){case 0:calender+="first";cornerClass=" ui-corner-"+(isRTL?"right":"left");break;case numMonths[1]-1:calender+="last";cornerClass=" ui-corner-"+(isRTL?"left":"right");break;default:calender+="middle";cornerClass="";break;}calender+='">';}calender+='<div class="ui-datepicker-header ui-widget-header ui-helper-clearfix'+cornerClass+'">'+(/all|left/.test(cornerClass)&&row==0?(isRTL?next:prev):"")+(/all|right/.test(cornerClass)&&row==0?(isRTL?prev:next):"")+this._generateMonthYearHeader(inst,drawMonth,drawYear,minDate,maxDate,selectedDate,row>0||col>0,monthNames,monthNamesShort)+'</div><table class="ui-datepicker-calendar"><thead><tr>';var thead="";for(var dow=0;dow<7;dow++){var day=(dow+firstDay)%7;thead+="<th"+((dow+firstDay+6)%7>=5?' class="ui-datepicker-week-end"':"")+'><span title="'+dayNames[day]+'">'+dayNamesMin[day]+"</span></th>";}calender+=thead+"</tr></thead><tbody>";var daysInMonth=this._getDaysInMonth(drawYear,drawMonth);if(drawYear==inst.selectedYear&&drawMonth==inst.selectedMonth){inst.selectedDay=Math.min(inst.selectedDay,daysInMonth);}var leadDays=(this._getFirstDayOfMonth(drawYear,drawMonth)-firstDay+7)%7;var numRows=(isMultiMonth?6:Math.ceil((leadDays+daysInMonth)/7));var printDate=this._daylightSavingAdjust(new Date(drawYear,drawMonth,1-leadDays));for(var dRow=0;dRow<numRows;dRow++){calender+="<tr>";var tbody="";for(var dow=0;dow<7;dow++){var daySettings=(beforeShowDay?beforeShowDay.apply((inst.input?inst.input[0]:null),[printDate]):[true,""]);var otherMonth=(printDate.getMonth()!=drawMonth);var unselectable=otherMonth||!daySettings[0]||(minDate&&printDate<minDate)||(maxDate&&printDate>maxDate);tbody+='<td class="'+((dow+firstDay+6)%7>=5?" ui-datepicker-week-end":"")+(otherMonth?" ui-datepicker-other-month":"")+((printDate.getTime()==selectedDate.getTime()&&drawMonth==inst.selectedMonth&&inst._keyEvent)||(defaultDate.getTime()==printDate.getTime()&&defaultDate.getTime()==selectedDate.getTime())?" "+this._dayOverClass:"")+(unselectable?" "+this._unselectableClass+" ui-state-disabled":"")+(otherMonth&&!showOtherMonths?"":" "+daySettings[1]+(printDate.getTime()>=currentDate.getTime()&&printDate.getTime()<=endDate.getTime()?" "+this._currentClass:"")+(printDate.getTime()==today.getTime()?" ui-datepicker-today":""))+'"'+((!otherMonth||showOtherMonths)&&daySettings[2]?' title="'+daySettings[2]+'"':"")+(unselectable?"":" onclick=\"DP_jQuery.datepicker._selectDay('#"+inst.id+"',"+drawMonth+","+drawYear+', this);return false;"')+">"+(otherMonth?(showOtherMonths?printDate.getDate():"&#xa0;"):(unselectable?'<span class="ui-state-default">'+printDate.getDate()+"</span>":'<a class="ui-state-default'+(printDate.getTime()==today.getTime()?" ui-state-highlight":"")+(printDate.getTime()>=currentDate.getTime()&&printDate.getTime()<=endDate.getTime()?" ui-state-active":"")+'" href="#">'+printDate.getDate()+"</a>"))+"</td>";printDate.setDate(printDate.getDate()+1);printDate=this._daylightSavingAdjust(printDate);}calender+=tbody+"</tr>";}drawMonth++;if(drawMonth>11){drawMonth=0;drawYear++;}calender+="</tbody></table>"+(isMultiMonth?"</div>"+((numMonths[0]>0&&col==numMonths[1]-1)?'<div class="ui-datepicker-row-break"></div>':""):"");group+=calender;}html+=group;}html+=buttonPanel+($.browser.msie&&parseInt($.browser.version,10)<7&&!inst.inline?'<iframe src="javascript:false;" class="ui-datepicker-cover" frameborder="0"></iframe>':"");inst._keyEvent=false;return html;},_generateMonthYearHeader:function(inst,drawMonth,drawYear,minDate,maxDate,selectedDate,secondary,monthNames,monthNamesShort){minDate=(inst.rangeStart&&minDate&&selectedDate<minDate?selectedDate:minDate);var changeMonth=this._get(inst,"changeMonth");var changeYear=this._get(inst,"changeYear");var showMonthAfterYear=this._get(inst,"showMonthAfterYear");var html='<div class="ui-datepicker-title">';var monthHtml="";if(secondary||!changeMonth){monthHtml+='<span class="ui-datepicker-month">'+monthNames[drawMonth]+"</span> ";}else{var inMinYear=(minDate&&minDate.getFullYear()==drawYear);var inMaxYear=(maxDate&&maxDate.getFullYear()==drawYear);monthHtml+='<select class="ui-datepicker-month" onchange="DP_jQuery.datepicker._selectMonthYear(\'#'+inst.id+"', this, 'M');\" onclick=\"DP_jQuery.datepicker._clickMonthYear('#"+inst.id+"');\">";for(var month=0;month<12;month++){if((!inMinYear||month>=minDate.getMonth())&&(!inMaxYear||month<=maxDate.getMonth())){monthHtml+='<option value="'+month+'"'+(month==drawMonth?' selected="selected"':"")+">"+monthNamesShort[month]+"</option>";}}monthHtml+="</select>";}if(!showMonthAfterYear){html+=monthHtml+((secondary||changeMonth||changeYear)&&(!(changeMonth&&changeYear))?"&#xa0;":"");}if(secondary||!changeYear){html+='<span class="ui-datepicker-year">'+drawYear+"</span>";}else{var years=this._get(inst,"yearRange").split(":");var year=0;var endYear=0;if(years.length!=2){year=drawYear-10;endYear=drawYear+10;}else{if(years[0].charAt(0)=="+"||years[0].charAt(0)=="-"){year=drawYear+parseInt(years[0],10);endYear=drawYear+parseInt(years[1],10);}else{year=parseInt(years[0],10);endYear=parseInt(years[1],10);}}year=(minDate?Math.max(year,minDate.getFullYear()):year);endYear=(maxDate?Math.min(endYear,maxDate.getFullYear()):endYear);html+='<select class="ui-datepicker-year" onchange="DP_jQuery.datepicker._selectMonthYear(\'#'+inst.id+"', this, 'Y');\" onclick=\"DP_jQuery.datepicker._clickMonthYear('#"+inst.id+"');\">";for(;year<=endYear;year++){html+='<option value="'+year+'"'+(year==drawYear?' selected="selected"':"")+">"+year+"</option>";}html+="</select>";}if(showMonthAfterYear){html+=(secondary||changeMonth||changeYear?"&#xa0;":"")+monthHtml;}html+="</div>";return html;},_adjustInstDate:function(inst,offset,period){var year=inst.drawYear+(period=="Y"?offset:0);var month=inst.drawMonth+(period=="M"?offset:0);var day=Math.min(inst.selectedDay,this._getDaysInMonth(year,month))+(period=="D"?offset:0);var date=this._daylightSavingAdjust(new Date(year,month,day));var minDate=this._getMinMaxDate(inst,"min",true);var maxDate=this._getMinMaxDate(inst,"max");date=(minDate&&date<minDate?minDate:date);date=(maxDate&&date>maxDate?maxDate:date);inst.selectedDay=date.getDate();inst.drawMonth=inst.selectedMonth=date.getMonth();inst.drawYear=inst.selectedYear=date.getFullYear();if(period=="M"||period=="Y"){this._notifyChange(inst);}},_notifyChange:function(inst){var onChange=this._get(inst,"onChangeMonthYear");if(onChange){onChange.apply((inst.input?inst.input[0]:null),[inst.selectedYear,inst.selectedMonth+1,inst]);}},_getNumberOfMonths:function(inst){var numMonths=this._get(inst,"numberOfMonths");return(numMonths==null?[1,1]:(typeof numMonths=="number"?[1,numMonths]:numMonths));},_getMinMaxDate:function(inst,minMax,checkRange){var date=this._determineDate(this._get(inst,minMax+"Date"),null);return(!checkRange||!inst.rangeStart?date:(!date||inst.rangeStart>date?inst.rangeStart:date));},_getDaysInMonth:function(year,month){return 32-new Date(year,month,32).getDate();},_getFirstDayOfMonth:function(year,month){return new Date(year,month,1).getDay();},_canAdjustMonth:function(inst,offset,curYear,curMonth){var numMonths=this._getNumberOfMonths(inst);var date=this._daylightSavingAdjust(new Date(curYear,curMonth+(offset<0?offset:numMonths[1]),1));if(offset<0){date.setDate(this._getDaysInMonth(date.getFullYear(),date.getMonth()));}return this._isInRange(inst,date);},_isInRange:function(inst,date){var newMinDate=(!inst.rangeStart?null:this._daylightSavingAdjust(new Date(inst.selectedYear,inst.selectedMonth,inst.selectedDay)));newMinDate=(newMinDate&&inst.rangeStart<newMinDate?inst.rangeStart:newMinDate);var minDate=newMinDate||this._getMinMaxDate(inst,"min");var maxDate=this._getMinMaxDate(inst,"max");return((!minDate||date>=minDate)&&(!maxDate||date<=maxDate));},_getFormatConfig:function(inst){var shortYearCutoff=this._get(inst,"shortYearCutoff");shortYearCutoff=(typeof shortYearCutoff!="string"?shortYearCutoff:new Date().getFullYear()%100+parseInt(shortYearCutoff,10));return{shortYearCutoff:shortYearCutoff,dayNamesShort:this._get(inst,"dayNamesShort"),dayNames:this._get(inst,"dayNames"),monthNamesShort:this._get(inst,"monthNamesShort"),monthNames:this._get(inst,"monthNames")};},_formatDate:function(inst,day,month,year){if(!day){inst.currentDay=inst.selectedDay;inst.currentMonth=inst.selectedMonth;inst.currentYear=inst.selectedYear;}var date=(day?(typeof day=="object"?day:this._daylightSavingAdjust(new Date(year,month,day))):this._daylightSavingAdjust(new Date(inst.currentYear,inst.currentMonth,inst.currentDay)));return this.formatDate(this._get(inst,"dateFormat"),date,this._getFormatConfig(inst));}});function extendRemove(target,props){$.extend(target,props);for(var name in props){if(props[name]==null||props[name]==undefined){target[name]=props[name];}}return target;}function isArray(a){return(a&&(($.browser.safari&&typeof a=="object"&&a.length)||(a.constructor&&a.constructor.toString().match(/\Array\(\)/))));}$.fn.datepicker=function(options){if(!$.datepicker.initialized){$(document).mousedown($.datepicker._checkExternalClick).find("body").append($.datepicker.dpDiv);$.datepicker.initialized=true;}var otherArgs=Array.prototype.slice.call(arguments,1);if(typeof options=="string"&&(options=="isDisabled"||options=="getDate")){return $.datepicker["_"+options+"Datepicker"].apply($.datepicker,[this[0]].concat(otherArgs));}return this.each(function(){typeof options=="string"?$.datepicker["_"+options+"Datepicker"].apply($.datepicker,[this].concat(otherArgs)):$.datepicker._attachDatepicker(this,options);});};$.datepicker=new Datepicker();$.datepicker.initialized=false;$.datepicker.uuid=new Date().getTime();$.datepicker.version="1.7.1";window.DP_jQuery=$;})(jQuery);(function(a){a.widget("ui.progressbar",{_init:function(){this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this._valueMin(),"aria-valuemax":this._valueMax(),"aria-valuenow":this._value()});this.valueDiv=a('<div class="ui-progressbar-value ui-widget-header ui-corner-left"></div>').appendTo(this.element);this._refreshValue();},destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow").removeData("progressbar").unbind(".progressbar");this.valueDiv.remove();a.widget.prototype.destroy.apply(this,arguments);},value:function(b){arguments.length&&this._setData("value",b);return this._value();},_setData:function(b,c){switch(b){case"value":this.options.value=c;this._refreshValue();this._trigger("change",null,{});break;}a.widget.prototype._setData.apply(this,arguments);},_value:function(){var b=this.options.value;if(b<this._valueMin()){b=this._valueMin();}if(b>this._valueMax()){b=this._valueMax();}return b;},_valueMin:function(){var b=0;return b;},_valueMax:function(){var b=100;return b;},_refreshValue:function(){var b=this.value();this.valueDiv[b==this._valueMax()?"addClass":"removeClass"]("ui-corner-right");this.valueDiv.width(b+"%");this.element.attr("aria-valuenow",b);}});a.extend(a.ui.progressbar,{version:"1.7.1",defaults:{value:0}});})(jQuery);jQuery.effects||(function(d){d.effects={version:"1.7.1",save:function(g,h){for(var f=0;f<h.length;f++){if(h[f]!==null){g.data("ec.storage."+h[f],g[0].style[h[f]]);}}},restore:function(g,h){for(var f=0;f<h.length;f++){if(h[f]!==null){g.css(h[f],g.data("ec.storage."+h[f]));}}},setMode:function(f,g){if(g=="toggle"){g=f.is(":hidden")?"show":"hide";}return g;},getBaseline:function(g,h){var j,f;switch(g[0]){case"top":j=0;break;case"middle":j=0.5;break;case"bottom":j=1;break;default:j=g[0]/h.height;}switch(g[1]){case"left":f=0;break;case"center":f=0.5;break;case"right":f=1;break;default:f=g[1]/h.width;}return{x:f,y:j};},createWrapper:function(f){if(f.parent().is(".ui-effects-wrapper")){return f.parent();}var g={width:f.outerWidth(true),height:f.outerHeight(true),"float":f.css("float")};f.wrap('<div class="ui-effects-wrapper" style="font-size:100%;background:transparent;border:none;margin:0;padding:0"></div>');var k=f.parent();if(f.css("position")=="static"){k.css({position:"relative"});f.css({position:"relative"});}else{var j=f.css("top");if(isNaN(parseInt(j,10))){j="auto";}var h=f.css("left");if(isNaN(parseInt(h,10))){h="auto";}k.css({position:f.css("position"),top:j,left:h,zIndex:f.css("z-index")}).show();f.css({position:"relative",top:0,left:0});}k.css(g);return k;},removeWrapper:function(f){if(f.parent().is(".ui-effects-wrapper")){return f.parent().replaceWith(f);}return f;},setTransition:function(g,j,f,h){h=h||{};d.each(j,function(m,k){unit=g.cssUnit(k);if(unit[0]>0){h[k]=unit[0]*f+unit[1];}});return h;},animateClass:function(h,j,m,k){var f=(typeof m=="function"?m:(k?k:null));var g=(typeof m=="string"?m:null);return this.each(function(){var s={};var q=d(this);var r=q.attr("style")||"";if(typeof r=="object"){r=r.cssText;}if(h.toggle){q.hasClass(h.toggle)?h.remove=h.toggle:h.add=h.toggle;}var o=d.extend({},(document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle));if(h.add){q.addClass(h.add);}if(h.remove){q.removeClass(h.remove);}var p=d.extend({},(document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle));if(h.add){q.removeClass(h.add);}if(h.remove){q.addClass(h.remove);}for(var u in p){if(typeof p[u]!="function"&&p[u]&&u.indexOf("Moz")==-1&&u.indexOf("length")==-1&&p[u]!=o[u]&&(u.match(/color/i)||(!u.match(/color/i)&&!isNaN(parseInt(p[u],10))))&&(o.position!="static"||(o.position=="static"&&!u.match(/left|top|bottom|right/)))){s[u]=p[u];}}q.animate(s,j,g,function(){if(typeof d(this).attr("style")=="object"){d(this).attr("style")["cssText"]="";d(this).attr("style")["cssText"]=r;}else{d(this).attr("style",r);}if(h.add){d(this).addClass(h.add);}if(h.remove){d(this).removeClass(h.remove);}if(f){f.apply(this,arguments);}});});}};function c(g,f){var j=g[1]&&g[1].constructor==Object?g[1]:{};if(f){j.mode=f;}var h=g[1]&&g[1].constructor!=Object?g[1]:(j.duration?j.duration:g[2]);h=d.fx.off?0:typeof h==="number"?h:d.fx.speeds[h]||d.fx.speeds._default;var k=j.callback||(d.isFunction(g[1])&&g[1])||(d.isFunction(g[2])&&g[2])||(d.isFunction(g[3])&&g[3]);return[g[0],j,h,k];}d.fn.extend({_show:d.fn.show,_hide:d.fn.hide,__toggle:d.fn.toggle,_addClass:d.fn.addClass,_removeClass:d.fn.removeClass,_toggleClass:d.fn.toggleClass,effect:function(g,f,h,j){return d.effects[g]?d.effects[g].call(this,{method:g,options:f||{},duration:h,callback:j}):null;},show:function(){if(!arguments[0]||(arguments[0].constructor==Number||(/(slow|normal|fast)/).test(arguments[0]))){return this._show.apply(this,arguments);}else{return this.effect.apply(this,c(arguments,"show"));}},hide:function(){if(!arguments[0]||(arguments[0].constructor==Number||(/(slow|normal|fast)/).test(arguments[0]))){return this._hide.apply(this,arguments);}else{return this.effect.apply(this,c(arguments,"hide"));}},toggle:function(){if(!arguments[0]||(arguments[0].constructor==Number||(/(slow|normal|fast)/).test(arguments[0]))||(arguments[0].constructor==Function)){return this.__toggle.apply(this,arguments);}else{return this.effect.apply(this,c(arguments,"toggle"));}},addClass:function(g,f,j,h){return f?d.effects.animateClass.apply(this,[{add:g},f,j,h]):this._addClass(g);},removeClass:function(g,f,j,h){return f?d.effects.animateClass.apply(this,[{remove:g},f,j,h]):this._removeClass(g);},toggleClass:function(g,f,j,h){return((typeof f!=="boolean")&&f)?d.effects.animateClass.apply(this,[{toggle:g},f,j,h]):this._toggleClass(g,f);},morph:function(f,h,g,k,j){return d.effects.animateClass.apply(this,[{add:h,remove:f},g,k,j]);},switchClass:function(){return this.morph.apply(this,arguments);},cssUnit:function(f){var g=this.css(f),h=[];d.each(["em","px","%","pt"],function(j,k){if(g.indexOf(k)>0){h=[parseFloat(g),k];}});return h;}});d.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor","borderTopColor","color","outlineColor"],function(g,f){d.fx.step[f]=function(h){if(h.state==0){h.start=e(h.elem,f);h.end=b(h.end);}h.elem.style[f]="rgb("+[Math.max(Math.min(parseInt((h.pos*(h.end[0]-h.start[0]))+h.start[0],10),255),0),Math.max(Math.min(parseInt((h.pos*(h.end[1]-h.start[1]))+h.start[1],10),255),0),Math.max(Math.min(parseInt((h.pos*(h.end[2]-h.start[2]))+h.start[2],10),255),0)].join(",")+")";};});function b(g){var f;if(g&&g.constructor==Array&&g.length==3){return g;}if(f=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(g)){return[parseInt(f[1],10),parseInt(f[2],10),parseInt(f[3],10)];}if(f=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(g)){return[parseFloat(f[1])*2.55,parseFloat(f[2])*2.55,parseFloat(f[3])*2.55];}if(f=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(g)){return[parseInt(f[1],16),parseInt(f[2],16),parseInt(f[3],16)];}if(f=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(g)){return[parseInt(f[1]+f[1],16),parseInt(f[2]+f[2],16),parseInt(f[3]+f[3],16)];}if(f=/rgba\(0, 0, 0, 0\)/.exec(g)){return a.transparent;}return a[d.trim(g).toLowerCase()];}function e(h,f){var g;do{g=d.curCSS(h,f);if(g!=""&&g!="transparent"||d.nodeName(h,"body")){break;}f="backgroundColor";}while(h=h.parentNode);return b(g);}var a={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0],transparent:[255,255,255]};d.easing.jswing=d.easing.swing;d.extend(d.easing,{def:"easeOutQuad",swing:function(g,h,f,k,j){return d.easing[d.easing.def](g,h,f,k,j);},easeInQuad:function(g,h,f,k,j){return k*(h/=j)*h+f;},easeOutQuad:function(g,h,f,k,j){return -k*(h/=j)*(h-2)+f;},easeInOutQuad:function(g,h,f,k,j){if((h/=j/2)<1){return k/2*h*h+f;}return -k/2*((--h)*(h-2)-1)+f;},easeInCubic:function(g,h,f,k,j){return k*(h/=j)*h*h+f;},easeOutCubic:function(g,h,f,k,j){return k*((h=h/j-1)*h*h+1)+f;},easeInOutCubic:function(g,h,f,k,j){if((h/=j/2)<1){return k/2*h*h*h+f;}return k/2*((h-=2)*h*h+2)+f;},easeInQuart:function(g,h,f,k,j){return k*(h/=j)*h*h*h+f;},easeOutQuart:function(g,h,f,k,j){return -k*((h=h/j-1)*h*h*h-1)+f;},easeInOutQuart:function(g,h,f,k,j){if((h/=j/2)<1){return k/2*h*h*h*h+f;}return -k/2*((h-=2)*h*h*h-2)+f;},easeInQuint:function(g,h,f,k,j){return k*(h/=j)*h*h*h*h+f;},easeOutQuint:function(g,h,f,k,j){return k*((h=h/j-1)*h*h*h*h+1)+f;},easeInOutQuint:function(g,h,f,k,j){if((h/=j/2)<1){return k/2*h*h*h*h*h+f;}return k/2*((h-=2)*h*h*h*h+2)+f;},easeInSine:function(g,h,f,k,j){return -k*Math.cos(h/j*(Math.PI/2))+k+f;},easeOutSine:function(g,h,f,k,j){return k*Math.sin(h/j*(Math.PI/2))+f;},easeInOutSine:function(g,h,f,k,j){return -k/2*(Math.cos(Math.PI*h/j)-1)+f;},easeInExpo:function(g,h,f,k,j){return(h==0)?f:k*Math.pow(2,10*(h/j-1))+f;},easeOutExpo:function(g,h,f,k,j){return(h==j)?f+k:k*(-Math.pow(2,-10*h/j)+1)+f;},easeInOutExpo:function(g,h,f,k,j){if(h==0){return f;}if(h==j){return f+k;}if((h/=j/2)<1){return k/2*Math.pow(2,10*(h-1))+f;}return k/2*(-Math.pow(2,-10*--h)+2)+f;},easeInCirc:function(g,h,f,k,j){return -k*(Math.sqrt(1-(h/=j)*h)-1)+f;},easeOutCirc:function(g,h,f,k,j){return k*Math.sqrt(1-(h=h/j-1)*h)+f;},easeInOutCirc:function(g,h,f,k,j){if((h/=j/2)<1){return -k/2*(Math.sqrt(1-h*h)-1)+f;}return k/2*(Math.sqrt(1-(h-=2)*h)+1)+f;},easeInElastic:function(g,j,f,o,n){var k=1.70158;var m=0;var h=o;if(j==0){return f;}if((j/=n)==1){return f+o;}if(!m){m=n*0.3;}if(h<Math.abs(o)){h=o;var k=m/4;}else{var k=m/(2*Math.PI)*Math.asin(o/h);}return -(h*Math.pow(2,10*(j-=1))*Math.sin((j*n-k)*(2*Math.PI)/m))+f;},easeOutElastic:function(g,j,f,o,n){var k=1.70158;var m=0;var h=o;if(j==0){return f;}if((j/=n)==1){return f+o;}if(!m){m=n*0.3;}if(h<Math.abs(o)){h=o;var k=m/4;}else{var k=m/(2*Math.PI)*Math.asin(o/h);}return h*Math.pow(2,-10*j)*Math.sin((j*n-k)*(2*Math.PI)/m)+o+f;},easeInOutElastic:function(g,j,f,o,n){var k=1.70158;var m=0;var h=o;if(j==0){return f;}if((j/=n/2)==2){return f+o;}if(!m){m=n*(0.3*1.5);}if(h<Math.abs(o)){h=o;var k=m/4;}else{var k=m/(2*Math.PI)*Math.asin(o/h);}if(j<1){return -0.5*(h*Math.pow(2,10*(j-=1))*Math.sin((j*n-k)*(2*Math.PI)/m))+f;}return h*Math.pow(2,-10*(j-=1))*Math.sin((j*n-k)*(2*Math.PI)/m)*0.5+o+f;},easeInBack:function(g,h,f,m,k,j){if(j==undefined){j=1.70158;}return m*(h/=k)*h*((j+1)*h-j)+f;},easeOutBack:function(g,h,f,m,k,j){if(j==undefined){j=1.70158;}return m*((h=h/k-1)*h*((j+1)*h+j)+1)+f;},easeInOutBack:function(g,h,f,m,k,j){if(j==undefined){j=1.70158;}if((h/=k/2)<1){return m/2*(h*h*(((j*=(1.525))+1)*h-j))+f;}return m/2*((h-=2)*h*(((j*=(1.525))+1)*h+j)+2)+f;},easeInBounce:function(g,h,f,k,j){return k-d.easing.easeOutBounce(g,j-h,0,k,j)+f;},easeOutBounce:function(g,h,f,k,j){if((h/=j)<(1/2.75)){return k*(7.5625*h*h)+f;}else{if(h<(2/2.75)){return k*(7.5625*(h-=(1.5/2.75))*h+0.75)+f;}else{if(h<(2.5/2.75)){return k*(7.5625*(h-=(2.25/2.75))*h+0.9375)+f;}else{return k*(7.5625*(h-=(2.625/2.75))*h+0.984375)+f;}}}},easeInOutBounce:function(g,h,f,k,j){if(h<j/2){return d.easing.easeInBounce(g,h*2,0,k,j)*0.5+f;}return d.easing.easeOutBounce(g,h*2-j,0,k,j)*0.5+k*0.5+f;}});})(jQuery);(function(a){a.effects.blind=function(b){return this.queue(function(){var d=a(this),c=["position","top","left"];var h=a.effects.setMode(d,b.options.mode||"hide");var g=b.options.direction||"vertical";a.effects.save(d,c);d.show();var k=a.effects.createWrapper(d).css({overflow:"hidden"});var e=(g=="vertical")?"height":"width";var j=(g=="vertical")?k.height():k.width();if(h=="show"){k.css(e,0);}var f={};f[e]=h=="show"?j:0;k.animate(f,b.duration,b.options.easing,function(){if(h=="hide"){d.hide();}a.effects.restore(d,c);a.effects.removeWrapper(d);if(b.callback){b.callback.apply(d[0],arguments);}d.dequeue();});});};})(jQuery);(function(a){a.effects.bounce=function(b){return this.queue(function(){var e=a(this),m=["position","top","left"];var k=a.effects.setMode(e,b.options.mode||"effect");var o=b.options.direction||"up";var c=b.options.distance||20;var d=b.options.times||5;var g=b.duration||250;if(/show|hide/.test(k)){m.push("opacity");}a.effects.save(e,m);e.show();a.effects.createWrapper(e);var f=(o=="up"||o=="down")?"top":"left";var q=(o=="up"||o=="left")?"pos":"neg";var c=b.options.distance||(f=="top"?e.outerHeight({margin:true})/3:e.outerWidth({margin:true})/3);if(k=="show"){e.css("opacity",0).css(f,q=="pos"?-c:c);}if(k=="hide"){c=c/(d*2);}if(k!="hide"){d--;}if(k=="show"){var h={opacity:1};h[f]=(q=="pos"?"+=":"-=")+c;e.animate(h,g/2,b.options.easing);c=c/2;d--;}for(var j=0;j<d;j++){var p={},n={};p[f]=(q=="pos"?"-=":"+=")+c;n[f]=(q=="pos"?"+=":"-=")+c;e.animate(p,g/2,b.options.easing).animate(n,g/2,b.options.easing);c=(k=="hide")?c*2:c/2;}if(k=="hide"){var h={opacity:0};h[f]=(q=="pos"?"-=":"+=")+c;e.animate(h,g/2,b.options.easing,function(){e.hide();a.effects.restore(e,m);a.effects.removeWrapper(e);if(b.callback){b.callback.apply(this,arguments);}});}else{var p={},n={};p[f]=(q=="pos"?"-=":"+=")+c;n[f]=(q=="pos"?"+=":"-=")+c;e.animate(p,g/2,b.options.easing).animate(n,g/2,b.options.easing,function(){a.effects.restore(e,m);a.effects.removeWrapper(e);if(b.callback){b.callback.apply(this,arguments);}});}e.queue("fx",function(){e.dequeue();});e.dequeue();});};})(jQuery);(function(a){a.effects.clip=function(b){return this.queue(function(){var f=a(this),k=["position","top","left","height","width"];var j=a.effects.setMode(f,b.options.mode||"hide");var m=b.options.direction||"vertical";a.effects.save(f,k);f.show();var c=a.effects.createWrapper(f).css({overflow:"hidden"});var e=f[0].tagName=="IMG"?c:f;var g={size:(m=="vertical")?"height":"width",position:(m=="vertical")?"top":"left"};var d=(m=="vertical")?e.height():e.width();if(j=="show"){e.css(g.size,0);e.css(g.position,d/2);}var h={};h[g.size]=j=="show"?d:0;h[g.position]=j=="show"?0:d/2;e.animate(h,{queue:false,duration:b.duration,easing:b.options.easing,complete:function(){if(j=="hide"){f.hide();}a.effects.restore(f,k);a.effects.removeWrapper(f);if(b.callback){b.callback.apply(f[0],arguments);}f.dequeue();}});});};})(jQuery);(function(a){a.effects.drop=function(b){return this.queue(function(){var e=a(this),d=["position","top","left","opacity"];var j=a.effects.setMode(e,b.options.mode||"hide");var h=b.options.direction||"left";a.effects.save(e,d);e.show();a.effects.createWrapper(e);var f=(h=="up"||h=="down")?"top":"left";var c=(h=="up"||h=="left")?"pos":"neg";var k=b.options.distance||(f=="top"?e.outerHeight({margin:true})/2:e.outerWidth({margin:true})/2);if(j=="show"){e.css("opacity",0).css(f,c=="pos"?-k:k);}var g={opacity:j=="show"?1:0};g[f]=(j=="show"?(c=="pos"?"+=":"-="):(c=="pos"?"-=":"+="))+k;e.animate(g,{queue:false,duration:b.duration,easing:b.options.easing,complete:function(){if(j=="hide"){e.hide();}a.effects.restore(e,d);a.effects.removeWrapper(e);if(b.callback){b.callback.apply(this,arguments);}e.dequeue();}});});};})(jQuery);(function(a){a.effects.explode=function(b){return this.queue(function(){var k=b.options.pieces?Math.round(Math.sqrt(b.options.pieces)):3;var e=b.options.pieces?Math.round(Math.sqrt(b.options.pieces)):3;b.options.mode=b.options.mode=="toggle"?(a(this).is(":visible")?"hide":"show"):b.options.mode;var h=a(this).show().css("visibility","hidden");var m=h.offset();m.top-=parseInt(h.css("marginTop"),10)||0;m.left-=parseInt(h.css("marginLeft"),10)||0;var g=h.outerWidth(true);var c=h.outerHeight(true);for(var f=0;f<k;f++){for(var d=0;d<e;d++){h.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-d*(g/e),top:-f*(c/k)}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:g/e,height:c/k,left:m.left+d*(g/e)+(b.options.mode=="show"?(d-Math.floor(e/2))*(g/e):0),top:m.top+f*(c/k)+(b.options.mode=="show"?(f-Math.floor(k/2))*(c/k):0),opacity:b.options.mode=="show"?0:1}).animate({left:m.left+d*(g/e)+(b.options.mode=="show"?0:(d-Math.floor(e/2))*(g/e)),top:m.top+f*(c/k)+(b.options.mode=="show"?0:(f-Math.floor(k/2))*(c/k)),opacity:b.options.mode=="show"?1:0},b.duration||500);}}setTimeout(function(){b.options.mode=="show"?h.css({visibility:"visible"}):h.css({visibility:"visible"}).hide();if(b.callback){b.callback.apply(h[0]);}h.dequeue();a("div.ui-effects-explode").remove();},b.duration||500);});};})(jQuery);(function(a){a.effects.fold=function(b){return this.queue(function(){var e=a(this),m=["position","top","left"];var h=a.effects.setMode(e,b.options.mode||"hide");var q=b.options.size||15;var p=!(!b.options.horizFirst);var g=b.duration?b.duration/2:a.fx.speeds._default/2;a.effects.save(e,m);e.show();var d=a.effects.createWrapper(e).css({overflow:"hidden"});var j=((h=="show")!=p);var f=j?["width","height"]:["height","width"];var c=j?[d.width(),d.height()]:[d.height(),d.width()];var k=/([0-9]+)%/.exec(q);if(k){q=parseInt(k[1],10)/100*c[h=="hide"?0:1];}if(h=="show"){d.css(p?{height:0,width:q}:{height:q,width:0});}var o={},n={};o[f[0]]=h=="show"?c[0]:q;n[f[1]]=h=="show"?c[1]:0;d.animate(o,g,b.options.easing).animate(n,g,b.options.easing,function(){if(h=="hide"){e.hide();}a.effects.restore(e,m);a.effects.removeWrapper(e);if(b.callback){b.callback.apply(e[0],arguments);}e.dequeue();});});};})(jQuery);(function(a){a.effects.highlight=function(b){return this.queue(function(){var e=a(this),d=["backgroundImage","backgroundColor","opacity"];var h=a.effects.setMode(e,b.options.mode||"show");var c=b.options.color||"#ffff99";var g=e.css("backgroundColor");a.effects.save(e,d);e.show();e.css({backgroundImage:"none",backgroundColor:c});var f={backgroundColor:g};if(h=="hide"){f.opacity=0;}e.animate(f,{queue:false,duration:b.duration,easing:b.options.easing,complete:function(){if(h=="hide"){e.hide();}a.effects.restore(e,d);if(h=="show"&&a.browser.msie){this.style.removeAttribute("filter");}if(b.callback){b.callback.apply(this,arguments);}e.dequeue();}});});};})(jQuery);(function(a){a.effects.pulsate=function(b){return this.queue(function(){var d=a(this);var g=a.effects.setMode(d,b.options.mode||"show");var f=b.options.times||5;var e=b.duration?b.duration/2:a.fx.speeds._default/2;if(g=="hide"){f--;}if(d.is(":hidden")){d.css("opacity",0);d.show();d.animate({opacity:1},e,b.options.easing);f=f-2;}for(var c=0;c<f;c++){d.animate({opacity:0},e,b.options.easing).animate({opacity:1},e,b.options.easing);}if(g=="hide"){d.animate({opacity:0},e,b.options.easing,function(){d.hide();if(b.callback){b.callback.apply(this,arguments);}});}else{d.animate({opacity:0},e,b.options.easing).animate({opacity:1},e,b.options.easing,function(){if(b.callback){b.callback.apply(this,arguments);}});}d.queue("fx",function(){d.dequeue();});d.dequeue();});};})(jQuery);(function(a){a.effects.puff=function(b){return this.queue(function(){var f=a(this);var c=a.extend(true,{},b.options);var h=a.effects.setMode(f,b.options.mode||"hide");var g=parseInt(b.options.percent,10)||150;c.fade=true;var e={height:f.height(),width:f.width()};var d=g/100;f.from=(h=="hide")?e:{height:e.height*d,width:e.width*d};c.from=f.from;c.percent=(h=="hide")?g:100;c.mode=h;f.effect("scale",c,b.duration,b.callback);f.dequeue();});};a.effects.scale=function(b){return this.queue(function(){var g=a(this);var d=a.extend(true,{},b.options);var k=a.effects.setMode(g,b.options.mode||"effect");var h=parseInt(b.options.percent,10)||(parseInt(b.options.percent,10)==0?0:(k=="hide"?0:100));var j=b.options.direction||"both";var c=b.options.origin;if(k!="effect"){d.origin=c||["middle","center"];d.restore=true;}var f={height:g.height(),width:g.width()};g.from=b.options.from||(k=="show"?{height:0,width:0}:f);var e={y:j!="horizontal"?(h/100):1,x:j!="vertical"?(h/100):1};g.to={height:f.height*e.y,width:f.width*e.x};if(b.options.fade){if(k=="show"){g.from.opacity=0;g.to.opacity=1;}if(k=="hide"){g.from.opacity=1;g.to.opacity=0;}}d.from=g.from;d.to=g.to;d.mode=k;g.effect("size",d,b.duration,b.callback);g.dequeue();});};a.effects.size=function(b){return this.queue(function(){var c=a(this),p=["position","top","left","width","height","overflow","opacity"];var o=["position","top","left","overflow","opacity"];var k=["width","height","overflow"];var r=["fontSize"];var m=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"];var f=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"];var g=a.effects.setMode(c,b.options.mode||"effect");var j=b.options.restore||false;var e=b.options.scale||"both";var q=b.options.origin;var d={height:c.height(),width:c.width()};c.from=b.options.from||d;c.to=b.options.to||d;if(q){var h=a.effects.getBaseline(q,d);c.from.top=(d.height-c.from.height)*h.y;c.from.left=(d.width-c.from.width)*h.x;c.to.top=(d.height-c.to.height)*h.y;c.to.left=(d.width-c.to.width)*h.x;}var n={from:{y:c.from.height/d.height,x:c.from.width/d.width},to:{y:c.to.height/d.height,x:c.to.width/d.width}};if(e=="box"||e=="both"){if(n.from.y!=n.to.y){p=p.concat(m);c.from=a.effects.setTransition(c,m,n.from.y,c.from);c.to=a.effects.setTransition(c,m,n.to.y,c.to);}if(n.from.x!=n.to.x){p=p.concat(f);c.from=a.effects.setTransition(c,f,n.from.x,c.from);c.to=a.effects.setTransition(c,f,n.to.x,c.to);}}if(e=="content"||e=="both"){if(n.from.y!=n.to.y){p=p.concat(r);c.from=a.effects.setTransition(c,r,n.from.y,c.from);c.to=a.effects.setTransition(c,r,n.to.y,c.to);}}a.effects.save(c,j?p:o);c.show();a.effects.createWrapper(c);c.css("overflow","hidden").css(c.from);if(e=="content"||e=="both"){m=m.concat(["marginTop","marginBottom"]).concat(r);f=f.concat(["marginLeft","marginRight"]);k=p.concat(m).concat(f);c.find("*[width]").each(function(){child=a(this);if(j){a.effects.save(child,k);}var s={height:child.height(),width:child.width()};child.from={height:s.height*n.from.y,width:s.width*n.from.x};child.to={height:s.height*n.to.y,width:s.width*n.to.x};if(n.from.y!=n.to.y){child.from=a.effects.setTransition(child,m,n.from.y,child.from);child.to=a.effects.setTransition(child,m,n.to.y,child.to);}if(n.from.x!=n.to.x){child.from=a.effects.setTransition(child,f,n.from.x,child.from);child.to=a.effects.setTransition(child,f,n.to.x,child.to);}child.css(child.from);child.animate(child.to,b.duration,b.options.easing,function(){if(j){a.effects.restore(child,k);}});});}c.animate(c.to,{queue:false,duration:b.duration,easing:b.options.easing,complete:function(){if(g=="hide"){c.hide();}a.effects.restore(c,j?p:o);a.effects.removeWrapper(c);if(b.callback){b.callback.apply(this,arguments);}c.dequeue();}});});};})(jQuery);(function(a){a.effects.shake=function(b){return this.queue(function(){var e=a(this),m=["position","top","left"];var k=a.effects.setMode(e,b.options.mode||"effect");var o=b.options.direction||"left";var c=b.options.distance||20;var d=b.options.times||3;var g=b.duration||b.options.duration||140;a.effects.save(e,m);e.show();a.effects.createWrapper(e);var f=(o=="up"||o=="down")?"top":"left";var q=(o=="up"||o=="left")?"pos":"neg";var h={},p={},n={};h[f]=(q=="pos"?"-=":"+=")+c;p[f]=(q=="pos"?"+=":"-=")+c*2;n[f]=(q=="pos"?"-=":"+=")+c*2;e.animate(h,g,b.options.easing);for(var j=1;j<d;j++){e.animate(p,g,b.options.easing).animate(n,g,b.options.easing);}e.animate(p,g,b.options.easing).animate(h,g/2,b.options.easing,function(){a.effects.restore(e,m);a.effects.removeWrapper(e);if(b.callback){b.callback.apply(this,arguments);}});e.queue("fx",function(){e.dequeue();});e.dequeue();});};})(jQuery);(function(a){a.effects.slide=function(b){return this.queue(function(){var e=a(this),d=["position","top","left"];var j=a.effects.setMode(e,b.options.mode||"show");var h=b.options.direction||"left";a.effects.save(e,d);e.show();a.effects.createWrapper(e).css({overflow:"hidden"});var f=(h=="up"||h=="down")?"top":"left";var c=(h=="up"||h=="left")?"pos":"neg";var k=b.options.distance||(f=="top"?e.outerHeight({margin:true}):e.outerWidth({margin:true}));if(j=="show"){e.css(f,c=="pos"?-k:k);}var g={};g[f]=(j=="show"?(c=="pos"?"+=":"-="):(c=="pos"?"-=":"+="))+k;e.animate(g,{queue:false,duration:b.duration,easing:b.options.easing,complete:function(){if(j=="hide"){e.hide();}a.effects.restore(e,d);a.effects.removeWrapper(e);if(b.callback){b.callback.apply(this,arguments);}e.dequeue();}});});};})(jQuery);(function(a){a.effects.transfer=function(b){return this.queue(function(){var f=a(this),h=a(b.options.to),e=h.offset(),g={top:e.top,left:e.left,height:h.innerHeight(),width:h.innerWidth()},d=f.offset(),c=a('<div class="ui-effects-transfer"></div>').appendTo(document.body).addClass(b.options.className).css({top:d.top,left:d.left,height:f.innerHeight(),width:f.innerWidth(),position:"absolute"}).animate(g,b.duration,b.options.easing,function(){c.remove();(b.callback&&b.callback.apply(f[0],arguments));f.dequeue();});});};})(jQuery);(function(f){function d(ap,H,I){var z=[],P={colors:["#edc240","#afd8f8","#cb4b4b","#4da74d","#9440ed"],legend:{show:true,noColumns:1,labelFormatter:null,labelBoxBorderColor:"#ccc",container:null,position:"ne",margin:5,backgroundColor:null,backgroundOpacity:0.85},xaxis:{mode:null,min:null,max:null,autoscaleMargin:null,ticks:null,tickFormatter:null,labelWidth:null,labelHeight:null,tickDecimals:null,tickSize:null,minTickSize:null,monthNames:null,timeformat:null},yaxis:{autoscaleMargin:0.02},x2axis:{autoscaleMargin:null},y2axis:{autoscaleMargin:0.02},points:{show:false,radius:3,lineWidth:2,fill:true,fillColor:"#ffffff"},lines:{show:false,lineWidth:2,fill:false,fillColor:null},bars:{show:false,lineWidth:2,barWidth:1,fill:true,fillColor:null,align:"left"},grid:{color:"#545454",backgroundColor:null,tickColor:"#dddddd",labelMargin:5,borderWidth:2,markings:null,markingsColor:"#f4f4f4",markingsLineWidth:2,clickable:false,hoverable:false,autoHighlight:true,mouseActiveRadius:10},selection:{mode:null,color:"#e8cfac"},shadowSize:4},A=null,aq=null,ar=null,J=null,az=null,m=ap,ab={xaxis:{},yaxis:{},x2axis:{},y2axis:{}},N={left:0,right:0,top:0,bottom:0},aj=0,C=0,p=0,ac=0,v={};this.setData=O;this.setupGrid=T;this.draw=aw;this.clearSelection=j;this.setSelection=ad;this.getCanvas=function(){return A;};this.getPlotOffset=function(){return N;};this.getData=function(){return z;};this.getAxes=function(){return ab;};this.highlight=au;this.unhighlight=ai;Z(I);O(H);L();T();aw();function O(aA){z=x(aA);F();U();}function x(aE){var aC=[];for(var aB=0;aB<aE.length;++aB){var aD;if(aE[aB].data){aD={};for(var aA in aE[aB]){aD[aA]=aE[aB][aA];}}else{aD={data:aE[aB]};}aC.push(aD);}return aC;}function Z(aA){f.extend(true,P,aA);if(P.xaxis.noTicks&&P.xaxis.ticks==null){P.xaxis.ticks=P.xaxis.noTicks;}if(P.yaxis.noTicks&&P.yaxis.ticks==null){P.yaxis.ticks=P.yaxis.noTicks;}if(P.grid.coloredAreas){P.grid.markings=P.grid.coloredAreas;}if(P.grid.coloredAreasColor){P.grid.markingsColor=P.grid.coloredAreasColor;}}function F(){var aF;var aK=z.length,aA=[],aD=[];for(aF=0;aF<z.length;++aF){var aJ=z[aF].color;if(aJ!=null){--aK;if(typeof aJ=="number"){aD.push(aJ);}else{aA.push(e(z[aF].color));}}}for(aF=0;aF<aD.length;++aF){aK=Math.max(aK,aD[aF]+1);}var aB=[],aE=0;aF=0;while(aB.length<aK){var aI;if(P.colors.length==aF){aI=new g(100,100,100);}else{aI=e(P.colors[aF]);}var aC=aE%2==1?-1:1;var aH=1+aC*Math.ceil(aE/2)*0.2;aI.scale(aH,aH,aH);aB.push(aI);++aF;if(aF>=P.colors.length){aF=0;++aE;}}var aG=0,aL;for(aF=0;aF<z.length;++aF){aL=z[aF];if(aL.color==null){aL.color=aB[aG].toString();++aG;}else{if(typeof aL.color=="number"){aL.color=aB[aL.color].toString();}}aL.lines=f.extend(true,{},P.lines,aL.lines);aL.points=f.extend(true,{},P.points,aL.points);aL.bars=f.extend(true,{},P.bars,aL.bars);if(aL.shadowSize==null){aL.shadowSize=P.shadowSize;}if(aL.xaxis&&aL.xaxis==2){aL.xaxis=ab.x2axis;}else{aL.xaxis=ab.xaxis;}if(aL.yaxis&&aL.yaxis==2){aL.yaxis=ab.y2axis;}else{aL.yaxis=ab.yaxis;}}}function U(){var aC=Number.POSITIVE_INFINITY,aB=Number.NEGATIVE_INFINITY,aD;for(aD in ab){ab[aD].datamin=aC;ab[aD].datamax=aB;ab[aD].used=false;}for(var aG=0;aG<z.length;++aG){var aF=z[aG].data,aL=z[aG].xaxis,aK=z[aG].yaxis,aA=0,aJ=0;if(z[aG].bars.show){aA=z[aG].bars.align=="left"?0:-z[aG].bars.barWidth/2;aJ=aA+z[aG].bars.barWidth;}aL.used=aK.used=true;for(var aE=0;aE<aF.length;++aE){if(aF[aE]==null){continue;}var aI=aF[aE][0],aH=aF[aE][1];if(aI!=null&&!isNaN(aI=+aI)){if(aI+aA<aL.datamin){aL.datamin=aI+aA;}if(aI+aJ>aL.datamax){aL.datamax=aI+aJ;}}if(aH!=null&&!isNaN(aH=+aH)){if(aH<aK.datamin){aK.datamin=aH;}if(aH>aK.datamax){aK.datamax=aH;}}if(aI==null||aH==null||isNaN(aI)||isNaN(aH)){aF[aE]=null;}}}for(aD in ab){if(ab[aD].datamin==aC){ab[aD].datamin=0;}if(ab[aD].datamax==aB){ab[aD].datamax=1;}}}function L(){aj=m.width();C=m.height();m.html("");m.css("position","relative");if(aj<=0||C<=0){throw"Invalid dimensions for plot, width = "+aj+", height = "+C;}A=f('<canvas width="'+aj+'" height="'+C+'"></canvas>').appendTo(m).get(0);if(f.browser.msie){A=window.G_vmlCanvasManager.initElement(A);}J=A.getContext("2d");aq=f('<canvas style="position:absolute;left:0px;top:0px;" width="'+aj+'" height="'+C+'"></canvas>').appendTo(m).get(0);if(f.browser.msie){aq=window.G_vmlCanvasManager.initElement(aq);}az=aq.getContext("2d");ar=f([aq,A]);if(P.selection.mode!=null||P.grid.hoverable){ar.each(function(){this.onmousemove=k;});if(P.selection.mode!=null){ar.mousedown(ao);}}if(P.grid.clickable){ar.click(M);}}function T(){function aA(aD,aC){s(aD,aC);n(aD,aC);X(aD,aC);if(aD==ab.xaxis||aD==ab.x2axis){aD.p2c=function(aE){return(aE-aD.min)*aD.scale;};aD.c2p=function(aE){return aD.min+aE/aD.scale;};}else{aD.p2c=function(aE){return(aD.max-aE)*aD.scale;};aD.c2p=function(aE){return aD.max-aE/aD.scale;};}}for(var aB in ab){aA(ab[aB],P[aB]);}ay();Q();ax();}function s(aD,aF){var aC=aF.min!=null?aF.min:aD.datamin;var aA=aF.max!=null?aF.max:aD.datamax;if(aA-aC==0){var aB;if(aA==0){aB=1;}else{aB=0.01;}aC-=aB;aA+=aB;}else{var aE=aF.autoscaleMargin;if(aE!=null){if(aF.min==null){aC-=(aA-aC)*aE;if(aC<0&&aD.datamin>=0){aC=0;}}if(aF.max==null){aA+=(aA-aC)*aE;if(aA>0&&aD.datamax<=0){aA=0;}}}}aD.min=aC;aD.max=aA;}function n(aF,aI){var aE;if(typeof aI.ticks=="number"&&aI.ticks>0){aE=aI.ticks;}else{if(aF==ab.xaxis||aF==ab.x2axis){aE=aj/100;}else{aE=C/60;}}var aN=(aF.max-aF.min)/aE;var aQ,aJ,aL,aM,aH,aC,aB;if(aI.mode=="time"){function aP(aX,aR,aT){var aS=function(aZ){aZ=""+aZ;return aZ.length==1?"0"+aZ:aZ;};var aW=[];var aV=false;if(aT==null){aT=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];}for(var aU=0;aU<aR.length;++aU){var aY=aR.charAt(aU);if(aV){switch(aY){case"h":aY=""+aX.getUTCHours();break;case"H":aY=aS(aX.getUTCHours());break;case"M":aY=aS(aX.getUTCMinutes());break;case"S":aY=aS(aX.getUTCSeconds());break;case"d":aY=""+aX.getUTCDate();break;case"m":aY=""+(aX.getUTCMonth()+1);break;case"y":aY=""+aX.getUTCFullYear();break;case"b":aY=""+aT[aX.getUTCMonth()];break;}aW.push(aY);aV=false;}else{if(aY=="%"){aV=true;}else{aW.push(aY);}}}return aW.join("");}var aK={second:1000,minute:60*1000,hour:60*60*1000,day:24*60*60*1000,month:30*24*60*60*1000,year:365.2425*24*60*60*1000};var aO=[[1,"second"],[2,"second"],[5,"second"],[10,"second"],[30,"second"],[1,"minute"],[2,"minute"],[5,"minute"],[10,"minute"],[30,"minute"],[1,"hour"],[2,"hour"],[4,"hour"],[8,"hour"],[12,"hour"],[1,"day"],[2,"day"],[3,"day"],[0.25,"month"],[0.5,"month"],[1,"month"],[2,"month"],[3,"month"],[6,"month"],[1,"year"]];var aD=0;if(aI.minTickSize!=null){if(typeof aI.tickSize=="number"){aD=aI.tickSize;}else{aD=aI.minTickSize[0]*aK[aI.minTickSize[1]];}}for(aH=0;aH<aO.length-1;++aH){if(aN<(aO[aH][0]*aK[aO[aH][1]]+aO[aH+1][0]*aK[aO[aH+1][1]])/2&&aO[aH][0]*aK[aO[aH][1]]>=aD){break;}}aQ=aO[aH][0];aL=aO[aH][1];if(aL=="year"){aC=Math.pow(10,Math.floor(Math.log(aN/aK.year)/Math.LN10));aB=(aN/aK.year)/aC;if(aB<1.5){aQ=1;}else{if(aB<3){aQ=2;}else{if(aB<7.5){aQ=5;}else{aQ=10;}}}aQ*=aC;}if(aI.tickSize){aQ=aI.tickSize[0];aL=aI.tickSize[1];}aJ=function(aT){var aY=[],aW=aT.tickSize[0],aZ=aT.tickSize[1],aX=new Date(aT.min);var aS=aW*aK[aZ];if(aZ=="second"){aX.setUTCSeconds(c(aX.getUTCSeconds(),aW));}if(aZ=="minute"){aX.setUTCMinutes(c(aX.getUTCMinutes(),aW));}if(aZ=="hour"){aX.setUTCHours(c(aX.getUTCHours(),aW));}if(aZ=="month"){aX.setUTCMonth(c(aX.getUTCMonth(),aW));}if(aZ=="year"){aX.setUTCFullYear(c(aX.getUTCFullYear(),aW));}aX.setUTCMilliseconds(0);if(aS>=aK.minute){aX.setUTCSeconds(0);}if(aS>=aK.hour){aX.setUTCMinutes(0);}if(aS>=aK.day){aX.setUTCHours(0);}if(aS>=aK.day*4){aX.setUTCDate(1);}if(aS>=aK.year){aX.setUTCMonth(0);}var a1=0,a0=Number.NaN,aU;do{aU=a0;a0=aX.getTime();aY.push({v:a0,label:aT.tickFormatter(a0,aT)});if(aZ=="month"){if(aW<1){aX.setUTCDate(1);var aR=aX.getTime();aX.setUTCMonth(aX.getUTCMonth()+1);var aV=aX.getTime();aX.setTime(a0+a1*aK.hour+(aV-aR)*aW);a1=aX.getUTCHours();aX.setUTCHours(0);}else{aX.setUTCMonth(aX.getUTCMonth()+aW);}}else{if(aZ=="year"){aX.setUTCFullYear(aX.getUTCFullYear()+aW);}else{aX.setTime(a0+aS);}}}while(a0<aT.max&&a0!=aU);return aY;};aM=function(aR,aU){var aV=new Date(aR);if(aI.timeformat!=null){return aP(aV,aI.timeformat,aI.monthNames);}var aS=aU.tickSize[0]*aK[aU.tickSize[1]];var aT=aU.max-aU.min;if(aS<aK.minute){fmt="%h:%M:%S";}else{if(aS<aK.day){if(aT<2*aK.day){fmt="%h:%M";}else{fmt="%b %d %h:%M";}}else{if(aS<aK.month){fmt="%b %d";}else{if(aS<aK.year){if(aT<aK.year){fmt="%b";}else{fmt="%b %y";}}else{fmt="%y";}}}}return aP(aV,fmt,aI.monthNames);};}else{var aA=aI.tickDecimals;var aG=-Math.floor(Math.log(aN)/Math.LN10);if(aA!=null&&aG>aA){aG=aA;}aC=Math.pow(10,-aG);aB=aN/aC;if(aB<1.5){aQ=1;}else{if(aB<3){aQ=2;if(aB>2.25&&(aA==null||aG+1<=aA)){aQ=2.5;++aG;}}else{if(aB<7.5){aQ=5;}else{aQ=10;}}}aQ*=aC;if(aI.minTickSize!=null&&aQ<aI.minTickSize){aQ=aI.minTickSize;}if(aI.tickSize!=null){aQ=aI.tickSize;}aF.tickDecimals=Math.max(0,(aA!=null)?aA:aG);aJ=function(aT){var aV=[];var aW=c(aT.min,aT.tickSize),aS=0,aR=Number.NaN,aU;do{aU=aR;aR=aW+aS*aT.tickSize;aV.push({v:aR,label:aT.tickFormatter(aR,aT)});++aS;}while(aR<aT.max&&aR!=aU);return aV;};aM=function(aR,aS){return aR.toFixed(aS.tickDecimals);};}aF.tickSize=aL?[aQ,aL]:aQ;aF.tickGenerator=aJ;if(f.isFunction(aI.tickFormatter)){aF.tickFormatter=function(aR,aS){return""+aI.tickFormatter(aR,aS);};}else{aF.tickFormatter=aM;}if(aI.labelWidth!=null){aF.labelWidth=aI.labelWidth;}if(aI.labelHeight!=null){aF.labelHeight=aI.labelHeight;}}function X(aE,aG){aE.ticks=[];if(!aE.used){return;}if(aG.ticks==null){aE.ticks=aE.tickGenerator(aE);}else{if(typeof aG.ticks=="number"){if(aG.ticks>0){aE.ticks=aE.tickGenerator(aE);}}else{if(aG.ticks){var aF=aG.ticks;if(f.isFunction(aF)){aF=aF({min:aE.min,max:aE.max});}var aD,aA;for(aD=0;aD<aF.length;++aD){var aB=null;var aC=aF[aD];if(typeof aC=="object"){aA=aC[0];if(aC.length>1){aB=aC[1];}}else{aA=aC;}if(aB==null){aB=aE.tickFormatter(aA,aE);}aE.ticks[aD]={v:aA,label:aB};}}}}if(aG.autoscaleMargin!=null&&aE.ticks.length>0){if(aG.min==null){aE.min=Math.min(aE.min,aE.ticks[0].v);}if(aG.max==null&&aE.ticks.length>1){aE.max=Math.min(aE.max,aE.ticks[aE.ticks.length-1].v);}}}function ay(){function aB(aE){if(aE.labelWidth==null){aE.labelWidth=aj/6;}if(aE.labelHeight==null){labels=[];for(i=0;i<aE.ticks.length;++i){l=aE.ticks[i].label;if(l){labels.push('<div class="tickLabel" style="float:left;width:'+aE.labelWidth+'px">'+l+"</div>");}}aE.labelHeight=0;if(labels.length>0){var aD=f('<div style="position:absolute;top:-10000px;width:10000px;font-size:smaller">'+labels.join("")+'<div style="clear:left"></div></div>').appendTo(m);aE.labelHeight=aD.height();aD.remove();}}}function aA(aG){if(aG.labelWidth==null||aG.labelHeight==null){var aF,aH=[],aE;for(aF=0;aF<aG.ticks.length;++aF){aE=aG.ticks[aF].label;if(aE){aH.push('<div class="tickLabel">'+aE+"</div>");}}if(aH.length>0){var aD=f('<div style="position:absolute;top:-10000px;font-size:smaller">'+aH.join("")+"</div>").appendTo(m);if(aG.labelWidth==null){aG.labelWidth=aD.width();}if(aG.labelHeight==null){aG.labelHeight=aD.find("div").height();}aD.remove();}if(aG.labelWidth==null){aG.labelWidth=0;}if(aG.labelHeight==null){aG.labelHeight=0;}}}aB(ab.xaxis);aA(ab.yaxis);aB(ab.x2axis);aA(ab.y2axis);var aC=P.grid.borderWidth/2;for(i=0;i<z.length;++i){aC=Math.max(aC,2*(z[i].points.radius+z[i].points.lineWidth/2));}N.left=N.right=N.top=N.bottom=aC;if(ab.xaxis.labelHeight>0){N.bottom=Math.max(aC,ab.xaxis.labelHeight+P.grid.labelMargin);}if(ab.yaxis.labelWidth>0){N.left=Math.max(aC,ab.yaxis.labelWidth+P.grid.labelMargin);}if(ab.x2axis.labelHeight>0){N.top=Math.max(aC,ab.x2axis.labelHeight+P.grid.labelMargin);}if(ab.y2axis.labelWidth>0){N.right=Math.max(aC,ab.y2axis.labelWidth+P.grid.labelMargin);}p=aj-N.left-N.right;ac=C-N.bottom-N.top;ab.xaxis.scale=p/(ab.xaxis.max-ab.xaxis.min);ab.yaxis.scale=ac/(ab.yaxis.max-ab.yaxis.min);ab.x2axis.scale=p/(ab.x2axis.max-ab.x2axis.min);ab.y2axis.scale=ac/(ab.y2axis.max-ab.y2axis.min);}function aw(){D();for(var aA=0;aA<z.length;aA++){al(z[aA]);}}function y(aB,aH){var aE=aH+"axis",aA=aH+"2axis",aD,aG,aF,aC;if(aB[aE]){aD=ab[aE];aG=aB[aE].from;aF=aB[aE].to;}else{if(aB[aA]){aD=ab[aA];aG=aB[aA].from;aF=aB[aA].to;}else{aD=ab[aE];aG=aB[aH+"1"];aF=aB[aH+"2"];}}if(aG!=null&&aF!=null&&aG>aF){return{from:aF,to:aG,axis:aD};}return{from:aG,to:aF,axis:aD};}function D(){var aE;J.save();J.clearRect(0,0,aj,C);J.translate(N.left,N.top);if(P.grid.backgroundColor){J.fillStyle=P.grid.backgroundColor;J.fillRect(0,0,p,ac);}if(P.grid.markings){var aB=P.grid.markings;if(f.isFunction(aB)){aB=aB({xmin:ab.xaxis.min,xmax:ab.xaxis.max,ymin:ab.yaxis.min,ymax:ab.yaxis.max,xaxis:ab.xaxis,yaxis:ab.yaxis,x2axis:ab.x2axis,y2axis:ab.y2axis});}for(aE=0;aE<aB.length;++aE){var aA=aB[aE],aG=y(aA,"x"),aD=y(aA,"y");if(aG.from==null){aG.from=aG.axis.min;}if(aG.to==null){aG.to=aG.axis.max;}if(aD.from==null){aD.from=aD.axis.min;}if(aD.to==null){aD.to=aD.axis.max;}if(aG.to<aG.axis.min||aG.from>aG.axis.max||aD.to<aD.axis.min||aD.from>aD.axis.max){continue;}aG.from=Math.max(aG.from,aG.axis.min);aG.to=Math.min(aG.to,aG.axis.max);aD.from=Math.max(aD.from,aD.axis.min);aD.to=Math.min(aD.to,aD.axis.max);if(aG.from==aG.to&&aD.from==aD.to){continue;}aG.from=aG.axis.p2c(aG.from);aG.to=aG.axis.p2c(aG.to);aD.from=aD.axis.p2c(aD.from);aD.to=aD.axis.p2c(aD.to);if(aG.from==aG.to||aD.from==aD.to){J.strokeStyle=aA.color||P.grid.markingsColor;J.lineWidth=aA.lineWidth||P.grid.markingsLineWidth;J.moveTo(Math.floor(aG.from),Math.floor(aD.from));J.lineTo(Math.floor(aG.to),Math.floor(aD.to));J.stroke();}else{J.fillStyle=aA.color||P.grid.markingsColor;J.fillRect(Math.floor(aG.from),Math.floor(aD.to),Math.floor(aG.to-aG.from),Math.floor(aD.from-aD.to));}}}J.lineWidth=1;J.strokeStyle=P.grid.tickColor;J.beginPath();var aC,aF=ab.xaxis;for(aE=0;aE<aF.ticks.length;++aE){aC=aF.ticks[aE].v;if(aC<=aF.min||aC>=ab.xaxis.max){continue;}J.moveTo(Math.floor(aF.p2c(aC))+J.lineWidth/2,0);J.lineTo(Math.floor(aF.p2c(aC))+J.lineWidth/2,ac);}aF=ab.yaxis;for(aE=0;aE<aF.ticks.length;++aE){aC=aF.ticks[aE].v;if(aC<=aF.min||aC>=aF.max){continue;}J.moveTo(0,Math.floor(aF.p2c(aC))+J.lineWidth/2);J.lineTo(p,Math.floor(aF.p2c(aC))+J.lineWidth/2);}aF=ab.x2axis;for(aE=0;aE<aF.ticks.length;++aE){aC=aF.ticks[aE].v;if(aC<=aF.min||aC>=aF.max){continue;}J.moveTo(Math.floor(aF.p2c(aC))+J.lineWidth/2,-5);J.lineTo(Math.floor(aF.p2c(aC))+J.lineWidth/2,5);}aF=ab.y2axis;for(aE=0;aE<aF.ticks.length;++aE){aC=aF.ticks[aE].v;if(aC<=aF.min||aC>=aF.max){continue;}J.moveTo(p-5,Math.floor(aF.p2c(aC))+J.lineWidth/2);J.lineTo(p+5,Math.floor(aF.p2c(aC))+J.lineWidth/2);}J.stroke();if(P.grid.borderWidth){J.lineWidth=P.grid.borderWidth;J.strokeStyle=P.grid.color;J.lineJoin="round";J.strokeRect(0,0,p,ac);}J.restore();}function Q(){m.find(".tickLabels").remove();var aA='<div class="tickLabels" style="font-size:smaller;color:'+P.grid.color+'">';function aB(aE,aF){for(var aD=0;aD<aE.ticks.length;++aD){var aC=aE.ticks[aD];if(!aC.label||aC.v<aE.min||aC.v>aE.max){continue;}aA+=aF(aC,aE);}}aB(ab.xaxis,function(aC,aD){return'<div style="position:absolute;top:'+(N.top+ac+P.grid.labelMargin)+"px;left:"+(N.left+aD.p2c(aC.v)-aD.labelWidth/2)+"px;width:"+aD.labelWidth+'px;text-align:center" class="tickLabel">'+aC.label+"</div>";});aB(ab.yaxis,function(aC,aD){return'<div style="position:absolute;top:'+(N.top+aD.p2c(aC.v)-aD.labelHeight/2)+"px;right:"+(N.right+p+P.grid.labelMargin)+"px;width:"+aD.labelWidth+'px;text-align:right" class="tickLabel">'+aC.label+"</div>";});aB(ab.x2axis,function(aC,aD){return'<div style="position:absolute;bottom:'+(N.bottom+ac+P.grid.labelMargin)+"px;left:"+(N.left+aD.p2c(aC.v)-aD.labelWidth/2)+"px;width:"+aD.labelWidth+'px;text-align:center" class="tickLabel">'+aC.label+"</div>";});aB(ab.y2axis,function(aC,aD){return'<div style="position:absolute;top:'+(N.top+aD.p2c(aC.v)-aD.labelHeight/2)+"px;left:"+(N.left+p+P.grid.labelMargin)+"px;width:"+aD.labelWidth+'px;text-align:left" class="tickLabel">'+aC.label+"</div>";});aA+="</div>";m.append(aA);}function al(aA){if(aA.lines.show||(!aA.bars.show&&!aA.points.show)){K(aA);}if(aA.bars.show){V(aA);}if(aA.points.show){W(aA);}}function K(aC){function aB(aL,aJ,aP,aO){var aI,aQ=null,aF=null,aR=null;J.beginPath();for(var aK=0;aK<aL.length;++aK){aI=aQ;aQ=aL[aK];if(aI==null||aQ==null){continue;}var aH=aI[0],aN=aI[1],aG=aQ[0],aM=aQ[1];if(aN<=aM&&aN<aO.min){if(aM<aO.min){continue;}aH=(aO.min-aN)/(aM-aN)*(aG-aH)+aH;aN=aO.min;}else{if(aM<=aN&&aM<aO.min){if(aN<aO.min){continue;}aG=(aO.min-aN)/(aM-aN)*(aG-aH)+aH;aM=aO.min;}}if(aN>=aM&&aN>aO.max){if(aM>aO.max){continue;}aH=(aO.max-aN)/(aM-aN)*(aG-aH)+aH;aN=aO.max;}else{if(aM>=aN&&aM>aO.max){if(aN>aO.max){continue;}aG=(aO.max-aN)/(aM-aN)*(aG-aH)+aH;aM=aO.max;}}if(aH<=aG&&aH<aP.min){if(aG<aP.min){continue;}aN=(aP.min-aH)/(aG-aH)*(aM-aN)+aN;aH=aP.min;}else{if(aG<=aH&&aG<aP.min){if(aH<aP.min){continue;}aM=(aP.min-aH)/(aG-aH)*(aM-aN)+aN;aG=aP.min;}}if(aH>=aG&&aH>aP.max){if(aG>aP.max){continue;}aN=(aP.max-aH)/(aG-aH)*(aM-aN)+aN;aH=aP.max;}else{if(aG>=aH&&aG>aP.max){if(aH>aP.max){continue;}aM=(aP.max-aH)/(aG-aH)*(aM-aN)+aN;aG=aP.max;}}if(aF!=aP.p2c(aH)||aR!=aO.p2c(aN)+aJ){J.moveTo(aP.p2c(aH),aO.p2c(aN)+aJ);}aF=aP.p2c(aG);aR=aO.p2c(aM)+aJ;J.lineTo(aF,aR);}J.stroke();}function aD(aL,aS,aQ){var aJ,aT=null;var aF=Math.min(Math.max(0,aQ.min),aQ.max);var aO,aI=0;var aR=false;for(var aK=0;aK<aL.length;++aK){aJ=aT;aT=aL[aK];if(aR&&aJ!=null&&aT==null){J.lineTo(aS.p2c(aI),aQ.p2c(aF));J.fill();aR=false;continue;}if(aJ==null||aT==null){continue;}var aH=aJ[0],aP=aJ[1],aG=aT[0],aN=aT[1];if(aH<=aG&&aH<aS.min){if(aG<aS.min){continue;}aP=(aS.min-aH)/(aG-aH)*(aN-aP)+aP;aH=aS.min;}else{if(aG<=aH&&aG<aS.min){if(aH<aS.min){continue;}aN=(aS.min-aH)/(aG-aH)*(aN-aP)+aP;aG=aS.min;}}if(aH>=aG&&aH>aS.max){if(aG>aS.max){continue;}aP=(aS.max-aH)/(aG-aH)*(aN-aP)+aP;aH=aS.max;}else{if(aG>=aH&&aG>aS.max){if(aH>aS.max){continue;}aN=(aS.max-aH)/(aG-aH)*(aN-aP)+aP;aG=aS.max;}}if(!aR){J.beginPath();J.moveTo(aS.p2c(aH),aQ.p2c(aF));aR=true;}if(aP>=aQ.max&&aN>=aQ.max){J.lineTo(aS.p2c(aH),aQ.p2c(aQ.max));J.lineTo(aS.p2c(aG),aQ.p2c(aQ.max));continue;}else{if(aP<=aQ.min&&aN<=aQ.min){J.lineTo(aS.p2c(aH),aQ.p2c(aQ.min));J.lineTo(aS.p2c(aG),aQ.p2c(aQ.min));continue;}}var aU=aH,aM=aG;if(aP<=aN&&aP<aQ.min&&aN>=aQ.min){aH=(aQ.min-aP)/(aN-aP)*(aG-aH)+aH;aP=aQ.min;}else{if(aN<=aP&&aN<aQ.min&&aP>=aQ.min){aG=(aQ.min-aP)/(aN-aP)*(aG-aH)+aH;aN=aQ.min;}}if(aP>=aN&&aP>aQ.max&&aN<=aQ.max){aH=(aQ.max-aP)/(aN-aP)*(aG-aH)+aH;aP=aQ.max;}else{if(aN>=aP&&aN>aQ.max&&aP<=aQ.max){aG=(aQ.max-aP)/(aN-aP)*(aG-aH)+aH;aN=aQ.max;}}if(aH!=aU){if(aP<=aQ.min){aO=aQ.min;}else{aO=aQ.max;}J.lineTo(aS.p2c(aU),aQ.p2c(aO));J.lineTo(aS.p2c(aH),aQ.p2c(aO));}J.lineTo(aS.p2c(aH),aQ.p2c(aP));J.lineTo(aS.p2c(aG),aQ.p2c(aN));if(aG!=aM){if(aN<=aQ.min){aO=aQ.min;}else{aO=aQ.max;}J.lineTo(aS.p2c(aM),aQ.p2c(aO));J.lineTo(aS.p2c(aG),aQ.p2c(aO));}aI=Math.max(aG,aM);}if(aR){J.lineTo(aS.p2c(aI),aQ.p2c(aF));J.fill();}}J.save();J.translate(N.left,N.top);J.lineJoin="round";var aE=aC.lines.lineWidth;var aA=aC.shadowSize;if(aA>0){J.lineWidth=aA/2;J.strokeStyle="rgba(0,0,0,0.1)";aB(aC.data,aE/2+aA/2+J.lineWidth/2,aC.xaxis,aC.yaxis);J.lineWidth=aA/2;J.strokeStyle="rgba(0,0,0,0.2)";aB(aC.data,aE/2+J.lineWidth/2,aC.xaxis,aC.yaxis);}J.lineWidth=aE;J.strokeStyle=aC.color;ae(aC.lines,aC.color);if(aC.lines.fill){aD(aC.data,aC.xaxis,aC.yaxis);}aB(aC.data,0,aC.xaxis,aC.yaxis);J.restore();}function W(aB){function aE(aI,aG,aJ,aM,aK){for(var aH=0;aH<aI.length;++aH){if(aI[aH]==null){continue;}var aF=aI[aH][0],aL=aI[aH][1];if(aF<aM.min||aF>aM.max||aL<aK.min||aL>aK.max){continue;}J.beginPath();J.arc(aM.p2c(aF),aK.p2c(aL),aG,0,2*Math.PI,true);if(aJ){J.fill();}J.stroke();}}function aD(aI,aK,aG,aM,aJ){for(var aH=0;aH<aI.length;++aH){if(aI[aH]==null){continue;}var aF=aI[aH][0],aL=aI[aH][1];if(aF<aM.min||aF>aM.max||aL<aJ.min||aL>aJ.max){continue;}J.beginPath();J.arc(aM.p2c(aF),aJ.p2c(aL)+aK,aG,0,Math.PI,false);J.stroke();}}J.save();J.translate(N.left,N.top);var aC=aB.lines.lineWidth;var aA=aB.shadowSize;if(aA>0){J.lineWidth=aA/2;J.strokeStyle="rgba(0,0,0,0.1)";aD(aB.data,aA/2+J.lineWidth/2,aB.points.radius,aB.xaxis,aB.yaxis);J.lineWidth=aA/2;J.strokeStyle="rgba(0,0,0,0.2)";aD(aB.data,J.lineWidth/2,aB.points.radius,aB.xaxis,aB.yaxis);}J.lineWidth=aB.points.lineWidth;J.strokeStyle=aB.color;ae(aB.points,aB.color);aE(aB.data,aB.points.radius,aB.points.fill,aB.xaxis,aB.yaxis);J.restore();}function an(aL,aJ,aE,aK,aC,aQ,aP,aM,aH){var aO=true,aG=true,aD=true,aF=false,aB=aL+aE,aN=aL+aK,aA=0,aI=aJ;if(aI<aA){aI=0;aA=aJ;aF=true;aD=false;}if(aN<aP.min||aB>aP.max||aI<aM.min||aA>aM.max){return;}if(aB<aP.min){aB=aP.min;aO=false;}if(aN>aP.max){aN=aP.max;aG=false;}if(aA<aM.min){aA=aM.min;aF=false;}if(aI>aM.max){aI=aM.max;aD=false;}if(aQ){aH.beginPath();aH.moveTo(aP.p2c(aB),aM.p2c(aA)+aC);aH.lineTo(aP.p2c(aB),aM.p2c(aI)+aC);aH.lineTo(aP.p2c(aN),aM.p2c(aI)+aC);aH.lineTo(aP.p2c(aN),aM.p2c(aA)+aC);aH.fill();}if(aO||aG||aD||aF){aH.beginPath();aB=aP.p2c(aB);aA=aM.p2c(aA);aN=aP.p2c(aN);aI=aM.p2c(aI);aH.moveTo(aB,aA+aC);if(aO){aH.lineTo(aB,aI+aC);}else{aH.moveTo(aB,aI+aC);}if(aD){aH.lineTo(aN,aI+aC);}else{aH.moveTo(aN,aI+aC);}if(aG){aH.lineTo(aN,aA+aC);}else{aH.moveTo(aN,aA+aC);}if(aF){aH.lineTo(aB,aA+aC);}else{aH.moveTo(aB,aA+aC);}aH.stroke();}}function V(aC){function aB(aG,aD,aF,aJ,aH,aK,aI){for(var aE=0;aE<aG.length;aE++){if(aG[aE]==null){continue;}an(aG[aE][0],aG[aE][1],aD,aF,aJ,aH,aK,aI,J);}}J.save();J.translate(N.left,N.top);J.lineJoin="round";J.lineWidth=aC.bars.lineWidth;J.strokeStyle=aC.color;ae(aC.bars,aC.color);var aA=aC.bars.align=="left"?0:-aC.bars.barWidth/2;aB(aC.data,aA,aA+aC.bars.barWidth,0,aC.bars.fill,aC.xaxis,aC.yaxis);J.restore();}function ae(aC,aA){var aB=aC.fill;if(!aB){return;}if(aC.fillColor){J.fillStyle=aC.fillColor;}else{var aD=e(aA);aD.a=typeof aB=="number"?aB:0.4;aD.normalize();J.fillStyle=aD.toString();}}function ax(){m.find(".legend").remove();if(!P.legend.show){return;}var aG=[];var aE=false;for(i=0;i<z.length;++i){if(!z[i].label){continue;}if(i%P.legend.noColumns==0){if(aE){aG.push("</tr>");}aG.push("<tr>");aE=true;}var aI=z[i].label;if(P.legend.labelFormatter!=null){aI=P.legend.labelFormatter(aI);}aG.push('<td class="legendColorBox"><div style="border:1px solid '+P.legend.labelBoxBorderColor+';padding:1px"><div style="width:14px;height:10px;background-color:'+z[i].color+';overflow:hidden"></div></div></td><td class="legendLabel">'+aI+"</td>");}if(aE){aG.push("</tr>");}if(aG.length==0){return;}var aK='<table style="font-size:smaller;color:'+P.grid.color+'">'+aG.join("")+"</table>";if(P.legend.container!=null){P.legend.container.html(aK);}else{var aH="";var aB=P.legend.position,aC=P.legend.margin;if(aB.charAt(0)=="n"){aH+="top:"+(aC+N.top)+"px;";}else{if(aB.charAt(0)=="s"){aH+="bottom:"+(aC+N.bottom)+"px;";}}if(aB.charAt(1)=="e"){aH+="right:"+(aC+N.right)+"px;";}else{if(aB.charAt(1)=="w"){aH+="left:"+(aC+N.left)+"px;";}}var aJ=f('<div class="legend">'+aK.replace('style="','style="position:absolute;'+aH+";")+"</div>").appendTo(m);if(P.legend.backgroundOpacity!=0){var aF=P.legend.backgroundColor;if(aF==null){var aD;if(P.grid.backgroundColor){aD=P.grid.backgroundColor;}else{aD=a(aJ);}aF=e(aD).adjust(null,null,null,1).toString();}var aA=aJ.children();f('<div style="position:absolute;width:'+aA.width()+"px;height:"+aA.height()+"px;"+aH+"background-color:"+aF+';"> </div>').prependTo(aJ).css("opacity",P.legend.backgroundOpacity);}}}var ah={pageX:null,pageY:null},G={first:{x:-1,y:-1},second:{x:-1,y:-1},show:false,active:false},ag=[],r=false,q=null,aa=null;function av(aG,aE){var aN=P.grid.mouseActiveRadius,aT=aN*aN+1,aV=null,aP=false;function aK(a0,aZ){return{datapoint:z[a0].data[aZ],dataIndex:aZ,series:z[a0],seriesIndex:a0};}for(var aS=0;aS<z.length;++aS){var aY=z[aS].data,aF=z[aS].xaxis,aD=z[aS].yaxis,aO=aF.c2p(aG),aM=aD.c2p(aE),aB=aN/aF.scale,aA=aN/aD.scale,aX=z[aS].bars.show,aW=!(z[aS].bars.show&&!(z[aS].lines.show||z[aS].points.show)),aC=z[aS].bars.align=="left"?0:-z[aS].bars.barWidth/2,aU=aC+z[aS].bars.barWidth;for(var aR=0;aR<aY.length;++aR){if(aY[aR]==null){continue;}var aI=aY[aR][0],aH=aY[aR][1];if(aX){if(!aP&&aO>=aI+aC&&aO<=aI+aU&&aM>=Math.min(0,aH)&&aM<=Math.max(0,aH)){aV=aK(aS,aR);}}if(aW){if((aI-aO>aB||aI-aO<-aB)||(aH-aM>aA||aH-aM<-aA)){continue;}var aL=Math.abs(aF.p2c(aI)-aG),aJ=Math.abs(aD.p2c(aH)-aE),aQ=aL*aL+aJ*aJ;if(aQ<aT){aT=aQ;aP=true;aV=aK(aS,aR);}}}}return aV;}function k(aB){var aC=aB||window.event;if(aC.pageX==null&&aC.clientX!=null){var aD=document.documentElement,aA=document.body;ah.pageX=aC.clientX+(aD&&aD.scrollLeft||aA.scrollLeft||0);ah.pageY=aC.clientY+(aD&&aD.scrollTop||aA.scrollTop||0);}else{ah.pageX=aC.pageX;ah.pageY=aC.pageY;}if(P.grid.hoverable&&!aa){aa=setTimeout(u,100);}if(G.active){am(ah);}}function ao(aA){if(aA.which!=1){return;}document.body.focus();if(document.onselectstart!==undefined&&v.onselectstart==null){v.onselectstart=document.onselectstart;document.onselectstart=function(){return false;};}if(document.ondrag!==undefined&&v.ondrag==null){v.ondrag=document.ondrag;document.ondrag=function(){return false;};}at(G.first,aA);ah.pageX=null;G.active=true;f(document).one("mouseup",B);}function M(aA){if(r){r=false;return;}o("plotclick",aA);}function u(){o("plothover",ah);aa=null;}function o(aB,aA){var aC=ar.offset(),aH={pageX:aA.pageX,pageY:aA.pageY},aF=aA.pageX-aC.left-N.left,aD=aA.pageY-aC.top-N.top;if(ab.xaxis.used){aH.x=ab.xaxis.c2p(aF);}if(ab.yaxis.used){aH.y=ab.yaxis.c2p(aD);}if(ab.x2axis.used){aH.x2=ab.x2axis.c2p(aF);}if(ab.y2axis.used){aH.y2=ab.y2axis.c2p(aD);}var aI=av(aF,aD);if(aI){aI.pageX=parseInt(aI.series.xaxis.p2c(aI.datapoint[0])+aC.left+N.left);aI.pageY=parseInt(aI.series.yaxis.p2c(aI.datapoint[1])+aC.top+N.top);}if(P.grid.autoHighlight){for(var aE=0;aE<ag.length;++aE){var aG=ag[aE];if(aG.auto&&!(aI&&aG.series==aI.series&&aG.point==aI.datapoint)){ai(aG.series,aG.point);}}if(aI){au(aI.series,aI.datapoint,true);}}m.trigger(aB,[aH,aI]);}function Y(){if(!q){q=setTimeout(w,50);}}function w(){q=null;az.save();az.clearRect(0,0,aj,C);az.translate(N.left,N.top);var aD,aC;for(aD=0;aD<ag.length;++aD){aC=ag[aD];if(aC.series.bars.show){ak(aC.series,aC.point);}else{af(aC.series,aC.point);}}az.restore();if(G.show&&E()){az.strokeStyle=e(P.selection.color).scale(null,null,null,0.8).toString();az.lineWidth=1;J.lineJoin="round";az.fillStyle=e(P.selection.color).scale(null,null,null,0.4).toString();var aA=Math.min(G.first.x,G.second.x),aF=Math.min(G.first.y,G.second.y),aB=Math.abs(G.second.x-G.first.x),aE=Math.abs(G.second.y-G.first.y);az.fillRect(aA+N.left,aF+N.top,aB,aE);az.strokeRect(aA+N.left,aF+N.top,aB,aE);}}function au(aC,aA,aD){if(typeof aC=="number"){aC=z[aC];}if(typeof aA=="number"){aA=aC.data[aA];}var aB=R(aC,aA);if(aB==-1){ag.push({series:aC,point:aA,auto:aD});Y();}else{if(!aD){ag[aB].auto=false;}}}function ai(aC,aA){if(typeof aC=="number"){aC=z[aC];}if(typeof aA=="number"){aA=aC.data[aA];}var aB=R(aC,aA);if(aB!=-1){ag.splice(aB,1);Y();}}function R(aC,aD){for(var aA=0;aA<ag.length;++aA){var aB=ag[aA];if(aB.series==aC&&aB.point[0]==aD[0]&&aB.point[1]==aD[1]){return aA;}}return -1;}function af(aD,aC){var aB=aC[0],aH=aC[1],aG=aD.xaxis,aF=aD.yaxis;if(aB<aG.min||aB>aG.max||aH<aF.min||aH>aF.max){return;}var aE=aD.points.radius+aD.points.lineWidth/2;az.lineWidth=aE;az.strokeStyle=e(aD.color).scale(1,1,1,0.5).toString();var aA=1.5*aE;az.beginPath();az.arc(aG.p2c(aB),aF.p2c(aH),aA,0,2*Math.PI,true);az.stroke();}function ak(aC,aA){az.lineJoin="round";az.lineWidth=aC.bars.lineWidth;az.strokeStyle=e(aC.color).scale(1,1,1,0.5).toString();az.fillStyle=e(aC.color).scale(1,1,1,0.5).toString();var aB=aC.bars.align=="left"?0:-aC.bars.barWidth/2;an(aA[0],aA[1],aB,aB+aC.bars.barWidth,0,true,aC.xaxis,aC.yaxis,az);}function S(){var aB=Math.min(G.first.x,G.second.x),aA=Math.max(G.first.x,G.second.x),aD=Math.max(G.first.y,G.second.y),aC=Math.min(G.first.y,G.second.y);var aE={};if(ab.xaxis.used){aE.xaxis={from:ab.xaxis.c2p(aB),to:ab.xaxis.c2p(aA)};}if(ab.x2axis.used){aE.x2axis={from:ab.x2axis.c2p(aB),to:ab.x2axis.c2p(aA)};}if(ab.yaxis.used){aE.yaxis={from:ab.yaxis.c2p(aD),to:ab.yaxis.c2p(aC)};}if(ab.y2axis.used){aE.yaxis={from:ab.y2axis.c2p(aD),to:ab.y2axis.c2p(aC)};}m.trigger("plotselected",[aE]);if(ab.xaxis.used&&ab.yaxis.used){m.trigger("selected",[{x1:aE.xaxis.from,y1:aE.yaxis.from,x2:aE.xaxis.to,y2:aE.yaxis.to}]);}}function B(aA){if(document.onselectstart!==undefined){document.onselectstart=v.onselectstart;}if(document.ondrag!==undefined){document.ondrag=v.ondrag;}G.active=false;am(aA);if(E()){S();r=true;}return false;}function at(aC,aA){var aB=ar.offset();if(P.selection.mode=="y"){if(aC==G.first){aC.x=0;}else{aC.x=p;}}else{aC.x=aA.pageX-aB.left-N.left;aC.x=Math.min(Math.max(0,aC.x),p);}if(P.selection.mode=="x"){if(aC==G.first){aC.y=0;}else{aC.y=ac;}}else{aC.y=aA.pageY-aB.top-N.top;aC.y=Math.min(Math.max(0,aC.y),ac);}}function am(aA){if(aA.pageX==null){return;}at(G.second,aA);if(E()){G.show=true;Y();}else{j();}}function j(){if(G.show){G.show=false;Y();}}function ad(aB,aA){var aC;if(P.selection.mode=="y"){G.first.x=0;G.second.x=p;}else{aC=y(aB,"x");G.first.x=aC.axis.p2c(aC.from);G.second.x=aC.axis.p2c(aC.to);}if(P.selection.mode=="x"){G.first.y=0;G.second.y=ac;}else{aC=y(aB,"y");G.first.y=aC.axis.p2c(aC.from);G.second.y=aC.axis.p2c(aC.to);}G.show=true;Y();if(!aA){S();}}function E(){var aA=5;return Math.abs(G.second.x-G.first.x)>=aA&&Math.abs(G.second.y-G.first.y)>=aA;}}f.plot=function(n,k,j){var m=new d(n,k,j);return m;};function c(k,j){return j*Math.floor(k/j);}function h(k,m,j){if(m<k){return m;}else{if(m>j){return j;}else{return m;}}}function g(q,p,k,n){var o=["r","g","b","a"];var j=4;while(-1<--j){this[o[j]]=arguments[j]||((j==3)?1:0);}this.toString=function(){if(this.a>=1){return"rgb("+[this.r,this.g,this.b].join(",")+")";}else{return"rgba("+[this.r,this.g,this.b,this.a].join(",")+")";}};this.scale=function(u,s,v,r){j=4;while(-1<--j){if(arguments[j]!=null){this[o[j]]*=arguments[j];}}return this.normalize();};this.adjust=function(u,s,v,r){j=4;while(-1<--j){if(arguments[j]!=null){this[o[j]]+=arguments[j];}}return this.normalize();};this.clone=function(){return new g(this.r,this.b,this.g,this.a);};var m=function(s,r,u){return Math.max(Math.min(s,u),r);};this.normalize=function(){this.r=m(parseInt(this.r),0,255);this.g=m(parseInt(this.g),0,255);this.b=m(parseInt(this.b),0,255);this.a=m(this.a,0,1);return this;};this.normalize();}var b={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0]};function a(k){var j,m=k;do{j=m.css("background-color").toLowerCase();if(j!=""&&j!="transparent"){break;}m=m.parent();}while(!f.nodeName(m.get(0),"body"));if(j=="rgba(0, 0, 0, 0)"){return"transparent";}return j;}function e(m){var j;if(j=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(m)){return new g(parseInt(j[1],10),parseInt(j[2],10),parseInt(j[3],10));}if(j=/rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(m)){return new g(parseInt(j[1],10),parseInt(j[2],10),parseInt(j[3],10),parseFloat(j[4]));}if(j=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(m)){return new g(parseFloat(j[1])*2.55,parseFloat(j[2])*2.55,parseFloat(j[3])*2.55);}if(j=/rgba\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(m)){return new g(parseFloat(j[1])*2.55,parseFloat(j[2])*2.55,parseFloat(j[3])*2.55,parseFloat(j[4]));}if(j=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(m)){return new g(parseInt(j[1],16),parseInt(j[2],16),parseInt(j[3],16));}if(j=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(m)){return new g(parseInt(j[1]+j[1],16),parseInt(j[2]+j[2],16),parseInt(j[3]+j[3],16));}var k=f.trim(m).toLowerCase();if(k=="transparent"){return new g(255,255,255,0);}else{j=b[k];return new g(j[0],j[1],j[2]);}}})(jQuery);(function($){$.extend({tablesorter:new function(){var parsers=[],widgets=[];this.defaults={cssHeader:"header",cssAsc:"headerSortUp",cssDesc:"headerSortDown",sortInitialOrder:"asc",sortMultiSortKey:"shiftKey",sortForce:null,sortAppend:null,textExtraction:"simple",parsers:{},widgets:[],widgetZebra:{css:["even","odd"]},headers:{},widthFixed:false,cancelSelection:true,sortList:[],headerList:[],dateFormat:"us",decimal:".",debug:false};function benchmark(s,d){log(s+","+(new Date().getTime()-d.getTime())+"ms");}this.benchmark=benchmark;function log(s){if(typeof console!="undefined"&&typeof console.debug!="undefined"){console.log(s);}else{alert(s);}}function buildParserCache(table,$headers){if(table.config.debug){var parsersDebug="";}var rows=table.tBodies[0].rows;if(table.tBodies[0].rows[0]){var list=[],cells=rows[0].cells,l=cells.length;for(var i=0;i<l;i++){var p=false;if($.metadata&&($($headers[i]).metadata()&&$($headers[i]).metadata().sorter)){p=getParserById($($headers[i]).metadata().sorter);}else{if((table.config.headers[i]&&table.config.headers[i].sorter)){p=getParserById(table.config.headers[i].sorter);}}if(!p){p=detectParserForColumn(table,cells[i]);}if(table.config.debug){parsersDebug+="column:"+i+" parser:"+p.id+"\n";}list.push(p);}}if(table.config.debug){log(parsersDebug);}return list;}function detectParserForColumn(table,node){var l=parsers.length;for(var i=1;i<l;i++){if(parsers[i].is($.trim(getElementText(table.config,node)),table,node)){return parsers[i];}}return parsers[0];}function getParserById(name){var l=parsers.length;for(var i=0;i<l;i++){if(parsers[i].id.toLowerCase()==name.toLowerCase()){return parsers[i];}}return false;}function buildCache(table){if(table.config.debug){var cacheTime=new Date();}var totalRows=(table.tBodies[0]&&table.tBodies[0].rows.length)||0,totalCells=(table.tBodies[0].rows[0]&&table.tBodies[0].rows[0].cells.length)||0,parsers=table.config.parsers,cache={row:[],normalized:[]};for(var i=0;i<totalRows;++i){var c=table.tBodies[0].rows[i],cols=[];cache.row.push($(c));for(var j=0;j<totalCells;++j){cols.push(parsers[j].format(getElementText(table.config,c.cells[j]),table,c.cells[j]));}cols.push(i);cache.normalized.push(cols);cols=null;}if(table.config.debug){benchmark("Building cache for "+totalRows+" rows:",cacheTime);}return cache;}function getElementText(config,node){if(!node){return"";}var t="";if(config.textExtraction=="simple"){if(node.childNodes[0]&&node.childNodes[0].hasChildNodes()){t=node.childNodes[0].innerHTML;}else{t=node.innerHTML;}}else{if(typeof(config.textExtraction)=="function"){t=config.textExtraction(node);}else{t=$(node).text();}}return t;}function appendToTable(table,cache){if(table.config.debug){var appendTime=new Date();}var c=cache,r=c.row,n=c.normalized,totalRows=n.length,checkCell=(n[0].length-1),tableBody=$(table.tBodies[0]),rows=[];for(var i=0;i<totalRows;i++){rows.push(r[n[i][checkCell]]);if(!table.config.appender){var o=r[n[i][checkCell]];var l=o.length;for(var j=0;j<l;j++){tableBody[0].appendChild(o[j]);}}}if(table.config.appender){table.config.appender(table,rows);}rows=null;if(table.config.debug){benchmark("Rebuilt table:",appendTime);}applyWidget(table);setTimeout(function(){$(table).trigger("sortEnd");},0);}function buildHeaders(table){if(table.config.debug){var time=new Date();}var meta=($.metadata)?true:false,tableHeadersRows=[];for(var i=0;i<table.tHead.rows.length;i++){tableHeadersRows[i]=0;}$tableHeaders=$("thead th",table);$tableHeaders.each(function(index){this.count=0;this.column=index;this.order=formatSortingOrder(table.config.sortInitialOrder);if(checkHeaderMetadata(this)||checkHeaderOptions(table,index)){this.sortDisabled=true;}if(!this.sortDisabled){$(this).addClass(table.config.cssHeader);}table.config.headerList[index]=this;});if(table.config.debug){benchmark("Built headers:",time);log($tableHeaders);}return $tableHeaders;}function checkCellColSpan(table,rows,row){var arr=[],r=table.tHead.rows,c=r[row].cells;for(var i=0;i<c.length;i++){var cell=c[i];if(cell.colSpan>1){arr=arr.concat(checkCellColSpan(table,headerArr,row++));}else{if(table.tHead.length==1||(cell.rowSpan>1||!r[row+1])){arr.push(cell);}}}return arr;}function checkHeaderMetadata(cell){if(($.metadata)&&($(cell).metadata().sorter===false)){return true;}return false;}function checkHeaderOptions(table,i){if((table.config.headers[i])&&(table.config.headers[i].sorter===false)){return true;}return false;}function applyWidget(table){var c=table.config.widgets;var l=c.length;for(var i=0;i<l;i++){getWidgetById(c[i]).format(table);}}function getWidgetById(name){var l=widgets.length;for(var i=0;i<l;i++){if(widgets[i].id.toLowerCase()==name.toLowerCase()){return widgets[i];}}}function formatSortingOrder(v){if(typeof(v)!="Number"){i=(v.toLowerCase()=="desc")?1:0;}else{i=(v==(0||1))?v:0;}return i;}function isValueInArray(v,a){var l=a.length;for(var i=0;i<l;i++){if(a[i][0]==v){return true;}}return false;}function setHeadersCss(table,$headers,list,css){$headers.removeClass(css[0]).removeClass(css[1]);var h=[];$headers.each(function(offset){if(!this.sortDisabled){h[this.column]=$(this);}});var l=list.length;for(var i=0;i<l;i++){h[list[i][0]].addClass(css[list[i][1]]);}}function fixColumnWidth(table,$headers){var c=table.config;if(c.widthFixed){var colgroup=$("<colgroup>");$("tr:first td",table.tBodies[0]).each(function(){colgroup.append($("<col>").css("width",$(this).width()));});$(table).prepend(colgroup);}}function updateHeaderSortCount(table,sortList){var c=table.config,l=sortList.length;for(var i=0;i<l;i++){var s=sortList[i],o=c.headerList[s[0]];o.count=s[1];o.count++;}}function multisort(table,sortList,cache){if(table.config.debug){var sortTime=new Date();}var dynamicExp="var sortWrapper = function(a,b) {",l=sortList.length;for(var i=0;i<l;i++){var c=sortList[i][0];var order=sortList[i][1];var s=(getCachedSortType(table.config.parsers,c)=="text")?((order==0)?"sortText":"sortTextDesc"):((order==0)?"sortNumeric":"sortNumericDesc");var e="e"+i;dynamicExp+="var "+e+" = "+s+"(a["+c+"],b["+c+"]); ";dynamicExp+="if("+e+") { return "+e+"; } ";dynamicExp+="else { ";}var orgOrderCol=cache.normalized[0].length-1;dynamicExp+="return a["+orgOrderCol+"]-b["+orgOrderCol+"];";for(var i=0;i<l;i++){dynamicExp+="}; ";}dynamicExp+="return 0; ";dynamicExp+="}; ";eval(dynamicExp);cache.normalized.sort(sortWrapper);if(table.config.debug){benchmark("Sorting on "+sortList.toString()+" and dir "+order+" time:",sortTime);}return cache;}function sortText(a,b){return((a<b)?-1:((a>b)?1:0));}function sortTextDesc(a,b){return((b<a)?-1:((b>a)?1:0));}function sortNumeric(a,b){return a-b;}function sortNumericDesc(a,b){return b-a;}function getCachedSortType(parsers,i){return parsers[i].type;}this.construct=function(settings){return this.each(function(){if(!this.tHead||!this.tBodies){return;}var $this,$document,$headers,cache,config,shiftDown=0,sortOrder;this.config={};config=$.extend(this.config,$.tablesorter.defaults,settings);$this=$(this);$headers=buildHeaders(this);this.config.parsers=buildParserCache(this,$headers);cache=buildCache(this);var sortCSS=[config.cssDesc,config.cssAsc];fixColumnWidth(this);$headers.click(function(e){$this.trigger("sortStart");var totalRows=($this[0].tBodies[0]&&$this[0].tBodies[0].rows.length)||0;if(!this.sortDisabled&&totalRows>0){var $cell=$(this);var i=this.column;this.order=this.count++%2;if(!e[config.sortMultiSortKey]){config.sortList=[];if(config.sortForce!=null){var a=config.sortForce;for(var j=0;j<a.length;j++){if(a[j][0]!=i){config.sortList.push(a[j]);}}}config.sortList.push([i,this.order]);}else{if(isValueInArray(i,config.sortList)){for(var j=0;j<config.sortList.length;j++){var s=config.sortList[j],o=config.headerList[s[0]];if(s[0]==i){o.count=s[1];o.count++;s[1]=o.count%2;}}}else{config.sortList.push([i,this.order]);}}setTimeout(function(){setHeadersCss($this[0],$headers,config.sortList,sortCSS);appendToTable($this[0],multisort($this[0],config.sortList,cache));},1);return false;}}).mousedown(function(){if(config.cancelSelection){this.onselectstart=function(){return false;};return false;}});$this.bind("update",function(){this.config.parsers=buildParserCache(this,$headers);cache=buildCache(this);}).bind("sorton",function(e,list){$(this).trigger("sortStart");config.sortList=list;var sortList=config.sortList;updateHeaderSortCount(this,sortList);setHeadersCss(this,$headers,sortList,sortCSS);appendToTable(this,multisort(this,sortList,cache));}).bind("appendCache",function(){appendToTable(this,cache);}).bind("applyWidgetId",function(e,id){getWidgetById(id).format(this);}).bind("applyWidgets",function(){applyWidget(this);});if($.metadata&&($(this).metadata()&&$(this).metadata().sortlist)){config.sortList=$(this).metadata().sortlist;}if(config.sortList.length>0){$this.trigger("sorton",[config.sortList]);}applyWidget(this);});};this.addParser=function(parser){var l=parsers.length,a=true;for(var i=0;i<l;i++){if(parsers[i].id.toLowerCase()==parser.id.toLowerCase()){a=false;}}if(a){parsers.push(parser);}};this.addWidget=function(widget){widgets.push(widget);};this.formatFloat=function(s){var i=parseFloat(s);return(isNaN(i))?0:i;};this.formatInt=function(s){var i=parseInt(s);return(isNaN(i))?0:i;};this.isDigit=function(s,config){var DECIMAL="\\"+config.decimal;var exp="/(^[+]?0("+DECIMAL+"0+)?$)|(^([-+]?[1-9][0-9]*)$)|(^([-+]?((0?|[1-9][0-9]*)"+DECIMAL+"(0*[1-9][0-9]*)))$)|(^[-+]?[1-9]+[0-9]*"+DECIMAL+"0+$)/";return RegExp(exp).test($.trim(s));};this.clearTableBody=function(table){if($.browser.msie){function empty(){while(this.firstChild){this.removeChild(this.firstChild);}}empty.apply(table.tBodies[0]);}else{table.tBodies[0].innerHTML="";}};}});$.fn.extend({tablesorter:$.tablesorter.construct});var ts=$.tablesorter;ts.addParser({id:"text",is:function(s){return true;},format:function(s){return $.trim(s.toLowerCase());},type:"text"});ts.addParser({id:"digit",is:function(s,table){var c=table.config;return $.tablesorter.isDigit(s,c);},format:function(s){return $.tablesorter.formatFloat(s);},type:"numeric"});ts.addParser({id:"currency",is:function(s){return/^[£$€?.]/.test(s);},format:function(s){return $.tablesorter.formatFloat(s.replace(new RegExp(/[^0-9.]/g),""));},type:"numeric"});ts.addParser({id:"ipAddress",is:function(s){return/^\d{2,3}[\.]\d{2,3}[\.]\d{2,3}[\.]\d{2,3}$/.test(s);},format:function(s){var a=s.split("."),r="",l=a.length;for(var i=0;i<l;i++){var item=a[i];if(item.length==2){r+="0"+item;}else{r+=item;}}return $.tablesorter.formatFloat(r);},type:"numeric"});ts.addParser({id:"url",is:function(s){return/^(https?|ftp|file):\/\/$/.test(s);},format:function(s){return jQuery.trim(s.replace(new RegExp(/(https?|ftp|file):\/\//),""));},type:"text"});ts.addParser({id:"isoDate",is:function(s){return/^\d{4}[\/-]\d{1,2}[\/-]\d{1,2}$/.test(s);},format:function(s){return $.tablesorter.formatFloat((s!="")?new Date(s.replace(new RegExp(/-/g),"/")).getTime():"0");},type:"numeric"});ts.addParser({id:"percent",is:function(s){return/\%$/.test($.trim(s));},format:function(s){return $.tablesorter.formatFloat(s.replace(new RegExp(/%/g),""));},type:"numeric"});ts.addParser({id:"usLongDate",is:function(s){return s.match(new RegExp(/^[A-Za-z]{3,10}\.? [0-9]{1,2}, ([0-9]{4}|'?[0-9]{2}) (([0-2]?[0-9]:[0-5][0-9])|([0-1]?[0-9]:[0-5][0-9]\s(AM|PM)))$/));},format:function(s){return $.tablesorter.formatFloat(new Date(s).getTime());},type:"numeric"});ts.addParser({id:"shortDate",is:function(s){return/\d{1,2}[\/\-]\d{1,2}[\/\-]\d{2,4}/.test(s);},format:function(s,table){var c=table.config;s=s.replace(/\-/g,"/");if(c.dateFormat=="us"){s=s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{4})/,"$3/$1/$2");}else{if(c.dateFormat=="uk"){s=s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{4})/,"$3/$2/$1");}else{if(c.dateFormat=="dd/mm/yy"||c.dateFormat=="dd-mm-yy"){s=s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{2})/,"$1/$2/$3");}}}return $.tablesorter.formatFloat(new Date(s).getTime());},type:"numeric"});ts.addParser({id:"time",is:function(s){return/^(([0-2]?[0-9]:[0-5][0-9])|([0-1]?[0-9]:[0-5][0-9]\s(am|pm)))$/.test(s);},format:function(s){return $.tablesorter.formatFloat(new Date("2000/01/01 "+s).getTime());},type:"numeric"});ts.addParser({id:"metadata",is:function(s){return false;},format:function(s,table,cell){var c=table.config,p=(!c.parserMetadataName)?"sortValue":c.parserMetadataName;return $(cell).metadata()[p];},type:"numeric"});ts.addWidget({id:"zebra",format:function(table){if(table.config.debug){var time=new Date();}$("tr:visible",table.tBodies[0]).filter(":even").removeClass(table.config.widgetZebra.css[1]).addClass(table.config.widgetZebra.css[0]).end().filter(":odd").removeClass(table.config.widgetZebra.css[0]).addClass(table.config.widgetZebra.css[1]);if(table.config.debug){$.tablesorter.benchmark("Applying Zebra widget",time);}}});})(jQuery);jQuery.uiTableFilter=function(d,e,f,c){var h=false;if(this.last_phrase===e){return false;}var n=e.length;var j=e.toLowerCase().split(" ");var m=function(o){o.show();};var b=function(o){o.hide();};if(f){var g=null;d.find("thead > tr:last > th").each(function(o){if($(this).text()==f){g=o;return false;}});var k="td:eq("+g+")";var a=function(){var o=jQuery(this);jQuery.uiTableFilter.has_words(jQuery(o.find(k)).text(),j)?m(o):b(o);};}else{var a=function(){var o=jQuery(this);jQuery.uiTableFilter.has_words(o.text(),j)?o.show():o.hide();};}if((j.size>1)&&(e.substr(0,n-1)===this.last_phrase)){if(e[-1]===" "){this.last_phrase=e;return false;}m=function(o){o.hide();h=true;};b=function(o){};var j=j[-1];d.find("tbody tr:visible").each(a);}else{h=true;d.find("tbody > tr").each(a);}last_phrase=e;if(c&&h){c();}return d;};jQuery.uiTableFilter.last_phrase="";jQuery.uiTableFilter.has_words=function(e,d,a){var c=a?e:e.toLowerCase();for(var b=0;b<d.length;b++){if(c.indexOf(d[b])===-1){return false;}}return true;};function showDiv(a){if($("#"+a).is(":visible")){return;}else{$("#"+a).show("slow");}}function showfile(b,a){showfilelegend(b,a,"");}function showfilelegend(b,a,c){$.get(b,function(e){var f="<b>"+b+"</b><br />",d="<hr /><br />";$("#"+a).html(f+c+d+e);});if($("#"+a).parent("div").is(":visible")){return;}else{$("#"+a).parent("div").show("slow");}}function sortIndex(){var a=$("#idx");a.tablesorter({headers:{1:{sorter:false}},sortList:[[3,1],[0,0]]});}function tablefunc(a){var b=$("#"+a+"Occ");if(b.find("thead > tr:last > th").length>6){b.tablesorter({headers:{5:{sorter:"text"},7:{sorter:"text"}},sortList:[[6,1],[4,1],[0,0]],widgets:["zebra"]});}else{b.tablesorter({headers:{4:{sorter:"text"}},sortList:[[3,1],[0,0]],widgets:["zebra"]});}$("#"+a+"Tf").tablesorter({headers:{0:{sorter:false}},widgets:["zebra"]});b.find("tbody > tr").find("td:eq(1)").mousedown(function(){$(this).prev().find(":checkbox").click();});$("#"+a+"-filter").keyup(function(){$.uiTableFilter(b,this.value);});$("#"+a+"-form").submit(function(){b.find("tbody > tr:visible > td:eq(1)").mousedown();return false;}).focus();}function hideJalview(a){$("#"+a).hide("slow");}function runJalview(e,b,a){var d="jalview.bin.JalviewLite",f="lib/jalviewApplet.jar",g='<a href="#" onclick="hideJalview(\''+a+"');\">Hide Alignment</a><h1>Alignment</h1><br />",c='<OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" codebase="http://java.sun.com/update/1.5.0/jinstall-1_5-windows-i586.cab#Version=1,5,0,0" width="0" height="0"> <param name="code" value="'+d+'"> <param name="type" value="application/x-java-applet;version=1.5"> <param name="java_archive" value="'+f+'"> <param name="scriptable" value="false"> <param name="file" value="result/fasta/'+b+'.fasta"> <param name="features" value="result/fasta/'+e+"_"+b+'.txt"> <param name="defaultColour" value="% identity"> <param name="wrap" value="true"> <param name="label" value="'+b+'"> <param name="showFullId" value="false"> <param name="showAnnotation" value="true"> <param name="embedded" value="false"> <param name="showbutton" value="false"> <comment> <embed type="application/x-java-applet;version=1.5" code="'+d+'" width="0" height="0" code="jalview.bin.JalviewLite" java_archive="'+f+'" file="result/fasta/'+b+'.fasta" features="result/fasta/'+e+"_"+b+'.txt" defaultColour="% identity" wrap="true" label="'+b+'" showFullId="false" showAnnotation="true" embedded="false" scriptable="flase" showbutton="false" pluginspage="http://java.sun.com/products/plugin/index.html#download" /> <noembed> Your browser does not support Java Applets </noembed> </comment> </object>';$("#"+a).append(c);}