﻿/*
 * 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 l=this,g,y=l.jQuery,p=l.$,o=l.jQuery=l.$=function(E,F){return new o.fn.init(E,F)},D=/^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,f=/^.[^:#\[\.,]*$/;o.fn=o.prototype={init:function(E,H){E=E||document;if(E.nodeType){this[0]=E;this.length=1;this.context=E;return this}if(typeof E==="string"){var G=D.exec(E);if(G&&(G[1]||!H)){if(G[1]){E=o.clean([G[1]],H)}else{var I=document.getElementById(G[3]);if(I&&I.id!=G[3]){return o().find(E)}var F=o(I||[]);F.context=document;F.selector=E;return F}}else{return o(H).find(E)}}else{if(o.isFunction(E)){return o(document).ready(E)}}if(E.selector&&E.context){this.selector=E.selector;this.context=E.context}return this.setArray(o.isArray(E)?E:o.makeArray(E))},selector:"",jquery:"1.3.2",size:function(){return this.length},get:function(E){return E===g?Array.prototype.slice.call(this):this[E]},pushStack:function(F,H,E){var G=o(F);G.prevObject=this;G.context=this.context;if(H==="find"){G.selector=this.selector+(this.selector?" ":"")+E}else{if(H){G.selector=this.selector+"."+H+"("+E+")"}}return G},setArray:function(E){this.length=0;Array.prototype.push.apply(this,E);return this},each:function(F,E){return o.each(this,F,E)},index:function(E){return o.inArray(E&&E.jquery?E[0]:E,this)},attr:function(F,H,G){var E=F;if(typeof F==="string"){if(H===g){return this[0]&&o[G||"attr"](this[0],F)}else{E={};E[F]=H}}return this.each(function(I){for(F in E){o.attr(G?this.style:this,F,o.prop(this,E[F],G,I,F))}})},css:function(E,F){if((E=="width"||E=="height")&&parseFloat(F)<0){F=g}return this.attr(E,F,"curCSS")},text:function(F){if(typeof F!=="object"&&F!=null){return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(F))}var E="";o.each(F||this,function(){o.each(this.childNodes,function(){if(this.nodeType!=8){E+=this.nodeType!=1?this.nodeValue:o.fn.text([this])}})});return E},wrapAll:function(E){if(this[0]){var F=o(E,this[0].ownerDocument).clone();if(this[0].parentNode){F.insertBefore(this[0])}F.map(function(){var G=this;while(G.firstChild){G=G.firstChild}return G}).append(this)}return this},wrapInner:function(E){return this.each(function(){o(this).contents().wrapAll(E)})},wrap:function(E){return this.each(function(){o(this).wrapAll(E)})},append:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.appendChild(E)}})},prepend:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.insertBefore(E,this.firstChild)}})},before:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this)})},after:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this.nextSibling)})},end:function(){return this.prevObject||o([])},push:[].push,sort:[].sort,splice:[].splice,find:function(E){if(this.length===1){var F=this.pushStack([],"find",E);F.length=0;o.find(E,this[0],F);return F}else{return this.pushStack(o.unique(o.map(this,function(G){return o.find(E,G)})),"find",E)}},clone:function(G){var E=this.map(function(){if(!o.support.noCloneEvent&&!o.isXMLDoc(this)){var I=this.outerHTML;if(!I){var J=this.ownerDocument.createElement("div");J.appendChild(this.cloneNode(true));I=J.innerHTML}return o.clean([I.replace(/ jQuery\d+="(?:\d+|null)"/g,"").replace(/^\s*/,"")])[0]}else{return this.cloneNode(true)}});if(G===true){var H=this.find("*").andSelf(),F=0;E.find("*").andSelf().each(function(){if(this.nodeName!==H[F].nodeName){return}var I=o.data(H[F],"events");for(var K in I){for(var J in I[K]){o.event.add(this,K,I[K][J],I[K][J].data)}}F++})}return E},filter:function(E){return this.pushStack(o.isFunction(E)&&o.grep(this,function(G,F){return E.call(G,F)})||o.multiFilter(E,o.grep(this,function(F){return F.nodeType===1})),"filter",E)},closest:function(E){var G=o.expr.match.POS.test(E)?o(E):null,F=0;return this.map(function(){var H=this;while(H&&H.ownerDocument){if(G?G.index(H)>-1:o(H).is(E)){o.data(H,"closest",F);return H}H=H.parentNode;F++}})},not:function(E){if(typeof E==="string"){if(f.test(E)){return this.pushStack(o.multiFilter(E,this,true),"not",E)}else{E=o.multiFilter(E,this)}}var F=E.length&&E[E.length-1]!==g&&!E.nodeType;return this.filter(function(){return F?o.inArray(this,E)<0:this!=E})},add:function(E){return this.pushStack(o.unique(o.merge(this.get(),typeof E==="string"?o(E):o.makeArray(E))))},is:function(E){return !!E&&o.multiFilter(E,this).length>0},hasClass:function(E){return !!E&&this.is("."+E)},val:function(K){if(K===g){var E=this[0];if(E){if(o.nodeName(E,"option")){return(E.attributes.value||{}).specified?E.value:E.text}if(o.nodeName(E,"select")){var I=E.selectedIndex,L=[],M=E.options,H=E.type=="select-one";if(I<0){return null}for(var F=H?I:0,J=H?I+1:M.length;F<J;F++){var G=M[F];if(G.selected){K=o(G).val();if(H){return K}L.push(K)}}return L}return(E.value||"").replace(/\r/g,"")}return g}if(typeof K==="number"){K+=""}return this.each(function(){if(this.nodeType!=1){return}if(o.isArray(K)&&/radio|checkbox/.test(this.type)){this.checked=(o.inArray(this.value,K)>=0||o.inArray(this.name,K)>=0)}else{if(o.nodeName(this,"select")){var N=o.makeArray(K);o("option",this).each(function(){this.selected=(o.inArray(this.value,N)>=0||o.inArray(this.text,N)>=0)});if(!N.length){this.selectedIndex=-1}}else{this.value=K}}})},html:function(E){return E===g?(this[0]?this[0].innerHTML.replace(/ jQuery\d+="(?:\d+|null)"/g,""):null):this.empty().append(E)},replaceWith:function(E){return this.after(E).remove()},eq:function(E){return this.slice(E,+E+1)},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments),"slice",Array.prototype.slice.call(arguments).join(","))},map:function(E){return this.pushStack(o.map(this,function(G,F){return E.call(G,F,G)}))},andSelf:function(){return this.add(this.prevObject)},domManip:function(J,M,L){if(this[0]){var I=(this[0].ownerDocument||this[0]).createDocumentFragment(),F=o.clean(J,(this[0].ownerDocument||this[0]),I),H=I.firstChild;if(H){for(var G=0,E=this.length;G<E;G++){L.call(K(this[G],H),this.length>1||G>0?I.cloneNode(true):I)}}if(F){o.each(F,z)}}return this;function K(N,O){return M&&o.nodeName(N,"table")&&o.nodeName(O,"tr")?(N.getElementsByTagName("tbody")[0]||N.appendChild(N.ownerDocument.createElement("tbody"))):N}}};o.fn.init.prototype=o.fn;function z(E,F){if(F.src){o.ajax({url:F.src,async:false,dataType:"script"})}else{o.globalEval(F.text||F.textContent||F.innerHTML||"")}if(F.parentNode){F.parentNode.removeChild(F)}}function e(){return +new Date}o.extend=o.fn.extend=function(){var J=arguments[0]||{},H=1,I=arguments.length,E=false,G;if(typeof J==="boolean"){E=J;J=arguments[1]||{};H=2}if(typeof J!=="object"&&!o.isFunction(J)){J={}}if(I==H){J=this;--H}for(;H<I;H++){if((G=arguments[H])!=null){for(var F in G){var K=J[F],L=G[F];if(J===L){continue}if(E&&L&&typeof L==="object"&&!L.nodeType){J[F]=o.extend(E,K||(L.length!=null?[]:{}),L)}else{if(L!==g){J[F]=L}}}}}return J};var b=/z-?index|font-?weight|opacity|zoom|line-?height/i,q=document.defaultView||{},s=Object.prototype.toString;o.extend({noConflict:function(E){l.$=p;if(E){l.jQuery=y}return o},isFunction:function(E){return s.call(E)==="[object Function]"},isArray:function(E){return s.call(E)==="[object Array]"},isXMLDoc:function(E){return E.nodeType===9&&E.documentElement.nodeName!=="HTML"||!!E.ownerDocument&&o.isXMLDoc(E.ownerDocument)},globalEval:function(G){if(G&&/\S/.test(G)){var F=document.getElementsByTagName("head")[0]||document.documentElement,E=document.createElement("script");E.type="text/javascript";if(o.support.scriptEval){E.appendChild(document.createTextNode(G))}else{E.text=G}F.insertBefore(E,F.firstChild);F.removeChild(E)}},nodeName:function(F,E){return F.nodeName&&F.nodeName.toUpperCase()==E.toUpperCase()},each:function(G,K,F){var E,H=0,I=G.length;if(F){if(I===g){for(E in G){if(K.apply(G[E],F)===false){break}}}else{for(;H<I;){if(K.apply(G[H++],F)===false){break}}}}else{if(I===g){for(E in G){if(K.call(G[E],E,G[E])===false){break}}}else{for(var J=G[0];H<I&&K.call(J,H,J)!==false;J=G[++H]){}}}return G},prop:function(H,I,G,F,E){if(o.isFunction(I)){I=I.call(H,F)}return typeof I==="number"&&G=="curCSS"&&!b.test(E)?I+"px":I},className:{add:function(E,F){o.each((F||"").split(/\s+/),function(G,H){if(E.nodeType==1&&!o.className.has(E.className,H)){E.className+=(E.className?" ":"")+H}})},remove:function(E,F){if(E.nodeType==1){E.className=F!==g?o.grep(E.className.split(/\s+/),function(G){return !o.className.has(F,G)}).join(" "):""}},has:function(F,E){return F&&o.inArray(E,(F.className||F).toString().split(/\s+/))>-1}},swap:function(H,G,I){var E={};for(var F in G){E[F]=H.style[F];H.style[F]=G[F]}I.call(H);for(var F in G){H.style[F]=E[F]}},css:function(H,F,J,E){if(F=="width"||F=="height"){var L,G={position:"absolute",visibility:"hidden",display:"block"},K=F=="width"?["Left","Right"]:["Top","Bottom"];function I(){L=F=="width"?H.offsetWidth:H.offsetHeight;if(E==="border"){return}o.each(K,function(){if(!E){L-=parseFloat(o.curCSS(H,"padding"+this,true))||0}if(E==="margin"){L+=parseFloat(o.curCSS(H,"margin"+this,true))||0}else{L-=parseFloat(o.curCSS(H,"border"+this+"Width",true))||0}})}if(H.offsetWidth!==0){I()}else{o.swap(H,G,I)}return Math.max(0,Math.round(L))}return o.curCSS(H,F,J)},curCSS:function(I,F,G){var L,E=I.style;if(F=="opacity"&&!o.support.opacity){L=o.attr(E,"opacity");return L==""?"1":L}if(F.match(/float/i)){F=w}if(!G&&E&&E[F]){L=E[F]}else{if(q.getComputedStyle){if(F.match(/float/i)){F="float"}F=F.replace(/([A-Z])/g,"-$1").toLowerCase();var M=q.getComputedStyle(I,null);if(M){L=M.getPropertyValue(F)}if(F=="opacity"&&L==""){L="1"}}else{if(I.currentStyle){var J=F.replace(/\-(\w)/g,function(N,O){return O.toUpperCase()});L=I.currentStyle[F]||I.currentStyle[J];if(!/^\d+(px)?$/i.test(L)&&/^\d/.test(L)){var H=E.left,K=I.runtimeStyle.left;I.runtimeStyle.left=I.currentStyle.left;E.left=L||0;L=E.pixelLeft+"px";E.left=H;I.runtimeStyle.left=K}}}}return L},clean:function(F,K,I){K=K||document;if(typeof K.createElement==="undefined"){K=K.ownerDocument||K[0]&&K[0].ownerDocument||document}if(!I&&F.length===1&&typeof F[0]==="string"){var H=/^<(\w+)\s*\/?>$/.exec(F[0]);if(H){return[K.createElement(H[1])]}}var G=[],E=[],L=K.createElement("div");o.each(F,function(P,S){if(typeof S==="number"){S+=""}if(!S){return}if(typeof S==="string"){S=S.replace(/(<(\w+)[^>]*?)\/>/g,function(U,V,T){return T.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?U:V+"></"+T+">"});var O=S.replace(/^\s+/,"").substring(0,10).toLowerCase();var Q=!O.indexOf("<opt")&&[1,"<select multiple='multiple'>","</select>"]||!O.indexOf("<leg")&&[1,"<fieldset>","</fieldset>"]||O.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"<table>","</table>"]||!O.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!O.indexOf("<td")||!O.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||!O.indexOf("<col")&&[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"]||!o.support.htmlSerialize&&[1,"div<div>","</div>"]||[0,"",""];L.innerHTML=Q[1]+S+Q[2];while(Q[0]--){L=L.lastChild}if(!o.support.tbody){var R=/<tbody/i.test(S),N=!O.indexOf("<table")&&!R?L.firstChild&&L.firstChild.childNodes:Q[1]=="<table>"&&!R?L.childNodes:[];for(var M=N.length-1;M>=0;--M){if(o.nodeName(N[M],"tbody")&&!N[M].childNodes.length){N[M].parentNode.removeChild(N[M])}}}if(!o.support.leadingWhitespace&&/^\s/.test(S)){L.insertBefore(K.createTextNode(S.match(/^\s*/)[0]),L.firstChild)}S=o.makeArray(L.childNodes)}if(S.nodeType){G.push(S)}else{G=o.merge(G,S)}});if(I){for(var J=0;G[J];J++){if(o.nodeName(G[J],"script")&&(!G[J].type||G[J].type.toLowerCase()==="text/javascript")){E.push(G[J].parentNode?G[J].parentNode.removeChild(G[J]):G[J])}else{if(G[J].nodeType===1){G.splice.apply(G,[J+1,0].concat(o.makeArray(G[J].getElementsByTagName("script"))))}I.appendChild(G[J])}}return E}return G},attr:function(J,G,K){if(!J||J.nodeType==3||J.nodeType==8){return g}var H=!o.isXMLDoc(J),L=K!==g;G=H&&o.props[G]||G;if(J.tagName){var F=/href|src|style/.test(G);if(G=="selected"&&J.parentNode){J.parentNode.selectedIndex}if(G in J&&H&&!F){if(L){if(G=="type"&&o.nodeName(J,"input")&&J.parentNode){throw"type property can't be changed"}J[G]=K}if(o.nodeName(J,"form")&&J.getAttributeNode(G)){return J.getAttributeNode(G).nodeValue}if(G=="tabIndex"){var I=J.getAttributeNode("tabIndex");return I&&I.specified?I.value:J.nodeName.match(/(button|input|object|select|textarea)/i)?0:J.nodeName.match(/^(a|area)$/i)&&J.href?0:g}return J[G]}if(!o.support.style&&H&&G=="style"){return o.attr(J.style,"cssText",K)}if(L){J.setAttribute(G,""+K)}var E=!o.support.hrefNormalized&&H&&F?J.getAttribute(G,2):J.getAttribute(G);return E===null?g:E}if(!o.support.opacity&&G=="opacity"){if(L){J.zoom=1;J.filter=(J.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(K)+""=="NaN"?"":"alpha(opacity="+K*100+")")}return J.filter&&J.filter.indexOf("opacity=")>=0?(parseFloat(J.filter.match(/opacity=([^)]*)/)[1])/100)+"":""}G=G.replace(/-([a-z])/ig,function(M,N){return N.toUpperCase()});if(L){J[G]=K}return J[G]},trim:function(E){return(E||"").replace(/^\s+|\s+$/g,"")},makeArray:function(G){var E=[];if(G!=null){var F=G.length;if(F==null||typeof G==="string"||o.isFunction(G)||G.setInterval){E[0]=G}else{while(F){E[--F]=G[F]}}}return E},inArray:function(G,H){for(var E=0,F=H.length;E<F;E++){if(H[E]===G){return E}}return -1},merge:function(H,E){var F=0,G,I=H.length;if(!o.support.getAll){while((G=E[F++])!=null){if(G.nodeType!=8){H[I++]=G}}}else{while((G=E[F++])!=null){H[I++]=G}}return H},unique:function(K){var F=[],E={};try{for(var G=0,H=K.length;G<H;G++){var J=o.data(K[G]);if(!E[J]){E[J]=true;F.push(K[G])}}}catch(I){F=K}return F},grep:function(F,J,E){var G=[];for(var H=0,I=F.length;H<I;H++){if(!E!=!J(F[H],H)){G.push(F[H])}}return G},map:function(E,J){var F=[];for(var G=0,H=E.length;G<H;G++){var I=J(E[G],G);if(I!=null){F[F.length]=I}}return F.concat.apply([],F)}});var C=navigator.userAgent.toLowerCase();o.browser={version:(C.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[0,"0"])[1],safari:/webkit/.test(C),opera:/opera/.test(C),msie:/msie/.test(C)&&!/opera/.test(C),mozilla:/mozilla/.test(C)&&!/(compatible|webkit)/.test(C)};o.each({parent:function(E){return E.parentNode},parents:function(E){return o.dir(E,"parentNode")},next:function(E){return o.nth(E,2,"nextSibling")},prev:function(E){return o.nth(E,2,"previousSibling")},nextAll:function(E){return o.dir(E,"nextSibling")},prevAll:function(E){return o.dir(E,"previousSibling")},siblings:function(E){return o.sibling(E.parentNode.firstChild,E)},children:function(E){return o.sibling(E.firstChild)},contents:function(E){return o.nodeName(E,"iframe")?E.contentDocument||E.contentWindow.document:o.makeArray(E.childNodes)}},function(E,F){o.fn[E]=function(G){var H=o.map(this,F);if(G&&typeof G=="string"){H=o.multiFilter(G,H)}return this.pushStack(o.unique(H),E,G)}});o.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(E,F){o.fn[E]=function(G){var J=[],L=o(G);for(var K=0,H=L.length;K<H;K++){var I=(K>0?this.clone(true):this).get();o.fn[F].apply(o(L[K]),I);J=J.concat(I)}return this.pushStack(J,E,G)}});o.each({removeAttr:function(E){o.attr(this,E,"");if(this.nodeType==1){this.removeAttribute(E)}},addClass:function(E){o.className.add(this,E)},removeClass:function(E){o.className.remove(this,E)},toggleClass:function(F,E){if(typeof E!=="boolean"){E=!o.className.has(this,F)}o.className[E?"add":"remove"](this,F)},remove:function(E){if(!E||o.filter(E,[this]).length){o("*",this).add([this]).each(function(){o.event.remove(this);o.removeData(this)});if(this.parentNode){this.parentNode.removeChild(this)}}},empty:function(){o(this).children().remove();while(this.firstChild){this.removeChild(this.firstChild)}}},function(E,F){o.fn[E]=function(){return this.each(F,arguments)}});function j(E,F){return E[0]&&parseInt(o.curCSS(E[0],F,true),10)||0}var h="jQuery"+e(),v=0,A={};o.extend({cache:{},data:function(F,E,G){F=F==l?A:F;var H=F[h];if(!H){H=F[h]=++v}if(E&&!o.cache[H]){o.cache[H]={}}if(G!==g){o.cache[H][E]=G}return E?o.cache[H][E]:H},removeData:function(F,E){F=F==l?A:F;var H=F[h];if(E){if(o.cache[H]){delete o.cache[H][E];E="";for(E in o.cache[H]){break}if(!E){o.removeData(F)}}}else{try{delete F[h]}catch(G){if(F.removeAttribute){F.removeAttribute(h)}}delete o.cache[H]}},queue:function(F,E,H){if(F){E=(E||"fx")+"queue";var G=o.data(F,E);if(!G||o.isArray(H)){G=o.data(F,E,o.makeArray(H))}else{if(H){G.push(H)}}}return G},dequeue:function(H,G){var E=o.queue(H,G),F=E.shift();if(!G||G==="fx"){F=E[0]}if(F!==g){F.call(H)}}});o.fn.extend({data:function(E,G){var H=E.split(".");H[1]=H[1]?"."+H[1]:"";if(G===g){var F=this.triggerHandler("getData"+H[1]+"!",[H[0]]);if(F===g&&this.length){F=o.data(this[0],E)}return F===g&&H[1]?this.data(H[0]):F}else{return this.trigger("setData"+H[1]+"!",[H[0],G]).each(function(){o.data(this,E,G)})}},removeData:function(E){return this.each(function(){o.removeData(this,E)})},queue:function(E,F){if(typeof E!=="string"){F=E;E="fx"}if(F===g){return o.queue(this[0],E)}return this.each(function(){var G=o.queue(this,E,F);if(E=="fx"&&G.length==1){G[0].call(this)}})},dequeue:function(E){return this.each(function(){o.dequeue(this,E)})}});
/*
 * 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 R=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?/g,L=0,H=Object.prototype.toString;var F=function(Y,U,ab,ac){ab=ab||[];U=U||document;if(U.nodeType!==1&&U.nodeType!==9){return[]}if(!Y||typeof Y!=="string"){return ab}var Z=[],W,af,ai,T,ad,V,X=true;R.lastIndex=0;while((W=R.exec(Y))!==null){Z.push(W[1]);if(W[2]){V=RegExp.rightContext;break}}if(Z.length>1&&M.exec(Y)){if(Z.length===2&&I.relative[Z[0]]){af=J(Z[0]+Z[1],U)}else{af=I.relative[Z[0]]?[U]:F(Z.shift(),U);while(Z.length){Y=Z.shift();if(I.relative[Y]){Y+=Z.shift()}af=J(Y,af)}}}else{var ae=ac?{expr:Z.pop(),set:E(ac)}:F.find(Z.pop(),Z.length===1&&U.parentNode?U.parentNode:U,Q(U));af=F.filter(ae.expr,ae.set);if(Z.length>0){ai=E(af)}else{X=false}while(Z.length){var ah=Z.pop(),ag=ah;if(!I.relative[ah]){ah=""}else{ag=Z.pop()}if(ag==null){ag=U}I.relative[ah](ai,ag,Q(U))}}if(!ai){ai=af}if(!ai){throw"Syntax error, unrecognized expression: "+(ah||Y)}if(H.call(ai)==="[object Array]"){if(!X){ab.push.apply(ab,ai)}else{if(U.nodeType===1){for(var aa=0;ai[aa]!=null;aa++){if(ai[aa]&&(ai[aa]===true||ai[aa].nodeType===1&&K(U,ai[aa]))){ab.push(af[aa])}}}else{for(var aa=0;ai[aa]!=null;aa++){if(ai[aa]&&ai[aa].nodeType===1){ab.push(af[aa])}}}}}else{E(ai,ab)}if(V){F(V,U,ab,ac);if(G){hasDuplicate=false;ab.sort(G);if(hasDuplicate){for(var aa=1;aa<ab.length;aa++){if(ab[aa]===ab[aa-1]){ab.splice(aa--,1)}}}}}return ab};F.matches=function(T,U){return F(T,null,null,U)};F.find=function(aa,T,ab){var Z,X;if(!aa){return[]}for(var W=0,V=I.order.length;W<V;W++){var Y=I.order[W],X;if((X=I.match[Y].exec(aa))){var U=RegExp.leftContext;if(U.substr(U.length-1)!=="\\"){X[1]=(X[1]||"").replace(/\\/g,"");Z=I.find[Y](X,T,ab);if(Z!=null){aa=aa.replace(I.match[Y],"");break}}}}if(!Z){Z=T.getElementsByTagName("*")}return{set:Z,expr:aa}};F.filter=function(ad,ac,ag,W){var V=ad,ai=[],aa=ac,Y,T,Z=ac&&ac[0]&&Q(ac[0]);while(ad&&ac.length){for(var ab in I.filter){if((Y=I.match[ab].exec(ad))!=null){var U=I.filter[ab],ah,af;T=false;if(aa==ai){ai=[]}if(I.preFilter[ab]){Y=I.preFilter[ab](Y,aa,ag,ai,W,Z);if(!Y){T=ah=true}else{if(Y===true){continue}}}if(Y){for(var X=0;(af=aa[X])!=null;X++){if(af){ah=U(af,Y,X,aa);var ae=W^!!ah;if(ag&&ah!=null){if(ae){T=true}else{aa[X]=false}}else{if(ae){ai.push(af);T=true}}}}}if(ah!==g){if(!ag){aa=ai}ad=ad.replace(I.match[ab],"");if(!T){return[]}break}}}if(ad==V){if(T==null){throw"Syntax error, unrecognized expression: "+ad}else{break}}V=ad}return aa};var I=F.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(T){return T.getAttribute("href")}},relative:{"+":function(aa,T,Z){var X=typeof T==="string",ab=X&&!/\W/.test(T),Y=X&&!ab;if(ab&&!Z){T=T.toUpperCase()}for(var W=0,V=aa.length,U;W<V;W++){if((U=aa[W])){while((U=U.previousSibling)&&U.nodeType!==1){}aa[W]=Y||U&&U.nodeName===T?U||false:U===T}}if(Y){F.filter(T,aa,true)}},">":function(Z,U,aa){var X=typeof U==="string";if(X&&!/\W/.test(U)){U=aa?U:U.toUpperCase();for(var V=0,T=Z.length;V<T;V++){var Y=Z[V];if(Y){var W=Y.parentNode;Z[V]=W.nodeName===U?W:false}}}else{for(var V=0,T=Z.length;V<T;V++){var Y=Z[V];if(Y){Z[V]=X?Y.parentNode:Y.parentNode===U}}if(X){F.filter(U,Z,true)}}},"":function(W,U,Y){var V=L++,T=S;if(!U.match(/\W/)){var X=U=Y?U:U.toUpperCase();T=P}T("parentNode",U,V,W,X,Y)},"~":function(W,U,Y){var V=L++,T=S;if(typeof U==="string"&&!U.match(/\W/)){var X=U=Y?U:U.toUpperCase();T=P}T("previousSibling",U,V,W,X,Y)}},find:{ID:function(U,V,W){if(typeof V.getElementById!=="undefined"&&!W){var T=V.getElementById(U[1]);return T?[T]:[]}},NAME:function(V,Y,Z){if(typeof Y.getElementsByName!=="undefined"){var U=[],X=Y.getElementsByName(V[1]);for(var W=0,T=X.length;W<T;W++){if(X[W].getAttribute("name")===V[1]){U.push(X[W])}}return U.length===0?null:U}},TAG:function(T,U){return U.getElementsByTagName(T[1])}},preFilter:{CLASS:function(W,U,V,T,Z,aa){W=" "+W[1].replace(/\\/g,"")+" ";if(aa){return W}for(var X=0,Y;(Y=U[X])!=null;X++){if(Y){if(Z^(Y.className&&(" "+Y.className+" ").indexOf(W)>=0)){if(!V){T.push(Y)}}else{if(V){U[X]=false}}}}return false},ID:function(T){return T[1].replace(/\\/g,"")},TAG:function(U,T){for(var V=0;T[V]===false;V++){}return T[V]&&Q(T[V])?U[1]:U[1].toUpperCase()},CHILD:function(T){if(T[1]=="nth"){var U=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(T[2]=="even"&&"2n"||T[2]=="odd"&&"2n+1"||!/\D/.test(T[2])&&"0n+"+T[2]||T[2]);T[2]=(U[1]+(U[2]||1))-0;T[3]=U[3]-0}T[0]=L++;return T},ATTR:function(X,U,V,T,Y,Z){var W=X[1].replace(/\\/g,"");if(!Z&&I.attrMap[W]){X[1]=I.attrMap[W]}if(X[2]==="~="){X[4]=" "+X[4]+" "}return X},PSEUDO:function(X,U,V,T,Y){if(X[1]==="not"){if(X[3].match(R).length>1||/^\w/.test(X[3])){X[3]=F(X[3],null,null,U)}else{var W=F.filter(X[3],U,V,true^Y);if(!V){T.push.apply(T,W)}return false}}else{if(I.match.POS.test(X[0])||I.match.CHILD.test(X[0])){return true}}return X},POS:function(T){T.unshift(true);return T}},filters:{enabled:function(T){return T.disabled===false&&T.type!=="hidden"},disabled:function(T){return T.disabled===true},checked:function(T){return T.checked===true},selected:function(T){T.parentNode.selectedIndex;return T.selected===true},parent:function(T){return !!T.firstChild},empty:function(T){return !T.firstChild},has:function(V,U,T){return !!F(T[3],V).length},header:function(T){return/h\d/i.test(T.nodeName)},text:function(T){return"text"===T.type},radio:function(T){return"radio"===T.type},checkbox:function(T){return"checkbox"===T.type},file:function(T){return"file"===T.type},password:function(T){return"password"===T.type},submit:function(T){return"submit"===T.type},image:function(T){return"image"===T.type},reset:function(T){return"reset"===T.type},button:function(T){return"button"===T.type||T.nodeName.toUpperCase()==="BUTTON"},input:function(T){return/input|select|textarea|button/i.test(T.nodeName)}},setFilters:{first:function(U,T){return T===0},last:function(V,U,T,W){return U===W.length-1},even:function(U,T){return T%2===0},odd:function(U,T){return T%2===1},lt:function(V,U,T){return U<T[3]-0},gt:function(V,U,T){return U>T[3]-0},nth:function(V,U,T){return T[3]-0==U},eq:function(V,U,T){return T[3]-0==U}},filter:{PSEUDO:function(Z,V,W,aa){var U=V[1],X=I.filters[U];if(X){return X(Z,W,V,aa)}else{if(U==="contains"){return(Z.textContent||Z.innerText||"").indexOf(V[3])>=0}else{if(U==="not"){var Y=V[3];for(var W=0,T=Y.length;W<T;W++){if(Y[W]===Z){return false}}return true}}}},CHILD:function(T,W){var Z=W[1],U=T;switch(Z){case"only":case"first":while(U=U.previousSibling){if(U.nodeType===1){return false}}if(Z=="first"){return true}U=T;case"last":while(U=U.nextSibling){if(U.nodeType===1){return false}}return true;case"nth":var V=W[2],ac=W[3];if(V==1&&ac==0){return true}var Y=W[0],ab=T.parentNode;if(ab&&(ab.sizcache!==Y||!T.nodeIndex)){var X=0;for(U=ab.firstChild;U;U=U.nextSibling){if(U.nodeType===1){U.nodeIndex=++X}}ab.sizcache=Y}var aa=T.nodeIndex-ac;if(V==0){return aa==0}else{return(aa%V==0&&aa/V>=0)}}},ID:function(U,T){return U.nodeType===1&&U.getAttribute("id")===T},TAG:function(U,T){return(T==="*"&&U.nodeType===1)||U.nodeName===T},CLASS:function(U,T){return(" "+(U.className||U.getAttribute("class"))+" ").indexOf(T)>-1},ATTR:function(Y,W){var V=W[1],T=I.attrHandle[V]?I.attrHandle[V](Y):Y[V]!=null?Y[V]:Y.getAttribute(V),Z=T+"",X=W[2],U=W[4];return T==null?X==="!=":X==="="?Z===U:X==="*="?Z.indexOf(U)>=0:X==="~="?(" "+Z+" ").indexOf(U)>=0:!U?Z&&T!==false:X==="!="?Z!=U:X==="^="?Z.indexOf(U)===0:X==="$="?Z.substr(Z.length-U.length)===U:X==="|="?Z===U||Z.substr(0,U.length+1)===U+"-":false},POS:function(X,U,V,Y){var T=U[2],W=I.setFilters[T];if(W){return W(X,V,U,Y)}}}};var M=I.match.POS;for(var O in I.match){I.match[O]=RegExp(I.match[O].source+/(?![^\[]*\])(?![^\(]*\))/.source)}var E=function(U,T){U=Array.prototype.slice.call(U);if(T){T.push.apply(T,U);return T}return U};try{Array.prototype.slice.call(document.documentElement.childNodes)}catch(N){E=function(X,W){var U=W||[];if(H.call(X)==="[object Array]"){Array.prototype.push.apply(U,X)}else{if(typeof X.length==="number"){for(var V=0,T=X.length;V<T;V++){U.push(X[V])}}else{for(var V=0;X[V];V++){U.push(X[V])}}}return U}}var G;if(document.documentElement.compareDocumentPosition){G=function(U,T){var V=U.compareDocumentPosition(T)&4?-1:U===T?0:1;if(V===0){hasDuplicate=true}return V}}else{if("sourceIndex" in document.documentElement){G=function(U,T){var V=U.sourceIndex-T.sourceIndex;if(V===0){hasDuplicate=true}return V}}else{if(document.createRange){G=function(W,U){var V=W.ownerDocument.createRange(),T=U.ownerDocument.createRange();V.selectNode(W);V.collapse(true);T.selectNode(U);T.collapse(true);var X=V.compareBoundaryPoints(Range.START_TO_END,T);if(X===0){hasDuplicate=true}return X}}}}(function(){var U=document.createElement("form"),V="script"+(new Date).getTime();U.innerHTML="<input name='"+V+"'/>";var T=document.documentElement;T.insertBefore(U,T.firstChild);if(!!document.getElementById(V)){I.find.ID=function(X,Y,Z){if(typeof Y.getElementById!=="undefined"&&!Z){var W=Y.getElementById(X[1]);return W?W.id===X[1]||typeof W.getAttributeNode!=="undefined"&&W.getAttributeNode("id").nodeValue===X[1]?[W]:g:[]}};I.filter.ID=function(Y,W){var X=typeof Y.getAttributeNode!=="undefined"&&Y.getAttributeNode("id");return Y.nodeType===1&&X&&X.nodeValue===W}}T.removeChild(U)})();(function(){var T=document.createElement("div");T.appendChild(document.createComment(""));if(T.getElementsByTagName("*").length>0){I.find.TAG=function(U,Y){var X=Y.getElementsByTagName(U[1]);if(U[1]==="*"){var W=[];for(var V=0;X[V];V++){if(X[V].nodeType===1){W.push(X[V])}}X=W}return X}}T.innerHTML="<a href='#'></a>";if(T.firstChild&&typeof T.firstChild.getAttribute!=="undefined"&&T.firstChild.getAttribute("href")!=="#"){I.attrHandle.href=function(U){return U.getAttribute("href",2)}}})();if(document.querySelectorAll){(function(){var T=F,U=document.createElement("div");U.innerHTML="<p class='TEST'></p>";if(U.querySelectorAll&&U.querySelectorAll(".TEST").length===0){return}F=function(Y,X,V,W){X=X||document;if(!W&&X.nodeType===9&&!Q(X)){try{return E(X.querySelectorAll(Y),V)}catch(Z){}}return T(Y,X,V,W)};F.find=T.find;F.filter=T.filter;F.selectors=T.selectors;F.matches=T.matches})()}if(document.getElementsByClassName&&document.documentElement.getElementsByClassName){(function(){var T=document.createElement("div");T.innerHTML="<div class='test e'></div><div class='test'></div>";if(T.getElementsByClassName("e").length===0){return}T.lastChild.className="e";if(T.getElementsByClassName("e").length===1){return}I.order.splice(1,0,"CLASS");I.find.CLASS=function(U,V,W){if(typeof V.getElementsByClassName!=="undefined"&&!W){return V.getElementsByClassName(U[1])}}})()}function P(U,Z,Y,ad,aa,ac){var ab=U=="previousSibling"&&!ac;for(var W=0,V=ad.length;W<V;W++){var T=ad[W];if(T){if(ab&&T.nodeType===1){T.sizcache=Y;T.sizset=W}T=T[U];var X=false;while(T){if(T.sizcache===Y){X=ad[T.sizset];break}if(T.nodeType===1&&!ac){T.sizcache=Y;T.sizset=W}if(T.nodeName===Z){X=T;break}T=T[U]}ad[W]=X}}}function S(U,Z,Y,ad,aa,ac){var ab=U=="previousSibling"&&!ac;for(var W=0,V=ad.length;W<V;W++){var T=ad[W];if(T){if(ab&&T.nodeType===1){T.sizcache=Y;T.sizset=W}T=T[U];var X=false;while(T){if(T.sizcache===Y){X=ad[T.sizset];break}if(T.nodeType===1){if(!ac){T.sizcache=Y;T.sizset=W}if(typeof Z!=="string"){if(T===Z){X=true;break}}else{if(F.filter(Z,[T]).length>0){X=T;break}}}T=T[U]}ad[W]=X}}}var K=document.compareDocumentPosition?function(U,T){return U.compareDocumentPosition(T)&16}:function(U,T){return U!==T&&(U.contains?U.contains(T):true)};var Q=function(T){return T.nodeType===9&&T.documentElement.nodeName!=="HTML"||!!T.ownerDocument&&Q(T.ownerDocument)};var J=function(T,aa){var W=[],X="",Y,V=aa.nodeType?[aa]:aa;while((Y=I.match.PSEUDO.exec(T))){X+=Y[0];T=T.replace(I.match.PSEUDO,"")}T=I.relative[T]?T+"*":T;for(var Z=0,U=V.length;Z<U;Z++){F(T,V[Z],W)}return F.filter(X,W)};o.find=F;o.filter=F.filter;o.expr=F.selectors;o.expr[":"]=o.expr.filters;F.selectors.filters.hidden=function(T){return T.offsetWidth===0||T.offsetHeight===0};F.selectors.filters.visible=function(T){return T.offsetWidth>0||T.offsetHeight>0};F.selectors.filters.animated=function(T){return o.grep(o.timers,function(U){return T===U.elem}).length};o.multiFilter=function(V,T,U){if(U){V=":not("+V+")"}return F.matches(V,T)};o.dir=function(V,U){var T=[],W=V[U];while(W&&W!=document){if(W.nodeType==1){T.push(W)}W=W[U]}return T};o.nth=function(X,T,V,W){T=T||1;var U=0;for(;X;X=X[V]){if(X.nodeType==1&&++U==T){break}}return X};o.sibling=function(V,U){var T=[];for(;V;V=V.nextSibling){if(V.nodeType==1&&V!=U){T.push(V)}}return T};return;l.Sizzle=F})();o.event={add:function(I,F,H,K){if(I.nodeType==3||I.nodeType==8){return}if(I.setInterval&&I!=l){I=l}if(!H.guid){H.guid=this.guid++}if(K!==g){var G=H;H=this.proxy(G);H.data=K}var E=o.data(I,"events")||o.data(I,"events",{}),J=o.data(I,"handle")||o.data(I,"handle",function(){return typeof o!=="undefined"&&!o.event.triggered?o.event.handle.apply(arguments.callee.elem,arguments):g});J.elem=I;o.each(F.split(/\s+/),function(M,N){var O=N.split(".");N=O.shift();H.type=O.slice().sort().join(".");var L=E[N];if(o.event.specialAll[N]){o.event.specialAll[N].setup.call(I,K,O)}if(!L){L=E[N]={};if(!o.event.special[N]||o.event.special[N].setup.call(I,K,O)===false){if(I.addEventListener){I.addEventListener(N,J,false)}else{if(I.attachEvent){I.attachEvent("on"+N,J)}}}}L[H.guid]=H;o.event.global[N]=true});I=null},guid:1,global:{},remove:function(K,H,J){if(K.nodeType==3||K.nodeType==8){return}var G=o.data(K,"events"),F,E;if(G){if(H===g||(typeof H==="string"&&H.charAt(0)==".")){for(var I in G){this.remove(K,I+(H||""))}}else{if(H.type){J=H.handler;H=H.type}o.each(H.split(/\s+/),function(M,O){var Q=O.split(".");O=Q.shift();var N=RegExp("(^|\\.)"+Q.slice().sort().join(".*\\.")+"(\\.|$)");if(G[O]){if(J){delete G[O][J.guid]}else{for(var P in G[O]){if(N.test(G[O][P].type)){delete G[O][P]}}}if(o.event.specialAll[O]){o.event.specialAll[O].teardown.call(K,Q)}for(F in G[O]){break}if(!F){if(!o.event.special[O]||o.event.special[O].teardown.call(K,Q)===false){if(K.removeEventListener){K.removeEventListener(O,o.data(K,"handle"),false)}else{if(K.detachEvent){K.detachEvent("on"+O,o.data(K,"handle"))}}}F=null;delete G[O]}}})}for(F in G){break}if(!F){var L=o.data(K,"handle");if(L){L.elem=null}o.removeData(K,"events");o.removeData(K,"handle")}}},trigger:function(I,K,H,E){var G=I.type||I;if(!E){I=typeof I==="object"?I[h]?I:o.extend(o.Event(G),I):o.Event(G);if(G.indexOf("!")>=0){I.type=G=G.slice(0,-1);I.exclusive=true}if(!H){I.stopPropagation();if(this.global[G]){o.each(o.cache,function(){if(this.events&&this.events[G]){o.event.trigger(I,K,this.handle.elem)}})}}if(!H||H.nodeType==3||H.nodeType==8){return g}I.result=g;I.target=H;K=o.makeArray(K);K.unshift(I)}I.currentTarget=H;var J=o.data(H,"handle");if(J){J.apply(H,K)}if((!H[G]||(o.nodeName(H,"a")&&G=="click"))&&H["on"+G]&&H["on"+G].apply(H,K)===false){I.result=false}if(!E&&H[G]&&!I.isDefaultPrevented()&&!(o.nodeName(H,"a")&&G=="click")){this.triggered=true;try{H[G]()}catch(L){}}this.triggered=false;if(!I.isPropagationStopped()){var F=H.parentNode||H.ownerDocument;if(F){o.event.trigger(I,K,F,true)}}},handle:function(K){var J,E;K=arguments[0]=o.event.fix(K||l.event);K.currentTarget=this;var L=K.type.split(".");K.type=L.shift();J=!L.length&&!K.exclusive;var I=RegExp("(^|\\.)"+L.slice().sort().join(".*\\.")+"(\\.|$)");E=(o.data(this,"events")||{})[K.type];for(var G in E){var H=E[G];if(J||I.test(H.type)){K.handler=H;K.data=H.data;var F=H.apply(this,arguments);if(F!==g){K.result=F;if(F===false){K.preventDefault();K.stopPropagation()}}if(K.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(H){if(H[h]){return H}var F=H;H=o.Event(F);for(var G=this.props.length,J;G;){J=this.props[--G];H[J]=F[J]}if(!H.target){H.target=H.srcElement||document}if(H.target.nodeType==3){H.target=H.target.parentNode}if(!H.relatedTarget&&H.fromElement){H.relatedTarget=H.fromElement==H.target?H.toElement:H.fromElement}if(H.pageX==null&&H.clientX!=null){var I=document.documentElement,E=document.body;H.pageX=H.clientX+(I&&I.scrollLeft||E&&E.scrollLeft||0)-(I.clientLeft||0);H.pageY=H.clientY+(I&&I.scrollTop||E&&E.scrollTop||0)-(I.clientTop||0)}if(!H.which&&((H.charCode||H.charCode===0)?H.charCode:H.keyCode)){H.which=H.charCode||H.keyCode}if(!H.metaKey&&H.ctrlKey){H.metaKey=H.ctrlKey}if(!H.which&&H.button){H.which=(H.button&1?1:(H.button&2?3:(H.button&4?2:0)))}return H},proxy:function(F,E){E=E||function(){return F.apply(this,arguments)};E.guid=F.guid=F.guid||E.guid||this.guid++;return E},special:{ready:{setup:B,teardown:function(){}}},specialAll:{live:{setup:function(E,F){o.event.add(this,F[0],c)},teardown:function(G){if(G.length){var E=0,F=RegExp("(^|\\.)"+G[0]+"(\\.|$)");o.each((o.data(this,"events").live||{}),function(){if(F.test(this.type)){E++}});if(E<1){o.event.remove(this,G[0],c)}}}}}};o.Event=function(E){if(!this.preventDefault){return new o.Event(E)}if(E&&E.type){this.originalEvent=E;this.type=E.type}else{this.type=E}this.timeStamp=e();this[h]=true};function k(){return false}function u(){return true}o.Event.prototype={preventDefault:function(){this.isDefaultPrevented=u;var E=this.originalEvent;if(!E){return}if(E.preventDefault){E.preventDefault()}E.returnValue=false},stopPropagation:function(){this.isPropagationStopped=u;var E=this.originalEvent;if(!E){return}if(E.stopPropagation){E.stopPropagation()}E.cancelBubble=true},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=u;this.stopPropagation()},isDefaultPrevented:k,isPropagationStopped:k,isImmediatePropagationStopped:k};var a=function(F){var E=F.relatedTarget;while(E&&E!=this){try{E=E.parentNode}catch(G){E=this}}if(E!=this){F.type=F.data;o.event.handle.apply(this,arguments)}};o.each({mouseover:"mouseenter",mouseout:"mouseleave"},function(F,E){o.event.special[E]={setup:function(){o.event.add(this,F,a,E)},teardown:function(){o.event.remove(this,F,a)}}});o.fn.extend({bind:function(F,G,E){return F=="unload"?this.one(F,G,E):this.each(function(){o.event.add(this,F,E||G,E&&G)})},one:function(G,H,F){var E=o.event.proxy(F||H,function(I){o(this).unbind(I,E);return(F||H).apply(this,arguments)});return this.each(function(){o.event.add(this,G,E,F&&H)})},unbind:function(F,E){return this.each(function(){o.event.remove(this,F,E)})},trigger:function(E,F){return this.each(function(){o.event.trigger(E,F,this)})},triggerHandler:function(E,G){if(this[0]){var F=o.Event(E);F.preventDefault();F.stopPropagation();o.event.trigger(F,G,this[0]);return F.result}},toggle:function(G){var E=arguments,F=1;while(F<E.length){o.event.proxy(G,E[F++])}return this.click(o.event.proxy(G,function(H){this.lastToggle=(this.lastToggle||0)%F;H.preventDefault();return E[this.lastToggle++].apply(this,arguments)||false}))},hover:function(E,F){return this.mouseenter(E).mouseleave(F)},ready:function(E){B();if(o.isReady){E.call(document,o)}else{o.readyList.push(E)}return this},live:function(G,F){var E=o.event.proxy(F);E.guid+=this.selector+G;o(document).bind(i(G,this.selector),this.selector,E);return this},die:function(F,E){o(document).unbind(i(F,this.selector),E?{guid:E.guid+this.selector+F}:null);return this}});function c(H){var E=RegExp("(^|\\.)"+H.type+"(\\.|$)"),G=true,F=[];o.each(o.data(this,"events").live||[],function(I,J){if(E.test(J.type)){var K=o(H.target).closest(J.data)[0];if(K){F.push({elem:K,fn:J})}}});F.sort(function(J,I){return o.data(J.elem,"closest")-o.data(I.elem,"closest")});o.each(F,function(){if(this.fn.call(this.elem,H,this.fn.data)===false){return(G=false)}});return G}function i(F,E){return["live",F,E.replace(/\./g,"`").replace(/ /g,"|")].join(".")}o.extend({isReady:false,readyList:[],ready:function(){if(!o.isReady){o.isReady=true;if(o.readyList){o.each(o.readyList,function(){this.call(document,o)});o.readyList=null}o(document).triggerHandler("ready")}}});var x=false;function B(){if(x){return}x=true;if(document.addEventListener){document.addEventListener("DOMContentLoaded",function(){document.removeEventListener("DOMContentLoaded",arguments.callee,false);o.ready()},false)}else{if(document.attachEvent){document.attachEvent("onreadystatechange",function(){if(document.readyState==="complete"){document.detachEvent("onreadystatechange",arguments.callee);o.ready()}});if(document.documentElement.doScroll&&l==l.top){(function(){if(o.isReady){return}try{document.documentElement.doScroll("left")}catch(E){setTimeout(arguments.callee,0);return}o.ready()})()}}}o.event.add(l,"load",o.ready)}o.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(F,E){o.fn[E]=function(G){return G?this.bind(E,G):this.trigger(E)}});o(l).bind("unload",function(){for(var E in o.cache){if(E!=1&&o.cache[E].handle){o.event.remove(o.cache[E].handle.elem)}}});(function(){o.support={};var F=document.documentElement,G=document.createElement("script"),K=document.createElement("div"),J="script"+(new Date).getTime();K.style.display="none";K.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 H=K.getElementsByTagName("*"),E=K.getElementsByTagName("a")[0];if(!H||!H.length||!E){return}o.support={leadingWhitespace:K.firstChild.nodeType==3,tbody:!K.getElementsByTagName("tbody").length,objectAll:!!K.getElementsByTagName("object")[0].getElementsByTagName("*").length,htmlSerialize:!!K.getElementsByTagName("link").length,style:/red/.test(E.getAttribute("style")),hrefNormalized:E.getAttribute("href")==="/a",opacity:E.style.opacity==="0.5",cssFloat:!!E.style.cssFloat,scriptEval:false,noCloneEvent:true,boxModel:null};G.type="text/javascript";try{G.appendChild(document.createTextNode("window."+J+"=1;"))}catch(I){}F.insertBefore(G,F.firstChild);if(l[J]){o.support.scriptEval=true;delete l[J]}F.removeChild(G);if(K.attachEvent&&K.fireEvent){K.attachEvent("onclick",function(){o.support.noCloneEvent=false;K.detachEvent("onclick",arguments.callee)});K.cloneNode(true).fireEvent("onclick")}o(function(){var L=document.createElement("div");L.style.width=L.style.paddingLeft="1px";document.body.appendChild(L);o.boxModel=o.support.boxModel=L.offsetWidth===2;document.body.removeChild(L).style.display="none"})})();var w=o.support.cssFloat?"cssFloat":"styleFloat";o.props={"for":"htmlFor","class":"className","float":w,cssFloat:w,styleFloat:w,readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",tabindex:"tabIndex"};o.fn.extend({_load:o.fn.load,load:function(G,J,K){if(typeof G!=="string"){return this._load(G)}var I=G.indexOf(" ");if(I>=0){var E=G.slice(I,G.length);G=G.slice(0,I)}var H="GET";if(J){if(o.isFunction(J)){K=J;J=null}else{if(typeof J==="object"){J=o.param(J);H="POST"}}}var F=this;o.ajax({url:G,type:H,dataType:"html",data:J,complete:function(M,L){if(L=="success"||L=="notmodified"){F.html(E?o("<div/>").append(M.responseText.replace(/<script(.|\s)*?\/script>/g,"")).find(E):M.responseText)}if(K){F.each(K,[M.responseText,L,M])}}});return this},serialize:function(){return o.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?o.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(E,F){var G=o(this).val();return G==null?null:o.isArray(G)?o.map(G,function(I,H){return{name:F.name,value:I}}):{name:F.name,value:G}}).get()}});o.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(E,F){o.fn[F]=function(G){return this.bind(F,G)}});var r=e();o.extend({get:function(E,G,H,F){if(o.isFunction(G)){H=G;G=null}return o.ajax({type:"GET",url:E,data:G,success:H,dataType:F})},getScript:function(E,F){return o.get(E,null,F,"script")},getJSON:function(E,F,G){return o.get(E,F,G,"json")},post:function(E,G,H,F){if(o.isFunction(G)){H=G;G={}}return o.ajax({type:"POST",url:E,data:G,success:H,dataType:F})},ajaxSetup:function(E){o.extend(o.ajaxSettings,E)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return l.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(M){M=o.extend(true,M,o.extend(true,{},o.ajaxSettings,M));var W,F=/=\?(&|$)/g,R,V,G=M.type.toUpperCase();if(M.data&&M.processData&&typeof M.data!=="string"){M.data=o.param(M.data)}if(M.dataType=="jsonp"){if(G=="GET"){if(!M.url.match(F)){M.url+=(M.url.match(/\?/)?"&":"?")+(M.jsonp||"callback")+"=?"}}else{if(!M.data||!M.data.match(F)){M.data=(M.data?M.data+"&":"")+(M.jsonp||"callback")+"=?"}}M.dataType="json"}if(M.dataType=="json"&&(M.data&&M.data.match(F)||M.url.match(F))){W="jsonp"+r++;if(M.data){M.data=(M.data+"").replace(F,"="+W+"$1")}M.url=M.url.replace(F,"="+W+"$1");M.dataType="script";l[W]=function(X){V=X;I();L();l[W]=g;try{delete l[W]}catch(Y){}if(H){H.removeChild(T)}}}if(M.dataType=="script"&&M.cache==null){M.cache=false}if(M.cache===false&&G=="GET"){var E=e();var U=M.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+E+"$2");M.url=U+((U==M.url)?(M.url.match(/\?/)?"&":"?")+"_="+E:"")}if(M.data&&G=="GET"){M.url+=(M.url.match(/\?/)?"&":"?")+M.data;M.data=null}if(M.global&&!o.active++){o.event.trigger("ajaxStart")}var Q=/^(\w+:)?\/\/([^\/?#]+)/.exec(M.url);if(M.dataType=="script"&&G=="GET"&&Q&&(Q[1]&&Q[1]!=location.protocol||Q[2]!=location.host)){var H=document.getElementsByTagName("head")[0];var T=document.createElement("script");T.src=M.url;if(M.scriptCharset){T.charset=M.scriptCharset}if(!W){var O=false;T.onload=T.onreadystatechange=function(){if(!O&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){O=true;I();L();T.onload=T.onreadystatechange=null;H.removeChild(T)}}}H.appendChild(T);return g}var K=false;var J=M.xhr();if(M.username){J.open(G,M.url,M.async,M.username,M.password)}else{J.open(G,M.url,M.async)}try{if(M.data){J.setRequestHeader("Content-Type",M.contentType)}if(M.ifModified){J.setRequestHeader("If-Modified-Since",o.lastModified[M.url]||"Thu, 01 Jan 1970 00:00:00 GMT")}J.setRequestHeader("X-Requested-With","XMLHttpRequest");J.setRequestHeader("Accept",M.dataType&&M.accepts[M.dataType]?M.accepts[M.dataType]+", */*":M.accepts._default)}catch(S){}if(M.beforeSend&&M.beforeSend(J,M)===false){if(M.global&&!--o.active){o.event.trigger("ajaxStop")}J.abort();return false}if(M.global){o.event.trigger("ajaxSend",[J,M])}var N=function(X){if(J.readyState==0){if(P){clearInterval(P);P=null;if(M.global&&!--o.active){o.event.trigger("ajaxStop")}}}else{if(!K&&J&&(J.readyState==4||X=="timeout")){K=true;if(P){clearInterval(P);P=null}R=X=="timeout"?"timeout":!o.httpSuccess(J)?"error":M.ifModified&&o.httpNotModified(J,M.url)?"notmodified":"success";if(R=="success"){try{V=o.httpData(J,M.dataType,M)}catch(Z){R="parsererror"}}if(R=="success"){var Y;try{Y=J.getResponseHeader("Last-Modified")}catch(Z){}if(M.ifModified&&Y){o.lastModified[M.url]=Y}if(!W){I()}}else{o.handleError(M,J,R)}L();if(X){J.abort()}if(M.async){J=null}}}};if(M.async){var P=setInterval(N,13);if(M.timeout>0){setTimeout(function(){if(J&&!K){N("timeout")}},M.timeout)}}try{J.send(M.data)}catch(S){o.handleError(M,J,null,S)}if(!M.async){N()}function I(){if(M.success){M.success(V,R)}if(M.global){o.event.trigger("ajaxSuccess",[J,M])}}function L(){if(M.complete){M.complete(J,R)}if(M.global){o.event.trigger("ajaxComplete",[J,M])}if(M.global&&!--o.active){o.event.trigger("ajaxStop")}}return J},handleError:function(F,H,E,G){if(F.error){F.error(H,E,G)}if(F.global){o.event.trigger("ajaxError",[H,F,G])}},active:0,httpSuccess:function(F){try{return !F.status&&location.protocol=="file:"||(F.status>=200&&F.status<300)||F.status==304||F.status==1223}catch(E){}return false},httpNotModified:function(G,E){try{var H=G.getResponseHeader("Last-Modified");return G.status==304||H==o.lastModified[E]}catch(F){}return false},httpData:function(J,H,G){var F=J.getResponseHeader("content-type"),E=H=="xml"||!H&&F&&F.indexOf("xml")>=0,I=E?J.responseXML:J.responseText;if(E&&I.documentElement.tagName=="parsererror"){throw"parsererror"}if(G&&G.dataFilter){I=G.dataFilter(I,H)}if(typeof I==="string"){if(H=="script"){o.globalEval(I)}if(H=="json"){I=l["eval"]("("+I+")")}}return I},param:function(E){var G=[];function H(I,J){G[G.length]=encodeURIComponent(I)+"="+encodeURIComponent(J)}if(o.isArray(E)||E.jquery){o.each(E,function(){H(this.name,this.value)})}else{for(var F in E){if(o.isArray(E[F])){o.each(E[F],function(){H(F,this)})}else{H(F,o.isFunction(E[F])?E[F]():E[F])}}}return G.join("&").replace(/%20/g,"+")}});var m={},n,d=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];function t(F,E){var G={};o.each(d.concat.apply([],d.slice(0,E)),function(){G[this]=F});return G}o.fn.extend({show:function(J,L){if(J){return this.animate(t("show",3),J,L)}else{for(var H=0,F=this.length;H<F;H++){var E=o.data(this[H],"olddisplay");this[H].style.display=E||"";if(o.css(this[H],"display")==="none"){var G=this[H].tagName,K;if(m[G]){K=m[G]}else{var I=o("<"+G+" />").appendTo("body");K=I.css("display");if(K==="none"){K="block"}I.remove();m[G]=K}o.data(this[H],"olddisplay",K)}}for(var H=0,F=this.length;H<F;H++){this[H].style.display=o.data(this[H],"olddisplay")||""}return this}},hide:function(H,I){if(H){return this.animate(t("hide",3),H,I)}else{for(var G=0,F=this.length;G<F;G++){var E=o.data(this[G],"olddisplay");if(!E&&E!=="none"){o.data(this[G],"olddisplay",o.css(this[G],"display"))}}for(var G=0,F=this.length;G<F;G++){this[G].style.display="none"}return this}},_toggle:o.fn.toggle,toggle:function(G,F){var E=typeof G==="boolean";return o.isFunction(G)&&o.isFunction(F)?this._toggle.apply(this,arguments):G==null||E?this.each(function(){var H=E?G:o(this).is(":hidden");o(this)[H?"show":"hide"]()}):this.animate(t("toggle",3),G,F)},fadeTo:function(E,G,F){return this.animate({opacity:G},E,F)},animate:function(I,F,H,G){var E=o.speed(F,H,G);return this[E.queue===false?"each":"queue"](function(){var K=o.extend({},E),M,L=this.nodeType==1&&o(this).is(":hidden"),J=this;for(M in I){if(I[M]=="hide"&&L||I[M]=="show"&&!L){return K.complete.call(this)}if((M=="height"||M=="width")&&this.style){K.display=o.css(this,"display");K.overflow=this.style.overflow}}if(K.overflow!=null){this.style.overflow="hidden"}K.curAnim=o.extend({},I);o.each(I,function(O,S){var R=new o.fx(J,K,O);if(/toggle|show|hide/.test(S)){R[S=="toggle"?L?"show":"hide":S](I)}else{var Q=S.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),T=R.cur(true)||0;if(Q){var N=parseFloat(Q[2]),P=Q[3]||"px";if(P!="px"){J.style[O]=(N||1)+P;T=((N||1)/R.cur(true))*T;J.style[O]=T+P}if(Q[1]){N=((Q[1]=="-="?-1:1)*N)+T}R.custom(T,N,P)}else{R.custom(T,S,"")}}});return true})},stop:function(F,E){var G=o.timers;if(F){this.queue([])}this.each(function(){for(var H=G.length-1;H>=0;H--){if(G[H].elem==this){if(E){G[H](true)}G.splice(H,1)}}});if(!E){this.dequeue()}return this}});o.each({slideDown:t("show",1),slideUp:t("hide",1),slideToggle:t("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(E,F){o.fn[E]=function(G,H){return this.animate(F,G,H)}});o.extend({speed:function(G,H,F){var E=typeof G==="object"?G:{complete:F||!F&&H||o.isFunction(G)&&G,duration:G,easing:F&&H||H&&!o.isFunction(H)&&H};E.duration=o.fx.off?0:typeof E.duration==="number"?E.duration:o.fx.speeds[E.duration]||o.fx.speeds._default;E.old=E.complete;E.complete=function(){if(E.queue!==false){o(this).dequeue()}if(o.isFunction(E.old)){E.old.call(this)}};return E},easing:{linear:function(G,H,E,F){return E+F*G},swing:function(G,H,E,F){return((-Math.cos(G*Math.PI)/2)+0.5)*F+E}},timers:[],fx:function(F,E,G){this.options=E;this.elem=F;this.prop=G;if(!E.orig){E.orig={}}}});o.fx.prototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this)}(o.fx.step[this.prop]||o.fx.step._default)(this);if((this.prop=="height"||this.prop=="width")&&this.elem.style){this.elem.style.display="block"}},cur:function(F){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop]}var E=parseFloat(o.css(this.elem,this.prop,F));return E&&E>-10000?E:parseFloat(o.curCSS(this.elem,this.prop))||0},custom:function(I,H,G){this.startTime=e();this.start=I;this.end=H;this.unit=G||this.unit||"px";this.now=this.start;this.pos=this.state=0;var E=this;function F(J){return E.step(J)}F.elem=this.elem;if(F()&&o.timers.push(F)&&!n){n=setInterval(function(){var K=o.timers;for(var J=0;J<K.length;J++){if(!K[J]()){K.splice(J--,1)}}if(!K.length){clearInterval(n);n=g}},13)}},show:function(){this.options.orig[this.prop]=o.attr(this.elem.style,this.prop);this.options.show=true;this.custom(this.prop=="width"||this.prop=="height"?1:0,this.cur());o(this.elem).show()},hide:function(){this.options.orig[this.prop]=o.attr(this.elem.style,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(H){var G=e();if(H||G>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var E=true;for(var F in this.options.curAnim){if(this.options.curAnim[F]!==true){E=false}}if(E){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(o.css(this.elem,"display")=="none"){this.elem.style.display="block"}}if(this.options.hide){o(this.elem).hide()}if(this.options.hide||this.options.show){for(var I in this.options.curAnim){o.attr(this.elem.style,I,this.options.orig[I])}}this.options.complete.call(this.elem)}return false}else{var J=G-this.startTime;this.state=J/this.options.duration;this.pos=o.easing[this.options.easing||(o.easing.swing?"swing":"linear")](this.state,J,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update()}return true}};o.extend(o.fx,{speeds:{slow:600,fast:200,_default:400},step:{opacity:function(E){o.attr(E.elem.style,"opacity",E.now)},_default:function(E){if(E.elem.style&&E.elem.style[E.prop]!=null){E.elem.style[E.prop]=E.now+E.unit}else{E.elem[E.prop]=E.now}}}});if(document.documentElement.getBoundingClientRect){o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}var G=this[0].getBoundingClientRect(),J=this[0].ownerDocument,F=J.body,E=J.documentElement,L=E.clientTop||F.clientTop||0,K=E.clientLeft||F.clientLeft||0,I=G.top+(self.pageYOffset||o.boxModel&&E.scrollTop||F.scrollTop)-L,H=G.left+(self.pageXOffset||o.boxModel&&E.scrollLeft||F.scrollLeft)-K;return{top:I,left:H}}}else{o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}o.offset.initialized||o.offset.initialize();var J=this[0],G=J.offsetParent,F=J,O=J.ownerDocument,M,H=O.documentElement,K=O.body,L=O.defaultView,E=L.getComputedStyle(J,null),N=J.offsetTop,I=J.offsetLeft;while((J=J.parentNode)&&J!==K&&J!==H){M=L.getComputedStyle(J,null);N-=J.scrollTop,I-=J.scrollLeft;if(J===G){N+=J.offsetTop,I+=J.offsetLeft;if(o.offset.doesNotAddBorder&&!(o.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(J.tagName))){N+=parseInt(M.borderTopWidth,10)||0,I+=parseInt(M.borderLeftWidth,10)||0}F=G,G=J.offsetParent}if(o.offset.subtractsBorderForOverflowNotVisible&&M.overflow!=="visible"){N+=parseInt(M.borderTopWidth,10)||0,I+=parseInt(M.borderLeftWidth,10)||0}E=M}if(E.position==="relative"||E.position==="static"){N+=K.offsetTop,I+=K.offsetLeft}if(E.position==="fixed"){N+=Math.max(H.scrollTop,K.scrollTop),I+=Math.max(H.scrollLeft,K.scrollLeft)}return{top:N,left:I}}}o.offset={initialize:function(){if(this.initialized){return}var L=document.body,F=document.createElement("div"),H,G,N,I,M,E,J=L.style.marginTop,K='<div style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;"><div></div></div><table style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;" cellpadding="0" cellspacing="0"><tr><td></td></tr></table>';M={position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"};for(E in M){F.style[E]=M[E]}F.innerHTML=K;L.insertBefore(F,L.firstChild);H=F.firstChild,G=H.firstChild,I=H.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(G.offsetTop!==5);this.doesAddBorderForTableAndCells=(I.offsetTop===5);H.style.overflow="hidden",H.style.position="relative";this.subtractsBorderForOverflowNotVisible=(G.offsetTop===-5);L.style.marginTop="1px";this.doesNotIncludeMarginInBodyOffset=(L.offsetTop===0);L.style.marginTop=J;L.removeChild(F);this.initialized=true},bodyOffset:function(E){o.offset.initialized||o.offset.initialize();var G=E.offsetTop,F=E.offsetLeft;if(o.offset.doesNotIncludeMarginInBodyOffset){G+=parseInt(o.curCSS(E,"marginTop",true),10)||0,F+=parseInt(o.curCSS(E,"marginLeft",true),10)||0}return{top:G,left:F}}};o.fn.extend({position:function(){var I=0,H=0,F;if(this[0]){var G=this.offsetParent(),J=this.offset(),E=/^body|html$/i.test(G[0].tagName)?{top:0,left:0}:G.offset();J.top-=j(this,"marginTop");J.left-=j(this,"marginLeft");E.top+=j(G,"borderTopWidth");E.left+=j(G,"borderLeftWidth");F={top:J.top-E.top,left:J.left-E.left}}return F},offsetParent:function(){var E=this[0].offsetParent||document.body;while(E&&(!/^body|html$/i.test(E.tagName)&&o.css(E,"position")=="static")){E=E.offsetParent}return o(E)}});o.each(["Left","Top"],function(F,E){var G="scroll"+E;o.fn[G]=function(H){if(!this[0]){return null}return H!==g?this.each(function(){this==l||this==document?l.scrollTo(!F?H:o(l).scrollLeft(),F?H:o(l).scrollTop()):this[G]=H}):this[0]==l||this[0]==document?self[F?"pageYOffset":"pageXOffset"]||o.boxModel&&document.documentElement[G]||document.body[G]:this[0][G]}});o.each(["Height","Width"],function(I,G){var E=I?"Left":"Top",H=I?"Right":"Bottom",F=G.toLowerCase();o.fn["inner"+G]=function(){return this[0]?o.css(this[0],F,false,"padding"):null};o.fn["outer"+G]=function(K){return this[0]?o.css(this[0],F,false,K?"margin":"border"):null};var J=G.toLowerCase();o.fn[J]=function(K){return this[0]==l?document.compatMode=="CSS1Compat"&&document.documentElement["client"+G]||document.body["client"+G]:this[0]==document?Math.max(document.documentElement["client"+G],document.body["scroll"+G],document.documentElement["scroll"+G],document.body["offset"+G],document.documentElement["offset"+G]):K===g?(this.length?o.css(this[0],J):null):this.css(J,typeof K==="string"?K:K+"px")}})})();
/* Copyright (c) 2006 Brandon Aaron (http://brandonaaron.net)
 * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) 
 * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
 *
 * $LastChangedDate: 2007-07-21 18:44:59 -0500 (Sat, 21 Jul 2007) $
 * $Rev: 2446 $
 *
 * Version 2.1.1
 */
(function(a){a.fn.bgIframe=a.fn.bgiframe=function(c){if(a.browser.msie&&/6.0/.test(navigator.userAgent)){c=a.extend({top:"auto",left:"auto",width:"auto",height:"auto",opacity:true,src:"javascript:false;"},c||{});var d=function(e){return e&&e.constructor==Number?e+"px":e},b='<iframe class="bgiframe"frameborder="0"tabindex="-1"src="'+c.src+'"style="display:block;position:absolute;z-index:-1;'+(c.opacity!==false?"filter:Alpha(Opacity='0');":"")+"top:"+(c.top=="auto"?"expression(((parseInt(this.parentNode.currentStyle.borderTopWidth)||0)*-1)+'px')":d(c.top))+";left:"+(c.left=="auto"?"expression(((parseInt(this.parentNode.currentStyle.borderLeftWidth)||0)*-1)+'px')":d(c.left))+";width:"+(c.width=="auto"?"expression(this.parentNode.offsetWidth+'px')":d(c.width))+";height:"+(c.height=="auto"?"expression(this.parentNode.offsetHeight+'px')":d(c.height))+';"/>';return this.each(function(){if(a("> iframe.bgiframe",this).length==0){this.insertBefore(document.createElement(b),this.firstChild)}})}return this}})(jQuery);
/*
 * jQuery UI 1.5.3
 *
 * Copyright (c) 2008 Paul Bakaus (ui.jquery.com)
 * Dual licensed under the MIT (MIT-LICENSE.txt)
 * and GPL (GPL-LICENSE.txt) licenses.
 *
 * http://docs.jquery.com/UI
 */
 (function(c){c.ui={plugin:{add:function(e,f,h){var g=c.ui[e].prototype;for(var d in h){g.plugins[d]=g.plugins[d]||[];g.plugins[d].push([f,h[d]])}},call:function(d,f,e){var h=d.plugins[f];if(!h){return}for(var g=0;g<h.length;g++){if(d.options[h[g][0]]){h[g][1].apply(d.element,e)}}}},cssCache:{},css:function(d){if(c.ui.cssCache[d]){return c.ui.cssCache[d]}var f=c('<div class="ui-gen">').addClass(d).css({position:"absolute",top:"-5000px",left:"-5000px",display:"block"}).appendTo("body");c.ui.cssCache[d]=!!((!(/auto|default/).test(f.css("cursor"))||(/^[1-9]/).test(f.css("height"))||(/^[1-9]/).test(f.css("width"))||!(/none/).test(f.css("backgroundImage"))||!(/transparent|rgba\(0, 0, 0, 0\)/).test(f.css("backgroundColor"))));try{c("body").get(0).removeChild(f.get(0))}catch(g){}return c.ui.cssCache[d]},disableSelection:function(d){c(d).attr("unselectable","on").css("MozUserSelect","none")},enableSelection:function(d){c(d).attr("unselectable","off").css("MozUserSelect","")},hasScroll:function(h,f){var d=/top/.test(f||"top")?"scrollTop":"scrollLeft",g=false;if(h[d]>0){return true}h[d]=1;g=h[d]>0?true:false;h[d]=0;return g}};var b=c.fn.remove;c.fn.remove=function(){c("*",this).add(this).triggerHandler("remove");return b.apply(this,arguments)};function a(e,f,g){var d=c[e][f].getter||[];d=(typeof d=="string"?d.split(/,?\s+/):d);return(c.inArray(g,d)!=-1)}c.widget=function(e,d){var f=e.split(".")[0];e=e.split(".")[1];c.fn[e]=function(j){var h=(typeof j=="string"),i=Array.prototype.slice.call(arguments,1);if(h&&a(f,e,j)){var g=c.data(this[0],e);return(g?g[j].apply(g,i):undefined)}return this.each(function(){var k=c.data(this,e);if(h&&k&&c.isFunction(k[j])){k[j].apply(k,i)}else{if(!h){c.data(this,e,new c[f][e](this,j))}}})};c[f][e]=function(i,h){var g=this;this.widgetName=e;this.widgetBaseClass=f+"-"+e;this.options=c.extend({},c.widget.defaults,c[f][e].defaults,h);this.element=c(i).bind("setData."+e,function(l,j,k){return g.setData(j,k)}).bind("getData."+e,function(k,j){return g.getData(j)}).bind("remove",function(){return g.destroy()});this.init()};c[f][e].prototype=c.extend({},c.widget.prototype,d)};c.widget.prototype={init:function(){},destroy:function(){this.element.removeData(this.widgetName)},getData:function(d){return this.options[d]},setData:function(d,e){this.options[d]=e;if(d=="disabled"){this.element[e?"addClass":"removeClass"](this.widgetBaseClass+"-disabled")}},enable:function(){this.setData("disabled",false)},disable:function(){this.setData("disabled",true)}};c.widget.defaults={disabled:false};c.ui.mouse={mouseInit:function(){var d=this;this.element.bind("mousedown."+this.widgetName,function(f){return d.mouseDown(f)});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(g){(this._mouseStarted&&this.mouseUp(g));this._mouseDownEvent=g;var f=this,h=(g.which==1),d=(typeof this.options.cancel=="string"?c(g.target).parents().add(g.target).filter(this.options.cancel).length:false);if(!h||d||!this.mouseCapture(g)){return true}this._mouseDelayMet=!this.options.delay;if(!this._mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){f._mouseDelayMet=true},this.options.delay)}if(this.mouseDistanceMet(g)&&this.mouseDelayMet(g)){this._mouseStarted=(this.mouseStart(g)!==false);if(!this._mouseStarted){g.preventDefault();return true}}this._mouseMoveDelegate=function(i){return f.mouseMove(i)};this._mouseUpDelegate=function(i){return f.mouseUp(i)};c(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);return false},mouseMove:function(d){if(c.browser.msie&&!d.button){return this.mouseUp(d)}if(this._mouseStarted){this.mouseDrag(d);return false}if(this.mouseDistanceMet(d)&&this.mouseDelayMet(d)){this._mouseStarted=(this.mouseStart(this._mouseDownEvent,d)!==false);(this._mouseStarted?this.mouseDrag(d):this.mouseUp(d))}return !this._mouseStarted},mouseUp:function(d){c(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;this.mouseStop(d)}return false},mouseDistanceMet:function(d){return(Math.max(Math.abs(this._mouseDownEvent.pageX-d.pageX),Math.abs(this._mouseDownEvent.pageY-d.pageY))>=this.options.distance)},mouseDelayMet:function(d){return this._mouseDelayMet},mouseStart:function(d){},mouseDrag:function(d){},mouseStop:function(d){},mouseCapture:function(d){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(){var b=this.options;if(b.helper=="original"&&!(/(relative|absolute|fixed)/).test(this.element.css("position"))){this.element.css("position","relative")}this.element.addClass("ui-draggable");(b.disabled&&this.element.addClass("ui-draggable-disabled"));this.mouseInit()},mouseStart:function(g){var i=this.options;if(this.helper||i.disabled||a(g.target).is(".ui-resizable-handle")){return false}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==g.target){c=true}});if(!c){return false}if(a.ui.ddmanager){a.ui.ddmanager.current=this}this.helper=a.isFunction(i.helper)?a(i.helper.apply(this.element[0],[g])):(i.helper=="clone"?this.element.clone():this.element);if(!this.helper.parents("body").length){this.helper.appendTo((i.appendTo=="parent"?this.element[0].parentNode:i.appendTo))}if(this.helper[0]!=this.element[0]&&!(/(fixed|absolute)/).test(this.helper.css("position"))){this.helper.css("position","absolute")}this.margins={left:(parseInt(this.element.css("marginLeft"),10)||0),top:(parseInt(this.element.css("marginTop"),10)||0)};this.cssPosition=this.helper.css("position");this.offset=this.element.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};this.offset.click={left:g.pageX-this.offset.left,top:g.pageY-this.offset.top};this.offsetParent=this.helper.offsetParent();var b=this.offsetParent.offset();if(this.offsetParent[0]==document.body&&a.browser.mozilla){b={top:0,left:0}}this.offset.parent={top:b.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:b.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)};var f=this.element.position();this.offset.relative=this.cssPosition=="relative"?{top:f.top-(parseInt(this.helper.css("top"),10)||0)+this.offsetParent[0].scrollTop,left:f.left-(parseInt(this.helper.css("left"),10)||0)+this.offsetParent[0].scrollLeft}:{top:0,left:0};this.originalPosition=this.generatePosition(g);this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()};if(i.cursorAt){if(i.cursorAt.left!=undefined){this.offset.click.left=i.cursorAt.left+this.margins.left}if(i.cursorAt.right!=undefined){this.offset.click.left=this.helperProportions.width-i.cursorAt.right+this.margins.left}if(i.cursorAt.top!=undefined){this.offset.click.top=i.cursorAt.top+this.margins.top}if(i.cursorAt.bottom!=undefined){this.offset.click.top=this.helperProportions.height-i.cursorAt.bottom+this.margins.top}}if(i.containment){if(i.containment=="parent"){i.containment=this.helper[0].parentNode}if(i.containment=="document"||i.containment=="window"){this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,a(i.containment=="document"?document:window).width()-this.offset.relative.left-this.offset.parent.left-this.helperProportions.width-this.margins.left-(parseInt(this.element.css("marginRight"),10)||0),(a(i.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.offset.relative.top-this.offset.parent.top-this.helperProportions.height-this.margins.top-(parseInt(this.element.css("marginBottom"),10)||0)]}if(!(/^(document|window|parent)$/).test(i.containment)){var d=a(i.containment)[0];var h=a(i.containment).offset();this.containment=[h.left+(parseInt(a(d).css("borderLeftWidth"),10)||0)-this.offset.relative.left-this.offset.parent.left,h.top+(parseInt(a(d).css("borderTopWidth"),10)||0)-this.offset.relative.top-this.offset.parent.top,h.left+Math.max(d.scrollWidth,d.offsetWidth)-(parseInt(a(d).css("borderLeftWidth"),10)||0)-this.offset.relative.left-this.offset.parent.left-this.helperProportions.width-this.margins.left-(parseInt(this.element.css("marginRight"),10)||0),h.top+Math.max(d.scrollHeight,d.offsetHeight)-(parseInt(a(d).css("borderTopWidth"),10)||0)-this.offset.relative.top-this.offset.parent.top-this.helperProportions.height-this.margins.top-(parseInt(this.element.css("marginBottom"),10)||0)]}}this.propagate("start",g);this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()};if(a.ui.ddmanager&&!i.dropBehaviour){a.ui.ddmanager.prepareOffsets(this,g)}this.helper.addClass("ui-draggable-dragging");this.mouseDrag(g);return true},convertPositionTo:function(c,e){if(!e){e=this.position}var b=c=="absolute"?1:-1;return{top:(e.top+this.offset.relative.top*b+this.offset.parent.top*b-(this.cssPosition=="fixed"||(this.cssPosition=="absolute"&&this.offsetParent[0]==document.body)?0:this.offsetParent[0].scrollTop)*b+(this.cssPosition=="fixed"?a(document).scrollTop():0)*b+this.margins.top*b),left:(e.left+this.offset.relative.left*b+this.offset.parent.left*b-(this.cssPosition=="fixed"||(this.cssPosition=="absolute"&&this.offsetParent[0]==document.body)?0:this.offsetParent[0].scrollLeft)*b+(this.cssPosition=="fixed"?a(document).scrollLeft():0)*b+this.margins.left*b)}},generatePosition:function(f){var g=this.options;var b={top:(f.pageY-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(this.cssPosition=="fixed"||(this.cssPosition=="absolute"&&this.offsetParent[0]==document.body)?0:this.offsetParent[0].scrollTop)-(this.cssPosition=="fixed"?a(document).scrollTop():0)),left:(f.pageX-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(this.cssPosition=="fixed"||(this.cssPosition=="absolute"&&this.offsetParent[0]==document.body)?0:this.offsetParent[0].scrollLeft)-(this.cssPosition=="fixed"?a(document).scrollLeft():0))};if(!this.originalPosition){return b}if(this.containment){if(b.left<this.containment[0]){b.left=this.containment[0]}if(b.top<this.containment[1]){b.top=this.containment[1]}if(b.left>this.containment[2]){b.left=this.containment[2]}if(b.top>this.containment[3]){b.top=this.containment[3]}}if(g.grid){var d=this.originalPosition.top+Math.round((b.top-this.originalPosition.top)/g.grid[1])*g.grid[1];b.top=this.containment?(!(d<this.containment[1]||d>this.containment[3])?d:(!(d<this.containment[1])?d-g.grid[1]:d+g.grid[1])):d;var c=this.originalPosition.left+Math.round((b.left-this.originalPosition.left)/g.grid[0])*g.grid[0];b.left=this.containment?(!(c<this.containment[0]||c>this.containment[2])?c:(!(c<this.containment[0])?c-g.grid[0]:c+g.grid[0])):c}return b},mouseDrag:function(b){this.position=this.generatePosition(b);this.positionAbs=this.convertPositionTo("absolute");this.position=this.propagate("drag",b)||this.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){var d=a.ui.ddmanager.drop(this,c)}if((this.options.revert=="invalid"&&!d)||(this.options.revert=="valid"&&d)||this.options.revert===true){var b=this;a(this.helper).animate(this.originalPosition,parseInt(this.options.revert,10)||500,function(){b.propagate("stop",c);b.clear()})}else{this.propagate("stop",c);this.clear()}return false},clear:function(){this.helper.removeClass("ui-draggable-dragging");if(this.options.helper!="original"&&!this.cancelHelperRemoval){this.helper.remove()}this.helper=null;this.cancelHelperRemoval=false},plugins:{},uiHash:function(b){return{helper:this.helper,position:this.position,absolutePosition:this.positionAbs,options:this.options}},propagate:function(c,b){a.ui.plugin.call(this,c,[b,this.uiHash()]);if(c=="drag"){this.positionAbs=this.convertPositionTo("absolute")}return this.element.triggerHandler(c=="drag"?c:"drag"+c,[b,this.uiHash()],this.options[c])},destroy:function(){if(!this.element.data("draggable")){return}this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable");this.mouseDestroy()}}));a.extend(a.ui.draggable,{defaults:{appendTo:"parent",axis:false,cancel:":input",delay:0,distance:1,helper:"original"}});a.ui.plugin.add("draggable","cursor",{start:function(d,c){var b=a("body");if(b.css("cursor")){c.options._cursor=b.css("cursor")}b.css("cursor",c.options.cursor)},stop:function(c,b){if(b.options._cursor){a("body").css("cursor",b.options._cursor)}}});a.ui.plugin.add("draggable","zIndex",{start:function(d,c){var b=a(c.helper);if(b.css("zIndex")){c.options._zIndex=b.css("zIndex")}b.css("zIndex",c.options.zIndex)},stop:function(c,b){if(b.options._zIndex){a(b.helper).css("zIndex",b.options._zIndex)}}});a.ui.plugin.add("draggable","opacity",{start:function(d,c){var b=a(c.helper);if(b.css("opacity")){c.options._opacity=b.css("opacity")}b.css("opacity",c.options.opacity)},stop:function(c,b){if(b.options._opacity){a(b.helper).css("opacity",b.options._opacity)}}});a.ui.plugin.add("draggable","iframeFix",{start:function(c,b){a(b.options.iframeFix===true?"iframe":b.options.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(c,b){a("div.DragDropIframeFix").each(function(){this.parentNode.removeChild(this)})}});a.ui.plugin.add("draggable","scroll",{start:function(d,c){var f=c.options;var b=a(this).data("draggable");f.scrollSensitivity=f.scrollSensitivity||20;f.scrollSpeed=f.scrollSpeed||20;b.overflowY=function(e){do{if(/auto|scroll/.test(e.css("overflow"))||(/auto|scroll/).test(e.css("overflow-y"))){return e}e=e.parent()}while(e[0].parentNode);return a(document)}(this);b.overflowX=function(e){do{if(/auto|scroll/.test(e.css("overflow"))||(/auto|scroll/).test(e.css("overflow-x"))){return e}e=e.parent()}while(e[0].parentNode);return a(document)}(this);if(b.overflowY[0]!=document&&b.overflowY[0].tagName!="HTML"){b.overflowYOffset=b.overflowY.offset()}if(b.overflowX[0]!=document&&b.overflowX[0].tagName!="HTML"){b.overflowXOffset=b.overflowX.offset()}},drag:function(d,c){var f=c.options;var b=a(this).data("draggable");if(b.overflowY[0]!=document&&b.overflowY[0].tagName!="HTML"){if((b.overflowYOffset.top+b.overflowY[0].offsetHeight)-d.pageY<f.scrollSensitivity){b.overflowY[0].scrollTop=b.overflowY[0].scrollTop+f.scrollSpeed}if(d.pageY-b.overflowYOffset.top<f.scrollSensitivity){b.overflowY[0].scrollTop=b.overflowY[0].scrollTop-f.scrollSpeed}}else{if(d.pageY-a(document).scrollTop()<f.scrollSensitivity){a(document).scrollTop(a(document).scrollTop()-f.scrollSpeed)}if(a(window).height()-(d.pageY-a(document).scrollTop())<f.scrollSensitivity){a(document).scrollTop(a(document).scrollTop()+f.scrollSpeed)}}if(b.overflowX[0]!=document&&b.overflowX[0].tagName!="HTML"){if((b.overflowXOffset.left+b.overflowX[0].offsetWidth)-d.pageX<f.scrollSensitivity){b.overflowX[0].scrollLeft=b.overflowX[0].scrollLeft+f.scrollSpeed}if(d.pageX-b.overflowXOffset.left<f.scrollSensitivity){b.overflowX[0].scrollLeft=b.overflowX[0].scrollLeft-f.scrollSpeed}}else{if(d.pageX-a(document).scrollLeft()<f.scrollSensitivity){a(document).scrollLeft(a(document).scrollLeft()-f.scrollSpeed)}if(a(window).width()-(d.pageX-a(document).scrollLeft())<f.scrollSensitivity){a(document).scrollLeft(a(document).scrollLeft()+f.scrollSpeed)}}}});a.ui.plugin.add("draggable","snap",{start:function(d,c){var b=a(this).data("draggable");b.snapElements=[];a(c.options.snap===true?".ui-draggable":c.options.snap).each(function(){var f=a(this);var e=f.offset();if(this!=b.element[0]){b.snapElements.push({item:this,width:f.outerWidth(),height:f.outerHeight(),top:e.top,left:e.left})}})},drag:function(o,u){var n=a(this).data("draggable");var q=u.options.snapTolerance||20;var g=u.absolutePosition.left,f=g+n.helperProportions.width,w=u.absolutePosition.top,v=w+n.helperProportions.height;for(var m=n.snapElements.length-1;m>=0;m--){var h=n.snapElements[m].left,c=h+n.snapElements[m].width,y=n.snapElements[m].top,s=y+n.snapElements[m].height;if(!((h-q<g&&g<c+q&&y-q<w&&w<s+q)||(h-q<g&&g<c+q&&y-q<v&&v<s+q)||(h-q<f&&f<c+q&&y-q<w&&w<s+q)||(h-q<f&&f<c+q&&y-q<v&&v<s+q))){continue}if(u.options.snapMode!="inner"){var p=Math.abs(y-v)<=20;var x=Math.abs(s-w)<=20;var k=Math.abs(h-f)<=20;var j=Math.abs(c-g)<=20;if(p){u.position.top=n.convertPositionTo("relative",{top:y-n.helperProportions.height,left:0}).top}if(x){u.position.top=n.convertPositionTo("relative",{top:s,left:0}).top}if(k){u.position.left=n.convertPositionTo("relative",{top:0,left:h-n.helperProportions.width}).left}if(j){u.position.left=n.convertPositionTo("relative",{top:0,left:c}).left}}if(u.options.snapMode!="outer"){var p=Math.abs(y-w)<=20;var x=Math.abs(s-v)<=20;var k=Math.abs(h-g)<=20;var j=Math.abs(c-f)<=20;if(p){u.position.top=n.convertPositionTo("relative",{top:y,left:0}).top}if(x){u.position.top=n.convertPositionTo("relative",{top:s-n.helperProportions.height,left:0}).top}if(k){u.position.left=n.convertPositionTo("relative",{top:0,left:h}).left}if(j){u.position.left=n.convertPositionTo("relative",{top:0,left:c-n.helperProportions.width}).left}}}}});a.ui.plugin.add("draggable","connectToSortable",{start:function(d,c){var b=a(this).data("draggable");b.sortables=[];a(c.options.connectToSortable).each(function(){if(a.data(this,"sortable")){var e=a.data(this,"sortable");b.sortables.push({instance:e,shouldRevert:e.options.revert});e.refreshItems();e.propagate("activate",d,b)}})},stop:function(d,c){var b=a(this).data("draggable");a.each(b.sortables,function(){if(this.instance.isOver){this.instance.isOver=0;b.cancelHelperRemoval=true;this.instance.cancelHelperRemoval=false;if(this.shouldRevert){this.instance.options.revert=true}this.instance.mouseStop(d);this.instance.element.triggerHandler("sortreceive",[d,a.extend(this.instance.ui(),{sender:b.element})],this.instance.options.receive);this.instance.options.helper=this.instance.options._helper}else{this.instance.propagate("deactivate",d,b)}})},drag:function(g,f){var d=a(this).data("draggable"),b=this;var c=function(k){var h=k.left,j=h+k.width,i=k.top,e=i+k.height;return(h<(this.positionAbs.left+this.offset.click.left)&&(this.positionAbs.left+this.offset.click.left)<j&&i<(this.positionAbs.top+this.offset.click.top)&&(this.positionAbs.top+this.offset.click.top)<e)};a.each(d.sortables,function(e){if(c.call(d,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]};g.target=this.instance.currentItem[0];this.instance.mouseCapture(g,true);this.instance.mouseStart(g,true,true);this.instance.offset.click.top=d.offset.click.top;this.instance.offset.click.left=d.offset.click.left;this.instance.offset.parent.left-=d.offset.parent.left-this.instance.offset.parent.left;this.instance.offset.parent.top-=d.offset.parent.top-this.instance.offset.parent.top;d.propagate("toSortable",g)}if(this.instance.currentItem){this.instance.mouseDrag(g)}}else{if(this.instance.isOver){this.instance.isOver=0;this.instance.cancelHelperRemoval=true;this.instance.options.revert=false;this.instance.mouseStop(g,true);this.instance.options.helper=this.instance.options._helper;this.instance.currentItem.remove();if(this.instance.placeholder){this.instance.placeholder.remove()}d.propagate("fromSortable",g)}}})}});a.ui.plugin.add("draggable","stack",{start:function(d,b){var c=a.makeArray(a(b.options.stack.group)).sort(function(f,e){return(parseInt(a(f).css("zIndex"),10)||b.options.stack.min)-(parseInt(a(e).css("zIndex"),10)||b.options.stack.min)});a(c).each(function(e){this.style.zIndex=b.options.stack.min+e});this[0].style.zIndex=b.options.stack.min+c.length}})})(jQuery);(function(a){a.widget("ui.droppable",{init:function(){this.element.addClass("ui-droppable");this.isover=0;this.isout=1;var c=this.options,b=c.accept;c=a.extend(c,{accept:c.accept&&c.accept.constructor==Function?c.accept:function(e){return a(e).is(b)}});this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight};a.ui.ddmanager.droppables.push(this)},plugins:{},ui:function(b){return{draggable:(b.currentItem||b.element),helper:b.helper,position:b.position,absolutePosition:b.positionAbs,options:this.options,element:this.element}},destroy:function(){var b=a.ui.ddmanager.droppables;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")},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,(b.currentItem||b.element))){a.ui.plugin.call(this,"over",[c,this.ui(b)]);this.element.triggerHandler("dropover",[c,this.ui(b)],this.options.over)}},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,(b.currentItem||b.element))){a.ui.plugin.call(this,"out",[c,this.ui(b)]);this.element.triggerHandler("dropout",[c,this.ui(b)],this.options.out)}},drop:function(d,c){var b=c||a.ui.ddmanager.current;if(!b||(b.currentItem||b.element)[0]==this.element[0]){return false}var f=false;this.element.find(".ui-droppable").not(".ui-draggable-dragging").each(function(){var e=a.data(this,"droppable");if(e.options.greedy&&a.ui.intersect(b,a.extend(e,{offset:e.element.offset()}),e.options.tolerance)){f=true;return false}});if(f){return false}if(this.options.accept.call(this.element,(b.currentItem||b.element))){a.ui.plugin.call(this,"drop",[d,this.ui(b)]);this.element.triggerHandler("drop",[d,this.ui(b)],this.options.drop);return true}return false},activate:function(c){var b=a.ui.ddmanager.current;a.ui.plugin.call(this,"activate",[c,this.ui(b)]);if(b){this.element.triggerHandler("dropactivate",[c,this.ui(b)],this.options.activate)}},deactivate:function(c){var b=a.ui.ddmanager.current;a.ui.plugin.call(this,"deactivate",[c,this.ui(b)]);if(b){this.element.triggerHandler("dropdeactivate",[c,this.ui(b)],this.options.deactivate)}}});a.extend(a.ui.droppable,{defaults:{disabled:false,tolerance:"intersect"}});a.ui.intersect=function(n,g,k){if(!g.offset){return false}var e=(n.positionAbs||n.position.absolute).left,d=e+n.helperProportions.width,j=(n.positionAbs||n.position.absolute).top,i=j+n.helperProportions.height;var f=g.offset.left,c=f+g.proportions.width,m=g.offset.top,h=m+g.proportions.height;switch(k){case"fit":return(f<e&&d<c&&m<j&&i<h);break;case"intersect":return(f<e+(n.helperProportions.width/2)&&d-(n.helperProportions.width/2)<c&&m<j+(n.helperProportions.height/2)&&i-(n.helperProportions.height/2)<h);break;case"pointer":return(f<((n.positionAbs||n.position.absolute).left+(n.clickOffset||n.offset.click).left)&&((n.positionAbs||n.position.absolute).left+(n.clickOffset||n.offset.click).left)<c&&m<((n.positionAbs||n.position.absolute).top+(n.clickOffset||n.offset.click).top)&&((n.positionAbs||n.position.absolute).top+(n.clickOffset||n.offset.click).top)<h);break;case"touch":return((j>=m&&j<=h)||(i>=m&&i<=h)||(j<m&&i>h))&&((e>=f&&e<=c)||(d>=f&&d<=c)||(e<f&&d>c));break;default:return false;break}};a.ui.ddmanager={current:null,droppables:[],prepareOffsets:function(d,g){var b=a.ui.ddmanager.droppables;var f=g?g.type:null;for(var c=0;c<b.length;c++){if(b[c].options.disabled||(d&&!b[c].options.accept.call(b[c].element,(d.currentItem||d.element)))){continue}b[c].visible=b[c].element.css("display")!="none";if(!b[c].visible){continue}b[c].offset=b[c].element.offset();b[c].proportions={width:b[c].element[0].offsetWidth,height:b[c].element[0].offsetHeight};if(f=="dragstart"||f=="sortactivate"){b[c].activate.call(b[c],g)}}},drop:function(b,c){var d=false;a.each(a.ui.ddmanager.droppables,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,(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,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(".ui-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)}})}};a.ui.plugin.add("droppable","activeClass",{activate:function(c,b){a(this).addClass(b.options.activeClass)},deactivate:function(c,b){a(this).removeClass(b.options.activeClass)},drop:function(c,b){a(this).removeClass(b.options.activeClass)}});a.ui.plugin.add("droppable","hoverClass",{over:function(c,b){a(this).addClass(b.options.hoverClass)},out:function(c,b){a(this).removeClass(b.options.hoverClass)},drop:function(c,b){a(this).removeClass(b.options.hoverClass)}})})(jQuery);(function(a){a.widget("ui.resizable",a.extend({},a.ui.mouse,{init:function(){var p=this,q=this.options;var t=this.element.css("position");this.originalElement=this.element;this.element.addClass("ui-resizable").css({position:/static/.test(t)?"relative":t});a.extend(q,{_aspectRatio:!!(q.aspectRatio),helper:q.helper||q.ghost||q.animate?q.helper||"proxy":null,knobHandles:q.knobHandles===true?"ui-resizable-knob-handle":q.knobHandles});var h="1px solid #DEDEDE";q.defaultTheme={"ui-resizable":{display:"block"},"ui-resizable-handle":{position:"absolute",background:"#F2F2F2",fontSize:"0.1px"},"ui-resizable-n":{cursor:"n-resize",height:"4px",left:"0px",right:"0px",borderTop:h},"ui-resizable-s":{cursor:"s-resize",height:"4px",left:"0px",right:"0px",borderBottom:h},"ui-resizable-e":{cursor:"e-resize",width:"4px",top:"0px",bottom:"0px",borderRight:h},"ui-resizable-w":{cursor:"w-resize",width:"4px",top:"0px",bottom:"0px",borderLeft:h},"ui-resizable-se":{cursor:"se-resize",width:"4px",height:"4px",borderRight:h,borderBottom:h},"ui-resizable-sw":{cursor:"sw-resize",width:"4px",height:"4px",borderBottom:h,borderLeft:h},"ui-resizable-ne":{cursor:"ne-resize",width:"4px",height:"4px",borderRight:h,borderTop:h},"ui-resizable-nw":{cursor:"nw-resize",width:"4px",height:"4px",borderLeft:h,borderTop:h}};q.knobTheme={"ui-resizable-handle":{background:"#F2F2F2",border:"1px solid #808080",height:"8px",width:"8px"},"ui-resizable-n":{cursor:"n-resize",top:"0px",left:"45%"},"ui-resizable-s":{cursor:"s-resize",bottom:"0px",left:"45%"},"ui-resizable-e":{cursor:"e-resize",right:"0px",top:"45%"},"ui-resizable-w":{cursor:"w-resize",left:"0px",top:"45%"},"ui-resizable-se":{cursor:"se-resize",right:"0px",bottom:"0px"},"ui-resizable-sw":{cursor:"sw-resize",left:"0px",bottom:"0px"},"ui-resizable-nw":{cursor:"nw-resize",left:"0px",top:"0px"},"ui-resizable-ne":{cursor:"ne-resize",right:"0px",top:"0px"}};q._nodeName=this.element[0].nodeName;if(q._nodeName.match(/canvas|textarea|input|select|button|img/i)){var b=this.element;if(/relative/.test(b.css("position"))&&a.browser.opera){b.css({position:"relative",top:"auto",left:"auto"})}b.wrap(a('<div class="ui-wrapper"	style="overflow: hidden;"></div>').css({position:b.css("position"),width:b.outerWidth(),height:b.outerHeight(),top:b.css("top"),left:b.css("left")}));var k=this.element;this.element=this.element.parent();this.element.data("resizable",this);this.element.css({marginLeft:k.css("marginLeft"),marginTop:k.css("marginTop"),marginRight:k.css("marginRight"),marginBottom:k.css("marginBottom")});k.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0});if(a.browser.safari&&q.preventDefault){k.css("resize","none")}q.proportionallyResize=k.css({position:"static",zoom:1,display:"block"});this.element.css({margin:k.css("margin")});this._proportionallyResize()}if(!q.handles){q.handles=!a(".ui-resizable-handle",this.element).length?"e,s,se":{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}}if(q.handles.constructor==String){q.zIndex=q.zIndex||1000;if(q.handles=="all"){q.handles="n,e,s,w,se,sw,ne,nw"}var r=q.handles.split(",");q.handles={};var g={handle:"position: absolute; display: none; overflow:hidden;",n:"top: 0pt; width:100%;",e:"right: 0pt; height:100%;",s:"bottom: 0pt; width:100%;",w:"left: 0pt; height:100%;",se:"bottom: 0pt; right: 0px;",sw:"bottom: 0pt; left: 0px;",ne:"top: 0pt; right: 0px;",nw:"top: 0pt; left: 0px;"};for(var u=0;u<r.length;u++){var v=a.trim(r[u]),m=q.defaultTheme,f="ui-resizable-"+v,c=!a.ui.css(f)&&!q.knobHandles,s=a.ui.css("ui-resizable-knob-handle"),w=a.extend(m[f],m["ui-resizable-handle"]),d=a.extend(q.knobTheme[f],!s?q.knobTheme["ui-resizable-handle"]:{});var l=/sw|se|ne|nw/.test(v)?{zIndex:++q.zIndex}:{};var j=(c?g[v]:""),e=a(['<div class="ui-resizable-handle ',f,'" style="',j,g.handle,'"></div>'].join("")).css(l);q.handles[v]=".ui-resizable-"+v;this.element.append(e.css(c?w:{}).css(q.knobHandles?d:{}).addClass(q.knobHandles?"ui-resizable-knob-handle":"").addClass(q.knobHandles))}if(q.knobHandles){this.element.addClass("ui-resizable-knob").css(!a.ui.css("ui-resizable-knob")?{}:{})}}this._renderAxis=function(z){z=z||this.element;for(var o in q.handles){if(q.handles[o].constructor==String){q.handles[o]=a(q.handles[o],this.element).show()}if(q.transparent){q.handles[o].css({opacity:0})}if(this.element.is(".ui-wrapper")&&q._nodeName.match(/textarea|input|select|button/i)){var x=a(q.handles[o],this.element),y=0;y=/sw|ne|nw|se|n|s/.test(o)?x.outerHeight():x.outerWidth();var n=["padding",/ne|nw|n/.test(o)?"Top":/se|sw|s/.test(o)?"Bottom":/^e$/.test(o)?"Right":"Left"].join("");if(!q.transparent){z.css(n,y)}this._proportionallyResize()}if(!a(q.handles[o]).length){continue}}};this._renderAxis(this.element);q._handles=a(".ui-resizable-handle",p.element);if(q.disableSelection){q._handles.each(function(n,o){a.ui.disableSelection(o)})}q._handles.mouseover(function(){if(!q.resizing){if(this.className){var i=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)}p.axis=q.axis=i&&i[1]?i[1]:"se"}});if(q.autoHide){q._handles.hide();a(p.element).addClass("ui-resizable-autohide").hover(function(){a(this).removeClass("ui-resizable-autohide");q._handles.show()},function(){if(!q.resizing){a(this).addClass("ui-resizable-autohide");q._handles.hide()}})}this.mouseInit()},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,options:this.options,originalSize:this.originalSize,originalPosition:this.originalPosition}},propagate:function(c,b){a.ui.plugin.call(this,c,[b,this.ui()]);if(c!="resize"){this.element.triggerHandler(["resize",c].join(""),[b,this.ui()],this.options[c])}},destroy:function(){var d=this.element,c=d.children(".ui-resizable").get(0);this.mouseDestroy();var b=function(e){a(e).removeClass("ui-resizable ui-resizable-disabled").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};b(d);if(d.is(".ui-wrapper")&&c){d.parent().append(a(c).css({position:d.css("position"),width:d.outerWidth(),height:d.outerHeight(),top:d.css("top"),left:d.css("left")})).end().remove();b(c)}},mouseStart:function(m){if(this.options.disabled){return false}var l=false;for(var j in this.options.handles){if(a(this.options.handles[j])[0]==m.target){l=true}}if(!l){return false}var c=this.options,b=this.element.position(),d=this.element,k=function(e){return parseInt(e,10)||0},h=a.browser.msie&&a.browser.version<7;c.resizing=true;c.documentScroll={top:a(document).scrollTop(),left:a(document).scrollLeft()};if(d.is(".ui-draggable")||(/absolute/).test(d.css("position"))){var p=a.browser.msie&&!c.containment&&(/absolute/).test(d.css("position"))&&!(/relative/).test(d.parent().css("position"));var n=p?c.documentScroll.top:0,g=p?c.documentScroll.left:0;d.css({position:"absolute",top:(b.top+n),left:(b.left+g)})}if(a.browser.opera&&/relative/.test(d.css("position"))){d.css({position:"relative",top:"auto",left:"auto"})}this._renderProxy();var q=k(this.helper.css("left")),f=k(this.helper.css("top"));if(c.containment){q+=a(c.containment).scrollLeft()||0;f+=a(c.containment).scrollTop()||0}this.offset=this.helper.offset();this.position={left:q,top:f};this.size=c.helper||h?{width:d.outerWidth(),height:d.outerHeight()}:{width:d.width(),height:d.height()};this.originalSize=c.helper||h?{width:d.outerWidth(),height:d.outerHeight()}:{width:d.width(),height:d.height()};this.originalPosition={left:q,top:f};this.sizeDiff={width:d.outerWidth()-d.width(),height:d.outerHeight()-d.height()};this.originalMousePosition={left:m.pageX,top:m.pageY};c.aspectRatio=(typeof c.aspectRatio=="number")?c.aspectRatio:((this.originalSize.height/this.originalSize.width)||1);if(c.preserveCursor){a("body").css("cursor",this.axis+"-resize")}this.propagate("start",m);return true},mouseDrag:function(j){var d=this.helper,c=this.options,k={},n=this,g=this.originalMousePosition,l=this.axis;var p=(j.pageX-g.left)||0,m=(j.pageY-g.top)||0;var f=this._change[l];if(!f){return false}var i=f.apply(this,[j,p,m]),h=a.browser.msie&&a.browser.version<7,b=this.sizeDiff;if(c._aspectRatio||j.shiftKey){i=this._updateRatio(i,j)}i=this._respectSize(i,j);this.propagate("resize",j);d.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"});if(!c.helper&&c.proportionallyResize){this._proportionallyResize()}this._updateCache(i);this.element.triggerHandler("resize",[j,this.ui()],this.options.resize);return false},mouseStop:function(j){this.options.resizing=false;var f=this.options,i=function(e){return parseInt(e,10)||0},l=this;if(f.helper){var d=f.proportionallyResize,b=d&&(/textarea/i).test(d.get(0).nodeName),c=b&&a.ui.hasScroll(d.get(0),"left")?0:l.sizeDiff.height,h=b?0:l.sizeDiff.width;var m={width:(l.size.width-h),height:(l.size.height-c)},g=(parseInt(l.element.css("left"),10)+(l.position.left-l.originalPosition.left))||null,k=(parseInt(l.element.css("top"),10)+(l.position.top-l.originalPosition.top))||null;if(!f.animate){this.element.css(a.extend(m,{top:k,left:g}))}if(f.helper&&!f.animate){this._proportionallyResize()}}if(f.preserveCursor){a("body").css("cursor","auto")}this.propagate("stop",j);if(f.helper){this.helper.remove()}return false},_updateCache:function(b){var c=this.options;this.offset=this.helper.offset();if(b.left){this.position.left=b.left}if(b.top){this.position.top=b.top}if(b.height){this.size.height=b.height}if(b.width){this.size.width=b.width}},_updateRatio:function(d,f){var g=this.options,h=this.position,c=this.size,b=this.axis;if(d.height){d.width=(c.height/g.aspectRatio)}else{if(d.width){d.height=(c.width*g.aspectRatio)}}if(b=="sw"){d.left=h.left+(c.width-d.width);d.top=null}if(b=="nw"){d.top=h.top+(c.height-d.height);d.left=h.left+(c.width-d.width)}return d},_respectSize:function(i,j){var g=this.helper,f=this.options,p=f._aspectRatio||j.shiftKey,n=this.axis,r=i.width&&f.maxWidth&&f.maxWidth<i.width,k=i.height&&f.maxHeight&&f.maxHeight<i.height,d=i.width&&f.minWidth&&f.minWidth>i.width,q=i.height&&f.minHeight&&f.minHeight>i.height;if(d){i.width=f.minWidth}if(q){i.height=f.minHeight}if(r){i.width=f.maxWidth}if(k){i.height=f.maxHeight}var c=this.originalPosition.left+this.originalSize.width,m=this.position.top+this.size.height;var h=/sw|nw|w/.test(n),b=/nw|ne|n/.test(n);if(d&&h){i.left=c-f.minWidth}if(r&&h){i.left=c-f.maxWidth}if(q&&b){i.top=m-f.minHeight}if(k&&b){i.top=m-f.maxHeight}var l=!i.width&&!i.height;if(l&&!i.left&&i.top){i.top=null}else{if(l&&!i.top&&i.left){i.left=null}}return i},_proportionallyResize:function(){var g=this.options;if(!g.proportionallyResize){return}var e=g.proportionallyResize,d=this.helper||this.element;if(!g.borderDif){var c=[e.css("borderTopWidth"),e.css("borderRightWidth"),e.css("borderBottomWidth"),e.css("borderLeftWidth")],f=[e.css("paddingTop"),e.css("paddingRight"),e.css("paddingBottom"),e.css("paddingLeft")];g.borderDif=a.map(c,function(b,j){var h=parseInt(b,10)||0,k=parseInt(f[j],10)||0;return h+k})}e.css({height:(d.height()-g.borderDif[0]-g.borderDif[2])+"px",width:(d.width()-g.borderDif[1]-g.borderDif[3])+"px"})},_renderProxy:function(){var c=this.element,f=this.options;this.elementOffset=c.offset();if(f.helper){this.helper=this.helper||a('<div style="overflow:hidden;"></div>');var b=a.browser.msie&&a.browser.version<7,d=(b?1:0),e=(b?2:-1);this.helper.addClass(f.helper).css({width:c.outerWidth()+e,height:c.outerHeight()+e,position:"absolute",left:this.elementOffset.left-d+"px",top:this.elementOffset.top-d+"px",zIndex:++f.zIndex});this.helper.appendTo("body");if(f.disableSelection){a.ui.disableSelection(this.helper.get(0))}}else{this.helper=c}},_change:{e:function(d,c,b){return{width:this.originalSize.width+c}},w:function(g,c,b){var h=this.options,d=this.originalSize,f=this.originalPosition;return{left:f.left+c,width:d.width-c}},n:function(g,c,b){var h=this.options,d=this.originalSize,f=this.originalPosition;return{top:f.top+b,height:d.height-b}},s:function(d,c,b){return{height:this.originalSize.height+b}},se:function(d,c,b){return a.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[d,c,b]))},sw:function(d,c,b){return a.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[d,c,b]))},ne:function(d,c,b){return a.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[d,c,b]))},nw:function(d,c,b){return a.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[d,c,b]))}}}));a.extend(a.ui.resizable,{defaults:{cancel:":input",distance:1,delay:0,preventDefault:true,transparent:false,minWidth:10,minHeight:10,aspectRatio:false,disableSelection:true,preserveCursor:true,autoHide:false,knobHandles:false}});a.ui.plugin.add("resizable","containment",{start:function(j,l){var f=l.options,n=a(this).data("resizable"),h=n.element;var c=f.containment,g=(c instanceof a)?c.get(0):(/parent/.test(c))?h.parent().get(0):c;if(!g){return}n.containerElement=a(g);if(/document/.test(c)||c==document){n.containerOffset={left:0,top:0};n.containerPosition={left:0,top:0};n.parentData={element:a(document),left:0,top:0,width:a(document).width(),height:a(document).height()||document.body.parentNode.scrollHeight}}else{n.containerOffset=a(g).offset();n.containerPosition=a(g).position();n.containerSize={height:a(g).innerHeight(),width:a(g).innerWidth()};var k=n.containerOffset,b=n.containerSize.height,i=n.containerSize.width,d=(a.ui.hasScroll(g,"left")?g.scrollWidth:i),m=(a.ui.hasScroll(g)?g.scrollHeight:b);n.parentData={element:g,left:k.left,top:k.top,width:d,height:m}}},resize:function(i,l){var f=l.options,p=a(this).data("resizable"),c=p.containerSize,k=p.containerOffset,h=p.size,j=p.position,m=f._aspectRatio||i.shiftKey,b={top:0,left:0},d=p.containerElement;if(d[0]!=document&&/static/.test(d.css("position"))){b=p.containerPosition}if(j.left<(f.helper?k.left:b.left)){p.size.width=p.size.width+(f.helper?(p.position.left-k.left):(p.position.left-b.left));if(m){p.size.height=p.size.width*f.aspectRatio}p.position.left=f.helper?k.left:b.left}if(j.top<(f.helper?k.top:0)){p.size.height=p.size.height+(f.helper?(p.position.top-k.top):p.position.top);if(m){p.size.width=p.size.height/f.aspectRatio}p.position.top=f.helper?k.top:0}var g=(f.helper?p.offset.left-k.left:(p.position.left-b.left))+p.sizeDiff.width,n=(f.helper?p.offset.top-k.top:p.position.top)+p.sizeDiff.height;if(g+p.size.width>=p.parentData.width){p.size.width=p.parentData.width-g;if(m){p.size.height=p.size.width*f.aspectRatio}}if(n+p.size.height>=p.parentData.height){p.size.height=p.parentData.height-n;if(m){p.size.width=p.size.height/f.aspectRatio}}},stop:function(i,l){var c=l.options,n=a(this).data("resizable"),j=n.position,k=n.containerOffset,b=n.containerPosition,d=n.containerElement;var f=a(n.helper),p=f.offset(),m=f.innerWidth(),g=f.innerHeight();if(c.helper&&!c.animate&&/relative/.test(d.css("position"))){a(this).css({left:(p.left-k.left),top:(p.top-k.top),width:m,height:g})}if(c.helper&&!c.animate&&/static/.test(d.css("position"))){a(this).css({left:b.left+(p.left-k.left),top:b.top+(p.top-k.top),width:m,height:g})}}});a.ui.plugin.add("resizable","grid",{resize:function(i,k){var d=k.options,m=a(this).data("resizable"),h=m.size,f=m.originalSize,g=m.originalPosition,l=m.axis,j=d._aspectRatio||i.shiftKey;d.grid=typeof d.grid=="number"?[d.grid,d.grid]:d.grid;var c=Math.round((h.width-f.width)/(d.grid[0]||1))*(d.grid[0]||1),b=Math.round((h.height-f.height)/(d.grid[1]||1))*(d.grid[1]||1);if(/^(se|s|e)$/.test(l)){m.size.width=f.width+c;m.size.height=f.height+b}else{if(/^(ne)$/.test(l)){m.size.width=f.width+c;m.size.height=f.height+b;m.position.top=g.top-b}else{if(/^(sw)$/.test(l)){m.size.width=f.width+c;m.size.height=f.height+b;m.position.left=g.left-c}else{m.size.width=f.width+c;m.size.height=f.height+b;m.position.top=g.top-b;m.position.left=g.left-c}}}}});a.ui.plugin.add("resizable","animate",{stop:function(j,l){var g=l.options,m=a(this).data("resizable");var f=g.proportionallyResize,b=f&&(/textarea/i).test(f.get(0).nodeName),c=b&&a.ui.hasScroll(f.get(0),"left")?0:m.sizeDiff.height,i=b?0:m.sizeDiff.width;var d={width:(m.size.width-i),height:(m.size.height-c)},h=(parseInt(m.element.css("left"),10)+(m.position.left-m.originalPosition.left))||null,k=(parseInt(m.element.css("top"),10)+(m.position.top-m.originalPosition.top))||null;m.element.animate(a.extend(d,k&&h?{top:k,left:h}:{}),{duration:g.animateDuration||"slow",easing:g.animateEasing||"swing",step:function(){var e={width:parseInt(m.element.css("width"),10),height:parseInt(m.element.css("height"),10),top:parseInt(m.element.css("top"),10),left:parseInt(m.element.css("left"),10)};if(f){f.css({width:e.width,height:e.height})}m._updateCache(e);m.propagate("animate",j)}})}});a.ui.plugin.add("resizable","ghost",{start:function(f,d){var g=d.options,b=a(this).data("resizable"),h=g.proportionallyResize,c=b.size;if(!h){b.ghost=b.element.clone()}else{b.ghost=h.clone()}b.ghost.css({opacity:0.25,display:"block",position:"relative",height:c.height,width:c.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof g.ghost=="string"?g.ghost:"");b.ghost.appendTo(b.helper)},resize:function(d,c){var f=c.options,b=a(this).data("resizable"),g=f.proportionallyResize;if(b.ghost){b.ghost.css({position:"relative",height:b.size.height,width:b.size.width})}},stop:function(d,c){var f=c.options,b=a(this).data("resizable"),g=f.proportionallyResize;if(b.ghost&&b.helper){b.helper.get(0).removeChild(b.ghost.get(0))}}});a.ui.plugin.add("resizable","alsoResize",{start:function(f,c){var g=c.options,b=a(this).data("resizable"),d=function(e){a(e).each(function(){a(this).data("resizable-alsoresize",{width:parseInt(a(this).width(),10),height:parseInt(a(this).height(),10),left:parseInt(a(this).css("left"),10),top:parseInt(a(this).css("top"),10)})})};if(typeof(g.alsoResize)=="object"){if(g.alsoResize.length){g.alsoResize=g.alsoResize[0];d(g.alsoResize)}else{a.each(g.alsoResize,function(e,h){d(e)})}}else{d(g.alsoResize)}},resize:function(g,f){var h=f.options,c=a(this).data("resizable"),d=c.originalSize,j=c.originalPosition;var i={height:(c.size.height-d.height)||0,width:(c.size.width-d.width)||0,top:(c.position.top-j.top)||0,left:(c.position.left-j.left)||0},b=function(e,k){a(e).each(function(){var n=a(this).data("resizable-alsoresize"),m={},l=k&&k.length?k:["width","height","top","left"];a.each(l||["width","height","top","left"],function(o,q){var p=(n[q]||0)+(i[q]||0);if(p&&p>=0){m[q]=p||null}});a(this).css(m)})};if(typeof(h.alsoResize)=="object"){a.each(h.alsoResize,function(e,k){b(e,k)})}else{b(h.alsoResize)}},stop:function(c,b){a(this).removeData("resizable-alsoresize-start")}})})(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.width(),bottom:e.top+d.height(),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"})},toggle:function(){if(this.options.disabled){this.enable()}else{this.disable()}},destroy:function(){this.element.removeClass("ui-selectable ui-selectable-disabled").removeData("selectable").unbind(".selectable");this.mouseDestroy()},mouseStart:function(f){var c=this;this.opos=[f.pageX,f.pageY];if(this.options.disabled){return}var d=this.options;this.selectees=a(d.filter,this.element[0]);this.element.triggerHandler("selectablestart",[f,{selectable:this.element[0],options:d}],d.start);a("body").append(this.helper);this.helper.css({"z-index":100,position:"absolute",left:f.clientX,top:f.clientY,width:0,height:0});if(d.autoRefresh){this.refresh()}this.selectees.filter(".ui-selected").each(function(){var e=a.data(this,"selectable-item");e.startselected=true;if(!f.ctrlKey){e.$element.removeClass("ui-selected");e.selected=false;e.$element.addClass("ui-unselecting");e.unselecting=true;c.element.triggerHandler("selectableunselecting",[f,{selectable:c.element[0],unselecting:e.element,options:d}],d.unselecting)}});var b=false;a(f.target).parents().andSelf().each(function(){if(a.data(this,"selectable-item")){b=true}});return this.options.keyboard?!b:true},mouseDrag:function(j){var c=this;this.dragged=true;if(this.options.disabled){return}var f=this.options;var d=this.opos[0],i=this.opos[1],b=j.pageX,h=j.pageY;if(d>b){var g=b;b=d;d=g}if(i>h){var g=h;h=i;i=g}this.helper.css({left:d,top:i,width:b-d,height:h-i});this.selectees.each(function(){var e=a.data(this,"selectable-item");if(!e||e.element==c.element[0]){return}var k=false;if(f.tolerance=="touch"){k=(!(e.left>b||e.right<d||e.top>h||e.bottom<i))}else{if(f.tolerance=="fit"){k=(e.left>d&&e.right<b&&e.top>i&&e.bottom<h)}}if(k){if(e.selected){e.$element.removeClass("ui-selected");e.selected=false}if(e.unselecting){e.$element.removeClass("ui-unselecting");e.unselecting=false}if(!e.selecting){e.$element.addClass("ui-selecting");e.selecting=true;c.element.triggerHandler("selectableselecting",[j,{selectable:c.element[0],selecting:e.element,options:f}],f.selecting)}}else{if(e.selecting){if(j.ctrlKey&&e.startselected){e.$element.removeClass("ui-selecting");e.selecting=false;e.$element.addClass("ui-selected");e.selected=true}else{e.$element.removeClass("ui-selecting");e.selecting=false;if(e.startselected){e.$element.addClass("ui-unselecting");e.unselecting=true}c.element.triggerHandler("selectableunselecting",[j,{selectable:c.element[0],unselecting:e.element,options:f}],f.unselecting)}}if(e.selected){if(!j.ctrlKey&&!e.startselected){e.$element.removeClass("ui-selected");e.selected=false;e.$element.addClass("ui-unselecting");e.unselecting=true;c.element.triggerHandler("selectableunselecting",[j,{selectable:c.element[0],unselecting:e.element,options:f}],f.unselecting)}}}});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.element.triggerHandler("selectableunselected",[d,{selectable:b.element[0],unselected:e.element,options:c}],c.unselected)});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.element.triggerHandler("selectableselected",[d,{selectable:b.element[0],selected:e.element,options:c}],c.selected)});this.element.triggerHandler("selectablestop",[d,{selectable:b.element[0],options:this.options}],this.options.stop);this.helper.remove();return false}}));a.extend(a.ui.selectable,{defaults:{distance:1,delay:0,cancel:":input",appendTo:"body",autoRefresh:true,filter:"*",tolerance:"touch"}})})(jQuery);(function(b){function a(e,d){var c=b.browser.safari&&b.browser.version<522;if(e.contains&&!c){return e.contains(d)}if(e.compareDocumentPosition){return !!(e.compareDocumentPosition(d)&16)}while(d=d.parentNode){if(d==e){return true}}return false}b.widget("ui.sortable",b.extend({},b.ui.mouse,{init:function(){var c=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;if(!(/(relative|absolute|fixed)/).test(this.element.css("position"))){this.element.css("position","relative")}this.offset=this.element.offset();this.mouseInit()},plugins:{},ui:function(c){return{helper:(c||this)["helper"],placeholder:(c||this)["placeholder"]||b([]),position:(c||this)["position"],absolutePosition:(c||this)["positionAbs"],options:this.options,element:this.element,item:(c||this)["currentItem"],sender:c?c.element:null}},propagate:function(g,f,c,d){b.ui.plugin.call(this,g,[f,this.ui(c)]);if(!d){this.element.triggerHandler(g=="sort"?g:"sort"+g,[f,this.ui(c)],this.options[g])}},serialize:function(e){var c=(b.isFunction(this.options.items)?this.options.items.call(this.element):b(this.options.items,this.element)).not(".ui-sortable-helper");var d=[];e=e||{};c.each(function(){var f=(b(this).attr(e.attribute||"id")||"").match(e.expression||(/(.+)[-=_](.+)/));if(f){d.push((e.key||f[1])+"[]="+(e.key&&e.expression?f[1]:f[2]))}});return d.join("&")},toArray:function(c){var d=(b.isFunction(this.options.items)?this.options.items.call(this.element):b(this.options.items,this.element)).not(".ui-sortable-helper");var e=[];d.each(function(){e.push(b(this).attr(c||"id"))});return e},intersectsWith:function(j){var e=this.positionAbs.left,d=e+this.helperProportions.width,i=this.positionAbs.top,h=i+this.helperProportions.height;var f=j.left,c=f+j.width,k=j.top,g=k+j.height;if(this.options.tolerance=="pointer"||this.options.forcePointerForContainers||(this.options.tolerance=="guess"&&this.helperProportions[this.floating?"width":"height"]>j[this.floating?"width":"height"])){return(i+this.offset.click.top>k&&i+this.offset.click.top<g&&e+this.offset.click.left>f&&e+this.offset.click.left<c)}else{return(f<e+(this.helperProportions.width/2)&&d-(this.helperProportions.width/2)<c&&k<i+(this.helperProportions.height/2)&&h-(this.helperProportions.height/2)<g)}},intersectsWithEdge:function(j){var e=this.positionAbs.left,d=e+this.helperProportions.width,i=this.positionAbs.top,h=i+this.helperProportions.height;var f=j.left,c=f+j.width,k=j.top,g=k+j.height;if(this.options.tolerance=="pointer"||(this.options.tolerance=="guess"&&this.helperProportions[this.floating?"width":"height"]>j[this.floating?"width":"height"])){if(!(i+this.offset.click.top>k&&i+this.offset.click.top<g&&e+this.offset.click.left>f&&e+this.offset.click.left<c)){return false}if(this.floating){if(e+this.offset.click.left>f&&e+this.offset.click.left<f+j.width/2){return 2}if(e+this.offset.click.left>f+j.width/2&&e+this.offset.click.left<c){return 1}}else{if(i+this.offset.click.top>k&&i+this.offset.click.top<k+j.height/2){return 2}if(i+this.offset.click.top>k+j.height/2&&i+this.offset.click.top<g){return 1}}}else{if(!(f<e+(this.helperProportions.width/2)&&d-(this.helperProportions.width/2)<c&&k<i+(this.helperProportions.height/2)&&h-(this.helperProportions.height/2)<g)){return false}if(this.floating){if(d>f&&e<f){return 2}if(e<c&&d>c){return 1}}else{if(h>k&&i<k){return 1}if(i<g&&h>g){return 2}}}return false},refresh:function(){this.refreshItems();this.refreshPositions()},refreshItems:function(){this.items=[];this.containers=[this];var d=this.items;var c=this;var f=[[b.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):b(this.options.items,this.element),this]];if(this.options.connectWith){for(var g=this.options.connectWith.length-1;g>=0;g--){var k=b(this.options.connectWith[g]);for(var e=k.length-1;e>=0;e--){var h=b.data(k[e],"sortable");if(h&&!h.options.disabled){f.push([b.isFunction(h.options.items)?h.options.items.call(h.element):b(h.options.items,h.element),h]);this.containers.push(h)}}}}for(var g=f.length-1;g>=0;g--){f[g][0].each(function(){b.data(this,"sortable-item",f[g][1]);d.push({item:b(this),instance:f[g][1],width:0,height:0,left:0,top:0})})}},refreshPositions:function(d){if(this.offsetParent){var c=this.offsetParent.offset();this.offset.parent={top:c.top+this.offsetParentBorders.top,left:c.left+this.offsetParentBorders.left}}for(var f=this.items.length-1;f>=0;f--){if(this.items[f].instance!=this.currentContainer&&this.currentContainer&&this.items[f].item[0]!=this.currentItem[0]){continue}var e=this.options.toleranceElement?b(this.options.toleranceElement,this.items[f].item):this.items[f].item;if(!d){this.items[f].width=e[0].offsetWidth;this.items[f].height=e[0].offsetHeight}var g=e.offset();this.items[f].left=g.left;this.items[f].top=g.top}if(this.options.custom&&this.options.custom.refreshContainers){this.options.custom.refreshContainers.call(this)}else{for(var f=this.containers.length-1;f>=0;f--){var g=this.containers[f].element.offset();this.containers[f].containerCache.left=g.left;this.containers[f].containerCache.top=g.top;this.containers[f].containerCache.width=this.containers[f].element.outerWidth();this.containers[f].containerCache.height=this.containers[f].element.outerHeight()}}},destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled").removeData("sortable").unbind(".sortable");this.mouseDestroy();for(var c=this.items.length-1;c>=0;c--){this.items[c].item.removeData("sortable-item")}},createPlaceholder:function(e){var c=e||this,f=c.options;if(f.placeholder.constructor==String){var d=f.placeholder;f.placeholder={element:function(){return b("<div></div>").addClass(d)[0]},update:function(g,h){h.css(g.offset()).css({width:g.outerWidth(),height:g.outerHeight()})}}}c.placeholder=b(f.placeholder.element.call(c.element,c.currentItem)).appendTo("body").css({position:"absolute"});f.placeholder.update.call(c.element,c.currentItem,c.placeholder)},contactContainers:function(g){for(var d=this.containers.length-1;d>=0;d--){if(this.intersectsWith(this.containers[d].containerCache)){if(!this.containers[d].containerCache.over){if(this.currentContainer!=this.containers[d]){var l=10000;var k=null;var f=this.positionAbs[this.containers[d].floating?"left":"top"];for(var c=this.items.length-1;c>=0;c--){if(!a(this.containers[d].element[0],this.items[c].item[0])){continue}var h=this.items[c][this.containers[d].floating?"left":"top"];if(Math.abs(h-f)<l){l=Math.abs(h-f);k=this.items[c]}}if(!k&&!this.options.dropOnEmpty){continue}if(this.placeholder){this.placeholder.remove()}if(this.containers[d].options.placeholder){this.containers[d].createPlaceholder(this)}else{this.placeholder=null}this.currentContainer=this.containers[d];k?this.rearrange(g,k,null,true):this.rearrange(g,null,this.containers[d].element,true);this.propagate("change",g);this.containers[d].propagate("change",g,this)}this.containers[d].propagate("over",g,this);this.containers[d].containerCache.over=1}}else{if(this.containers[d].containerCache.over){this.containers[d].propagate("out",g,this);this.containers[d].containerCache.over=0}}}},mouseCapture:function(h,g){if(this.options.disabled||this.options.type=="static"){return false}this.refreshItems();var f=null,d=this,c=b(h.target).parents().each(function(){if(b.data(this,"sortable-item")==d){f=b(this);return false}});if(b.data(h.target,"sortable-item")==d){f=b(h.target)}if(!f){return false}if(this.options.handle&&!g){var i=false;b(this.options.handle,f).find("*").andSelf().each(function(){if(this==h.target){i=true}});if(!i){return false}}this.currentItem=f;return true},mouseStart:function(j,g,c){var l=this.options;this.currentContainer=this;this.refreshPositions();this.helper=typeof l.helper=="function"?b(l.helper.apply(this.element[0],[j,this.currentItem])):this.currentItem.clone();if(!this.helper.parents("body").length){b(l.appendTo!="parent"?l.appendTo:this.currentItem[0].parentNode)[0].appendChild(this.helper[0])}this.helper.css({position:"absolute",clear:"both"}).addClass("ui-sortable-helper");this.margins={left:(parseInt(this.currentItem.css("marginLeft"),10)||0),top:(parseInt(this.currentItem.css("marginTop"),10)||0)};this.offset=this.currentItem.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};this.offset.click={left:j.pageX-this.offset.left,top:j.pageY-this.offset.top};this.offsetParent=this.helper.offsetParent();var d=this.offsetParent.offset();this.offsetParentBorders={top:(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)};this.offset.parent={top:d.top+this.offsetParentBorders.top,left:d.left+this.offsetParentBorders.left};this.originalPosition=this.generatePosition(j);this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]};this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()};if(l.placeholder){this.createPlaceholder()}this.propagate("start",j);this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()};if(l.cursorAt){if(l.cursorAt.left!=undefined){this.offset.click.left=l.cursorAt.left}if(l.cursorAt.right!=undefined){this.offset.click.left=this.helperProportions.width-l.cursorAt.right}if(l.cursorAt.top!=undefined){this.offset.click.top=l.cursorAt.top}if(l.cursorAt.bottom!=undefined){this.offset.click.top=this.helperProportions.height-l.cursorAt.bottom}}if(l.containment){if(l.containment=="parent"){l.containment=this.helper[0].parentNode}if(l.containment=="document"||l.containment=="window"){this.containment=[0-this.offset.parent.left,0-this.offset.parent.top,b(l.containment=="document"?document:window).width()-this.offset.parent.left-this.helperProportions.width-this.margins.left-(parseInt(this.element.css("marginRight"),10)||0),(b(l.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.offset.parent.top-this.helperProportions.height-this.margins.top-(parseInt(this.element.css("marginBottom"),10)||0)]}if(!(/^(document|window|parent)$/).test(l.containment)){var h=b(l.containment)[0];var k=b(l.containment).offset();this.containment=[k.left+(parseInt(b(h).css("borderLeftWidth"),10)||0)-this.offset.parent.left,k.top+(parseInt(b(h).css("borderTopWidth"),10)||0)-this.offset.parent.top,k.left+Math.max(h.scrollWidth,h.offsetWidth)-(parseInt(b(h).css("borderLeftWidth"),10)||0)-this.offset.parent.left-this.helperProportions.width-this.margins.left-(parseInt(this.currentItem.css("marginRight"),10)||0),k.top+Math.max(h.scrollHeight,h.offsetHeight)-(parseInt(b(h).css("borderTopWidth"),10)||0)-this.offset.parent.top-this.helperProportions.height-this.margins.top-(parseInt(this.currentItem.css("marginBottom"),10)||0)]}}if(this.options.placeholder!="clone"){this.currentItem.css("visibility","hidden")}if(!c){for(var f=this.containers.length-1;f>=0;f--){this.containers[f].propagate("activate",j,this)}}if(b.ui.ddmanager){b.ui.ddmanager.current=this}if(b.ui.ddmanager&&!l.dropBehaviour){b.ui.ddmanager.prepareOffsets(this,j)}this.dragging=true;this.mouseDrag(j);return true},convertPositionTo:function(e,f){if(!f){f=this.position}var c=e=="absolute"?1:-1;return{top:(f.top+this.offset.parent.top*c-(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)*c+this.margins.top*c),left:(f.left+this.offset.parent.left*c-(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft)*c+this.margins.left*c)}},generatePosition:function(g){var h=this.options;var c={top:(g.pageY-this.offset.click.top-this.offset.parent.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)),left:(g.pageX-this.offset.click.left-this.offset.parent.left+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft))};if(!this.originalPosition){return c}if(this.containment){if(c.left<this.containment[0]){c.left=this.containment[0]}if(c.top<this.containment[1]){c.top=this.containment[1]}if(c.left>this.containment[2]){c.left=this.containment[2]}if(c.top>this.containment[3]){c.top=this.containment[3]}}if(h.grid){var f=this.originalPosition.top+Math.round((c.top-this.originalPosition.top)/h.grid[1])*h.grid[1];c.top=this.containment?(!(f<this.containment[1]||f>this.containment[3])?f:(!(f<this.containment[1])?f-h.grid[1]:f+h.grid[1])):f;var d=this.originalPosition.left+Math.round((c.left-this.originalPosition.left)/h.grid[0])*h.grid[0];c.left=this.containment?(!(d<this.containment[0]||d>this.containment[2])?d:(!(d<this.containment[0])?d-h.grid[0]:d+h.grid[0])):d}return c},mouseDrag:function(d){this.position=this.generatePosition(d);this.positionAbs=this.convertPositionTo("absolute");b.ui.plugin.call(this,"sort",[d,this.ui()]);this.positionAbs=this.convertPositionTo("absolute");this.helper[0].style.left=this.position.left+"px";this.helper[0].style.top=this.position.top+"px";for(var c=this.items.length-1;c>=0;c--){var f=this.intersectsWithEdge(this.items[c]);if(!f){continue}if(this.items[c].item[0]!=this.currentItem[0]&&this.currentItem[f==1?"next":"prev"]()[0]!=this.items[c].item[0]&&!a(this.currentItem[0],this.items[c].item[0])&&(this.options.type=="semi-dynamic"?!a(this.element[0],this.items[c].item[0]):true)){this.direction=f==1?"down":"up";this.rearrange(d,this.items[c]);this.propagate("change",d);break}}this.contactContainers(d);if(b.ui.ddmanager){b.ui.ddmanager.drag(this,d)}this.element.triggerHandler("sort",[d,this.ui()],this.options.sort);return false},rearrange:function(j,h,d,g){d?d[0].appendChild(this.currentItem[0]):h.item[0].parentNode.insertBefore(this.currentItem[0],(this.direction=="down"?h.item[0]:h.item[0].nextSibling));this.counter=this.counter?++this.counter:1;var f=this,c=this.counter;window.setTimeout(function(){if(c==f.counter){f.refreshPositions(!g)}},0);if(this.options.placeholder){this.options.placeholder.update.call(this.element,this.currentItem,this.placeholder)}},mouseStop:function(f,d){if(b.ui.ddmanager&&!this.options.dropBehaviour){b.ui.ddmanager.drop(this,f)}if(this.options.revert){var c=this;var g=c.currentItem.offset();if(c.placeholder){c.placeholder.animate({opacity:"hide"},(parseInt(this.options.revert,10)||500)-50)}b(this.helper).animate({left:g.left-this.offset.parent.left-c.margins.left+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft),top:g.top-this.offset.parent.top-c.margins.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)},parseInt(this.options.revert,10)||500,function(){c.clear(f)})}else{this.clear(f,d)}return false},clear:function(f,d){if(this.domPosition.prev!=this.currentItem.prev().not(".ui-sortable-helper")[0]||this.domPosition.parent!=this.currentItem.parent()[0]){this.propagate("update",f,null,d)}if(!a(this.element[0],this.currentItem[0])){this.propagate("remove",f,null,d);for(var c=this.containers.length-1;c>=0;c--){if(a(this.containers[c].element[0],this.currentItem[0])){this.containers[c].propagate("update",f,this,d);this.containers[c].propagate("receive",f,this,d)}}}for(var c=this.containers.length-1;c>=0;c--){this.containers[c].propagate("deactivate",f,this,d);if(this.containers[c].containerCache.over){this.containers[c].propagate("out",f,this);this.containers[c].containerCache.over=0}}this.dragging=false;if(this.cancelHelperRemoval){this.propagate("stop",f,null,d);return false}b(this.currentItem).css("visibility","");if(this.placeholder){this.placeholder.remove()}this.helper.remove();this.helper=null;this.propagate("stop",f,null,d);return true}}));b.extend(b.ui.sortable,{getter:"serialize toArray",defaults:{helper:"clone",tolerance:"guess",distance:1,delay:0,scroll:true,scrollSensitivity:20,scrollSpeed:20,cancel:":input",items:"> *",zIndex:1000,dropOnEmpty:true,appendTo:"parent"}});b.ui.plugin.add("sortable","cursor",{start:function(f,d){var c=b("body");if(c.css("cursor")){d.options._cursor=c.css("cursor")}c.css("cursor",d.options.cursor)},stop:function(d,c){if(c.options._cursor){b("body").css("cursor",c.options._cursor)}}});b.ui.plugin.add("sortable","zIndex",{start:function(f,d){var c=d.helper;if(c.css("zIndex")){d.options._zIndex=c.css("zIndex")}c.css("zIndex",d.options.zIndex)},stop:function(d,c){if(c.options._zIndex){b(c.helper).css("zIndex",c.options._zIndex)}}});b.ui.plugin.add("sortable","opacity",{start:function(f,d){var c=d.helper;if(c.css("opacity")){d.options._opacity=c.css("opacity")}c.css("opacity",d.options.opacity)},stop:function(d,c){if(c.options._opacity){b(c.helper).css("opacity",c.options._opacity)}}});b.ui.plugin.add("sortable","scroll",{start:function(f,d){var g=d.options;var c=b(this).data("sortable");c.overflowY=function(e){do{if(/auto|scroll/.test(e.css("overflow"))||(/auto|scroll/).test(e.css("overflow-y"))){return e}e=e.parent()}while(e[0].parentNode);return b(document)}(c.currentItem);c.overflowX=function(e){do{if(/auto|scroll/.test(e.css("overflow"))||(/auto|scroll/).test(e.css("overflow-x"))){return e}e=e.parent()}while(e[0].parentNode);return b(document)}(c.currentItem);if(c.overflowY[0]!=document&&c.overflowY[0].tagName!="HTML"){c.overflowYOffset=c.overflowY.offset()}if(c.overflowX[0]!=document&&c.overflowX[0].tagName!="HTML"){c.overflowXOffset=c.overflowX.offset()}},sort:function(f,d){var g=d.options;var c=b(this).data("sortable");if(c.overflowY[0]!=document&&c.overflowY[0].tagName!="HTML"){if((c.overflowYOffset.top+c.overflowY[0].offsetHeight)-f.pageY<g.scrollSensitivity){c.overflowY[0].scrollTop=c.overflowY[0].scrollTop+g.scrollSpeed}if(f.pageY-c.overflowYOffset.top<g.scrollSensitivity){c.overflowY[0].scrollTop=c.overflowY[0].scrollTop-g.scrollSpeed}}else{if(f.pageY-b(document).scrollTop()<g.scrollSensitivity){b(document).scrollTop(b(document).scrollTop()-g.scrollSpeed)}if(b(window).height()-(f.pageY-b(document).scrollTop())<g.scrollSensitivity){b(document).scrollTop(b(document).scrollTop()+g.scrollSpeed)}}if(c.overflowX[0]!=document&&c.overflowX[0].tagName!="HTML"){if((c.overflowXOffset.left+c.overflowX[0].offsetWidth)-f.pageX<g.scrollSensitivity){c.overflowX[0].scrollLeft=c.overflowX[0].scrollLeft+g.scrollSpeed}if(f.pageX-c.overflowXOffset.left<g.scrollSensitivity){c.overflowX[0].scrollLeft=c.overflowX[0].scrollLeft-g.scrollSpeed}}else{if(f.pageX-b(document).scrollLeft()<g.scrollSensitivity){b(document).scrollLeft(b(document).scrollLeft()-g.scrollSpeed)}if(b(window).width()-(f.pageX-b(document).scrollLeft())<g.scrollSensitivity){b(document).scrollLeft(b(document).scrollLeft()+g.scrollSpeed)}}}});b.ui.plugin.add("sortable","axis",{sort:function(f,d){var c=b(this).data("sortable");if(d.options.axis=="y"){c.position.left=c.originalPosition.left}if(d.options.axis=="x"){c.position.top=c.originalPosition.top}}})})(jQuery);(function(e){e.widget("ui.accordion",{init:function(){var g=this.options;if(g.navigation){var j=this.element.find("a").filter(g.navigationFilter);if(j.length){if(j.filter(g.header).length){g.active=j}else{g.active=j.parent().parent().prev();j.addClass("current")}}}g.headers=this.element.find(g.header);g.active=c(g.headers,g.active);if(e.browser.msie){this.element.find("a").css("zoom","1")}if(!this.element.hasClass("ui-accordion")){this.element.addClass("ui-accordion");e("<span class='ui-accordion-left'/>").insertBefore(g.headers);e("<span class='ui-accordion-right'/>").appendTo(g.headers);g.headers.addClass("ui-accordion-header").attr("tabindex","0")}var i;if(g.fillSpace){i=this.element.parent().height();g.headers.each(function(){i-=e(this).outerHeight()});var h=0;g.headers.next().each(function(){h=Math.max(h,e(this).innerHeight()-e(this).height())}).height(i-h)}else{if(g.autoHeight){i=0;g.headers.next().each(function(){i=Math.max(i,e(this).outerHeight())}).height(i)}}g.headers.not(g.active||"").next().hide();g.active.parent().andSelf().addClass(g.selectedClass);if(g.event){this.element.bind((g.event)+".accordion",f)}},activate:function(g){f.call(this.element[0],{target:c(this.options.headers,g)[0]})},destroy:function(){this.options.headers.next().css("display","");if(this.options.fillSpace||this.options.autoHeight){this.options.headers.next().css("height","")}e.removeData(this.element[0],"accordion");this.element.removeClass("ui-accordion").unbind(".accordion")}});function b(h,g){return function(){return h.apply(g,arguments)}}function d(i){if(!e.data(this,"accordion")){return}var g=e.data(this,"accordion");var h=g.options;h.running=i?0:--h.running;if(h.running){return}if(h.clearStyle){h.toShow.add(h.toHide).css({height:"",overflow:""})}e(this).triggerHandler("accordionchange",[e.event.fix({type:"accordionchange",target:g.element[0]}),h.data],h.change)}function a(g,k,l,j,m){var i=e.data(this,"accordion").options;i.toShow=g;i.toHide=k;i.data=l;var h=b(d,this);i.running=k.size()===0?g.size():k.size();if(i.animated){if(!i.alwaysOpen&&j){e.ui.accordion.animations[i.animated]({toShow:jQuery([]),toHide:k,complete:h,down:m,autoHeight:i.autoHeight})}else{e.ui.accordion.animations[i.animated]({toShow:g,toHide:k,complete:h,down:m,autoHeight:i.autoHeight})}}else{if(!i.alwaysOpen&&j){g.toggle()}else{k.hide();g.show()}h(true)}}function f(l){var j=e.data(this,"accordion").options;if(j.disabled){return false}if(!l.target&&!j.alwaysOpen){j.active.parent().andSelf().toggleClass(j.selectedClass);var i=j.active.next(),m={options:j,newHeader:jQuery([]),oldHeader:j.active,newContent:jQuery([]),oldContent:i},g=(j.active=e([]));a.call(this,g,i,m);return false}var k=e(l.target);k=e(k.parents(j.header)[0]||k);var h=k[0]==j.active[0];if(j.running||(j.alwaysOpen&&h)){return false}if(!k.is(j.header)){return}j.active.parent().andSelf().toggleClass(j.selectedClass);if(!h){k.parent().andSelf().addClass(j.selectedClass)}var g=k.next(),i=j.active.next(),m={options:j,newHeader:k,oldHeader:j.active,newContent:g,oldContent:i},n=j.headers.index(j.active[0])>j.headers.index(k[0]);j.active=h?e([]):k;a.call(this,g,i,m,h,n);return false}function c(h,g){return g!=undefined?typeof g=="number"?h.filter(":eq("+g+")"):h.not(h.not(g)):g===false?e([]):h.filter(":eq(0)")}e.extend(e.ui.accordion,{defaults:{selectedClass:"selected",alwaysOpen:true,animated:"slide",event:"click",header:"a",autoHeight:true,running:0,navigationFilter:function(){return this.href.toLowerCase()==location.href.toLowerCase()}},animations:{slide:function(g,i){g=e.extend({easing:"swing",duration:300},g,i);if(!g.toHide.size()){g.toShow.animate({height:"show"},g);return}var h=g.toHide.height(),j=g.toShow.height(),k=j/h;g.toShow.css({height:0,overflow:"hidden"}).show();g.toHide.filter(":hidden").each(g.complete).end().filter(":visible").animate({height:"hide"},{step:function(l){var m=(h-l)*k;if(e.browser.msie||e.browser.opera){m=Math.ceil(m)}g.toShow.height(m)},duration:g.duration,easing:g.easing,complete:function(){if(!g.autoHeight){g.toShow.css("height","auto")}g.complete()}})},bounceslide:function(g){this.slide(g,{easing:g.down?"bounceout":"swing",duration:g.down?1000:200})},easeslide:function(g){this.slide(g,{easing:"easeinout",duration:700})}}});e.fn.activate=function(g){return this.accordion("activate",g)}})(jQuery);(function(b){var a={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"};b.widget("ui.dialog",{init:function(){var j=this,k=this.options,d=typeof k.resizable=="string"?k.resizable:"n,e,s,w,se,sw,ne,nw",e=this.element.addClass("ui-dialog-content").wrap("<div/>").wrap("<div/>"),g=(this.uiDialogContainer=e.parent().addClass("ui-dialog-container").css({position:"relative",width:"100%",height:"100%"})),h=k.title||e.attr("title")||"",c=(this.uiDialogTitlebar=b('<div class="ui-dialog-titlebar"/>')).append('<span class="ui-dialog-title">'+h+"</span>").append('<a href="#" class="ui-dialog-titlebar-close"><span>X</span></a>').prependTo(g),i=(this.uiDialog=g.parent()).appendTo(document.body).hide().addClass("ui-dialog").addClass(k.dialogClass).addClass(e.attr("className")).removeClass("ui-dialog-content").css({position:"absolute",width:k.width,height:k.height,overflow:"hidden",zIndex:k.zIndex}).attr("tabIndex",-1).css("outline",0).keydown(function(l){if(k.closeOnEscape){var m=27;(l.keyCode&&l.keyCode==m&&j.close())}}).mousedown(function(){j.moveToTop()}),f=(this.uiDialogButtonPane=b("<div/>")).addClass("ui-dialog-buttonpane").css({position:"absolute",bottom:0}).appendTo(i);this.uiDialogTitlebarClose=b(".ui-dialog-titlebar-close",c).hover(function(){b(this).addClass("ui-dialog-titlebar-close-hover")},function(){b(this).removeClass("ui-dialog-titlebar-close-hover")}).mousedown(function(l){l.stopPropagation()}).click(function(){j.close();return false});this.uiDialogTitlebar.find("*").add(this.uiDialogTitlebar).each(function(){b.ui.disableSelection(this)});if(b.fn.draggable){i.draggable({cancel:".ui-dialog-content",helper:k.dragHelper,handle:".ui-dialog-titlebar",start:function(m,l){j.moveToTop();(k.dragStart&&k.dragStart.apply(j.element[0],arguments))},drag:function(m,l){(k.drag&&k.drag.apply(j.element[0],arguments))},stop:function(m,l){(k.dragStop&&k.dragStop.apply(j.element[0],arguments));b.ui.dialog.overlay.resize()}});(k.draggable||i.draggable("disable"))}if(b.fn.resizable){i.resizable({cancel:".ui-dialog-content",helper:k.resizeHelper,maxWidth:k.maxWidth,maxHeight:k.maxHeight,minWidth:k.minWidth,minHeight:k.minHeight,start:function(){(k.resizeStart&&k.resizeStart.apply(j.element[0],arguments))},resize:function(m,l){(k.autoResize&&j.size.apply(j));(k.resize&&k.resize.apply(j.element[0],arguments))},handles:d,stop:function(m,l){(k.autoResize&&j.size.apply(j));(k.resizeStop&&k.resizeStop.apply(j.element[0],arguments));b.ui.dialog.overlay.resize()}});(k.resizable||i.resizable("disable"))}this.createButtons(k.buttons);this.isOpen=false;(k.bgiframe&&b.fn.bgiframe&&i.bgiframe());(k.autoOpen&&this.open())},setData:function(c,d){(a[c]&&this.uiDialog.data(a[c],d));switch(c){case"buttons":this.createButtons(d);break;case"draggable":this.uiDialog.draggable(d?"enable":"disable");break;case"height":this.uiDialog.height(d);break;case"position":this.position(d);break;case"resizable":(typeof d=="string"&&this.uiDialog.data("handles.resizable",d));this.uiDialog.resizable(d?"enable":"disable");break;case"title":b(".ui-dialog-title",this.uiDialogTitlebar).text(d);break;case"width":this.uiDialog.width(d);break}b.widget.prototype.setData.apply(this,arguments)},position:function(h){var d=b(window),e=b(document),f=e.scrollTop(),c=e.scrollLeft(),g=f;if(b.inArray(h,["center","top","right","bottom","left"])>=0){h=[h=="right"||h=="left"?h:"center",h=="top"||h=="bottom"?h:"middle"]}if(h.constructor!=Array){h=["center","middle"]}if(h[0].constructor==Number){c+=h[0]}else{switch(h[0]){case"left":c+=0;break;case"right":c+=d.width()-this.uiDialog.width();break;default:case"center":c+=(d.width()-this.uiDialog.width())/2}}if(h[1].constructor==Number){f+=h[1]}else{switch(h[1]){case"top":f+=0;break;case"bottom":f+=d.height()-this.uiDialog.height();break;default:case"middle":f+=(d.height()-this.uiDialog.height())/2}}f=Math.max(f,g);this.uiDialog.css({top:f,left:c})},size:function(){var d=this.uiDialogContainer,g=this.uiDialogTitlebar,e=this.element,f=parseInt(e.css("margin-top"),10)+parseInt(e.css("margin-bottom"),10),c=parseInt(e.css("margin-left"),10)+parseInt(e.css("margin-right"),10);e.height(d.height()-g.outerHeight()-f);e.width(d.width()-c)},open:function(){if(this.isOpen){return}this.overlay=this.options.modal?new b.ui.dialog.overlay(this):null;(this.uiDialog.next().length>0)&&this.uiDialog.appendTo("body");this.position(this.options.position);this.uiDialog.show(this.options.show);this.options.autoResize&&this.size();this.moveToTop(true);var c=null;var d={options:this.options};this.uiDialogTitlebarClose.focus();this.element.triggerHandler("dialogopen",[c,d],this.options.open);this.isOpen=true},moveToTop:function(e){if((this.options.modal&&!e)||(!this.options.stack&&!this.options.modal)){return this.element.triggerHandler("dialogfocus",[null,{options:this.options}],this.options.focus)}var d=this.options.zIndex,c=this.options;b(".ui-dialog:visible").each(function(){d=Math.max(d,parseInt(b(this).css("z-index"),10)||c.zIndex)});(this.overlay&&this.overlay.$el.css("z-index",++d));this.uiDialog.css("z-index",++d);this.element.triggerHandler("dialogfocus",[null,{options:this.options}],this.options.focus)},close:function(){(this.overlay&&this.overlay.destroy());this.uiDialog.hide(this.options.hide);var d=null;var c={options:this.options};this.element.triggerHandler("dialogclose",[d,c],this.options.close);b.ui.dialog.overlay.resize();this.isOpen=false},destroy:function(){(this.overlay&&this.overlay.destroy());this.uiDialog.hide();this.element.unbind(".dialog").removeData("dialog").removeClass("ui-dialog-content").hide().appendTo("body");this.uiDialog.remove()},createButtons:function(f){var e=this,c=false,d=this.uiDialogButtonPane;d.empty().hide();b.each(f,function(){return !(c=true)});if(c){d.show();b.each(f,function(g,h){b("<button/>").text(g).click(function(){h.apply(e.element[0],arguments)}).appendTo(d)})}}});b.extend(b.ui.dialog,{defaults:{autoOpen:true,autoResize:true,bgiframe:false,buttons:{},closeOnEscape:true,draggable:true,height:200,minHeight:100,minWidth:150,modal:false,overlay:{},position:"center",resizable:true,stack:true,width:300,zIndex:1000},overlay:function(c){this.$el=b.ui.dialog.overlay.create(c)}});b.extend(b.ui.dialog.overlay,{instances:[],events:b.map("focus,mousedown,mouseup,keydown,keypress,click".split(","),function(c){return c+".dialog-overlay"}).join(" "),create:function(d){if(this.instances.length===0){setTimeout(function(){b("a, :input").bind(b.ui.dialog.overlay.events,function(){var f=false;var h=b(this).parents(".ui-dialog");if(h.length){var e=b(".ui-dialog-overlay");if(e.length){var g=parseInt(e.css("z-index"),10);e.each(function(){g=Math.max(g,parseInt(b(this).css("z-index"),10))});f=parseInt(h.css("z-index"),10)>g}else{f=true}}return f})},1);b(document).bind("keydown.dialog-overlay",function(f){var g=27;(f.keyCode&&f.keyCode==g&&d.close())});b(window).bind("resize.dialog-overlay",b.ui.dialog.overlay.resize)}var c=b("<div/>").appendTo(document.body).addClass("ui-dialog-overlay").css(b.extend({borderWidth:0,margin:0,padding:0,position:"absolute",top:0,left:0,width:this.width(),height:this.height()},d.options.overlay));(d.options.bgiframe&&b.fn.bgiframe&&c.bgiframe());this.instances.push(c);return c},destroy:function(c){this.instances.splice(b.inArray(this.instances,c),1);if(this.instances.length===0){b("a, :input").add([document,window]).unbind(".dialog-overlay")}c.remove()},height:function(){if(b.browser.msie&&b.browser.version<7){var d=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);var c=Math.max(document.documentElement.offsetHeight,document.body.offsetHeight);if(d<c){return b(window).height()+"px"}else{return d+"px"}}else{return b(document).height()+"px"}},width:function(){if(b.browser.msie&&b.browser.version<7){var c=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth);var d=Math.max(document.documentElement.offsetWidth,document.body.offsetWidth);if(c<d){return b(window).width()+"px"}else{return c+"px"}}else{return b(document).width()+"px"}},resize:function(){var c=b([]);b.each(b.ui.dialog.overlay.instances,function(){c=c.add(this)});c.css({width:0,height:0}).css({width:b.ui.dialog.overlay.width(),height:b.ui.dialog.overlay.height()})}});b.extend(b.ui.dialog.overlay.prototype,{destroy:function(){b.ui.dialog.overlay.destroy(this.$el)}})})(jQuery);(function(a){a.fn.unwrap=a.fn.unwrap||function(b){return this.each(function(){a(this).parents(b).eq(0).after(this).remove()})};a.widget("ui.slider",{plugins:{},ui:function(b){return{options:this.options,handle:this.currentHandle,value:this.options.axis!="both"||!this.options.axis?Math.round(this.value(null,this.options.axis=="vertical"?"y":"x")):{x:Math.round(this.value(null,"x")),y:Math.round(this.value(null,"y"))},range:this.getRange()}},propagate:function(c,b){a.ui.plugin.call(this,c,[b,this.ui()]);this.element.triggerHandler(c=="slide"?c:"slide"+c,[b,this.ui()],this.options[c])},destroy:function(){this.element.removeClass("ui-slider ui-slider-disabled").removeData("slider").unbind(".slider");if(this.handle&&this.handle.length){this.handle.unwrap("a");this.handle.each(function(){a(this).data("mouse").mouseDestroy()})}this.generated&&this.generated.remove()},setData:function(b,c){a.widget.prototype.setData.apply(this,arguments);if(/min|max|steps/.test(b)){this.initBoundaries()}if(b=="range"){c?this.handle.length==2&&this.createRange():this.removeRange()}},init:function(){var b=this;this.element.addClass("ui-slider");this.initBoundaries();this.handle=a(this.options.handle,this.element);if(!this.handle.length){b.handle=b.generated=a(b.options.handles||[0]).map(function(){var d=a("<div/>").addClass("ui-slider-handle").appendTo(b.element);if(this.id){d.attr("id",this.id)}return d[0]})}var c=function(d){this.element=a(d);this.element.data("mouse",this);this.options=b.options;this.element.bind("mousedown",function(){if(b.currentHandle){this.blur(b.currentHandle)}b.focus(this,1)});this.mouseInit()};a.extend(c.prototype,a.ui.mouse,{mouseStart:function(d){return b.start.call(b,d,this.element[0])},mouseStop:function(d){return b.stop.call(b,d,this.element[0])},mouseDrag:function(d){return b.drag.call(b,d,this.element[0])},mouseCapture:function(){return true},trigger:function(d){this.mouseDown(d)}});a(this.handle).each(function(){new c(this)}).wrap('<a href="javascript:void(0)" style="outline:none;border:none;"></a>').parent().bind("focus",function(d){b.focus(this.firstChild)}).bind("blur",function(d){b.blur(this.firstChild)}).bind("keydown",function(d){if(!b.options.noKeyboard){b.keydown(d.keyCode,this.firstChild)}});this.element.bind("mousedown.slider",function(d){b.click.apply(b,[d]);b.currentHandle.data("mouse").trigger(d);b.firstValue=b.firstValue+1});a.each(this.options.handles||[],function(d,e){b.moveTo(e.start,d,true)});if(!isNaN(this.options.startValue)){this.moveTo(this.options.startValue,0,true)}this.previousHandle=a(this.handle[0]);if(this.handle.length==2&&this.options.range){this.createRange()}},initBoundaries:function(){var b=this.element[0],c=this.options;this.actualSize={width:this.element.outerWidth(),height:this.element.outerHeight()};a.extend(c,{axis:c.axis||(b.offsetWidth<b.offsetHeight?"vertical":"horizontal"),max:!isNaN(parseInt(c.max,10))?{x:parseInt(c.max,10),y:parseInt(c.max,10)}:({x:c.max&&c.max.x||100,y:c.max&&c.max.y||100}),min:!isNaN(parseInt(c.min,10))?{x:parseInt(c.min,10),y:parseInt(c.min,10)}:({x:c.min&&c.min.x||0,y:c.min&&c.min.y||0})});c.realMax={x:c.max.x-c.min.x,y:c.max.y-c.min.y};c.stepping={x:c.stepping&&c.stepping.x||parseInt(c.stepping,10)||(c.steps?c.realMax.x/(c.steps.x||parseInt(c.steps,10)||c.realMax.x):0),y:c.stepping&&c.stepping.y||parseInt(c.stepping,10)||(c.steps?c.realMax.y/(c.steps.y||parseInt(c.steps,10)||c.realMax.y):0)}},keydown:function(c,b){if(/(37|38|39|40)/.test(c)){this.moveTo({x:/(37|39)/.test(c)?(c==37?"-":"+")+"="+this.oneStep("x"):0,y:/(38|40)/.test(c)?(c==38?"-":"+")+"="+this.oneStep("y"):0},b)}},focus:function(b,c){this.currentHandle=a(b).addClass("ui-slider-handle-active");if(c){this.currentHandle.parent()[0].focus()}},blur:function(b){a(b).removeClass("ui-slider-handle-active");if(this.currentHandle&&this.currentHandle[0]==b){this.previousHandle=this.currentHandle;this.currentHandle=null}},click:function(c){var d=[c.pageX,c.pageY];var b=false;this.handle.each(function(){if(this==c.target){b=true}});if(b||this.options.disabled||!(this.currentHandle||this.previousHandle)){return}if(!this.currentHandle&&this.previousHandle){this.focus(this.previousHandle,true)}this.offset=this.element.offset();this.moveTo({y:this.convertValue(c.pageY-this.offset.top-this.currentHandle[0].offsetHeight/2,"y"),x:this.convertValue(c.pageX-this.offset.left-this.currentHandle[0].offsetWidth/2,"x")},null,!this.options.distance)},createRange:function(){if(this.rangeElement){return}this.rangeElement=a("<div></div>").addClass("ui-slider-range").css({position:"absolute"}).appendTo(this.element);this.updateRange()},removeRange:function(){this.rangeElement.remove();this.rangeElement=null},updateRange:function(){var c=this.options.axis=="vertical"?"top":"left";var b=this.options.axis=="vertical"?"height":"width";this.rangeElement.css(c,(parseInt(a(this.handle[0]).css(c),10)||0)+this.handleSize(0,this.options.axis=="vertical"?"y":"x")/2);this.rangeElement.css(b,(parseInt(a(this.handle[1]).css(c),10)||0)-(parseInt(a(this.handle[0]).css(c),10)||0))},getRange:function(){return this.rangeElement?this.convertValue(parseInt(this.rangeElement.css(this.options.axis=="vertical"?"height":"width"),10),this.options.axis=="vertical"?"y":"x"):null},handleIndex:function(){return this.handle.index(this.currentHandle[0])},value:function(d,b){if(this.handle.length==1){this.currentHandle=this.handle}if(!b){b=this.options.axis=="vertical"?"y":"x"}var c=a(d!=undefined&&d!==null?this.handle[d]||d:this.currentHandle);if(c.data("mouse").sliderValue){return parseInt(c.data("mouse").sliderValue[b],10)}else{return parseInt(((parseInt(c.css(b=="x"?"left":"top"),10)/(this.actualSize[b=="x"?"width":"height"]-this.handleSize(d,b)))*this.options.realMax[b])+this.options.min[b],10)}},convertValue:function(c,b){return this.options.min[b]+(c/(this.actualSize[b=="x"?"width":"height"]-this.handleSize(null,b)))*this.options.realMax[b]},translateValue:function(c,b){return((c-this.options.min[b])/this.options.realMax[b])*(this.actualSize[b=="x"?"width":"height"]-this.handleSize(null,b))},translateRange:function(d,b){if(this.rangeElement){if(this.currentHandle[0]==this.handle[0]&&d>=this.translateValue(this.value(1),b)){d=this.translateValue(this.value(1,b)-this.oneStep(b),b)}if(this.currentHandle[0]==this.handle[1]&&d<=this.translateValue(this.value(0),b)){d=this.translateValue(this.value(0,b)+this.oneStep(b),b)}}if(this.options.handles){var c=this.options.handles[this.handleIndex()];if(d<this.translateValue(c.min,b)){d=this.translateValue(c.min,b)}else{if(d>this.translateValue(c.max,b)){d=this.translateValue(c.max,b)}}}return d},translateLimits:function(c,b){if(c>=this.actualSize[b=="x"?"width":"height"]-this.handleSize(null,b)){c=this.actualSize[b=="x"?"width":"height"]-this.handleSize(null,b)}if(c<=0){c=0}return c},handleSize:function(c,b){return a(c!=undefined&&c!==null?this.handle[c]:this.currentHandle)[0]["offset"+(b=="x"?"Width":"Height")]},oneStep:function(b){return this.options.stepping[b]||1},start:function(c,b){var d=this.options;if(d.disabled){return false}this.actualSize={width:this.element.outerWidth(),height:this.element.outerHeight()};if(!this.currentHandle){this.focus(this.previousHandle,true)}this.offset=this.element.offset();this.handleOffset=this.currentHandle.offset();this.clickOffset={top:c.pageY-this.handleOffset.top,left:c.pageX-this.handleOffset.left};this.firstValue=this.value();this.propagate("start",c);this.drag(c,b);return true},stop:function(b){this.propagate("stop",b);if(this.firstValue!=this.value()){this.propagate("change",b)}this.focus(this.currentHandle,true);return false},drag:function(f,d){var g=this.options;var b={top:f.pageY-this.offset.top-this.clickOffset.top,left:f.pageX-this.offset.left-this.clickOffset.left};if(!this.currentHandle){this.focus(this.previousHandle,true)}b.left=this.translateLimits(b.left,"x");b.top=this.translateLimits(b.top,"y");if(g.stepping.x){var c=this.convertValue(b.left,"x");c=Math.round(c/g.stepping.x)*g.stepping.x;b.left=this.translateValue(c,"x")}if(g.stepping.y){var c=this.convertValue(b.top,"y");c=Math.round(c/g.stepping.y)*g.stepping.y;b.top=this.translateValue(c,"y")}b.left=this.translateRange(b.left,"x");b.top=this.translateRange(b.top,"y");if(g.axis!="vertical"){this.currentHandle.css({left:b.left})}if(g.axis!="horizontal"){this.currentHandle.css({top:b.top})}this.currentHandle.data("mouse").sliderValue={x:Math.round(this.convertValue(b.left,"x"))||0,y:Math.round(this.convertValue(b.top,"y"))||0};if(this.rangeElement){this.updateRange()}this.propagate("slide",f);return false},moveTo:function(f,e,g){var h=this.options;this.actualSize={width:this.element.outerWidth(),height:this.element.outerHeight()};if(e==undefined&&!this.currentHandle&&this.handle.length!=1){return false}if(e==undefined&&!this.currentHandle){e=0}if(e!=undefined){this.currentHandle=this.previousHandle=a(this.handle[e]||e)}if(f.x!==undefined&&f.y!==undefined){var b=f.x,i=f.y}else{var b=f,i=f}if(b!==undefined&&b.constructor!=Number){var d=/^\-\=/.test(b),c=/^\+\=/.test(b);if(d||c){b=this.value(null,"x")+parseInt(b.replace(d?"=":"+=",""),10)}else{b=isNaN(parseInt(b,10))?undefined:parseInt(b,10)}}if(i!==undefined&&i.constructor!=Number){var d=/^\-\=/.test(i),c=/^\+\=/.test(i);if(d||c){i=this.value(null,"y")+parseInt(i.replace(d?"=":"+=",""),10)}else{i=isNaN(parseInt(i,10))?undefined:parseInt(i,10)}}if(h.axis!="vertical"&&b!==undefined){if(h.stepping.x){b=Math.round(b/h.stepping.x)*h.stepping.x}b=this.translateValue(b,"x");b=this.translateLimits(b,"x");b=this.translateRange(b,"x");h.animate?this.currentHandle.stop().animate({left:b},(Math.abs(parseInt(this.currentHandle.css("left"))-b))*(!isNaN(parseInt(h.animate))?h.animate:5)):this.currentHandle.css({left:b})}if(h.axis!="horizontal"&&i!==undefined){if(h.stepping.y){i=Math.round(i/h.stepping.y)*h.stepping.y}i=this.translateValue(i,"y");i=this.translateLimits(i,"y");i=this.translateRange(i,"y");h.animate?this.currentHandle.stop().animate({top:i},(Math.abs(parseInt(this.currentHandle.css("top"))-i))*(!isNaN(parseInt(h.animate))?h.animate:5)):this.currentHandle.css({top:i})}if(this.rangeElement){this.updateRange()}this.currentHandle.data("mouse").sliderValue={x:Math.round(this.convertValue(b,"x"))||0,y:Math.round(this.convertValue(i,"y"))||0};if(!g){this.propagate("start",null);this.propagate("stop",null);this.propagate("change",null);this.propagate("slide",null)}}});a.ui.slider.getter="value";a.ui.slider.defaults={handle:".ui-slider-handle",distance:1,animate:false}})(jQuery);(function(a){a.widget("ui.tabs",{init:function(){this.options.event+=".tabs";this.tabify(true)},setData:function(b,c){if((/^selected/).test(b)){this.select(c)}else{this.options[b]=c;this.tabify()}},length:function(){return this.$tabs.length},tabId:function(b){return b.title&&b.title.replace(/\s/g,"_").replace(/[^A-Za-z0-9\-_:\.]/g,"")||this.options.idPrefix+a.data(b)},ui:function(c,b){return{options:this.options,tab:c,panel:b,index:this.$tabs.index(c)}},tabify:function(q){this.$lis=a("li:has(a[href])",this.element);this.$tabs=this.$lis.map(function(){return a("a",this)[0]});this.$panels=a([]);var r=this,d=this.options;this.$tabs.each(function(s,o){if(o.hash&&o.hash.replace("#","")){r.$panels=r.$panels.add(o.hash)}else{if(a(o).attr("href")!="#"){a.data(o,"href.tabs",o.href);a.data(o,"load.tabs",o.href);var u=r.tabId(o);o.href="#"+u;var t=a("#"+u);if(!t.length){t=a(d.panelTemplate).attr("id",u).addClass(d.panelClass).insertAfter(r.$panels[s-1]||r.element);t.data("destroy.tabs",true)}r.$panels=r.$panels.add(t)}else{d.disabled.push(s+1)}}});if(q){this.element.addClass(d.navClass);this.$panels.each(function(){var i=a(this);i.addClass(d.panelClass)});if(d.selected===undefined){if(location.hash){this.$tabs.each(function(t,o){if(o.hash==location.hash){d.selected=t;if(a.browser.msie||a.browser.opera){var s=a(location.hash),u=s.attr("id");s.attr("id","");setTimeout(function(){s.attr("id",u)},500)}scrollTo(0,0);return false}})}else{if(d.cookie){var k=parseInt(a.cookie("ui-tabs"+a.data(r.element)),10);if(k&&r.$tabs[k]){d.selected=k}}else{if(r.$lis.filter("."+d.selectedClass).length){d.selected=r.$lis.index(r.$lis.filter("."+d.selectedClass)[0])}}}}d.selected=d.selected===null||d.selected!==undefined?d.selected:0;d.disabled=a.unique(d.disabled.concat(a.map(this.$lis.filter("."+d.disabledClass),function(s,o){return r.$lis.index(s)}))).sort();if(a.inArray(d.selected,d.disabled)!=-1){d.disabled.splice(a.inArray(d.selected,d.disabled),1)}this.$panels.addClass(d.hideClass);this.$lis.removeClass(d.selectedClass);if(d.selected!==null){this.$panels.eq(d.selected).show().removeClass(d.hideClass);this.$lis.eq(d.selected).addClass(d.selectedClass);var l=function(){a(r.element).triggerHandler("tabsshow",[r.fakeEvent("tabsshow"),r.ui(r.$tabs[d.selected],r.$panels[d.selected])],d.show)};if(a.data(this.$tabs[d.selected],"load.tabs")){this.load(d.selected,l)}else{l()}}a(window).bind("unload",function(){r.$tabs.unbind(".tabs");r.$lis=r.$tabs=r.$panels=null})}for(var g=0,p;p=this.$lis[g];g++){a(p)[a.inArray(g,d.disabled)!=-1&&!a(p).hasClass(d.selectedClass)?"addClass":"removeClass"](d.disabledClass)}if(d.cache===false){this.$tabs.removeData("cache.tabs")}var c,j,b={"min-width":0,duration:1},e="normal";if(d.fx&&d.fx.constructor==Array){c=d.fx[0]||b,j=d.fx[1]||b}else{c=j=d.fx||b}var h={display:"",overflow:"",height:""};if(!a.browser.msie){h.opacity=""}function n(o,i,s){i.animate(c,c.duration||e,function(){i.addClass(d.hideClass).css(h);if(a.browser.msie&&c.opacity){i[0].style.filter=""}if(s){m(o,s,i)}})}function m(o,s,i){if(j===b){s.css("display","block")}s.animate(j,j.duration||e,function(){s.removeClass(d.hideClass).css(h);if(a.browser.msie&&j.opacity){s[0].style.filter=""}a(r.element).triggerHandler("tabsshow",[r.fakeEvent("tabsshow"),r.ui(o,s[0])],d.show)})}function f(o,t,i,s){t.addClass(d.selectedClass).siblings().removeClass(d.selectedClass);n(o,i,s)}this.$tabs.unbind(".tabs").bind(d.event,function(){var t=a(this).parents("li:eq(0)"),i=r.$panels.filter(":visible"),s=a(this.hash);if((t.hasClass(d.selectedClass)&&!d.unselect)||t.hasClass(d.disabledClass)||a(this).hasClass(d.loadingClass)||a(r.element).triggerHandler("tabsselect",[r.fakeEvent("tabsselect"),r.ui(this,s[0])],d.select)===false){this.blur();return false}r.options.selected=r.$tabs.index(this);if(d.unselect){if(t.hasClass(d.selectedClass)){r.options.selected=null;t.removeClass(d.selectedClass);r.$panels.stop();n(this,i);this.blur();return false}else{if(!i.length){r.$panels.stop();var o=this;r.load(r.$tabs.index(this),function(){t.addClass(d.selectedClass).addClass(d.unselectClass);m(o,s)});this.blur();return false}}}if(d.cookie){a.cookie("ui-tabs"+a.data(r.element),r.options.selected,d.cookie)}r.$panels.stop();if(s.length){var o=this;r.load(r.$tabs.index(this),i.length?function(){f(o,t,i,s)}:function(){t.addClass(d.selectedClass);m(o,s)})}else{throw"jQuery UI Tabs: Mismatching fragment identifier."}if(a.browser.msie){this.blur()}return false});if(!(/^click/).test(d.event)){this.$tabs.bind("click.tabs",function(){return false})}},add:function(e,d,c){if(c==undefined){c=this.$tabs.length}var g=this.options;var i=a(g.tabTemplate.replace(/#\{href\}/g,e).replace(/#\{label\}/g,d));i.data("destroy.tabs",true);var h=e.indexOf("#")==0?e.replace("#",""):this.tabId(a("a:first-child",i)[0]);var f=a("#"+h);if(!f.length){f=a(g.panelTemplate).attr("id",h).addClass(g.hideClass).data("destroy.tabs",true)}f.addClass(g.panelClass);if(c>=this.$lis.length){i.appendTo(this.element);f.appendTo(this.element[0].parentNode)}else{i.insertBefore(this.$lis[c]);f.insertBefore(this.$panels[c])}g.disabled=a.map(g.disabled,function(k,j){return k>=c?++k:k});this.tabify();if(this.$tabs.length==1){i.addClass(g.selectedClass);f.removeClass(g.hideClass);var b=a.data(this.$tabs[0],"load.tabs");if(b){this.load(c,b)}}this.element.triggerHandler("tabsadd",[this.fakeEvent("tabsadd"),this.ui(this.$tabs[c],this.$panels[c])],g.add)},remove:function(b){var d=this.options,e=this.$lis.eq(b).remove(),c=this.$panels.eq(b).remove();if(e.hasClass(d.selectedClass)&&this.$tabs.length>1){this.select(b+(b+1<this.$tabs.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.element.triggerHandler("tabsremove",[this.fakeEvent("tabsremove"),this.ui(e.find("a")[0],c[0])],d.remove)},enable:function(b){var c=this.options;if(a.inArray(b,c.disabled)==-1){return}var d=this.$lis.eq(b).removeClass(c.disabledClass);if(a.browser.safari){d.css("display","inline-block");setTimeout(function(){d.css("display","block")},0)}c.disabled=a.grep(c.disabled,function(f,e){return f!=b});this.element.triggerHandler("tabsenable",[this.fakeEvent("tabsenable"),this.ui(this.$tabs[b],this.$panels[b])],c.enable)},disable:function(c){var b=this,d=this.options;if(c!=d.selected){this.$lis.eq(c).addClass(d.disabledClass);d.disabled.push(c);d.disabled.sort();this.element.triggerHandler("tabsdisable",[this.fakeEvent("tabsdisable"),this.ui(this.$tabs[c],this.$panels[c])],d.disable)}},select:function(b){if(typeof b=="string"){b=this.$tabs.index(this.$tabs.filter("[href$="+b+"]")[0])}this.$tabs.eq(b).trigger(this.options.event)},load:function(g,k){var l=this,d=this.options,e=this.$tabs.eq(g),j=e[0],h=k==undefined||k===false,b=e.data("load.tabs");k=k||function(){};if(!b||!h&&a.data(j,"cache.tabs")){k();return}var m=function(n){var o=a(n),p=o.find("*:last");return p.length&&p.is(":not(img)")&&p||o};var c=function(){l.$tabs.filter("."+d.loadingClass).removeClass(d.loadingClass).each(function(){if(d.spinner){m(this).parent().html(m(this).data("label.tabs"))}});l.xhr=null};if(d.spinner){var i=m(j).html();m(j).wrapInner("<em></em>").find("em").data("label.tabs",i).html(d.spinner)}var f=a.extend({},d.ajaxOptions,{url:b,success:function(o,n){a(j.hash).html(o);c();if(d.cache){a.data(j,"cache.tabs",true)}a(l.element).triggerHandler("tabsload",[l.fakeEvent("tabsload"),l.ui(l.$tabs[g],l.$panels[g])],d.load);d.ajaxOptions.success&&d.ajaxOptions.success(o,n);k()}});if(this.xhr){this.xhr.abort();c()}e.addClass(d.loadingClass);setTimeout(function(){l.xhr=a.ajax(f)},0)},url:function(c,b){this.$tabs.eq(c).removeData("cache.tabs").data("load.tabs",b)},destroy:function(){var b=this.options;this.element.unbind(".tabs").removeClass(b.navClass).removeData("tabs");this.$tabs.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.add(this.$panels).each(function(){if(a.data(this,"destroy.tabs")){a(this).remove()}else{a(this).removeClass([b.selectedClass,b.unselectClass,b.disabledClass,b.panelClass,b.hideClass].join(" "))}})},fakeEvent:function(b){return a.event.fix({type:b,target:this.element[0]})}});a.ui.tabs.defaults={unselect:false,event:"click",disabled:[],cookie:null,spinner:"Loading&#8230;",cache:false,idPrefix:"ui-tabs-",ajaxOptions:{},fx:null,tabTemplate:'<li><a href="#{href}"><span>#{label}</span></a></li>',panelTemplate:"<div></div>",navClass:"ui-tabs-nav",selectedClass:"ui-tabs-selected",unselectClass:"ui-tabs-unselect",disabledClass:"ui-tabs-disabled",panelClass:"ui-tabs-panel",hideClass:"ui-tabs-hide",loadingClass:"ui-tabs-loading"};a.ui.tabs.getter="length";a.extend(a.ui.tabs.prototype,{rotation:null,rotate:function(c,f){f=f||false;var b=this,e=this.options.selected;function g(){b.rotation=setInterval(function(){e=++e<b.$tabs.length?e:0;b.select(e)},c)}function d(h){if(!h||h.clientX){clearInterval(b.rotation)}}if(c){g();if(!f){this.$tabs.bind(this.options.event,d)}else{this.$tabs.bind(this.options.event,function(){d();e=b.options.selected;g()})}}else{d();this.$tabs.unbind(this.options.event,d)}}})})(jQuery);(function($){var PROP_NAME="datepicker";function Datepicker(){this.debug=false;this._curInst=null;this._disabledInputs=[];this._datepickerShowing=false;this._inDialog=false;this._mainDivId="ui-datepicker-div";this._appendClass="ui-datepicker-append";this._triggerClass="ui-datepicker-trigger";this._dialogClass="ui-datepicker-dialog";this._promptClass="ui-datepicker-prompt";this._unselectableClass="ui-datepicker-unselectable";this._currentClass="ui-datepicker-current-day";this.regional=[];this.regional[""]={clearText:"Clear",clearStatus:"Erase the current date",closeText:"Close",closeStatus:"Close without change",prevText:"&#x3c;Prev",prevStatus:"Show the previous month",nextText:"Next&#x3e;",nextStatus:"Show the next month",currentText:"Today",currentStatus:"Show the current month",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"],monthStatus:"Show a different month",yearStatus:"Show a different year",weekHeader:"Wk",weekStatus:"Week of the year",dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],dayStatus:"Set DD as first week day",dateStatus:"Select DD, M d",dateFormat:"mm/dd/yy",firstDay:0,initStatus:"Select a date",isRTL:false};this._defaults={showOn:"focus",showAnim:"show",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:false,closeAtTop:true,mandatory:false,hideIfNoPrevNext:false,navigationAsDateFormat:false,gotoCurrent:false,changeMonth:true,changeYear:true,yearRange:"-10:+10",changeFirstDay:true,highlightWeek:false,showOtherMonths:false,showWeeks:false,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",showStatus:false,statusForDate:this.dateStatus,minDate:null,maxDate:null,duration:"normal",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,stepMonths:1,rangeSelect:false,rangeSeparator:" - ",altField:"",altFormat:""};$.extend(this._defaults,this.regional[""]);this.dpDiv=$('<div id="'+this._mainDivId+'" style="display: none;"></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(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"+new Date().getTime()}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){return{id:target[0].id,input:target,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:inline,dpDiv:(!inline?this.dpDiv:$('<div class="ui-datepicker-inline"></div>'))}},_connectDatepicker:function(target,inst){var input=$(target);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");var 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"](trigger);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 input=$(target);if(input.hasClass(this.markerClassName)){return}input.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)},_dialogDatepicker:function(input,dateText,onSelect,settings,pos){var inst=this._dialogInst;if(!inst){var id="dp"+new Date().getTime();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 nodeName=target.nodeName.toLowerCase();var $target=$(target);$.removeData(target,PROP_NAME);if(nodeName=="input"){$target.siblings("."+this._appendClass).remove().end().siblings("."+this._triggerClass).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){target.disabled=false;$(target).siblings("button."+this._triggerClass).each(function(){this.disabled=false}).end().siblings("img."+this._triggerClass).css({opacity:"1.0",cursor:""});this._disabledInputs=$.map(this._disabledInputs,function(value){return(value==target?null:value)})},_disableDatepicker:function(target){target.disabled=true;$(target).siblings("button."+this._triggerClass).each(function(){this.disabled=true}).end().siblings("img."+this._triggerClass).css({opacity:"0.5",cursor:"default"});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},_changeDatepicker:function(target,name,value){var settings=name||{};if(typeof name=="string"){settings={};settings[name]=value}if(inst=$.data(target,PROP_NAME)){extendRemove(inst.settings,settings);this._updateDatepicker(inst)}},_setDateDatepicker:function(target,date,endDate){var inst=$.data(target,PROP_NAME);if(inst){this._setDate(inst,date,endDate);this._updateDatepicker(inst)}},_getDateDatepicker:function(target){var inst=$.data(target,PROP_NAME);if(inst){this._setDateFromField(inst)}return(inst?this._getDate(inst):null)},_doKeyDown:function(e){var inst=$.data(e.target,PROP_NAME);var handled=true;if($.datepicker._datepickerShowing){switch(e.keyCode){case 9:$.datepicker._hideDatepicker(null,"");break;case 13:$.datepicker._selectDay(e.target,inst.selectedMonth,inst.selectedYear,$("td.ui-datepicker-days-cell-over",inst.dpDiv)[0]);return false;break;case 27:$.datepicker._hideDatepicker(null,$.datepicker._get(inst,"duration"));break;case 33:$.datepicker._adjustDate(e.target,(e.ctrlKey?-1:-$.datepicker._get(inst,"stepMonths")),(e.ctrlKey?"Y":"M"));break;case 34:$.datepicker._adjustDate(e.target,(e.ctrlKey?+1:+$.datepicker._get(inst,"stepMonths")),(e.ctrlKey?"Y":"M"));break;case 35:if(e.ctrlKey){$.datepicker._clearDate(e.target)}break;case 36:if(e.ctrlKey){$.datepicker._gotoToday(e.target)}break;case 37:if(e.ctrlKey){$.datepicker._adjustDate(e.target,-1,"D")}break;case 38:if(e.ctrlKey){$.datepicker._adjustDate(e.target,-7,"D")}break;case 39:if(e.ctrlKey){$.datepicker._adjustDate(e.target,+1,"D")}break;case 40:if(e.ctrlKey){$.datepicker._adjustDate(e.target,+7,"D")}break;default:handled=false}}else{if(e.keyCode==36&&e.ctrlKey){$.datepicker._showDatepicker(this)}else{handled=false}}if(handled){e.preventDefault();e.stopPropagation()}},_doKeyPress:function(e){var inst=$.data(e.target,PROP_NAME);var chars=$.datepicker._possibleChars($.datepicker._get(inst,"dateFormat"));var chr=String.fromCharCode(e.charCode==undefined?e.keyCode:e.charCode);return e.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=$.data(input,PROP_NAME);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);inst.dpDiv.width($.datepicker._getNumberOfMonths(inst)[1]*$(".ui-datepicker",inst.dpDiv[0])[0].offsetWidth);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)<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};inst.dpDiv.empty().append(this._generateDatepicker(inst)).find("iframe.ui-datepicker-cover").css({width:dims.width,height:dims.height});var numMonths=this._getNumberOfMonths(inst);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.input[0]).focus()}},_checkOffset:function(inst,offset,isFixed){var pos=inst.input?this._findPos(inst.input[0]):null;var browserWidth=window.innerWidth||document.documentElement.clientWidth;var browserHeight=window.innerHeight||document.documentElement.clientHeight;var scrollX=document.documentElement.scrollLeft||document.body.scrollLeft;var scrollY=document.documentElement.scrollTop||document.body.scrollTop;if(this._get(inst,"isRTL")||(offset.left+inst.dpDiv.width()-scrollX)>browserWidth){offset.left=Math.max((isFixed?0:scrollX),pos[0]+(inst.input?inst.input.width():0)-(isFixed?scrollX:0)-inst.dpDiv.width()-(isFixed&&$.browser.opera?document.documentElement.scrollLeft:0))}else{offset.left-=(isFixed?scrollX:0)}if((offset.top+inst.dpDiv.height()-scrollY)>browserHeight){offset.top=Math.max((isFixed?0:scrollY),pos[1]-(isFixed?scrollY:0)-(this._inDialog?0:inst.dpDiv.height())-(isFixed&&$.browser.opera?document.documentElement.scrollTop:0))}else{offset.top-=(isFixed?scrollY: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){return}var rangeSelect=this._get(inst,"rangeSelect");if(rangeSelect&&this._stayOpen){this._selectDate("#"+inst.id,this._formatDate(inst,inst.currentDay,inst.currentMonth,inst.currentYear))}this._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),[this._getDate(inst),inst])}this._datepickerShowing=false;this._lastInput=null;inst.settings.prompt=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");$("."+this._promptClass,inst.dpDiv).remove()},_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=$.data(target[0],PROP_NAME);this._adjustInstDate(inst,offset,period);this._updateDatepicker(inst)},_gotoToday:function(id){var target=$(id);var inst=$.data(target[0],PROP_NAME);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._adjustDate(target);this._notifyChange(inst)},_selectMonthYear:function(id,select,period){var target=$(id);var inst=$.data(target[0],PROP_NAME);inst._selectingMonthYear=false;inst[period=="M"?"drawMonth":"drawYear"]=select.options[select.selectedIndex].value-0;this._adjustDate(target);this._notifyChange(inst)},_clickMonthYear:function(id){var target=$(id);var inst=$.data(target[0],PROP_NAME);if(inst.input&&inst._selectingMonthYear&&!$.browser.msie){inst.input[0].focus()}inst._selectingMonthYear=!inst._selectingMonthYear},_changeFirstDay:function(id,day){var target=$(id);var inst=$.data(target[0],PROP_NAME);inst.settings.firstDay=day;this._updateDatepicker(inst)},_selectDay:function(id,month,year,td){if($(td).hasClass(this._unselectableClass)){return}var target=$(id);var inst=$.data(target[0],PROP_NAME);var rangeSelect=this._get(inst,"rangeSelect");if(rangeSelect){this._stayOpen=!this._stayOpen;if(this._stayOpen){$(".ui-datepicker td").removeClass(this._currentClass);$(td).addClass(this._currentClass)}}inst.selectedDay=inst.currentDay=$("a",td).html();inst.selectedMonth=inst.currentMonth=month;inst.selectedYear=inst.currentYear=year;if(this._stayOpen){inst.endDay=inst.endMonth=inst.endYear=null}else{if(rangeSelect){inst.endDay=inst.currentDay;inst.endMonth=inst.currentMonth;inst.endYear=inst.currentYear}}this._selectDate(id,this._formatDate(inst,inst.currentDay,inst.currentMonth,inst.currentYear));if(this._stayOpen){inst.rangeStart=this._daylightSavingAdjust(new Date(inst.currentYear,inst.currentMonth,inst.currentDay));this._updateDatepicker(inst)}else{if(rangeSelect){inst.selectedDay=inst.currentDay=inst.rangeStart.getDate();inst.selectedMonth=inst.currentMonth=inst.rangeStart.getMonth();inst.selectedYear=inst.currentYear=inst.rangeStart.getFullYear();inst.rangeStart=null;if(inst.inline){this._updateDatepicker(inst)}}}},_clearDate:function(id){var target=$(id);var inst=$.data(target[0],PROP_NAME);if(this._get(inst,"mandatory")){return}this._stayOpen=false;inst.endDay=inst.endMonth=inst.endYear=inst.rangeStart=null;this._selectDate(target,"")},_selectDate:function(id,dateStr){var target=$(id);var inst=$.data(target[0],PROP_NAME);dateStr=(dateStr!=null?dateStr:this._formatDate(inst));if(this._get(inst,"rangeSelect")&&dateStr){dateStr=(inst.rangeStart?this._formatDate(inst,inst.rangeStart):dateStr)+this._get(inst,"rangeSeparator")+dateStr}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(!this._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");var date=this._getDate(inst);dateStr=(isArray(date)?(!date[0]&&!date[1]?"":this.formatDate(altFormat,date[0],this._getFormatConfig(inst))+this._get(inst,"rangeSeparator")+this.formatDate(altFormat,date[1]||date[0],this._getFormatConfig(inst))):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){checkDate.setDate(checkDate.getDate()+3);return $.datepicker.iso8601Week(checkDate)}}}return Math.floor(((checkDate-firstMon)/86400000)/7)+1},dateStatus:function(date,inst){return $.datepicker.formatDate($.datepicker._get(inst,"dateStatus"),date,$.datepicker._getFormatConfig(inst))},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 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:2));var size=origSize;var num=0;while(size>0&&iValue<value.length&&value.charAt(iValue)>="0"&&value.charAt(iValue)<="9"){num=num*10+(value.charAt(iValue++)-0);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"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<100){year+=new Date().getFullYear()-new Date().getFullYear()%100+(year<=shortYearCutoff?0:-100)}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){return(lookAhead(match)&&value<10?"0":"")+value};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());break;case"D":output+=formatName("D",date.getDay(),dayNamesShort,dayNames);break;case"m":output+=formatNumber("m",date.getMonth()+1);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().split(this._get(inst,"rangeSeparator")):null;inst.endDay=inst.endMonth=inst.endYear=null;var date=defaultDate=this._getDefaultDate(inst);if(dates.length>0){var settings=this._getFormatConfig(inst);if(dates.length>1){date=this.parseDate(dateFormat,dates[1],settings)||defaultDate;inst.endDay=date.getDate();inst.endMonth=date.getMonth();inst.endYear=date.getFullYear()}try{date=this.parseDate(dateFormat,dates[0],settings)||defaultDate}catch(e){this.log(e);date=defaultDate}}inst.selectedDay=date.getDate();inst.drawMonth=inst.selectedMonth=date.getMonth();inst.drawYear=inst.selectedYear=date.getFullYear();inst.currentDay=(dates[0]?date.getDate():0);inst.currentMonth=(dates[0]?date.getMonth():0);inst.currentYear=(dates[0]?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+=(matches[1]-0);break;case"w":case"W":day+=(matches[1]*7);break;case"m":case"M":month+=(matches[1]-0);day=Math.min(day,getDaysInMonth(year,month));break;case"y":case"Y":year+=(matches[1]-0);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);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(this._get(inst,"rangeSelect")){if(endDate){endDate=this._determineDate(endDate,null);inst.endDay=endDate.getDate();inst.endMonth=endDate.getMonth();inst.endYear=endDate.getFullYear()}else{inst.endDay=inst.currentDay;inst.endMonth=inst.currentMonth;inst.endYear=inst.currentYear}}this._adjustInstDate(inst);if(inst.input){inst.input.val(clear?"":this._formatDate(inst)+(!this._get(inst,"rangeSelect")?"":this._get(inst,"rangeSeparator")+this._formatDate(inst,inst.endDay,inst.endMonth,inst.endYear)))}},_getDate:function(inst){var startDate=(!inst.currentYear||(inst.input&&inst.input.val()=="")?null:this._daylightSavingAdjust(new Date(inst.currentYear,inst.currentMonth,inst.currentDay)));if(this._get(inst,"rangeSelect")){return[inst.rangeStart||startDate,(!inst.endYear?inst.rangeStart||startDate:this._daylightSavingAdjust(new Date(inst.endYear,inst.endMonth,inst.endDay)))]}else{return startDate}},_generateDatepicker:function(inst){var today=new Date();today=this._daylightSavingAdjust(new Date(today.getFullYear(),today.getMonth(),today.getDate()));var showStatus=this._get(inst,"showStatus");var isRTL=this._get(inst,"isRTL");var clear=(this._get(inst,"mandatory")?"":'<div class="ui-datepicker-clear"><a onclick="jQuery.datepicker._clearDate(\'#'+inst.id+"');\""+(showStatus?this._addStatus(inst,this._get(inst,"clearStatus")||"&#xa0;"):"")+">"+this._get(inst,"clearText")+"</a></div>");var controls='<div class="ui-datepicker-control">'+(isRTL?"":clear)+'<div class="ui-datepicker-close"><a onclick="jQuery.datepicker._hideDatepicker();"'+(showStatus?this._addStatus(inst,this._get(inst,"closeStatus")||"&#xa0;"):"")+">"+this._get(inst,"closeText")+"</a></div>"+(isRTL?clear:"")+"</div>";var prompt=this._get(inst,"prompt");var closeAtTop=this._get(inst,"closeAtTop");var hideIfNoPrevNext=this._get(inst,"hideIfNoPrevNext");var navigationAsDateFormat=this._get(inst,"navigationAsDateFormat");var numMonths=this._getNumberOfMonths(inst);var stepMonths=this._get(inst,"stepMonths");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;var drawYear=inst.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--}}}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='<div class="ui-datepicker-prev">'+(this._canAdjustMonth(inst,-1,drawYear,drawMonth)?"<a onclick=\"jQuery.datepicker._adjustDate('#"+inst.id+"', -"+stepMonths+", 'M');\""+(showStatus?this._addStatus(inst,this._get(inst,"prevStatus")||"&#xa0;"):"")+">"+prevText+"</a>":(hideIfNoPrevNext?"":"<label>"+prevText+"</label>"))+"</div>";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='<div class="ui-datepicker-next">'+(this._canAdjustMonth(inst,+1,drawYear,drawMonth)?"<a onclick=\"jQuery.datepicker._adjustDate('#"+inst.id+"', +"+stepMonths+", 'M');\""+(showStatus?this._addStatus(inst,this._get(inst,"nextStatus")||"&#xa0;"):"")+">"+nextText+"</a>":(hideIfNoPrevNext?"":"<label>"+nextText+"</label>"))+"</div>";var currentText=this._get(inst,"currentText");currentText=(!navigationAsDateFormat?currentText:this.formatDate(currentText,today,this._getFormatConfig(inst)));var html=(prompt?'<div class="'+this._promptClass+'">'+prompt+"</div>":"")+(closeAtTop&&!inst.inline?controls:"")+'<div class="ui-datepicker-links">'+(isRTL?next:prev)+(this._isInRange(inst,(this._get(inst,"gotoCurrent")&&inst.currentDay?currentDate:today))?'<div class="ui-datepicker-current"><a onclick="jQuery.datepicker._gotoToday(\'#'+inst.id+"');\""+(showStatus?this._addStatus(inst,this._get(inst,"currentStatus")||"&#xa0;"):"")+">"+currentText+"</a></div>":"")+(isRTL?prev:next)+"</div>";var firstDay=this._get(inst,"firstDay");var changeFirstDay=this._get(inst,"changeFirstDay");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 beforeShowDay=this._get(inst,"beforeShowDay");var highlightWeek=this._get(inst,"highlightWeek");var showOtherMonths=this._get(inst,"showOtherMonths");var showWeeks=this._get(inst,"showWeeks");var calculateWeek=this._get(inst,"calculateWeek")||this.iso8601Week;var status=(showStatus?this._get(inst,"dayStatus")||"&#xa0;":"");var dateStatus=this._get(inst,"statusForDate")||this.dateStatus;var endDate=inst.endDay?this._daylightSavingAdjust(new Date(inst.endYear,inst.endMonth,inst.endDay)):currentDate;for(var row=0;row<numMonths[0];row++){for(var col=0;col<numMonths[1];col++){var selectedDate=this._daylightSavingAdjust(new Date(drawYear,drawMonth,inst.selectedDay));html+='<div class="ui-datepicker-one-month'+(col==0?" ui-datepicker-new-row":"")+'">'+this._generateMonthYearHeader(inst,drawMonth,drawYear,minDate,maxDate,selectedDate,row>0||col>0,showStatus,monthNames)+'<table class="ui-datepicker" cellpadding="0" cellspacing="0"><thead><tr class="ui-datepicker-title-row">'+(showWeeks?"<td>"+this._get(inst,"weekHeader")+"</td>":"");for(var dow=0;dow<7;dow++){var day=(dow+firstDay)%7;var dayStatus=(status.indexOf("DD")>-1?status.replace(/DD/,dayNames[day]):status.replace(/D/,dayNamesShort[day]));html+="<td"+((dow+firstDay+6)%7>=5?' class="ui-datepicker-week-end-cell"':"")+">"+(!changeFirstDay?"<span":"<a onclick=\"jQuery.datepicker._changeFirstDay('#"+inst.id+"', "+day+');"')+(showStatus?this._addStatus(inst,dayStatus):"")+' title="'+dayNames[day]+'">'+dayNamesMin[day]+(changeFirstDay?"</a>":"</span>")+"</td>"}html+="</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++){html+='<tr class="ui-datepicker-days-row">'+(showWeeks?'<td class="ui-datepicker-week-col">'+calculateWeek(printDate)+"</td>":"");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);html+='<td class="ui-datepicker-days-cell'+((dow+firstDay+6)%7>=5?" ui-datepicker-week-end-cell":"")+(otherMonth?" ui-datepicker-otherMonth":"")+(printDate.getTime()==selectedDate.getTime()&&drawMonth==inst.selectedMonth?" ui-datepicker-days-cell-over":"")+(unselectable?" "+this._unselectableClass:"")+(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?(highlightWeek?" onmouseover=\"jQuery(this).parent().addClass('ui-datepicker-week-over');\" onmouseout=\"jQuery(this).parent().removeClass('ui-datepicker-week-over');\"":""):" onmouseover=\"jQuery(this).addClass('ui-datepicker-days-cell-over')"+(highlightWeek?".parent().addClass('ui-datepicker-week-over')":"")+";"+(!showStatus||(otherMonth&&!showOtherMonths)?"":"jQuery('#ui-datepicker-status-"+inst.id+"').html('"+(dateStatus.apply((inst.input?inst.input[0]:null),[printDate,inst])||"&#xa0;")+"');")+"\" onmouseout=\"jQuery(this).removeClass('ui-datepicker-days-cell-over')"+(highlightWeek?".parent().removeClass('ui-datepicker-week-over')":"")+";"+(!showStatus||(otherMonth&&!showOtherMonths)?"":"jQuery('#ui-datepicker-status-"+inst.id+"').html('&#xa0;');")+'" onclick="jQuery.datepicker._selectDay(\'#'+inst.id+"',"+drawMonth+","+drawYear+', this);"')+">"+(otherMonth?(showOtherMonths?printDate.getDate():"&#xa0;"):(unselectable?printDate.getDate():"<a>"+printDate.getDate()+"</a>"))+"</td>";printDate.setDate(printDate.getDate()+1);printDate=this._daylightSavingAdjust(printDate)}html+="</tr>"}drawMonth++;if(drawMonth>11){drawMonth=0;drawYear++}html+="</tbody></table></div>"}}html+=(showStatus?'<div style="clear: both;"></div><div id="ui-datepicker-status-'+inst.id+'" class="ui-datepicker-status">'+(this._get(inst,"initStatus")||"&#xa0;")+"</div>":"")+(!closeAtTop&&!inst.inline?controls:"")+'<div style="clear: both;"></div>'+($.browser.msie&&parseInt($.browser.version)<7&&!inst.inline?'<iframe src="javascript:false;" class="ui-datepicker-cover"></iframe>':"");return html},_generateMonthYearHeader:function(inst,drawMonth,drawYear,minDate,maxDate,selectedDate,secondary,showStatus,monthNames){minDate=(inst.rangeStart&&minDate&&selectedDate<minDate?selectedDate:minDate);var html='<div class="ui-datepicker-header">';if(secondary||!this._get(inst,"changeMonth")){html+=monthNames[drawMonth]+"&#xa0;"}else{var inMinYear=(minDate&&minDate.getFullYear()==drawYear);var inMaxYear=(maxDate&&maxDate.getFullYear()==drawYear);html+='<select class="ui-datepicker-new-month" onchange="jQuery.datepicker._selectMonthYear(\'#'+inst.id+"', this, 'M');\" onclick=\"jQuery.datepicker._clickMonthYear('#"+inst.id+"');\""+(showStatus?this._addStatus(inst,this._get(inst,"monthStatus")||"&#xa0;"):"")+">";for(var month=0;month<12;month++){if((!inMinYear||month>=minDate.getMonth())&&(!inMaxYear||month<=maxDate.getMonth())){html+='<option value="'+month+'"'+(month==drawMonth?' selected="selected"':"")+">"+monthNames[month]+"</option>"}}html+="</select>"}if(secondary||!this._get(inst,"changeYear")){html+=drawYear}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=endYear=new Date().getFullYear();year+=parseInt(years[0],10);endYear+=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-new-year" onchange="jQuery.datepicker._selectMonthYear(\'#'+inst.id+"', this, 'Y');\" onclick=\"jQuery.datepicker._clickMonthYear('#"+inst.id+"');\""+(showStatus?this._addStatus(inst,this._get(inst,"yearStatus")||"&#xa0;"):"")+">";for(;year<=endYear;year++){html+='<option value="'+year+'"'+(year==drawYear?' selected="selected"':"")+">"+year+"</option>"}html+="</select>"}html+="</div>";return html},_addStatus:function(inst,text){return" onmouseover=\"jQuery('#ui-datepicker-status-"+inst.id+"').html('"+text+"');\" onmouseout=\"jQuery('#ui-datepicker-status-"+inst.id+"').html('&#xa0;');\""},_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),[new Date(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){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();$(document).ready(function(){$(document.body).append($.datepicker.dpDiv).mousedown($.datepicker._checkExternalClick)})})(jQuery);(function(c){c.effects=c.effects||{};c.extend(c.effects,{save:function(f,g){for(var e=0;e<g.length;e++){if(g[e]!==null){c.data(f[0],"ec.storage."+g[e],f[0].style[g[e]])}}},restore:function(f,g){for(var e=0;e<g.length;e++){if(g[e]!==null){f.css(g[e],c.data(f[0],"ec.storage."+g[e]))}}},setMode:function(e,f){if(f=="toggle"){f=e.is(":hidden")?"show":"hide"}return f},getBaseline:function(f,g){var h,e;switch(f[0]){case"top":h=0;break;case"middle":h=0.5;break;case"bottom":h=1;break;default:h=f[0]/g.height}switch(f[1]){case"left":e=0;break;case"center":e=0.5;break;case"right":e=1;break;default:e=f[1]/g.width}return{x:e,y:h}},createWrapper:function(f){if(f.parent().attr("id")=="fxWrapper"){return f}var e={width:f.outerWidth({margin:true}),height:f.outerHeight({margin:true}),"float":f.css("float")};f.wrap('<div id="fxWrapper" style="font-size:100%;background:transparent;border:none;margin:0;padding:0"></div>');var i=f.parent();if(f.css("position")=="static"){i.css({position:"relative"});f.css({position:"relative"})}else{var h=f.css("top");if(isNaN(parseInt(h))){h="auto"}var g=f.css("left");if(isNaN(parseInt(g))){g="auto"}i.css({position:f.css("position"),top:h,left:g,zIndex:f.css("z-index")}).show();f.css({position:"relative",top:0,left:0})}i.css(e);return i},removeWrapper:function(e){if(e.parent().attr("id")=="fxWrapper"){return e.parent().replaceWith(e)}return e},setTransition:function(f,g,e,h){h=h||{};c.each(g,function(k,j){unit=f.cssUnit(j);if(unit[0]>0){h[j]=unit[0]*e+unit[1]}});return h},animateClass:function(g,h,j,i){var e=(typeof j=="function"?j:(i?i:null));var f=(typeof j=="object"?j:null);return this.each(function(){var p={};var m=c(this);var o=m.attr("style")||"";if(typeof o=="object"){o=o.cssText}if(g.toggle){m.hasClass(g.toggle)?g.remove=g.toggle:g.add=g.toggle}var k=c.extend({},(document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle));if(g.add){m.addClass(g.add)}if(g.remove){m.removeClass(g.remove)}var l=c.extend({},(document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle));if(g.add){m.removeClass(g.add)}if(g.remove){m.addClass(g.remove)}for(var q in l){if(typeof l[q]!="function"&&l[q]&&q.indexOf("Moz")==-1&&q.indexOf("length")==-1&&l[q]!=k[q]&&(q.match(/color/i)||(!q.match(/color/i)&&!isNaN(parseInt(l[q],10))))&&(k.position!="static"||(k.position=="static"&&!q.match(/left|top|bottom|right/)))){p[q]=l[q]}}m.animate(p,h,f,function(){if(typeof c(this).attr("style")=="object"){c(this).attr("style")["cssText"]="";c(this).attr("style")["cssText"]=o}else{c(this).attr("style",o)}if(g.add){c(this).addClass(g.add)}if(g.remove){c(this).removeClass(g.remove)}if(e){e.apply(this,arguments)}})})}});c.fn.extend({_show:c.fn.show,_hide:c.fn.hide,__toggle:c.fn.toggle,_addClass:c.fn.addClass,_removeClass:c.fn.removeClass,_toggleClass:c.fn.toggleClass,effect:function(e,g,f,h){return c.effects[e]?c.effects[e].call(this,{method:e,options:g||{},duration:f,callback:h}):null},show:function(){if(!arguments[0]||(arguments[0].constructor==Number||/(slow|normal|fast)/.test(arguments[0]))){return this._show.apply(this,arguments)}else{var e=arguments[1]||{};e.mode="show";return this.effect.apply(this,[arguments[0],e,arguments[2]||e.duration,arguments[3]||e.callback])}},hide:function(){if(!arguments[0]||(arguments[0].constructor==Number||/(slow|normal|fast)/.test(arguments[0]))){return this._hide.apply(this,arguments)}else{var e=arguments[1]||{};e.mode="hide";return this.effect.apply(this,[arguments[0],e,arguments[2]||e.duration,arguments[3]||e.callback])}},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{var e=arguments[1]||{};e.mode="toggle";return this.effect.apply(this,[arguments[0],e,arguments[2]||e.duration,arguments[3]||e.callback])}},addClass:function(f,e,h,g){return e?c.effects.animateClass.apply(this,[{add:f},e,h,g]):this._addClass(f)},removeClass:function(f,e,h,g){return e?c.effects.animateClass.apply(this,[{remove:f},e,h,g]):this._removeClass(f)},toggleClass:function(f,e,h,g){return e?c.effects.animateClass.apply(this,[{toggle:f},e,h,g]):this._toggleClass(f)},morph:function(e,g,f,i,h){return c.effects.animateClass.apply(this,[{add:g,remove:e},f,i,h])},switchClass:function(){return this.morph.apply(this,arguments)},cssUnit:function(e){var f=this.css(e),g=[];c.each(["em","px","%","pt"],function(h,j){if(f.indexOf(j)>0){g=[parseFloat(f),j]}});return g}});jQuery.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor","borderTopColor","color","outlineColor"],function(f,e){jQuery.fx.step[e]=function(g){if(g.state==0){g.start=d(g.elem,e);g.end=b(g.end)}g.elem.style[e]="rgb("+[Math.max(Math.min(parseInt((g.pos*(g.end[0]-g.start[0]))+g.start[0]),255),0),Math.max(Math.min(parseInt((g.pos*(g.end[1]-g.start[1]))+g.start[1]),255),0),Math.max(Math.min(parseInt((g.pos*(g.end[2]-g.start[2]))+g.start[2]),255),0)].join(",")+")"}});function b(f){var e;if(f&&f.constructor==Array&&f.length==3){return f}if(e=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(f)){return[parseInt(e[1]),parseInt(e[2]),parseInt(e[3])]}if(e=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(f)){return[parseFloat(e[1])*2.55,parseFloat(e[2])*2.55,parseFloat(e[3])*2.55]}if(e=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(f)){return[parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16)]}if(e=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(f)){return[parseInt(e[1]+e[1],16),parseInt(e[2]+e[2],16),parseInt(e[3]+e[3],16)]}if(e=/rgba\(0, 0, 0, 0\)/.exec(f)){return a.transparent}return a[jQuery.trim(f).toLowerCase()]}function d(g,e){var f;do{f=jQuery.curCSS(g,e);if(f!=""&&f!="transparent"||jQuery.nodeName(g,"body")){break}e="backgroundColor"}while(g=g.parentNode);return b(f)}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]};jQuery.easing.jswing=jQuery.easing.swing;jQuery.extend(jQuery.easing,{def:"easeOutQuad",swing:function(f,g,e,i,h){return jQuery.easing[jQuery.easing.def](f,g,e,i,h)},easeInQuad:function(f,g,e,i,h){return i*(g/=h)*g+e},easeOutQuad:function(f,g,e,i,h){return -i*(g/=h)*(g-2)+e},easeInOutQuad:function(f,g,e,i,h){if((g/=h/2)<1){return i/2*g*g+e}return -i/2*((--g)*(g-2)-1)+e},easeInCubic:function(f,g,e,i,h){return i*(g/=h)*g*g+e},easeOutCubic:function(f,g,e,i,h){return i*((g=g/h-1)*g*g+1)+e},easeInOutCubic:function(f,g,e,i,h){if((g/=h/2)<1){return i/2*g*g*g+e}return i/2*((g-=2)*g*g+2)+e},easeInQuart:function(f,g,e,i,h){return i*(g/=h)*g*g*g+e},easeOutQuart:function(f,g,e,i,h){return -i*((g=g/h-1)*g*g*g-1)+e},easeInOutQuart:function(f,g,e,i,h){if((g/=h/2)<1){return i/2*g*g*g*g+e}return -i/2*((g-=2)*g*g*g-2)+e},easeInQuint:function(f,g,e,i,h){return i*(g/=h)*g*g*g*g+e},easeOutQuint:function(f,g,e,i,h){return i*((g=g/h-1)*g*g*g*g+1)+e},easeInOutQuint:function(f,g,e,i,h){if((g/=h/2)<1){return i/2*g*g*g*g*g+e}return i/2*((g-=2)*g*g*g*g+2)+e},easeInSine:function(f,g,e,i,h){return -i*Math.cos(g/h*(Math.PI/2))+i+e},easeOutSine:function(f,g,e,i,h){return i*Math.sin(g/h*(Math.PI/2))+e},easeInOutSine:function(f,g,e,i,h){return -i/2*(Math.cos(Math.PI*g/h)-1)+e},easeInExpo:function(f,g,e,i,h){return(g==0)?e:i*Math.pow(2,10*(g/h-1))+e},easeOutExpo:function(f,g,e,i,h){return(g==h)?e+i:i*(-Math.pow(2,-10*g/h)+1)+e},easeInOutExpo:function(f,g,e,i,h){if(g==0){return e}if(g==h){return e+i}if((g/=h/2)<1){return i/2*Math.pow(2,10*(g-1))+e}return i/2*(-Math.pow(2,-10*--g)+2)+e},easeInCirc:function(f,g,e,i,h){return -i*(Math.sqrt(1-(g/=h)*g)-1)+e},easeOutCirc:function(f,g,e,i,h){return i*Math.sqrt(1-(g=g/h-1)*g)+e},easeInOutCirc:function(f,g,e,i,h){if((g/=h/2)<1){return -i/2*(Math.sqrt(1-g*g)-1)+e}return i/2*(Math.sqrt(1-(g-=2)*g)+1)+e},easeInElastic:function(f,h,e,l,k){var i=1.70158;var j=0;var g=l;if(h==0){return e}if((h/=k)==1){return e+l}if(!j){j=k*0.3}if(g<Math.abs(l)){g=l;var i=j/4}else{var i=j/(2*Math.PI)*Math.asin(l/g)}return -(g*Math.pow(2,10*(h-=1))*Math.sin((h*k-i)*(2*Math.PI)/j))+e},easeOutElastic:function(f,h,e,l,k){var i=1.70158;var j=0;var g=l;if(h==0){return e}if((h/=k)==1){return e+l}if(!j){j=k*0.3}if(g<Math.abs(l)){g=l;var i=j/4}else{var i=j/(2*Math.PI)*Math.asin(l/g)}return g*Math.pow(2,-10*h)*Math.sin((h*k-i)*(2*Math.PI)/j)+l+e},easeInOutElastic:function(f,h,e,l,k){var i=1.70158;var j=0;var g=l;if(h==0){return e}if((h/=k/2)==2){return e+l}if(!j){j=k*(0.3*1.5)}if(g<Math.abs(l)){g=l;var i=j/4}else{var i=j/(2*Math.PI)*Math.asin(l/g)}if(h<1){return -0.5*(g*Math.pow(2,10*(h-=1))*Math.sin((h*k-i)*(2*Math.PI)/j))+e}return g*Math.pow(2,-10*(h-=1))*Math.sin((h*k-i)*(2*Math.PI)/j)*0.5+l+e},easeInBack:function(f,g,e,j,i,h){if(h==undefined){h=1.70158}return j*(g/=i)*g*((h+1)*g-h)+e},easeOutBack:function(f,g,e,j,i,h){if(h==undefined){h=1.70158}return j*((g=g/i-1)*g*((h+1)*g+h)+1)+e},easeInOutBack:function(f,g,e,j,i,h){if(h==undefined){h=1.70158}if((g/=i/2)<1){return j/2*(g*g*(((h*=(1.525))+1)*g-h))+e}return j/2*((g-=2)*g*(((h*=(1.525))+1)*g+h)+2)+e},easeInBounce:function(f,g,e,i,h){return i-jQuery.easing.easeOutBounce(f,h-g,0,i,h)+e},easeOutBounce:function(f,g,e,i,h){if((g/=h)<(1/2.75)){return i*(7.5625*g*g)+e}else{if(g<(2/2.75)){return i*(7.5625*(g-=(1.5/2.75))*g+0.75)+e}else{if(g<(2.5/2.75)){return i*(7.5625*(g-=(2.25/2.75))*g+0.9375)+e}else{return i*(7.5625*(g-=(2.625/2.75))*g+0.984375)+e}}}},easeInOutBounce:function(f,g,e,i,h){if(g<h/2){return jQuery.easing.easeInBounce(f,g*2,0,i,h)*0.5+e}return jQuery.easing.easeOutBounce(f,g*2-h,0,i,h)*0.5+i*0.5+e}})})(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 j=a.effects.createWrapper(d).css({overflow:"hidden"});var e=(g=="vertical")?"height":"width";var i=(g=="vertical")?j.height():j.width();if(h=="show"){j.css(e,0)}var f={};f[e]=h=="show"?i:0;j.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),l=["position","top","left"];var k=a.effects.setMode(e,b.options.mode||"effect");var n=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)){l.push("opacity")}a.effects.save(e,l);e.show();a.effects.createWrapper(e);var f=(n=="up"||n=="down")?"top":"left";var p=(n=="up"||n=="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,p=="pos"?-c:c)}if(k=="hide"){c=c/(d*2)}if(k!="hide"){d--}if(k=="show"){var h={opacity:1};h[f]=(p=="pos"?"+=":"-=")+c;e.animate(h,g/2,b.options.easing);c=c/2;d--}for(var j=0;j<d;j++){var o={},m={};o[f]=(p=="pos"?"-=":"+=")+c;m[f]=(p=="pos"?"+=":"-=")+c;e.animate(o,g/2,b.options.easing).animate(m,g/2,b.options.easing);c=(k=="hide")?c*2:c/2}if(k=="hide"){var h={opacity:0};h[f]=(p=="pos"?"-=":"+=")+c;e.animate(h,g/2,b.options.easing,function(){e.hide();a.effects.restore(e,l);a.effects.removeWrapper(e);if(b.callback){b.callback.apply(this,arguments)}})}else{var o={},m={};o[f]=(p=="pos"?"-=":"+=")+c;m[f]=(p=="pos"?"+=":"-=")+c;e.animate(o,g/2,b.options.easing).animate(m,g/2,b.options.easing,function(){a.effects.restore(e,l);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),j=["position","top","left","height","width"];var i=a.effects.setMode(f,b.options.mode||"hide");var k=b.options.direction||"vertical";a.effects.save(f,j);f.show();var c=a.effects.createWrapper(f).css({overflow:"hidden"});var e=f[0].tagName=="IMG"?c:f;var g={size:(k=="vertical")?"height":"width",position:(k=="vertical")?"top":"left"};var d=(k=="vertical")?e.height():e.width();if(i=="show"){e.css(g.size,0);e.css(g.position,d/2)}var h={};h[g.size]=i=="show"?d:0;h[g.position]=i=="show"?0:d/2;e.animate(h,{queue:false,duration:b.duration,easing:b.options.easing,complete:function(){if(i=="hide"){f.hide()}a.effects.restore(f,j);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 i=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 j=b.options.distance||(f=="top"?e.outerHeight({margin:true})/2:e.outerWidth({margin:true})/2);if(i=="show"){e.css("opacity",0).css(f,c=="pos"?-j:j)}var g={opacity:i=="show"?1:0};g[f]=(i=="show"?(c=="pos"?"+=":"-="):(c=="pos"?"-=":"+="))+j;e.animate(g,{queue:false,duration:b.duration,easing:b.options.easing,complete:function(){if(i=="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 l=h.offset();l.top-=parseInt(h.css("marginTop"))||0;l.left-=parseInt(h.css("marginLeft"))||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("effects-explode").css({position:"absolute",overflow:"hidden",width:g/e,height:c/k,left:l.left+d*(g/e)+(b.options.mode=="show"?(d-Math.floor(e/2))*(g/e):0),top:l.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:l.left+d*(g/e)+(b.options.mode=="show"?0:(d-Math.floor(e/2))*(g/e)),top:l.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(".effects-explode").remove()},b.duration||500)})}})(jQuery);(function(a){a.effects.fold=function(b){return this.queue(function(){var e=a(this),j=["position","top","left"];var g=a.effects.setMode(e,b.options.mode||"hide");var n=b.options.size||15;var m=!(!b.options.horizFirst);a.effects.save(e,j);e.show();var d=a.effects.createWrapper(e).css({overflow:"hidden"});var h=((g=="show")!=m);var f=h?["width","height"]:["height","width"];var c=h?[d.width(),d.height()]:[d.height(),d.width()];var i=/([0-9]+)%/.exec(n);if(i){n=parseInt(i[1])/100*c[g=="hide"?0:1]}if(g=="show"){d.css(m?{height:0,width:n}:{height:n,width:0})}var l={},k={};l[f[0]]=g=="show"?c[0]:n;k[f[1]]=g=="show"?c[1]:0;d.animate(l,b.duration/2,b.options.easing).animate(k,b.duration/2,b.options.easing,function(){if(g=="hide"){e.hide()}a.effects.restore(e,j);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"&&jQuery.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 f=a.effects.setMode(d,b.options.mode||"show");var e=b.options.times||5;if(f=="hide"){e--}if(d.is(":hidden")){d.css("opacity",0);d.show();d.animate({opacity:1},b.duration/2,b.options.easing);e=e-2}for(var c=0;c<e;c++){d.animate({opacity:0},b.duration/2,b.options.easing).animate({opacity:1},b.duration/2,b.options.easing)}if(f=="hide"){d.animate({opacity:0},b.duration/2,b.options.easing,function(){d.hide();if(b.callback){b.callback.apply(this,arguments)}})}else{d.animate({opacity:0},b.duration/2,b.options.easing).animate({opacity:1},b.duration/2,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)||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 j=a.effects.setMode(g,b.options.mode||"effect");var h=parseInt(b.options.percent)||(parseInt(b.options.percent)==0?0:(j=="hide"?0:100));var i=b.options.direction||"both";var c=b.options.origin;if(j!="effect"){d.origin=c||["middle","center"];d.restore=true}var f={height:g.height(),width:g.width()};g.from=b.options.from||(j=="show"?{height:0,width:0}:f);var e={y:i!="horizontal"?(h/100):1,x:i!="vertical"?(h/100):1};g.to={height:f.height*e.y,width:f.width*e.x};if(b.options.fade){if(j=="show"){g.from.opacity=0;g.to.opacity=1}if(j=="hide"){g.from.opacity=1;g.to.opacity=0}}d.from=g.from;d.to=g.to;d.mode=j;g.effect("size",d,b.duration,b.callback);g.dequeue()})};a.effects.size=function(b){return this.queue(function(){var c=a(this),n=["position","top","left","width","height","overflow","opacity"];var m=["position","top","left","overflow","opacity"];var j=["width","height","overflow"];var p=["fontSize"];var k=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"];var f=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"];var g=a.effects.setMode(c,b.options.mode||"effect");var i=b.options.restore||false;var e=b.options.scale||"both";var o=b.options.origin;var d={height:c.height(),width:c.width()};c.from=b.options.from||d;c.to=b.options.to||d;if(o){var h=a.effects.getBaseline(o,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 l={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(l.from.y!=l.to.y){n=n.concat(k);c.from=a.effects.setTransition(c,k,l.from.y,c.from);c.to=a.effects.setTransition(c,k,l.to.y,c.to)}if(l.from.x!=l.to.x){n=n.concat(f);c.from=a.effects.setTransition(c,f,l.from.x,c.from);c.to=a.effects.setTransition(c,f,l.to.x,c.to)}}if(e=="content"||e=="both"){if(l.from.y!=l.to.y){n=n.concat(p);c.from=a.effects.setTransition(c,p,l.from.y,c.from);c.to=a.effects.setTransition(c,p,l.to.y,c.to)}}a.effects.save(c,i?n:m);c.show();a.effects.createWrapper(c);c.css("overflow","hidden").css(c.from);if(e=="content"||e=="both"){k=k.concat(["marginTop","marginBottom"]).concat(p);f=f.concat(["marginLeft","marginRight"]);j=n.concat(k).concat(f);c.find("*[width]").each(function(){child=a(this);if(i){a.effects.save(child,j)}var q={height:child.height(),width:child.width()};child.from={height:q.height*l.from.y,width:q.width*l.from.x};child.to={height:q.height*l.to.y,width:q.width*l.to.x};if(l.from.y!=l.to.y){child.from=a.effects.setTransition(child,k,l.from.y,child.from);child.to=a.effects.setTransition(child,k,l.to.y,child.to)}if(l.from.x!=l.to.x){child.from=a.effects.setTransition(child,f,l.from.x,child.from);child.to=a.effects.setTransition(child,f,l.to.x,child.to)}child.css(child.from);child.animate(child.to,b.duration,b.options.easing,function(){if(i){a.effects.restore(child,j)}})})}c.animate(c.to,{queue:false,duration:b.duration,easing:b.options.easing,complete:function(){if(g=="hide"){c.hide()}a.effects.restore(c,i?n:m);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),l=["position","top","left"];var k=a.effects.setMode(e,b.options.mode||"effect");var n=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,l);e.show();a.effects.createWrapper(e);var f=(n=="up"||n=="down")?"top":"left";var p=(n=="up"||n=="left")?"pos":"neg";var h={},o={},m={};h[f]=(p=="pos"?"-=":"+=")+c;o[f]=(p=="pos"?"+=":"-=")+c*2;m[f]=(p=="pos"?"-=":"+=")+c*2;e.animate(h,g,b.options.easing);for(var j=1;j<d;j++){e.animate(o,g,b.options.easing).animate(m,g,b.options.easing)}e.animate(o,g,b.options.easing).animate(h,g/2,b.options.easing,function(){a.effects.restore(e,l);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 i=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 j=b.options.distance||(f=="top"?e.outerHeight({margin:true}):e.outerWidth({margin:true}));if(i=="show"){e.css(f,c=="pos"?-j:j)}var g={};g[f]=(i=="show"?(c=="pos"?"+=":"-="):(c=="pos"?"-=":"+="))+j;e.animate(g,{queue:false,duration:b.duration,easing:b.options.easing,complete:function(){if(i=="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 e=a(this);var g=a.effects.setMode(e,b.options.mode||"effect");var f=a(b.options.to);var c=e.offset();var d=a('<div class="ui-effects-transfer"></div>').appendTo(document.body);if(b.options.className){d.addClass(b.options.className)}d.addClass(b.options.className);d.css({top:c.top,left:c.left,height:e.outerHeight()-parseInt(d.css("borderTopWidth"))-parseInt(d.css("borderBottomWidth")),width:e.outerWidth()-parseInt(d.css("borderLeftWidth"))-parseInt(d.css("borderRightWidth")),position:"absolute"});c=f.offset();animation={top:c.top,left:c.left,height:f.outerHeight()-parseInt(d.css("borderTopWidth"))-parseInt(d.css("borderBottomWidth")),width:f.outerWidth()-parseInt(d.css("borderLeftWidth"))-parseInt(d.css("borderRightWidth"))};d.animate(animation,b.duration,b.options.easing,function(){d.remove();if(b.callback){b.callback.apply(e[0],arguments)}e.dequeue()})})}})(jQuery);
 
 /**
 * password_strength_plugin.js
 * Copyright (c) 2009 myPocket technologies (www.mypocket-technologies.com)
 
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.

 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.

 * View the GNU General Public License <http://www.gnu.org/licenses/>.

 * @author Darren Mason (djmason9@gmail.com)
 * @date 3/13/2009
 * @projectDescription Password Strength Meter is a jQuery plug-in provide you smart algorithm to detect a password strength. Based on Firas Kassem orginal plugin - http://phiras.wordpress.com/2007/04/08/password-strength-meter-a-jquery-plugin/
 * @version 1.0.1
 * 
 * @requires jquery.js (tested with 1.3.2)
 * @param shortPass:	"shortPass",	//optional
 * @param badPass:		"badPass",		//optional
 * @param goodPass:		"goodPass",		//optional
 * @param strongPass:	"strongPass",	//optional
 * @param baseStyle:	"testresult",	//optional
 * @param userid:		"",				//required override
 * @param messageloc:	1				//before == 0 or after == 1
 * 
*/
(function(a){a.fn.nonePass="";a.fn.shortPass="";a.fn.badPass="";a.fn.goodPass="";a.fn.strongPass="";a.fn.samePassword="Username and Password identical.";a.fn.resultStyle="";a.fn.passStrength=function(b){var d={nonePass:"nonePass",shortPass:"shortPass",badPass:"badPass",goodPass:"goodPass",strongPass:"strongPass",baseStyle:"testresult",userid:"",messageloc:1};var c=a.extend(d,b);return this.each(function(){var e=a(this);a(e).unbind().keyup(function(){a.fn.displayspan()});a.fn.displayspan=function(){var f=a.fn.teststrength(e.val(),a(c.userid).val(),c);if(c.messageloc===1){e.next("."+c.baseStyle).remove();e.after('<span class="'+c.baseStyle+'"><span></span></span>');e.next("."+c.baseStyle).addClass(e.resultStyle).find("span").text(f)}else{e.prev("."+c.baseStyle).remove();e.before('<span class="'+c.baseStyle+'"><span></span></span>');e.prev("."+c.baseStyle).addClass(e.resultStyle).find("span").text(f)}};a.fn.teststrength=function(f,i,g){var h=0;if(f.length==0){this.resultStyle=g.nonePass;return a(this).nonePass}if(f.length<5){this.resultStyle=g.shortPass;return a(this).shortPass}if(f.toLowerCase()==i.toLowerCase()){this.resultStyle=g.badPass;return a(this).samePassword}h+=f.length*4;h+=(a.fn.checkRepetition(1,f).length-f.length)*1;h+=(a.fn.checkRepetition(2,f).length-f.length)*1;h+=(a.fn.checkRepetition(3,f).length-f.length)*1;h+=(a.fn.checkRepetition(4,f).length-f.length)*1;if(f.match(/(.*[0-9].*[0-9].*[0-9])/)){h+=5}if(f.match(/(.*[!,@,#,$,%,^,&,*,?,_,~].*[!,@,#,$,%,^,&,*,?,_,~])/)){h+=5}if(f.match(/([a-z].*[A-Z])|([A-Z].*[a-z])/)){h+=10}if(f.match(/([a-zA-Z])/)&&f.match(/([0-9])/)){h+=15}if(f.match(/([!,@,#,$,%,^,&,*,?,_,~])/)&&f.match(/([0-9])/)){h+=15}if(f.match(/([!,@,#,$,%,^,&,*,?,_,~])/)&&f.match(/([a-zA-Z])/)){h+=15}if(f.match(/^\w+$/)||f.match(/^\d+$/)){h-=10}if(h<0){h=0}if(h>100){h=100}if(h<34){this.resultStyle=g.badPass;return a(this).badPass}if(h<68){this.resultStyle=g.goodPass;return a(this).goodPass}this.resultStyle=g.strongPass;return a(this).strongPass}})}})(jQuery);$.fn.checkRepetition=function(a,f){var d="";for(var c=0;c<f.length;c++){var e=true;for(var b=0;b<a&&(b+c+a)<f.length;b++){e=e&&(f.charAt(b+c)==f.charAt(b+c+a))}if(b<a){e=false}if(e){c+=a-1;e=false}else{d+=f.charAt(c)}}return d};