/*************** Contents ****************
2009-10-27 07:17:57 Etc/GMT    /custom/defaults/s/WebServerResources/library/js/jquery.1.3.js
2009-10-27 07:17:57 Etc/GMT    /custom/defaults/s/WebServerResources/library/js/jquery.ui.js
2009-10-27 07:17:49 Etc/GMT    /s/WebServerResources/library/js/jquery.ui-1.5.3/ui/ui.core.js
2009-10-27 07:17:49 Etc/GMT    /s/WebServerResources/library/js/jquery.ui-1.5.3/ui/ui.datepicker.js
2009-10-27 07:17:50 Etc/GMT    /custom/defaults/s/WebServerResources/library/js/shadow.js
2009-10-27 07:17:57 Etc/GMT    /custom/defaults/s/WebServerResources/library/js/jquery.autocomplete.js
2009-10-27 07:17:57 Etc/GMT    /defaults/s/WebServerResources/library/js/jquery-util/jquery.utils.js
2009-12-07 06:41:57 Etc/GMT    /s/WebServerResources/library/js/nyroModal-1.5.5/js/jquery.nyroModal-1.5.5.js
2009-10-27 07:17:50 Etc/GMT    /defaults/s/WebServerResources/library/js/jquery-tooltip/jquery.tooltip.js
/*************** End Contents ****************
*/
/*! 
 generated 2010-03-08 05:35:06 Etc/GMT as defined in /var/onCourse/1105/custom/defaults/config/js.conf
*//* Earlier output file date: 2010-03-01 06:41:23 Etc/GMT*/

/*********** jquery.1.3.js *************/
/*
 * jQuery JavaScript Library v1.3
 * http://jquery.com/
 *
 * Copyright (c) 2009 John Resig
 * Dual licensed under the MIT and GPL licenses.
 * http://docs.jquery.com/License
 *
 * Date: 2009-01-13 12:50:31 -0500 (Tue, 13 Jan 2009)
 * Revision: 6104
 */
(function(){var l=this,g,x=l.jQuery,o=l.$,n=l.jQuery=l.$=function(D,E){return new n.fn.init(D,E)},C=/^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,f=/^.[^:#\[\.,]*$/;n.fn=n.prototype={init:function(D,G){D=D||document;if(D.nodeType){this[0]=D;this.length=1;this.context=D;return this}if(typeof D==="string"){var F=C.exec(D);if(F&&(F[1]||!G)){if(F[1]){D=n.clean([F[1]],G)}else{var H=document.getElementById(F[3]);if(H){if(H.id!=F[3]){return n().find(D)}var E=n(H);E.context=document;E.selector=D;return E}D=[]}}else{return n(G).find(D)}}else{if(n.isFunction(D)){return n(document).ready(D)}}if(D.selector&&D.context){this.selector=D.selector;this.context=D.context}return this.setArray(n.makeArray(D))},selector:"",jquery:"1.3",size:function(){return this.length},get:function(D){return D===g?n.makeArray(this):this[D]},pushStack:function(E,G,D){var F=n(E);F.prevObject=this;F.context=this.context;if(G==="find"){F.selector=this.selector+(this.selector?" ":"")+D}else{if(G){F.selector=this.selector+"."+G+"("+D+")"}}return F},setArray:function(D){this.length=0;Array.prototype.push.apply(this,D);return this},each:function(E,D){return n.each(this,E,D)},index:function(D){return n.inArray(D&&D.jquery?D[0]:D,this)},attr:function(E,G,F){var D=E;if(typeof E==="string"){if(G===g){return this[0]&&n[F||"attr"](this[0],E)}else{D={};D[E]=G}}return this.each(function(H){for(E in D){n.attr(F?this.style:this,E,n.prop(this,D[E],F,H,E))}})},css:function(D,E){if((D=="width"||D=="height")&&parseFloat(E)<0){E=g}return this.attr(D,E,"curCSS")},text:function(E){if(typeof E!=="object"&&E!=null){return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(E))}var D="";n.each(E||this,function(){n.each(this.childNodes,function(){if(this.nodeType!=8){D+=this.nodeType!=1?this.nodeValue:n.fn.text([this])}})});return D},wrapAll:function(D){if(this[0]){var E=n(D,this[0].ownerDocument).clone();if(this[0].parentNode){E.insertBefore(this[0])}E.map(function(){var F=this;while(F.firstChild){F=F.firstChild}return F}).append(this)}return this},wrapInner:function(D){return this.each(function(){n(this).contents().wrapAll(D)})},wrap:function(D){return this.each(function(){n(this).wrapAll(D)})},append:function(){return this.domManip(arguments,true,function(D){if(this.nodeType==1){this.appendChild(D)}})},prepend:function(){return this.domManip(arguments,true,function(D){if(this.nodeType==1){this.insertBefore(D,this.firstChild)}})},before:function(){return this.domManip(arguments,false,function(D){this.parentNode.insertBefore(D,this)})},after:function(){return this.domManip(arguments,false,function(D){this.parentNode.insertBefore(D,this.nextSibling)})},end:function(){return this.prevObject||n([])},push:[].push,find:function(D){if(this.length===1&&!/,/.test(D)){var F=this.pushStack([],"find",D);F.length=0;n.find(D,this[0],F);return F}else{var E=n.map(this,function(G){return n.find(D,G)});return this.pushStack(/[^+>] [^+>]/.test(D)?n.unique(E):E,"find",D)}},clone:function(E){var D=this.map(function(){if(!n.support.noCloneEvent&&!n.isXMLDoc(this)){var H=this.cloneNode(true),G=document.createElement("div");G.appendChild(H);return n.clean([G.innerHTML])[0]}else{return this.cloneNode(true)}});var F=D.find("*").andSelf().each(function(){if(this[h]!==g){this[h]=null}});if(E===true){this.find("*").andSelf().each(function(H){if(this.nodeType==3){return}var G=n.data(this,"events");for(var J in G){for(var I in G[J]){n.event.add(F[H],J,G[J][I],G[J][I].data)}}})}return D},filter:function(D){return this.pushStack(n.isFunction(D)&&n.grep(this,function(F,E){return D.call(F,E)})||n.multiFilter(D,n.grep(this,function(E){return E.nodeType===1})),"filter",D)},closest:function(D){var E=n.expr.match.POS.test(D)?n(D):null;return this.map(function(){var F=this;while(F&&F.ownerDocument){if(E?E.index(F)>-1:n(F).is(D)){return F}F=F.parentNode}})},not:function(D){if(typeof D==="string"){if(f.test(D)){return this.pushStack(n.multiFilter(D,this,true),"not",D)}else{D=n.multiFilter(D,this)}}var E=D.length&&D[D.length-1]!==g&&!D.nodeType;return this.filter(function(){return E?n.inArray(this,D)<0:this!=D})},add:function(D){return this.pushStack(n.unique(n.merge(this.get(),typeof D==="string"?n(D):n.makeArray(D))))},is:function(D){return !!D&&n.multiFilter(D,this).length>0},hasClass:function(D){return !!D&&this.is("."+D)},val:function(J){if(J===g){var D=this[0];if(D){if(n.nodeName(D,"option")){return(D.attributes.value||{}).specified?D.value:D.text}if(n.nodeName(D,"select")){var H=D.selectedIndex,K=[],L=D.options,G=D.type=="select-one";if(H<0){return null}for(var E=G?H:0,I=G?H+1:L.length;E<I;E++){var F=L[E];if(F.selected){J=n(F).val();if(G){return J}K.push(J)}}return K}return(D.value||"").replace(/\r/g,"")}return g}if(typeof J==="number"){J+=""}return this.each(function(){if(this.nodeType!=1){return}if(n.isArray(J)&&/radio|checkbox/.test(this.type)){this.checked=(n.inArray(this.value,J)>=0||n.inArray(this.name,J)>=0)}else{if(n.nodeName(this,"select")){var M=n.makeArray(J);n("option",this).each(function(){this.selected=(n.inArray(this.value,M)>=0||n.inArray(this.text,M)>=0)});if(!M.length){this.selectedIndex=-1}}else{this.value=J}}})},html:function(D){return D===g?(this[0]?this[0].innerHTML:null):this.empty().append(D)},replaceWith:function(D){return this.after(D).remove()},eq:function(D){return this.slice(D,+D+1)},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments),"slice",Array.prototype.slice.call(arguments).join(","))},map:function(D){return this.pushStack(n.map(this,function(F,E){return D.call(F,E,F)}))},andSelf:function(){return this.add(this.prevObject)},domManip:function(J,M,L){if(this[0]){var I=(this[0].ownerDocument||this[0]).createDocumentFragment(),F=n.clean(J,(this[0].ownerDocument||this[0]),I),H=I.firstChild,D=this.length>1?I.cloneNode(true):I;if(H){for(var G=0,E=this.length;G<E;G++){L.call(K(this[G],H),G>0?D.cloneNode(true):I)}}if(F){n.each(F,y)}}return this;function K(N,O){return M&&n.nodeName(N,"table")&&n.nodeName(O,"tr")?(N.getElementsByTagName("tbody")[0]||N.appendChild(N.ownerDocument.createElement("tbody"))):N}}};n.fn.init.prototype=n.fn;function y(D,E){if(E.src){n.ajax({url:E.src,async:false,dataType:"script"})}else{n.globalEval(E.text||E.textContent||E.innerHTML||"")}if(E.parentNode){E.parentNode.removeChild(E)}}function e(){return +new Date}n.extend=n.fn.extend=function(){var I=arguments[0]||{},G=1,H=arguments.length,D=false,F;if(typeof I==="boolean"){D=I;I=arguments[1]||{};G=2}if(typeof I!=="object"&&!n.isFunction(I)){I={}}if(H==G){I=this;--G}for(;G<H;G++){if((F=arguments[G])!=null){for(var E in F){var J=I[E],K=F[E];if(I===K){continue}if(D&&K&&typeof K==="object"&&!K.nodeType){I[E]=n.extend(D,J||(K.length!=null?[]:{}),K)}else{if(K!==g){I[E]=K}}}}}return I};var b=/z-?index|font-?weight|opacity|zoom|line-?height/i,p=document.defaultView||{},r=Object.prototype.toString;n.extend({noConflict:function(D){l.$=o;if(D){l.jQuery=x}return n},isFunction:function(D){return r.call(D)==="[object Function]"},isArray:function(D){return r.call(D)==="[object Array]"},isXMLDoc:function(D){return D.documentElement&&!D.body||D.tagName&&D.ownerDocument&&!D.ownerDocument.body},globalEval:function(F){F=n.trim(F);if(F){var E=document.getElementsByTagName("head")[0]||document.documentElement,D=document.createElement("script");D.type="text/javascript";if(n.support.scriptEval){D.appendChild(document.createTextNode(F))}else{D.text=F}E.insertBefore(D,E.firstChild);E.removeChild(D)}},nodeName:function(E,D){return E.nodeName&&E.nodeName.toUpperCase()==D.toUpperCase()},each:function(F,J,E){var D,G=0,H=F.length;if(E){if(H===g){for(D in F){if(J.apply(F[D],E)===false){break}}}else{for(;G<H;){if(J.apply(F[G++],E)===false){break}}}}else{if(H===g){for(D in F){if(J.call(F[D],D,F[D])===false){break}}}else{for(var I=F[0];G<H&&J.call(I,G,I)!==false;I=F[++G]){}}}return F},prop:function(G,H,F,E,D){if(n.isFunction(H)){H=H.call(G,E)}return typeof H==="number"&&F=="curCSS"&&!b.test(D)?H+"px":H},className:{add:function(D,E){n.each((E||"").split(/\s+/),function(F,G){if(D.nodeType==1&&!n.className.has(D.className,G)){D.className+=(D.className?" ":"")+G}})},remove:function(D,E){if(D.nodeType==1){D.className=E!==g?n.grep(D.className.split(/\s+/),function(F){return !n.className.has(E,F)}).join(" "):""}},has:function(E,D){return n.inArray(D,(E.className||E).toString().split(/\s+/))>-1}},swap:function(G,F,H){var D={};for(var E in F){D[E]=G.style[E];G.style[E]=F[E]}H.call(G);for(var E in F){G.style[E]=D[E]}},css:function(F,D,H){if(D=="width"||D=="height"){var J,E={position:"absolute",visibility:"hidden",display:"block"},I=D=="width"?["Left","Right"]:["Top","Bottom"];function G(){J=D=="width"?F.offsetWidth:F.offsetHeight;var L=0,K=0;n.each(I,function(){L+=parseFloat(n.curCSS(F,"padding"+this,true))||0;K+=parseFloat(n.curCSS(F,"border"+this+"Width",true))||0});J-=Math.round(L+K)}if(n(F).is(":visible")){G()}else{n.swap(F,E,G)}return Math.max(0,J)}return n.curCSS(F,D,H)},curCSS:function(H,E,F){var K,D=H.style;if(E=="opacity"&&!n.support.opacity){K=n.attr(D,"opacity");return K==""?"1":K}if(E.match(/float/i)){E=v}if(!F&&D&&D[E]){K=D[E]}else{if(p.getComputedStyle){if(E.match(/float/i)){E="float"}E=E.replace(/([A-Z])/g,"-$1").toLowerCase();var L=p.getComputedStyle(H,null);if(L){K=L.getPropertyValue(E)}if(E=="opacity"&&K==""){K="1"}}else{if(H.currentStyle){var I=E.replace(/\-(\w)/g,function(M,N){return N.toUpperCase()});K=H.currentStyle[E]||H.currentStyle[I];if(!/^\d+(px)?$/i.test(K)&&/^\d/.test(K)){var G=D.left,J=H.runtimeStyle.left;H.runtimeStyle.left=H.currentStyle.left;D.left=K||0;K=D.pixelLeft+"px";D.left=G;H.runtimeStyle.left=J}}}}return K},clean:function(E,J,H){J=J||document;if(typeof J.createElement==="undefined"){J=J.ownerDocument||J[0]&&J[0].ownerDocument||document}if(!H&&E.length===1&&typeof E[0]==="string"){var G=/^<(\w+)\s*\/?>$/.exec(E[0]);if(G){return[J.createElement(G[1])]}}var F=[],D=[],K=J.createElement("div");n.each(E,function(O,Q){if(typeof Q==="number"){Q+=""}if(!Q){return}if(typeof Q==="string"){Q=Q.replace(/(<(\w+)[^>]*?)\/>/g,function(S,T,R){return R.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?S:T+"></"+R+">"});var N=n.trim(Q).toLowerCase();var P=!N.indexOf("<opt")&&[1,"<select multiple='multiple'>","</select>"]||!N.indexOf("<leg")&&[1,"<fieldset>","</fieldset>"]||N.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"<table>","</table>"]||!N.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!N.indexOf("<td")||!N.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||!N.indexOf("<col")&&[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"]||!n.support.htmlSerialize&&[1,"div<div>","</div>"]||[0,"",""];K.innerHTML=P[1]+Q+P[2];while(P[0]--){K=K.lastChild}if(!n.support.tbody){var M=!N.indexOf("<table")&&N.indexOf("<tbody")<0?K.firstChild&&K.firstChild.childNodes:P[1]=="<table>"&&N.indexOf("<tbody")<0?K.childNodes:[];for(var L=M.length-1;L>=0;--L){if(n.nodeName(M[L],"tbody")&&!M[L].childNodes.length){M[L].parentNode.removeChild(M[L])}}}if(!n.support.leadingWhitespace&&/^\s/.test(Q)){K.insertBefore(J.createTextNode(Q.match(/^\s*/)[0]),K.firstChild)}Q=n.makeArray(K.childNodes)}if(Q.nodeType){F.push(Q)}else{F=n.merge(F,Q)}});if(H){for(var I=0;F[I];I++){if(n.nodeName(F[I],"script")&&(!F[I].type||F[I].type.toLowerCase()==="text/javascript")){D.push(F[I].parentNode?F[I].parentNode.removeChild(F[I]):F[I])}else{if(F[I].nodeType===1){F.splice.apply(F,[I+1,0].concat(n.makeArray(F[I].getElementsByTagName("script"))))}H.appendChild(F[I])}}return D}return F},attr:function(I,F,J){if(!I||I.nodeType==3||I.nodeType==8){return g}var G=!n.isXMLDoc(I),K=J!==g;F=G&&n.props[F]||F;if(I.tagName){var E=/href|src|style/.test(F);if(F=="selected"&&I.parentNode){I.parentNode.selectedIndex}if(F in I&&G&&!E){if(K){if(F=="type"&&n.nodeName(I,"input")&&I.parentNode){throw"type property can't be changed"}I[F]=J}if(n.nodeName(I,"form")&&I.getAttributeNode(F)){return I.getAttributeNode(F).nodeValue}if(F=="tabIndex"){var H=I.getAttributeNode("tabIndex");return H&&H.specified?H.value:I.nodeName.match(/^(a|area|button|input|object|select|textarea)$/i)?0:g}return I[F]}if(!n.support.style&&G&&F=="style"){return n.attr(I.style,"cssText",J)}if(K){I.setAttribute(F,""+J)}var D=!n.support.hrefNormalized&&G&&E?I.getAttribute(F,2):I.getAttribute(F);return D===null?g:D}if(!n.support.opacity&&F=="opacity"){if(K){I.zoom=1;I.filter=(I.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(J)+""=="NaN"?"":"alpha(opacity="+J*100+")")}return I.filter&&I.filter.indexOf("opacity=")>=0?(parseFloat(I.filter.match(/opacity=([^)]*)/)[1])/100)+"":""}F=F.replace(/-([a-z])/ig,function(L,M){return M.toUpperCase()});if(K){I[F]=J}return I[F]},trim:function(D){return(D||"").replace(/^\s+|\s+$/g,"")},makeArray:function(F){var D=[];if(F!=null){var E=F.length;if(E==null||typeof F==="string"||n.isFunction(F)||F.setInterval){D[0]=F}else{while(E){D[--E]=F[E]}}}return D},inArray:function(F,G){for(var D=0,E=G.length;D<E;D++){if(G[D]===F){return D}}return -1},merge:function(G,D){var E=0,F,H=G.length;if(!n.support.getAll){while((F=D[E++])!=null){if(F.nodeType!=8){G[H++]=F}}}else{while((F=D[E++])!=null){G[H++]=F}}return G},unique:function(J){var E=[],D={};try{for(var F=0,G=J.length;F<G;F++){var I=n.data(J[F]);if(!D[I]){D[I]=true;E.push(J[F])}}}catch(H){E=J}return E},grep:function(E,I,D){var F=[];for(var G=0,H=E.length;G<H;G++){if(!D!=!I(E[G],G)){F.push(E[G])}}return F},map:function(D,I){var E=[];for(var F=0,G=D.length;F<G;F++){var H=I(D[F],F);if(H!=null){E[E.length]=H}}return E.concat.apply([],E)}});var B=navigator.userAgent.toLowerCase();n.browser={version:(B.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[0,"0"])[1],safari:/webkit/.test(B),opera:/opera/.test(B),msie:/msie/.test(B)&&!/opera/.test(B),mozilla:/mozilla/.test(B)&&!/(compatible|webkit)/.test(B)};n.each({parent:function(D){return D.parentNode},parents:function(D){return n.dir(D,"parentNode")},next:function(D){return n.nth(D,2,"nextSibling")},prev:function(D){return n.nth(D,2,"previousSibling")},nextAll:function(D){return n.dir(D,"nextSibling")},prevAll:function(D){return n.dir(D,"previousSibling")},siblings:function(D){return n.sibling(D.parentNode.firstChild,D)},children:function(D){return n.sibling(D.firstChild)},contents:function(D){return n.nodeName(D,"iframe")?D.contentDocument||D.contentWindow.document:n.makeArray(D.childNodes)}},function(D,E){n.fn[D]=function(F){var G=n.map(this,E);if(F&&typeof F=="string"){G=n.multiFilter(F,G)}return this.pushStack(n.unique(G),D,F)}});n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(D,E){n.fn[D]=function(){var F=arguments;return this.each(function(){for(var G=0,H=F.length;G<H;G++){n(F[G])[E](this)}})}});n.each({removeAttr:function(D){n.attr(this,D,"");if(this.nodeType==1){this.removeAttribute(D)}},addClass:function(D){n.className.add(this,D)},removeClass:function(D){n.className.remove(this,D)},toggleClass:function(E,D){if(typeof D!=="boolean"){D=!n.className.has(this,E)}n.className[D?"add":"remove"](this,E)},remove:function(D){if(!D||n.filter(D,[this]).length){n("*",this).add([this]).each(function(){n.event.remove(this);n.removeData(this)});if(this.parentNode){this.parentNode.removeChild(this)}}},empty:function(){n(">*",this).remove();while(this.firstChild){this.removeChild(this.firstChild)}}},function(D,E){n.fn[D]=function(){return this.each(E,arguments)}});function j(D,E){return D[0]&&parseInt(n.curCSS(D[0],E,true),10)||0}var h="jQuery"+e(),u=0,z={};n.extend({cache:{},data:function(E,D,F){E=E==l?z:E;var G=E[h];if(!G){G=E[h]=++u}if(D&&!n.cache[G]){n.cache[G]={}}if(F!==g){n.cache[G][D]=F}return D?n.cache[G][D]:G},removeData:function(E,D){E=E==l?z:E;var G=E[h];if(D){if(n.cache[G]){delete n.cache[G][D];D="";for(D in n.cache[G]){break}if(!D){n.removeData(E)}}}else{try{delete E[h]}catch(F){if(E.removeAttribute){E.removeAttribute(h)}}delete n.cache[G]}},queue:function(E,D,G){if(E){D=(D||"fx")+"queue";var F=n.data(E,D);if(!F||n.isArray(G)){F=n.data(E,D,n.makeArray(G))}else{if(G){F.push(G)}}}return F},dequeue:function(G,F){var D=n.queue(G,F),E=D.shift();if(!F||F==="fx"){E=D[0]}if(E!==g){E.call(G)}}});n.fn.extend({data:function(D,F){var G=D.split(".");G[1]=G[1]?"."+G[1]:"";if(F===g){var E=this.triggerHandler("getData"+G[1]+"!",[G[0]]);if(E===g&&this.length){E=n.data(this[0],D)}return E===g&&G[1]?this.data(G[0]):E}else{return this.trigger("setData"+G[1]+"!",[G[0],F]).each(function(){n.data(this,D,F)})}},removeData:function(D){return this.each(function(){n.removeData(this,D)})},queue:function(D,E){if(typeof D!=="string"){E=D;D="fx"}if(E===g){return n.queue(this[0],D)}return this.each(function(){var F=n.queue(this,D,E);if(D=="fx"&&F.length==1){F[0].call(this)}})},dequeue:function(D){return this.each(function(){n.dequeue(this,D)})}});
/*
 * Sizzle CSS Selector Engine - v0.9.1
 *  Copyright 2009, The Dojo Foundation
 *  Released under the MIT, BSD, and GPL Licenses.
 *  More information: http://sizzlejs.com/
 */
(function(){var N=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|[^[\]]+)+\]|\\.|[^ >+~,(\[]+)+|[>+~])(\s*,\s*)?/g,I=0,F=Object.prototype.toString;var E=function(ae,S,aa,V){aa=aa||[];S=S||document;if(S.nodeType!==1&&S.nodeType!==9){return[]}if(!ae||typeof ae!=="string"){return aa}var ab=[],ac,Y,ah,ag,Z,R,Q=true;N.lastIndex=0;while((ac=N.exec(ae))!==null){ab.push(ac[1]);if(ac[2]){R=RegExp.rightContext;break}}if(ab.length>1&&G.match.POS.exec(ae)){if(ab.length===2&&G.relative[ab[0]]){var U="",X;while((X=G.match.POS.exec(ae))){U+=X[0];ae=ae.replace(G.match.POS,"")}Y=E.filter(U,E(/\s$/.test(ae)?ae+"*":ae,S))}else{Y=G.relative[ab[0]]?[S]:E(ab.shift(),S);while(ab.length){var P=[];ae=ab.shift();if(G.relative[ae]){ae+=ab.shift()}for(var af=0,ad=Y.length;af<ad;af++){E(ae,Y[af],P)}Y=P}}}else{var ai=V?{expr:ab.pop(),set:D(V)}:E.find(ab.pop(),ab.length===1&&S.parentNode?S.parentNode:S);Y=E.filter(ai.expr,ai.set);if(ab.length>0){ah=D(Y)}else{Q=false}while(ab.length){var T=ab.pop(),W=T;if(!G.relative[T]){T=""}else{W=ab.pop()}if(W==null){W=S}G.relative[T](ah,W,M(S))}}if(!ah){ah=Y}if(!ah){throw"Syntax error, unrecognized expression: "+(T||ae)}if(F.call(ah)==="[object Array]"){if(!Q){aa.push.apply(aa,ah)}else{if(S.nodeType===1){for(var af=0;ah[af]!=null;af++){if(ah[af]&&(ah[af]===true||ah[af].nodeType===1&&H(S,ah[af]))){aa.push(Y[af])}}}else{for(var af=0;ah[af]!=null;af++){if(ah[af]&&ah[af].nodeType===1){aa.push(Y[af])}}}}}else{D(ah,aa)}if(R){E(R,S,aa,V)}return aa};E.matches=function(P,Q){return E(P,null,null,Q)};E.find=function(V,S){var W,Q;if(!V){return[]}for(var R=0,P=G.order.length;R<P;R++){var T=G.order[R],Q;if((Q=G.match[T].exec(V))){var U=RegExp.leftContext;if(U.substr(U.length-1)!=="\\"){Q[1]=(Q[1]||"").replace(/\\/g,"");W=G.find[T](Q,S);if(W!=null){V=V.replace(G.match[T],"");break}}}}if(!W){W=S.getElementsByTagName("*")}return{set:W,expr:V}};E.filter=function(S,ac,ad,T){var Q=S,Y=[],ah=ac,V,ab;while(S&&ac.length){for(var U in G.filter){if((V=G.match[U].exec(S))!=null){var Z=G.filter[U],R=null,X=0,aa,ag;ab=false;if(ah==Y){Y=[]}if(G.preFilter[U]){V=G.preFilter[U](V,ah,ad,Y,T);if(!V){ab=aa=true}else{if(V===true){continue}else{if(V[0]===true){R=[];var W=null,af;for(var ae=0;(af=ah[ae])!==g;ae++){if(af&&W!==af){R.push(af);W=af}}}}}}if(V){for(var ae=0;(ag=ah[ae])!==g;ae++){if(ag){if(R&&ag!=R[X]){X++}aa=Z(ag,V,X,R);var P=T^!!aa;if(ad&&aa!=null){if(P){ab=true}else{ah[ae]=false}}else{if(P){Y.push(ag);ab=true}}}}}if(aa!==g){if(!ad){ah=Y}S=S.replace(G.match[U],"");if(!ab){return[]}break}}}S=S.replace(/\s*,\s*/,"");if(S==Q){if(ab==null){throw"Syntax error, unrecognized expression: "+S}else{break}}Q=S}return ah};var G=E.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(P){return P.getAttribute("href")}},relative:{"+":function(T,Q){for(var R=0,P=T.length;R<P;R++){var S=T[R];if(S){var U=S.previousSibling;while(U&&U.nodeType!==1){U=U.previousSibling}T[R]=typeof Q==="string"?U||false:U===Q}}if(typeof Q==="string"){E.filter(Q,T,true)}},">":function(U,Q,V){if(typeof Q==="string"&&!/\W/.test(Q)){Q=V?Q:Q.toUpperCase();for(var R=0,P=U.length;R<P;R++){var T=U[R];if(T){var S=T.parentNode;U[R]=S.nodeName===Q?S:false}}}else{for(var R=0,P=U.length;R<P;R++){var T=U[R];if(T){U[R]=typeof Q==="string"?T.parentNode:T.parentNode===Q}}if(typeof Q==="string"){E.filter(Q,U,true)}}},"":function(S,Q,U){var R="done"+(I++),P=O;if(!Q.match(/\W/)){var T=Q=U?Q:Q.toUpperCase();P=L}P("parentNode",Q,R,S,T,U)},"~":function(S,Q,U){var R="done"+(I++),P=O;if(typeof Q==="string"&&!Q.match(/\W/)){var T=Q=U?Q:Q.toUpperCase();P=L}P("previousSibling",Q,R,S,T,U)}},find:{ID:function(Q,R){if(R.getElementById){var P=R.getElementById(Q[1]);return P?[P]:[]}},NAME:function(P,Q){return Q.getElementsByName?Q.getElementsByName(P[1]):null},TAG:function(P,Q){return Q.getElementsByTagName(P[1])}},preFilter:{CLASS:function(S,Q,R,P,U){S=" "+S[1].replace(/\\/g,"")+" ";for(var T=0;Q[T];T++){if(U^(" "+Q[T].className+" ").indexOf(S)>=0){if(!R){P.push(Q[T])}}else{if(R){Q[T]=false}}}return false},ID:function(P){return P[1].replace(/\\/g,"")},TAG:function(Q,P){for(var R=0;!P[R];R++){}return M(P[R])?Q[1]:Q[1].toUpperCase()},CHILD:function(P){if(P[1]=="nth"){var Q=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(P[2]=="even"&&"2n"||P[2]=="odd"&&"2n+1"||!/\D/.test(P[2])&&"0n+"+P[2]||P[2]);P[2]=(Q[1]+(Q[2]||1))-0;P[3]=Q[3]-0}P[0]="done"+(I++);return P},ATTR:function(Q){var P=Q[1];if(G.attrMap[P]){Q[1]=G.attrMap[P]}if(Q[2]==="~="){Q[4]=" "+Q[4]+" "}return Q},PSEUDO:function(T,Q,R,P,U){if(T[1]==="not"){if(T[3].match(N).length>1){T[3]=E(T[3],null,null,Q)}else{var S=E.filter(T[3],Q,R,true^U);if(!R){P.push.apply(P,S)}return false}}else{if(G.match.POS.test(T[0])){return true}}return T},POS:function(P){P.unshift(true);return P}},filters:{enabled:function(P){return P.disabled===false&&P.type!=="hidden"},disabled:function(P){return P.disabled===true},checked:function(P){return P.checked===true},selected:function(P){P.parentNode.selectedIndex;return P.selected===true},parent:function(P){return !!P.firstChild},empty:function(P){return !P.firstChild},has:function(R,Q,P){return !!E(P[3],R).length},header:function(P){return/h\d/i.test(P.nodeName)},text:function(P){return"text"===P.type},radio:function(P){return"radio"===P.type},checkbox:function(P){return"checkbox"===P.type},file:function(P){return"file"===P.type},password:function(P){return"password"===P.type},submit:function(P){return"submit"===P.type},image:function(P){return"image"===P.type},reset:function(P){return"reset"===P.type},button:function(P){return"button"===P.type||P.nodeName.toUpperCase()==="BUTTON"},input:function(P){return/input|select|textarea|button/i.test(P.nodeName)}},setFilters:{first:function(Q,P){return P===0},last:function(R,Q,P,S){return Q===S.length-1},even:function(Q,P){return P%2===0},odd:function(Q,P){return P%2===1},lt:function(R,Q,P){return Q<P[3]-0},gt:function(R,Q,P){return Q>P[3]-0},nth:function(R,Q,P){return P[3]-0==Q},eq:function(R,Q,P){return P[3]-0==Q}},filter:{CHILD:function(P,S){var V=S[1],W=P.parentNode;var U="child"+W.childNodes.length;if(W&&(!W[U]||!P.nodeIndex)){var T=1;for(var Q=W.firstChild;Q;Q=Q.nextSibling){if(Q.nodeType==1){Q.nodeIndex=T++}}W[U]=T-1}if(V=="first"){return P.nodeIndex==1}else{if(V=="last"){return P.nodeIndex==W[U]}else{if(V=="only"){return W[U]==1}else{if(V=="nth"){var Y=false,R=S[2],X=S[3];if(R==1&&X==0){return true}if(R==0){if(P.nodeIndex==X){Y=true}}else{if((P.nodeIndex-X)%R==0&&(P.nodeIndex-X)/R>=0){Y=true}}return Y}}}}},PSEUDO:function(V,R,S,W){var Q=R[1],T=G.filters[Q];if(T){return T(V,S,R,W)}else{if(Q==="contains"){return(V.textContent||V.innerText||"").indexOf(R[3])>=0}else{if(Q==="not"){var U=R[3];for(var S=0,P=U.length;S<P;S++){if(U[S]===V){return false}}return true}}}},ID:function(Q,P){return Q.nodeType===1&&Q.getAttribute("id")===P},TAG:function(Q,P){return(P==="*"&&Q.nodeType===1)||Q.nodeName===P},CLASS:function(Q,P){return P.test(Q.className)},ATTR:function(T,R){var P=G.attrHandle[R[1]]?G.attrHandle[R[1]](T):T[R[1]]||T.getAttribute(R[1]),U=P+"",S=R[2],Q=R[4];return P==null?false:S==="="?U===Q:S==="*="?U.indexOf(Q)>=0:S==="~="?(" "+U+" ").indexOf(Q)>=0:!R[4]?P:S==="!="?U!=Q:S==="^="?U.indexOf(Q)===0:S==="$="?U.substr(U.length-Q.length)===Q:S==="|="?U===Q||U.substr(0,Q.length+1)===Q+"-":false},POS:function(T,Q,R,U){var P=Q[2],S=G.setFilters[P];if(S){return S(T,R,Q,U)}}}};for(var K in G.match){G.match[K]=RegExp(G.match[K].source+/(?![^\[]*\])(?![^\(]*\))/.source)}var D=function(Q,P){Q=Array.prototype.slice.call(Q);if(P){P.push.apply(P,Q);return P}return Q};try{Array.prototype.slice.call(document.documentElement.childNodes)}catch(J){D=function(T,S){var Q=S||[];if(F.call(T)==="[object Array]"){Array.prototype.push.apply(Q,T)}else{if(typeof T.length==="number"){for(var R=0,P=T.length;R<P;R++){Q.push(T[R])}}else{for(var R=0;T[R];R++){Q.push(T[R])}}}return Q}}(function(){var Q=document.createElement("form"),R="script"+(new Date).getTime();Q.innerHTML="<input name='"+R+"'/>";var P=document.documentElement;P.insertBefore(Q,P.firstChild);if(!!document.getElementById(R)){G.find.ID=function(T,U){if(U.getElementById){var S=U.getElementById(T[1]);return S?S.id===T[1]||S.getAttributeNode&&S.getAttributeNode("id").nodeValue===T[1]?[S]:g:[]}};G.filter.ID=function(U,S){var T=U.getAttributeNode&&U.getAttributeNode("id");return U.nodeType===1&&T&&T.nodeValue===S}}P.removeChild(Q)})();(function(){var P=document.createElement("div");P.appendChild(document.createComment(""));if(P.getElementsByTagName("*").length>0){G.find.TAG=function(Q,U){var T=U.getElementsByTagName(Q[1]);if(Q[1]==="*"){var S=[];for(var R=0;T[R];R++){if(T[R].nodeType===1){S.push(T[R])}}T=S}return T}}P.innerHTML="<a href='#'></a>";if(P.firstChild.getAttribute("href")!=="#"){G.attrHandle.href=function(Q){return Q.getAttribute("href",2)}}})();if(document.querySelectorAll){(function(){var P=E;E=function(T,S,Q,R){S=S||document;if(!R&&S.nodeType===9){try{return D(S.querySelectorAll(T),Q)}catch(U){}}return P(T,S,Q,R)};E.find=P.find;E.filter=P.filter;E.selectors=P.selectors;E.matches=P.matches})()}if(document.documentElement.getElementsByClassName){G.order.splice(1,0,"CLASS");G.find.CLASS=function(P,Q){return Q.getElementsByClassName(P[1])}}function L(Q,W,V,Z,X,Y){for(var T=0,R=Z.length;T<R;T++){var P=Z[T];if(P){P=P[Q];var U=false;while(P&&P.nodeType){var S=P[V];if(S){U=Z[S];break}if(P.nodeType===1&&!Y){P[V]=T}if(P.nodeName===W){U=P;break}P=P[Q]}Z[T]=U}}}function O(Q,V,U,Y,W,X){for(var S=0,R=Y.length;S<R;S++){var P=Y[S];if(P){P=P[Q];var T=false;while(P&&P.nodeType){if(P[U]){T=Y[P[U]];break}if(P.nodeType===1){if(!X){P[U]=S}if(typeof V!=="string"){if(P===V){T=true;break}}else{if(E.filter(V,[P]).length>0){T=P;break}}}P=P[Q]}Y[S]=T}}}var H=document.compareDocumentPosition?function(Q,P){return Q.compareDocumentPosition(P)&16}:function(Q,P){return Q!==P&&(Q.contains?Q.contains(P):true)};var M=function(P){return P.documentElement&&!P.body||P.tagName&&P.ownerDocument&&!P.ownerDocument.body};n.find=E;n.filter=E.filter;n.expr=E.selectors;n.expr[":"]=n.expr.filters;E.selectors.filters.hidden=function(P){return"hidden"===P.type||n.css(P,"display")==="none"||n.css(P,"visibility")==="hidden"};E.selectors.filters.visible=function(P){return"hidden"!==P.type&&n.css(P,"display")!=="none"&&n.css(P,"visibility")!=="hidden"};E.selectors.filters.animated=function(P){return n.grep(n.timers,function(Q){return P===Q.elem}).length};n.multiFilter=function(R,P,Q){if(Q){R=":not("+R+")"}return E.matches(R,P)};n.dir=function(R,Q){var P=[],S=R[Q];while(S&&S!=document){if(S.nodeType==1){P.push(S)}S=S[Q]}return P};n.nth=function(T,P,R,S){P=P||1;var Q=0;for(;T;T=T[R]){if(T.nodeType==1&&++Q==P){break}}return T};n.sibling=function(R,Q){var P=[];for(;R;R=R.nextSibling){if(R.nodeType==1&&R!=Q){P.push(R)}}return P};return;l.Sizzle=E})();n.event={add:function(H,E,G,J){if(H.nodeType==3||H.nodeType==8){return}if(H.setInterval&&H!=l){H=l}if(!G.guid){G.guid=this.guid++}if(J!==g){var F=G;G=this.proxy(F);G.data=J}var D=n.data(H,"events")||n.data(H,"events",{}),I=n.data(H,"handle")||n.data(H,"handle",function(){return typeof n!=="undefined"&&!n.event.triggered?n.event.handle.apply(arguments.callee.elem,arguments):g});I.elem=H;n.each(E.split(/\s+/),function(L,M){var N=M.split(".");M=N.shift();G.type=N.slice().sort().join(".");var K=D[M];if(n.event.specialAll[M]){n.event.specialAll[M].setup.call(H,J,N)}if(!K){K=D[M]={};if(!n.event.special[M]||n.event.special[M].setup.call(H,J,N)===false){if(H.addEventListener){H.addEventListener(M,I,false)}else{if(H.attachEvent){H.attachEvent("on"+M,I)}}}}K[G.guid]=G;n.event.global[M]=true});H=null},guid:1,global:{},remove:function(J,G,I){if(J.nodeType==3||J.nodeType==8){return}var F=n.data(J,"events"),E,D;if(F){if(G===g||(typeof G==="string"&&G.charAt(0)==".")){for(var H in F){this.remove(J,H+(G||""))}}else{if(G.type){I=G.handler;G=G.type}n.each(G.split(/\s+/),function(L,N){var P=N.split(".");N=P.shift();var M=RegExp("(^|\\.)"+P.slice().sort().join(".*\\.")+"(\\.|$)");if(F[N]){if(I){delete F[N][I.guid]}else{for(var O in F[N]){if(M.test(F[N][O].type)){delete F[N][O]}}}if(n.event.specialAll[N]){n.event.specialAll[N].teardown.call(J,P)}for(E in F[N]){break}if(!E){if(!n.event.special[N]||n.event.special[N].teardown.call(J,P)===false){if(J.removeEventListener){J.removeEventListener(N,n.data(J,"handle"),false)}else{if(J.detachEvent){J.detachEvent("on"+N,n.data(J,"handle"))}}}E=null;delete F[N]}}})}for(E in F){break}if(!E){var K=n.data(J,"handle");if(K){K.elem=null}n.removeData(J,"events");n.removeData(J,"handle")}}},trigger:function(H,J,G,D){var F=H.type||H;if(!D){H=typeof H==="object"?H[h]?H:n.extend(n.Event(F),H):n.Event(F);if(F.indexOf("!")>=0){H.type=F=F.slice(0,-1);H.exclusive=true}if(!G){H.stopPropagation();if(this.global[F]){n.each(n.cache,function(){if(this.events&&this.events[F]){n.event.trigger(H,J,this.handle.elem)}})}}if(!G||G.nodeType==3||G.nodeType==8){return g}H.result=g;H.target=G;J=n.makeArray(J);J.unshift(H)}H.currentTarget=G;var I=n.data(G,"handle");if(I){I.apply(G,J)}if((!G[F]||(n.nodeName(G,"a")&&F=="click"))&&G["on"+F]&&G["on"+F].apply(G,J)===false){H.result=false}if(!D&&G[F]&&!H.isDefaultPrevented()&&!(n.nodeName(G,"a")&&F=="click")){this.triggered=true;try{G[F]()}catch(K){}}this.triggered=false;if(!H.isPropagationStopped()){var E=G.parentNode||G.ownerDocument;if(E){n.event.trigger(H,J,E,true)}}},handle:function(J){var I,D;J=arguments[0]=n.event.fix(J||l.event);var K=J.type.split(".");J.type=K.shift();I=!K.length&&!J.exclusive;var H=RegExp("(^|\\.)"+K.slice().sort().join(".*\\.")+"(\\.|$)");D=(n.data(this,"events")||{})[J.type];for(var F in D){var G=D[F];if(I||H.test(G.type)){J.handler=G;J.data=G.data;var E=G.apply(this,arguments);if(E!==g){J.result=E;if(E===false){J.preventDefault();J.stopPropagation()}}if(J.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(G){if(G[h]){return G}var E=G;G=n.Event(E);for(var F=this.props.length,I;F;){I=this.props[--F];G[I]=E[I]}if(!G.target){G.target=G.srcElement||document}if(G.target.nodeType==3){G.target=G.target.parentNode}if(!G.relatedTarget&&G.fromElement){G.relatedTarget=G.fromElement==G.target?G.toElement:G.fromElement}if(G.pageX==null&&G.clientX!=null){var H=document.documentElement,D=document.body;G.pageX=G.clientX+(H&&H.scrollLeft||D&&D.scrollLeft||0)-(H.clientLeft||0);G.pageY=G.clientY+(H&&H.scrollTop||D&&D.scrollTop||0)-(H.clientTop||0)}if(!G.which&&((G.charCode||G.charCode===0)?G.charCode:G.keyCode)){G.which=G.charCode||G.keyCode}if(!G.metaKey&&G.ctrlKey){G.metaKey=G.ctrlKey}if(!G.which&&G.button){G.which=(G.button&1?1:(G.button&2?3:(G.button&4?2:0)))}return G},proxy:function(E,D){D=D||function(){return E.apply(this,arguments)};D.guid=E.guid=E.guid||D.guid||this.guid++;return D},special:{ready:{setup:A,teardown:function(){}}},specialAll:{live:{setup:function(D,E){n.event.add(this,E[0],c)},teardown:function(F){if(F.length){var D=0,E=RegExp("(^|\\.)"+F[0]+"(\\.|$)");n.each((n.data(this,"events").live||{}),function(){if(E.test(this.type)){D++}});if(D<1){n.event.remove(this,F[0],c)}}}}}};n.Event=function(D){if(!this.preventDefault){return new n.Event(D)}if(D&&D.type){this.originalEvent=D;this.type=D.type;this.timeStamp=D.timeStamp}else{this.type=D}if(!this.timeStamp){this.timeStamp=e()}this[h]=true};function k(){return false}function t(){return true}n.Event.prototype={preventDefault:function(){this.isDefaultPrevented=t;var D=this.originalEvent;if(!D){return}if(D.preventDefault){D.preventDefault()}D.returnValue=false},stopPropagation:function(){this.isPropagationStopped=t;var D=this.originalEvent;if(!D){return}if(D.stopPropagation){D.stopPropagation()}D.cancelBubble=true},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=t;this.stopPropagation()},isDefaultPrevented:k,isPropagationStopped:k,isImmediatePropagationStopped:k};var a=function(E){var D=E.relatedTarget;while(D&&D!=this){try{D=D.parentNode}catch(F){D=this}}if(D!=this){E.type=E.data;n.event.handle.apply(this,arguments)}};n.each({mouseover:"mouseenter",mouseout:"mouseleave"},function(E,D){n.event.special[D]={setup:function(){n.event.add(this,E,a,D)},teardown:function(){n.event.remove(this,E,a)}}});n.fn.extend({bind:function(E,F,D){return E=="unload"?this.one(E,F,D):this.each(function(){n.event.add(this,E,D||F,D&&F)})},one:function(F,G,E){var D=n.event.proxy(E||G,function(H){n(this).unbind(H,D);return(E||G).apply(this,arguments)});return this.each(function(){n.event.add(this,F,D,E&&G)})},unbind:function(E,D){return this.each(function(){n.event.remove(this,E,D)})},trigger:function(D,E){return this.each(function(){n.event.trigger(D,E,this)})},triggerHandler:function(D,F){if(this[0]){var E=n.Event(D);E.preventDefault();E.stopPropagation();n.event.trigger(E,F,this[0]);return E.result}},toggle:function(F){var D=arguments,E=1;while(E<D.length){n.event.proxy(F,D[E++])}return this.click(n.event.proxy(F,function(G){this.lastToggle=(this.lastToggle||0)%E;G.preventDefault();return D[this.lastToggle++].apply(this,arguments)||false}))},hover:function(D,E){return this.mouseenter(D).mouseleave(E)},ready:function(D){A();if(n.isReady){D.call(document,n)}else{n.readyList.push(D)}return this},live:function(F,E){var D=n.event.proxy(E);D.guid+=this.selector+F;n(document).bind(i(F,this.selector),this.selector,D);return this},die:function(E,D){n(document).unbind(i(E,this.selector),D?{guid:D.guid+this.selector+E}:null);return this}});function c(G){var D=RegExp("(^|\\.)"+G.type+"(\\.|$)"),F=true,E=[];n.each(n.data(this,"events").live||[],function(H,I){if(D.test(I.type)){var J=n(G.target).closest(I.data)[0];if(J){E.push({elem:J,fn:I})}}});n.each(E,function(){if(!G.isImmediatePropagationStopped()&&this.fn.call(this.elem,G,this.fn.data)===false){F=false}});return F}function i(E,D){return["live",E,D.replace(/\./g,"`").replace(/ /g,"|")].join(".")}n.extend({isReady:false,readyList:[],ready:function(){if(!n.isReady){n.isReady=true;if(n.readyList){n.each(n.readyList,function(){this.call(document,n)});n.readyList=null}n(document).triggerHandler("ready")}}});var w=false;function A(){if(w){return}w=true;if(document.addEventListener){document.addEventListener("DOMContentLoaded",function(){document.removeEventListener("DOMContentLoaded",arguments.callee,false);n.ready()},false)}else{if(document.attachEvent){document.attachEvent("onreadystatechange",function(){if(document.readyState==="complete"){document.detachEvent("onreadystatechange",arguments.callee);n.ready()}});if(document.documentElement.doScroll&&!l.frameElement){(function(){if(n.isReady){return}try{document.documentElement.doScroll("left")}catch(D){setTimeout(arguments.callee,0);return}n.ready()})()}}}n.event.add(l,"load",n.ready)}n.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(E,D){n.fn[D]=function(F){return F?this.bind(D,F):this.trigger(D)}});n(l).bind("unload",function(){for(var D in n.cache){if(D!=1&&n.cache[D].handle){n.event.remove(n.cache[D].handle.elem)}}});(function(){n.support={};var E=document.documentElement,F=document.createElement("script"),J=document.createElement("div"),I="script"+(new Date).getTime();J.style.display="none";J.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 G=J.getElementsByTagName("*"),D=J.getElementsByTagName("a")[0];if(!G||!G.length||!D){return}n.support={leadingWhitespace:J.firstChild.nodeType==3,tbody:!J.getElementsByTagName("tbody").length,objectAll:!!J.getElementsByTagName("object")[0].getElementsByTagName("*").length,htmlSerialize:!!J.getElementsByTagName("link").length,style:/red/.test(D.getAttribute("style")),hrefNormalized:D.getAttribute("href")==="/a",opacity:D.style.opacity==="0.5",cssFloat:!!D.style.cssFloat,scriptEval:false,noCloneEvent:true,boxModel:null};F.type="text/javascript";try{F.appendChild(document.createTextNode("window."+I+"=1;"))}catch(H){}E.insertBefore(F,E.firstChild);if(l[I]){n.support.scriptEval=true;delete l[I]}E.removeChild(F);if(J.attachEvent&&J.fireEvent){J.attachEvent("onclick",function(){n.support.noCloneEvent=false;J.detachEvent("onclick",arguments.callee)});J.cloneNode(true).fireEvent("onclick")}n(function(){var K=document.createElement("div");K.style.width="1px";K.style.paddingLeft="1px";document.body.appendChild(K);n.boxModel=n.support.boxModel=K.offsetWidth===2;document.body.removeChild(K)})})();var v=n.support.cssFloat?"cssFloat":"styleFloat";n.props={"for":"htmlFor","class":"className","float":v,cssFloat:v,styleFloat:v,readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",tabindex:"tabIndex"};n.fn.extend({_load:n.fn.load,load:function(F,I,J){if(typeof F!=="string"){return this._load(F)}var H=F.indexOf(" ");if(H>=0){var D=F.slice(H,F.length);F=F.slice(0,H)}var G="GET";if(I){if(n.isFunction(I)){J=I;I=null}else{if(typeof I==="object"){I=n.param(I);G="POST"}}}var E=this;n.ajax({url:F,type:G,dataType:"html",data:I,complete:function(L,K){if(K=="success"||K=="notmodified"){E.html(D?n("<div/>").append(L.responseText.replace(/<script(.|\s)*?\/script>/g,"")).find(D):L.responseText)}if(J){E.each(J,[L.responseText,K,L])}}});return this},serialize:function(){return n.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?n.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password/i.test(this.type))}).map(function(D,E){var F=n(this).val();return F==null?null:n.isArray(F)?n.map(F,function(H,G){return{name:E.name,value:H}}):{name:E.name,value:F}}).get()}});n.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(D,E){n.fn[E]=function(F){return this.bind(E,F)}});var q=e();n.extend({get:function(D,F,G,E){if(n.isFunction(F)){G=F;F=null}return n.ajax({type:"GET",url:D,data:F,success:G,dataType:E})},getScript:function(D,E){return n.get(D,null,E,"script")},getJSON:function(D,E,F){return n.get(D,E,F,"json")},post:function(D,F,G,E){if(n.isFunction(F)){G=F;F={}}return n.ajax({type:"POST",url:D,data:F,success:G,dataType:E})},ajaxSetup:function(D){n.extend(n.ajaxSettings,D)},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(L){L=n.extend(true,L,n.extend(true,{},n.ajaxSettings,L));var V,E=/=\?(&|$)/g,Q,U,F=L.type.toUpperCase();if(L.data&&L.processData&&typeof L.data!=="string"){L.data=n.param(L.data)}if(L.dataType=="jsonp"){if(F=="GET"){if(!L.url.match(E)){L.url+=(L.url.match(/\?/)?"&":"?")+(L.jsonp||"callback")+"=?"}}else{if(!L.data||!L.data.match(E)){L.data=(L.data?L.data+"&":"")+(L.jsonp||"callback")+"=?"}}L.dataType="json"}if(L.dataType=="json"&&(L.data&&L.data.match(E)||L.url.match(E))){V="jsonp"+q++;if(L.data){L.data=(L.data+"").replace(E,"="+V+"$1")}L.url=L.url.replace(E,"="+V+"$1");L.dataType="script";l[V]=function(W){U=W;H();K();l[V]=g;try{delete l[V]}catch(X){}if(G){G.removeChild(S)}}}if(L.dataType=="script"&&L.cache==null){L.cache=false}if(L.cache===false&&F=="GET"){var D=e();var T=L.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+D+"$2");L.url=T+((T==L.url)?(L.url.match(/\?/)?"&":"?")+"_="+D:"")}if(L.data&&F=="GET"){L.url+=(L.url.match(/\?/)?"&":"?")+L.data;L.data=null}if(L.global&&!n.active++){n.event.trigger("ajaxStart")}var P=/^(\w+:)?\/\/([^\/?#]+)/.exec(L.url);if(L.dataType=="script"&&F=="GET"&&P&&(P[1]&&P[1]!=location.protocol||P[2]!=location.host)){var G=document.getElementsByTagName("head")[0];var S=document.createElement("script");S.src=L.url;if(L.scriptCharset){S.charset=L.scriptCharset}if(!V){var N=false;S.onload=S.onreadystatechange=function(){if(!N&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){N=true;H();K();G.removeChild(S)}}}G.appendChild(S);return g}var J=false;var I=L.xhr();if(L.username){I.open(F,L.url,L.async,L.username,L.password)}else{I.open(F,L.url,L.async)}try{if(L.data){I.setRequestHeader("Content-Type",L.contentType)}if(L.ifModified){I.setRequestHeader("If-Modified-Since",n.lastModified[L.url]||"Thu, 01 Jan 1970 00:00:00 GMT")}I.setRequestHeader("X-Requested-With","XMLHttpRequest");I.setRequestHeader("Accept",L.dataType&&L.accepts[L.dataType]?L.accepts[L.dataType]+", */*":L.accepts._default)}catch(R){}if(L.beforeSend&&L.beforeSend(I,L)===false){if(L.global&&!--n.active){n.event.trigger("ajaxStop")}I.abort();return false}if(L.global){n.event.trigger("ajaxSend",[I,L])}var M=function(W){if(I.readyState==0){if(O){clearInterval(O);O=null;if(L.global&&!--n.active){n.event.trigger("ajaxStop")}}}else{if(!J&&I&&(I.readyState==4||W=="timeout")){J=true;if(O){clearInterval(O);O=null}Q=W=="timeout"?"timeout":!n.httpSuccess(I)?"error":L.ifModified&&n.httpNotModified(I,L.url)?"notmodified":"success";if(Q=="success"){try{U=n.httpData(I,L.dataType,L)}catch(Y){Q="parsererror"}}if(Q=="success"){var X;try{X=I.getResponseHeader("Last-Modified")}catch(Y){}if(L.ifModified&&X){n.lastModified[L.url]=X}if(!V){H()}}else{n.handleError(L,I,Q)}K();if(L.async){I=null}}}};if(L.async){var O=setInterval(M,13);if(L.timeout>0){setTimeout(function(){if(I){if(!J){M("timeout")}if(I){I.abort()}}},L.timeout)}}try{I.send(L.data)}catch(R){n.handleError(L,I,null,R)}if(!L.async){M()}function H(){if(L.success){L.success(U,Q)}if(L.global){n.event.trigger("ajaxSuccess",[I,L])}}function K(){if(L.complete){L.complete(I,Q)}if(L.global){n.event.trigger("ajaxComplete",[I,L])}if(L.global&&!--n.active){n.event.trigger("ajaxStop")}}return I},handleError:function(E,G,D,F){if(E.error){E.error(G,D,F)}if(E.global){n.event.trigger("ajaxError",[G,E,F])}},active:0,httpSuccess:function(E){try{return !E.status&&location.protocol=="file:"||(E.status>=200&&E.status<300)||E.status==304||E.status==1223}catch(D){}return false},httpNotModified:function(F,D){try{var G=F.getResponseHeader("Last-Modified");return F.status==304||G==n.lastModified[D]}catch(E){}return false},httpData:function(I,G,F){var E=I.getResponseHeader("content-type"),D=G=="xml"||!G&&E&&E.indexOf("xml")>=0,H=D?I.responseXML:I.responseText;if(D&&H.documentElement.tagName=="parsererror"){throw"parsererror"}if(F&&F.dataFilter){H=F.dataFilter(H,G)}if(typeof H==="string"){if(G=="script"){n.globalEval(H)}if(G=="json"){H=l["eval"]("("+H+")")}}return H},param:function(D){var F=[];function G(H,I){F[F.length]=encodeURIComponent(H)+"="+encodeURIComponent(I)}if(n.isArray(D)||D.jquery){n.each(D,function(){G(this.name,this.value)})}else{for(var E in D){if(n.isArray(D[E])){n.each(D[E],function(){G(E,this)})}else{G(E,n.isFunction(D[E])?D[E]():D[E])}}}return F.join("&").replace(/%20/g,"+")}});var m={},d=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];function s(E,D){var F={};n.each(d.concat.apply([],d.slice(0,D)),function(){F[this]=E});return F}n.fn.extend({show:function(I,K){if(I){return this.animate(s("show",3),I,K)}else{for(var G=0,E=this.length;G<E;G++){var D=n.data(this[G],"olddisplay");this[G].style.display=D||"";if(n.css(this[G],"display")==="none"){var F=this[G].tagName,J;if(m[F]){J=m[F]}else{var H=n("<"+F+" />").appendTo("body");J=H.css("display");if(J==="none"){J="block"}H.remove();m[F]=J}this[G].style.display=n.data(this[G],"olddisplay",J)}}return this}},hide:function(G,H){if(G){return this.animate(s("hide",3),G,H)}else{for(var F=0,E=this.length;F<E;F++){var D=n.data(this[F],"olddisplay");if(!D&&D!=="none"){n.data(this[F],"olddisplay",n.css(this[F],"display"))}this[F].style.display="none"}return this}},_toggle:n.fn.toggle,toggle:function(F,E){var D=typeof F==="boolean";return n.isFunction(F)&&n.isFunction(E)?this._toggle.apply(this,arguments):F==null||D?this.each(function(){var G=D?F:n(this).is(":hidden");n(this)[G?"show":"hide"]()}):this.animate(s("toggle",3),F,E)},fadeTo:function(D,F,E){return this.animate({opacity:F},D,E)},animate:function(H,E,G,F){var D=n.speed(E,G,F);return this[D.queue===false?"each":"queue"](function(){var J=n.extend({},D),L,K=this.nodeType==1&&n(this).is(":hidden"),I=this;for(L in H){if(H[L]=="hide"&&K||H[L]=="show"&&!K){return J.complete.call(this)}if((L=="height"||L=="width")&&this.style){J.display=n.css(this,"display");J.overflow=this.style.overflow}}if(J.overflow!=null){this.style.overflow="hidden"}J.curAnim=n.extend({},H);n.each(H,function(N,R){var Q=new n.fx(I,J,N);if(/toggle|show|hide/.test(R)){Q[R=="toggle"?K?"show":"hide":R](H)}else{var P=R.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),S=Q.cur(true)||0;if(P){var M=parseFloat(P[2]),O=P[3]||"px";if(O!="px"){I.style[N]=(M||1)+O;S=((M||1)/Q.cur(true))*S;I.style[N]=S+O}if(P[1]){M=((P[1]=="-="?-1:1)*M)+S}Q.custom(S,M,O)}else{Q.custom(S,R,"")}}});return true})},stop:function(E,D){var F=n.timers;if(E){this.queue([])}this.each(function(){for(var G=F.length-1;G>=0;G--){if(F[G].elem==this){if(D){F[G](true)}F.splice(G,1)}}});if(!D){this.dequeue()}return this}});n.each({slideDown:s("show",1),slideUp:s("hide",1),slideToggle:s("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(D,E){n.fn[D]=function(F,G){return this.animate(E,F,G)}});n.extend({speed:function(F,G,E){var D=typeof F==="object"?F:{complete:E||!E&&G||n.isFunction(F)&&F,duration:F,easing:E&&G||G&&!n.isFunction(G)&&G};D.duration=n.fx.off?0:typeof D.duration==="number"?D.duration:n.fx.speeds[D.duration]||n.fx.speeds._default;D.old=D.complete;D.complete=function(){if(D.queue!==false){n(this).dequeue()}if(n.isFunction(D.old)){D.old.call(this)}};return D},easing:{linear:function(F,G,D,E){return D+E*F},swing:function(F,G,D,E){return((-Math.cos(F*Math.PI)/2)+0.5)*E+D}},timers:[],timerId:null,fx:function(E,D,F){this.options=D;this.elem=E;this.prop=F;if(!D.orig){D.orig={}}}});n.fx.prototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this)}(n.fx.step[this.prop]||n.fx.step._default)(this);if((this.prop=="height"||this.prop=="width")&&this.elem.style){this.elem.style.display="block"}},cur:function(E){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop]}var D=parseFloat(n.css(this.elem,this.prop,E));return D&&D>-10000?D:parseFloat(n.curCSS(this.elem,this.prop))||0},custom:function(H,G,F){this.startTime=e();this.start=H;this.end=G;this.unit=F||this.unit||"px";this.now=this.start;this.pos=this.state=0;var D=this;function E(I){return D.step(I)}E.elem=this.elem;n.timers.push(E);if(E()&&n.timerId==null){n.timerId=setInterval(function(){var J=n.timers;for(var I=0;I<J.length;I++){if(!J[I]()){J.splice(I--,1)}}if(!J.length){clearInterval(n.timerId);n.timerId=null}},13)}},show:function(){this.options.orig[this.prop]=n.attr(this.elem.style,this.prop);this.options.show=true;this.custom(this.prop=="width"||this.prop=="height"?1:0,this.cur());n(this.elem).show()},hide:function(){this.options.orig[this.prop]=n.attr(this.elem.style,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(G){var F=e();if(G||F>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var D=true;for(var E in this.options.curAnim){if(this.options.curAnim[E]!==true){D=false}}if(D){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(n.css(this.elem,"display")=="none"){this.elem.style.display="block"}}if(this.options.hide){n(this.elem).hide()}if(this.options.hide||this.options.show){for(var H in this.options.curAnim){n.attr(this.elem.style,H,this.options.orig[H])}}}if(D){this.options.complete.call(this.elem)}return false}else{var I=F-this.startTime;this.state=I/this.options.duration;this.pos=n.easing[this.options.easing||(n.easing.swing?"swing":"linear")](this.state,I,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update()}return true}};n.extend(n.fx,{speeds:{slow:600,fast:200,_default:400},step:{opacity:function(D){n.attr(D.elem.style,"opacity",D.now)},_default:function(D){if(D.elem.style&&D.elem.style[D.prop]!=null){D.elem.style[D.prop]=D.now+D.unit}else{D.elem[D.prop]=D.now}}}});if(document.documentElement.getBoundingClientRect){n.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return n.offset.bodyOffset(this[0])}var F=this[0].getBoundingClientRect(),I=this[0].ownerDocument,E=I.body,D=I.documentElement,K=D.clientTop||E.clientTop||0,J=D.clientLeft||E.clientLeft||0,H=F.top+(self.pageYOffset||n.boxModel&&D.scrollTop||E.scrollTop)-K,G=F.left+(self.pageXOffset||n.boxModel&&D.scrollLeft||E.scrollLeft)-J;return{top:H,left:G}}}else{n.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return n.offset.bodyOffset(this[0])}n.offset.initialized||n.offset.initialize();var I=this[0],F=I.offsetParent,E=I,N=I.ownerDocument,L,G=N.documentElement,J=N.body,K=N.defaultView,D=K.getComputedStyle(I,null),M=I.offsetTop,H=I.offsetLeft;while((I=I.parentNode)&&I!==J&&I!==G){L=K.getComputedStyle(I,null);M-=I.scrollTop,H-=I.scrollLeft;if(I===F){M+=I.offsetTop,H+=I.offsetLeft;if(n.offset.doesNotAddBorder&&!(n.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(I.tagName))){M+=parseInt(L.borderTopWidth,10)||0,H+=parseInt(L.borderLeftWidth,10)||0}E=F,F=I.offsetParent}if(n.offset.subtractsBorderForOverflowNotVisible&&L.overflow!=="visible"){M+=parseInt(L.borderTopWidth,10)||0,H+=parseInt(L.borderLeftWidth,10)||0}D=L}if(D.position==="relative"||D.position==="static"){M+=J.offsetTop,H+=J.offsetLeft}if(D.position==="fixed"){M+=Math.max(G.scrollTop,J.scrollTop),H+=Math.max(G.scrollLeft,J.scrollLeft)}return{top:M,left:H}}}n.offset={initialize:function(){if(this.initialized){return}var K=document.body,E=document.createElement("div"),G,F,M,H,L,D,I=K.style.marginTop,J='<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>';L={position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"};for(D in L){E.style[D]=L[D]}E.innerHTML=J;K.insertBefore(E,K.firstChild);G=E.firstChild,F=G.firstChild,H=G.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(F.offsetTop!==5);this.doesAddBorderForTableAndCells=(H.offsetTop===5);G.style.overflow="hidden",G.style.position="relative";this.subtractsBorderForOverflowNotVisible=(F.offsetTop===-5);K.style.marginTop="1px";this.doesNotIncludeMarginInBodyOffset=(K.offsetTop===0);K.style.marginTop=I;K.removeChild(E);this.initialized=true},bodyOffset:function(D){n.offset.initialized||n.offset.initialize();var F=D.offsetTop,E=D.offsetLeft;if(n.offset.doesNotIncludeMarginInBodyOffset){F+=parseInt(n.curCSS(D,"marginTop",true),10)||0,E+=parseInt(n.curCSS(D,"marginLeft",true),10)||0}return{top:F,left:E}}};n.fn.extend({position:function(){var H=0,G=0,E;if(this[0]){var F=this.offsetParent(),I=this.offset(),D=/^body|html$/i.test(F[0].tagName)?{top:0,left:0}:F.offset();I.top-=j(this,"marginTop");I.left-=j(this,"marginLeft");D.top+=j(F,"borderTopWidth");D.left+=j(F,"borderLeftWidth");E={top:I.top-D.top,left:I.left-D.left}}return E},offsetParent:function(){var D=this[0].offsetParent||document.body;while(D&&(!/^body|html$/i.test(D.tagName)&&n.css(D,"position")=="static")){D=D.offsetParent}return n(D)}});n.each(["Left","Top"],function(E,D){var F="scroll"+D;n.fn[F]=function(G){if(!this[0]){return null}return G!==g?this.each(function(){this==l||this==document?l.scrollTo(!E?G:n(l).scrollLeft(),E?G:n(l).scrollTop()):this[F]=G}):this[0]==l||this[0]==document?self[E?"pageYOffset":"pageXOffset"]||n.boxModel&&document.documentElement[F]||document.body[F]:this[0][F]}});n.each(["Height","Width"],function(G,E){var D=G?"Left":"Top",F=G?"Right":"Bottom";n.fn["inner"+E]=function(){return this[E.toLowerCase()]()+j(this,"padding"+D)+j(this,"padding"+F)};n.fn["outer"+E]=function(I){return this["inner"+E]()+j(this,"border"+D+"Width")+j(this,"border"+F+"Width")+(I?j(this,"margin"+D)+j(this,"margin"+F):0)};var H=E.toLowerCase();n.fn[H]=function(I){return this[0]==l?document.compatMode=="CSS1Compat"&&document.documentElement["client"+E]||document.body["client"+E]:this[0]==document?Math.max(document.documentElement["client"+E],document.body["scroll"+E],document.documentElement["scroll"+E],document.body["offset"+E],document.documentElement["offset"+E]):I===g?(this.length?n.css(this[0],H):null):this.css(H,typeof I==="string"?I:I+"px")}})})();

/*********** jquery.ui.js *************/
eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('(h(B){c H=B.fn.2n,D=B.29.cn&&(9F(B.29.3J)<1.9);B.k={3J:"1.5b",2R:{23:h(K,J,N){c M=B.k[K].4p;1Q(c L in N){M.7m[L]=M.7m[L]||[];M.7m[L].4o([J,N[L]])}},1Y:h(J,L,K){c N=J.7m[L];if(!N){q}1Q(c M=0;M<N.1n;M++){if(J.l[N[M][0]]){N[M][1].1G(J.19,K)}}}},5g:h(K,J){q 1m.eM?K.eM(J)&16:K!==J&&K.5g(J)},9G:{},v:h(J){if(B.k.9G[J]){q B.k.9G[J]}c K=B(\'<1R 2w="k-lj"></1R>\').1l(J).v({1f:"2k",u:"-eY",t:"-eY",61:"8b"}).2K("22");B.k.9G[J]=!!((!(/3k|2u/).1S(K.v("2r"))||(/^[1-9]/).1S(K.v("18"))||(/^[1-9]/).1S(K.v("1a"))||!(/78/).1S(K.v("d2"))||!(/7c|f1\\(0, 0, 0, 0\\)/).1S(K.v("8n"))));9Z{B("22").5w(0).ab(K.5w(0))}aK(L){}q B.k.9G[J]},aC:h(L,J){if(B(L).v("3o")=="30"){q 1b}c M=(J&&J=="t")?"24":"2b",K=1b;if(L[M]>0){q 1k}L[M]=1;K=(L[M]>0);L[M]=0;q K},7R:h(J,L,K){q(J>L)&&(J<(L+K))},6U:h(O,J,N,M,L,K){q B.k.7R(O,N,L)&&B.k.7R(J,M,K)},2Z:{ly:8,lH:20,lF:kE,ko:17,ks:46,bA:40,dx:35,fg:13,cA:27,cE:36,kx:45,bz:37,kw:cT,l6:kP,mV:mU,mN:mS,n7:mI,m9:mi,mF:34,mo:33,ml:mv,bH:39,ms:16,gY:32,ff:9,bI:38}};if(D){c E=B.1Z,C=B.fn.5f,I="i5://i4.im.iB/iP/iw/es",F=/^4G-/,G=/^fj:/;B.1Z=h(K,J,L){c M=L!==3H;q(J=="6i"?(M?E.1Y(b,K,J,"fj:"+L):(E.1G(b,1C)||"").5E(G,"")):(F.1S(J)?(M?K.iI(I,J.5E(F,"es:"),L):E.1Y(b,K,J.5E(F,"es:"))):E.1G(b,1C)))};B.fn.5f=h(J){q(F.1S(J)?b.1L(h(){b.iV(I,J.5E(F,""))}):C.1Y(b,J))}}B.fn.1T({2n:h(){B("*",b).23(b).1L(h(){B(b).fU("2n")});q H.1G(b,1C)},iT:h(){q b.1Z("6g","iW").v("eK","").3q("eW.k")},7J:h(){q b.1Z("6g","fL").v("eK","78").2Q("eW.k",h(){q 1b})},1B:h(){c J;if((B.29.3Y&&(/(5U|21)/).1S(b.v("1f")))||(/2k/).1S(b.v("1f"))){J=b.4t().3u(h(){q(/(21|2k|5v)/).1S(B.7l(b,"1f",1))&&(/(3k|8w)/).1S(B.7l(b,"3o",1)+B.7l(b,"3o-y",1)+B.7l(b,"3o-x",1))}).eq(0)}1j{J=b.4t().3u(h(){q(/(3k|8w)/).1S(B.7l(b,"3o",1)+B.7l(b,"3o-y",1)+B.7l(b,"3o-x",1))}).eq(0)}q(/5v/).1S(b.v("1f"))||!J.1n?B(1m):J}});B.1T(B.iZ[":"],{1q:h(L,K,J){q!!B.1q(L,J[3])},cX:h(J){c L=J.3m.5T();h K(M){q!(B(M).is(":30")||B(M).4t(":30").1n)}q(J.6t>=0&&(("a"==L&&J.4c)||(/1v|4S|aa|3S/.1S(L)&&"30"!=J.5j&&!J.1K))&&K(J))}});h A(N,J,O,M){h L(Q){c P=B[N][J][Q]||[];q(2L P=="4Q"?P.9a(/,?\\s+/):P)}c K=L("9U");if(M.1n==1&&2L M[0]=="4Q"){K=K.5k(L("gT"))}q(B.7N(O,K)!=-1)}B.1V=h(J,K){c L=J.9a(".")[0];J=J.9a(".")[1];B.fn[J]=h(P){c N=(2L P=="4Q"),O=8F.4p.fX.1Y(1C,1);if(N&&P.iS(0,1)=="8R"){q b}if(N&&A(L,J,P,O)){c M=B.1q(b[0],J);q(M?M[P].1G(M,O):3H)}q b.1L(h(){c Q=B.1q(b,J);(!Q&&!N&&B.1q(b,J,2d B[L][J](b,P)));(Q&&N&&B.5l(Q[P])&&Q[P].1G(Q,O))})};B[L]=B[L]||{};B[L][J]=h(N,O){c M=b;b.cl=L;b.6Y=J;b.cD=B[L][J].a6||J;b.cu=L+"-"+J;b.l=B.1T({},B.1V.59,B[L][J].59,B.gu&&B.gu.5w(N)[J],O);b.19=B(N).2Q("d1."+J,h(Q,P,R){if(Q.1i==N){q M.4u(P,R)}}).2Q("d0."+J,h(Q,P){if(Q.1i==N){q M.cq(P)}}).2Q("2n",h(){q M.3A()});b.5y()};B[L][J].4p=B.1T({},B.1V.4p,K);B[L][J].gT="5O"};B.1V.4p={5y:h(){},3A:h(){b.19.4y(b.6Y).1w(b.cu+"-1K "+b.cl+"-1O-1K").5f("4G-1K")},5O:h(L,M){c K=L,J=b;if(2L L=="4Q"){if(M===3H){q b.cq(L)}K={};K[L]=M}B.1L(K,h(N,O){J.4u(N,O)})},cq:h(J){q b.l[J]},4u:h(J,K){b.l[J]=K;if(J=="1K"){b.19[K?"1l":"1w"](b.cu+"-1K "+b.cl+"-1O-1K").1Z("4G-1K",K)}},ea:h(){b.4u("1K",1b)},dV:h(){b.4u("1K",1k)},1A:h(K,L,M){c N=b.l[K],J=(K==b.cD?K:b.cD+K);L=B.jU(L);L.5j=J;b.19.7v(L,M);q!(B.5l(N)&&N.1Y(b.19[0],L,M)===1b||L.jT())}};B.1V.59={1K:1b};B.k.7K={94:h(){c J=b;b.19.2Q("9X."+b.6Y,h(K){q J.g4(K)}).2Q("1F."+b.6Y,h(K){if(J.e2){J.e2=1b;q 1b}});if(B.29.3Y){b.fr=b.19.1Z("6g");b.19.1Z("6g","fL")}b.jX=1b},97:h(){b.19.3q("."+b.6Y);(B.29.3Y&&b.19.1Z("6g",b.fr))},g4:h(L){(b.6K&&b.9e(L));b.bo=L;c J=b,M=(L.jK==1),K=(2L b.l.6a=="4Q"?B(L.1i).4t().23(L.1i).3u(b.l.6a).1n:1b);if(!M||K||!b.7L(L)){q 1k}b.bn=!b.l.76;if(!b.bn){b.jJ=8k(h(){J.bn=1k},b.l.76)}if(b.dZ(L)&&b.dY(L)){b.6K=(b.6I(L)!==1b);if(!b.6K){L.7Y();q 1k}}b.e0=h(N){q J.gQ(N)};b.e1=h(N){q J.9e(N)};B(1m).2Q("fW."+b.6Y,b.e0).2Q("cM."+b.6Y,b.e1);(B.29.9P||L.7Y());q 1k},gQ:h(J){if(B.29.3Y&&!J.3S){q b.9e(J)}if(b.6K){b.62(J);q J.7Y()}if(b.dZ(J)&&b.dY(J)){b.6K=(b.6I(b.bo,J)!==1b);(b.6K?b.62(J):b.9e(J))}q!b.6K},9e:h(J){B(1m).3q("fW."+b.6Y,b.e0).3q("cM."+b.6Y,b.e1);if(b.6K){b.6K=1b;b.e2=1k;b.6T(J)}q 1b},dZ:h(J){q(1o.2T(1o.4e(b.bo.3d-J.3d),1o.4e(b.bo.3l-J.3l))>=b.l.5A)},dY:h(J){q b.bn},6I:h(J){},62:h(J){},6T:h(J){},7L:h(J){q 1k}};B.k.7K.59={6a:1g,5A:1,76:0}})(2t);(h(A){A.1V("k.2g",A.1T({},A.k.7K,{5y:h(){if(b.l.1e=="8q"&&!(/^(?:r|a|f)/).1S(b.19.v("1f"))){b.19[0].3e.1f="21"}(b.l.2U&&b.19.1l(b.l.2U+"-2g"));(b.l.1K&&b.19.1l(b.l.2U+"-2g-1K"));b.94()},3A:h(){if(!b.19.1q("2g")){q}b.19.4y("2g").3q(".2g").1w(b.l.2U+"-2g "+b.l.2U+"-2g-7j "+b.l.2U+"-2g-1K");b.97()},7L:h(B){c C=b.l;if(b.1e||C.1K||A(B.1i).is("."+b.l.2U+"-1r-2D")){q 1b}b.2D=b.fY(B);if(!b.2D){q 1b}q 1k},6I:h(B){c C=b.l;b.1e=b.b9(B);b.92();if(A.k.2v){A.k.2v.5Q=b}b.be();b.4a=b.1e.v("1f");b.1B=b.1e.1B();b.1c=b.19.1c();b.1c={u:b.1c.u-b.3c.u,t:b.1c.t-b.3c.t};A.1T(b.1c,{1F:{t:B.3d-b.1c.t,u:B.3l-b.1c.u},1N:b.ag(),21:b.8A()});b.4w=b.8B(B);b.8D=B.3d;b.8y=B.3l;if(C.al){b.bd(C.al)}if(C.1D){b.bi()}b.1A("2F",B);b.92();if(A.k.2v&&!C.8s){A.k.2v.8v(b,B)}b.1e.1l(C.2U+"-2g-7j");b.62(B,1k);q 1k},62:h(B,D){b.1f=b.8B(B);b.3B=b.52("2k");if(!D){c C=b.6u();b.1A("4P",B,C);b.1f=C.1f}if(!b.l.4r||b.l.4r!="y"){b.1e[0].3e.t=b.1f.t+"3C"}if(!b.l.4r||b.l.4r!="x"){b.1e[0].3e.u=b.1f.u+"3C"}if(A.k.2v){A.k.2v.4P(b,B)}q 1b},6T:h(C){c D=1b;if(A.k.2v&&!b.l.8s){D=A.k.2v.6B(b,C)}if(b.9W){D=b.9W;b.9W=1b}if((b.l.5X=="jb"&&!D)||(b.l.5X=="ja"&&D)||b.l.5X===1k||(A.5l(b.l.5X)&&b.l.5X.1Y(b.19,D))){c B=b;A(b.1e).26(b.4w,1s(b.l.fZ,10),h(){B.1A("3E",C);B.8I()})}1j{b.1A("3E",C);b.8I()}q 1b},fY:h(C){c B=!b.l.2D||!A(b.l.2D,b.19).1n?1k:1b;A(b.l.2D,b.19).3v("*").bc().1L(h(){if(b==C.1i){B=1k}});q B},b9:h(C){c D=b.l;c B=A.5l(D.1e)?A(D.1e.1G(b.19[0],[C])):(D.1e=="7B"?b.19.7B():b.19);if(!B.4t("22").1n){B.2K((D.2K=="1N"?b.19[0].4x:D.2K))}if(B[0]!=b.19[0]&&!(/(5v|2k)/).1S(B.v("1f"))){B.v("1f","2k")}q B},bd:h(B){if(B.t!=3H){b.1c.1F.t=B.t+b.3c.t}if(B.2X!=3H){b.1c.1F.t=b.2C.1a-B.2X+b.3c.t}if(B.u!=3H){b.1c.1F.u=B.u+b.3c.u}if(B.3j!=3H){b.1c.1F.u=b.2C.18-B.3j+b.3c.u}},ag:h(){b.2z=b.1e.2z();c B=b.2z.1c();if(b.4a=="2k"&&b.1B[0]!=1m&&A.k.5g(b.1B[0],b.2z[0])){B.t+=b.1B.24();B.u+=b.1B.2b()}if((b.2z[0]==1m.22&&A.29.cn)||(b.2z[0].5p&&b.2z[0].5p.5T()=="3i"&&A.29.3Y)){B={u:0,t:0}}q{u:B.u+(1s(b.2z.v("6l"),10)||0),t:B.t+(1s(b.2z.v("6s"),10)||0)}},8A:h(){if(b.4a=="21"){c B=b.19.1f();q{u:B.u-(1s(b.1e.v("u"),10)||0)+b.1B.2b(),t:B.t-(1s(b.1e.v("t"),10)||0)+b.1B.24()}}1j{q{u:0,t:0}}},be:h(){b.3c={t:(1s(b.19.v("8l"),10)||0),u:(1s(b.19.v("8j"),10)||0)}},92:h(){b.2C={1a:b.1e.3s(),18:b.1e.31()}},bi:h(){c E=b.l;if(E.1D=="1N"){E.1D=b.1e[0].4x}if(E.1D=="1m"||E.1D=="3D"){b.1D=[0-b.1c.21.t-b.1c.1N.t,0-b.1c.21.u-b.1c.1N.u,A(E.1D=="1m"?1m:3D).1a()-b.2C.1a-b.3c.t,(A(E.1D=="1m"?1m:3D).18()||1m.22.4x.7t)-b.2C.18-b.3c.u]}if(!(/^(1m|3D|1N)$/).1S(E.1D)){c C=A(E.1D)[0];c D=A(E.1D).1c();c B=(A(C).v("3o")!="30");b.1D=[D.t+(1s(A(C).v("6s"),10)||0)-b.3c.t,D.u+(1s(A(C).v("6l"),10)||0)-b.3c.u,D.t+(B?1o.2T(C.9u,C.4Y):C.4Y)-(1s(A(C).v("6s"),10)||0)-b.2C.1a-b.3c.t,D.u+(B?1o.2T(C.7t,C.4J):C.4J)-(1s(A(C).v("6l"),10)||0)-b.2C.18-b.3c.u]}},52:h(E,G){if(!G){G=b.1f}c B=E=="2k"?1:-1;c D=b.l,C=b.4a=="2k"&&!(b.1B[0]!=1m&&A.k.5g(b.1B[0],b.2z[0]))?b.2z:b.1B,F=(/(3i|22)/i).1S(C[0].5p);q{u:(G.u+b.1c.21.u*B+b.1c.1N.u*B-(b.4a=="5v"?-b.1B.2b():(F?0:C.2b()))*B),t:(G.t+b.1c.21.t*B+b.1c.1N.t*B-(b.4a=="5v"?-b.1B.24():F?0:C.24())*B)}},8B:h(D){c H=b.l,E=b.4a=="2k"&&!(b.1B[0]!=1m&&A.k.5g(b.1B[0],b.2z[0]))?b.2z:b.1B,I=(/(3i|22)/i).1S(E[0].5p);if(b.4a=="21"&&!(b.1B[0]!=1m&&b.1B[0]!=b.2z[0])){b.1c.21=b.8A()}c C=D.3d;c B=D.3l;if(b.4w){if(b.1D){if(D.3d-b.1c.1F.t<b.1D[0]){C=b.1D[0]+b.1c.1F.t}if(D.3l-b.1c.1F.u<b.1D[1]){B=b.1D[1]+b.1c.1F.u}if(D.3d-b.1c.1F.t>b.1D[2]){C=b.1D[2]+b.1c.1F.t}if(D.3l-b.1c.1F.u>b.1D[3]){B=b.1D[3]+b.1c.1F.u}}if(H.2N){c G=b.8y+1o.7p((B-b.8y)/H.2N[1])*H.2N[1];B=b.1D?(!(G-b.1c.1F.u<b.1D[1]||G-b.1c.1F.u>b.1D[3])?G:(!(G-b.1c.1F.u<b.1D[1])?G-H.2N[1]:G+H.2N[1])):G;c F=b.8D+1o.7p((C-b.8D)/H.2N[0])*H.2N[0];C=b.1D?(!(F-b.1c.1F.t<b.1D[0]||F-b.1c.1F.t>b.1D[2])?F:(!(F-b.1c.1F.t<b.1D[0])?F-H.2N[0]:F+H.2N[0])):F}}q{u:(B-b.1c.1F.u-b.1c.21.u-b.1c.1N.u+(b.4a=="5v"?-b.1B.2b():(I?0:E.2b()))),t:(C-b.1c.1F.t-b.1c.21.t-b.1c.1N.t+(b.4a=="5v"?-b.1B.24():I?0:E.24()))}},8I:h(){b.1e.1w(b.l.2U+"-2g-7j");if(b.1e[0]!=b.19[0]&&!b.7U){b.1e.2n()}b.1e=1g;b.7U=1b},1A:h(B,C,D){D=D||b.6u();A.k.2R.1Y(b,B,[C,D]);if(B=="4P"){b.3B=b.52("2k")}q A.1V.4p.1A.1Y(b,B,C,D)},7m:{},6u:h(B){q{1e:b.1e,1f:b.1f,af:b.3B,l:b.l}}}));A.1T(A.k.2g,{3J:"1.5b",a6:"4P",59:{2K:"1N",4r:1b,6a:":1v,5O",dW:1b,1D:1b,2U:"k",2r:"2u",al:1g,76:0,5A:1,2N:1b,2D:1b,1e:"8q",9n:1b,2c:1g,8E:1b,5X:1b,fZ:b8,6q:"2u",8w:1k,4j:20,4l:20,66:1b,e5:"7o",fS:20,6H:1b,2I:1g}});A.k.2R.23("2g","dW",{2F:h(B,D){c C=A(b).1q("2g");C.bm=[];A(D.l.dW).1L(h(){A(b+"").1L(h(){if(A.1q(b,"2o")){c E=A.1q(b,"2o");C.bm.4o({1W:E,fV:E.l.5X});E.ba();E.1A("8u",B,C)}})})},3E:h(B,D){c C=A(b).1q("2g");A.1L(C.bm,h(){if(b.1W.6U){b.1W.6U=0;C.7U=1k;b.1W.7U=1b;if(b.fV){b.1W.l.5X=1k}b.1W.6T(B);b.1W.19.fU("jD",[B,A.1T(b.1W.6u(),{gj:C.19})],b.1W.l.dl);b.1W.l.1e=b.1W.l.ed;if(C.l.1e=="8q"){b.1W.1E.v({u:"3k",t:"3k"})}}1j{b.1W.7U=1b;b.1W.1A("8x",B,C)}})},4P:h(C,F){c E=A(b).1q("2g"),B=b;c D=h(I){c O=b.1c.1F.u,M=b.1c.1F.t;c G=b.3B.u,K=b.3B.t;c J=I.18,L=I.1a;c N=I.u,H=I.t;q A.k.6U(G+O,K+M,N,H,J,L)};A.1L(E.bm,h(G){if(D.1Y(E,b.1W.4L)){if(!b.1W.6U){b.1W.6U=1;b.1W.1E=A(B).7B().2K(b.1W.19).1q("2o-2B",1k);b.1W.l.ed=b.1W.l.1e;b.1W.l.1e=h(){q F.1e[0]};C.1i=b.1W.1E[0];b.1W.7L(C,1k);b.1W.6I(C,1k,1k);b.1W.1c.1F.u=E.1c.1F.u;b.1W.1c.1F.t=E.1c.1F.t;b.1W.1c.1N.t-=E.1c.1N.t-b.1W.1c.1N.t;b.1W.1c.1N.u-=E.1c.1N.u-b.1W.1c.1N.u;E.1A("jp",C);E.9W=b.1W.19;b.1W.bv=1k}if(b.1W.1E){b.1W.62(C)}}1j{if(b.1W.6U){b.1W.6U=0;b.1W.7U=1k;b.1W.l.5X=1b;b.1W.6T(C,1k);b.1W.l.1e=b.1W.l.ed;b.1W.1E.2n();if(b.1W.3g){b.1W.3g.2n()}E.1A("jn",C);E.9W=1b}}})}});A.k.2R.23("2g","2r",{2F:h(C,D){c B=A("22");if(B.v("2r")){D.l.8o=B.v("2r")}B.v("2r",D.l.2r)},3E:h(B,C){if(C.l.8o){A("22").v("2r",C.l.8o)}}});A.k.2R.23("2g","9n",{2F:h(B,C){A(C.l.9n===1k?"aM":C.l.9n).1L(h(){A(\'<1R 2w="k-2g-9n" 3e="bZ: #mt;"></1R>\').v({1a:b.4Y+"3C",18:b.4J+"3C",1f:"2k",2c:"0.jt",2I:9A}).v(A(b).1c()).2K("22")})},3E:h(B,C){A("1R.k-2g-9n").1L(h(){b.4x.ab(b)})}});A.k.2R.23("2g","2c",{2F:h(C,D){c B=A(D.1e);if(B.v("2c")){D.l.8r=B.v("2c")}B.v("2c",D.l.2c)},3E:h(B,C){if(C.l.8r){A(C.1e).v("2c",C.l.8r)}}});A.k.2R.23("2g","8w",{2F:h(C,D){c E=D.l;c B=A(b).1q("2g");if(B.1B[0]!=1m&&B.1B[0].5p!="bL"){B.6r=B.1B.1c()}},4P:h(D,E){c F=E.l,C=1b;c B=A(b).1q("2g");if(B.1B[0]!=1m&&B.1B[0].5p!="bL"){if((B.6r.u+B.1B[0].4J)-D.3l<F.4j){B.1B[0].2b=C=B.1B[0].2b+F.4l}1j{if(D.3l-B.6r.u<F.4j){B.1B[0].2b=C=B.1B[0].2b-F.4l}}if((B.6r.t+B.1B[0].4Y)-D.3d<F.4j){B.1B[0].24=C=B.1B[0].24+F.4l}1j{if(D.3d-B.6r.t<F.4j){B.1B[0].24=C=B.1B[0].24-F.4l}}}1j{if(D.3l-A(1m).2b()<F.4j){C=A(1m).2b(A(1m).2b()-F.4l)}1j{if(A(3D).18()-(D.3l-A(1m).2b())<F.4j){C=A(1m).2b(A(1m).2b()+F.4l)}}if(D.3d-A(1m).24()<F.4j){C=A(1m).24(A(1m).24()-F.4l)}1j{if(A(3D).1a()-(D.3d-A(1m).24())<F.4j){C=A(1m).24(A(1m).24()+F.4l)}}}if(C!==1b&&A.k.2v&&!F.8s){A.k.2v.8v(B,D)}}});A.k.2R.23("2g","66",{2F:h(B,D){c C=A(b).1q("2g");C.5u=[];A(D.l.66.4R!=a9?(D.l.66.2H||":1q(2g)"):D.l.66).1L(h(){c F=A(b);c E=F.1c();if(b!=C.19[0]){C.5u.4o({2B:b,1a:F.3s(),18:F.31(),u:E.u,t:E.t})}})},4P:h(M,K){c E=A(b).1q("2g");c Q=K.l.fS;c P=K.af.t,O=P+E.2C.1a,D=K.af.u,C=D+E.2C.18;1Q(c N=E.5u.1n-1;N>=0;N--){c L=E.5u[N].t,J=L+E.5u[N].1a,I=E.5u[N].u,R=I+E.5u[N].18;if(!((L-Q<P&&P<J+Q&&I-Q<D&&D<R+Q)||(L-Q<P&&P<J+Q&&I-Q<C&&C<R+Q)||(L-Q<O&&O<J+Q&&I-Q<D&&D<R+Q)||(L-Q<O&&O<J+Q&&I-Q<C&&C<R+Q))){if(E.5u[N].bl){(E.l.66.fT&&E.l.66.fT.1Y(E.19,M,A.1T(E.6u(),{g0:E.5u[N].2B})))}E.5u[N].bl=1b;6C}if(K.l.e5!="js"){c B=1o.4e(I-C)<=Q;c S=1o.4e(R-D)<=Q;c G=1o.4e(L-O)<=Q;c H=1o.4e(J-P)<=Q;if(B){K.1f.u=E.52("21",{u:I-E.2C.18,t:0}).u}if(S){K.1f.u=E.52("21",{u:R,t:0}).u}if(G){K.1f.t=E.52("21",{u:0,t:L-E.2C.1a}).t}if(H){K.1f.t=E.52("21",{u:0,t:J}).t}}c F=(B||S||G||H);if(K.l.e5!="jr"){c B=1o.4e(I-D)<=Q;c S=1o.4e(R-C)<=Q;c G=1o.4e(L-P)<=Q;c H=1o.4e(J-O)<=Q;if(B){K.1f.u=E.52("21",{u:I,t:0}).u}if(S){K.1f.u=E.52("21",{u:R-E.2C.18,t:0}).u}if(G){K.1f.t=E.52("21",{u:0,t:L}).t}if(H){K.1f.t=E.52("21",{u:0,t:J-E.2C.1a}).t}}if(!E.5u[N].bl&&(B||S||G||H||F)){(E.l.66.66&&E.l.66.66.1Y(E.19,M,A.1T(E.6u(),{g0:E.5u[N].2B})))}E.5u[N].bl=(B||S||G||H||F)}}});A.k.2R.23("2g","6H",{2F:h(B,C){c D=A.fa(A(C.l.6H.7r)).8N(h(F,E){q(1s(A(F).v("2I"),10)||C.l.6H.3K)-(1s(A(E).v("2I"),10)||C.l.6H.3K)});A(D).1L(h(E){b.3e.2I=C.l.6H.3K+E});b[0].3e.2I=C.l.6H.3K+D.1n}});A.k.2R.23("2g","2I",{2F:h(C,D){c B=A(D.1e);if(B.v("2I")){D.l.7W=B.v("2I")}B.v("2I",D.l.2I)},3E:h(B,C){if(C.l.7W){A(C.1e).v("2I",C.l.7W)}}})})(2t);(h(A){A.1V("k.56",{5y:h(){c C=b.l,B=C.4W;b.5Z=0;b.7a=1;b.l.4W=b.l.4W&&A.5l(b.l.4W)?b.l.4W:h(D){q D.is(B)};b.7E={1a:b.19[0].4Y,18:b.19[0].4J};A.k.2v.7e[b.l.6q]=A.k.2v.7e[b.l.6q]||[];A.k.2v.7e[b.l.6q].4o(b);(b.l.2U&&b.19.1l(b.l.2U+"-56"))},3A:h(){c B=A.k.2v.7e[b.l.6q];1Q(c C=0;C<B.1n;C++){if(B[C]==b){B.bB(C,1)}}b.19.1w(b.l.2U+"-56 "+b.l.2U+"-56-1K").4y("56").3q(".56")},4u:h(B,C){if(B=="4W"){b.l.4W=C&&A.5l(C)?C:h(D){q D.is(4W)}}1j{A.1V.4p.4u.1G(b,1C)}},ga:h(B){c C=A.k.2v.5Q;A.k.2R.1Y(b,"8u",[B,b.k(C)]);(C&&b.1A("8u",B,b.k(C)))},g7:h(B){c C=A.k.2v.5Q;A.k.2R.1Y(b,"8x",[B,b.k(C)]);(C&&b.1A("8x",B,b.k(C)))},dI:h(B){c C=A.k.2v.5Q;if(!C||(C.1E||C.19)[0]==b.19[0]){q}if(b.l.4W.1Y(b.19,(C.1E||C.19))){A.k.2R.1Y(b,"5t",[B,b.k(C)]);b.1A("5t",B,b.k(C))}},dC:h(B){c C=A.k.2v.5Q;if(!C||(C.1E||C.19)[0]==b.19[0]){q}if(b.l.4W.1Y(b.19,(C.1E||C.19))){A.k.2R.1Y(b,"8J",[B,b.k(C)]);b.1A("8J",B,b.k(C))}},gb:h(C,B){c D=B||A.k.2v.5Q;if(!D||(D.1E||D.19)[0]==b.19[0]){q 1b}c E=1b;b.19.3v(":1q(56)").6W("."+D.l.2U+"-2g-7j").1L(h(){c F=A.1q(b,"56");if(F.l.dA&&A.k.9c(D,A.1T(F,{1c:F.19.1c()}),F.l.5V)){E=1k;q 1b}});if(E){q 1b}if(b.l.4W.1Y(b.19,(D.1E||D.19))){A.k.2R.1Y(b,"6B",[C,b.k(D)]);b.1A("6B",C,b.k(D));q b.19}q 1b},7m:{},k:h(B){q{2g:(B.1E||B.19),1e:B.1e,1f:B.1f,af:B.3B,l:b.l,19:b.19}}});A.1T(A.k.56,{3J:"1.5b",a6:"6B",59:{4W:"*",9x:1g,2U:"k",dA:1b,9w:1g,6q:"2u",5V:"9c"}});A.k.9c=h(L,E,M){if(!E.1c){q 1b}c D=(L.3B||L.1f.2k).t,C=D+L.2C.1a,N=(L.3B||L.1f.2k).u,K=N+L.2C.18;c F=E.1c.t,B=F+E.7E.1a,O=E.1c.u,J=O+E.7E.18;4B(M){1t"fJ":q(F<D&&C<B&&O<N&&K<J);1x;1t"9c":q(F<D+(L.2C.1a/2)&&C-(L.2C.1a/2)<B&&O<N+(L.2C.18/2)&&K-(L.2C.18/2)<J);1x;1t"bb":c G=((L.3B||L.1f.2k).t+(L.g1||L.1c.1F).t),H=((L.3B||L.1f.2k).u+(L.g1||L.1c.1F).u),I=A.k.6U(H,G,O,F,E.7E.18,E.7E.1a);q I;1x;1t"cH":q((N>=O&&N<=J)||(K>=O&&K<=J)||(N<O&&K>J))&&((D>=F&&D<=B)||(C>=F&&C<=B)||(D<F&&C>B));1x;2u:q 1b;1x}};A.k.2v={5Q:1g,7e:{"2u":[]},8v:h(E,G){c B=A.k.2v.7e[E.l.6q];c F=G?G.5j:1g;c H=(E.1E||E.19).3v(":1q(56)").bc();g8:1Q(c D=0;D<B.1n;D++){if(B[D].l.1K||(E&&!B[D].l.4W.1Y(B[D].19,(E.1E||E.19)))){6C}1Q(c C=0;C<H.1n;C++){if(H[C]==B[D].19[0]){B[D].7E.18=0;6C g8}}B[D].5L=B[D].19.v("61")!="78";if(!B[D].5L){6C}B[D].1c=B[D].19.1c();B[D].7E={1a:B[D].19[0].4Y,18:B[D].19[0].4J};if(F=="jE"||F=="jF"){B[D].ga.1Y(B[D],G)}}},6B:h(C,B){c D=1b;A.1L(A.k.2v.7e[C.l.6q],h(){if(!b.l){q}if(!b.l.1K&&b.5L&&A.k.9c(C,b,b.l.5V)){D=b.gb.1Y(b,B)}if(!b.l.1K&&b.5L&&b.l.4W.1Y(b.19,(C.1E||C.19))){b.7a=1;b.5Z=0;b.g7.1Y(b,B)}});q D},4P:h(C,B){if(C.l.8E){A.k.2v.8v(C,B)}A.1L(A.k.2v.7e[C.l.6q],h(){if(b.l.1K||b.g2||!b.5L){q}c D=A.k.9c(C,b,b.l.5V);c G=!D&&b.5Z==1?"7a":(D&&b.5Z==0?"5Z":1g);if(!G){q}c F;if(b.l.dA){c E=b.19.4t(":1q(56):eq(0)");if(E.1n){F=A.1q(E[0],"56");F.g2=(G=="5Z"?1:0)}}if(F&&G=="5Z"){F.5Z=0;F.7a=1;F.dC.1Y(F,B)}b[G]=1;b[G=="7a"?"5Z":"7a"]=0;b[G=="5Z"?"dI":"dC"].1Y(b,B);if(F&&G=="7a"){F.7a=0;F.5Z=1;F.dI.1Y(F,B)}})}};A.k.2R.23("56","9x",{8u:h(B,C){A(b).1l(C.l.9x)},8x:h(B,C){A(b).1w(C.l.9x)},6B:h(B,C){A(b).1w(C.l.9x)}});A.k.2R.23("56","9w",{5t:h(B,C){A(b).1l(C.l.9w)},8J:h(B,C){A(b).1w(C.l.9w)},6B:h(B,C){A(b).1w(C.l.9w)}})})(2t);(h(B){B.1V("k.1r",B.1T({},B.k.7K,{5y:h(){c M=b,N=b.l;c Q=b.19.v("1f");b.et=b.19;b.19.1l("k-1r").v({1f:/5U/.1S(Q)?"21":Q});B.1T(N,{aj:!!(N.65),1e:N.1e||N.5c||N.26?N.1e||"k-1r-1e":1g,6E:N.6E===1k?"k-1r-9J-2D":N.6E});c I="bk fO #j3";N.fy={"k-1r":{61:"8b"},"k-1r-2D":{1f:"2k",bZ:"#fP",gl:"0.bk"},"k-1r-n":{2r:"n-2m",18:"5F",t:"3z",2X:"3z",dL:I},"k-1r-s":{2r:"s-2m",18:"5F",t:"3z",2X:"3z",dR:I},"k-1r-e":{2r:"e-2m",1a:"5F",u:"3z",3j:"3z",dN:I},"k-1r-w":{2r:"w-2m",1a:"5F",u:"3z",3j:"3z",dK:I},"k-1r-3Z":{2r:"3Z-2m",1a:"5F",18:"5F",dN:I,dR:I},"k-1r-4s":{2r:"4s-2m",1a:"5F",18:"5F",dR:I,dK:I},"k-1r-ne":{2r:"ne-2m",1a:"5F",18:"5F",dN:I,dL:I},"k-1r-4v":{2r:"4v-2m",1a:"5F",18:"5F",dK:I,dL:I}};N.ez={"k-1r-2D":{bZ:"#fP",er:"bk fO #ji",18:"fw",1a:"fw"},"k-1r-n":{2r:"n-2m",u:"3z",t:"45%"},"k-1r-s":{2r:"s-2m",3j:"3z",t:"45%"},"k-1r-e":{2r:"e-2m",2X:"3z",u:"45%"},"k-1r-w":{2r:"w-2m",t:"3z",u:"45%"},"k-1r-3Z":{2r:"3Z-2m",2X:"3z",3j:"3z"},"k-1r-4s":{2r:"4s-2m",t:"3z",3j:"3z"},"k-1r-4v":{2r:"4v-2m",t:"3z",u:"3z"},"k-1r-ne":{2r:"ne-2m",2X:"3z",u:"3z"}};N.ey=b.19[0].3m;if(N.ey.3G(/jk|aa|1v|4S|3S|8P/i)){c D=b.19;if(/21/.1S(D.v("1f"))&&B.29.8Z){D.v({1f:"21",u:"3k",t:"3k"})}D.9K(B(\'<1R 2w="k-9l"	3e="3o: 30;"></1R>\').v({1f:D.v("1f"),1a:D.3s(),18:D.31(),u:D.v("u"),t:D.v("t")}));c K=b.19;b.19=b.19.1N();b.19.1q("1r",b);b.19.v({8l:K.v("8l"),8j:K.v("8j"),bh:K.v("bh"),bg:K.v("bg")});K.v({8l:0,8j:0,bh:0,bg:0});if(B.29.9P&&N.7Y){K.v("2m","78")}N.6o=K.v({1f:"5U",gr:1,61:"8b"});b.19.v({60:K.v("60")});b.9D()}if(!N.2M){N.2M=!B(".k-1r-2D",b.19).1n?"e,s,3Z":{n:".k-1r-n",e:".k-1r-e",s:".k-1r-s",w:".k-1r-w",3Z:".k-1r-3Z",4s:".k-1r-4s",ne:".k-1r-ne",4v:".k-1r-4v"}}if(N.2M.4R==a9){N.2I=N.2I||9A;if(N.2M=="3b"){N.2M="n,e,s,w,3Z,4s,ne,4v"}c P=N.2M.9a(",");N.2M={};c J={2D:"1f: 2k; 61: 78; 3o:30;",n:"u: 7C; 1a:3n%;",e:"2X: 7C; 18:3n%;",s:"3j: 7C; 1a:3n%;",w:"t: 7C; 18:3n%;",3Z:"3j: 7C; 2X: 3z;",4s:"3j: 7C; t: 3z;",ne:"u: 7C; 2X: 3z;",4v:"u: 7C; t: 3z;"};1Q(c R=0;R<P.1n;R++){c O=B.f6(P[R]),L=N.fy,H="k-1r-"+O,F=!B.k.v(H)&&!N.6E,S=B.k.v("k-1r-9J-2D"),T=B.1T(L[H],L["k-1r-2D"]),E=B.1T(N.ez[H],!S?N.ez["k-1r-2D"]:{});c U=/4s|3Z|ne|4v/.1S(O)?{2I:++N.2I}:{};c C=(F?J[O]:""),G=B([\'<1R 2w="k-1r-2D \',H,\'" 3e="\',C,J.2D,\'"></1R>\'].5W("")).v(U);if("3Z"==O){G.1l("k-3U k-3U-je-f7-3Z")}N.2M[O]=".k-1r-"+O;b.19.6A(G.v(F?T:{}).v(N.6E?E:{}).1l(N.6E?"k-1r-9J-2D":"").1l(N.6E))}if(N.6E){b.19.1l("k-1r-9J").v(!B.k.v("k-1r-9J")?{}:{})}}b.fz=h(Z){Z=Z||b.19;1Q(c V in N.2M){if(N.2M[V].4R==a9){N.2M[V]=B(N.2M[V],b.19).1I()}if(N.7c){N.2M[V].v({2c:0})}if(b.19.is(".k-9l")&&N.ey.3G(/aa|1v|4S|3S/i)){c X=B(N.2M[V],b.19),Y=0;Y=/4s|ne|4v|3Z|n|s/.1S(V)?X.31():X.3s();c W=["ex",/ne|4v|n/.1S(V)?"k9":/3Z|4s|s/.1S(V)?"ka":/^e$/.1S(V)?"kb":"k8"].5W("");if(!N.7c){Z.v(W,Y)}b.9D()}if(!B(N.2M[V]).1n){6C}}};b.fz(b.19);N.9i=B(".k-1r-2D",M.19);if(N.7J){N.9i.7J()}N.9i.b3(h(){if(!N.bu){if(b.6f){c V=b.6f.3G(/k-1r-(3Z|4s|ne|4v|n|e|s|w)/i)}M.4r=N.4r=V&&V[1]?V[1]:"3Z"}});if(N.ft){N.9i.1P();B(M.19).1l("k-1r-eH").44(h(){B(b).1w("k-1r-eH");N.9i.1I()},h(){if(!N.bu){B(b).1l("k-1r-eH");N.9i.1P()}})}b.94()},3A:h(){c D=b.19,C=D.6v(".k-1r").5w(0);b.97();c E=h(F){B(F).1w("k-1r k-1r-1K").4y("1r").3q(".1r").3v(".k-1r-2D").2n()};E(D);if(D.is(".k-9l")&&C){D.1N().6A(B(C).v({1f:D.v("1f"),1a:D.3s(),18:D.31(),u:D.v("u"),t:D.v("t")})).4I().2n();E(C)}},7L:h(E){if(b.l.1K){q 1b}c C=1b;1Q(c D in b.l.2M){if(B(b.l.2M[D])[0]==E.1i){C=1k}}if(!C){q 1b}q 1k},6I:h(C){c E=b.l,J=b.19.1f(),D=b.19,H=h(O){q 1s(O,10)||0},G=B.29.3Y&&B.29.3J<7;E.bu=1k;E.ei={u:B(1m).2b(),t:B(1m).24()};if(D.is(".k-2g")||(/2k/).1S(D.v("1f"))){c M=B.29.3Y&&!E.1D&&(/2k/).1S(D.v("1f"))&&!(/21/).1S(D.1N().v("1f"));c L=M?E.ei.u:0,F=M?E.ei.t:0;D.v({1f:"2k",u:(J.u+L),t:(J.t+F)})}if(B.29.8Z&&(/21/).1S(D.v("1f"))){D.v({1f:"21",u:"3k",t:"3k"})}b.fs();c N=H(b.1e.v("t")),I=H(b.1e.v("u"));if(E.1D){N+=B(E.1D).24()||0;I+=B(E.1D).2b()||0}b.1c=b.1e.1c();b.1f={t:N,u:I};b.1H=E.1e||G?{1a:D.3s(),18:D.31()}:{1a:D.1a(),18:D.18()};b.5M=E.1e||G?{1a:D.3s(),18:D.31()}:{1a:D.1a(),18:D.18()};b.4w={t:N,u:I};b.6d={1a:D.3s()-D.1a(),18:D.31()-D.18()};b.fv={t:C.3d,u:C.3l};E.65=(2L E.65=="8C")?E.65:((b.5M.1a/b.5M.18)||1);if(E.eh){c K=B(".k-1r-"+b.4r).v("2r");B("22").v("2r",K=="3k"?b.4r+"-2m":K)}b.aG("2F",C);q 1k},62:h(C){c E=b.1e,F=b.l,K={},N=b,G=b.fv,L=b.4r;c O=(C.3d-G.t)||0,M=(C.3l-G.u)||0;c J=b.4U[L];if(!J){q 1b}c I=J.1G(b,[C,O,M]),H=B.29.3Y&&B.29.3J<7,D=b.6d;if(F.aj||C.99){I=b.fu(I,C)}I=b.fq(I,C);b.aG("2m",C);E.v({u:b.1f.u+"3C",t:b.1f.t+"3C",1a:b.1H.1a+"3C",18:b.1H.18+"3C"});if(!F.1e&&F.6o){b.9D()}b.eG(I);b.1A("2m",C,b.k());q 1b},6T:h(E){b.l.bu=1b;c G=b.l,J=h(N){q 1s(N,10)||0},L=b;if(G.1e){c F=G.6o,D=F&&(/aa/i).1S(F.5w(0).3m),C=D&&B.k.aC(F.5w(0),"t")?0:L.6d.18,I=D?0:L.6d.1a;c M={1a:(L.1H.1a-I),18:(L.1H.18-C)},H=(1s(L.19.v("t"),10)+(L.1f.t-L.4w.t))||1g,K=(1s(L.19.v("u"),10)+(L.1f.u-L.4w.u))||1g;if(!G.26){b.19.v(B.1T(M,{u:K,t:H}))}if(G.1e&&!G.26){b.9D()}}if(G.eh){B("22").v("2r","3k")}b.aG("3E",E);if(G.1e){b.1e.2n()}q 1b},eG:h(C){c D=b.l;b.1c=b.1e.1c();if(C.t){b.1f.t=C.t}if(C.u){b.1f.u=C.u}if(C.18){b.1H.18=C.18}if(C.1a){b.1H.1a=C.1a}},fu:h(F,E){c G=b.l,H=b.1f,D=b.1H,C=b.4r;if(F.18){F.1a=(D.18*G.65)}1j{if(F.1a){F.18=(D.1a/G.65)}}if(C=="4s"){F.t=H.t+(D.1a-F.1a);F.u=1g}if(C=="4v"){F.u=H.u+(D.18-F.18);F.t=H.t+(D.1a-F.1a)}q F},fq:h(J,E){c G=b.1e,H=b.l,Q=H.aj||E.99,N=b.4r,O=J.1a&&H.6X&&H.6X<J.1a,F=J.18&&H.6Z&&H.6Z<J.18,K=J.1a&&H.6x&&H.6x>J.1a,P=J.18&&H.5h&&H.5h>J.18;if(K){J.1a=H.6x}if(P){J.18=H.5h}if(O){J.1a=H.6X}if(F){J.18=H.6Z}c D=b.4w.t+b.5M.1a,M=b.1f.u+b.1H.18;c I=/4s|4v|w/.1S(N),C=/4v|ne|n/.1S(N);if(K&&I){J.t=D-H.6x}if(O&&I){J.t=D-H.6X}if(P&&C){J.u=M-H.5h}if(F&&C){J.u=M-H.6Z}c L=!J.1a&&!J.18;if(L&&!J.t&&J.u){J.u=1g}1j{if(L&&!J.u&&J.t){J.t=1g}}q J},9D:h(){c G=b.l;if(!G.6o){q}c E=G.6o,D=b.1e||b.19;if(!G.9j){c C=[E.v("6l"),E.v("bp"),E.v("bq"),E.v("6s")],F=[E.v("da"),E.v("dt"),E.v("dr"),E.v("dq")];G.9j=B.79(C,h(H,J){c I=1s(H,10)||0,K=1s(F[J],10)||0;q I+K})}if(B.29.3Y&&!A(D)){q}E.v({18:(D.18()-G.9j[0]-G.9j[2])||0,1a:(D.1a()-G.9j[1]-G.9j[3])||0})},fs:h(){c D=b.19,F=b.l;b.8X=D.1c();if(F.1e){b.1e=b.1e||B(\'<1R 3e="3o:30;"></1R>\');c C=B.29.3Y&&B.29.3J<7,G=(C?1:0),E=(C?2:-1);b.1e.1l(F.1e).v({1a:D.3s()+E,18:D.31()+E,1f:"2k",t:b.8X.t-G+"3C",u:b.8X.u-G+"3C",2I:++F.2I});b.1e.2K("22");if(F.7J){b.1e.7J()}}1j{b.1e=D}},4U:{e:h(E,D,C){q{1a:b.5M.1a+D}},w:h(F,D,C){c H=b.l,E=b.5M,G=b.4w;q{t:G.t+D,1a:E.1a-D}},n:h(F,D,C){c H=b.l,E=b.5M,G=b.4w;q{u:G.u+C,18:E.18-C}},s:h(E,D,C){q{18:b.5M.18+C}},3Z:h(E,D,C){q B.1T(b.4U.s.1G(b,1C),b.4U.e.1G(b,[E,D,C]))},4s:h(E,D,C){q B.1T(b.4U.s.1G(b,1C),b.4U.w.1G(b,[E,D,C]))},ne:h(E,D,C){q B.1T(b.4U.n.1G(b,1C),b.4U.e.1G(b,[E,D,C]))},4v:h(E,D,C){q B.1T(b.4U.n.1G(b,1C),b.4U.w.1G(b,[E,D,C]))}},aG:h(D,C){B.k.2R.1Y(b,D,[C,b.k()]);(D!="2m"&&b.1A(D,C,b.k()))},7m:{},k:h(){q{et:b.et,19:b.19,1e:b.1e,1f:b.1f,1H:b.1H,l:b.l,5M:b.5M,4w:b.4w}}}));B.1T(B.k.1r,{3J:"1.5b",a6:"2m",59:{4O:1b,26:1b,fC:"cc",fD:"9v",65:1b,ft:1b,6a:":1v,5O",1D:1b,76:0,7J:1k,5A:1,5c:1b,2N:1b,6E:1b,6Z:1g,6X:1g,5h:10,6x:10,eh:1k,7Y:1k,6o:1b,7c:1b}});B.k.2R.23("1r","4O",{2F:h(D,E){c F=E.l,C=B(b).1q("1r"),G=h(H){B(H).1L(h(){B(b).1q("1r-ep",{1a:1s(B(b).1a(),10),18:1s(B(b).18(),10),t:1s(B(b).v("t"),10),u:1s(B(b).v("u"),10)})})};if(2L(F.4O)=="7z"&&!F.4O.4x){if(F.4O.1n){F.4O=F.4O[0];G(F.4O)}1j{B.1L(F.4O,h(H,I){G(H)})}}1j{G(F.4O)}},2m:h(D,G){c H=G.l,C=B(b).1q("1r"),F=C.5M,J=C.4w;c I={18:(C.1H.18-F.18)||0,1a:(C.1H.1a-F.1a)||0,u:(C.1f.u-J.u)||0,t:(C.1f.t-J.t)||0},E=h(K,L){B(K).1L(h(){c O=B(b),P=B(b).1q("1r-ep"),N={},M=L&&L.1n?L:["1a","18","u","t"];B.1L(M||["1a","18","u","t"],h(Q,S){c R=(P[S]||0)+(I[S]||0);if(R&&R>=0){N[S]=R||1g}});if(/21/.1S(O.v("1f"))&&B.29.8Z){C.eg=1k;O.v({1f:"2k",u:"3k",t:"3k"})}O.v(N)})};if(2L(H.4O)=="7z"&&!H.4O.h6){B.1L(H.4O,h(K,L){E(K,L)})}1j{E(H.4O)}},3E:h(D,E){c C=B(b).1q("1r");if(C.eg&&B.29.8Z){C.eg=1b;el.v({1f:"21"})}B(b).4y("1r-ep-2F")}});B.k.2R.23("1r","26",{3E:h(F,L){c H=L.l,M=B(b).1q("1r");c G=H.6o,D=G&&(/aa/i).1S(G.5w(0).3m),C=D&&B.k.aC(G.5w(0),"t")?0:M.6d.18,J=D?0:M.6d.1a;c E={1a:(M.1H.1a-J),18:(M.1H.18-C)},I=(1s(M.19.v("t"),10)+(M.1f.t-M.4w.t))||1g,K=(1s(M.19.v("u"),10)+(M.1f.u-M.4w.u))||1g;M.19.26(B.1T(E,K&&I?{u:K,t:I}:{}),{1M:H.fC,1X:H.fD,7s:h(){c N={1a:1s(M.19.v("1a"),10),18:1s(M.19.v("18"),10),u:1s(M.19.v("u"),10),t:1s(M.19.v("t"),10)};if(G){G.v({1a:N.1a,18:N.18})}M.eG(N);M.aG("2m",F)}})}});B.k.2R.23("1r","1D",{2F:h(E,K){c I=K.l,N=B(b).1q("1r"),G=N.19;c D=I.1D,H=(D k1 B)?D.5w(0):(/1N/.1S(D))?G.1N().5w(0):D;if(!H){q}N.cC=B(H);if(/1m/.1S(D)||D==1m){N.aL={t:0,u:0};N.br={t:0,u:0};N.9m={19:B(1m),t:0,u:0,1a:B(1m).1a(),18:B(1m).18()||1m.22.4x.7t}}1j{N.aL=B(H).1c();N.br=B(H).1f();N.bt={18:B(H).aF(),1a:B(H).aU()};c L=N.aL,C=N.bt.18,J=N.bt.1a,F=(B.k.aC(H,"t")?H.9u:J),M=(B.k.aC(H)?H.7t:C);N.9m={19:H,t:L.t,u:L.u,1a:F,18:M}}},2m:h(E,K){c G=K.l,O=B(b).1q("1r"),D=O.bt,L=O.aL,I=O.1H,J=O.1f,N=G.aj||E.99,C={u:0,t:0},F=O.cC;if(F[0]!=1m&&(/5U/).1S(F.v("1f"))){C=O.br}if(J.t<(G.1e?L.t:0)){O.1H.1a=O.1H.1a+(G.1e?(O.1f.t-L.t):(O.1f.t-C.t));if(N){O.1H.18=O.1H.1a/G.65}O.1f.t=G.1e?L.t:0}if(J.u<(G.1e?L.u:0)){O.1H.18=O.1H.18+(G.1e?(O.1f.u-L.u):O.1f.u);if(N){O.1H.1a=O.1H.18*G.65}O.1f.u=G.1e?L.u:0}c H=1o.4e((G.1e?O.1c.t-C.t:(O.1c.t-C.t))+O.6d.1a),M=1o.4e((G.1e?O.1c.u-C.u:(O.1c.u-L.u))+O.6d.18);if(H+O.1H.1a>=O.9m.1a){O.1H.1a=O.9m.1a-H;if(N){O.1H.18=O.1H.1a/G.65}}if(M+O.1H.18>=O.9m.18){O.1H.18=O.9m.18-M;if(N){O.1H.1a=O.1H.18*G.65}}},3E:h(D,J){c F=J.l,M=B(b).1q("1r"),I=M.1f,K=M.aL,C=M.br,E=M.cC;c H=B(M.1e),N=H.1c(),L=H.3s()-M.6d.1a,G=H.31()-M.6d.18;if(F.1e&&!F.26&&(/21/).1S(E.v("1f"))){B(b).v({t:N.t-C.t-K.t,1a:L,18:G})}if(F.1e&&!F.26&&(/5U/).1S(E.v("1f"))){B(b).v({t:N.t-C.t-K.t,1a:L,18:G})}}});B.k.2R.23("1r","5c",{2F:h(E,F){c G=F.l,C=B(b).1q("1r"),H=G.6o,D=C.1H;if(!H){C.5c=C.19.7B()}1j{C.5c=H.7B()}C.5c.v({2c:0.25,61:"8b",1f:"21",18:D.18,1a:D.1a,60:0,t:0,u:0}).1l("k-1r-5c").1l(2L G.5c=="4Q"?G.5c:"");C.5c.2K(C.1e)},2m:h(D,E){c F=E.l,C=B(b).1q("1r"),G=F.6o;if(C.5c){C.5c.v({1f:"21",18:C.1H.18,1a:C.1H.1a})}},3E:h(D,E){c F=E.l,C=B(b).1q("1r"),G=F.6o;if(C.5c&&C.1e){C.1e.5w(0).ab(C.5c.5w(0))}}});B.k.2R.23("1r","2N",{2m:h(C,K){c F=K.l,M=B(b).1q("1r"),I=M.1H,G=M.5M,H=M.4w,L=M.4r,J=F.aj||C.99;F.2N=2L F.2N=="8C"?[F.2N,F.2N]:F.2N;c E=1o.7p((I.1a-G.1a)/(F.2N[0]||1))*(F.2N[0]||1),D=1o.7p((I.18-G.18)/(F.2N[1]||1))*(F.2N[1]||1);if(/^(3Z|s|e)$/.1S(L)){M.1H.1a=G.1a+E;M.1H.18=G.18+D}1j{if(/^(ne)$/.1S(L)){M.1H.1a=G.1a+E;M.1H.18=G.18+D;M.1f.u=H.u-D}1j{if(/^(4s)$/.1S(L)){M.1H.1a=G.1a+E;M.1H.18=G.18+D;M.1f.t=H.t-E}1j{M.1H.1a=G.1a+E;M.1H.18=G.18+D;M.1f.u=H.u-D;M.1f.t=H.t-E}}}}});h A(C){q!(B(C).is(":30")||B(C).4t(":30").1n)}})(2t);(h(A){A.1V("k.58",A.1T({},A.k.7K,{5y:h(){c C=b;b.19.1l("k-58");b.cz=1b;c B;b.ar=h(){B=A(C.l.3u,C.19[0]);B.1L(h(){c D=A(b);c E=D.1c();A.1q(b,"58-2B",{19:b,$19:D,t:E.t,u:E.u,2X:E.t+D.3s(),3j:E.u+D.31(),7S:1b,1U:D.4m("k-1U"),4f:D.4m("k-4f"),3Q:D.4m("k-3Q")})})};b.ar();b.bj=B.1l("k-jL");b.94();b.1e=A(1m.gD("1R")).v({er:"bk jR hf"}).1l("k-58-1e")},3A:h(){b.19.1w("k-58 k-58-1K").4y("58").3q(".58");b.97()},6I:h(D){c B=b;b.cy=[D.3d,D.3l];if(b.l.1K){q}c C=b.l;b.bj=A(C.3u,b.19[0]);b.1A("2F",D);A("22").6A(b.1e);b.1e.v({"z-3N":3n,1f:"2k",t:D.h3,u:D.jS,1a:0,18:0});if(C.fE){b.ar()}b.bj.3u(".k-1U").1L(h(){c E=A.1q(b,"58-2B");E.7S=1k;if(!D.4M){E.$19.1w("k-1U");E.1U=1b;E.$19.1l("k-3Q");E.3Q=1k;B.1A("3Q",D,{3Q:E.19})}});A(D.1i).4t().bc().1L(h(){c E=A.1q(b,"58-2B");if(E){E.$19.1w("k-3Q").1l("k-4f");E.3Q=1b;E.4f=1k;E.1U=1k;B.1A("4f",D,{4f:E.19});q 1b}})},62:h(I){c C=b;b.cz=1k;if(b.l.1K){q}c G=b.l;c D=b.cy[0],H=b.cy[1],B=I.3d,F=I.3l;if(D>B){c E=B;B=D;D=E}if(H>F){c E=F;F=H;H=E}b.1e.v({t:D,u:H,1a:B-D,18:F-H});b.bj.1L(h(){c J=A.1q(b,"58-2B");if(!J||J.19==C.19[0]){q}c K=1b;if(G.5V=="cH"){K=(!(J.t>B||J.2X<D||J.u>F||J.3j<H))}1j{if(G.5V=="fJ"){K=(J.t>D&&J.2X<B&&J.u>H&&J.3j<F)}}if(K){if(J.1U){J.$19.1w("k-1U");J.1U=1b}if(J.3Q){J.$19.1w("k-3Q");J.3Q=1b}if(!J.4f){J.$19.1l("k-4f");J.4f=1k;C.1A("4f",I,{4f:J.19})}}1j{if(J.4f){if(I.4M&&J.7S){J.$19.1w("k-4f");J.4f=1b;J.$19.1l("k-1U");J.1U=1k}1j{J.$19.1w("k-4f");J.4f=1b;if(J.7S){J.$19.1l("k-3Q");J.3Q=1k}C.1A("3Q",I,{3Q:J.19})}}if(J.1U){if(!I.4M&&!J.7S){J.$19.1w("k-1U");J.1U=1b;J.$19.1l("k-3Q");J.3Q=1k;C.1A("3Q",I,{3Q:J.19})}}}});q 1b},6T:h(D){c B=b;b.cz=1b;c C=b.l;A(".k-3Q",b.19[0]).1L(h(){c E=A.1q(b,"58-2B");E.$19.1w("k-3Q");E.3Q=1b;E.7S=1b;B.1A("fI",D,{fI:E.19})});A(".k-4f",b.19[0]).1L(h(){c E=A.1q(b,"58-2B");E.$19.1w("k-4f").1l("k-1U");E.4f=1b;E.1U=1k;E.7S=1k;B.1A("1U",D,{1U:E.19})});b.1A("3E",D);b.1e.2n();q 1b}}));A.1T(A.k.58,{3J:"1.5b",59:{2K:"22",fE:1k,6a:":1v,5O",76:0,5A:0,3u:"*",5V:"cH"}})})(2t);(h(A){A.1V("k.2o",A.1T({},A.k.7K,{5y:h(){c B=b.l;b.4L={};(b.l.2U&&b.19.1l(b.l.2U+"-2o"));b.ar();b.7Q=b.2H.1n?(/t|2X/).1S(b.2H[0].2B.v("eo")):1b;b.1c=b.19.1c();b.94()},3A:h(){b.19.1w(b.l.2U+"-2o "+b.l.2U+"-2o-1K").4y("2o").3q(".2o");b.97();1Q(c B=b.2H.1n-1;B>=0;B--){b.2H[B].2B.4y("2o-2B")}},7L:h(F,B){if(b.bf){q 1b}if(b.l.1K||b.l.5j=="5U"){q 1b}b.ba(F);c E=1g,D=b,C=A(F.1i).4t().1L(h(){if(A.1q(b,"2o-2B")==D){E=A(b);q 1b}});if(A.1q(F.1i,"2o-2B")==D){E=A(F.1i)}if(!E){q 1b}if(b.l.2D&&!B){c G=1b;A(b.l.2D,E).3v("*").bc().1L(h(){if(b==F.1i){G=1k}});if(!G){q 1b}}b.1E=E;b.gK();q 1k},6I:h(E,B,D){c F=b.l;b.9q=b;b.8E();b.1e=b.b9(E);b.92();b.be();b.1B=b.1e.1B();b.1c=b.1E.1c();b.1c={u:b.1c.u-b.3c.u,t:b.1c.t-b.3c.t};b.1e.v("1f","2k");b.4a=b.1e.v("1f");A.1T(b.1c,{1F:{t:E.3d-b.1c.t,u:E.3l-b.1c.u},1N:b.ag(),21:b.8A()});b.4w=b.8B(E);b.8D=E.3d;b.8y=E.3l;if(F.al){b.bd(F.al)}b.8G={48:b.1E.48()[0],1N:b.1E.1N()[0]};if(b.1e[0]!=b.1E[0]){b.1E.1P()}b.gC();if(F.1D){b.bi()}b.1A("2F",E);if(!b.jV){b.92()}if(!D){1Q(c C=b.2i.1n-1;C>=0;C--){b.2i[C].1A("8u",E,b)}}if(A.k.2v){A.k.2v.5Q=b}if(A.k.2v&&!F.8s){A.k.2v.8v(b,E)}b.7j=1k;b.1e.1l(F.2U+"-2o-1e");b.62(E);q 1k},62:h(E){b.1f=b.8B(E);b.3B=b.52("2k");if(!b.av){b.av=b.3B}A.k.2R.1Y(b,"8N",[E,b.6u()]);b.3B=b.52("2k");if(!b.l.4r||b.l.4r!="y"){b.1e[0].3e.t=b.1f.t+"3C"}if(!b.l.4r||b.l.4r!="x"){b.1e[0].3e.u=b.1f.u+"3C"}1Q(c C=b.2H.1n-1;C>=0;C--){c D=b.2H[C],B=D.2B[0],F=b.gc(D);if(!F){6C}if(B!=b.1E[0]&&b.3g[F==1?"3T":"48"]()[0]!=B&&!A.k.5g(b.3g[0],B)&&(b.l.5j=="ix-i7"?!A.k.5g(b.19[0],B):1k)){b.6G=F==1?"5a":"5B";if(b.l.5V=="bb"||b.gd(D)){b.l.bM.1Y(b,E,D)}1j{1x}b.1A("8m",E);1x}}b.gE(E);if(A.k.2v){A.k.2v.4P(b,E)}b.1A("8N",E);b.av=b.3B;q 1b},6T:h(C,E){if(!C){q}if(A.k.2v&&!b.l.8s){A.k.2v.6B(b,C)}if(b.l.5X){c B=b;c D=B.3g.1c();B.bf=1k;A(b.1e).26({t:D.t-b.1c.1N.t-B.3c.t+(b.2z[0]==1m.22?0:b.2z[0].24),u:D.u-b.1c.1N.u-B.3c.u+(b.2z[0]==1m.22?0:b.2z[0].2b)},1s(b.l.5X,10)||b8,h(){B.8I(C)})}1j{b.8I(C,E)}q 1b},6a:h(){if(b.7j){b.9e();if(b.l.1e=="8q"){b.1E.v(b.7T).1w(b.l.2U+"-2o-1e")}1j{b.1E.1I()}1Q(c B=b.2i.1n-1;B>=0;B--){b.2i[B].1A("8x",1g,b);if(b.2i[B].4L.5t){b.2i[B].1A("8J",1g,b);b.2i[B].4L.5t=0}}}if(b.3g[0].4x){b.3g[0].4x.ab(b.3g[0])}if(b.l.1e!="8q"&&b.1e&&b.1e[0].4x){b.1e.2n()}A.1T(b,{1e:1g,7j:1b,bf:1b,de:1g});if(b.8G.48){A(b.8G.48).aY(b.1E)}1j{A(b.8G.1N).i8(b.1E)}q 1k},gi:h(D){c B=b.cw(D&&D.fG);c C=[];D=D||{};A(B).1L(h(){c E=(A(D.2B||b).1Z(D.fH||"id")||"").3G(D.fF||(/(.+)[-=8R](.+)/));if(E){C.4o((D.6y||E[1]+"[]")+"="+(D.6y&&D.fF?E[1]:E[2]))}});q C.5W("&")},ge:h(D){c B=b.cw(D&&D.fG);c C=[];D=D||{};B.1L(h(){C.4o(A(D.2B||b).1Z(D.fH||"id")||"")});q C},gF:h(L){c D=b.3B.t,C=D+b.2C.1a,J=b.3B.u,I=J+b.2C.18;c E=L.t,B=E+L.1a,K=L.u,H=K+L.18;c M=b.1c.1F.u,G=b.1c.1F.t;c F=(J+M)>K&&(J+M)<H&&(D+G)>E&&(D+G)<B;if(b.l.5V=="bb"||b.l.ii||(b.l.5V!="bb"&&b.2C[b.7Q?"1a":"18"]>L[b.7Q?"1a":"18"])){q F}1j{q(E<D+(b.2C.1a/2)&&C-(b.2C.1a/2)<B&&K<J+(b.2C.18/2)&&I-(b.2C.18/2)<H)}},gc:h(D){c G=A.k.7R(b.3B.u+b.1c.1F.u,D.u,D.18),C=A.k.7R(b.3B.t+b.1c.1F.t,D.t,D.1a),F=G&&C,B=b.cK(),E=b.cx();if(!F){q 1b}q b.7Q?(((E&&E=="2X")||B=="5a")?2:1):(B&&(B=="5a"?2:1))},gd:h(E){c D=A.k.7R(b.3B.u+b.1c.1F.u,E.u+(E.18/2),E.18),C=A.k.7R(b.3B.t+b.1c.1F.t,E.t+(E.1a/2),E.1a),B=b.cK(),F=b.cx();if(b.7Q&&F){q((F=="2X"&&C)||(F=="t"&&!C))}1j{q B&&((B=="5a"&&D)||(B=="5B"&&!D))}},cK:h(){c B=b.3B.u-b.av.u;q B!=0&&(B>0?"5a":"5B")},cx:h(){c B=b.3B.t-b.av.t;q B!=0&&(B>0?"2X":"t")},ar:h(B){b.ba(B);b.8E()},cw:h(B){c D=b;c C=[];c F=[];if(b.l.9r&&B){1Q(c G=b.l.9r.1n-1;G>=0;G--){c I=A(b.l.9r[G]);1Q(c E=I.1n-1;E>=0;E--){c H=A.1q(I[E],"2o");if(H&&H!=b&&!H.l.1K){F.4o([A.5l(H.l.2H)?H.l.2H.1Y(H.19):A(H.l.2H,H.19).6W("."+H.l.2U+"-2o-1e"),H])}}}}F.4o([A.5l(b.l.2H)?b.l.2H.1Y(b.19,1g,{l:b.l,2B:b.1E}):A(b.l.2H,b.19).6W("."+b.l.2U+"-2o-1e"),b]);1Q(c G=F.1n-1;G>=0;G--){F[G][0].1L(h(){C.4o(b)})}q A(C)},gK:h(){c D=b.1E.3v(":1q(2o-2B)");1Q(c C=0;C<b.2H.1n;C++){1Q(c B=0;B<D.1n;B++){if(D[B]==b.2H[C].2B[0]){b.2H.bB(C,1)}}}},ba:h(B){b.2H=[];b.2i=[b];c H=b.2H;c M=b;c E=[[A.5l(b.l.2H)?b.l.2H.1Y(b.19[0],B,{2B:b.1E}):A(b.l.2H,b.19),b]];if(b.l.9r){1Q(c F=b.l.9r.1n-1;F>=0;F--){c J=A(b.l.9r[F]);1Q(c D=J.1n-1;D>=0;D--){c G=A.1q(J[D],"2o");if(G&&G!=b&&!G.l.1K){E.4o([A.5l(G.l.2H)?G.l.2H.1Y(G.19[0],B,{2B:b.1E}):A(G.l.2H,G.19),G]);b.2i.4o(G)}}}}1Q(c F=E.1n-1;F>=0;F--){c I=E[F][1];c C=E[F][0];1Q(c D=0,K=C.1n;D<K;D++){c L=A(C[D]);L.1q("2o-2B",I);H.4o({2B:L,1W:I,1a:0,18:0,t:0,u:0})}}},8E:h(B){if(b.2z&&b.1e){b.1c.1N=b.ag()}1Q(c D=b.2H.1n-1;D>=0;D--){c E=b.2H[D];if(E.1W!=b.9q&&b.9q&&E.2B[0]!=b.1E[0]){6C}c C=b.l.gH?A(b.l.gH,E.2B):E.2B;if(!B){if(b.l.gf){E.1a=C.3s();E.18=C.31()}1j{E.1a=C[0].4Y;E.18=C[0].4J}}c F=C.1c();E.t=F.t;E.u=F.u}if(b.l.ci&&b.l.ci.gG){b.l.ci.gG.1Y(b)}1j{1Q(c D=b.2i.1n-1;D>=0;D--){c F=b.2i[D].19.1c();b.2i[D].4L.t=F.t;b.2i[D].4L.u=F.u;b.2i[D].4L.1a=b.2i[D].19.3s();b.2i[D].4L.18=b.2i[D].19.31()}}},gC:h(D){c C=D||b,E=C.l;if(!E.3g||E.3g.4R==a9){c B=E.3g;E.3g={19:h(){c F=A(1m.gD(C.1E[0].3m)).1l(B||C.1E[0].6f+" "+C.l.2U+"-2o-3g").1w(C.l.2U+"-2o-1e")[0];if(!B){F.3e.aB="30"}q F},ad:h(F,G){if(B&&!E.gh){q}if(!G.18()){G.18(C.1E.aF()-1s(C.1E.v("da")||0,10)-1s(C.1E.v("dr")||0,10))}if(!G.1a()){G.1a(C.1E.aU()-1s(C.1E.v("dq")||0,10)-1s(C.1E.v("dt")||0,10))}}}}C.3g=A(E.3g.19.1Y(C.19,C.1E));C.1E.aY(C.3g);E.3g.ad(C,C.3g)},gE:h(D){1Q(c C=b.2i.1n-1;C>=0;C--){if(b.gF(b.2i[C].4L)){if(!b.2i[C].4L.5t){if(b.9q!=b.2i[C]){c H=iQ;c G=1g;c E=b.3B[b.2i[C].7Q?"t":"u"];1Q(c B=b.2H.1n-1;B>=0;B--){if(!A.k.5g(b.2i[C].19[0],b.2H[B].2B[0])){6C}c F=b.2H[B][b.2i[C].7Q?"t":"u"];if(1o.4e(F-E)<H){H=1o.4e(F-E);G=b.2H[B]}}if(!G&&!b.l.gg){6C}b.9q=b.2i[C];G?b.l.bM.1Y(b,D,G,1g,1k):b.l.bM.1Y(b,D,1g,b.2i[C].19,1k);b.1A("8m",D);b.2i[C].1A("8m",D,b);b.l.3g.ad(b.9q,b.3g)}b.2i[C].1A("5t",D,b);b.2i[C].4L.5t=1}}1j{if(b.2i[C].4L.5t){b.2i[C].1A("8J",D,b);b.2i[C].4L.5t=0}}}},b9:h(C){c D=b.l;c B=A.5l(D.1e)?A(D.1e.1G(b.19[0],[C,b.1E])):(D.1e=="7B"?b.1E.7B():b.1E);if(!B.4t("22").1n){A(D.2K!="1N"?D.2K:b.1E[0].4x)[0].gS(B[0])}if(B[0]==b.1E[0]){b.7T={1a:b.1E[0].3e.1a,18:b.1E[0].3e.18,1f:b.1E.v("1f"),u:b.1E.v("u"),t:b.1E.v("t")}}if(B[0].3e.1a==""||D.cU){B.1a(b.1E.1a())}if(B[0].3e.18==""||D.cU){B.18(b.1E.18())}q B},bd:h(B){if(B.t!=3H){b.1c.1F.t=B.t+b.3c.t}if(B.2X!=3H){b.1c.1F.t=b.2C.1a-B.2X+b.3c.t}if(B.u!=3H){b.1c.1F.u=B.u+b.3c.u}if(B.3j!=3H){b.1c.1F.u=b.2C.18-B.3j+b.3c.u}},ag:h(){b.2z=b.1e.2z();c B=b.2z.1c();if(b.4a=="2k"&&b.1B[0]!=1m&&A.k.5g(b.1B[0],b.2z[0])){B.t+=b.1B.24();B.u+=b.1B.2b()}if((b.2z[0]==1m.22&&A.29.cn)||(b.2z[0].5p&&b.2z[0].5p.5T()=="3i"&&A.29.3Y)){B={u:0,t:0}}q{u:B.u+(1s(b.2z.v("6l"),10)||0),t:B.t+(1s(b.2z.v("6s"),10)||0)}},8A:h(){if(b.4a=="21"){c B=b.1E.1f();q{u:B.u-(1s(b.1e.v("u"),10)||0)+b.1B.2b(),t:B.t-(1s(b.1e.v("t"),10)||0)+b.1B.24()}}1j{q{u:0,t:0}}},be:h(){b.3c={t:(1s(b.1E.v("8l"),10)||0),u:(1s(b.1E.v("8j"),10)||0)}},92:h(){b.2C={1a:b.1e.3s(),18:b.1e.31()}},bi:h(){c E=b.l;if(E.1D=="1N"){E.1D=b.1e[0].4x}if(E.1D=="1m"||E.1D=="3D"){b.1D=[0-b.1c.21.t-b.1c.1N.t,0-b.1c.21.u-b.1c.1N.u,A(E.1D=="1m"?1m:3D).1a()-b.2C.1a-b.3c.t,(A(E.1D=="1m"?1m:3D).18()||1m.22.4x.7t)-b.2C.18-b.3c.u]}if(!(/^(1m|3D|1N)$/).1S(E.1D)){c C=A(E.1D)[0];c D=A(E.1D).1c();c B=(A(C).v("3o")!="30");b.1D=[D.t+(1s(A(C).v("6s"),10)||0)-b.3c.t,D.u+(1s(A(C).v("6l"),10)||0)-b.3c.u,D.t+(B?1o.2T(C.9u,C.4Y):C.4Y)-(1s(A(C).v("6s"),10)||0)-b.2C.1a-b.3c.t,D.u+(B?1o.2T(C.7t,C.4J):C.4J)-(1s(A(C).v("6l"),10)||0)-b.2C.18-b.3c.u]}},52:h(E,G){if(!G){G=b.1f}c B=E=="2k"?1:-1;c D=b.l,C=b.4a=="2k"&&!(b.1B[0]!=1m&&A.k.5g(b.1B[0],b.2z[0]))?b.2z:b.1B,F=(/(3i|22)/i).1S(C[0].5p);q{u:(G.u+b.1c.21.u*B+b.1c.1N.u*B-(b.4a=="5v"?-b.1B.2b():(F?0:C.2b()))*B),t:(G.t+b.1c.21.t*B+b.1c.1N.t*B-(b.4a=="5v"?-b.1B.24():F?0:C.24())*B)}},8B:h(D){c H=b.l,E=b.4a=="2k"&&!(b.1B[0]!=1m&&A.k.5g(b.1B[0],b.2z[0]))?b.2z:b.1B,I=(/(3i|22)/i).1S(E[0].5p);if(b.4a=="21"&&!(b.1B[0]!=1m&&b.1B[0]!=b.2z[0])){b.1c.21=b.8A()}c C=D.3d;c B=D.3l;if(b.4w){if(b.1D){if(D.3d-b.1c.1F.t<b.1D[0]){C=b.1D[0]+b.1c.1F.t}if(D.3l-b.1c.1F.u<b.1D[1]){B=b.1D[1]+b.1c.1F.u}if(D.3d-b.1c.1F.t>b.1D[2]){C=b.1D[2]+b.1c.1F.t}if(D.3l-b.1c.1F.u>b.1D[3]){B=b.1D[3]+b.1c.1F.u}}if(H.2N){c G=b.8y+1o.7p((B-b.8y)/H.2N[1])*H.2N[1];B=b.1D?(!(G-b.1c.1F.u<b.1D[1]||G-b.1c.1F.u>b.1D[3])?G:(!(G-b.1c.1F.u<b.1D[1])?G-H.2N[1]:G+H.2N[1])):G;c F=b.8D+1o.7p((C-b.8D)/H.2N[0])*H.2N[0];C=b.1D?(!(F-b.1c.1F.t<b.1D[0]||F-b.1c.1F.t>b.1D[2])?F:(!(F-b.1c.1F.t<b.1D[0])?F-H.2N[0]:F+H.2N[0])):F}}q{u:(B-b.1c.1F.u-b.1c.21.u-b.1c.1N.u+(b.4a=="5v"?-b.1B.2b():(I?0:E.2b()))),t:(C-b.1c.1F.t-b.1c.21.t-b.1c.1N.t+(b.4a=="5v"?-b.1B.24():I?0:E.24()))}},gx:h(G,F,C,E){C?C[0].gS(b.3g[0]):F.2B[0].4x.e8(b.3g[0],(b.6G=="5a"?F.2B[0]:F.2B[0].h7));b.as=b.as?++b.as:1;c D=b,B=b.as;3D.8k(h(){if(B==D.as){D.8E(!E)}},0)},8I:h(C,D){b.bf=1b;if(!b.de){b.3g.d8(b.1E)}b.de=1g;if(b.1e[0]==b.1E[0]){1Q(c B in b.7T){if(b.7T[B]=="3k"||b.7T[B]=="5U"){b.7T[B]=""}}b.1E.v(b.7T).1w(b.l.2U+"-2o-1e")}1j{b.1E.1I()}if(b.bv){b.1A("dl",C,b,D)}if(b.bv||b.8G.48!=b.1E.48().6W("."+b.l.2U+"-2o-1e")[0]||b.8G.1N!=b.1E.1N()[0]){b.1A("ad",C,1g,D)}if(!A.k.5g(b.19[0],b.1E[0])){b.1A("2n",C,1g,D);1Q(c B=b.2i.1n-1;B>=0;B--){if(A.k.5g(b.2i[B].19[0],b.1E[0])){b.2i[B].1A("dl",C,b,D);b.2i[B].1A("ad",C,b,D)}}}1Q(c B=b.2i.1n-1;B>=0;B--){b.2i[B].1A("8x",C,b,D);if(b.2i[B].4L.5t){b.2i[B].1A("8J",C,b);b.2i[B].4L.5t=0}}b.7j=1b;if(b.7U){b.1A("aJ",C,1g,D);b.1A("3E",C,1g,D);q 1b}b.1A("aJ",C,1g,D);b.3g[0].4x.ab(b.3g[0]);if(b.1e[0]!=b.1E[0]){b.1e.2n()}b.1e=1g;b.1A("3E",C,1g,D);b.bv=1b;q 1k},1A:h(B,C,D,E){A.k.2R.1Y(b,B,[C,b.6u(D)]);if(!E){if(A.1V.4p.1A.1Y(b,B,C,b.6u(D))===1b){b.6a()}}},7m:{},6u:h(C){c B=C||b;q{1e:B.1e,3g:B.3g||A([]),1f:B.1f,af:B.3B,2B:B.1E,gj:C?C.19:1g}}}));A.1T(A.k.2o,{9U:"gi ge",3J:"1.5b",59:{gf:1k,2K:"1N",6a:":1v,5O",2U:"k",76:0,5A:1,gg:1k,gh:1b,cU:1b,1e:"8q",2H:"> *",6q:"2u",8w:1k,4j:20,4l:20,bM:A.k.2o.4p.gx,5V:"2u",2I:9A}});A.k.2R.23("2o","2r",{2F:h(D,E){c C=A("22"),B=A(b).1q("2o");if(C.v("2r")){B.l.8o=C.v("2r")}C.v("2r",B.l.2r)},aJ:h(C,D){c B=A(b).1q("2o");if(B.l.8o){A("22").v("2r",B.l.8o)}}});A.k.2R.23("2o","2c",{2F:h(D,E){c C=E.1e,B=A(b).1q("2o");if(C.v("2c")){B.l.8r=C.v("2c")}C.v("2c",B.l.2c)},aJ:h(C,D){c B=A(b).1q("2o");if(B.l.8r){A(D.1e).v("2c",B.l.8r)}}});A.k.2R.23("2o","8w",{2F:h(C,D){c B=A(b).1q("2o"),E=B.l;if(B.1B[0]!=1m&&B.1B[0].5p!="bL"){B.6r=B.1B.1c()}},8N:h(D,E){c C=A(b).1q("2o"),F=C.l,B=1b;if(C.1B[0]!=1m&&C.1B[0].5p!="bL"){if((C.6r.u+C.1B[0].4J)-D.3l<F.4j){C.1B[0].2b=B=C.1B[0].2b+F.4l}1j{if(D.3l-C.6r.u<F.4j){C.1B[0].2b=B=C.1B[0].2b-F.4l}}if((C.6r.t+C.1B[0].4Y)-D.3d<F.4j){C.1B[0].24=B=C.1B[0].24+F.4l}1j{if(D.3d-C.6r.t<F.4j){C.1B[0].24=B=C.1B[0].24-F.4l}}}1j{if(D.3l-A(1m).2b()<F.4j){B=A(1m).2b(A(1m).2b()-F.4l)}1j{if(A(3D).18()-(D.3l-A(1m).2b())<F.4j){B=A(1m).2b(A(1m).2b()+F.4l)}}if(D.3d-A(1m).24()<F.4j){B=A(1m).24(A(1m).24()-F.4l)}1j{if(A(3D).1a()-(D.3d-A(1m).24())<F.4j){B=A(1m).24(A(1m).24()+F.4l)}}}if(B!==1b&&A.k.2v&&!F.8s){A.k.2v.8v(C,D)}}});A.k.2R.23("2o","2I",{2F:h(D,E){c C=E.1e,B=A(b).1q("2o");if(C.v("2I")){B.l.7W=C.v("2I")}C.v("2I",B.l.2I)},aJ:h(C,D){c B=A(b).1q("2o");if(B.l.7W){A(D.1e).v("2I",B.l.7W=="3k"?"":B.l.7W)}}})})(2t);(h(E){E.1V("k.3t",{5y:h(){c H=b.l;if(H.mG){c J=b.19.3v("a").3u(H.eU);if(J.1n){if(J.3u(H.4A).1n){H.2J=J}1j{H.2J=J.1N().1N().48();J.1l("k-3t-5Q")}}}b.19.1l("k-3t k-1V k-1e-8Q");c I=b.19.6v().1l("k-3t-7r");c K=H.4F=I.3v("> :7u-3w").1l("k-3t-4A k-1e-8Q k-1O-2u k-2q-3b").2Q("mD.3t",h(){E(b).1l("k-1O-44")}).2Q("mC.3t",h(){E(b).1w("k-1O-44")});K.3T().9K("<1R></1R>").1l("k-3t-3F").1N().1l("k-3t-3F-9K k-1e-8Q k-1V-3F k-2q-3j");c L=H.2J=A(K,H.2J).5N("k-1O-2u").5N("k-1O-2J").5N("k-2q-3b").5N("k-2q-u");L.1N().1l(H.43);E("<3h/>").1l("k-3U "+b.l.74.4A).cW(K);L.3v(".k-3U").5N(b.l.74.4A).5N(b.l.74.bJ);if(E.29.3Y){b.19.3v("a").v("gr","1")}b.2m();b.19.1Z("6i","mz");c G=b;H.4F.1Z("6i","hK").2Q("7b",h(M){q G.gt(M)}).3T().1Z("6i","mA");H.4F.6W(H.2J||"").1Z("4G-ay","1b").1Z("6t","-1").3T().1P();if(!H.2J.1n){H.4F.eq(0).1Z("6t","0")}1j{H.2J.1Z("4G-ay","1k").1Z("6t","0")}if(!E.29.9P){H.4F.3v("a").1Z("6t","-1")}if(H.1z){b.19.2Q((H.1z)+".3t",F)}},3A:h(){b.19.1w("k-3t k-1V k-1e-8Q").5f("6i").3q(".3t");E.4y(b.19[0],"3t");c G=b.19.6v().1w("k-3t-7r "+b.l.43);c H=b.l.4F.3q(".3t").1w("k-3t-4A k-1e-8Q k-1O-2u k-2q-3b k-1O-2J k-2q-u").5f("6i").5f("4G-ay").5f("gs");H.3v("a").5f("gs");H.6v(".k-3U").2n();H.3T().6v().1w("k-3t-3F").1L(h(){E(b).1N().fK(b)})},gt:h(J){if(b.l.1K||J.ct||J.4i){q}c K=E.k.2Z;c I=b.l.4F.1n;c H=b.l.4F.3N(J.1i);c G=1b;4B(J.2Z){1t K.bH:1t K.bA:G=b.l.4F[(H+1)%I];1x;1t K.bz:1t K.bI:G=b.l.4F[(H-1+I)%I];1x;1t K.gY:1t K.fg:q F.1Y(b.19[0],{1i:J.1i})}if(G){E(J.1i).1Z("6t","-1");E(G).1Z("6t","0");G.2Y();q 1b}q 1k},2m:h(){c H=b.l,G;if(H.d3){G=b.19.1N().18();H.4F.1L(h(){G-=E(b).31()});c I=0;H.4F.3T().1L(h(){I=1o.2T(I,E(b).aF()-E(b).18())}).18(G-I).v("3o","3k")}1j{if(H.7O){G=0;H.4F.3T().1L(h(){G=1o.2T(G,E(b).31())}).18(G)}}},8u:h(G){F.1Y(b.19[0],{1i:A(b.l.4F,G)[0]})}});h C(H,G){q h(){q H.1G(G,1C)}}h B(H){if(!E.1q(b,"3t")){q}c G=E.1q(b,"3t");c I=G.l;I.8t=H?0:--I.8t;if(I.8t){q}if(I.m5){I.5S.23(I.7P).v({18:"",3o:""})}G.1A("8m",1g,I.1q)}h D(M,Q,J,K,O){c N=E.1q(b,"3t").l;N.5S=M;N.7P=Q;N.1q=J;c L=C(B,b);E.1q(b,"3t").1A("m6",1g,N.1q);N.8t=Q.1H()===0?M.1H():Q.1H();if(N.aD){c H={};if(!N.7V&&K){H={5S:E([]),7P:Q,6c:L,5a:O,7O:N.7O||N.d3}}1j{H={5S:M,7P:Q,6c:L,5a:O,7O:N.7O||N.d3}}if(!N.aA){N.aA=N.aD}if(!N.az){N.az=N.1M}N.aD=E.5l(N.aA)?N.aA(H):N.aA;N.1M=E.5l(N.az)?N.az(H):N.az;c P=E.k.3t.eL,I=N.1M,G=N.aD;if(!P[G]){P[G]=h(R){b.6D(R,{1X:G,1M:I||eJ})}}P[G](H)}1j{if(!N.7V&&K){M.6b()}1j{Q.1P();M.1I()}L(1k)}Q.48().1Z("4G-ay","1b").1Z("6t","-1");M.48().1Z("4G-ay","1k").1Z("6t","0").2Y()}h F(K){c J=E.1q(b,"3t").l;if(J.1K){q 1b}if(!K.1i&&!J.7V){J.2J.1N().5N(J.43);c I=J.2J.3T(),M={l:J,eP:E([]),eO:J.2J,eS:E([]),eN:I},L=(J.2J=E([]));D.1Y(b,L,I,M);q 1b}c H=E(K.1i);H=E(H.4t(J.4A)[0]||H);c G=H[0]==J.2J[0];if(J.8t||(J.7V&&G)){q 1b}if(!H.is(J.4A)){q}J.2J.1N().5N(J.43);J.2J.1w("k-1O-2J k-2q-u").1l("k-1O-2u k-2q-3b").3v(".k-3U").1w(J.74.bJ).1l(J.74.4A);if(!G){H.1N().1l(J.43);H.1w("k-1O-2u k-2q-3b").1l("k-1O-2J k-2q-u").3v(".k-3U").1w(J.74.4A).1l(J.74.bJ)}c L=H.3T(),I=J.2J.3T(),M={l:J,eP:G&&!J.7V?E([]):H,eO:J.2J,eS:G&&!J.7V?E([]):L,eN:I},N=J.4F.3N(J.2J[0])>J.4F.3N(H[0]);J.2J=G?E([]):H;D.1Y(b,L,I,M,G,N);q 1b}h A(H,G){q G?2L G=="8C"?H.3u(":eq("+G+")"):H.6W(H.6W(G)):G===1b?E([]):H.3u(":eq(0)")}E.1T(E.k.3t,{3J:"1.5b",59:{7O:1k,7V:1k,aD:"6D",1z:"1F",4A:"a",74:{4A:"k-3U-8V-1-e",bJ:"k-3U-8V-1-s"},eU:h(){q b.4c.5T()==dG.4c.5T()},8t:0,43:"k-3t-1U"},eL:{6D:h(G,I){G=E.1T({1X:"9v",1M:f3},G,I);if(!G.7P.1H()){G.5S.26({18:"1I"},G);q}c H=G.7P.18(),J=G.5S.18(),L=J/H,K=G.5S.v("3o");G.5S.v({18:0,3o:"30"}).1I();G.7P.3u(":30").1L(G.6c).4I().3u(":5L").26({18:"1P"},{7s:h(M){c N=(H-M)*L;if(E.29.3Y||E.29.8Z){N=1o.fi(N)}G.5S.18(N)},1M:G.1M,1X:G.1X,6c:h(){if(!G.7O){G.5S.v("18","3k")}G.5S.v({3o:K});G.6c()}})},n9:h(G){b.6D(G,{1X:G.5a?"bQ":"9v",1M:G.5a?9A:n8})},nb:h(G){b.6D(G,{1X:"nf",1M:eJ})}}})})(2t);(h(B){c A={dg:"2F.2g",4P:"4P.2g",dj:"3E.2g",6Z:"6Z.1r",5h:"5h.1r",6X:"6X.1r",6x:"6x.1r",cs:"2F.1r",2m:"4P.1r",cv:"3E.1r"};B.1V("k.2h",{5y:h(){b.bO=b.19.1Z("3V");b.l.3V=b.l.3V||b.bO;c L=b,J=b.l,K=J.3V||"&f9;",I=B.k.2h.fm(b.19),M=(b.3x=B("<1R/>")).2K(1m.22).1P().1l("k-2h k-1V k-1V-3F k-2q-3b "+J.nc).v({1f:"2k",3o:"30",2I:J.2I}).1Z("6t",-1).v("ng",0).7b(h(N){(J.cG&&N.2Z&&N.2Z==B.k.2Z.cA&&L.7y())}).1Z({6i:"2h","4G-nh":I}).9X(h(){L.cY()}),C=b.19.1I().5f("3V").1l("k-2h-3F k-1V-3F").2K(M),G=(b.f8=B("<1R></1R>")).1l("k-2h-df k-1V-4A k-2q-3b k-1e-8W").cW(M),D=B(\'<a 4c="#"/>\').1l("k-2h-df-7y k-2q-3b").1Z("6i","3S").44(h(){D.1l("k-1O-44")},h(){D.1w("k-1O-44")}).2Y(h(){D.1l("k-1O-2Y")}).71(h(){D.1w("k-1O-2Y")}).9X(h(N){N.hk()}).1F(h(){L.7y();q 1b}).2K(G),F=(b.fc=B("<3h/>")).1l("k-3U k-3U-no").aP(J.9N).2K(D),H=B("<3h/>").1l("k-2h-3V").1Z("id",I).3i(K).cW(G),E=(b.fb=B("<1R></1R>")).1l("k-2h-hg k-1V-3F k-1e-8W").2K(M);G.3v("*").23(G).7J();(J.2g&&B.fn.2g&&b.cf());(J.1r&&B.fn.1r&&b.ch());b.cm(J.cj);b.9E=1b;(J.7I&&B.fn.7I&&M.7I());(J.eZ&&b.ds())},3A:h(){(b.2V&&b.2V.3A());b.3x.1P();b.19.3q(".2h").4y("2h").1w("k-2h-3F k-1V-3F").1P().2K("22");b.3x.2n();(b.bO&&b.19.1Z("3V",b.bO))},7y:h(){if(1b===b.1A("nl")){q}(b.2V&&b.2V.3A());b.3x.1P(b.l.1P).3q("a1.k-2h");b.1A("7y");B.k.2h.2V.2m();b.9E=1b},fk:h(){q b.9E},cY:h(F){if((b.l.9C&&!F)||(!b.l.6H&&!b.l.9C)){q b.1A("2Y")}c E=b.l.2I,D=b.l;B(".k-2h:5L").1L(h(){E=1o.2T(E,1s(B(b).v("z-3N"),10)||D.2I)});(b.2V&&b.2V.$el.v("z-3N",++E));c C={2b:b.19.1Z("2b"),24:b.19.1Z("24")};b.3x.v("z-3N",++E);b.19.1Z(C);b.1A("2Y")},ds:h(){if(b.9E){q}b.2V=b.l.9C?2d B.k.2h.2V(b):1g;(b.3x.3T().1n&&b.3x.2K("22"));b.f5();b.ce(b.l.1f);b.3x.1I(b.l.1I);b.cY(1k);(b.l.9C&&b.3x.2Q("a1.k-2h",h(E){if(E.2Z!=B.k.2Z.ff){q}c D=B(":cX",b),F=D.3u(":7u")[0],C=D.3u(":dF")[0];if(E.1i==C&&!E.99){8k(h(){F.2Y()},1)}1j{if(E.1i==F&&E.99){8k(h(){C.2Y()},1)}}}));b.3x.3v(":cX:7u").2Y();b.1A("ds");b.9E=1k},cm:h(F){c C=b,E=1b,D=b.fb;D.cI().1P();B.1L(F,h(){q!(E=1k)});if(E){D.1I();B.1L(F,h(G,H){B(\'<3S 5j="3S"></3S>\').1l("k-1O-2u k-2q-3b").aP(G).1F(h(){H.1G(C.19[0],1C)}).44(h(){B(b).1l("k-1O-44")},h(){B(b).1w("k-1O-44")}).2Y(h(){B(b).1l("k-1O-2Y")}).71(h(){B(b).1w("k-1O-2Y")}).2K(D)})}},cf:h(){c C=b,D=b.l;b.3x.2g({6a:".k-2h-3F",1e:D.mP,2D:".k-2h-df",1D:"1m",2F:h(){(D.dg&&D.dg.1G(C.19[0],1C))},4P:h(){(D.4P&&D.4P.1G(C.19[0],1C))},3E:h(){(D.dj&&D.dj.1G(C.19[0],1C));B.k.2h.2V.2m()}})},ch:h(F){F=(F===3H?b.l.1r:F);c C=b,E=b.l,D=2L F=="4Q"?F:"n,e,s,w,3Z,4s,ne,4v";b.3x.1r({6a:".k-2h-3F",4O:b.19,1e:E.n5,6X:E.6X,6Z:E.6Z,6x:E.6x,5h:E.5h,2F:h(){(E.cs&&E.cs.1G(C.19[0],1C))},2m:h(){(E.2m&&E.2m.1G(C.19[0],1C))},2M:D,3E:h(){(E.cv&&E.cv.1G(C.19[0],1C));B.k.2h.2V.2m()}}).3v(".k-1r-3Z").1l("k-3U k-3U-mY-f7-3Z")},ce:h(H){c D=B(3D),F=B(1m),G=F.2b(),C=F.24(),E=G;if(B.7N(H,["8i","u","2X","3j","t"])>=0){H=[H=="2X"||H=="t"?H:"8i",H=="u"||H=="3j"?H:"8p"]}if(H.4R!=8F){H=["8i","8p"]}if(H[0].4R==aq){C+=H[0]}1j{4B(H[0]){1t"t":C+=0;1x;1t"2X":C+=D.1a()-b.3x.3s();1x;2u:1t"8i":C+=(D.1a()-b.3x.3s())/2}}if(H[1].4R==aq){G+=H[1]}1j{4B(H[1]){1t"u":G+=0;1x;1t"3j":G+=D.18()-b.3x.31();1x;2u:1t"8p":G+=(D.18()-b.3x.31())/2}}G=1o.2T(G,E);b.3x.v({u:G,t:C})},4u:h(C,E){(A[C]&&b.3x.1q(A[C],E));4B(C){1t"cj":b.cm(E);1x;1t"9N":b.fc.aP(E);1x;1t"2g":(E?b.cf():b.3x.2g("3A"));1x;1t"18":b.3x.18(E);1x;1t"1f":b.ce(E);1x;1t"1r":c D=b.3x,F=b.3x.is(":1q(1r)");(F&&!E&&D.1r("3A"));(F&&2L E=="4Q"&&D.1r("5O","2M",E));(F||b.ch(E));1x;1t"3V":B(".k-2h-3V",b.f8).3i(E||"&f9;");1x;1t"1a":b.3x.1a(E);1x}B.1V.4p.4u.1G(b,1C)},f5:h(){c C=b.l;b.19.v({18:0,5h:0,1a:"3k"});c D=b.3x.v({18:"3k",1a:C.1a}).18();b.19.v({5h:C.5h-D,18:C.18=="3k"?"3k":C.18-D})}});B.1T(B.k.2h,{3J:"1.5b",59:{eZ:1k,7I:1b,cj:{},cG:1k,9N:"7y",2g:1k,18:"3k",5h:ah,6x:ah,9C:1b,2V:{},1f:"8i",1r:1k,6H:1k,1a:f3,2I:9A},9U:"fk",a7:0,fm:h(C){q"k-2h-3V-"+(C.1Z("id")||++b.a7)},2V:h(C){b.$el=B.k.2h.2V.fh(C)}});B.1T(B.k.2h.2V,{7H:[],fd:B.79("2Y,9X,cM,7b,a1,1F".9a(","),h(C){q C+".2h-2V"}).5W(" "),fh:h(C){if(b.7H.1n===0){8k(h(){B("a, :1v").2Q(B.k.2h.2V.fd,h(){c E=1b;c H=B(b).4t(".k-2h");if(H.1n){c G=B(".k-2h-2V");if(G.1n){c F=1s(G.v("z-3N"),10);G.1L(h(){F=1o.2T(F,1s(B(b).v("z-3N"),10))});E=1s(H.v("z-3N"),10)>F}1j{E=1k}}q E})},1);B(1m).2Q("7b.2h-2V",h(E){(C.l.cG&&E.2Z&&E.2Z==B.k.2Z.cA&&C.7y())});B(3D).2Q("2m.2h-2V",B.k.2h.2V.2m)}c D=B("<1R></1R>").2K(1m.22).1l("k-2h-2V").v(B.1T({ku:0,60:0,ex:0,1f:"2k",u:0,t:0,1a:b.1a(),18:b.18()},C.l.2V));(C.l.7I&&B.fn.7I&&D.7I());b.7H.4o(D);q D},3A:h(C){b.7H.bB(B.7N(b.7H,C),1);if(b.7H.1n===0){B("a, :1v").23([1m,3D]).3q(".2h-2V")}C.2n()},18:h(){if(B.29.3Y&&B.29.3J<7){c D=1o.2T(1m.5z.7t,1m.22.7t);c C=1o.2T(1m.5z.4J,1m.22.4J);if(D<C){q B(3D).18()+"3C"}1j{q D+"3C"}}1j{q B(1m).18()+"3C"}},1a:h(){if(B.29.3Y&&B.29.3J<7){c C=1o.2T(1m.5z.9u,1m.22.9u);c D=1o.2T(1m.5z.4Y,1m.22.4Y);if(C<D){q B(3D).1a()+"3C"}1j{q C+"3C"}}1j{q B(1m).1a()+"3C"}},2m:h(){c C=B([]);B.1L(B.k.2h.2V.7H,h(){C=C.23(b)});C.v({1a:0,18:0}).v({1a:B.k.2h.2V.1a(),18:B.k.2h.2V.18()})}});B.1T(B.k.2h.2V.4p,{3A:h(){B.k.2h.2V.3A(b.$el)}})})(2t);(h(A){A.1V("k.3X",A.1T({},A.k.7K,{5y:h(){c B=b,C=b.l;b.a2=1b;b.by=1g;b.3O=C.3O=="3k"?(b.19[0].4Y/b.19[0].4J>1?"5i":"4z"):C.3O;b.94();b.19.1l("k-3X k-3X-"+b.3O+" k-1V k-1V-3F k-2q-3b");b.3f=A([]);if(C.3f){if(C.3f===1k){b.3f=A("<1R></1R>");if(!C.2A){C.2A=[b.4n(),b.4n()]}if(C.2A.1n&&C.2A.1n!=2){C.2A=[C.2A[0],C.2A[0]]}}1j{b.3f=A("<1R></1R>")}b.3f.2K(b.19).1l("k-3X-3f k-1V-4A");(C.3f=="3K")&&(b.3O=="5i")&&b.3f.v({t:0});(C.3f=="2T")&&(b.3O=="5i")&&b.3f.v({2X:0});(C.3f=="3K")&&(b.3O=="4z")&&b.3f.v({3j:0});(C.3f=="2T")&&(b.3O=="4z")&&b.3f.v({u:0})}if(A(".k-3X-2D",b.19).1n==0){A(\'<a 4c="#"></a>\').2K(b.19).1l("k-3X-2D")}if(C.2A&&C.2A.1n){6J(A(".k-3X-2D",b.19).1n<C.2A.1n){A(\'<a 4c="#"></a>\').2K(b.19).1l("k-3X-2D")}}b.2M=A(".k-3X-2D",b.19).1l("k-1O-2u k-2q-3b");b.2D=b.2M.eq(0);b.2M.23(b.3f).3u("a").1F(h(D){D.7Y()}).44(h(){A(b).1l("k-1O-44")},h(){A(b).1w("k-1O-44")}).2Y(h(){B.2M.1w("k-1O-2Y");A(b).1l("k-1O-2Y")}).71(h(){A(b).1w("k-1O-2Y")});b.2M.1L(h(D){A(b).1q("3N.k-3X-2D",D)});b.2M.7b(h(H){c E=A(b).1q("3N.k-3X-2D");if(B.l.1K){q}4B(H.2Z){1t A.k.2Z.cE:1t A.k.2Z.dx:1t A.k.2Z.bI:1t A.k.2Z.bH:1t A.k.2Z.bA:1t A.k.2Z.bz:if(!B.a2){B.a2=1k;A(b).1l("k-1O-2J");B.ee(H)}1x}c D,F,G=B.f0();if(B.l.2A&&B.l.2A.1n){D=F=B.2A(E)}1j{D=F=B.1J()}4B(H.2Z){1t A.k.2Z.cE:F=B.4n();1x;1t A.k.2Z.dx:F=B.4N();1x;1t A.k.2Z.bI:1t A.k.2Z.bH:F=D+G;1x;1t A.k.2Z.bA:1t A.k.2Z.bz:F=D-G;1x}B.bx(H,E,F)}).kI(h(D){if(B.a2){B.ef(D);B.4U(D);B.a2=1b;A(b).1w("k-1O-2J")}});b.7A()},3A:h(){b.2M.2n();b.19.1w("k-3X k-3X-5i k-3X-4z k-3X-1K k-1V k-1V-3F k-2q-3b").4y("3X").3q(".3X");b.97()},7L:h(G){c H=b.l;if(H.1K){q 1b}b.ee(G);b.eA={1a:b.19.3s(),18:b.19.31()};b.8X=b.19.1c();c B={x:G.3d,y:G.3l};c E=b.eD(B);c I=b.4N(),C;c D=b,F;b.2M.1L(h(K){c J=1o.4e(E-D.2A(K));if(I>J){I=J;C=A(b);F=K}});D.by=F;C.1l("k-1O-2J").2Y();b.bx(G,F,E);q 1k},6I:h(B){q 1k},62:h(D){c B={x:D.3d,y:D.3l};c C=b.eD(B);b.bx(D,b.by,C);q 1b},6T:h(B){b.2M.1w("k-1O-2J");b.ef(B);b.4U(B);b.by=1g;q 1b},eD:h(B){c G,I;if("5i"==b.3O){G=b.eA.1a;I=B.x-b.8X.t}1j{G=b.eA.18;I=B.y-b.8X.u}c E=(I/G);if(E>1){E=1}if(E<0){E=0}if("4z"==b.3O){E=1-E}c C=b.4N()-b.4n(),H=E*C,F=H%b.l.7s,D=b.4n()+H-F;if(F>(b.l.7s/2)){D+=b.l.7s}q D},ee:h(B){b.1A("2F",B,{1J:b.1J()})},bx:h(G,C,E){if(b.l.2A&&b.l.2A.1n){c B=b.2M[C];c F=b.2A(C?0:1);if((C==0&&E>=F)||(C==1&&E<=F)){E=F}if(E!=b.2A(C)){c D=b.2A();D[C]=E;c H=b.1A("6D",G,{2D:B,1J:E,2A:D});c F=b.2A(C?0:1);if(H!==1b){b.2A(C,E)}}}1j{if(E!=b.1J()){c H=b.1A("6D",G,{1J:E});if(H!==1b){b.4u("1J",E)}}}},ef:h(B){b.1A("3E",B,{1J:b.1J()})},4U:h(B){b.1A("8m",B,{1J:b.1J()})},1J:h(B){if(1C.1n){b.4u("1J",B);b.4U()}q b.9y()},2A:h(B,C){if(1C.1n>1){b.l.2A[B]=C;b.7A();b.4U()}if(1C.1n){if(b.l.2A&&b.l.2A.1n){q b.dB(B)}1j{q b.1J()}}1j{q b.dB()}},4u:h(B,C){A.1V.4p.4u.1G(b,1C);4B(B){1t"3O":b.3O=b.l.3O=="3k"?(b.19[0].4Y/b.19[0].4J>1?"5i":"4z"):b.l.3O;b.19.1w("k-3X-5i k-3X-4z").1l("k-3X-"+b.lI());b.7A();1x;1t"1J":b.7A();1x}},f0:h(){c B=b.l.7s;q B},9y:h(){c B=b.l.1J;if(B<b.4n()){B=b.4n()}if(B>b.4N()){B=b.4N()}q B},dB:h(B){if(1C.1n){c C=b.l.2A[B];if(C<b.4n()){C=b.4n()}if(C>b.4N()){C=b.4N()}q C}1j{q b.l.2A}},4n:h(){c B=b.l.3K;q B},4N:h(){c B=b.l.2T;q B},7A:h(){c E=b.l.3f;if(b.l.2A&&b.l.2A.1n){c C=b,B,F;b.2M.1L(h(I,H){c G=(C.2A(I)-C.4n())/(C.4N()-C.4n())*3n;A(b).v(C.3O=="5i"?"t":"3j",G+"%");if(C.l.3f===1k){if(C.3O=="5i"){(I==0)&&C.3f.v("t",G+"%");(I==1)&&C.3f.v("1a",(G-dH)+"%")}1j{(I==0)&&C.3f.v("3j",(G)+"%");(I==1)&&C.3f.v("18",(G-dH)+"%")}}dH=G})}1j{c D=(b.1J()-b.4n())/(b.4N()-b.4n())*3n;b.2D.v(b.3O=="5i"?"t":"3j",D+"%");(E=="3K")&&(b.3O=="5i")&&b.3f.v({t:0,1a:D+"%"});(E=="2T")&&(b.3O=="5i")&&b.3f.v({t:D+"%",1a:(3n-D)+"%"});(E=="3K")&&(b.3O=="4z")&&b.3f.v({u:(3n-D)+"%",18:D+"%"});(E=="2T")&&(b.3O=="4z")&&b.3f.v({3j:D+"%",18:(3n-D)+"%"})}}}));A.1T(A.k.3X,{9U:"1J 2A",3J:"1.5b",a6:"6D",59:{76:0,5A:0,2T:3n,3K:0,3O:"3k",3f:1b,7s:1,1J:0,2A:1g}})})(2t);(h(A){A.1V("k.1u",{5y:h(){b.9R(1k)},3A:h(){c B=b.l;b.72.3q(".1u").1w(B.dD).4y("1u");b.$1u.1L(h(){c C=A.1q(b,"4c.1u");if(C){b.4c=C}c D=A(b).3q(".1u");A.1L(["4c","5K","7d"],h(F,E){D.4y(E+".1u")})});b.$3L.3q(".1u").23(b.$3M).1L(h(){if(A.1q(b,"3A.1u")){A(b).2n()}1j{A(b).1w([B.bT,B.43,B.8L,B.7f,B.9Y,B.6e].5W(" "))}});if(B.68){b.9S(1g,B.68)}},4u:h(B,C){if((/^1U/).1S(B)){b.4S(C)}1j{b.l[B]=C;b.9R()}},1n:h(){q b.$1u.1n},dT:h(B){q B.3V&&B.3V.5E(/\\s/g,"8R").5E(/[^A-lS-lT-9\\-8R:\\.]/g,"")||b.l.hV+A.1q(B)},bC:h(B){q B.5E(/:/g,"\\\\:")},9S:h(){c B=b.68||(b.68="k-1u-"+A.1q(b.72[0]));q A.68.1G(1g,[B].5k(A.fa(1C)))},9R:h(P){b.72=b.19.is("1R")?b.19.6v("lU:7u, lQ:7u").eq(0):b.19;b.$3L=A("li:lP(a[4c])",b.72);b.$1u=b.$3L.79(h(){q A("a",b)[0]});b.$3M=A([]);c O=b,D=b.l;b.$1u.1L(h(R,Q){if(Q.7g&&Q.7g.5E("#","")){O.$3M=O.$3M.23(O.bC(Q.7g))}1j{if(A(Q).1Z("4c")!="#"){A.1q(Q,"4c.1u",Q.4c);A.1q(Q,"5K.1u",Q.4c);c T=O.dT(Q);Q.4c="#"+T;c S=A("#"+T);if(!S.1n){S=A(D.dM).1Z("id",T).1l(D.9Y).lL(O.$3M[R-1]||O.72);S.1q("3A.1u",1k)}O.$3M=O.$3M.23(S)}1j{D.1K.4o(R+1)}}});if(P){if(b.19.is("1R")){b.19.1l("k-1u k-1V k-1V-3F k-2q-3b")}b.72.1l(D.dD);b.$3L.1l(D.bT);b.$3M.1l(D.9Y);if(D.1U===3H){if(dG.7g){b.$1u.1L(h(R,Q){if(Q.7g==dG.7g){D.1U=R;q 1b}})}1j{if(D.68){c I=1s(O.9S(),10);if(I&&O.$1u[I]){D.1U=I}}1j{if(O.$3L.3u("."+D.43).1n){D.1U=O.$3L.3N(O.$3L.3u("."+D.43)[0])}}}}D.1U=D.1U===1g||D.1U!==3H?D.1U:0;D.1K=A.lM(D.1K.5k(A.79(b.$3L.3u("."+D.7f),h(R,Q){q O.$3L.3N(R)}))).8N();if(A.7N(D.1U,D.1K)!=-1){D.1K.bB(A.7N(D.1U,D.1K),1)}b.$3M.1l(D.6e);b.$3L.1w(D.43);if(D.1U!==1g&&b.$1u.1n){b.$3M.eq(D.1U).1w(D.6e);c E=[D.43];if(D.8M){E.4o(D.8L)}b.$3L.eq(D.1U).1l(E.5W(" "));c B=h(){O.1A("1I",1g,O.k(O.$1u[D.1U],O.$3M[D.1U]))};if(A.1q(b.$1u[D.1U],"5K.1u")){b.5K(D.1U,B)}1j{B()}}c K=h(R,Q){if(Q.is(":6W(."+D.7f+")")){Q.5N("k-1O-"+R)}};b.$3L.2Q("b3.1u ho.1u",h(){K("44",A(b))});b.$1u.2Q("2Y.1u 71.1u",h(){K("2Y",A(b).4t("li:7u"))});A(3D).2Q("lO",h(){O.$3L.23(O.$1u).3q(".1u");O.$3L=O.$1u=O.$3M=1g})}1j{D.1U=b.$3L.3N(b.$3L.3u("."+D.43)[0])}if(D.68){b.9S(D.1U,D.68)}1Q(c G=0,N;N=b.$3L[G];G++){A(N)[A.7N(G,D.1K)!=-1&&!A(N).4m(D.43)?"1l":"1w"](D.7f)}if(D.7d===1b){b.$1u.4y("7d.1u")}c J,C;if(D.fx){if(D.fx.4R==8F){J=D.fx[0];C=D.fx[1]}1j{J=C=D.fx}}h H(Q,R){Q.v({61:""});if(A.29.3Y&&R.2c){Q[0].3e.gq("3u")}}c L=C?h(Q,R){R.26(C,C.1M||"8z",h(){R.1w(D.6e);H(R,C);O.1A("1I",1g,O.k(Q,R[0]))})}:h(Q,R){R.1w(D.6e);O.1A("1I",1g,O.k(Q,R[0]))};c M=J?h(R,Q,S){Q.26(J,J.1M||"8z",h(){Q.1l(D.6e);H(Q,J);if(S){L(R,S,Q)}})}:h(R,Q,S){Q.1l(D.6e);if(S){L(R,S)}};h F(S,U,Q,T){c R=[D.43];if(D.8M){R.4o(D.8L)}U.1w("k-1O-2u").1l(R.5W(" ")).7X().1w(R.5W(" ")).1l("k-1O-2u");M(S,Q,T)}b.$1u.3q(".1u").2Q(D.1z+".1u",h(){c T=A(b).4t("li:eq(0)"),Q=O.$3M.3u(":5L"),S=A(O.bC(b.7g));if((T.4m("k-1O-2J")&&!D.8M)||T.4m(D.7f)||A(b).4m(D.a3)||O.1A("4S",1g,O.k(b,S[0]))===1b){b.71();q 1b}D.1U=O.$1u.3N(b);if(D.8M){if(T.4m("k-1O-2J")){O.l.1U=1g;T.1w([D.43,D.8L].5W(" ")).1l("k-1O-2u");O.$3M.3E();M(b,Q);b.71();q 1b}1j{if(!Q.1n){O.$3M.3E();c R=b;O.5K(O.$1u.3N(b),h(){T.1l([D.43,D.8L].5W(" ")).1w("k-1O-2u");L(R,S)});b.71();q 1b}}}if(D.68){O.9S(D.1U,D.68)}O.$3M.3E();if(S.1n){c R=b;O.5K(O.$1u.3N(b),Q.1n?h(){F(R,T,Q,S)}:h(){T.1l(D.43).1w("k-1O-2u");L(R,S)})}1j{8d"2t lk lf: le la lb."}if(A.29.3Y){b.71()}q 1b});if(D.1z!="1F"){b.$1u.2Q("1F.1u",h(){q 1b})}},23:h(E,D,C){if(C==3H){C=b.$1u.1n}c G=b.l;c I=A(G.hF.5E(/#\\{4c\\}/g,E).5E(/#\\{bE\\}/g,D));I.1l(G.bT).1q("3A.1u",1k);c H=E.6R("#")==0?E.5E("#",""):b.dT(A("a:7u-3w",I)[0]);c F=A("#"+H);if(!F.1n){F=A(G.dM).1Z("id",H).1l(G.6e).1q("3A.1u",1k)}F.1l(G.9Y);if(C>=b.$3L.1n){I.2K(b.72);F.2K(b.72[0].4x)}1j{I.e8(b.$3L[C]);F.e8(b.$3M[C])}G.1K=A.79(G.1K,h(K,J){q K>=C?++K:K});b.9R();if(b.$1u.1n==1){I.1l(G.43);F.1w(G.6e);c B=A.1q(b.$1u[0],"5K.1u");if(B){b.5K(C,B)}}b.1A("23",1g,b.k(b.$1u[C],b.$3M[C]))},2n:h(B){c D=b.l,E=b.$3L.eq(B).2n(),C=b.$3M.eq(B).2n();if(E.4m(D.43)&&b.$1u.1n>1){b.4S(B+(B+1<b.$1u.1n?1:-1))}D.1K=A.79(A.fe(D.1K,h(G,F){q G!=B}),h(G,F){q G>=B?--G:G});b.9R();b.1A("2n",1g,b.k(E.3v("a")[0],C[0]))},ea:h(B){c C=b.l;if(A.7N(B,C.1K)==-1){q}c D=b.$3L.eq(B).1w(C.7f);if(A.29.9P){D.v("61","4h-8b");8k(h(){D.v("61","8b")},0)}C.1K=A.fe(C.1K,h(F,E){q F!=B});b.1A("ea",1g,b.k(b.$1u[B],b.$3M[B]))},dV:h(C){c B=b,D=b.l;if(C!=D.1U){b.$3L.eq(C).1l(D.7f);D.1K.4o(C);D.1K.8N();b.1A("dV",1g,b.k(b.$1u[C],b.$3M[C]))}},4S:h(B){if(2L B=="4Q"){B=b.$1u.3N(b.$1u.3u("[4c$="+B+"]")[0])}b.$1u.eq(B).7v(b.l.1z+".1u")},5K:h(G,K){c L=b,D=b.l,E=b.$1u.eq(G),J=E[0],H=K==3H||K===1b,B=E.1q("5K.1u");K=K||h(){};if(!B||!H&&A.1q(J,"7d.1u")){K();q}c M=h(N){c O=A(N),P=O.3v("*:dF");q P.1n&&P.is(":6W(8P)")&&P||O};c C=h(){L.$1u.3u("."+D.a3).1w(D.a3).1L(h(){if(D.bF){M(b).1N().3i(M(b).1q("bE.1u"))}});L.bG=1g};if(D.bF){c I=M(J).3i();M(J).ln("<em></em>").3v("em").1q("bE.1u",I).3i(D.bF)}c F=A.1T({},D.eb,{i0:B,eR:h(O,N){A(L.bC(J.7g)).3i(O);C();if(D.7d){A.1q(J,"7d.1u",1k)}L.1A("5K",1g,L.k(L.$1u[G],L.$3M[G]));9Z{D.eb.eR(O,N)}aK(P){}K()}});if(b.bG){b.bG.iJ();C()}E.1l(D.a3);L.bG=A.lq(F)},i0:h(C,B){b.$1u.eq(C).4y("7d.1u").1q("5K.1u",B)},k:h(C,B){q{l:b.l,hK:C,hh:B,3N:b.$1u.3N(C)}}});A.1T(A.k.1u,{3J:"1.5b",9U:"1n",59:{eb:1g,7d:1b,68:1g,8M:1b,8L:"k-1u-8M",1K:[],7f:"k-1O-1K",1z:"1F",fx:1g,6e:"k-1u-1P",hV:"k-1u-",a3:"k-1u-lz",dD:"k-1u-lD k-1e-8Q k-1e-8W k-1V-4A k-2q-3b",bT:"k-1O-2u k-2q-u",9Y:"k-1u-hh k-1V-3F k-2q-3j",dM:"<1R></1R>",43:"k-1u-1U k-1O-2J",bF:"l8&#kD;",hF:\'<li><a 4c="#{4c}"><3h>#{bE}</3h></a></li>\'}});A.1T(A.k.1u.4p,{eu:1g,kF:h(C,F){F=F||1b;c B=b,E=b.l.1U;h G(){B.eu=kJ(h(){E=++E<B.$1u.1n?E:0;B.4S(E)},C)}h D(H){if(!H||H.h3){kH(B.eu)}}if(C){G();if(!F){b.$1u.2Q(b.l.1z+".1u",D)}1j{b.$1u.2Q(b.l.1z+".1u",h(){D();E=B.l.1U;G()})}}1j{D();b.$1u.3q(b.l.1z+".1u",D)}}})})(2t);(h($){$.1T($.k,{1d:{3J:"1.5b"}});c 7x="1d";h 9V(){b.he=1b;b.89=1g;b.c2=1b;b.6Q=[];b.8c=1b;b.8h=1b;b.eC="k-1d-1R";b.aX="k-1d-4h";b.db="k-1d-6A";b.6P="k-1d-7v";b.eF="k-1d-2h";b.ky="k-1d-1K";b.di="k-1d-6g";b.dh="k-1d-5Q-2G";b.ca="k-1d-kr-kq-5t";b.d9=[];b.d9[""]={9N:"kK",6j:"kL",6k:"l1",81:"l0",4H:["kZ","kY","l2","l7","hp","kW","kO","kN","kQ","kR","kV","lW"],4E:["kT","kS","lV","mc","hp","mX","mW","n3","n2","mM","mL","mJ"],53:["mK","mO","mT","mR","mQ","n6","ni"],5r:["nk","nm","nn","na","nd","nj","mb"],c8:["md","me","mh","mg","m8","m7","m0"],7F:"mm/dd/8f",4D:0,3I:1b};b.51={7M:"2Y",5x:"1I",eB:{},5H:1g,9I:"",7h:"...",8S:"",hN:1b,9T:1b,8T:1b,d6:1b,83:1b,86:1b,ak:1b,go:"-10:+10",91:1b,dU:b.c6,5q:"+10",2O:1g,3p:1g,1M:"8z",9B:1g,9z:1g,7w:1g,gX:1g,an:1g,gV:1,bV:0,69:1,87:12,aw:"",aW:"",hy:1k,c4:1b};$.1T(b.51,b.d9[""]);b.2S=$(\'<1R id="\'+b.eC+\'" 2w="k-1d k-1V k-1V-3F k-1e-8W k-2q-3b k-1e-30-lZ"></1R>\')}$.1T(9V.4p,{5P:"lX",dS:h(){if(b.he){m4.dS.1G("",1C)}},m3:h(2f){9b(b.51,2f||{});q b},fR:h(1i,2f){c 8U=1g;1Q(c bD in b.51){c bS=1i.mj("1h:"+bD);if(bS){8U=8U||{};9Z{8U[bD]=mk(bS)}aK(hc){8U[bD]=bS}}}c 3m=1i.3m.5T();c 4h=(3m=="1R"||3m=="3h");if(!1i.id){1i.id="dp"+(++b.a7)}c p=b.cS($(1i),4h);p.2f=$.1T({},2f||{},8U||{});if(3m=="1v"){b.hO(1i,p)}1j{if(4h){b.hv(1i,p)}}},cS:h(1i,4h){c id=1i[0].id.5E(/([:\\[\\]\\.])/g,"\\\\\\\\$1");q{id:id,1v:1i,57:0,4C:0,4T:0,2s:0,2E:0,4h:4h,2S:(!4h?b.2S:$(\'<1R 2w="\'+b.aX+\' k-1d k-1V k-1V-3F k-1e-8W k-2q-3b"></1R>\'))}},hO:h(1i,p){c 1v=$(1i);if(1v.4m(b.5P)){q}c 9I=b.1y(p,"9I");c 3I=b.1y(p,"3I");if(9I){1v[3I?"d8":"aY"](\'<3h 2w="\'+b.db+\'">\'+9I+"</3h>")}c 7M=b.1y(p,"7M");if(7M=="2Y"||7M=="7o"){1v.2Y(b.98)}if(7M=="3S"||7M=="7o"){c 7h=b.1y(p,"7h");c 8S=b.1y(p,"8S");c 7v=$(b.1y(p,"hN")?$("<8P/>").1l(b.6P).1Z({d4:8S,hH:7h,3V:7h}):$(\'<3S 5j="3S"></3S>\').1l(b.6P).3i(8S==""?7h:$("<8P/>").1Z({d4:8S,hH:7h,3V:7h})));1v[3I?"d8":"aY"](7v);7v.1F(h(){if($.1d.8c&&$.1d.9f==1i){$.1d.6h()}1j{$.1d.98(1i)}q 1b})}1v.1l(b.5P).7b(b.b5).a1(b.cd).2Q("d1.1d",h(1z,6y,1J){p.2f[6y]=1J}).2Q("d0.1d",h(1z,6y){q b.1y(p,6y)});$.1q(1i,7x,p)},hv:h(1i,p){c d7=$(1i);if(d7.4m(b.5P)){q}d7.1l(b.5P).6A(p.2S).2Q("d1.1d",h(1z,6y,1J){p.2f[6y]=1J}).2Q("d0.1d",h(1z,6y){q b.1y(p,6y)});$.1q(1i,7x,p);b.cB(p,b.c5(p));b.6S(p);b.b6(p)},ic:h(1v,hG,7w,2f,2W){c p=b.hI;if(!p){c id="dp"+(++b.a7);b.6p=$(\'<1v 5j="aP" id="\'+id+\'" 1H="1" 3e="1f: 2k; u: -h2;"/>\');b.6p.7b(b.b5);$("22").6A(b.6p);p=b.hI=b.cS(b.6p,1b);p.2f={};$.1q(b.6p[0],7x,p)}9b(p.2f,2f||{});b.6p.88(hG);b.5s=(2W?(2W.1n?2W:[2W.3d,2W.3l]):1g);if(!b.5s){c hM=3D.aU||1m.5z.aN||1m.22.aN;c hJ=3D.aF||1m.5z.b0||1m.22.b0;c hS=1m.5z.24||1m.22.24;c hP=1m.5z.2b||1m.22.2b;b.5s=[(hM/2)-3n+hS,(hJ/2)-ah+hP]}b.6p.v("t",b.5s[0]+"3C").v("u",b.5s[1]+"3C");p.2f.7w=7w;b.8h=1k;b.2S.1l(b.eF);b.98(b.6p[0]);if($.ao){$.ao(b.2S)}$.1q(b.6p[0],7x,p);q b},j0:h(1i){c $1i=$(1i);if(!$1i.4m(b.5P)){q}c 3m=1i.3m.5T();$.4y(1i,7x);if(3m=="1v"){$1i.7X("."+b.db).2n().4I().7X("."+b.6P).2n().4I().1w(b.5P).3q("2Y",b.98).3q("7b",b.b5).3q("a1",b.cd)}1j{if(3m=="1R"||3m=="3h"){$1i.1w(b.5P).cI()}}},iR:h(1i){c $1i=$(1i);if(!$1i.4m(b.5P)){q}c 3m=1i.3m.5T();if(3m=="1v"){1i.1K=1b;$1i.7X("3S."+b.6P).1L(h(){b.1K=1b}).4I().7X("8P."+b.6P).v({2c:"1.0",2r:""})}1j{if(3m=="1R"||3m=="3h"){c 4h=$1i.6v("."+b.aX);4h.6v().1w("k-1O-1K")}}b.6Q=$.79(b.6Q,h(1J){q(1J==1i?1g:1J)})},iY:h(1i){c $1i=$(1i);if(!$1i.4m(b.5P)){q}c 3m=1i.3m.5T();if(3m=="1v"){1i.1K=1k;$1i.7X("3S."+b.6P).1L(h(){b.1K=1k}).4I().7X("8P."+b.6P).v({2c:"0.5",2r:"2u"})}1j{if(3m=="1R"||3m=="3h"){c 4h=$1i.6v("."+b.aX);4h.6v().1l("k-1O-1K")}}b.6Q=$.79(b.6Q,h(1J){q(1J==1i?1g:1J)});b.6Q[b.6Q.1n]=1i},ap:h(1i){if(!1i){q 1b}1Q(c i=0;i<b.6Q.1n;i++){if(b.6Q[i]==1i){q 1k}}q 1b},4K:h(1i){9Z{q $.1q(1i,7x)}aK(hc){8d"hU 1W 1q 1Q b 1d"}},hi:h(1i,4g,1J){c 2f=4g||{};if(2L 4g=="4Q"){2f={};2f[4g]=1J}c p=b.4K(1i);if(p){if(b.89==p){b.6h(1g)}9b(p.2f,2f);c 1h=2d 2j();9b(p,{63:1g,8O:1g,9Q:1g,4Z:1g,57:1h.3y(),4C:1h.3W(),4T:1h.2P(),4V:1h.3y(),5D:1h.3W(),5e:1h.2P(),2s:1h.3W(),2E:1h.2P()});b.6S(p)}},iH:h(1i,4g,1J){b.hi(1i,4g,1J)},iA:h(1i){c p=b.4K(1i);if(p){b.6S(p)}},iz:h(1i,1h,8K){c p=b.4K(1i);if(p){b.cB(p,1h,8K);b.6S(p);b.b6(p)}},it:h(1i){c p=b.4K(1i);if(p&&!p.4h){b.e3(p)}q(p?b.dy(p):1g)},b5:h(1z){c p=$.1d.4K(1z.1i);c 6w=1k;c 3I=p.2S.is(".k-1d-ht");p.c2=1k;if($.1d.8c){4B(1z.2Z){1t 9:$.1d.6h(1g,"");1x;1t 13:c cQ=$("7n."+$.1d.ca+", 7n."+$.1d.dh,p.2S);if(cQ[0]){$.1d.dc(1z.1i,p.4C,p.4T,cQ[0])}1j{$.1d.6h(1g,$.1d.1y(p,"1M"))}q 1b;1x;1t 27:$.1d.6h(1g,$.1d.1y(p,"1M"));1x;1t 33:$.1d.5n(1z.1i,(1z.4i?-$.1d.1y(p,"87"):-$.1d.1y(p,"69")),"M");1x;1t 34:$.1d.5n(1z.1i,(1z.4i?+$.1d.1y(p,"87"):+$.1d.1y(p,"69")),"M");1x;1t 35:if(1z.4i||1z.4M){$.1d.hW(1z.1i)}6w=1z.4i||1z.4M;1x;1t 36:if(1z.4i||1z.4M){$.1d.e7(1z.1i)}6w=1z.4i||1z.4M;1x;1t 37:if(1z.4i||1z.4M){$.1d.5n(1z.1i,(3I?+1:-1),"D")}6w=1z.4i||1z.4M;if(1z.h0.ct){$.1d.5n(1z.1i,(1z.4i?-$.1d.1y(p,"87"):-$.1d.1y(p,"69")),"M")}1x;1t 38:if(1z.4i||1z.4M){$.1d.5n(1z.1i,-7,"D")}6w=1z.4i||1z.4M;1x;1t 39:if(1z.4i||1z.4M){$.1d.5n(1z.1i,(3I?-1:+1),"D")}6w=1z.4i||1z.4M;if(1z.h0.ct){$.1d.5n(1z.1i,(1z.4i?+$.1d.1y(p,"87"):+$.1d.1y(p,"69")),"M")}1x;1t 40:if(1z.4i||1z.4M){$.1d.5n(1z.1i,+7,"D")}6w=1z.4i||1z.4M;1x;2u:6w=1b}}1j{if(1z.2Z==36&&1z.4i){$.1d.98(b)}1j{6w=1b}}if(6w){1z.7Y();1z.hk()}},cd:h(1z){c p=$.1d.4K(1z.1i);if($.1d.1y(p,"hy")){c 6F=$.1d.hT($.1d.1y(p,"7F"));c ck=a9.i6(1z.hx==3H?1z.2Z:1z.hx);q 1z.4i||(ck<" "||!6F||6F.6R(ck)>-1)}},98:h(1v){1v=1v.1i||1v;if(1v.3m.5T()!="1v"){1v=$("1v",1v.4x)[0]}if($.1d.ap(1v)||$.1d.9f==1v){q}c p=$.1d.4K(1v);c 9z=$.1d.1y(p,"9z");9b(p.2f,(9z?9z.1G(1v,[1v,p]):{}));$.1d.6h(1g,"");$.1d.9f=1v;$.1d.e3(p);if($.1d.8h){1v.1J=""}if(!$.1d.5s){$.1d.5s=$.1d.hj(1v);$.1d.5s[1]+=1v.4J}c 6O=1b;$(1v).4t().1L(h(){6O|=$(b).v("1f")=="5v";q!6O});if(6O&&$.29.8Z){$.1d.5s[0]-=1m.5z.24;$.1d.5s[1]-=1m.5z.2b}c 1c={t:$.1d.5s[0],u:$.1d.5s[1]};$.1d.5s=1g;p.63=1g;p.2S.v({1f:"2k",61:"8b",u:"-ip"});$.1d.6S(p);1c=$.1d.hl(p,1c,6O);p.2S.v({1f:($.1d.8h&&$.ao?"5U":(6O?"5v":"2k")),61:"78",t:1c.t+"3C",u:1c.u+"3C"});if(!p.4h){c 5x=$.1d.1y(p,"5x")||"1I";c 1M=$.1d.1y(p,"1M");c 7G=h(){$.1d.8c=1k;if($.29.3Y&&1s($.29.3J,10)<7){$("aM.k-1d-d5").v({1a:p.2S.1a()+4,18:p.2S.18()+4})}};if($.1p&&$.1p[5x]){p.2S.1I(5x,$.1d.1y(p,"eB"),1M,7G)}1j{p.2S[5x](1M,7G)}if(1M==""){7G()}if(p.1v[0].5j!="30"){p.1v[0].2Y()}$.1d.89=p}},6S:h(p){c cL={1a:p.2S.1a()+4,18:p.2S.18()+4};c hq=b;p.2S.cI().6A(b.hC(p)).3v("aM.k-1d-d5").v({1a:cL.1a,18:cL.18}).4I().3v("3S, .k-1d-48, .k-1d-3T, .k-1d-c7 7n a").2Q("ho",h(){$(b).1w("k-1O-44");if(b.6f.6R("k-1d-48")!=-1){$(b).1w("k-1d-48-44")}if(b.6f.6R("k-1d-3T")!=-1){$(b).1w("k-1d-3T-44")}}).2Q("b3",h(){if(!hq.ap(p.4h?p.2S.1N()[0]:p.1v[0])){$(b).4t(".k-1d-c7").3v("a").1w("k-1O-44");$(b).1l("k-1O-44");if(b.6f.6R("k-1d-48")!=-1){$(b).1l("k-1d-48-44")}if(b.6f.6R("k-1d-3T")!=-1){$(b).1l("k-1d-3T-44")}}}).4I().3v("."+b.ca+" a").7v("b3").4I();c 4k=b.bY(p);c b7=4k[1];c 1a=17;if(b7>1){p.2S.1l("k-1d-aI-"+b7).v("1a",(1a*b7)+"em")}1j{p.2S.1w("k-1d-aI-2 k-1d-aI-3 k-1d-aI-4").1a("")}p.2S[(4k[0]!=1||4k[1]!=1?"23":"2n")+"hs"]("k-1d-aI");p.2S[(b.1y(p,"3I")?"23":"2n")+"hs"]("k-1d-ht");if(p.1v&&p.1v[0].5j!="30"&&p==$.1d.89){$(p.1v[0]).2Y()}},hl:h(p,1c,6O){c ai=p.2S.3s();c aV=p.2S.31();c hz=p.1v?p.1v.3s():0;c ev=p.1v?p.1v.31():0;c b1=3D.aU||1m.5z.aN||1m.22.aN;c aQ=3D.aF||1m.5z.b0||1m.22.b0;1c.t-=(b.1y(p,"3I")?(ai-hz):0);1c.t-=(6O&&1c.t==p.1v.1c().t)?$(1m).24():0;1c.u-=(6O&&1c.u==(p.1v.1c().u+ev))?$(1m).2b():0;1c.t-=(1c.t+ai>b1&&b1>ai)?1o.4e(1c.t+ai-b1):0;1c.u-=(1c.u+aV>aQ&&aQ>aV)?1o.4e(1c.u+aV+ev*2-aQ):0;q 1c},hj:h(8a){6J(8a&&(8a.5j=="30"||8a.h6!=1)){8a=8a.h7}c 1f=$(8a).1c();q[1f.t,1f.u]},6h:h(1v,1M){c p=b.89;if(!p||(1v&&p!=$.1q(1v,7x))){q}if(p.9p){b.aR("#"+p.id,b.aH(p,p.4V,p.5D,p.5e))}p.9p=1b;if(b.8c){1M=(1M!=1g?1M:b.1y(p,"1M"));c 5x=b.1y(p,"5x");c 7G=h(){$.1d.ew(p)};if(1M!=""&&$.1p&&$.1p[5x]){p.2S.1P(5x,$.1d.1y(p,"eB"),1M,7G)}1j{p.2S[(1M==""?"1P":(5x=="ki"?"kl":(5x=="kk"?"kd":"1P")))](1M,7G)}if(1M==""){b.ew(p)}c an=b.1y(p,"an");if(an){an.1G((p.1v?p.1v[0]:1g),[(p.1v?p.1v.88():""),p])}b.8c=1b;b.9f=1g;if(b.8h){b.6p.v({1f:"2k",t:"0",u:"-h2"});if($.ao){$.k5();$("22").6A(b.2S)}}b.8h=1b}b.89=1g},ew:h(p){p.2S.1w(b.eF).3q(".k-1d-c7")},fQ:h(1z){if(!$.1d.89){q}c $1i=$(1z.1i);if(($1i.4t("#"+$.1d.eC).1n==0)&&!$1i.4m($.1d.5P)&&!$1i.4m($.1d.6P)&&$.1d.8c&&!($.1d.8h&&$.ao)){$.1d.6h(1g,"")}},5n:h(id,1c,5R){c 1i=$(id);c p=b.4K(1i[0]);if(b.ap(1i[0])){q}b.bU(p,1c,5R);b.6S(p)},e7:h(id){c 1i=$(id);c p=b.4K(1i[0]);if(b.1y(p,"d6")&&p.4V){p.57=p.4V;p.2s=p.4C=p.5D;p.2E=p.4T=p.5e}1j{c 1h=2d 2j();p.57=1h.3y();p.2s=p.4C=1h.3W();p.2E=p.4T=1h.2P()}b.am(p);b.5n(1i)},dn:h(id,4S,5R){c 1i=$(id);c p=b.4K(1i[0]);p.aO=1b;p["1U"+(5R=="M"?"hd":"hE")]=p["jc"+(5R=="M"?"hd":"hE")]=1s(4S.l[4S.j5].1J,10);b.am(p);b.5n(1i)},dm:h(id){c 1i=$(id);c p=b.4K(1i[0]);if(p.1v&&p.aO&&!$.29.3Y){p.1v[0].2Y()}p.aO=!p.aO},dc:h(id,2p,2e,7n){c 1i=$(id);if($(7n).4m(b.di)||b.ap(1i[0])){q}c p=b.4K(1i[0]);p.57=p.4V=$("a",7n).3i();p.4C=p.5D=2p;p.4T=p.5e=2e;if(p.9p){p.8O=p.9Q=p.4Z=1g}b.aR(id,b.aH(p,p.4V,p.5D,p.5e));if(p.9p){p.63=b.4d(2d 2j(p.5e,p.5D,p.4V));b.6S(p)}},hW:h(id){c 1i=$(id);c p=b.4K(1i[0]);p.9p=1b;p.8O=p.9Q=p.4Z=p.63=1g;b.aR(1i,"")},aR:h(id,7i){c 1i=$(id);c p=b.4K(1i[0]);7i=(7i!=1g?7i:b.aH(p));if(p.1v){p.1v.88(7i)}b.b6(p);c 7w=b.1y(p,"7w");if(7w){7w.1G((p.1v?p.1v[0]:1g),[7i,p])}1j{if(p.1v){p.1v.7v("8m")}}if(p.4h){b.6S(p)}1j{if(!p.9p){b.6h(1g,b.1y(p,"1M"));b.9f=p.1v[0];if(2L(p.1v[0])!="7z"){p.1v[0].2Y()}b.9f=1g}}},b6:h(p){c aw=b.1y(p,"aw");if(aw){c aW=b.1y(p,"aW")||b.1y(p,"7F");c 1h=b.dy(p);7i=b.9k(aW,1h,b.7D(p));$(aw).1L(h(){$(b).88(7i)})}},jC:h(1h){c 2G=1h.9s();q[(2G>0&&2G<6),""]},c6:h(1h){c 67=2d 2j(1h.2P(),1h.3W(),1h.3y());c 9h=2d 2j(67.2P(),1-1,4);c 4D=9h.9s()||7;9h.au(9h.3y()+1-4D);if(4D<4&&67<9h){67.au(67.3y()-3);q $.1d.c6(67)}1j{if(67>2d 2j(67.2P(),12-1,28)){4D=2d 2j(67.2P()+1,1-1,4).9s()||7;if(4D>4&&(67.9s()||7)<4D-3){q 1}}}q 1o.9L(((67-9h)/jw)/7)+1},hR:h(3R,1J,2f){if(3R==1g||1J==1g){8d"ek 1C"}1J=(2L 1J=="7z"?1J.e9():1J+"");if(1J==""){q 1g}c 5q=(2f?2f.5q:1g)||b.51.5q;c 5r=(2f?2f.5r:1g)||b.51.5r;c 53=(2f?2f.53:1g)||b.51.53;c 4E=(2f?2f.4E:1g)||b.51.4E;c 4H=(2f?2f.4H:1g)||b.51.4H;c 2e=-1;c 2p=-1;c 2G=-1;c 8e=-1;c 5m=1b;c 5o=h(3G){c 4X=(3r+1<3R.1n&&3R.4b(3r+1)==3G);if(4X){3r++}q 4X};c 9g=h(3G){5o(3G);c e6=(3G=="@"?14:(3G=="y"?4:(3G=="o"?3:2)));c 1H=e6;c 6M=0;6J(1H>0&&5J<1J.1n&&1J.4b(5J)>="0"&&1J.4b(5J)<="9"){6M=6M*10+1s(1J.4b(5J++),10);1H--}if(1H==e6){8d"hU 8C at 1f "+5J}q 6M};c e4=h(3G,aT,aS){c 9H=(5o(3G)?aS:aT);c 1H=0;1Q(c j=0;j<9H.1n;j++){1H=1o.2T(1H,9H[j].1n)}c 4g="";c hZ=5J;6J(1H>0&&5J<1J.1n){4g+=1J.4b(5J++);1Q(c i=0;i<9H.1n;i++){if(4g==9H[i]){q i+1}}1H--}8d"ju 4g at 1f "+hZ};c b2=h(){if(1J.4b(5J)!=3R.4b(3r)){8d"jo 5m at 1f "+5J}5J++};c 5J=0;1Q(c 3r=0;3r<3R.1n;3r++){if(5m){if(3R.4b(3r)=="\'"&&!5o("\'")){5m=1b}1j{b2()}}1j{4B(3R.4b(3r)){1t"d":2G=9g("d");1x;1t"D":e4("D",5r,53);1x;1t"o":8e=9g("o");1x;1t"m":2p=9g("m");1x;1t"M":2p=e4("M",4E,4H);1x;1t"y":2e=9g("y");1x;1t"@":c 1h=2d 2j(9g("@"));2e=1h.2P();2p=1h.3W()+1;2G=1h.3y();1x;1t"\'":if(5o("\'")){b2()}1j{5m=1k}1x;2u:b2()}}}if(2e==-1){2e=2d 2j().2P()}1j{if(2e<3n){2e+=2d 2j().2P()-2d 2j().2P()%3n+(2e<=5q?0:-3n)}}if(8e>-1){2p=1;2G=8e;do{c dX=b.8g(2e,2p-1);if(2G<=dX){1x}2p++;2G-=dX}6J(1k)}c 1h=b.4d(2d 2j(2e,2p-1,2G));if(1h.2P()!=2e||1h.3W()+1!=2p||1h.3y()!=2G){8d"ek 1h"}q 1h},jm:"8f-mm-dd",j8:"D, dd M 8f",jh:"8f-mm-dd",jf:"D, d M y",k7:"k3, dd-M-y",jO:"D, d M y",jN:"D, d M 8f",jM:"D, d M 8f",jI:"D, d M y",jZ:"@",k0:"8f-mm-dd",9k:h(3R,1h,2f){if(!1h){q""}c 5r=(2f?2f.5r:1g)||b.51.5r;c 53=(2f?2f.53:1g)||b.51.53;c 4E=(2f?2f.4E:1g)||b.51.4E;c 4H=(2f?2f.4H:1g)||b.51.4H;c 5o=h(3G){c 4X=(3r+1<3R.1n&&3R.4b(3r+1)==3G);if(4X){3r++}q 4X};c bN=h(3G,1J,h8){c 6M=""+1J;if(5o(3G)){6J(6M.1n<h8){6M="0"+6M}}q 6M};c co=h(3G,1J,aT,aS){q(5o(3G)?aS[1J]:aT[1J])};c 5G="";c 5m=1b;if(1h){1Q(c 3r=0;3r<3R.1n;3r++){if(5m){if(3R.4b(3r)=="\'"&&!5o("\'")){5m=1b}1j{5G+=3R.4b(3r)}}1j{4B(3R.4b(3r)){1t"d":5G+=bN("d",1h.3y(),2);1x;1t"D":5G+=co("D",1h.9s(),5r,53);1x;1t"o":c 8e=1h.3y();1Q(c m=1h.3W()-1;m>=0;m--){8e+=b.8g(1h.2P(),m)}5G+=bN("o",8e,3);1x;1t"m":5G+=bN("m",1h.3W()+1,2);1x;1t"M":5G+=co("M",1h.3W(),4E,4H);1x;1t"y":5G+=(5o("y")?1h.2P():(1h.ha()%3n<10?"0":"")+1h.ha()%3n);1x;1t"@":5G+=1h.41();1x;1t"\'":if(5o("\'")){5G+="\'"}1j{5m=1k}1x;2u:5G+=3R.4b(3r)}}}}q 5G},hT:h(3R){c 6F="";c 5m=1b;1Q(c 3r=0;3r<3R.1n;3r++){if(5m){if(3R.4b(3r)=="\'"&&!5o("\'")){5m=1b}1j{6F+=3R.4b(3r)}}1j{4B(3R.4b(3r)){1t"d":1t"m":1t"y":1t"@":6F+="lh";1x;1t"D":1t"M":q 1g;1t"\'":if(5o("\'")){6F+="\'"}1j{5m=1k}1x;2u:6F+=3R.4b(3r)}}}q 6F},1y:h(p,4g){q p.2f[4g]!==3H?p.2f[4g]:b.51[4g]},e3:h(p){c 7F=b.1y(p,"7F");c ax=p.1v?p.1v.88():1g;p.8O=p.9Q=p.4Z=1g;c 1h=5H=b.c5(p);c 2f=b.7D(p);9Z{1h=b.hR(7F,ax,2f)||5H}aK(1z){b.dS(1z);1h=5H}p.57=1h.3y();p.2s=p.4C=1h.3W();p.2E=p.4T=1h.2P();p.4V=(ax?1h.3y():0);p.5D=(ax?1h.3W():0);p.5e=(ax?1h.2P():0);b.bU(p)},c5:h(p){c 1h=b.bX(b.1y(p,"5H"),2d 2j());c 2O=b.6z(p,"3K",1k);c 3p=b.6z(p,"2T");1h=(2O&&1h<2O?2O:1h);1h=(3p&&1h>3p?3p:1h);q 1h},bX:h(1h,5H){c h1=h(1c){c 1h=2d 2j();1h.au(1h.3y()+1c);q 1h};c hb=h(1c,dP){c 1h=2d 2j();c 2e=1h.2P();c 2p=1h.3W();c 2G=1h.3y();c dO=/([+-]?[0-9]+)\\s*(d|D|w|W|m|M|y|Y)?/g;c 4X=dO.73(1c);6J(4X){4B(4X[2]||"d"){1t"d":1t"D":2G+=1s(4X[1],10);1x;1t"w":1t"W":2G+=1s(4X[1],10)*7;1x;1t"m":1t"M":2p+=1s(4X[1],10);2G=1o.3K(2G,dP(2e,2p));1x;1t"y":1t"Y":2e+=1s(4X[1],10);2G=1o.3K(2G,dP(2e,2p));1x}4X=dO.73(1c)}q 2d 2j(2e,2p,2G)};1h=(1h==1g?5H:(2L 1h=="4Q"?hb(1h,b.8g):(2L 1h=="8C"?(ac(1h)?5H:h1(1h)):1h)));1h=(1h&&1h.e9()=="ek 2j"?5H:1h);if(1h){1h.hA(0);1h.kf(0);1h.kg(0);1h.k2(0)}q b.4d(1h)},4d:h(1h){if(!1h){q 1g}1h.hA(1h.hD()>12?1h.hD()+2:0);q 1h},cB:h(p,1h,8K){c hr=!(1h);c hn=p.4C;c hm=p.4T;1h=b.bX(1h,2d 2j());p.57=p.4V=1h.3y();p.2s=p.4C=p.5D=1h.3W();p.2E=p.4T=p.5e=1h.2P();if(hn!=p.4C||hm!=p.4T){b.am(p)}b.bU(p);if(p.1v){p.1v.88(hr?"":b.aH(p))}},dy:h(p){c hB=(!p.5e||(p.1v&&p.1v.88()=="")?1g:b.4d(2d 2j(p.5e,p.5D,p.4V)));q hB},hC:h(p){c 6V=2d 2j();6V=b.4d(2d 2j(6V.2P(),6V.3W(),6V.3y()));c 3I=b.1y(p,"3I");c c4=b.1y(p,"c4");c 9T=b.1y(p,"9T");c 8T=b.1y(p,"8T");c 4k=b.bY(p);c bV=b.1y(p,"bV");c 69=b.1y(p,"69");c 87=b.1y(p,"87");c c3=(4k[0]!=1||4k[1]!=1);c a5=b.4d((!p.4V?2d 2j(ia,9,9):2d 2j(p.5e,p.5D,p.4V)));c 2O=b.6z(p,"3K",1k);c 3p=b.6z(p,"2T");c 2s=p.2s-bV;c 2E=p.2E;if(2s<0){2s+=12;2E--}if(3p){c a4=b.4d(2d 2j(3p.2P(),3p.3W()-4k[1]+1,3p.3y()));a4=(2O&&a4<2O?2O:a4);6J(b.4d(2d 2j(2E,2s,1))>a4){2s--;if(2s<0){2s=11;2E--}}}c 6j=b.1y(p,"6j");6j=(!8T?6j:b.9k(6j,b.4d(2d 2j(2E,2s-69,1)),b.7D(p)));c 48=(b.cg(p,-1,2E,2s)?\'<a 2w="k-1d-48 k-2q-3b" 82="2t.1d.5n(\\\'#\'+p.id+"\', -"+69+", \'M\');\\" 3V=\\""+6j+\'"><3h 2w="k-3U k-3U-bW-8V-\'+(3I?"e":"w")+\'">\'+6j+"</3h></a>":(9T?"":\'<a 2w="k-1d-48 k-2q-3b k-1O-1K" 3V="\'+6j+\'"><3h 2w="k-3U k-3U-bW-8V-\'+(3I?"e":"w")+\'">\'+6j+"</3h></a>"));c 6k=b.1y(p,"6k");6k=(!8T?6k:b.9k(6k,b.4d(2d 2j(2E,2s+69,1)),b.7D(p)));c 3T=(b.cg(p,+1,2E,2s)?\'<a 2w="k-1d-3T k-2q-3b" 82="2t.1d.5n(\\\'#\'+p.id+"\', +"+69+", \'M\');\\" 3V=\\""+6k+\'"><3h 2w="k-3U k-3U-bW-8V-\'+(3I?"w":"e")+\'">\'+6k+"</3h></a>":(9T?"":\'<a 2w="k-1d-3T k-2q-3b k-1O-1K" 3V="\'+6k+\'"><3h 2w="k-3U k-3U-bW-8V-\'+(3I?"w":"e")+\'">\'+6k+"</3h></a>"));c 81=b.1y(p,"81");c dJ=(b.1y(p,"d6")&&p.4V?a5:6V);81=(!8T?81:b.9k(81,dJ,b.7D(p)));c cp=\'<3S 5j="3S" 2w="k-1d-7y k-1O-2u k-hY-my k-2q-3b" 82="2t.1d.6h();">\'+b.1y(p,"9N")+"</3S>";c eQ=(c4)?\'<1R 2w="k-1d-hg k-1V-3F">\'+(3I?cp:"")+(b.cO(p,dJ)?\'<3S 5j="3S" 2w="k-1d-5Q k-1O-2u k-hY-8H k-2q-3b" 82="2t.1d.e7(\\\'#\'+p.id+"\');\\">"+81+"</3S>":"")+(3I?"":cp)+"</1R>":"";c 4D=1s(b.1y(p,"4D"),10);4D=(ac(4D)?0:4D);c 53=b.1y(p,"53");c 5r=b.1y(p,"5r");c c8=b.1y(p,"c8");c 4H=b.1y(p,"4H");c 4E=b.1y(p,"4E");c 9B=b.1y(p,"9B");c 91=b.1y(p,"91");c dU=b.1y(p,"dU")||b.c6;c 8K=p.8O?b.4d(2d 2j(p.4Z,p.9Q,p.8O)):a5;c 5H=b.c5(p);c 3i="";1Q(c 95=0;95<4k[0];95++){c 7r="";1Q(c a0=0;a0<4k[1];a0++){c 7Z=b.4d(2d 2j(2E,2s,p.57));c 80=" k-2q-3b";c 5I="";if(c3){5I+=\'<1R 2w="k-1d-7r k-1d-7r-\';4B(a0){1t 0:5I+="7u";80=" k-2q-"+(3I?"2X":"t");1x;1t 4k[1]-1:5I+="dF";80=" k-2q-"+(3I?"t":"2X");1x;2u:5I+="8p";80="";1x}5I+=\'">\'}5I+=\'<1R 2w="k-1d-4A k-1V-4A k-1e-8W\'+80+\'">\'+(/3b|t/.1S(80)&&95==0?(3I?3T:48):"")+(/3b|2X/.1S(80)&&95==0?(3I?48:3T):"")+b.gy(p,2s,2E,2O,3p,7Z,95>0||a0>0,4H,4E)+\'</1R><eV 2w="k-1d-c7"><9O><c9>\';c 9O="";1Q(c 70=0;70<7;70++){c 2G=(70+4D)%7;9O+="<fl"+((70+4D+6)%7>=5?\' 2w="k-1d-gZ-4I"\':"")+\'><3h 3V="\'+53[2G]+\'">\'+c8[2G]+"</3h></fl>"}5I+=9O+"</c9></9O><aE>";c ej=b.8g(2E,2s);if(2E==p.4T&&2s==p.4C){p.57=1o.3K(p.57,ej)}c eE=(b.gM(2E,2s)-4D+7)%7;c f4=(c3?6:1o.fi((eE+ej)/7));c 49=b.4d(2d 2j(2E,2s,1-eE));1Q(c cF=0;cF<f4;cF++){5I+="<c9>";c aE="";1Q(c 70=0;70<7;70++){c 9M=(9B?9B.1G((p.1v?p.1v[0]:1g),[49]):[1k,""]);c 90=(49.3W()!=2s);c 6g=90||!9M[0]||(2O&&49<2O)||(3p&&49>3p);aE+=\'<7n 2w="\'+((70+4D+6)%7>=5?" k-1d-gZ-4I":"")+(90?" k-1d-l4-2p":"")+((49.41()==7Z.41()&&2s==p.4C&&p.c2)||(5H.41()==49.41()&&5H.41()==7Z.41())?" "+b.ca:"")+(6g?" "+b.di+" k-1O-1K":"")+(90&&!91?"":" "+9M[1]+(49.41()>=a5.41()&&49.41()<=8K.41()?" "+b.dh:"")+(49.41()==6V.41()?" k-1d-6V":""))+\'"\'+((!90||91)&&9M[2]?\' 3V="\'+9M[2]+\'"\':"")+(6g?"":" 82=\\"2t.1d.dc(\'#"+p.id+"\',"+2s+","+2E+\', b);q 1b;"\')+">"+(90?(91?49.3y():"&#dk;"):(6g?\'<3h 2w="k-1O-2u">\'+49.3y()+"</3h>":\'<a 2w="k-1O-2u\'+(49.41()==6V.41()?" k-1O-eT":"")+(49.41()>=a5.41()&&49.41()<=8K.41()?" k-1O-2J":"")+\'" 4c="#">\'+49.3y()+"</a>"))+"</7n>";49.au(49.3y()+1);49=b.4d(49)}5I+=aE+"</c9>"}2s++;if(2s>11){2s=0;2E++}5I+="</aE></eV>"+(c3?"</1R>":"");7r+=5I}3i+=7r}3i+=(!p.4h?eQ:"")+($.29.3Y&&1s($.29.3J,10)<7&&!p.4h?\'<aM d4="mE:1b;" 2w="k-1d-d5" mw="0"></aM>\':"");p.c2=1b;q 3i},gy:h(p,2s,2E,2O,3p,7Z,8H,4H,4E){2O=(p.63&&2O&&7Z<2O?7Z:2O);c 83=b.1y(p,"83");c 86=b.1y(p,"86");c ak=b.1y(p,"ak");c 3i=\'<1R 2w="k-1d-3V">\';c 84="";if(8H||!83){84+=\'<3h 2w="k-1d-2p">\'+4H[2s]+"</3h> "}1j{c gw=(2O&&2O.2P()==2E);c gp=(3p&&3p.2P()==2E);84+=\'<4S 2w="k-1d-2p" gk="2t.1d.dn(\\\'#\'+p.id+"\', b, \'M\');\\" 82=\\"2t.1d.dm(\'#"+p.id+"\');\\">";1Q(c 2p=0;2p<12;2p++){if((!gw||2p>=2O.3W())&&(!gp||2p<=3p.3W())){84+=\'<5O 1J="\'+2p+\'"\'+(2p==2s?\' 1U="1U"\':"")+">"+4E[2p]+"</5O>"}}84+="</4S>"}if(!ak){3i+=84+((8H||83||86)&&(!(83&&86))?"&#dk;":"")}if(8H||!86){3i+=\'<3h 2w="k-1d-2e">\'+2E+"</3h>"}1j{c 7q=b.1y(p,"go").9a(":");c 2e=0;c 4Z=0;if(7q.1n!=2){2e=2E-10;4Z=2E+10}1j{if(7q[0].4b(0)=="+"||7q[0].4b(0)=="-"){2e=4Z=2d 2j().2P();2e+=1s(7q[0],10);4Z+=1s(7q[1],10)}1j{2e=1s(7q[0],10);4Z=1s(7q[1],10)}}2e=(2O?1o.2T(2e,2O.2P()):2e);4Z=(3p?1o.3K(4Z,3p.2P()):4Z);3i+=\'<4S 2w="k-1d-2e" gk="2t.1d.dn(\\\'#\'+p.id+"\', b, \'Y\');\\" 82=\\"2t.1d.dm(\'#"+p.id+"\');\\">";1Q(;2e<=4Z;2e++){3i+=\'<5O 1J="\'+2e+\'"\'+(2e==2E?\' 1U="1U"\':"")+">"+2e+"</5O>"}3i+="</4S>"}if(ak){3i+=(8H||83||86?"&#dk;":"")+84}3i+="</1R>";q 3i},bU:h(p,1c,5R){c 2e=p.2E+(5R=="Y"?1c:0);c 2p=p.2s+(5R=="M"?1c:0);c 2G=1o.3K(p.57,b.8g(2e,2p))+(5R=="D"?1c:0);c 1h=b.4d(2d 2j(2e,2p,2G));c 2O=b.6z(p,"3K",1k);c 3p=b.6z(p,"2T");1h=(2O&&1h<2O?2O:1h);1h=(3p&&1h>3p?3p:1h);p.57=1h.3y();p.2s=p.4C=1h.3W();p.2E=p.4T=1h.2P();if(5R=="M"||5R=="Y"){b.am(p)}},am:h(p){c cr=b.1y(p,"gX");if(cr){cr.1G((p.1v?p.1v[0]:1g),[p.4T,p.4C+1,p])}},bY:h(p){c 4k=b.1y(p,"gV");q(4k==1g?[1,1]:(2L 4k=="8C"?[1,4k]:4k))},6z:h(p,gU,gN){c 1h=b.bX(b.1y(p,gU+"2j"),1g);q(!gN||!p.63?1h:(!1h||p.63>1h?p.63:1h))},8g:h(2e,2p){q 32-2d 2j(2e,2p,32).3y()},gM:h(2e,2p){q 2d 2j(2e,2p,1).9s()},cg:h(p,1c,gL,gJ){c 4k=b.bY(p);c 1h=b.4d(2d 2j(gL,gJ+(1c<0?1c:4k[1]),1));if(1c<0){1h.au(b.8g(1h.2P(),1h.3W()))}q b.cO(p,1h)},cO:h(p,1h){c 9d=(!p.63?1g:b.4d(2d 2j(p.4T,p.4C,p.57)));9d=(9d&&p.63<9d?p.63:9d);c 2O=9d||b.6z(p,"3K");c 3p=b.6z(p,"2T");q((!2O||1h>=2O)&&(!3p||1h<=3p))},7D:h(p){c 5q=b.1y(p,"5q");5q=(2L 5q!="4Q"?5q:2d 2j().2P()%3n+1s(5q,10));q{5q:5q,5r:b.1y(p,"5r"),53:b.1y(p,"53"),4E:b.1y(p,"4E"),4H:b.1y(p,"4H")}},aH:h(p,2G,2p,2e){if(!2G){p.4V=p.57;p.5D=p.4C;p.5e=p.4T}c 1h=(2G?(2L 2G=="7z"?2G:b.4d(2d 2j(2e,2p,2G))):b.4d(2d 2j(p.5e,p.5D,p.4V)));q b.9k(b.1y(p,"7F"),1h,b.7D(p))}});h 9b(1i,9o){$.1T(1i,9o);1Q(c 4g in 9o){if(9o[4g]==1g||9o[4g]==3H){1i[4g]=9o[4g]}}q 1i}h jq(a){q(a&&(($.29.9P&&2L a=="7z"&&a.1n)||(a.4R&&a.4R.e9().3G(/\\8F\\(\\)/))))}$.fn.1d=h(l){if(!$.1d.dE){$(1m.22).6A($.1d.2S).9X($.1d.fQ);$.1d.dE=1k}c en=8F.4p.fX.1Y(1C,1);if(2L l=="4Q"&&(l=="jH"||l=="3y")){q $.1d["8R"+l+"9V"].1G($.1d,[b[0]].5k(en))}q b.1L(h(){2L l=="4Q"?$.1d["8R"+l+"9V"].1G($.1d,[b].5k(en)):$.1d.fR(b,l)})};$.1d=2d 9V();$.1d.dE=1b;$.1d.a7=2d 2j().41();$.1d.3J="1.5b"})(2t);(h(A){A.1V("k.7k",{5y:h(){c B=b,C=b.l;b.19.1l("k-7k k-1V k-1V-3F k-2q-3b").1Z({6i:"7k","4G-g6":b.4n(),"4G-g3":b.4N(),"4G-dQ":b.9y()});b.cb=A(\'<1R 2w="k-7k-1J k-1V-4A k-2q-t"></1R>\').2K(b.19);b.7A()},3A:h(){b.19.1w("k-7k k-1V k-1V-3F k-2q-3b").5f("6i").5f("4G-g6").5f("4G-g3").5f("4G-dQ").4y("7k").3q(".7k");b.cb.2n();A.1V.4p.3A.1G(b,1C)},1J:h(B){1C.1n&&b.4u("1J",B);q b.9y()},4u:h(B,C){4B(B){1t"1J":b.l.1J=C;b.7A();b.1A("8m",1g,{});1x}A.1V.4p.4u.1G(b,1C)},9y:h(){c B=b.l.1J;if(B<b.4n()){B=b.4n()}if(B>b.4N()){B=b.4N()}q B},4n:h(){c B=0;q B},4N:h(){c B=3n;q B},7A:h(){c B=b.1J();b.cb[B==b.4N()?"1l":"1w"]("k-2q-2X");b.cb.1a(B+"%");b.19.1Z("4G-dQ",B)}});A.1T(A.k.7k,{3J:"1.5b",59:{1J:0}})})(2t);(h(C){C.1p=C.1p||{};C.1T(C.1p,{3J:"1.5b",5Y:h(E,G){1Q(c F=0;F<G.1n;F++){if(G[F]!==1g){E.1q("ec.fB."+G[F],E[0].3e[G[F]])}}},5d:h(E,G){1Q(c F=0;F<G.1n;F++){if(G[F]!==1g){E.v(G[F],E.1q("ec.fB."+G[F]))}}},54:h(E,F){if(F=="6b"){F=E.is(":30")?"1I":"1P"}q F},gB:h(G,F){c H,E;4B(G[0]){1t"u":H=0;1x;1t"8p":H=0.5;1x;1t"3j":H=1;1x;2u:H=G[0]/F.18}4B(G[1]){1t"t":E=0;1x;1t"8i":E=0.5;1x;1t"2X":E=1;1x;2u:E=G[1]/F.1a}q{x:E,y:H}},6N:h(E){if(E.1N().is(".k-1p-9l")){q E.1N()}c F={1a:E.3s(1k),18:E.31(1k),"eo":E.v("eo")};E.9K(\'<1R 2w="k-1p-9l" 3e="kj-1H:3n%;bZ:7c;er:78;60:0;ex:0"></1R>\');c I=E.1N();if(E.v("1f")=="5U"){I.v({1f:"21"});E.v({1f:"21"})}1j{c H=E.v("u");if(ac(1s(H,10))){H="3k"}c G=E.v("t");if(ac(1s(G,10))){G="3k"}I.v({1f:E.v("1f"),u:H,t:G,2I:E.v("z-3N")}).1I();E.v({1f:"21",u:0,t:0})}I.v(F);q I},6m:h(E){if(E.1N().is(".k-1p-9l")){q E.1N().fK(E)}q E},64:h(F,H,E,G){G=G||{};C.1L(H,h(J,I){c0=F.gn(I);if(c0[0]>0){G[I]=c0[0]*E+c0[1]}});q G},ae:h(G,J,I,H){c E=(2L I=="h"?I:(H?H:1g));c F=(2L I=="4Q"?I:1g);q b.1L(h(){c O={};c M=C(b);c N=M.1Z("3e")||"";if(2L N=="7z"){N=N.cN}if(G.6b){M.4m(G.6b)?G.2n=G.6b:G.23=G.6b}c K=C.1T({},(1m.c1?1m.c1.fM(b,1g):b.fN));if(G.23){M.1l(G.23)}if(G.2n){M.1w(G.2n)}c L=C.1T({},(1m.c1?1m.c1.fM(b,1g):b.fN));if(G.23){M.1w(G.23)}if(G.2n){M.1l(G.2n)}1Q(c P in L){if(2L L[P]!="h"&&L[P]&&P.6R("j1")==-1&&P.6R("1n")==-1&&L[P]!=K[P]&&(P.3G(/bK/i)||(!P.3G(/bK/i)&&!ac(1s(L[P],10))))&&(K.1f!="5U"||(K.1f=="5U"&&!P.3G(/t|u|3j|2X/)))){O[P]=L[P]}}M.26(O,J,F,h(){if(2L C(b).1Z("3e")=="7z"){C(b).1Z("3e")["cN"]="";C(b).1Z("3e")["cN"]=N}1j{C(b).1Z("3e",N)}if(G.23){C(b).1l(G.23)}if(G.2n){C(b).1w(G.2n)}if(E){E.1G(b,1C)}})})}});C.fn.1T({gI:C.fn.1I,gW:C.fn.1P,gO:C.fn.6b,gP:C.fn.1l,fp:C.fn.1w,gR:C.fn.5N,5C:h(F,E,G,H){q C.1p[F]?C.1p[F].1Y(b,{i2:F,l:E||{},1M:G,2x:H}):1g},1I:h(){if(!1C[0]||(1C[0].4R==aq||(/(cc|8z|cR)/).1S(1C[0]))){q b.gI.1G(b,1C)}1j{c E=1C[1]||{};E.3a="1I";q b.5C.1G(b,[1C[0],E,1C[2]||E.1M,1C[3]||E.2x])}},1P:h(){if(!1C[0]||(1C[0].4R==aq||(/(cc|8z|cR)/).1S(1C[0]))){q b.gW.1G(b,1C)}1j{c E=1C[1]||{};E.3a="1P";q b.5C.1G(b,[1C[0],E,1C[2]||E.1M,1C[3]||E.2x])}},6b:h(){if(!1C[0]||(1C[0].4R==aq||(/(cc|8z|cR)/).1S(1C[0]))||(1C[0].4R==ir)){q b.gO.1G(b,1C)}1j{c E=1C[1]||{};E.3a="6b";q b.5C.1G(b,[1C[0],E,1C[2]||E.1M,1C[3]||E.2x])}},1l:h(H,E,G,F){q E?C.1p.ae.1G(b,[{23:H},E,G,F]):b.gP(H)},1w:h(H,E,G,F){q E?C.1p.ae.1G(b,[{2n:H},E,G,F]):b.fp(H)},5N:h(H,E,G,F){q E?C.1p.ae.1G(b,[{6b:H},E,G,F]):b.gR(H)},gA:h(F,I,E,H,G){q C.1p.ae.1G(b,[{23:I,2n:F},E,H,G])},iC:h(){q b.gA.1G(b,1C)},gn:h(E){c F=b.v(E),G=[];C.1L(["em","3C","%","kU"],h(H,I){if(F.6R(I)>0){G=[9F(F),I]}});q G}});C.1L(["8n","mr","mq","m2","lY","bK","mf"],h(F,E){C.fx.7s[E]=h(G){if(G.1O==0){G.2F=D(G.fo,E);G.4I=A(G.4I)}G.fo.3e[E]="cZ("+[1o.2T(1o.3K(1s((G.2W*(G.4I[0]-G.2F[0]))+G.2F[0],10),2y),0),1o.2T(1o.3K(1s((G.2W*(G.4I[1]-G.2F[1]))+G.2F[1],10),2y),0),1o.2T(1o.3K(1s((G.2W*(G.4I[2]-G.2F[2]))+G.2F[2],10),2y),0)].5W(",")+")"}});h A(E){c F;if(E&&E.4R==8F&&E.1n==3){q E}if(F=/cZ\\(\\s*([0-9]{1,3})\\s*,\\s*([0-9]{1,3})\\s*,\\s*([0-9]{1,3})\\s*\\)/.73(E)){q[1s(F[1],10),1s(F[2],10),1s(F[3],10)]}if(F=/cZ\\(\\s*([0-9]+(?:\\.[0-9]+)?)\\%\\s*,\\s*([0-9]+(?:\\.[0-9]+)?)\\%\\s*,\\s*([0-9]+(?:\\.[0-9]+)?)\\%\\s*\\)/.73(E)){q[9F(F[1])*2.55,9F(F[2])*2.55,9F(F[3])*2.55]}if(F=/#([a-fA-93-9]{2})([a-fA-93-9]{2})([a-fA-93-9]{2})/.73(E)){q[1s(F[1],16),1s(F[2],16),1s(F[3],16)]}if(F=/#([a-fA-93-9])([a-fA-93-9])([a-fA-93-9])/.73(E)){q[1s(F[1]+F[1],16),1s(F[2]+F[2],16),1s(F[3]+F[3],16)]}if(F=/f1\\(0, 0, 0, 0\\)/.73(E)){q B.7c}q B[C.f6(E).5T()]}h D(G,E){c F;do{F=C.7l(G,E);if(F!=""&&F!="7c"||C.3m(G,"22")){1x}E="8n"}6J(G=G.4x);q A(F)}c B={lG:[0,2y,2y],lB:[h9,2y,2y],lx:[hL,hL,lm],hf:[0,0,0],lE:[0,0,2y],mB:[h4,42,42],mn:[0,2y,2y],iM:[0,0,9t],iX:[0,9t,9t],iU:[du,du,du],io:[0,3n,0],km:[j4,jy,cT],jv:[9t,0,9t],jA:[85,cT,47],l3:[2y,cP,0],ls:[iy,50,iK],jW:[9t,0,0],jz:[jx,ah,jB],jl:[j9,0,aZ],j7:[2y,0,2y],j6:[2y,j2,0],jj:[0,6L,0],jg:[75,0,jd],jG:[h9,h5,cP],k4:[k6,kc,h5],kh:[hu,2y,2y],ke:[hw,jP,hw],jQ:[aZ,aZ,aZ],jY:[2y,i9,ie],i3:[2y,2y,hu],ih:[0,2y,0],ig:[2y,0,2y],ij:[6L,0,0],ib:[0,0,6L],i1:[6L,6L,0],iq:[2y,h4,0],iL:[2y,b4,iF],iD:[6L,0,6L],iG:[6L,0,6L],iu:[2y,0,0],iv:[b4,b4,b4],iN:[2y,2y,2y],il:[2y,2y,0],7c:[2y,2y,2y]};C.1X.ik=C.1X.9v;C.1T(C.1X,{hX:"hQ",9v:h(F,G,E,I,H){q C.1X[C.1X.hX](F,G,E,I,H)},kn:h(F,G,E,I,H){q I*(G/=H)*G+E},hQ:h(F,G,E,I,H){q-I*(G/=H)*(G-2)+E},mx:h(F,G,E,I,H){if((G/=H/2)<1){q I/2*G*G+E}q-I/2*((--G)*(G-2)-1)+E},kp:h(F,G,E,I,H){q I*(G/=H)*G*G+E},kz:h(F,G,E,I,H){q I*((G=G/H-1)*G*G+1)+E},kG:h(F,G,E,I,H){if((G/=H/2)<1){q I/2*G*G*G+E}q I/2*((G-=2)*G*G+2)+E},l9:h(F,G,E,I,H){q I*(G/=H)*G*G*G+E},lN:h(F,G,E,I,H){q-I*((G=G/H-1)*G*G*G-1)+E},ld:h(F,G,E,I,H){if((G/=H/2)<1){q I/2*G*G*G*G+E}q-I/2*((G-=2)*G*G*G-2)+E},lt:h(F,G,E,I,H){q I*(G/=H)*G*G*G*G+E},lv:h(F,G,E,I,H){q I*((G=G/H-1)*G*G*G*G+1)+E},lw:h(F,G,E,I,H){if((G/=H/2)<1){q I/2*G*G*G*G*G+E}q I/2*((G-=2)*G*G*G*G+2)+E},lp:h(F,G,E,I,H){q-I*1o.eI(G/H*(1o.6n/2))+I+E},lo:h(F,G,E,I,H){q I*1o.a8(G/H*(1o.6n/2))+E},lr:h(F,G,E,I,H){q-I/2*(1o.eI(1o.6n*G/H)-1)+E},lu:h(F,G,E,I,H){q(G==0)?E:I*1o.77(2,10*(G/H-1))+E},ll:h(F,G,E,I,H){q(G==H)?E+I:I*(-1o.77(2,-10*G/H)+1)+E},lc:h(F,G,E,I,H){if(G==0){q E}if(G==H){q E+I}if((G/=H/2)<1){q I/2*1o.77(2,10*(G-1))+E}q I/2*(-1o.77(2,-10*--G)+2)+E},lg:h(F,G,E,I,H){q-I*(1o.8Y(1-(G/=H)*G)-1)+E},lR:h(F,G,E,I,H){q I*1o.8Y(1-(G=G/H-1)*G)+E},lK:h(F,G,E,I,H){if((G/=H/2)<1){q-I/2*(1o.8Y(1-G*G)-1)+E}q I/2*(1o.8Y(1-(G-=2)*G)+1)+E},lJ:h(F,H,E,L,K){c I=1.96;c J=0;c G=L;if(H==0){q E}if((H/=K)==1){q E+L}if(!J){J=K*0.3}if(G<1o.4e(L)){G=L;c I=J/4}1j{c I=J/(2*1o.6n)*1o.dz(L/G)}q-(G*1o.77(2,10*(H-=1))*1o.a8((H*K-I)*(2*1o.6n)/J))+E},lC:h(F,H,E,L,K){c I=1.96;c J=0;c G=L;if(H==0){q E}if((H/=K)==1){q E+L}if(!J){J=K*0.3}if(G<1o.4e(L)){G=L;c I=J/4}1j{c I=J/(2*1o.6n)*1o.dz(L/G)}q G*1o.77(2,-10*H)*1o.a8((H*K-I)*(2*1o.6n)/J)+L+E},lA:h(F,H,E,L,K){c I=1.96;c J=0;c G=L;if(H==0){q E}if((H/=K/2)==2){q E+L}if(!J){J=K*(0.3*1.5)}if(G<1o.4e(L)){G=L;c I=J/4}1j{c I=J/(2*1o.6n)*1o.dz(L/G)}if(H<1){q-0.5*(G*1o.77(2,10*(H-=1))*1o.a8((H*K-I)*(2*1o.6n)/J))+E}q G*1o.77(2,-10*(H-=1))*1o.a8((H*K-I)*(2*1o.6n)/J)*0.5+L+E},kC:h(F,G,E,J,I,H){if(H==3H){H=1.96}q J*(G/=I)*G*((H+1)*G-H)+E},kB:h(F,G,E,J,I,H){if(H==3H){H=1.96}q J*((G=G/I-1)*G*((H+1)*G+H)+1)+E},kA:h(F,G,E,J,I,H){if(H==3H){H=1.96}if((G/=I/2)<1){q J/2*(G*G*(((H*=(1.eX))+1)*G-H))+E}q J/2*((G-=2)*G*(((H*=(1.eX))+1)*G+H)+2)+E},f2:h(F,G,E,I,H){q I-C.1X.bQ(F,H-G,0,I,H)+E},bQ:h(F,G,E,I,H){if((G/=H)<(1/2.75)){q I*(7.bP*G*G)+E}1j{if(G<(2/2.75)){q I*(7.bP*(G-=(1.5/2.75))*G+0.75)+E}1j{if(G<(2.5/2.75)){q I*(7.bP*(G-=(2.25/2.75))*G+0.kt)+E}1j{q I*(7.bP*(G-=(2.kv/2.75))*G+0.l5)+E}}}},kX:h(F,G,E,I,H){if(G<H/2){q C.1X.f2(F,G*2,0,I,H)*0.5+E}q C.1X.bQ(F,G*2-H,0,I,H)*0.5+I*0.5+E}})})(2t);(h(A){A.1p.kM=h(B){q b.3P(h(){c D=A(b),C=["1f","u","t"];c G=A.1p.54(D,B.l.3a||"1P");c J=B.l.6G||"4z";A.1p.5Y(D,C);D.1I();c I=A.1p.6N(D).v({3o:"30"});c E=(J=="4z")?"18":"1a";c H=(J=="4z")?I.18():I.1a();if(G=="1I"){I.v(E,0)}c F={};F[E]=G=="1I"?H:0;I.26(F,B.1M,B.l.1X,h(){if(G=="1P"){D.1P()}A.1p.5d(D,C);A.1p.6m(D);if(B.2x){B.2x.1G(D[0],1C)}D.4q()})})}})(2t);(h(A){A.1p.mZ=h(B){q b.3P(h(){c E=A(b),K=["1f","u","t"];c J=A.1p.54(E,B.l.3a||"5C");c O=B.l.6G||"5B";c D=B.l.5A||20;c C=B.l.cJ||5;c G=B.1M||n0;if(/1I|1P/.1S(J)){K.4o("2c")}A.1p.5Y(E,K);E.1I();A.1p.6N(E);c F=(O=="5B"||O=="5a")?"u":"t";c M=(O=="5B"||O=="t")?"2W":"bs";c D=B.l.5A||(F=="u"?E.31({60:1k})/3:E.3s({60:1k})/3);if(J=="1I"){E.v("2c",0).v(F,M=="2W"?-D:D)}if(J=="1P"){D=D/(C*2)}if(J!="1P"){C--}if(J=="1I"){c H={2c:1};H[F]=(M=="2W"?"+=":"-=")+D;E.26(H,G/2,B.l.1X);D=D/2;C--}1Q(c I=0;I<C;I++){c N={},L={};N[F]=(M=="2W"?"-=":"+=")+D;L[F]=(M=="2W"?"+=":"-=")+D;E.26(N,G/2,B.l.1X).26(L,G/2,B.l.1X);D=(J=="1P")?D*2:D/2}if(J=="1P"){c H={2c:0};H[F]=(M=="2W"?"-=":"+=")+D;E.26(H,G/2,B.l.1X,h(){E.1P();A.1p.5d(E,K);A.1p.6m(E);if(B.2x){B.2x.1G(b,1C)}})}1j{c N={},L={};N[F]=(M=="2W"?"-=":"+=")+D;L[F]=(M=="2W"?"+=":"-=")+D;E.26(N,G/2,B.l.1X).26(L,G/2,B.l.1X,h(){A.1p.5d(E,K);A.1p.6m(E);if(B.2x){B.2x.1G(b,1C)}})}E.3P("fx",h(){E.4q()});E.4q()})}})(2t);(h(A){A.1p.n1=h(B){q b.3P(h(){c E=A(b),J=["1f","u","t","18","1a"];c H=A.1p.54(E,B.l.3a||"1P");c K=B.l.6G||"4z";A.1p.5Y(E,J);E.1I();c D=A.1p.6N(E).v({3o:"30"});c I=E[0].5p=="n4"?D:E;c F={1H:(K=="4z")?"18":"1a",1f:(K=="4z")?"u":"t"};c C=(K=="4z")?I.18():I.1a();if(H=="1I"){I.v(F.1H,0);I.v(F.1f,C/2)}c G={};G[F.1H]=H=="1I"?C:0;G[F.1f]=H=="1I"?0:C/2;I.26(G,{3P:1b,1M:B.1M,1X:B.l.1X,6c:h(){if(H=="1P"){E.1P()}A.1p.5d(E,J);A.1p.6m(E);if(B.2x){B.2x.1G(E[0],1C)}E.4q()}})})}})(2t);(h(A){A.1p.6B=h(B){q b.3P(h(){c D=A(b),C=["1f","u","t","2c"];c H=A.1p.54(D,B.l.3a||"1P");c J=B.l.6G||"t";A.1p.5Y(D,C);D.1I();A.1p.6N(D);c F=(J=="5B"||J=="5a")?"u":"t";c E=(J=="5B"||J=="t")?"2W":"bs";c I=B.l.5A||(F=="u"?D.31({60:1k})/2:D.3s({60:1k})/2);if(H=="1I"){D.v("2c",0).v(F,E=="2W"?-I:I)}c G={2c:H=="1I"?1:0};G[F]=(H=="1I"?(E=="2W"?"+=":"-="):(E=="2W"?"-=":"+="))+I;D.26(G,{3P:1b,1M:B.1M,1X:B.l.1X,6c:h(){if(H=="1P"){D.1P()}A.1p.5d(D,C);A.1p.6m(D);if(B.2x){B.2x.1G(b,1C)}D.4q()}})})}})(2t);(h(A){A.1p.cV=h(B){q b.3P(h(){c I=B.l.bR?1o.7p(1o.8Y(B.l.bR)):3;c D=B.l.bR?1o.7p(1o.8Y(B.l.bR)):3;B.l.3a=B.l.3a=="6b"?(A(b).is(":5L")?"1P":"1I"):B.l.3a;c G=A(b).1I().v("aB","30");c J=G.1c();J.u-=1s(G.v("8j"))||0;J.t-=1s(G.v("8l"))||0;c F=G.3s(1k);c H=G.31(1k);1Q(c E=0;E<I;E++){1Q(c C=0;C<D;C++){G.7B().2K("22").9K("<1R></1R>").v({1f:"2k",aB:"5L",t:-C*(F/D),u:-E*(H/I)}).1N().1l("k-1p-cV").v({1f:"2k",3o:"30",1a:F/D,18:H/I,t:J.t+C*(F/D)+(B.l.3a=="1I"?(C-1o.9L(D/2))*(F/D):0),u:J.u+E*(H/I)+(B.l.3a=="1I"?(E-1o.9L(I/2))*(H/I):0),2c:B.l.3a=="1I"?0:1}).26({t:J.t+C*(F/D)+(B.l.3a=="1I"?0:(C-1o.9L(D/2))*(F/D)),u:J.u+E*(H/I)+(B.l.3a=="1I"?0:(E-1o.9L(I/2))*(H/I)),2c:B.l.3a=="1I"?1:0},B.1M||b8)}}8k(h(){B.l.3a=="1I"?G.v({aB:"5L"}):G.v({aB:"5L"}).1P();if(B.2x){B.2x.1G(G[0])}G.4q();A("1R.k-1p-cV").2n()},B.1M||b8)})}})(2t);(h(A){A.1p.mH=h(B){q b.3P(h(){c F=A(b),K=["1f","u","t"];c J=A.1p.54(F,B.l.3a||"1P");c O=B.l.1H||15;c N=!(!B.l.ma);c I=B.1M?B.1M/2:A.fx.gv.gz/2;A.1p.5Y(F,K);F.1I();c D=A.1p.6N(F).v({3o:"30"});c H=((J=="1I")!=N);c G=H?["1a","18"]:["18","1a"];c C=H?[D.1a(),D.18()]:[D.18(),D.1a()];c E=/([0-9]+)%/.73(O);if(E){O=1s(E[1])/3n*C[J=="1P"?0:1]}if(J=="1I"){D.v(N?{18:0,1a:O}:{18:O,1a:0})}c M={},L={};M[G[0]]=J=="1I"?C[0]:O;L[G[1]]=J=="1I"?C[1]:0;D.26(M,I,B.l.1X).26(L,I,B.l.1X,h(){if(J=="1P"){F.1P()}A.1p.5d(F,K);A.1p.6m(F);if(B.2x){B.2x.1G(F[0],1C)}F.4q()})})}})(2t);(h(A){A.1p.eT=h(B){q b.3P(h(){c E=A(b),D=["d2","8n","2c"];c H=A.1p.54(E,B.l.3a||"1I");c C=B.l.bK||"#m1";c G=E.v("8n");A.1p.5Y(E,D);E.1I();E.v({d2:"78",8n:C});c F={8n:G};if(H=="1P"){F.2c=0}E.26(F,{3P:1b,1M:B.1M,1X:B.l.1X,6c:h(){if(H=="1P"){E.1P()}A.1p.5d(E,D);if(H=="1I"&&A.29.3Y){b.3e.gq("3u")}if(B.2x){B.2x.1G(b,1C)}E.4q()}})})}})(2t);(h(A){A.1p.mp=h(B){q b.3P(h(){c D=A(b);c F=A.1p.54(D,B.l.3a||"1I");c E=B.l.cJ||5;c G=B.1M?B.1M/2:A.fx.gv.gz/2;if(F=="1P"){E--}if(D.is(":30")){D.v("2c",0);D.1I();D.26({2c:1},G,B.l.1X);E=E-2}1Q(c C=0;C<E;C++){D.26({2c:0},G,B.l.1X).26({2c:1},G,B.l.1X)}if(F=="1P"){D.26({2c:0},G,B.l.1X,h(){D.1P();if(B.2x){B.2x.1G(b,1C)}})}1j{D.26({2c:0},G,B.l.1X).26({2c:1},G,B.l.1X,h(){if(B.2x){B.2x.1G(b,1C)}})}D.3P("fx",h(){D.4q()});D.4q()})}})(2t);(h(A){A.1p.mu=h(B){q b.3P(h(){c G=A(b);c F=A.1T(1k,{},B.l);c H=A.1p.54(G,B.l.3a||"1P");c C=1s(B.l.bw)||ah;F.gm=1k;c E={18:G.18(),1a:G.1a()};c D=C/3n;G.2a=(H=="1P")?E:{18:E.18*D,1a:E.1a*D};F.2a=G.2a;F.bw=(H=="1P")?C:3n;F.3a=H;G.5C("dw",F,B.1M,B.2x);G.4q()})};A.1p.dw=h(B){q b.3P(h(){c H=A(b);c F=A.1T(1k,{},B.l);c I=A.1p.54(H,B.l.3a||"5C");c C=1s(B.l.bw)||(1s(B.l.bw)==0?0:(I=="1P"?0:3n));c J=B.l.6G||"7o";c G=B.l.dv;if(I!="5C"){F.dv=G||["8p","8i"];F.5d=1k}c E={18:H.18(),1a:H.1a()};H.2a=B.l.2a||(I=="1I"?{18:0,1a:0}:E);c D={y:J!="5i"?(C/3n):1,x:J!="4z"?(C/3n):1};H.2l={18:E.18*D.y,1a:E.1a*D.x};if(B.l.gm){if(I=="1I"){H.2a.2c=0;H.2l.2c=1}if(I=="1P"){H.2a.2c=1;H.2l.2c=0}}F.2a=H.2a;F.2l=H.2l;F.3a=I;H.5C("1H",F,B.1M,B.2x);H.4q()})};A.1p.1H=h(B){q b.3P(h(){c H=A(b),N=["1f","u","t","1a","18","3o","2c"];c D=["1f","u","t","3o","2c"];c F=["1a","18","3o"];c O=["gl"];c E=["6l","bq","da","dr"];c K=["6s","bp","dq","dt"];c L=A.1p.54(H,B.l.3a||"5C");c M=B.l.5d||1b;c J=B.l.dw||"7o";c P=B.l.dv;c I={18:H.18(),1a:H.1a()};H.2a=B.l.2a||I;H.2l=B.l.2l||I;if(P){c G=A.1p.gB(P,I);H.2a.u=(I.18-H.2a.18)*G.y;H.2a.t=(I.1a-H.2a.1a)*G.x;H.2l.u=(I.18-H.2l.18)*G.y;H.2l.t=(I.1a-H.2l.1a)*G.x}c C={2a:{y:H.2a.18/I.18,x:H.2a.1a/I.1a},2l:{y:H.2l.18/I.18,x:H.2l.1a/I.1a}};if(J=="iE"||J=="7o"){if(C.2a.y!=C.2l.y){N=N.5k(E);H.2a=A.1p.64(H,E,C.2a.y,H.2a);H.2l=A.1p.64(H,E,C.2l.y,H.2l)}if(C.2a.x!=C.2l.x){N=N.5k(K);H.2a=A.1p.64(H,K,C.2a.x,H.2a);H.2l=A.1p.64(H,K,C.2l.x,H.2l)}}if(J=="3F"||J=="7o"){if(C.2a.y!=C.2l.y){N=N.5k(O);H.2a=A.1p.64(H,O,C.2a.y,H.2a);H.2l=A.1p.64(H,O,C.2l.y,H.2l)}}A.1p.5Y(H,M?N:D);H.1I();A.1p.6N(H);H.v("3o","30").v(H.2a);if(J=="3F"||J=="7o"){E=E.5k(["8j","bg"]).5k(O);K=K.5k(["8l","bh"]);F=N.5k(E).5k(K);H.3v("*[1a]").1L(h(){3w=A(b);if(M){A.1p.5Y(3w,F)}c Q={18:3w.18(),1a:3w.1a()};3w.2a={18:Q.18*C.2a.y,1a:Q.1a*C.2a.x};3w.2l={18:Q.18*C.2l.y,1a:Q.1a*C.2l.x};if(C.2a.y!=C.2l.y){3w.2a=A.1p.64(3w,E,C.2a.y,3w.2a);3w.2l=A.1p.64(3w,E,C.2l.y,3w.2l)}if(C.2a.x!=C.2l.x){3w.2a=A.1p.64(3w,K,C.2a.x,3w.2a);3w.2l=A.1p.64(3w,K,C.2l.x,3w.2l)}3w.v(3w.2a);3w.26(3w.2l,B.1M,B.l.1X,h(){if(M){A.1p.5d(3w,F)}})})}H.26(H.2l,{3P:1b,1M:B.1M,1X:B.l.1X,6c:h(){if(L=="1P"){H.1P()}A.1p.5d(H,M?N:D);A.1p.6m(H);if(B.2x){B.2x.1G(b,1C)}H.4q()}})})}})(2t);(h(A){A.1p.iO=h(B){q b.3P(h(){c E=A(b),K=["1f","u","t"];c J=A.1p.54(E,B.l.3a||"5C");c O=B.l.6G||"t";c D=B.l.5A||20;c C=B.l.cJ||3;c G=B.1M||B.l.1M||cP;A.1p.5Y(E,K);E.1I();A.1p.6N(E);c F=(O=="5B"||O=="5a")?"u":"t";c M=(O=="5B"||O=="t")?"2W":"bs";c H={},N={},L={};H[F]=(M=="2W"?"-=":"+=")+D;N[F]=(M=="2W"?"+=":"-=")+D*2;L[F]=(M=="2W"?"-=":"+=")+D*2;E.26(H,G,B.l.1X);1Q(c I=1;I<C;I++){E.26(N,G,B.l.1X).26(L,G,B.l.1X)}E.26(N,G,B.l.1X).26(H,G/2,B.l.1X,h(){A.1p.5d(E,K);A.1p.6m(E);if(B.2x){B.2x.1G(b,1C)}});E.3P("fx",h(){E.4q()});E.4q()})}})(2t);(h(A){A.1p.6D=h(B){q b.3P(h(){c D=A(b),C=["1f","u","t"];c H=A.1p.54(D,B.l.3a||"1I");c J=B.l.6G||"t";A.1p.5Y(D,C);D.1I();A.1p.6N(D).v({3o:"30"});c F=(J=="5B"||J=="5a")?"u":"t";c E=(J=="5B"||J=="t")?"2W":"bs";c I=B.l.5A||(F=="u"?D.31({60:1k}):D.3s({60:1k}));if(H=="1I"){D.v(F,E=="2W"?-I:I)}c G={};G[F]=(H=="1I"?(E=="2W"?"+=":"-="):(E=="2W"?"-=":"+="))+I;D.26(G,{3P:1b,1M:B.1M,1X:B.l.1X,6c:h(){if(H=="1P"){D.1P()}A.1p.5d(D,C);A.1p.6m(D);if(B.2x){B.2x.1G(b,1C)}D.4q()}})})}})(2t);(h(A){A.1p.g5=h(B){q b.3P(h(){c E=A(b);c F=A.1p.54(E,B.l.3a||"5C");c G=A(B.l.2l);c C=E.1c();c D=A(\'<1R 2w="k-1p-g5"></1R>\').2K(1m.22);if(B.l.6f){D.1l(B.l.6f)}D.1l(B.l.6f);D.v({u:C.u,t:C.t,18:E.31()-1s(D.v("6l"))-1s(D.v("bq")),1a:E.3s()-1s(D.v("6s"))-1s(D.v("bp")),1f:"2k"});C=G.1c();g9={u:C.u,t:C.t,18:G.31()-1s(D.v("6l"))-1s(D.v("bq")),1a:G.3s()-1s(D.v("6s"))-1s(D.v("bp"))};D.26(g9,B.1M,B.l.1X,h(){D.2n();if(B.2x){B.2x.1G(E[0],1C)}E.4q()})})}})(2t);',62,1451,'|||||||||||this|var|||||function|||ui|options||||inst|return|||left|top|css|||||||||||||||||||||||||||||||||||||||height|element|width|false|offset|datepicker|helper|position|null|date|target|else|true|addClass|document|length|Math|effects|data|resizable|parseInt|case|tabs|input|removeClass|break|_get|event|_trigger|scrollParent|arguments|containment|currentItem|click|apply|size|show|value|disabled|each|duration|parent|state|hide|for|div|test|extend|selected|widget|instance|easing|call|attr||relative|body|add|scrollLeft||animate|||browser|from|scrollTop|opacity|new|year|settings|draggable|dialog|containers|Date|absolute|to|resize|remove|sortable|month|corner|cursor|drawMonth|jQuery|default|ddmanager|class|callback|255|offsetParent|values|item|helperProportions|handle|drawYear|start|day|items|zIndex|active|appendTo|typeof|handles|grid|minDate|getFullYear|bind|plugin|dpDiv|max|cssNamespace|overlay|pos|right|focus|keyCode|hidden|outerHeight|||||||||mode|all|margins|pageX|style|range|placeholder|span|html|bottom|auto|pageY|nodeName|100|overflow|maxDate|unbind|iFormat|outerWidth|accordion|filter|find|child|uiDialog|getDate|0px|destroy|positionAbs|px|window|stop|content|match|undefined|isRTL|version|min|lis|panels|index|orientation|queue|unselecting|format|button|next|icon|title|getMonth|slider|msie|se||getTime||selectedClass|hover||||prev|printDate|cssPosition|charAt|href|_daylightSavingAdjust|abs|selecting|name|inline|ctrlKey|scrollSensitivity|numMonths|scrollSpeed|hasClass|_valueMin|push|prototype|dequeue|axis|sw|parents|_setData|nw|originalPosition|parentNode|removeData|vertical|header|switch|selectedMonth|firstDay|monthNamesShort|headers|aria|monthNames|end|offsetHeight|_getInst|containerCache|metaKey|_valueMax|alsoResize|drag|string|constructor|select|selectedYear|_change|currentDay|accept|matches|offsetWidth|endYear||_defaults|_convertPositionTo|dayNames|setMode||droppable|selectedDay|selectable|defaults|down|6rc5|ghost|restore|currentYear|removeAttr|contains|minHeight|horizontal|type|concat|isFunction|literal|_adjustDate|lookAhead|tagName|shortYearCutoff|dayNamesShort|_pos|over|snapElements|fixed|get|showAnim|_init|documentElement|distance|up|effect|currentMonth|replace|4px|output|defaultDate|calender|iValue|load|visible|originalSize|toggleClass|option|markerClassName|current|period|toShow|toLowerCase|static|tolerance|join|revert|save|isover|margin|display|_mouseDrag|rangeStart|setTransition|aspectRatio|snap|checkDate|cookie|stepMonths|cancel|toggle|complete|sizeDiff|hideClass|className|unselectable|_hideDatepicker|role|prevText|nextText|borderTopWidth|removeWrapper|PI|proportionallyResize|_dialogInput|scope|overflowOffset|borderLeftWidth|tabIndex|_uiHash|children|handled|minWidth|key|_getMinMaxDate|append|drop|continue|slide|knobHandles|chars|direction|stack|_mouseStart|while|_mouseStarted|128|num|createWrapper|isFixed|_triggerClass|_disabledInputs|indexOf|_updateDatepicker|_mouseStop|isOver|today|not|maxWidth|widgetName|maxHeight|dow|blur|list|exec|icons||delay|pow|none|map|isout|keydown|transparent|cache|droppables|disabledClass|hash|buttonText|dateStr|dragging|progressbar|curCSS|plugins|td|both|round|years|group|step|scrollHeight|first|trigger|onSelect|PROP_NAME|close|object|_refreshValue|clone|0pt|_getFormatConfig|proportions|dateFormat|postProcess|instances|bgiframe|disableSelection|mouse|_mouseCapture|showOn|inArray|autoHeight|toHide|floating|isOverAxis|startselected|_storedCSS|cancelHelperRemoval|alwaysOpen|_zIndex|siblings|preventDefault|selectedDate|cornerClass|currentText|onclick|changeMonth|monthHtml||changeYear|stepBigMonths|val|_curInst|obj|block|_datepickerShowing|throw|doy|yy|_getDaysInMonth|_inDialog|center|marginTop|setTimeout|marginLeft|change|backgroundColor|_cursor|middle|original|_opacity|dropBehaviour|running|activate|prepareOffsets|scroll|deactivate|originalPageY|normal|_getRelativeOffset|_generatePosition|number|originalPageX|refreshPositions|Array|domPosition|secondary|_clear|out|endDate|deselectableClass|deselectable|sort|endDay|img|reset|_|buttonImage|navigationAsDateFormat|inlineSettings|triangle|clearfix|elementOffset|sqrt|opera|otherMonth|showOtherMonths|_cacheHelperProportions|F0|_mouseInit|row|70158|_mouseDestroy|_showDatepicker|shiftKey|split|extendRemove|intersect|newMinDate|_mouseUp|_lastInput|getNumber|firstMon|_handles|borderDif|formatDate|wrapper|parentData|iframeFix|props|stayOpen|currentContainer|connectWith|getDay|139|scrollWidth|swing|hoverClass|activeClass|_value|beforeShow|1000|beforeShowDay|modal|_proportionallyResize|_isOpen|parseFloat|cssCache|names|appendText|knob|wrap|floor|daySettings|closeText|thead|safari|endMonth|_tabify|_cookie|hideIfNoPrevNext|getter|Datepicker|dropped|mousedown|panelClass|try|col|keypress|_keySliding|loadingClass|maxDraw|currentDate|eventPrefix|uuid|sin|String|textarea|removeChild|isNaN|update|animateClass|absolutePosition|_getParentOffset|150|dpWidth|_aspectRatio|showMonthAfterYear|cursorAt|_notifyChange|onClose|blockUI|_isDisabledDatepicker|Number|refresh|counter||setDate|lastPositionAbs|altField|dates|expanded|proxiedDuration|proxied|visibility|hasScroll|animated|tbody|innerHeight|_propagate|_formatDate|multi|beforeStop|catch|containerOffset|iframe|clientWidth|_selectingMonthYear|text|viewHeight|_selectDate|longNames|shortNames|innerWidth|dpHeight|altFormat|_inlineClass|after|211|clientHeight|viewWidth|checkLiteral|mouseover|192|_doKeyDown|_updateAlternate|cols|500|_createHelper|_refreshItems|pointer|andSelf|_adjustOffsetFromHelper|_cacheMargins|reverting|marginBottom|marginRight|_setContainment|selectees|1px|snapping|sortables|mouseDelayMet|_mouseDownEvent|borderRightWidth|borderBottomWidth|containerPosition|neg|containerSize|resizing|fromOutside|percent|_slide|_handleIndex|LEFT|DOWN|splice|_sanitizeSelector|attrName|label|spinner|xhr|RIGHT|UP|headerSelected|color|HTML|sortIndicator|formatNumber|originalTitle|5625|easeOutBounce|pieces|attrValue|tabClass|_adjustInstDate|showCurrentAtPos|circle|_determineDate|_getNumberOfMonths|background|unit|defaultView|_keyEvent|isMultiMonth|showButtonPanel|_getDefaultDate|iso8601Week|calendar|dayNamesMin|tr|_dayOverClass|valueDiv|slow|_doKeyPress|_position|_makeDraggable|_canAdjustMonth|_makeResizable|custom|buttons|chr|namespace|_createButtons|mozilla|formatName|controls|_getData|onChange|resizeStart|altKey|widgetBaseClass|resizeStop|_getItemsAsjQuery|_getDragHorizontalDirection|opos|dragged|ESCAPE|_setDate|containerElement|widgetEventPrefix|HOME|dRow|closeOnEscape|touch|empty|times|_getDragVerticalDirection|dims|mouseup|cssText|_isInRange|140|sel|fast|_newInst|107|forceHelperSize|explode|prependTo|tabbable|moveToTop|rgb|getData|setData|backgroundImage|fillSpace|src|cover|gotoCurrent|divSpan|before|regional|paddingTop|_appendClass|_selectDay||_noFinalSort|titlebar|dragStart|_currentClass|_unselectableClass|dragStop|xa0|receive|_clickMonthYear|_selectMonthYear|||paddingLeft|paddingBottom|open|paddingRight|169|origin|scale|END|_getDate|asin|greedy|_values|_out|navClass|initialized|last|location|lastValPercent|_over|gotoDate|borderLeft|borderTop|panelTemplate|borderRight|pattern|getDaysInMonth|valuenow|borderBottom|log|_tabId|calculateWeek|disable|connectToSortable|dim|_mouseDelayMet|_mouseDistanceMet|_mouseMoveDelegate|_mouseUpDelegate|_preventClickEvent|_setDateFromField|getName|snapMode|origSize|_gotoToday|insertBefore|toString|enable|ajaxOptions||_helper|_start|_stop|_revertToRelativePosition|preserveCursor|documentScroll|daysInMonth|Invalid|||otherArgs|float|alsoresize||border|aaa|originalElement|rotation|inputHeight|_tidyDialog|padding|_nodeName|knobTheme|elementSize|showOptions|_mainDivId|_normValueFromMouse|leadDays|_dialogClass|_updateCache|autohide|cos|700|MozUserSelect|animations|compareDocumentPosition|oldContent|oldHeader|newHeader|buttonPanel|success|newContent|highlight|navigationFilter|table|selectstart|525|5000px|autoOpen|_step|rgba|easeInBounce|300|numRows|_size|trim|diagonal|uiDialogTitlebar|nbsp|makeArray|uiDialogButtonPane|uiDialogTitlebarCloseText|events|grep|TAB|ENTER|create|ceil|wairole|isOpen|th|getTitleId||elem|_removeClass|_respectSize|_mouseUnselectable|_renderProxy|autoHide|_updateRatio|originalMousePosition|8px||defaultTheme|_renderAxis||storage|animateDuration|animateEasing|autoRefresh|expression|connected|attribute|unselected|fit|replaceWith|on|getComputedStyle|currentStyle|solid|F2F2F2|_checkExternalClick|_attachDatepicker|snapTolerance|release|triggerHandler|shouldRevert|mousemove|slice|_getHandle|revertDuration|snapItem|clickOffset|greedyChild|valuemax|_mouseDown|transfer|valuemin|_deactivate|droppablesLoop|animation|_activate|_drop|_intersectsWithPointer|_intersectsWithSides|toArray|accurateIntersection|dropOnEmpty|forcePlaceholderSize|serialize|sender|onchange|fontSize|fade|cssUnit|yearRange|inMaxYear|removeAttribute|zoom|tabindex|_keydown|metadata|speeds|inMinYear|_rearrange|_generateMonthYearHeader|_default|morph|getBaseline|_createPlaceholder|createElement|_contactContainers|_intersectsWith|refreshContainers|toleranceElement|_show|curMonth|_removeCurrentsFromItems|curYear|_getFirstDayOfMonth|checkRange|__toggle|_addClass|_mouseMove|_toggleClass|appendChild|getterSetter|minMax|numberOfMonths|_hide|onChangeMonthYear|SPACE|week|originalEvent|offsetNumeric|100px|clientX|165|230|nodeType|nextSibling|len|240|getYear|offsetString|err|Month|debug|black|buttonpane|panel|_optionDatepicker|_findPos|stopPropagation|_checkOffset|origYear|origMonth|mouseout|May|self|clear|Class|rtl|224|_inlineDatepicker|144|charCode|constrainInput|inputWidth|setHours|startDate|_generateHTML|getHours|Year|tabTemplate|dateText|alt|_dialogInst|browserHeight|tab|245|browserWidth|buttonImageOnly|_connectDatepicker|scrollY|easeOutQuad|parseDate|scrollX|_possibleChars|Missing|idPrefix|_clearDate|def|priority|iInit|url|olive|method|lightyellow|www|http|fromCharCode|dynamic|prepend|182|9999|navy|_dialogDatepicker||193||magenta|lime|forcePointerForContainers|maroon|jswing|yellow|w3||darkgreen|1000px|orange|Function||_getDateDatepicker|red|silver|07|semi|153|_setDateDatepicker|_refreshDatepicker|org|switchClass|purple|box|203|violet|_changeDatepicker|setAttributeNS|abort|204|pink|darkblue|white|shake|2005|10000|_enableDatepicker|substring|enableSelection|darkgrey|removeAttributeNS|off|darkcyan|_disableDatepicker|expr|_destroyDatepicker|Moz|215|DEDEDE|189|selectedIndex|gold|fuchsia|COOKIE|148|valid|invalid|draw|130|gripsmall|RFC_822|indigo|ISO_8601|808080|green|canvas|darkviolet|ATOM|fromSortable|Unexpected|toSortable|isArray|outer|inner|001|Unknown|darkmagenta|86400000|233|183|darksalmon|darkolivegreen|122|noWeekends|sortreceive|dragstart|sortactivate|khaki|isDisabled|RSS|_mouseDelayTimer|which|selectee|RFC_2822|RFC_1123|RFC_1036|238|lightgrey|dotted|clientY|isDefaultPrevented|Event|_preserveHelperProportions|darkred|started|lightpink|TIMESTAMP|W3C|instanceof|setMilliseconds|DD|lightblue|unblockUI|173|RFC_850|Left|Top|Bottom|Right|216|fadeOut|lightgreen|setMinutes|setSeconds|lightcyan|slideDown|font|fadeIn|slideUp|darkkhaki|easeInQuad|CONTROL|easeInCubic|cell|days|DELETE|9375|borderWidth|625|NUMPAD_ADD|INSERT|_disableClass|easeOutCubic|easeInOutBack|easeOutBack|easeInBack|8230|188|rotate|easeInOutCubic|clearInterval|keyup|setInterval|Done|Prev|blind|August|July|110|September|October|Feb|Jan|pt|November|June|easeInOutBounce|February|January|Today|Next|March|darkorange|other|984375|NUMPAD_DECIMAL|April|Loading|easeInQuart|fragment|identifier|easeInOutExpo|easeInOutQuart|Mismatching|Tabs|easeInCirc|0123456789||gen|UI|easeOutExpo|220|wrapInner|easeOutSine|easeInSine|ajax|easeInOutSine|darkorchid|easeInQuint|easeInExpo|easeOutQuint|easeInOutQuint|beige|BACKSPACE|loading|easeInOutElastic|azure|easeOutElastic|nav|blue|COMMA|aqua|CAPS_LOCK|_orientation|easeInElastic|easeInOutCirc|insertAfter|unique|easeOutQuart|unload|has|ol|easeOutCirc|Za|z0|ul|Mar|December|hasDatepicker|borderTopColor|accessible|Sa|ffff99|borderRightColor|setDefaults|console|clearStyle|changestart|Fr|Th|NUMPAD_SUBTRACT|horizFirst|Sat|Apr|Su|Mo|outlineColor|We|Tu|109|getAttribute|eval|PERIOD||cyan|PAGE_UP|pulsate|borderLeftColor|borderBottomColor|SHIFT|fff|puff|190|frameborder|easeInOutQuad|primary|tablist|tabpanel|brown|mouseleave|mouseenter|javascript|PAGE_DOWN|navigation|fold|106|Dec|Sunday|Nov|Oct|NUMPAD_ENTER|Monday|dragHelper|Thursday|Wednesday|108|Tuesday|111|NUMPAD_DIVIDE|Jul|Jun|grip|bounce|250|clip|Sep|Aug|IMG|resizeHelper|Friday|NUMPAD_MULTIPLY|200|bounceslide|Wed|easeslide|dialogClass|Thu||easeinout|outline|labelledby|Saturday|Fri|Sun|beforeclose|Mon|Tue|closethick'.split('|'),0,{}))


/*********** ui.core.js *************/
﻿/*
 * 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($) {

$.ui = {
	plugin: {
		add: function(module, option, set) {
			var proto = $.ui[module].prototype;
			for(var i in set) {
				proto.plugins[i] = proto.plugins[i] || [];
				proto.plugins[i].push([option, set[i]]);
			}
		},
		call: function(instance, name, args) {
			var set = instance.plugins[name];
			if(!set) { return; }
			
			for (var i = 0; i < set.length; i++) {
				if (instance.options[set[i][0]]) {
					set[i][1].apply(instance.element, args);
				}
			}
		}	
	},
	cssCache: {},
	css: function(name) {
		if ($.ui.cssCache[name]) { return $.ui.cssCache[name]; }
		var tmp = $('<div class="ui-gen">').addClass(name).css({position:'absolute', top:'-5000px', left:'-5000px', display:'block'}).appendTo('body');
		
		//if (!$.browser.safari)
			//tmp.appendTo('body'); 
		
		//Opera and Safari set width and height to 0px instead of auto
		//Safari returns rgba(0,0,0,0) when bgcolor is not set
		$.ui.cssCache[name] = !!(
			(!(/auto|default/).test(tmp.css('cursor')) || (/^[1-9]/).test(tmp.css('height')) || (/^[1-9]/).test(tmp.css('width')) || 
			!(/none/).test(tmp.css('backgroundImage')) || !(/transparent|rgba\(0, 0, 0, 0\)/).test(tmp.css('backgroundColor')))
		);
		try { $('body').get(0).removeChild(tmp.get(0));	} catch(e){}
		return $.ui.cssCache[name];
	},
	disableSelection: function(el) {
		$(el).attr('unselectable', 'on').css('MozUserSelect', 'none');
	},
	enableSelection: function(el) {
		$(el).attr('unselectable', 'off').css('MozUserSelect', '');
	},
	hasScroll: function(e, a) {
		var scroll = /top/.test(a||"top") ? 'scrollTop' : 'scrollLeft', has = false;
		if (e[scroll] > 0) return true; e[scroll] = 1;
		has = e[scroll] > 0 ? true : false; e[scroll] = 0;
		return has;
	}
};


/** jQuery core modifications and additions **/

var _remove = $.fn.remove;
$.fn.remove = function() {
	$("*", this).add(this).triggerHandler("remove");
	return _remove.apply(this, arguments );
};

// $.widget is a factory to create jQuery plugins
// taking some boilerplate code out of the plugin code
// created by Scott González and Jörn Zaefferer
function getter(namespace, plugin, method) {
	var methods = $[namespace][plugin].getter || [];
	methods = (typeof methods == "string" ? methods.split(/,?\s+/) : methods);
	return ($.inArray(method, methods) != -1);
}

$.widget = function(name, prototype) {
	var namespace = name.split(".")[0];
	name = name.split(".")[1];
	
	// create plugin method
	$.fn[name] = function(options) {
		var isMethodCall = (typeof options == 'string'),
			args = Array.prototype.slice.call(arguments, 1);
		
		if (isMethodCall && getter(namespace, name, options)) {
			var instance = $.data(this[0], name);
			return (instance ? instance[options].apply(instance, args)
				: undefined);
		}
		
		return this.each(function() {
			var instance = $.data(this, name);
			if (isMethodCall && instance && $.isFunction(instance[options])) {
				instance[options].apply(instance, args);
			} else if (!isMethodCall) {
				$.data(this, name, new $[namespace][name](this, options));
			}
		});
	};
	
	// create widget constructor
	$[namespace][name] = function(element, options) {
		var self = this;
		
		this.widgetName = name;
		this.widgetBaseClass = namespace + '-' + name;
		
		this.options = $.extend({}, $.widget.defaults, $[namespace][name].defaults, options);
		this.element = $(element)
			.bind('setData.' + name, function(e, key, value) {
				return self.setData(key, value);
			})
			.bind('getData.' + name, function(e, key) {
				return self.getData(key);
			})
			.bind('remove', function() {
				return self.destroy();
			});
		this.init();
	};
	
	// add widget prototype
	$[namespace][name].prototype = $.extend({}, $.widget.prototype, prototype);
};

$.widget.prototype = {
	init: function() {},
	destroy: function() {
		this.element.removeData(this.widgetName);
	},
	
	getData: function(key) {
		return this.options[key];
	},
	setData: function(key, value) {
		this.options[key] = value;
		
		if (key == 'disabled') {
			this.element[value ? 'addClass' : 'removeClass'](
				this.widgetBaseClass + '-disabled');
		}
	},
	
	enable: function() {
		this.setData('disabled', false);
	},
	disable: function() {
		this.setData('disabled', true);
	}
};

$.widget.defaults = {
	disabled: false
};


/** Mouse Interaction Plugin **/

$.ui.mouse = {
	mouseInit: function() {
		var self = this;
	
		this.element.bind('mousedown.'+this.widgetName, function(e) {
			return self.mouseDown(e);
		});
		
		// Prevent text selection in IE
		if ($.browser.msie) {
			this._mouseUnselectable = this.element.attr('unselectable');
			this.element.attr('unselectable', 'on');
		}
		
		this.started = false;
	},
	
	// TODO: make sure destroying one instance of mouse doesn't mess with
	// other instances of mouse
	mouseDestroy: function() {
		this.element.unbind('.'+this.widgetName);
		
		// Restore text selection in IE
		($.browser.msie
			&& this.element.attr('unselectable', this._mouseUnselectable));
	},
	
	mouseDown: function(e) {
		// we may have missed mouseup (out of window)
		(this._mouseStarted && this.mouseUp(e));
		
		this._mouseDownEvent = e;
		
		var self = this,
			btnIsLeft = (e.which == 1),
			elIsCancel = (typeof this.options.cancel == "string" ? $(e.target).parents().add(e.target).filter(this.options.cancel).length : false);
		if (!btnIsLeft || elIsCancel || !this.mouseCapture(e)) {
			return true;
		}
		
		this._mouseDelayMet = !this.options.delay;
		if (!this._mouseDelayMet) {
			this._mouseDelayTimer = setTimeout(function() {
				self._mouseDelayMet = true;
			}, this.options.delay);
		}
		
		if (this.mouseDistanceMet(e) && this.mouseDelayMet(e)) {
			this._mouseStarted = (this.mouseStart(e) !== false);
			if (!this._mouseStarted) {
				e.preventDefault();
				return true;
			}
		}
		
		// these delegates are required to keep context
		this._mouseMoveDelegate = function(e) {
			return self.mouseMove(e);
		};
		this._mouseUpDelegate = function(e) {
			return self.mouseUp(e);
		};
		$(document)
			.bind('mousemove.'+this.widgetName, this._mouseMoveDelegate)
			.bind('mouseup.'+this.widgetName, this._mouseUpDelegate);
		
		return false;
	},
	
	mouseMove: function(e) {
		// IE mouseup check - mouseup happened when mouse was out of window
		if ($.browser.msie && !e.button) {
			return this.mouseUp(e);
		}
		
		if (this._mouseStarted) {
			this.mouseDrag(e);
			return false;
		}
		
		if (this.mouseDistanceMet(e) && this.mouseDelayMet(e)) {
			this._mouseStarted =
				(this.mouseStart(this._mouseDownEvent, e) !== false);
			(this._mouseStarted ? this.mouseDrag(e) : this.mouseUp(e));
		}
		
		return !this._mouseStarted;
	},
	
	mouseUp: function(e) {
		$(document)
			.unbind('mousemove.'+this.widgetName, this._mouseMoveDelegate)
			.unbind('mouseup.'+this.widgetName, this._mouseUpDelegate);
		
		if (this._mouseStarted) {
			this._mouseStarted = false;
			this.mouseStop(e);
		}
		
		return false;
	},
	
	mouseDistanceMet: function(e) {
		return (Math.max(
				Math.abs(this._mouseDownEvent.pageX - e.pageX),
				Math.abs(this._mouseDownEvent.pageY - e.pageY)
			) >= this.options.distance
		);
	},
	
	mouseDelayMet: function(e) {
		return this._mouseDelayMet;
	},
	
	// These are placeholder methods, to be overriden by extending plugin
	mouseStart: function(e) {},
	mouseDrag: function(e) {},
	mouseStop: function(e) {},
	mouseCapture: function(e) { return true; }
};

$.ui.mouse.defaults = {
	cancel: null,
	distance: 1,
	delay: 0
};

})(jQuery);


/*********** ui.datepicker.js *************/
/*
 * jQuery UI Datepicker
 *
 * Copyright (c) 2006, 2007, 2008 Marc Grabanski
 * Dual licensed under the MIT (MIT-LICENSE.txt)
 * and GPL (GPL-LICENSE.txt) licenses.
 * 
 * http://docs.jquery.com/UI/Datepicker
 *
 * Depends:
 *	ui.core.js
 *
 * Marc Grabanski (m@marcgrabanski.com) and Keith Wood (kbwood@virginbroadband.com.au).
 */
   
(function($) { // hide the namespace

var PROP_NAME = 'datepicker';

/* Date picker manager.
   Use the singleton instance of this class, $.datepicker, to interact with the date picker.
   Settings for (groups of) date pickers are maintained in an instance object,
   allowing multiple different settings on the same page. */

function Datepicker() {
	this.debug = false; // Change this to true to start debugging
	this._curInst = null; // The current instance in use
	this._disabledInputs = []; // List of date picker inputs that have been disabled
	this._datepickerShowing = false; // True if the popup picker is showing , false if not
	this._inDialog = false; // True if showing within a "dialog", false if not
	this._mainDivId = 'ui-datepicker-div'; // The ID of the main datepicker division
	this._appendClass = 'ui-datepicker-append'; // The name of the append marker class
	this._triggerClass = 'ui-datepicker-trigger'; // The name of the trigger marker class
	this._dialogClass = 'ui-datepicker-dialog'; // The name of the dialog marker class
	this._promptClass = 'ui-datepicker-prompt'; // The name of the dialog prompt marker class
	this._unselectableClass = 'ui-datepicker-unselectable'; // The name of the unselectable cell marker class
	this._currentClass = 'ui-datepicker-current-day'; // The name of the current day marker class
	this.regional = []; // Available regional settings, indexed by language code
	this.regional[''] = { // Default regional settings
		clearText: 'Clear', // Display text for clear link
		clearStatus: 'Erase the current date', // Status text for clear link
		closeText: 'Close', // Display text for close link
		closeStatus: 'Close without change', // Status text for close link
		prevText: '&#x3c;Prev', // Display text for previous month link
		prevStatus: 'Show the previous month', // Status text for previous month link
		nextText: 'Next&#x3e;', // Display text for next month link
		nextStatus: 'Show the next month', // Status text for next month link
		currentText: 'Today', // Display text for current month link
		currentStatus: 'Show the current month', // Status text for current month link
		monthNames: ['January','February','March','April','May','June',
			'July','August','September','October','November','December'], // Names of months for drop-down and formatting
		monthNamesShort: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'], // For formatting
		monthStatus: 'Show a different month', // Status text for selecting a month
		yearStatus: 'Show a different year', // Status text for selecting a year
		weekHeader: 'Wk', // Header for the week of the year column
		weekStatus: 'Week of the year', // Status text for the week of the year column
		dayNames: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'], // For formatting
		dayNamesShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'], // For formatting
		dayNamesMin: ['Su','Mo','Tu','We','Th','Fr','Sa'], // Column headings for days starting at Sunday
		dayStatus: 'Set DD as first week day', // Status text for the day of the week selection
		dateStatus: 'Select DD, M d', // Status text for the date selection
		dateFormat: 'mm/dd/yy', // See format options on parseDate
		firstDay: 0, // The first day of the week, Sun = 0, Mon = 1, ...
		initStatus: 'Select a date', // Initial Status text on opening
		isRTL: false // True if right-to-left language, false if left-to-right
	};
	this._defaults = { // Global defaults for all the date picker instances
		showOn: 'focus', // 'focus' for popup on focus,
			// 'button' for trigger button, or 'both' for either
		showAnim: 'show', // Name of jQuery animation for popup
		showOptions: {}, // Options for enhanced animations
		defaultDate: null, // Used when field is blank: actual date,
			// +/-number for offset from today, null for today
		appendText: '', // Display text following the input box, e.g. showing the format
		buttonText: '...', // Text for trigger button
		buttonImage: '', // URL for trigger button image
		buttonImageOnly: false, // True if the image appears alone, false if it appears on a button
		closeAtTop: true, // True to have the clear/close at the top,
			// false to have them at the bottom
		mandatory: false, // True to hide the Clear link, false to include it
		hideIfNoPrevNext: false, // True to hide next/previous month links
			// if not applicable, false to just disable them
		navigationAsDateFormat: false, // True if date formatting applied to prev/today/next links
		gotoCurrent: false, // True if today link goes back to current selection instead
		changeMonth: true, // True if month can be selected directly, false if only prev/next
		changeYear: true, // True if year can be selected directly, false if only prev/next
		yearRange: '-10:+10', // Range of years to display in drop-down,
			// either relative to current year (-nn:+nn) or absolute (nnnn:nnnn)
		changeFirstDay: true, // True to click on day name to change, false to remain as set
		highlightWeek: false, // True to highlight the selected week
		showOtherMonths: false, // True to show dates in other months, false to leave blank
		showWeeks: false, // True to show week of the year, false to omit
		calculateWeek: this.iso8601Week, // How to calculate the week of the year,
			// takes a Date and returns the number of the week for it
		shortYearCutoff: '+10', // Short year values < this are in the current century,
			// > this are in the previous century, 
			// string value starting with '+' for current year + value
		showStatus: false, // True to show status bar at bottom, false to not show it
		statusForDate: this.dateStatus, // Function to provide status text for a date -
			// takes date and instance as parameters, returns display text
		minDate: null, // The earliest selectable date, or null for no limit
		maxDate: null, // The latest selectable date, or null for no limit
		duration: 'normal', // Duration of display/closure
		beforeShowDay: null, // Function that takes a date and returns an array with
			// [0] = true if selectable, false if not, [1] = custom CSS class name(s) or '', 
			// [2] = cell title (optional), e.g. $.datepicker.noWeekends
		beforeShow: null, // Function that takes an input field and
			// returns a set of custom settings for the date picker
		onSelect: null, // Define a callback function when a date is selected
		onChangeMonthYear: null, // Define a callback function when the month or year is changed
		onClose: null, // Define a callback function when the datepicker is closed
		numberOfMonths: 1, // Number of months to show at a time
		stepMonths: 1, // Number of months to step back/forward
		rangeSelect: false, // Allows for selecting a date range on one date picker
		rangeSeparator: ' - ', // Text between two dates in a range
		altField: '', // Selector for an alternate field to store selected dates into
		altFormat: '' // The date format to use for the alternate field
	};
	$.extend(this._defaults, this.regional['']);
	this.dpDiv = $('<div id="' + this._mainDivId + '" style="display: none;"></div>');
}

$.extend(Datepicker.prototype, {
	/* Class name added to elements to indicate already configured with a date picker. */
	markerClassName: 'hasDatepicker',

	/* Debug logging (if enabled). */
	log: function () {
		if (this.debug)
			console.log.apply('', arguments);
	},
	
	/* Override the default settings for all instances of the date picker. 
	   @param  settings  object - the new settings to use as defaults (anonymous object)
	   @return the manager object */
	setDefaults: function(settings) {
		extendRemove(this._defaults, settings || {});
		return this;
	},

	/* Attach the date picker to a jQuery selection.
	   @param  target    element - the target input field or division or span
	   @param  settings  object - the new settings to use for this date picker instance (anonymous) */
	_attachDatepicker: function(target, settings) {
		// check for settings on the control itself - in namespace 'date:'
		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);
		}
	},

	/* Create a new instance object. */
	_newInst: function(target, inline) {
		return {id: target[0].id, input: target, // associated target
			selectedDay: 0, selectedMonth: 0, selectedYear: 0, // current selection
			drawMonth: 0, drawYear: 0, // month being drawn
			inline: inline, // is datepicker inline or not
			dpDiv: (!inline ? this.dpDiv : // presentation div
			$('<div class="ui-datepicker-inline"></div>'))};
	},

	/* Attach the date picker to an input field. */
	_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') // pop-up date picker when in the marked field
			input.focus(this._showDatepicker);
		if (showOn == 'button' || showOn == 'both') { // pop-up date picker when button clicked
			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);
	},

	/* Attach an inline date picker to a div. */
	_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);
	},

	/* Pop-up the date picker in a "dialog" box.
	   @param  input     element - ignored
	   @param  dateText  string - the initial date to display (in the current format)
	   @param  onSelect  function - the function(dateText) to call when a date is selected
	   @param  settings  object - update the dialog date picker instance's settings (anonymous object)
	   @param  pos       int[2] - coordinates for the dialog's position within the screen or
	                     event - with x/y coordinates or
	                     leave empty for default (screen centre)
	   @return the manager object */
	_dialogDatepicker: function(input, dateText, onSelect, settings, pos) {
		var inst = this._dialogInst; // internal instance
		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 = // should use actual width/height below
				[(browserWidth / 2) - 100 + scrollX, (browserHeight / 2) - 150 + scrollY];
		}

		// move input on screen for focus, but hidden behind dialog
		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;
	},

	/* Detach a datepicker from its control.
	   @param  target    element - the target input field or division or span */
	_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();
	},

	/* Enable the date picker to a jQuery selection.
	   @param  target    element - the target input field or division or span */
	_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); }); // delete entry
	},

	/* Disable the date picker to a jQuery selection.
	   @param  target    element - the target input field or division or span */
	_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); }); // delete entry
		this._disabledInputs[this._disabledInputs.length] = target;
	},

	/* Is the first field in a jQuery collection disabled as a datepicker?
	   @param  target    element - the target input field or division or span
	   @return boolean - true if disabled, false if enabled */
	_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;
	},

	/* Update the settings for a date picker attached to an input field or division.
	   @param  target  element - the target input field or division or span
	   @param  name    object - the new settings to update or
	                   string - the name of the setting to change or
	   @param  value   any - the new value for the setting (omit if above is an object) */
	_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);
		}
	},

	/* Set the dates for a jQuery selection.
	   @param  target   element - the target input field or division or span
	   @param  date     Date - the new date
	   @param  endDate  Date - the new end date for a range (optional) */
	_setDateDatepicker: function(target, date, endDate) {
		var inst = $.data(target, PROP_NAME);
		if (inst) {
			this._setDate(inst, date, endDate);
			this._updateDatepicker(inst);
		}
	},

	/* Get the date(s) for the first entry in a jQuery selection.
	   @param  target  element - the target input field or division or span
	   @return Date - the current date or
	           Date[2] - the current dates for a range */
	_getDateDatepicker: function(target) {
		var inst = $.data(target, PROP_NAME);
		if (inst)
			this._setDateFromField(inst); 
		return (inst ? this._getDate(inst) : null);
	},

	/* Handle keystrokes. */
	_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; // hide on tab out
				case 13: $.datepicker._selectDay(e.target, inst.selectedMonth, inst.selectedYear,
							$('td.ui-datepicker-days-cell-over', inst.dpDiv)[0]);
						return false; // don't submit the form
						break; // select the value on enter
				case 27: $.datepicker._hideDatepicker(null, $.datepicker._get(inst, 'duration'));
						break; // hide on escape
				case 33: $.datepicker._adjustDate(e.target, (e.ctrlKey ? -1 :
							-$.datepicker._get(inst, 'stepMonths')), (e.ctrlKey ? 'Y' : 'M'));
						break; // previous month/year on page up/+ ctrl
				case 34: $.datepicker._adjustDate(e.target, (e.ctrlKey ? +1 :
							+$.datepicker._get(inst, 'stepMonths')), (e.ctrlKey ? 'Y' : 'M'));
						break; // next month/year on page down/+ ctrl
				case 35: if (e.ctrlKey) $.datepicker._clearDate(e.target);
						break; // clear on ctrl+end
				case 36: if (e.ctrlKey) $.datepicker._gotoToday(e.target);
						break; // current on ctrl+home
				case 37: if (e.ctrlKey) $.datepicker._adjustDate(e.target, -1, 'D');
						break; // -1 day on ctrl+left
				case 38: if (e.ctrlKey) $.datepicker._adjustDate(e.target, -7, 'D');
						break; // -1 week on ctrl+up
				case 39: if (e.ctrlKey) $.datepicker._adjustDate(e.target, +1, 'D');
						break; // +1 day on ctrl+right
				case 40: if (e.ctrlKey) $.datepicker._adjustDate(e.target, +7, 'D');
						break; // +1 week on ctrl+down
				default: handled = false;
			}
		else if (e.keyCode == 36 && e.ctrlKey) // display the date picker on ctrl+home
			$.datepicker._showDatepicker(this);
		else
			handled = false;
		if (handled) {
			e.preventDefault();
			e.stopPropagation();
		}
	},

	/* Filter entered characters - based on date format. */
	_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);
	},

	/* Pop-up the date picker for a given input field.
	   @param  input  element - the input field attached to the date picker or
	                  event - if triggered by focus */
	_showDatepicker: function(input) {
		input = input.target || input;
		if (input.nodeName.toLowerCase() != 'input') // find from button/image trigger
			input = $('input', input.parentNode)[0];
		if ($.datepicker._isDisabledDatepicker(input) || $.datepicker._lastInput == input) // already here
			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) // hide cursor
			input.value = '';
		if (!$.datepicker._pos) { // position below input
			$.datepicker._pos = $.datepicker._findPos(input);
			$.datepicker._pos[1] += input.offsetHeight; // add the height
		}
		var isFixed = false;
		$(input).parents().each(function() {
			isFixed |= $(this).css('position') == 'fixed';
			return !isFixed;
		});
		if (isFixed && $.browser.opera) { // correction for Opera when fixed and scrolled
			$.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;
		// determine sizing offscreen
		inst.dpDiv.css({position: 'absolute', display: 'block', top: '-1000px'});
		$.datepicker._updateDatepicker(inst);
		// fix width for dynamic number of date pickers
		inst.dpDiv.width($.datepicker._getNumberOfMonths(inst)[1] *
			$('.ui-datepicker', inst.dpDiv[0])[0].offsetWidth);
		// and adjust position before showing
		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) // fix IE < 7 select problems
					$('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;
		}
	},

	/* Generate the date picker content. */
	_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();
	},

	/* Check positioning to remain on screen. */
	_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;
		// reposition date picker horizontally if outside the browser window
		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);
		// reposition date picker vertically if outside the browser window
		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;
	},
	
	/* Find an object's position on the screen. */
	_findPos: function(obj) {
        while (obj && (obj.type == 'hidden' || obj.nodeType != 1)) {
            obj = obj.nextSibling;
        }
        var position = $(obj).offset();
	    return [position.left, position.top];
	},

	/* Hide the date picker from view.
	   @param  input  element - the input field attached to the date picker
	   @param  duration  string - the duration over which to close the date picker */
	_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]);  // trigger custom callback
			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;
	},

	/* Tidy up after a dialog display. */
	_tidyDialog: function(inst) {
		inst.dpDiv.removeClass(this._dialogClass).unbind('.ui-datepicker');
		$('.' + this._promptClass, inst.dpDiv).remove();
	},

	/* Close date picker if clicked elsewhere. */
	_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, '');
	},

	/* Adjust one of the date sub-fields. */
	_adjustDate: function(id, offset, period) {
		var target = $(id);
		var inst = $.data(target[0], PROP_NAME);
		this._adjustInstDate(inst, offset, period);
		this._updateDatepicker(inst);
	},

	/* Action for current link. */
	_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);
	},

	/* Action for selecting a new month/year. */
	_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);
	},

	/* Restore input focus after not changing month/year. */
	_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;
	},

	/* Action for changing the first week day. */
	_changeFirstDay: function(id, day) {
		var target = $(id);
		var inst = $.data(target[0], PROP_NAME);
		inst.settings.firstDay = day;
		this._updateDatepicker(inst);
	},

	/* Action for selecting a day. */
	_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);
		}
	},

	/* Erase the input field and hide the date picker. */
	_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, '');
	},

	/* Update the input field with the selected date. */
	_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]);  // trigger custom callback
		else if (inst.input)
			inst.input.trigger('change'); // fire the change event
		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(); // restore focus
			this._lastInput = null;
		}
	},
	
	/* Update any alternate field to synchronise with the main field. */
	_updateAlternate: function(inst) {
		var altField = this._get(inst, 'altField');
		if (altField) { // update alternate field too
			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); });
		}
	},

	/* Set as beforeShowDay function to prevent selection of weekends.
	   @param  date  Date - the date to customise
	   @return [boolean, string] - is this date selectable?, what is its CSS class? */
	noWeekends: function(date) {
		var day = date.getDay();
		return [(day > 0 && day < 6), ''];
	},
	
	/* Set as calculateWeek to determine the week of the year based on the ISO 8601 definition.
	   @param  date  Date - the date to get the week for
	   @return  number - the number of the week within the year that contains this date */
	iso8601Week: function(date) {
		var checkDate = new Date(date.getFullYear(), date.getMonth(), date.getDate());
		var firstMon = new Date(checkDate.getFullYear(), 1 - 1, 4); // First week always contains 4 Jan
		var firstDay = firstMon.getDay() || 7; // Day of week: Mon = 1, ..., Sun = 7
		firstMon.setDate(firstMon.getDate() + 1 - firstDay); // Preceding Monday
		if (firstDay < 4 && checkDate < firstMon) { // Adjust first three days in year if necessary
			checkDate.setDate(checkDate.getDate() - 3); // Generate for previous year
			return $.datepicker.iso8601Week(checkDate);
		} else if (checkDate > new Date(checkDate.getFullYear(), 12 - 1, 28)) { // Check last three days in year
			firstDay = new Date(checkDate.getFullYear() + 1, 1 - 1, 4).getDay() || 7;
			if (firstDay > 4 && (checkDate.getDay() || 7) < firstDay - 3) { // Adjust if necessary
				checkDate.setDate(checkDate.getDate() + 3); // Generate for next year
				return $.datepicker.iso8601Week(checkDate);
			}
		}
		return Math.floor(((checkDate - firstMon) / 86400000) / 7) + 1; // Weeks to given date
	},
	
	/* Provide status text for a particular date.
	   @param  date  the date to get the status for
	   @param  inst  the current datepicker instance
	   @return  the status display text for this date */
	dateStatus: function(date, inst) {
		return $.datepicker.formatDate($.datepicker._get(inst, 'dateStatus'),
			date, $.datepicker._getFormatConfig(inst));
	},

	/* Parse a string value into a date object.
	   See formatDate below for the possible formats.

	   @param  format    string - the expected format of the date
	   @param  value     string - the date in the above format
	   @param  settings  Object - attributes include:
	                     shortYearCutoff  number - the cutoff year for determining the century (optional)
	                     dayNamesShort    string[7] - abbreviated names of the days from Sunday (optional)
	                     dayNames         string[7] - names of the days from Sunday (optional)
	                     monthNamesShort  string[12] - abbreviated names of the months (optional)
	                     monthNames       string[12] - names of the months (optional)
	   @return  Date - the extracted date value or null if value is blank */
	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;
		// Check whether a format character is doubled
		var lookAhead = function(match) {
			var matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) == match);
			if (matches)
				iFormat++;
			return matches;	
		};
		// Extract a number from the string value
		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;
		};
		// Extract a name from the string value and convert to an index
		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;
		};
		// Confirm that a literal character matches the string value
		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'; // E.g. 31/02/*
		return date;
	},

	/* Standard date formats. */
	ATOM: 'yy-mm-dd', // RFC 3339 (ISO 8601)
	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', // RFC 822
	TIMESTAMP: '@',
	W3C: 'yy-mm-dd', // ISO 8601

	/* Format a date object into a string value.
	   The format can be combinations of the following:
	   d  - day of month (no leading zero)
	   dd - day of month (two digit)
	   D  - day name short
	   DD - day name long
	   m  - month of year (no leading zero)
	   mm - month of year (two digit)
	   M  - month name short
	   MM - month name long
	   y  - year (two digit)
	   yy - year (four digit)
	   @ - Unix timestamp (ms since 01/01/1970)
	   '...' - literal text
	   '' - single quote

	   @param  format    string - the desired format of the date
	   @param  date      Date - the date value to format
	   @param  settings  Object - attributes include:
	                     dayNamesShort    string[7] - abbreviated names of the days from Sunday (optional)
	                     dayNames         string[7] - names of the days from Sunday (optional)
	                     monthNamesShort  string[12] - abbreviated names of the months (optional)
	                     monthNames       string[12] - names of the months (optional)
	   @return  string - the date in the above format */
	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;
		// Check whether a format character is doubled
		var lookAhead = function(match) {
			var matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) == match);
			if (matches)
				iFormat++;
			return matches;	
		};
		// Format a number, with leading zero if necessary
		var formatNumber = function(match, value) {
			return (lookAhead(match) && value < 10 ? '0' : '') + value;
		};
		// Format a name, short or long as requested
		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;
	},

	/* Extract all possible characters from the date format. */
	_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; // Accept anything
					case "'":
						if (lookAhead("'"))
							chars += "'";
						else
							literal = true;
						break;
					default:
						chars += format.charAt(iFormat);
				}
		return chars;
	},

	/* Get a setting value, defaulting if necessary. */
	_get: function(inst, name) {
		return inst.settings[name] !== undefined ?
			inst.settings[name] : this._defaults[name];
	},

	/* Parse existing date and initialise date picker. */
	_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);
	},
	
	/* Retrieve the default date shown on opening. */
	_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;
	},

	/* A date may be specified as an exact value or a relative one. */
	_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);
	},

	/* Handle switch to/from daylight saving.
	   Hours may be non-zero on daylight saving cut-over:
	   > 12 when midnight changeover, but then cannot generate 
	   midnight datetime, so jump to 1AM, otherwise reset.
	   @param  date  (Date) the date to check
	   @return  (Date) the corrected date */
	_daylightSavingAdjust: function(date) {
		if (!date) return null;
		date.setHours(date.getHours() > 12 ? date.getHours() + 2 : 0);
		return date;
	},

	/* Set the date(s) directly. */
	_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)));
	},

	/* Retrieve the date(s) directly. */
	_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;
	},

	/* Generate the HTML for the current state of the date picker. */
	_generateDatepicker: function(inst) {
		var today = new Date();
		today = this._daylightSavingAdjust(
			new Date(today.getFullYear(), today.getMonth(), today.getDate())); // clear time
		var showStatus = this._get(inst, 'showStatus');
		var isRTL = this._get(inst, 'isRTL');
		// build the date picker HTML
		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--;
				}
			}
		}
		// controls and links
		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) + // draw month headers
					'<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++) { // days of the week
					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)); // calculate the number of rows to generate
				var printDate = this._daylightSavingAdjust(new Date(drawYear, drawMonth, 1 - leadDays));
				for (var dRow = 0; dRow < numRows; dRow++) { // create date picker rows
					html += '<tr class="ui-datepicker-days-row">' +
						(showWeeks ? '<td class="ui-datepicker-week-col">' + calculateWeek(printDate) + '</td>' : '');
					for (var dow = 0; dow < 7; dow++) { // create date picker days
						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' : '') + // highlight weekends
							(otherMonth ? ' ui-datepicker-otherMonth' : '') + // highlight days from other months
							(printDate.getTime() == selectedDate.getTime() && drawMonth == inst.selectedMonth ?
							' ui-datepicker-days-cell-over' : '') + // highlight selected day
							(unselectable ? ' ' + this._unselectableClass : '') +  // highlight unselectable days
							(otherMonth && !showOtherMonths ? '' : ' ' + daySettings[1] + // highlight custom dates
							(printDate.getTime() >= currentDate.getTime() && printDate.getTime() <= endDate.getTime() ?  // in current range
							' ' + this._currentClass : '') + // highlight selected day
							(printDate.getTime() == today.getTime() ? ' ui-datepicker-today' : '')) + '"' + // highlight today (if different)
							((!otherMonth || showOtherMonths) && daySettings[2] ? ' title="' + daySettings[2] + '"' : '') + // cell title
							(unselectable ? (highlightWeek ? ' onmouseover="jQuery(this).parent().addClass(\'ui-datepicker-week-over\');"' + // highlight selection week
							' onmouseout="jQuery(this).parent().removeClass(\'ui-datepicker-week-over\');"' : '') : // unhighlight selection week
							' onmouseover="jQuery(this).addClass(\'ui-datepicker-days-cell-over\')' + // highlight selection
							(highlightWeek ? '.parent().addClass(\'ui-datepicker-week-over\')' : '') + ';' + // highlight selection week
							(!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\')' + // unhighlight selection
							(highlightWeek ? '.parent().removeClass(\'ui-datepicker-week-over\')' : '') + ';' + // unhighlight selection week
							(!showStatus || (otherMonth && !showOtherMonths) ? '' : 'jQuery(\'#ui-datepicker-status-' +
							inst.id + '\').html(\'&#xa0;\');') + '" onclick="jQuery.datepicker._selectDay(\'#' +
							inst.id + '\',' + drawMonth + ',' + drawYear + ', this);"') + '>' + // actions
							(otherMonth ? (showOtherMonths ? printDate.getDate() : '&#xa0;') : // display for other months
							(unselectable ? printDate.getDate() : '<a>' + printDate.getDate() + '</a>')) + '</td>'; // display for this month
						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;
	},
	
	/* Generate the month and year header. */
	_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">';
		// month selection
		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>';
		}
		// year selection
		if (secondary || !this._get(inst, 'changeYear'))
			html += drawYear;
		else {
			// determine range of years to display
			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>'; // Close datepicker_header
		return html;
	},

	/* Provide code to set and clear the status panel. */
	_addStatus: function(inst, text) {
		return ' onmouseover="jQuery(\'#ui-datepicker-status-' + inst.id + '\').html(\'' + text + '\');" ' +
			'onmouseout="jQuery(\'#ui-datepicker-status-' + inst.id + '\').html(\'&#xa0;\');"';
	},

	/* Adjust one of the date sub-fields. */
	_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));
		// ensure it is within the bounds set
		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);
	},

	/* Notify change of month/year. */
	_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]);
	},
	
	/* Determine the number of months to show. */
	_getNumberOfMonths: function(inst) {
		var numMonths = this._get(inst, 'numberOfMonths');
		return (numMonths == null ? [1, 1] : (typeof numMonths == 'number' ? [1, numMonths] : numMonths));
	},

	/* Determine the current maximum date - ensure no time components are set - may be overridden for a range. */
	_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));
	},

	/* Find the number of days in a given month. */
	_getDaysInMonth: function(year, month) {
		return 32 - new Date(year, month, 32).getDate();
	},

	/* Find the day of the week of the first of a month. */
	_getFirstDayOfMonth: function(year, month) {
		return new Date(year, month, 1).getDay();
	},

	/* Determines if we should allow a "next/prev" month display change. */
	_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);
	},

	/* Is the given date in the accepted range? */
	_isInRange: function(inst, date) {
		// during range selection, use minimum of selected date and range start
		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));
	},
	
	/* Provide the configuration settings for formatting/parsing. */
	_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')};
	},

	/* Format the given date for display. */
	_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));
	}
});

/* jQuery extend now ignores nulls! */
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;
};

/* Determine whether an object is an array. */
function isArray(a) {
	return (a && (($.browser.safari && typeof a == 'object' && a.length) ||
		(a.constructor && a.constructor.toString().match(/\Array\(\)/))));
};

/* Invoke the datepicker functionality.
   @param  options  string - a command, optionally followed by additional parameters or
                    Object - settings for attaching new datepicker functionality
   @return  jQuery object */
$.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(); // singleton instance
	
/* Initialise the date picker. */
$(document).ready(function() {
	$(document.body).append($.datepicker.dpDiv).
		mousedown($.datepicker._checkExternalClick);
});

})(jQuery);


/*********** shadow.js *************/
/*
	VERSION: Drop Shadow jQuery Plugin 1.6  12-13-2007
	With modifications by Ari Maniatis
*/

(function($){

	var dropShadowZindex = 6000;  //z-index counter

	$.fn.dropShadow = function(options)
	{
		// Default options
		var opt = $.extend({
			left: 4,
			top: 4,
			heightAdj: 0,
			blur: 2,
			opacity: .5,
			color: "black",
			swap: false
			}, options);
		var jShadows = $([]);  //empty jQuery collection
		
		// Loop through original elements
		this.not(".dropShadow").each(function()
		{
			var jthis = $(this);
			var shadows = [];
			var blur = (opt.blur <= 0) ? 0 : opt.blur;
			var opacity = (blur == 0) ? opt.opacity : opt.opacity / (blur * 8);
			var zOriginal = (opt.swap) ? dropShadowZindex : dropShadowZindex + 1;
			var zShadow = (opt.swap) ? dropShadowZindex + 1 : dropShadowZindex;
			//var heightAdj = opt.heightAdj;
			
			// Create ID for shadow
			var shadowId;
			if (this.id) {
				shadowId = this.id + "_dropShadow";
			}
			else {
				shadowId = "ds" + (1 + Math.floor(9999 * Math.random()));
			}

			// Modify original element
			$.data(this, "shadowId", shadowId); //store id in expando
			$.data(this, "shadowOptions", options); //store options in expando
			jthis
				.attr("shadowId", shadowId)
				.css("zIndex", zOriginal);
			if (jthis.css("position") != "absolute") {
				jthis.css({
					position: "absolute",
					zoom: 1 //for IE layout
				});
			}

			// Create first shadow layer
			bgColor = jthis.css("backgroundColor");
			if (bgColor == "rgba(0, 0, 0, 0)") bgColor = "transparent";  //Safari
			if (bgColor != "transparent" || jthis.css("backgroundImage") != "none" 
					|| this.nodeName == "SELECT" 
					|| this.nodeName == "INPUT"
					|| this.nodeName == "TEXTAREA") {		
				shadows[0] = $("<div></div>")
					.css("background", opt.color);								
			}
			else {
				shadows[0] = jthis
					.clone()
					.removeAttr("id")
					.removeAttr("name")
					.removeAttr("shadowId")
					.css("color", opt.color);
			}
			shadows[0]
				.addClass("dropShadow")
				.css({
					height: jthis.outerHeight() + opt.heightAdj,
					left: blur,
					opacity: opacity,
					position: "absolute",
					top: blur,
					width: jthis.outerWidth(),
					zIndex: zShadow
				});
				
			// Create other shadow layers
			var layers = (8 * blur) + 1;
			for (i = 1; i < layers; i++) {
				shadows[i] = shadows[0].clone();
			}

			// Position layers
			var i = 1;			
			var j = blur;
			while (j > 0) {
				shadows[i].css({left: j * 2, top: 0});           //top
				shadows[i + 1].css({left: j * 4, top: j * 2});   //right
				shadows[i + 2].css({left: j * 2, top: j * 4});   //bottom
				shadows[i + 3].css({left: 0, top: j * 2});       //left
				shadows[i + 4].css({left: j * 3, top: j});       //top-right
				shadows[i + 5].css({left: j * 3, top: j * 3});   //bottom-right
				shadows[i + 6].css({left: j, top: j * 3});       //bottom-left
				shadows[i + 7].css({left: j, top: j});           //top-left
				i += 8;
				j--;
			}

			// Create container
			var divShadow = $("<div></div>")
				.attr("id", shadowId) 
				.addClass("dropShadow")
				.css({
					left: jthis.position().left + opt.left - blur,
					marginTop: jthis.css("marginTop"),
					marginRight: jthis.css("marginRight"),
					marginBottom: jthis.css("marginBottom"),
					marginLeft: jthis.css("marginLeft"),
					position: "absolute",
					top: jthis.position().top + opt.top - blur,
					zIndex: zShadow
				});

			// Add layers to container	
			for (i = 0; i < layers; i++) {
				divShadow.append(shadows[i]);
			}
			
			// Add container to DOM
			jthis.after(divShadow);

			// Add shadow to return set
			jShadows = jShadows.add(divShadow);

			// Re-align shadow on window resize
			$(window).resize(function()
			{
				try {
					divShadow.css({
						left: jthis.position().left + opt.left - blur,
						top: jthis.position().top + opt.top - blur
					});
				}
				catch(e){}
			});
			
			// Increment z-index counter
			dropShadowZindex += 2;

		});  //end each
		
		return this.pushStack(jShadows);
	};


	$.fn.redrawShadow = function()
	{
		// Remove existing shadows
		this.removeShadow();
		
		// Draw new shadows
		return this.each(function()
		{
			var shadowOptions = $.data(this, "shadowOptions");
			$(this).dropShadow(shadowOptions);
		});
	};


	$.fn.removeShadow = function()
	{
		return this.each(function()
		{
			var shadowId = $(this).shadowId();
			$("div#" + shadowId).remove();
		});
	};


	$.fn.shadowId = function()
	{
		return $.data(this[0], "shadowId");
	};


	$(function()  
	{
		// Suppress printing of shadows
		var noPrint = "<style type='text/css' media='print'>";
		noPrint += ".dropShadow{visibility:hidden;}</style>";
		$("head").append(noPrint);
	});

})(jQuery);

/*********** jquery.autocomplete.js *************/
/*
 * Autocomplete - jQuery plugin 1.0.2
 *
 * Copyright (c) 2007 Dylan Verheul, Dan G. Switzer, Anjesh Tuladhar, Jörn Zaefferer
 *
 * Dual licensed under the MIT and GPL licenses:
 *   http://www.opensource.org/licenses/mit-license.php
 *   http://www.gnu.org/licenses/gpl.html
 *
 * Revision: $Id: jquery.autocomplete.js 5747 2008-06-25 18:30:55Z joern.zaefferer $
 *
 */;(function($){$.fn.extend({autocomplete:function(urlOrData,options){var isUrl=typeof urlOrData=="string";options=$.extend({},$.Autocompleter.defaults,{url:isUrl?urlOrData:null,data:isUrl?null:urlOrData,delay:isUrl?$.Autocompleter.defaults.delay:10,max:options&&!options.scroll?10:150},options);options.highlight=options.highlight||function(value){return value;};options.formatMatch=options.formatMatch||options.formatItem;return this.each(function(){new $.Autocompleter(this,options);});},result:function(handler){return this.bind("result",handler);},search:function(handler){return this.trigger("search",[handler]);},flushCache:function(){return this.trigger("flushCache");},setOptions:function(options){return this.trigger("setOptions",[options]);},unautocomplete:function(){return this.trigger("unautocomplete");}});$.Autocompleter=function(input,options){var KEY={UP:38,DOWN:40,DEL:46,TAB:9,RETURN:13,ESC:27,COMMA:188,PAGEUP:33,PAGEDOWN:34,BACKSPACE:8};var $input=$(input).attr("autocomplete","off").addClass(options.inputClass);var timeout;var previousValue="";var cache=$.Autocompleter.Cache(options);var hasFocus=0;var lastKeyPressCode;var config={mouseDownOnSelect:false};var select=$.Autocompleter.Select(options,input,selectCurrent,config);var blockSubmit;$.browser.opera&&$(input.form).bind("submit.autocomplete",function(){if(blockSubmit){blockSubmit=false;return false;}});$input.bind(($.browser.opera?"keypress":"keydown")+".autocomplete",function(event){lastKeyPressCode=event.keyCode;switch(event.keyCode){case KEY.UP:event.preventDefault();if(select.visible()){select.prev();}else{onChange(0,true);}break;case KEY.DOWN:event.preventDefault();if(select.visible()){select.next();}else{onChange(0,true);}break;case KEY.PAGEUP:event.preventDefault();if(select.visible()){select.pageUp();}else{onChange(0,true);}break;case KEY.PAGEDOWN:event.preventDefault();if(select.visible()){select.pageDown();}else{onChange(0,true);}break;case options.multiple&&$.trim(options.multipleSeparator)==","&&KEY.COMMA:case KEY.TAB:case KEY.RETURN:if(selectCurrent()){event.preventDefault();blockSubmit=true;return false;}break;case KEY.ESC:select.hide();break;default:clearTimeout(timeout);timeout=setTimeout(onChange,options.delay);break;}}).focus(function(){hasFocus++;}).blur(function(){hasFocus=0;if(!config.mouseDownOnSelect){hideResults();}}).click(function(){if(hasFocus++>1&&!select.visible()){onChange(0,true);}}).bind("search",function(){var fn=(arguments.length>1)?arguments[1]:null;function findValueCallback(q,data){var result;if(data&&data.length){for(var i=0;i<data.length;i++){if(data[i].result.toLowerCase()==q.toLowerCase()){result=data[i];break;}}}if(typeof fn=="function")fn(result);else $input.trigger("result",result&&[result.data,result.value]);}$.each(trimWords($input.val()),function(i,value){request(value,findValueCallback,findValueCallback);});}).bind("flushCache",function(){cache.flush();}).bind("setOptions",function(){$.extend(options,arguments[1]);if("data"in arguments[1])cache.populate();}).bind("unautocomplete",function(){select.unbind();$input.unbind();$(input.form).unbind(".autocomplete");});function selectCurrent(){var selected=select.selected();if(!selected)return false;var v=selected.result;previousValue=v;if(options.multiple){var words=trimWords($input.val());if(words.length>1){v=words.slice(0,words.length-1).join(options.multipleSeparator)+options.multipleSeparator+v;}v+=options.multipleSeparator;}$input.val(v);hideResultsNow();$input.trigger("result",[selected.data,selected.value]);return true;}function onChange(crap,skipPrevCheck){if(lastKeyPressCode==KEY.DEL){select.hide();return;}var currentValue=$input.val();if(!skipPrevCheck&&currentValue==previousValue)return;previousValue=currentValue;currentValue=lastWord(currentValue);if(currentValue.length>=options.minChars){$input.addClass(options.loadingClass);if(!options.matchCase)currentValue=currentValue.toLowerCase();request(currentValue,receiveData,hideResultsNow);}else{stopLoading();select.hide();}};function trimWords(value){if(!value){return[""];}var words=value.split(options.multipleSeparator);var result=[];$.each(words,function(i,value){if($.trim(value))result[i]=$.trim(value);});return result;}function lastWord(value){if(!options.multiple)return value;var words=trimWords(value);return words[words.length-1];}function autoFill(q,sValue){if(options.autoFill&&(lastWord($input.val()).toLowerCase()==q.toLowerCase())&&lastKeyPressCode!=KEY.BACKSPACE){$input.val($input.val()+sValue.substring(lastWord(previousValue).length));$.Autocompleter.Selection(input,previousValue.length,previousValue.length+sValue.length);}};function hideResults(){clearTimeout(timeout);timeout=setTimeout(hideResultsNow,200);};function hideResultsNow(){var wasVisible=select.visible();select.hide();clearTimeout(timeout);stopLoading();if(options.mustMatch){$input.search(function(result){if(!result){if(options.multiple){var words=trimWords($input.val()).slice(0,-1);$input.val(words.join(options.multipleSeparator)+(words.length?options.multipleSeparator:""));}else
$input.val("");}});}if(wasVisible)$.Autocompleter.Selection(input,input.value.length,input.value.length);};function receiveData(q,data){if(data&&data.length&&hasFocus){stopLoading();select.display(data,q);autoFill(q,data[0].value);select.show();}else{hideResultsNow();}};function request(term,success,failure){if(!options.matchCase)term=term.toLowerCase();var data=cache.load(term);if(data&&data.length){success(term,data);}else if((typeof options.url=="string")&&(options.url.length>0)){var extraParams={timestamp:+new Date()};$.each(options.extraParams,function(key,param){extraParams[key]=typeof param=="function"?param():param;});$.ajax({mode:"abort",port:"autocomplete"+input.name,dataType:options.dataType,url:options.url,data:$.extend({q:lastWord(term),limit:options.max},extraParams),success:function(data){var parsed=options.parse&&options.parse(data)||parse(data);cache.add(term,parsed);success(term,parsed);}});}else{select.emptyList();failure(term);}};function parse(data){var parsed=[];var rows=data.split("\n");for(var i=0;i<rows.length;i++){var row=$.trim(rows[i]);if(row){row=row.split("|");parsed[parsed.length]={data:row,value:row[0],result:options.formatResult&&options.formatResult(row,row[0])||row[0]};}}return parsed;};function stopLoading(){$input.removeClass(options.loadingClass);};};$.Autocompleter.defaults={inputClass:"ac_input",resultsClass:"ac_results",loadingClass:"ac_loading",minChars:1,delay:400,matchCase:false,matchSubset:true,matchContains:false,cacheLength:10,max:100,mustMatch:false,extraParams:{},selectFirst:true,formatItem:function(row){return row[0];},formatMatch:null,autoFill:false,width:0,multiple:false,multipleSeparator:", ",highlight:function(value,term){return value.replace(new RegExp("(?![^&;]+;)(?!<[^<>]*)("+term.replace(/([\^\$\(\)\[\]\{\}\*\.\+\?\|\\])/gi,"\\$1")+")(?![^<>]*>)(?![^&;]+;)","gi"),"<strong>$1</strong>");},scroll:true,scrollHeight:180};$.Autocompleter.Cache=function(options){var data={};var length=0;function matchSubset(s,sub){if(!options.matchCase)s=s.toLowerCase();var i=s.indexOf(sub);if(i==-1)return false;return i==0||options.matchContains;};function add(q,value){if(length>options.cacheLength){flush();}if(!data[q]){length++;}data[q]=value;}function populate(){if(!options.data)return false;var stMatchSets={},nullData=0;if(!options.url)options.cacheLength=1;stMatchSets[""]=[];for(var i=0,ol=options.data.length;i<ol;i++){var rawValue=options.data[i];rawValue=(typeof rawValue=="string")?[rawValue]:rawValue;var value=options.formatMatch(rawValue,i+1,options.data.length);if(value===false)continue;var firstChar=value.charAt(0).toLowerCase();if(!stMatchSets[firstChar])stMatchSets[firstChar]=[];var row={value:value,data:rawValue,result:options.formatResult&&options.formatResult(rawValue)||value};stMatchSets[firstChar].push(row);if(nullData++<options.max){stMatchSets[""].push(row);}};$.each(stMatchSets,function(i,value){options.cacheLength++;add(i,value);});}setTimeout(populate,25);function flush(){data={};length=0;}return{flush:flush,add:add,populate:populate,load:function(q){if(!options.cacheLength||!length)return null;if(!options.url&&options.matchContains){var csub=[];for(var k in data){if(k.length>0){var c=data[k];$.each(c,function(i,x){if(matchSubset(x.value,q)){csub.push(x);}});}}return csub;}else
if(data[q]){return data[q];}else
if(options.matchSubset){for(var i=q.length-1;i>=options.minChars;i--){var c=data[q.substr(0,i)];if(c){var csub=[];$.each(c,function(i,x){if(matchSubset(x.value,q)){csub[csub.length]=x;}});return csub;}}}return null;}};};$.Autocompleter.Select=function(options,input,select,config){var CLASSES={ACTIVE:"ac_over"};var listItems,active=-1,data,term="",needsInit=true,element,list;function init(){if(!needsInit)return;element=$("<div/>").hide().addClass(options.resultsClass).css("position","absolute").appendTo(document.body);list=$("<ul/>").appendTo(element).mouseover(function(event){if(target(event).nodeName&&target(event).nodeName.toUpperCase()=='LI'){active=$("li",list).removeClass(CLASSES.ACTIVE).index(target(event));$(target(event)).addClass(CLASSES.ACTIVE);}}).click(function(event){$(target(event)).addClass(CLASSES.ACTIVE);select();input.focus();return false;}).mousedown(function(){config.mouseDownOnSelect=true;}).mouseup(function(){config.mouseDownOnSelect=false;});if(options.width>0)element.css("width",options.width);needsInit=false;}function target(event){var element=event.target;while(element&&element.tagName!="LI")element=element.parentNode;if(!element)return[];return element;}function moveSelect(step){listItems.slice(active,active+1).removeClass(CLASSES.ACTIVE);movePosition(step);var activeItem=listItems.slice(active,active+1).addClass(CLASSES.ACTIVE);if(options.scroll){var offset=0;listItems.slice(0,active).each(function(){offset+=this.offsetHeight;});if((offset+activeItem[0].offsetHeight-list.scrollTop())>list[0].clientHeight){list.scrollTop(offset+activeItem[0].offsetHeight-list.innerHeight());}else if(offset<list.scrollTop()){list.scrollTop(offset);}}};function movePosition(step){active+=step;if(active<0){active=listItems.size()-1;}else if(active>=listItems.size()){active=0;}}function limitNumberOfItems(available){return options.max&&options.max<available?options.max:available;}function fillList(){list.empty();var max=limitNumberOfItems(data.length);for(var i=0;i<max;i++){if(!data[i])continue;var formatted=options.formatItem(data[i].data,i+1,max,data[i].value,term);if(formatted===false)continue;var li=$("<li/>").html(options.highlight(formatted,term)).addClass(i%2==0?"ac_even":"ac_odd").appendTo(list)[0];$.data(li,"ac_data",data[i]);}listItems=list.find("li");if(options.selectFirst){listItems.slice(0,1).addClass(CLASSES.ACTIVE);active=0;}if($.fn.bgiframe)list.bgiframe();}return{display:function(d,q){init();data=d;term=q;fillList();},next:function(){moveSelect(1);},prev:function(){moveSelect(-1);},pageUp:function(){if(active!=0&&active-8<0){moveSelect(-active);}else{moveSelect(-8);}},pageDown:function(){if(active!=listItems.size()-1&&active+8>listItems.size()){moveSelect(listItems.size()-1-active);}else{moveSelect(8);}},hide:function(){element&&element.hide();listItems&&listItems.removeClass(CLASSES.ACTIVE);active=-1;},visible:function(){return element&&element.is(":visible");},current:function(){return this.visible()&&(listItems.filter("."+CLASSES.ACTIVE)[0]||options.selectFirst&&listItems[0]);},show:function(){var offset=$(input).offset();element.css({width:typeof options.width=="string"||options.width>0?options.width:$(input).width(),top:offset.top+input.offsetHeight,left:offset.left}).show();if(options.scroll){list.scrollTop(0);list.css({maxHeight:options.scrollHeight,overflow:'auto'});if($.browser.msie&&typeof document.body.style.maxHeight==="undefined"){var listHeight=0;listItems.each(function(){listHeight+=this.offsetHeight;});var scrollbarsVisible=listHeight>options.scrollHeight;list.css('height',scrollbarsVisible?options.scrollHeight:listHeight);if(!scrollbarsVisible){listItems.width(list.width()-parseInt(listItems.css("padding-left"))-parseInt(listItems.css("padding-right")));}}}},selected:function(){var selected=listItems&&listItems.filter("."+CLASSES.ACTIVE).removeClass(CLASSES.ACTIVE);return selected&&selected.length&&$.data(selected[0],"ac_data");},emptyList:function(){list&&list.empty();},unbind:function(){element&&element.remove();}};};$.Autocompleter.Selection=function(field,start,end){if(field.createTextRange){var selRange=field.createTextRange();selRange.collapse(true);selRange.moveStart("character",start);selRange.moveEnd("character",end);selRange.select();}else if(field.setSelectionRange){field.setSelectionRange(start,end);}else{if(field.selectionStart){field.selectionStart=start;field.selectionEnd=end;}}field.focus();};})(jQuery);

/*********** jquery.utils.js *************/
/*
  jQuery utils - 0.8.0  [modified by Thomas to remove the broken body.youTubeLinksToEmbed()]
  
  http://code.google.com/p/jquery-utils/

  (c) Maxime Haineault <haineault@gmail.com> 
  http://haineault.com

  MIT License (http://www.opensource.org/licenses/mit-license.php

*/

(function($){
     $.extend($.expr[':'], {
        // case insensitive version of :contains
        icontains: function(a,i,m){return (a.textContent||a.innerText||jQuery(a).text()||"").toLowerCase().indexOf(m[3].toLowerCase())>=0;}
    });

    $.iterators = {
        getText:  function() { return $(this).text(); },
        parseInt: function(v){ return parseInt(v, 10); }
    };

	$.extend({ 

        // Taken from ui.core.js. 
        // Why are you keeping this gem for yourself guys ? :|
        keyCode: {
            BACKSPACE: 8, CAPS_LOCK: 20, COMMA: 188, CONTROL: 17, DELETE: 46, DOWN: 40,
            END: 35, ENTER: 13, ESCAPE: 27, HOME: 36, INSERT:  45, LEFT: 37,
            NUMPAD_ADD: 107, NUMPAD_DECIMAL: 110, NUMPAD_DIVIDE: 111, NUMPAD_ENTER: 108, 
            NUMPAD_MULTIPLY: 106, NUMPAD_SUBTRACT: 109, PAGE_DOWN: 34, PAGE_UP: 33, 
            PERIOD: 190, RIGHT: 39, SHIFT: 16, SPACE: 32, TAB: 9, UP: 38
        },
        
        keyIs: function(k, e) {
            return parseInt($.keyCode[k.toUpperCase()], 10) == parseInt((typeof(e) == 'number' )? e: e.keyCode, 10);
        },

        // Redirect to a specified url
        redirect: function(url) {
            window.location.href = url;
            return url;
        },

        // Stop event shorthand
        stop: function(e, preventDefault, stopPropagation) {
            if (preventDefault)  { e.preventDefault(); }
            if (stopPropagation) { e.stopPropagation(); }
            return preventDefault && false || true;
        },

        // Returns the basename of a path
        basename: function(path) {
            var t = path.split('/');
            return t[t.length] === '' && s || t.slice(0, t.length).join('/');
        },

        // Returns the filename of a path
        filename: function(path) {
            return path.split('/').pop();
        }, 

        // Returns a formated file size
        filesizeformat: function(bytes, suffixes){
            var b = parseInt(bytes, 10);
            var s = suffixes || ['byte', 'bytes', 'KB', 'MB', 'GB'];
            if (isNaN(b) || b === 0) { return '0 ' + s[0]; }
            if (b == 1)              { return '1 ' + s[0]; }
            if (b < 1024)            { return  b.toFixed(2) + ' ' + s[1]; }
            if (b < 1048576)         { return (b / 1024).toFixed(2) + ' ' + s[2]; }
            if (b < 1073741824)      { return (b / 1048576).toFixed(2) + ' '+ s[3]; }
            else                     { return (b / 1073741824).toFixed(2) + ' '+ s[4]; }
        },

        fileExtension: function(s) {
            var tokens = s.split('.');
            return tokens[tokens.length-1] || false;
        },
        
        // Returns true if an object is a String
        isString: function(o) {
            return typeof(o) == 'string' && true || false;
        },
        
        // Returns true if an object is a RegExp
		isRegExp: function(o) {
			return o && o.constructor.toString().indexOf('RegExp()') != -1 || false;
		},
        
        // Returns true if an object is an array
        // Mark Miller - http://blog.360.yahoo.com/blog-TBPekxc1dLNy5DOloPfzVvFIVOWMB0li?p=916
		isArray: function(o) {
            if (!o) { return false; }
            return Object.prototype.toString.apply(o.constructor.prototype) === '[object Array]';
		},

        isObject: function(o) {
            return (typeof(o) == 'object');
        },
        
        // Convert input to currency (two decimal fixed number)
		toCurrency: function(i) {
			i = parseFloat(i, 10).toFixed(2);
			return (i=='NaN') ? '0.00' : i;
		},

        /*-------------------------------------------------------------------- 
         * javascript method: "pxToEm"
         * by:
           Scott Jehl (scott@filamentgroup.com) 
           Maggie Wachs (maggie@filamentgroup.com)
           http://www.filamentgroup.com
         *
         * Copyright (c) 2008 Filament Group
         * Dual licensed under the MIT (filamentgroup.com/examples/mit-license.txt) and GPL (filamentgroup.com/examples/gpl-license.txt) licenses.
         *
         * Description: pxToEm converts a pixel value to ems depending on inherited font size.  
         * Article: http://www.filamentgroup.com/lab/retaining_scalable_interfaces_with_pixel_to_em_conversion/
         * Demo: http://www.filamentgroup.com/examples/pxToEm/	 	
         *							
         * Options:  	 								
                scope: string or jQuery selector for font-size scoping
                reverse: Boolean, true reverses the conversion to em-px
         * Dependencies: jQuery library						  
         * Usage Example: myPixelValue.pxToEm(); or myPixelValue.pxToEm({'scope':'#navigation', reverse: true});
         *
         * Version: 2.1, 18.12.2008
         * Changelog:
         *		08.02.2007 initial Version 1.0
         *		08.01.2008 - fixed font-size calculation for IE
         *		18.12.2008 - removed native object prototyping to stay in jQuery's spirit, jsLinted (Maxime Haineault <haineault@gmail.com>)
        --------------------------------------------------------------------*/

        pxToEm: function(i, settings){
            //set defaults
            settings = jQuery.extend({
                scope: 'body',
                reverse: false
            }, settings);
            
            var pxVal = (i === '') ? 0 : parseFloat(i);
            var scopeVal;
            var getWindowWidth = function(){
                var de = document.documentElement;
                return self.innerWidth || (de && de.clientWidth) || document.body.clientWidth;
            };	
            
            /* When a percentage-based font-size is set on the body, IE returns that percent of the window width as the font-size. 
                For example, if the body font-size is 62.5% and the window width is 1000px, IE will return 625px as the font-size. 	
                When this happens, we calculate the correct body font-size (%) and multiply it by 16 (the standard browser font size) 
                to get an accurate em value. */
                        
            if (settings.scope == 'body' && $.browser.msie && (parseFloat($('body').css('font-size')) / getWindowWidth()).toFixed(1) > 0.0) {
                var calcFontSize = function(){		
                    return (parseFloat($('body').css('font-size'))/getWindowWidth()).toFixed(3) * 16;
                };
                scopeVal = calcFontSize();
            }
            else { scopeVal = parseFloat(jQuery(settings.scope).css("font-size")); }
                    
            var result = (settings.reverse === true) ? (pxVal * scopeVal).toFixed(2) + 'px' : (pxVal / scopeVal).toFixed(2) + 'em';
            return result;
        }
	});

	$.extend($.fn, { 
        // Select a text range in a textarea
        selectRange: function(start, end){
            // use only the first one since only one input can be focused
            if ($(this).get(0).createTextRange) {
                var range = $(this).get(0).createTextRange();
                range.collapse(true);
                range.moveEnd('character',   end);
                range.moveStart('character', start);
                range.select();
            }
            else if ($(this).get(0).setSelectionRange) {
                $(this).bind('focus', function(e){
                    e.preventDefault();
                }).get(0).setSelectionRange(start, end);
            }
            return $(this);
        },

        /*-------------------------------------------------------------------- 
         * JQuery Plugin: "EqualHeights"
         * by:	Scott Jehl, Todd Parker, Maggie Costello Wachs (http://www.filamentgroup.com)
         *
         * Copyright (c) 2008 Filament Group
         * Licensed under GPL (http://www.opensource.org/licenses/gpl-license.php)
         *
         * Description: Compares the heights or widths of the top-level children of a provided element 
                and sets their min-height to the tallest height (or width to widest width). Sets in em units 
                by default if pxToEm() method is available.
         * Dependencies: jQuery library, pxToEm method	(article: 
                http://www.filamentgroup.com/lab/retaining_scalable_interfaces_with_pixel_to_em_conversion/)							  
         * Usage Example: $(element).equalHeights();
                Optional: to set min-height in px, pass a true argument: $(element).equalHeights(true);
         * Version: 2.1, 18.12.2008
         *
         * Note: Changed pxToEm call to call $.pxToEm instead, jsLinted (Maxime Haineault <haineault@gmail.com>)
        --------------------------------------------------------------------*/

        equalHeights: function(px){
            $(this).each(function(){
                var currentTallest = 0;
                $(this).children().each(function(i){
                    if ($(this).height() > currentTallest) { currentTallest = $(this).height(); }
                });
                if (!px || !$.pxToEm) { currentTallest = $.pxToEm(currentTallest); } //use ems unless px is specified
                // for ie6, set height since min-height isn't supported
                if ($.browser.msie && $.browser.version == 6.0) { $(this).children().css({'height': currentTallest}); }
                $(this).children().css({'min-height': currentTallest}); 
            });
            return this;
        },

        // Copyright (c) 2009 James Padolsey
        // http://james.padolsey.com/javascript/jquery-delay-plugin/
        delay: function(time, callback){
            jQuery.fx.step.delay = function(){};
            return this.animate({delay:1}, time, callback);
        }        
	});
})(jQuery);
/*
  jQuery strings - 0.2
  http://code.google.com/p/jquery-utils/
  
  (c) Maxime Haineault <haineault@gmail.com>
  http://haineault.com   

  MIT License (http://www.opensource.org/licenses/mit-license.php)

  Implementation of Python3K advanced string formatting
  http://www.python.org/dev/peps/pep-3101/

  Documentation: http://code.google.com/p/jquery-utils/wiki/StringFormat
  
*/
(function($){
    var strings = {
        strConversion: {
            // tries to translate any objects type into string gracefully
            __repr: function(i){
                switch(this.__getType(i)) {
                    case 'array':case 'date':case 'number':
                        return i.toString();
                    case 'object': 
                        var o = [];
                        for (x=0; x<i.length; i++) { o.push(i+': '+ this.__repr(i[x])); }
                        return o.join(', ');
                    case 'string': 
                        return i;
                    default: 
                        return i;
                }
            },
            // like typeof but less vague
            __getType: function(i) {
                if (!i || !i.constructor) { return typeof(i); }
                var match = i.constructor.toString().match(/Array|Number|String|Object|Date/);
                return match && match[0].toLowerCase() || typeof(i);
            },
            //+ Jonas Raoni Soares Silva
            //@ http://jsfromhell.com/string/pad [v1.0]
            __pad: function(str, l, s, t){
                var p = s || ' ';
                var o = str;
                if (l - str.length > 0) {
                    o = new Array(Math.ceil(l / p.length)).join(p).substr(0, t = !t ? l : t == 1 ? 0 : Math.ceil(l / 2)) + str + p.substr(0, l - t);
                }
                return o;
            },
            __getInput: function(arg, args) {
                 var key = arg.getKey();
                switch(this.__getType(args)){
                    case 'object': // Thanks to Jonathan Works for the patch
                        var keys = key.split('.');
                        var obj = args;
                        for(var subkey = 0; subkey < keys.length; subkey++){
                            obj = obj[keys[subkey]];
                        }
                        if (typeof(obj) != 'undefined') {
                            if (strings.strConversion.__getType(obj) == 'array') {
                                return arg.getFormat().match(/\.\*/) && obj[1] || obj;
                            }
                            return obj;
                        }
                        else {
                            // TODO: try by numerical index                    
                        }
                    break;
                    case 'array': 
                        key = parseInt(key, 10);
                        if (arg.getFormat().match(/\.\*/) && typeof args[key+1] != 'undefined') { return args[key+1]; }
                        else if (typeof args[key] != 'undefined') { return args[key]; }
                        else { return key; }
                    break;
                }
                return '{'+key+'}';
            },
            __formatToken: function(token, args) {
                var arg   = new Argument(token, args);
                return strings.strConversion[arg.getFormat().slice(-1)](this.__getInput(arg, args), arg);
            },

            // Signed integer decimal.
            d: function(input, arg){
                var o = parseInt(input, 10); // enforce base 10
                var p = arg.getPaddingLength();
                if (p) { return this.__pad(o.toString(), p, arg.getPaddingString(), 0); }
                else   { return o; }
            },
            // Signed integer decimal.
            i: function(input, args){ 
                return this.d(input, args);
            },
            // Unsigned octal
            o: function(input, arg){ 
                var o = input.toString(8);
                if (arg.isAlternate()) { o = this.__pad(o, o.length+1, '0', 0); }
                return this.__pad(o, arg.getPaddingLength(), arg.getPaddingString(), 0);
            },
            // Unsigned decimal
            u: function(input, args) {
                return Math.abs(this.d(input, args));
            },
            // Unsigned hexadecimal (lowercase)
            x: function(input, arg){
                var o = parseInt(input, 10).toString(16);
                o = this.__pad(o, arg.getPaddingLength(), arg.getPaddingString(),0);
                return arg.isAlternate() ? '0x'+o : o;
            },
            // Unsigned hexadecimal (uppercase)
            X: function(input, arg){
                return this.x(input, arg).toUpperCase();
            },
            // Floating point exponential format (lowercase)
            e: function(input, arg){
                return parseFloat(input, 10).toExponential(arg.getPrecision());
            },
            // Floating point exponential format (uppercase)
            E: function(input, arg){
                return this.e(input, arg).toUpperCase();
            },
            // Floating point decimal format
            f: function(input, arg){
                return this.__pad(parseFloat(input, 10).toFixed(arg.getPrecision()), arg.getPaddingLength(), arg.getPaddingString(),0);
            },
            // Floating point decimal format (alias)
            F: function(input, args){
                return this.f(input, args);
            },
            // Floating point format. Uses exponential format if exponent is greater than -4 or less than precision, decimal format otherwise
            g: function(input, arg){
                var o = parseFloat(input, 10);
                return (o.toString().length > 6) ? Math.round(o.toExponential(arg.getPrecision())): o;
            },
            // Floating point format. Uses exponential format if exponent is greater than -4 or less than precision, decimal format otherwise
            G: function(input, args){
                return this.g(input, args);
            },
            // Single character (accepts integer or single character string). 	
            c: function(input, args) {
                var match = input.match(/\w|\d/);
                return match && match[0] || '';
            },
            // String (converts any JavaScript object to anotated format)
            r: function(input, args) {
                return this.__repr(input);
            },
            // String (converts any JavaScript object using object.toString())
            s: function(input, args) {
                return input.toString && input.toString() || ''+input;
            }
        },

        format: function(str, args) {
            var end    = 0;
            var start  = 0;
            var match  = false;
            var buffer = [];
            var token  = '';
            var tmp    = (str||'').split('');
            for(start=0; start < tmp.length; start++) {
                if (tmp[start] == '{' && tmp[start+1] !='{') {
                    end   = str.indexOf('}', start);
                    token = tmp.slice(start+1, end).join('');
                    buffer.push(strings.strConversion.__formatToken(token, (typeof arguments[1] != 'object')? arguments2Array(arguments, 2): args || []));
                }
                else if (start > end || buffer.length < 1) { buffer.push(tmp[start]); }
            }
            return (buffer.length > 1)? buffer.join(''): buffer[0];
        },

        calc: function(str, args) {
            return eval(format(str, args));
        },

        repeat: function(s, n) { 
            return new Array(n+1).join(s); 
        },

        UTF8encode: function(s) { 
            return unescape(encodeURIComponent(s)); 
        },

        UTF8decode: function(s) { 
            return decodeURIComponent(escape(s)); 
        },

        tpl: function() {
            var out = '', render = true;
            // Set
            // $.tpl('ui.test', ['<span>', helloWorld ,'</span>']);
            if (arguments.length == 2 && $.isArray(arguments[1])) {
                this[arguments[0]] = arguments[1].join('');
                return jQuery;
            }
            // $.tpl('ui.test', '<span>hello world</span>');
            if (arguments.length == 2 && $.isString(arguments[1])) {
                this[arguments[0]] = arguments[1];
                return jQuery;
            }
            // Call
            // $.tpl('ui.test');
            if (arguments.length == 1) {
                return $(this[arguments[0]]);
            }
            // $.tpl('ui.test', false);
            if (arguments.length == 2 && arguments[1] == false) {
                return this[arguments[0]];
            }
            // $.tpl('ui.test', {value:blah});
            if (arguments.length == 2 && $.isObject(arguments[1])) {
                return $($.format(this[arguments[0]], arguments[1]));
            }
            // $.tpl('ui.test', {value:blah}, false);
            if (arguments.length == 3 && $.isObject(arguments[1])) {
                return (arguments[2] == true) 
                    ? $.format(this[arguments[0]], arguments[1])
                    : $($.format(this[arguments[0]], arguments[1]));
            }
        }
};

    var Argument = function(arg, args) {
        this.__arg  = arg;
        this.__args = args;
        this.__max_precision = parseFloat('1.'+ (new Array(32)).join('1'), 10).toString().length-3;
        this.__def_precision = 6;
        this.getString = function(){
            return this.__arg;
        };
        this.getKey = function(){
            return this.__arg.split(':')[0];
        };
        this.getFormat = function(){
            var match = this.getString().split(':');
            return (match && match[1])? match[1]: 's';
        };
        this.getPrecision = function(){
            var match = this.getFormat().match(/\.(\d+|\*)/g);
            if (!match) { return this.__def_precision; }
            else {
                match = match[0].slice(1);
                if (match != '*') { return parseInt(match, 10); }
                else if(strings.strConversion.__getType(this.__args) == 'array') {
                    return this.__args[1] && this.__args[0] || this.__def_precision;
                }
                else if(strings.strConversion.__getType(this.__args) == 'object') {
                    return this.__args[this.getKey()] && this.__args[this.getKey()][0] || this.__def_precision;
                }
                else { return this.__def_precision; }
            }
        };
        this.getPaddingLength = function(){
            var match = false;
            if (this.isAlternate()) {
                match = this.getString().match(/0?#0?(\d+)/);
                if (match && match[1]) { return parseInt(match[1], 10); }
            }
            match = this.getString().match(/(0|\.)(\d+|\*)/g);
            return match && parseInt(match[0].slice(1), 10) || 0;
        };
        this.getPaddingString = function(){
            var o = '';
            if (this.isAlternate()) { o = ' '; }
            // 0 take precedence on alternate format
            if (this.getFormat().match(/#0|0#|^0|\.\d+/)) { o = '0'; }
            return o;
        };
        this.getFlags = function(){
            var match = this.getString().matc(/^(0|\#|\-|\+|\s)+/);
            return match && match[0].split('') || [];
        };
        this.isAlternate = function() {
            return !!this.getFormat().match(/^0?#/);
        };
    };

    var arguments2Array = function(args, shift) {
        var o = [];
        for (l=args.length, x=(shift || 0)-1; x<l;x++) { o.push(args[x]); }
        return o;
    };

    $.extend(strings);
})(jQuery);
/*
  jQuery anchor handler - 0.5
  http://code.google.com/p/jquery-utils/

  (c) Maxime Haineault <haineault@gmail.com>
  http://haineault.com   

  MIT License (http://www.opensource.org/licenses/mit-license.php)

*/

(function($){
    var hash = window.location.hash;
    var handlers  = [];
    var opt = {};

	$.extend({
		anchorHandler: {
            apply: function() {
                $.map(handlers, function(handler){
                    var match = hash.match(handler.r) && hash.match(handler.r)[0] || false;
                    if (match)  { handler.cb.apply($('a[href*='+match+']').get(0), [handler.r, hash || '']); }
                });
                return $.anchorHandler;
            },
			add: function(regexp, callback, options) {
                var opt  = $.extend({handleClick: true, preserveHash: true}, options);
                if (opt.handleClick) { 
                    $('a[href*=#]').each(function(i, a){
                        if (a.href.match(regexp)) {
                            $(a).bind('click.anchorHandler', function(){
                                if (opt.preserveHash) { window.location.hash = a.hash; }
                                return callback.apply(this, [regexp, a.href]);
                                });
                        }
                    }); 
                }
				handlers.push({r: regexp, cb: callback});
                $($.anchorHandler.apply);
				return $.anchorHandler;
			}
		}
	});
})(jQuery);
/*
  jQuery array utils - 0.1
  http://code.google.com/p/jquery-utils/

  (c) Maxime Haineault <haineault@gmail.com> 
  http://haineault.com

  MIT License (http://www.opensource.org/licenses/mit-license.php

*/

(function($){
    
    var dummy      = function(i) { return i; };
    var truthiness = function(i) { return !!i; };

    $.extend({

        all: function(object, iterator){
            var output   = true;
            var iterator = iterator || truthiness;
            $.each(object, function(idx, i){
                if (!iterator(i)) { output = false; }
            });
            return output;
        },

        any: function(object, iterator){
            var output   = false;
            var iterator = iterator || truthiness;
            $.each(object, function(idx, i){
                return iterator(i) && !(output = true) || true;
            });
            return output;
        },

        // equivalent of array.find
        detect: function(object, iterator){
            var output   = false;
            var iterator = iterator || truthiness;
            $.each(object, function(idx, i){
                //return iterator(i) && !(output = i) || true;
                if (iterator(i)) { 
                    output = i; 
                    return false;
                }
            });      
            return output;
        },

        eachSlice: function(object, size, iterator){
            var index = - size, slices = [];
            while ((index += size) < object.length){ 
                slices.push($.map(object.slice(index, index + size), iterator || dummy)); 
            } 
            return slices;
        },

        inject: function(object, acc, iterator){
            $.each(object, function (idx, val) {
                acc = iterator(acc, val, idx);
            }); 
            return acc;
        },

        invoke: function(object, method, args){
            $.each(object, function(){
                if ($.isFunction(method)){
                    method.apply(object, args);
                }
                else if ($.isFunction(window[method])){
                    window[method].apply(object, args);
                }
            });
            return object;
        },

        max: function(object, iterator) {
            var output = false; 
            $.each(object, function (idx, val) {
                var rs = (iterator || dummy)(val, idx);
                if (!output || rs > output) { output = rs; }
            }); 
            return output;
        },

        min: function(object, iterator) {
            var output = false; 
            $.each(object, function (idx, val) {
                var rs = (iterator || dummy)(val, idx);
                if (!output || rs < output) { output = rs; }
            }); 
            return output;
        },

        partition: function(object, iterator) {
            var trues = [], falses = []; 
            $.each(object, function (idx, val) {
                ((iterator || truthiness)(val, idx) ? trues : falses).push(val);
            }); 
            return [trues, falses];
        },
        
        pluck: function(object, property, iterator) {
            var output = [];
            var iterator = iterator || dummy;
            $.each(object, function(){
                // "||this" is required to make IE behave like FF on simple arrays .. 
                output.push(iterator(this[property]||this));
            });
            return output;
        },
/*
        reject: function(object, iterator){
            return $.select(object, (iterator || function(i){ return !i; }));
        },

        // findAll equivalent
        select: function(object, iterator){
            var output   = [];
            var iterator = iterator || truthiness;
            $.each(object, function(idx, i){
                if (iterator(i)) { 
                    output.push(i); 
                }
            });
            return output;
        },
*/

        sum: function(object, iterator){
            var iterator = iterator || function(i) { return parseInt(i, 10) };
            var t = 0;
            $.each(object, function(){
                var v = iterator(this);
                if (!isNaN(v)) { t = t + v; }
            });
            return t;
        },

        zip: function(object, object2, iterator) {
            var output = [];
            var iterator = iterator || dummy;
            $.each(object, function(idx, i){
                if (object2[idx]) { output.push([i, object2[idx]]); }
            });
            return output;
        },

        // Randomize an array object with the Fisher-Yates algorythm
        // Author: Ashley Pond V. (http://sedition.com/perl/javascript-fy.html)
        randomize: function(object) {  
            var i = object.length;
            if (i == 0) return false;
            while (--i) {
               var j = Math.floor( Math.random() * ( i + 1 ) );
               var tempi = object[i];
               var tempj = object[j];
               object[i] = tempj;
               object[j] = tempi;
             }
            return object;
        },

        // Returns a range object
        // Author: Matthias Miller
        // Site:   http://blog.outofhanwell.com/2006/03/29/javascript-range-function/
        range:  function() {
            if (!arguments.length) { return []; }
            var min, max, step;
            if (arguments.length == 1) {
                min  = 0;
                max  = arguments[0]-1;
                step = 1;
            }
            else {
                // default step to 1 if it's zero or undefined
                min  = arguments[0];
                max  = arguments[1]-1;
                step = arguments[2] || 1;
            }
            // convert negative steps to positive and reverse min/max
            if (step < 0 && min >= max) {
                step *= -1;
                var tmp = min;
                min = max;
                max = tmp;
                min += ((max-min) % step);
            }
            var a = [];
            for (var i = min; i <= max; i += step) { a.push(i); }
            return a;
        }
    });

    $.extend($.fn, {
        all:       function(iterator) { return $.all(this, iterator); },
        any:       function(iterator) { return $.any(this, iterator); },
        pluck:     function(property, iterator) { return $.pluck(this, property, iterator); },
        detect:    function(iterator) { return $($.detect(this, iterator)); },
        eachSlice: function(size, iterator) { return $.eachSlice(this, size, iterator); },
        //select:    function(iterator) { return $.findAll(this, iterator); },
        sum: function(iterator) {
            var iterator = iterator || function(i) {
                return parseFloat($(i).val() || $(i).text(), 10);
            };
            return $.sum(this, iterator);
        }
    });
})(jQuery);
/**
 * Cookie plugin
 *
 * Copyright (c) 2006 Klaus Hartl (stilbuero.de)
 * Dual licensed under the MIT and GPL licenses:
 * http://www.opensource.org/licenses/mit-license.php
 * http://www.gnu.org/licenses/gpl.html
 *
 */

/**
 * Create a cookie with the given name and value and other optional parameters.
 *
 * @example $.cookie('the_cookie', 'the_value');
 * @desc Set the value of a cookie.
 * @example $.cookie('the_cookie', 'the_value', { expires: 7, path: '/', domain: 'jquery.com', secure: true });
 * @desc Create a cookie with all available options.
 * @example $.cookie('the_cookie', 'the_value');
 * @desc Create a session cookie.
 * @example $.cookie('the_cookie', null);
 * @desc Delete a cookie by passing null as value. Keep in mind that you have to use the same path and domain
 *       used when the cookie was set.
 *
 * @param String name The name of the cookie.
 * @param String value The value of the cookie.
 * @param Object options An object literal containing key/value pairs to provide optional cookie attributes.
 * @option Number|Date expires Either an integer specifying the expiration date from now on in days or a Date object.
 *                             If a negative value is specified (e.g. a date in the past), the cookie will be deleted.
 *                             If set to null or omitted, the cookie will be a session cookie and will not be retained
 *                             when the the browser exits.
 * @option String path The value of the path atribute of the cookie (default: path of page that created the cookie).
 * @option String domain The value of the domain attribute of the cookie (default: domain of page that created the cookie).
 * @option Boolean secure If true, the secure attribute of the cookie will be set and the cookie transmission will
 *                        require a secure protocol (like HTTPS).
 * @type undefined
 *
 * @name $.cookie
 * @cat Plugins/Cookie
 * @author Klaus Hartl/klaus.hartl@stilbuero.de
 */

/**
 * Get the value of a cookie with the given name.
 *
 * @example $.cookie('the_cookie');
 * @desc Get the value of a cookie.
 *
 * @param String name The name of the cookie.
 * @return The value of the cookie.
 * @type String
 *
 * @name $.cookie
 * @cat Plugins/Cookie
 * @author Klaus Hartl/klaus.hartl@stilbuero.de
 */
jQuery.cookie = function(name, value, options) {
    if (typeof value != 'undefined') { // name and value given, set cookie
        options = options || {};
        if (value === null) {
            value = '';
            options.expires = -1;
        }
        var expires = '';
        if (options.expires && (typeof options.expires == 'number' || options.expires.toUTCString)) {
            var date;
            if (typeof options.expires == 'number') {
                date = new Date();
                date.setTime(date.getTime() + (options.expires * 24 * 60 * 60 * 1000));
            } else {
                date = options.expires;
            }
            expires = '; expires=' + date.toUTCString(); // use expires attribute, max-age is not supported by IE
        }
        // CAUTION: Needed to parenthesize options.path and options.domain
        // in the following expressions, otherwise they evaluate to undefined
        // in the packed version for some reason...
        var path = options.path ? '; path=' + (options.path) : '';
        var domain = options.domain ? '; domain=' + (options.domain) : '';
        var secure = options.secure ? '; secure' : '';
        document.cookie = [name, '=', encodeURIComponent(value), expires, path, domain, secure].join('');
    } else { // only name given, get cookie
        var cookieValue = null;
        if (document.cookie && document.cookie != '') {
            var cookies = document.cookie.split(';');
            for (var i = 0; i < cookies.length; i++) {
                var cookie = jQuery.trim(cookies[i]);
                // Does this cookie string begin with the name we want?
                if (cookie.substring(0, name.length + 1) == (name + '=')) {
                    cookieValue = decodeURIComponent(cookie.substring(name.length + 1));
                    break;
                }
            }
        }
        return cookieValue;
    }
};
/*
  jQuery countdown - 0.2
  http://code.google.com/p/jquery-utils/

  (c) Maxime Haineault <haineault@gmail.com>
  http://haineault.com   

  MIT License (http://www.opensource.org/licenses/mit-license.php)
  
*/

(function($) {
    function countdown(el, options) {
        var calc = function (target, current) {
            /* Return true if the target date has arrived,
             * an object of the time left otherwise.
             */
            var current = current || new Date();
            if (current >= target) { return true; }

            var o = {};
            var remain = Math.floor((target.getTime() - current.getTime()) / 1000);

            o.days = Math.floor(remain / 86400);
            remain %= 86400;
            o.hours = Math.floor(remain / 3600);
            remain %= 3600;
            o.minutes = Math.floor(remain / 60);
            remain %= 60;
            o.seconds = remain;
            o.years = Math.floor(o.days / 365);
            o.months = Math.floor(o.days / 30);
            o.weeks = Math.floor(o.days / 7);

            return o;
        };

        var getWeek = function(date) { 
            var onejan = new Date(date.getFullYear(),0,1);
            return Math.ceil((((date - onejan) / 86400000) + onejan.getDay())/7);
        };

        var options = $.extend({
            date: new Date(),
            modifiers: [],
            interval: 1000,
            msgFormat: '%d [day|days] %hh %mm %ss',
            msgNow: 'Now !'
        }, options);

        var tokens = {
            y: new RegExp ('\\%y(.+?)\\[(\\w+)\\|(\\w+)\\]', 'g'), // years 
            M: new RegExp ('\\%M(.+?)\\[(\\w+)\\|(\\w+)\\]', 'g'), // months 
            w: new RegExp ('\\%w(.+?)\\[(\\w+)\\|(\\w+)\\]', 'g'), // weeks
            d: new RegExp ('\\%d(.+?)\\[(\\w+)\\|(\\w+)\\]', 'g'), // days
            h: new RegExp ('\\%h(.+?)\\[(\\w+)\\|(\\w+)\\]', 'g'), // hours
            m: new RegExp ('\\%m(.+?)\\[(\\w+)\\|(\\w+)\\]', 'g'), // minutes
            s: new RegExp ('\\%s(.+?)\\[(\\w+)\\|(\\w+)\\]', 'g')  // seconds
        };

        var formatToken = function(str, token, val) {
            return (!tokens[token])? '': str.match(/\[|\]/g) 
                    && (str.replace(tokens[token], val+'$1'+ ((parseInt(val, 10)<2)?'$2':'$3')) || '')
                    || str.replace('%'+token, val);
        };

        var format = function(str, obj) {
            var o = str;
            o = formatToken(o, 'y', obj.years);
            o = formatToken(o, 'M', obj.months);
            o = formatToken(o, 'w', obj.weeks);
            o = formatToken(o, 'd', obj.days);
            o = formatToken(o, 'h', obj.hours);
            o = formatToken(o, 'm', obj.minutes);
            o = formatToken(o, 's', obj.seconds);
            return o;
        };

        var update = function() {
            var date_obj = calc(cd.date);
            if (date_obj === true) {
                cd.stop(); clearInterval(cd.id);
                $(cd.el).html(options.msgNow);
                return true;
            }
            else {
                $(cd.el).text(format(options.msgFormat, date_obj));
            }
        };

        var apply_modifiers = function (modifiers, date) {
            if (modifiers.length === 0) {
                return date;
            }

            var modifier_re = /^([+-]\d+)([yMdhms])$/;
            var conversions = {
                s: 1000,
                m: 60 * 1000,
                h: 60 * 60 * 1000,
                d: 24 * 60 * 60 * 1000,
                M: 30 * 24 * 60 * 60 * 1000,
                y: 365 * 24 * 60 * 60 * 1000
            };

            var displacement = 0;
            for (var i = 0, n = modifiers.length; i < n; ++i) {
                var match = modifiers[i].match(modifier_re);
                if (match !== null) {
                    displacement += parseInt(match[1], 10) * conversions[match[2]];
                }
            }
            return new Date(date.getTime() + displacement);
        };

        var cd = {
            id    : setInterval(update, options.interval),
            el    : el,
            start : function(){ return new countdown($(this.el), options); },
            stop  : function(){ return clearInterval(this.id); },
            date  : apply_modifiers(options.modifiers, options.date)
        };
        $(el).data('countdown', cd);
        update();
        return $(el).data('countdown');
    }
    $.fn.countdown = function(args) { if(this.get(0)) return new countdown(this.get(0), args); };
})(jQuery);
/*
 * jQuery Cycle Plugin for light-weight slideshows
 * Examples and documentation at: http://malsup.com/jquery/cycle/
 * Copyright (c) 2007-2008 M. Alsup
 * Version: 2.24 (07/30/2008)
 * Dual licensed under the MIT and GPL licenses:
 * http://www.opensource.org/licenses/mit-license.php
 * http://www.gnu.org/licenses/gpl.html
 * Requires: jQuery v1.2.3 or later
 *
 * Based on the work of:
 *  1) Matt Oakes (http://portfolio.gizone.co.uk/applications/slideshow/)
 *  2) Torsten Baldes (http://medienfreunde.com/lab/innerfade/)
 *  3) Benjamin Sterling (http://www.benjaminsterling.com/experiments/jqShuffle/)
 */
;(function($) {

var ver = '2.24';
var ie6 = $.browser.msie && /MSIE 6.0/.test(navigator.userAgent);

function log() {
    if (window.console && window.console.log)
        window.console.log('[cycle] ' + Array.prototype.join.call(arguments,''));
};

$.fn.cycle = function(options) {
    return this.each(function() {
        if (options === undefined || options === null)
            options = {};
        if (options.constructor == String) {
            switch(options) {
            case 'stop':
                if (this.cycleTimeout) clearTimeout(this.cycleTimeout);
                this.cycleTimeout = 0;
                $(this).data('cycle.opts', '');
                return;
            case 'pause':
                this.cyclePause = 1;
                return;
            case 'resume':
                this.cyclePause = 0;
                return;
            default:
                options = { fx: options };
            };
        }
        else if (options.constructor == Number) {
            // go to the requested slide slide
            var num = options;
            options = $(this).data('cycle.opts');
            if (!options) {
                log('options not found, can not advance slide');
                return;
            }
            if (num < 0 || num >= options.elements.length) {
                log('invalid slide index: ' + num);
                return;
            }
            options.nextSlide = num;
            if (this.cycleTimeout) {
                clearTimeout(this.cycleTimeout);
                this.cycleTimeout = 0;
            }            
            go(options.elements, options, 1, 1);
            return;
        }

        // stop existing slideshow for this container (if there is one)
        if (this.cycleTimeout) clearTimeout(this.cycleTimeout);
        this.cycleTimeout = 0;
        this.cyclePause = 0;
        
        var $cont = $(this);
        var $slides = options.slideExpr ? $(options.slideExpr, this) : $cont.children();
        var els = $slides.get();
        if (els.length < 2) {
            log('terminating; too few slides: ' + els.length);
            return; // don't bother
        }

        // support metadata plugin (v1.0 and v2.0)
        var opts = $.extend({}, $.fn.cycle.defaults, options || {}, $.metadata ? $cont.metadata() : $.meta ? $cont.data() : {});
        if (opts.autostop) 
            opts.countdown = opts.autostopCount || els.length;

        $cont.data('cycle.opts', opts);
        opts.container = this;

        opts.elements = els;
        opts.before = opts.before ? [opts.before] : [];
        opts.after = opts.after ? [opts.after] : [];
        opts.after.unshift(function(){ opts.busy=0; });
        if (opts.continuous)
            opts.after.push(function() { go(els,opts,0,!opts.rev); });
            
        // clearType corrections
        if (ie6 && opts.cleartype && !opts.cleartypeNoBg)
            clearTypeFix($slides);

        // allow shorthand overrides of width, height and timeout
        var cls = this.className;
        opts.width = parseInt((cls.match(/w:(\d+)/)||[])[1]) || opts.width;
        opts.height = parseInt((cls.match(/h:(\d+)/)||[])[1]) || opts.height;
        opts.timeout = parseInt((cls.match(/t:(\d+)/)||[])[1]) || opts.timeout;

        if ($cont.css('position') == 'static') 
            $cont.css('position', 'relative');
        if (opts.width) 
            $cont.width(opts.width);
        if (opts.height && opts.height != 'auto') 
            $cont.height(opts.height);

        if (opts.random) {
            opts.randomMap = [];
            for (var i = 0; i < els.length; i++) 
                opts.randomMap.push(i);
            opts.randomMap.sort(function(a,b) {return Math.random() - 0.5;});
            opts.randomIndex = 0;
            opts.startingSlide = opts.randomMap[0];
        }
        else if (opts.startingSlide >= els.length)
            opts.startingSlide = 0; // catch bogus input
        var first = opts.startingSlide || 0;
        $slides.css({position: 'absolute', top:0, left:0}).hide().each(function(i) { 
            var z = first ? i >= first ? els.length - (i-first) : first-i : els.length-i;
            $(this).css('z-index', z) 
        });
        
        $(els[first]).css('opacity',1).show(); // opacity bit needed to handle reinit case
        if ($.browser.msie) els[first].style.removeAttribute('filter');

        if (opts.fit && opts.width) 
            $slides.width(opts.width);
        if (opts.fit && opts.height && opts.height != 'auto') 
            $slides.height(opts.height);
        if (opts.pause) 
            $cont.hover(function(){this.cyclePause=1;},function(){this.cyclePause=0;});

        // run transition init fn
        var init = $.fn.cycle.transitions[opts.fx];
        if ($.isFunction(init))
            init($cont, $slides, opts);
        else if (opts.fx != 'custom')
            log('unknown transition: ' + opts.fx);
        
        $slides.each(function() {
            var $el = $(this);
            this.cycleH = (opts.fit && opts.height) ? opts.height : $el.height();
            this.cycleW = (opts.fit && opts.width) ? opts.width : $el.width();
        });

        opts.cssBefore = opts.cssBefore || {};
        opts.animIn = opts.animIn || {};
        opts.animOut = opts.animOut || {};

        $slides.not(':eq('+first+')').css(opts.cssBefore);
        if (opts.cssFirst)
            $($slides[first]).css(opts.cssFirst);

        if (opts.timeout) {
            // ensure that timeout and speed settings are sane
            if (opts.speed.constructor == String)
                opts.speed = {slow: 600, fast: 200}[opts.speed] || 400;
            if (!opts.sync)
                opts.speed = opts.speed / 2;
            while((opts.timeout - opts.speed) < 250)
                opts.timeout += opts.speed;
        }
        if (opts.easing) 
            opts.easeIn = opts.easeOut = opts.easing;
        if (!opts.speedIn) 
            opts.speedIn = opts.speed;
        if (!opts.speedOut) 
            opts.speedOut = opts.speed;

 		opts.slideCount = els.length;
        opts.currSlide = first;
        if (opts.random) {
            opts.nextSlide = opts.currSlide;
            if (++opts.randomIndex == els.length) 
                opts.randomIndex = 0;
            opts.nextSlide = opts.randomMap[opts.randomIndex];
        }
        else
            opts.nextSlide = opts.startingSlide >= (els.length-1) ? 0 : opts.startingSlide+1;

        // fire artificial events
        var e0 = $slides[first];
        if (opts.before.length)
            opts.before[0].apply(e0, [e0, e0, opts, true]);
        if (opts.after.length > 1)
            opts.after[1].apply(e0, [e0, e0, opts, true]);
        
        if (opts.click && !opts.next)
            opts.next = opts.click;
        if (opts.next)
            $(opts.next).bind('click', function(){return advance(els,opts,opts.rev?-1:1)});
        if (opts.prev)
            $(opts.prev).bind('click', function(){return advance(els,opts,opts.rev?1:-1)});
        if (opts.pager)
            buildPager(els,opts);

        // expose fn for adding slides after the show has started
        opts.addSlide = function(newSlide) {
            var $s = $(newSlide), s = $s[0];
            if (!opts.autostopCount)
                opts.countdown++;
            els.push(s);
            if (opts.els) 
                opts.els.push(s); // shuffle needs this
            opts.slideCount = els.length;
            
            $s.css('position','absolute').appendTo($cont);
            
            if (ie6 && opts.cleartype && !opts.cleartypeNoBg)
                clearTypeFix($s);

            if (opts.fit && opts.width) 
                $s.width(opts.width);
            if (opts.fit && opts.height && opts.height != 'auto') 
                $slides.height(opts.height);
            s.cycleH = (opts.fit && opts.height) ? opts.height : $s.height();
            s.cycleW = (opts.fit && opts.width) ? opts.width : $s.width();

            $s.css(opts.cssBefore);

            if (opts.pager)
                $.fn.cycle.createPagerAnchor(els.length-1, s, $(opts.pager), els, opts);
            
            if (typeof opts.onAddSlide == 'function')
                opts.onAddSlide($s);
        };

        if (opts.timeout || opts.continuous)
            this.cycleTimeout = setTimeout(
                function(){go(els,opts,0,!opts.rev)}, 
                opts.continuous ? 10 : opts.timeout + (opts.delay||0));
    });
};

function go(els, opts, manual, fwd) {
    if (opts.busy) return;
    var p = opts.container, curr = els[opts.currSlide], next = els[opts.nextSlide];
    if (p.cycleTimeout === 0 && !manual) 
        return;

    if (!manual && !p.cyclePause && 
        ((opts.autostop && (--opts.countdown <= 0)) ||
        (opts.nowrap && !opts.random && opts.nextSlide < opts.currSlide))) {
        if (opts.end)
            opts.end(opts);
        return;
    }

    if (manual || !p.cyclePause) {
        if (opts.before.length)
            $.each(opts.before, function(i,o) { o.apply(next, [curr, next, opts, fwd]); });
        var after = function() {
            if ($.browser.msie && opts.cleartype)
                this.style.removeAttribute('filter');
            $.each(opts.after, function(i,o) { o.apply(next, [curr, next, opts, fwd]); });
        };

        if (opts.nextSlide != opts.currSlide) {
            opts.busy = 1;
            if (opts.fxFn)
                opts.fxFn(curr, next, opts, after, fwd);
            else if ($.isFunction($.fn.cycle[opts.fx]))
                $.fn.cycle[opts.fx](curr, next, opts, after);
            else
                $.fn.cycle.custom(curr, next, opts, after);
        }
        if (opts.random) {
            opts.currSlide = opts.nextSlide;
            if (++opts.randomIndex == els.length) 
                opts.randomIndex = 0;
            opts.nextSlide = opts.randomMap[opts.randomIndex];
        }
        else { // sequence
            var roll = (opts.nextSlide + 1) == els.length;
            opts.nextSlide = roll ? 0 : opts.nextSlide+1;
            opts.currSlide = roll ? els.length-1 : opts.nextSlide-1;
        }
        if (opts.pager)
            $.fn.cycle.updateActivePagerLink(opts.pager, opts.currSlide);
    }
    if (opts.timeout && !opts.continuous)
        p.cycleTimeout = setTimeout(function() { go(els,opts,0,!opts.rev) }, opts.timeout);
    else if (opts.continuous && p.cyclePause) 
        p.cycleTimeout = setTimeout(function() { go(els,opts,0,!opts.rev) }, 10);
};

$.fn.cycle.updateActivePagerLink = function(pager, currSlide) {
    $(pager).find('a').removeClass('activeSlide').filter('a:eq('+currSlide+')').addClass('activeSlide');
};

// advance slide forward or back
function advance(els, opts, val) {
    var p = opts.container, timeout = p.cycleTimeout;
    if (timeout) {
        clearTimeout(timeout);
        p.cycleTimeout = 0;
    }
    if (opts.random && val < 0) {
        // move back to the previously display slide
        opts.randomIndex--;
        if (--opts.randomIndex == -2)
            opts.randomIndex = els.length-2;
        else if (opts.randomIndex == -1)
            opts.randomIndex = els.length-1;
        opts.nextSlide = opts.randomMap[opts.randomIndex];
    }
    else if (opts.random) {
        if (++opts.randomIndex == els.length) 
            opts.randomIndex = 0;
        opts.nextSlide = opts.randomMap[opts.randomIndex];
    }
    else {
        opts.nextSlide = opts.currSlide + val;
        if (opts.nextSlide < 0) {
            if (opts.nowrap) return false;
            opts.nextSlide = els.length - 1;
        }
        else if (opts.nextSlide >= els.length) {
            if (opts.nowrap) return false;
            opts.nextSlide = 0;
        }
    }
    
log('nextSlide: ' + opts.nextSlide + '; randomIndex: ' + opts.randomIndex);    
    if (opts.prevNextClick && typeof opts.prevNextClick == 'function')
        opts.prevNextClick(val > 0, opts.nextSlide, els[opts.nextSlide]);
    go(els, opts, 1, val>=0);
    return false;
};

function buildPager(els, opts) {
    var $p = $(opts.pager);
    $.each(els, function(i,o) {
        $.fn.cycle.createPagerAnchor(i,o,$p,els,opts);
    });
   $.fn.cycle.updateActivePagerLink(opts.pager, opts.startingSlide);
};

$.fn.cycle.createPagerAnchor = function(i, el, $p, els, opts) {
    var $a = (typeof opts.pagerAnchorBuilder == 'function')
        ? $(opts.pagerAnchorBuilder(i,el))
        : $('<a href="#">'+(i+1)+'</a>');
    
    // don't reparent if anchor is in the dom
    if ($a.parents('body').length == 0)
        $a.appendTo($p);
        
    $a.bind(opts.pagerEvent, function() {
        opts.nextSlide = i;
        var p = opts.container, timeout = p.cycleTimeout;
        if (timeout) {
            clearTimeout(timeout);
            p.cycleTimeout = 0;
        }            
        if (typeof opts.pagerClick == 'function')
            opts.pagerClick(opts.nextSlide, els[opts.nextSlide]);
        go(els,opts,1,opts.currSlide < i);
        return false;
    });
};


// this fixes clearType problems in ie6 by setting an explicit bg color
function clearTypeFix($slides) {
    function hex(s) {
        var s = parseInt(s).toString(16);
        return s.length < 2 ? '0'+s : s;
    };
    function getBg(e) {
        for ( ; e && e.nodeName.toLowerCase() != 'html'; e = e.parentNode) {
            var v = $.css(e,'background-color');
            if (v.indexOf('rgb') >= 0 ) { 
                var rgb = v.match(/\d+/g); 
                return '#'+ hex(rgb[0]) + hex(rgb[1]) + hex(rgb[2]);
            }
            if (v && v != 'transparent')
                return v;
        }
        return '#ffffff';
    };
    $slides.each(function() { $(this).css('background-color', getBg(this)); });
};


$.fn.cycle.custom = function(curr, next, opts, cb) {
    var $l = $(curr), $n = $(next);
    $n.css(opts.cssBefore);
    var fn = function() {$n.animate(opts.animIn, opts.speedIn, opts.easeIn, cb)};
    $l.animate(opts.animOut, opts.speedOut, opts.easeOut, function() {
        if (opts.cssAfter) $l.css(opts.cssAfter);
        if (!opts.sync) fn();
    });
    if (opts.sync) fn();
};

$.fn.cycle.transitions = {
    fade: function($cont, $slides, opts) {
        $slides.not(':eq('+opts.startingSlide+')').css('opacity',0);
        opts.before.push(function() { $(this).show() });
        opts.animIn    = { opacity: 1 };
        opts.animOut   = { opacity: 0 };
        opts.cssBefore = { opacity: 0 };
        opts.cssAfter  = { display: 'none' };
    }
};

$.fn.cycle.ver = function() { return ver; };

// override these globally if you like (they are all optional)
$.fn.cycle.defaults = {
    fx:           'fade', // one of: fade, shuffle, zoom, scrollLeft, etc
    timeout:       4000,  // milliseconds between slide transitions (0 to disable auto advance)
    continuous:    0,     // true to start next transition immediately after current one completes
    speed:         1000,  // speed of the transition (any valid fx speed value)
    speedIn:       null,  // speed of the 'in' transition
    speedOut:      null,  // speed of the 'out' transition
    next:          null,  // id of element to use as click trigger for next slide
    prev:          null,  // id of element to use as click trigger for previous slide
    prevNextClick: null,  // callback fn for prev/next clicks:  function(isNext, zeroBasedSlideIndex, slideElement)
    pager:         null,  // id of element to use as pager container
    pagerClick:    null,  // callback fn for pager clicks:  function(zeroBasedSlideIndex, slideElement)
    pagerEvent:   'click', // event which drives the pager navigation
    pagerAnchorBuilder: null, // callback fn for building anchor links
    before:        null,  // transition callback (scope set to element to be shown)
    after:         null,  // transition callback (scope set to element that was shown)
    end:           null,  // callback invoked when the slideshow terminates (use with autostop or nowrap options)
    easing:        null,  // easing method for both in and out transitions
    easeIn:        null,  // easing for "in" transition
    easeOut:       null,  // easing for "out" transition
    shuffle:       null,  // coords for shuffle animation, ex: { top:15, left: 200 }
    animIn:        null,  // properties that define how the slide animates in
    animOut:       null,  // properties that define how the slide animates out
    cssBefore:     null,  // properties that define the initial state of the slide before transitioning in
    cssAfter:      null,  // properties that defined the state of the slide after transitioning out
    fxFn:          null,  // function used to control the transition
    height:       'auto', // container height
    startingSlide: 0,     // zero-based index of the first slide to be displayed
    sync:          1,     // true if in/out transitions should occur simultaneously
    random:        0,     // true for random, false for sequence (not applicable to shuffle fx)
    fit:           0,     // force slides to fit container
    pause:         0,     // true to enable "pause on hover"
    autostop:      0,     // true to end slideshow after X transitions (where X == slide count)
    autostopCount: 0,     // number of transitions (optionally used with autostop to define X)
    delay:         0,     // additional delay (in ms) for first transition (hint: can be negative)
    slideExpr:     null,  // expression for selecting slides (if something other than all children is required)
    cleartype:     0,     // true if clearType corrections should be applied (for IE)
    nowrap:        0      // true to prevent slideshow from wrapping
};

})(jQuery);


/*
 * jQuery Cycle Plugin Transition Definitions
 * This script is a plugin for the jQuery Cycle Plugin
 * Examples and documentation at: http://malsup.com/jquery/cycle/
 * Copyright (c) 2007-2008 M. Alsup
 * Version:  2.22
 * Dual licensed under the MIT and GPL licenses:
 * http://www.opensource.org/licenses/mit-license.php
 * http://www.gnu.org/licenses/gpl.html
 */
(function($) {

//
// These functions define one-time slide initialization for the named
// transitions. To save file size feel free to remove any of these that you 
// don't need.
//

// scrollUp/Down/Left/Right
$.fn.cycle.transitions.scrollUp = function($cont, $slides, opts) {
    $cont.css('overflow','hidden');
    opts.before.push(function(curr, next, opts) {
        $(this).show();
        opts.cssBefore.top = next.offsetHeight;
        opts.animOut.top = 0-curr.offsetHeight;
    });
    opts.cssFirst = { top: 0 };
    opts.animIn   = { top: 0 };
    opts.cssAfter = { display: 'none' };
};
$.fn.cycle.transitions.scrollDown = function($cont, $slides, opts) {
    $cont.css('overflow','hidden');
    opts.before.push(function(curr, next, opts) {
        $(this).show();
        opts.cssBefore.top = 0-next.offsetHeight;
        opts.animOut.top = curr.offsetHeight;
    });
    opts.cssFirst = { top: 0 };
    opts.animIn   = { top: 0 };
    opts.cssAfter = { display: 'none' };
};
$.fn.cycle.transitions.scrollLeft = function($cont, $slides, opts) {
    $cont.css('overflow','hidden');
    opts.before.push(function(curr, next, opts) {
        $(this).show();
        opts.cssBefore.left = next.offsetWidth;
        opts.animOut.left = 0-curr.offsetWidth;
    });
    opts.cssFirst = { left: 0 };
    opts.animIn   = { left: 0 };
};
$.fn.cycle.transitions.scrollRight = function($cont, $slides, opts) {
    $cont.css('overflow','hidden');
    opts.before.push(function(curr, next, opts) {
        $(this).show();
        opts.cssBefore.left = 0-next.offsetWidth;
        opts.animOut.left = curr.offsetWidth;
    });
    opts.cssFirst = { left: 0 };
    opts.animIn   = { left: 0 };
};
$.fn.cycle.transitions.scrollHorz = function($cont, $slides, opts) {
    $cont.css('overflow','hidden').width();
//    $slides.show();
    opts.before.push(function(curr, next, opts, fwd) {
        $(this).show();
        var currW = curr.offsetWidth, nextW = next.offsetWidth;
        opts.cssBefore = fwd ? { left: nextW } : { left: -nextW };
        opts.animIn.left = 0;
        opts.animOut.left = fwd ? -currW : currW;
        $slides.not(curr).css(opts.cssBefore);
    });
    opts.cssFirst = { left: 0 };
    opts.cssAfter = { display: 'none' }
};
$.fn.cycle.transitions.scrollVert = function($cont, $slides, opts) {
    $cont.css('overflow','hidden');
//    $slides.show();
    opts.before.push(function(curr, next, opts, fwd) {
        $(this).show();
        var currH = curr.offsetHeight, nextH = next.offsetHeight;
        opts.cssBefore = fwd ? { top: -nextH } : { top: nextH };
        opts.animIn.top = 0;
        opts.animOut.top = fwd ? currH : -currH;
        $slides.not(curr).css(opts.cssBefore);
    });
    opts.cssFirst = { top: 0 };
    opts.cssAfter = { display: 'none' }
};

// slideX/slideY
$.fn.cycle.transitions.slideX = function($cont, $slides, opts) {
    opts.before.push(function(curr, next, opts) {
        $(curr).css('zIndex',1);
    });    
    opts.onAddSlide = function($s) { $s.hide(); };
    opts.cssBefore = { zIndex: 2 };
    opts.animIn  = { width: 'show' };
    opts.animOut = { width: 'hide' };
};
$.fn.cycle.transitions.slideY = function($cont, $slides, opts) {
    opts.before.push(function(curr, next, opts) {
        $(curr).css('zIndex',1);
    });    
    opts.onAddSlide = function($s) { $s.hide(); };
    opts.cssBefore = { zIndex: 2 };
    opts.animIn  = { height: 'show' };
    opts.animOut = { height: 'hide' };
};

// shuffle
$.fn.cycle.transitions.shuffle = function($cont, $slides, opts) {
    var w = $cont.css('overflow', 'visible').width();
    $slides.css({left: 0, top: 0});
    opts.before.push(function() { $(this).show() });
    opts.speed = opts.speed / 2; // shuffle has 2 transitions        
    opts.random = 0;
    opts.shuffle = opts.shuffle || {left:-w, top:15};
    opts.els = [];
    for (var i=0; i < $slides.length; i++)
        opts.els.push($slides[i]);

    for (var i=0; i < opts.startingSlide; i++)
        opts.els.push(opts.els.shift());

    // custom transition fn (hat tip to Benjamin Sterling for this bit of sweetness!)
    opts.fxFn = function(curr, next, opts, cb, fwd) {
        var $el = fwd ? $(curr) : $(next);
        $el.animate(opts.shuffle, opts.speedIn, opts.easeIn, function() {
            fwd ? opts.els.push(opts.els.shift()) : opts.els.unshift(opts.els.pop());
            if (fwd) 
                for (var i=0, len=opts.els.length; i < len; i++)
                    $(opts.els[i]).css('z-index', len-i);
            else {
                var z = $(curr).css('z-index');
                $el.css('z-index', parseInt(z)+1);
            }
            $el.animate({left:0, top:0}, opts.speedOut, opts.easeOut, function() {
                $(fwd ? this : curr).hide();
                if (cb) cb();
            });
        });
    };
    opts.onAddSlide = function($s) { $s.hide(); };
};

// turnUp/Down/Left/Right
$.fn.cycle.transitions.turnUp = function($cont, $slides, opts) {
    opts.before.push(function(curr, next, opts) {
        $(this).show();
        opts.cssBefore.top = next.cycleH;
        opts.animIn.height = next.cycleH;
    });
    opts.onAddSlide = function($s) { $s.hide(); };
    opts.cssFirst  = { top: 0 };
    opts.cssBefore = { height: 0 };
    opts.animIn    = { top: 0 };
    opts.animOut   = { height: 0 };
    opts.cssAfter  = { display: 'none' };
};
$.fn.cycle.transitions.turnDown = function($cont, $slides, opts) {
    opts.before.push(function(curr, next, opts) {
        $(this).show();
        opts.animIn.height = next.cycleH;
        opts.animOut.top   = curr.cycleH;
    });
    opts.onAddSlide = function($s) { $s.hide(); };
    opts.cssFirst  = { top: 0 };
    opts.cssBefore = { top: 0, height: 0 };
    opts.animOut   = { height: 0 };
    opts.cssAfter  = { display: 'none' };
};
$.fn.cycle.transitions.turnLeft = function($cont, $slides, opts) {
    opts.before.push(function(curr, next, opts) {
        $(this).show();
        opts.cssBefore.left = next.cycleW;
        opts.animIn.width = next.cycleW;
    });
    opts.onAddSlide = function($s) { $s.hide(); };
    opts.cssBefore = { width: 0 };
    opts.animIn    = { left: 0 };
    opts.animOut   = { width: 0 };
    opts.cssAfter  = { display: 'none' };
};
$.fn.cycle.transitions.turnRight = function($cont, $slides, opts) {
    opts.before.push(function(curr, next, opts) {
        $(this).show();
        opts.animIn.width = next.cycleW;
        opts.animOut.left = curr.cycleW;
    });
    opts.onAddSlide = function($s) { $s.hide(); };
    opts.cssBefore = { left: 0, width: 0 };
    opts.animIn    = { left: 0 };
    opts.animOut   = { width: 0 };
    opts.cssAfter  = { display: 'none' };
};

// zoom
$.fn.cycle.transitions.zoom = function($cont, $slides, opts) {
    opts.cssFirst = { top:0, left: 0 }; 
    opts.cssAfter = { display: 'none' };
    
    opts.before.push(function(curr, next, opts) {
        $(this).show();
        opts.cssBefore = { width: 0, height: 0, top: next.cycleH/2, left: next.cycleW/2 };
        opts.cssAfter  = { display: 'none' };
        opts.animIn    = { top: 0, left: 0, width: next.cycleW, height: next.cycleH };
        opts.animOut   = { width: 0, height: 0, top: curr.cycleH/2, left: curr.cycleW/2 };
        $(curr).css('zIndex',2);
        $(next).css('zIndex',1);
    });    
    opts.onAddSlide = function($s) { $s.hide(); };
};

// fadeZoom
$.fn.cycle.transitions.fadeZoom = function($cont, $slides, opts) {
    opts.before.push(function(curr, next, opts) {
        opts.cssBefore = { width: 0, height: 0, opacity: 1, left: next.cycleW/2, top: next.cycleH/2, zIndex: 1 };
        opts.animIn    = { top: 0, left: 0, width: next.cycleW, height: next.cycleH };
    });    
    opts.animOut  = { opacity: 0 };
    opts.cssAfter = { zIndex: 0 };
};

// blindX
$.fn.cycle.transitions.blindX = function($cont, $slides, opts) {
    var w = $cont.css('overflow','hidden').width();
    $slides.show();
    opts.before.push(function(curr, next, opts) {
        $(curr).css('zIndex',1);
    });    
    opts.cssBefore = { left: w, zIndex: 2 };
    opts.cssAfter = { zIndex: 1 };
    opts.animIn = { left: 0 };
    opts.animOut  = { left: w };
};
// blindY
$.fn.cycle.transitions.blindY = function($cont, $slides, opts) {
    var h = $cont.css('overflow','hidden').height();
    $slides.show();
    opts.before.push(function(curr, next, opts) {
        $(curr).css('zIndex',1);
    });    
    opts.cssBefore = { top: h, zIndex: 2 };
    opts.cssAfter = { zIndex: 1 };
    opts.animIn = { top: 0 };
    opts.animOut  = { top: h };
};
// blindZ
$.fn.cycle.transitions.blindZ = function($cont, $slides, opts) {
    var h = $cont.css('overflow','hidden').height();
    var w = $cont.width();
    $slides.show();
    opts.before.push(function(curr, next, opts) {
        $(curr).css('zIndex',1);
    });    
    opts.cssBefore = { top: h, left: w, zIndex: 2 };
    opts.cssAfter = { zIndex: 1 };
    opts.animIn = { top: 0, left: 0 };
    opts.animOut  = { top: h, left: w };
};

// growX - grow horizontally from centered 0 width
$.fn.cycle.transitions.growX = function($cont, $slides, opts) {
    opts.before.push(function(curr, next, opts) {
        opts.cssBefore = { left: this.cycleW/2, width: 0, zIndex: 2 };
        opts.animIn = { left: 0, width: this.cycleW };
        opts.animOut = { left: 0 };
        $(curr).css('zIndex',1);
    });    
    opts.onAddSlide = function($s) { $s.hide().css('zIndex',1); };
};
// growY - grow vertically from centered 0 height
$.fn.cycle.transitions.growY = function($cont, $slides, opts) {
    opts.before.push(function(curr, next, opts) {
        opts.cssBefore = { top: this.cycleH/2, height: 0, zIndex: 2 };
        opts.animIn = { top: 0, height: this.cycleH };
        opts.animOut = { top: 0 };
        $(curr).css('zIndex',1);
    });    
    opts.onAddSlide = function($s) { $s.hide().css('zIndex',1); };
};

// curtainX - squeeze in both edges horizontally
$.fn.cycle.transitions.curtainX = function($cont, $slides, opts) {
    opts.before.push(function(curr, next, opts) {
        opts.cssBefore = { left: next.cycleW/2, width: 0, zIndex: 1, display: 'block' };
        opts.animIn = { left: 0, width: this.cycleW };
        opts.animOut = { left: curr.cycleW/2, width: 0 };
        $(curr).css('zIndex',2);
    });    
    opts.onAddSlide = function($s) { $s.hide(); };
    opts.cssAfter = { zIndex: 1, display: 'none' };
};
// curtainY - squeeze in both edges vertically
$.fn.cycle.transitions.curtainY = function($cont, $slides, opts) {
    opts.before.push(function(curr, next, opts) {
        opts.cssBefore = { top: next.cycleH/2, height: 0, zIndex: 1, display: 'block' };
        opts.animIn = { top: 0, height: this.cycleH };
        opts.animOut = { top: curr.cycleH/2, height: 0 };
        $(curr).css('zIndex',2);
    });    
    opts.onAddSlide = function($s) { $s.hide(); };
    opts.cssAfter = { zIndex: 1, display: 'none' };
};

// cover - curr slide covered by next slide
$.fn.cycle.transitions.cover = function($cont, $slides, opts) {
    var d = opts.direction || 'left';
    var w = $cont.css('overflow','hidden').width();
    var h = $cont.height();
    opts.before.push(function(curr, next, opts) {
        opts.cssBefore = opts.cssBefore || {};
        opts.cssBefore.zIndex = 2;
        opts.cssBefore.display = 'block';
        
        if (d == 'right') 
            opts.cssBefore.left = -w;
        else if (d == 'up')    
            opts.cssBefore.top = h;
        else if (d == 'down')  
            opts.cssBefore.top = -h;
        else
            opts.cssBefore.left = w;
        $(curr).css('zIndex',1);
    });    
    if (!opts.animIn)  opts.animIn = { left: 0, top: 0 };
    if (!opts.animOut) opts.animOut = { left: 0, top: 0 };
    opts.cssAfter = opts.cssAfter || {};
    opts.cssAfter.zIndex = 2;
    opts.cssAfter.display = 'none';
};

// uncover - curr slide moves off next slide
$.fn.cycle.transitions.uncover = function($cont, $slides, opts) {
    var d = opts.direction || 'left';
    var w = $cont.css('overflow','hidden').width();
    var h = $cont.height();
    opts.before.push(function(curr, next, opts) {
        opts.cssBefore.display = 'block';
        if (d == 'right') 
            opts.animOut.left = w;
        else if (d == 'up')    
            opts.animOut.top = -h;
        else if (d == 'down')  
            opts.animOut.top = h;
        else
            opts.animOut.left = -w;
        $(curr).css('zIndex',2);
        $(next).css('zIndex',1);
    });    
    opts.onAddSlide = function($s) { $s.hide(); };
    if (!opts.animIn)  opts.animIn = { left: 0, top: 0 };
    opts.cssBefore = opts.cssBefore || {};
    opts.cssBefore.top = 0;
    opts.cssBefore.left = 0;
    
    opts.cssAfter = opts.cssAfter || {};
    opts.cssAfter.zIndex = 1;
    opts.cssAfter.display = 'none';
};

// toss - move top slide and fade away
$.fn.cycle.transitions.toss = function($cont, $slides, opts) {
    var w = $cont.css('overflow','visible').width();
    var h = $cont.height();
    opts.before.push(function(curr, next, opts) {
        $(curr).css('zIndex',2);
        opts.cssBefore.display = 'block'; 
        // provide default toss settings if animOut not provided
        if (!opts.animOut.left && !opts.animOut.top)
            opts.animOut = { left: w*2, top: -h/2, opacity: 0 };
        else
            opts.animOut.opacity = 0;
    });    
    opts.onAddSlide = function($s) { $s.hide(); };
    opts.cssBefore = { left: 0, top: 0, zIndex: 1, opacity: 1 };
    opts.animIn = { left: 0 };
    opts.cssAfter = { zIndex: 2, display: 'none' };
};

// wipe - clip animation
$.fn.cycle.transitions.wipe = function($cont, $slides, opts) {
    var w = $cont.css('overflow','hidden').width();
    var h = $cont.height();
    opts.cssBefore = opts.cssBefore || {};
    var clip;
    if (opts.clip) {
        if (/l2r/.test(opts.clip))
            clip = 'rect(0px 0px '+h+'px 0px)';
        else if (/r2l/.test(opts.clip))
            clip = 'rect(0px '+w+'px '+h+'px '+w+'px)';
        else if (/t2b/.test(opts.clip))
            clip = 'rect(0px '+w+'px 0px 0px)';
        else if (/b2t/.test(opts.clip))
            clip = 'rect('+h+'px '+w+'px '+h+'px 0px)';
        else if (/zoom/.test(opts.clip)) {
            var t = parseInt(h/2);
            var l = parseInt(w/2);
            clip = 'rect('+t+'px '+l+'px '+t+'px '+l+'px)';
        }
    }
    
    opts.cssBefore.clip = opts.cssBefore.clip || clip || 'rect(0px 0px 0px 0px)';
    
    var d = opts.cssBefore.clip.match(/(\d+)/g);
    var t = parseInt(d[0]), r = parseInt(d[1]), b = parseInt(d[2]), l = parseInt(d[3]);
    
    opts.before.push(function(curr, next, opts) {
        if (curr == next) return;
        var $curr = $(curr).css('zIndex',2);
        var $next = $(next).css({
            zIndex:  3,
            display: 'block'
        });
        
        var step = 1, count = parseInt((opts.speedIn / 13)) - 1;
        function f() {
            var tt = t ? t - parseInt(step * (t/count)) : 0;
            var ll = l ? l - parseInt(step * (l/count)) : 0;
            var bb = b < h ? b + parseInt(step * ((h-b)/count || 1)) : h;
            var rr = r < w ? r + parseInt(step * ((w-r)/count || 1)) : w;
            $next.css({ clip: 'rect('+tt+'px '+rr+'px '+bb+'px '+ll+'px)' });
            (step++ <= count) ? setTimeout(f, 13) : $curr.css('display', 'none');
        }
        f();
    });    
    opts.cssAfter  = { };
    opts.animIn    = { left: 0 };
    opts.animOut   = { left: 0 };
};

})(jQuery);
/*
 jQuery delayed observer - 0.5
 http://code.google.com/p/jquery-utils/

 (c) Maxime Haineault <haineault@gmail.com>
 http://haineault.com
 
 MIT License (http://www.opensource.org/licenses/mit-license.php)
 
 Changelog
 =========
 0.2 using closure, special thanks to Stephen Goguen & Tane Piper.
 0.3 now allow object chaining, added license
 0.4 code cleanup, added support for other events than keyup, fixed variable scope
 0.5 changed filename, included in jquery-utils 
 0.6 complete rewrite, same structure but more compact, 
     now using jquery's "data" method instead of a stack to store data
     it's now possible to change the condition, by default it's "if new this.val == this.oldval"
     now using this.each to support multiple observed elements
*/

(function($){
    $.extend($.fn, {
        delayedObserver: function(callback, delay, options){
            this.each(function(){
                var $obj    = $(this);
                var options = options || {};
                $obj.data('oldval',    $obj.val())
                    .data('delay',     delay || 0.5)
                    .data('condition', options.condition || function() {
                        return ($(this).data('oldval') == $(this).val());
                    })
                    .data('callback',  callback)
                    [(options.event||'keyup')](function(){
                        if ($obj.data('condition').apply($obj)) return;
                        else {
                            if ($obj.data('timer')) clearTimeout($obj.data('timer'));
                          
                            $obj.data('timer', setTimeout(function(){
                                $obj.data('callback').apply($obj);
                            }, $obj.data('delay') * 1000));
                          
                            $obj.data('oldval', $obj.val());
                        }
                    });
                });
        }
    });
})(jQuery);
/**
 * Flash (http://jquery.lukelutman.com/plugins/flash)
 * A jQuery plugin for embedding Flash movies.
 * 
 * Version 1.0
 * November 9th, 2006
 *
 * Copyright (c) 2006 Luke Lutman (http://www.lukelutman.com)
 * Dual licensed under the MIT and GPL licenses.
 * http://www.opensource.org/licenses/mit-license.php
 * http://www.opensource.org/licenses/gpl-license.php
 * 
 * Inspired by:
 * SWFObject (http://blog.deconcept.com/swfobject/)
 * UFO (http://www.bobbyvandersluis.com/ufo/)
 * sIFR (http://www.mikeindustries.com/sifr/)
 * 
 * IMPORTANT: 
 * The packed version of jQuery breaks ActiveX control
 * activation in Internet Explorer. Use JSMin to minifiy
 * jQuery (see: http://jquery.lukelutman.com/plugins/flash#activex).
 *
 **/ 
;(function(){
	
var $$;

/**
 * 
 * @desc Replace matching elements with a flash movie.
 * @author Luke Lutman
 * @version 1.0.1
 *
 * @name flash
 * @param Hash htmlOptions Options for the embed/object tag.
 * @param Hash pluginOptions Options for detecting/updating the Flash plugin (optional).
 * @param Function replace Custom block called for each matched element if flash is installed (optional).
 * @param Function update Custom block called for each matched if flash isn't installed (optional).
 * @type jQuery
 *
 * @cat plugins/flash
 * 
 * @example $('#hello').flash({ src: 'hello.swf' });
 * @desc Embed a Flash movie.
 *
 * @example $('#hello').flash({ src: 'hello.swf' }, { version: 8 });
 * @desc Embed a Flash 8 movie.
 *
 * @example $('#hello').flash({ src: 'hello.swf' }, { expressInstall: true });
 * @desc Embed a Flash movie using Express Install if flash isn't installed.
 *
 * @example $('#hello').flash({ src: 'hello.swf' }, { update: false });
 * @desc Embed a Flash movie, don't show an update message if Flash isn't installed.
 *
**/
$$ = jQuery.fn.flash = function(htmlOptions, pluginOptions, replace, update) {
	
	// Set the default block.
	var block = replace || $$.replace;
	
	// Merge the default and passed plugin options.
	pluginOptions = $$.copy($$.pluginOptions, pluginOptions);
	
	// Detect Flash.
	if(!$$.hasFlash(pluginOptions.version)) {
		// Use Express Install (if specified and Flash plugin 6,0,65 or higher is installed).
		if(pluginOptions.expressInstall && $$.hasFlash(6,0,65)) {
			// Add the necessary flashvars (merged later).
			var expressInstallOptions = {
				flashvars: {  	
					MMredirectURL: location,
					MMplayerType: 'PlugIn',
					MMdoctitle: jQuery('title').text() 
				}					
			};
		// Ask the user to update (if specified).
		} else if (pluginOptions.update) {
			// Change the block to insert the update message instead of the flash movie.
			block = update || $$.update;
		// Fail
		} else {
			// The required version of flash isn't installed.
			// Express Install is turned off, or flash 6,0,65 isn't installed.
			// Update is turned off.
			// Return without doing anything.
			return this;
		}
	}
	
	// Merge the default, express install and passed html options.
	htmlOptions = $$.copy($$.htmlOptions, expressInstallOptions, htmlOptions);
	
	// Invoke $block (with a copy of the merged html options) for each element.
	return this.each(function(){
		block.call(this, $$.copy(htmlOptions));
	});
	
};
/**
 *
 * @name flash.copy
 * @desc Copy an arbitrary number of objects into a new object.
 * @type Object
 * 
 * @example $$.copy({ foo: 1 }, { bar: 2 });
 * @result { foo: 1, bar: 2 };
 *
**/
$$.copy = function() {
	var options = {}, flashvars = {};
	for(var i = 0; i < arguments.length; i++) {
		var arg = arguments[i];
		if(arg == undefined) continue;
		jQuery.extend(options, arg);
		// don't clobber one flash vars object with another
		// merge them instead
		if(arg.flashvars == undefined) continue;
		jQuery.extend(flashvars, arg.flashvars);
	}
	options.flashvars = flashvars;
	return options;
};
/*
 * @name flash.hasFlash
 * @desc Check if a specific version of the Flash plugin is installed
 * @type Boolean
 *
**/
$$.hasFlash = function() {
	// look for a flag in the query string to bypass flash detection
	if(/hasFlash\=true/.test(location)) return true;
	if(/hasFlash\=false/.test(location)) return false;
	var pv = $$.hasFlash.playerVersion().match(/\d+/g);
	var rv = String([arguments[0], arguments[1], arguments[2]]).match(/\d+/g) || String($$.pluginOptions.version).match(/\d+/g);
	for(var i = 0; i < 3; i++) {
		pv[i] = parseInt(pv[i] || 0);
		rv[i] = parseInt(rv[i] || 0);
		// player is less than required
		if(pv[i] < rv[i]) return false;
		// player is greater than required
		if(pv[i] > rv[i]) return true;
	}
	// major version, minor version and revision match exactly
	return true;
};
/**
 *
 * @name flash.hasFlash.playerVersion
 * @desc Get the version of the installed Flash plugin.
 * @type String
 *
**/
$$.hasFlash.playerVersion = function() {
	// ie
	try {
		try {
			// avoid fp6 minor version lookup issues
			// see: http://blog.deconcept.com/2006/01/11/getvariable-setvariable-crash-internet-explorer-flash-6/
			var axo = new ActiveXObject('ShockwaveFlash.ShockwaveFlash.6');
			try { axo.AllowScriptAccess = 'always';	} 
			catch(e) { return '6,0,0'; }				
		} catch(e) {}
		return new ActiveXObject('ShockwaveFlash.ShockwaveFlash').GetVariable('$version').replace(/\D+/g, ',').match(/^,?(.+),?$/)[1];
	// other browsers
	} catch(e) {
		try {
			if(navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin){
				return (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]).description.replace(/\D+/g, ",").match(/^,?(.+),?$/)[1];
			}
		} catch(e) {}		
	}
	return '0,0,0';
};
/**
 *
 * @name flash.htmlOptions
 * @desc The default set of options for the object or embed tag.
 *
**/
$$.htmlOptions = {
	height: 240,
	flashvars: {},
	pluginspage: 'http://www.adobe.com/go/getflashplayer',
	src: '#',
	type: 'application/x-shockwave-flash',
	width: 320		
};
/**
 *
 * @name flash.pluginOptions
 * @desc The default set of options for checking/updating the flash Plugin.
 *
**/
$$.pluginOptions = {
	expressInstall: false,
	update: true,
	version: '6.0.65'
};
/**
 *
 * @name flash.replace
 * @desc The default method for replacing an element with a Flash movie.
 *
**/
$$.replace = function(htmlOptions) {
	this.innerHTML = '<div class="alt">'+this.innerHTML+'</div>';
	jQuery(this)
		.addClass('flash-replaced')
		.prepend($$.transform(htmlOptions));
};
/**
 *
 * @name flash.update
 * @desc The default method for replacing an element with an update message.
 *
**/
$$.update = function(htmlOptions) {
	var url = String(location).split('?');
	url.splice(1,0,'?hasFlash=true&');
	url = url.join('');
	var msg = '<p>This content requires the Flash Player. <a href="http://www.adobe.com/go/getflashplayer">Download Flash Player</a>. Already have Flash Player? <a href="'+url+'">Click here.</a></p>';
	this.innerHTML = '<span class="alt">'+this.innerHTML+'</span>';
	jQuery(this)
		.addClass('flash-update')
		.prepend(msg);
};
/**
 *
 * @desc Convert a hash of html options to a string of attributes, using Function.apply(). 
 * @example toAttributeString.apply(htmlOptions)
 * @result foo="bar" foo="bar"
 *
**/
function toAttributeString() {
	var s = '';
	for(var key in this)
		if(typeof this[key] != 'function')
			s += key+'="'+this[key]+'" ';
	return s;		
};
/**
 *
 * @desc Convert a hash of flashvars to a url-encoded string, using Function.apply(). 
 * @example toFlashvarsString.apply(flashvarsObject)
 * @result foo=bar&foo=bar
 *
**/
function toFlashvarsString() {
	var s = '';
	for(var key in this)
		if(typeof this[key] != 'function')
			s += key+'='+encodeURIComponent(this[key])+'&';
	return s.replace(/&$/, '');		
};
/**
 *
 * @name flash.transform
 * @desc Transform a set of html options into an embed tag.
 * @type String 
 *
 * @example $$.transform(htmlOptions)
 * @result <embed src="foo.swf" ... />
 *
 * Note: The embed tag is NOT standards-compliant, but it 
 * works in all current browsers. flash.transform can be
 * overwritten with a custom function to generate more 
 * standards-compliant markup.
 *
**/
$$.transform = function(htmlOptions) {
	htmlOptions.toString = toAttributeString;
	if(htmlOptions.flashvars) htmlOptions.flashvars.toString = toFlashvarsString;
	return '<embed ' + String(htmlOptions) + '/>';		
};

/**
 *
 * Flash Player 9 Fix (http://blog.deconcept.com/2006/07/28/swfobject-143-released/)
 *
**/
if (window.attachEvent) {
	window.attachEvent("onbeforeunload", function(){
		__flash_unloadHandler = function() {};
		__flash_savedUnloadHandler = function() {};
	});
}
	
})();
/*
  jQuery flickrshow - 0.1.0
  http://code.google.com/p/jquery-utils/

  (c) Maxime Haineault <haineault@gmail.com>
  http://haineault.com   

  MIT License (http://www.opensource.org/licenses/mit-license.php)
  
  Largely inspired from this blog post:
  http://www.viget.com/inspire/pulling-your-flickr-feed-with-jquery/

*/

(function($){
    $.tpl('flickrshow.wrapper',  '<div class="ui-flickrshow" />');
    $.tpl('flickrshow.titlebar', '<div class="ui-flickrshow-titlebar"><a href="{href:s}" title="{title:s}">{title:s}</a></div>');
    $.tpl('flickrshow.image',    '<a href="{href:s}" title="{title:s}" rel="flickr-show"><img src="{src:s}" class="ui-flickrshow-image" alt="{alt:s}" border="{border:d}" /></a>');
    $.tpl('flickrshow.toolbar',  [
        '<div class="ui-flickrshow-toolbar">',
            '<a id="ui-flickrshow-prev"></a>',
            '<a id="ui-flickrshow-browse" href="{link:s}" target="{browseTarget:s}"></a>',
            '<a id="ui-flickrshow-next"></a>',
        '</div>']);

	$.extend($.fn, {
		flickrshow: function(options, json) {
            var el  = this;
            var opt = $.extend({ 
                cycle: {},
                imgBorder: 0, 
                toolbar:   true,
                titlebar:  true,
                browseTarget: '_self',
                slimbox: $.slimbox || false }, options);

            $.getJSON(opt.url, function(data, textStatus){ 
                var tpl = ['<div class="ui-flickrshow-body ui-content">'];
                var wrapper  = $.tpl('flickrshow.wrapper');

                for (i in data.items) {
                    tpl.push($.tpl('flickrshow.image', {
                        href:   data.items[i].link,
                        title:  data.items[i].title,
                        src:    data.items[i].media.m,
                        alt:    '',
                        border: opt.imgBorder
                    }, true));
                }

                tpl.push('</div>');
                el.append(wrapper);

                if (opt.titlebar) {
                    $.tpl('flickrshow.titlebar', {
                        href: data.link,
                        title: data.title,
                        modified: data.modified
                    }).appendTo(wrapper);
                }

                if (opt.toolbar) {
                    opt.cycle.next = '#ui-flickrshow-next';
                    opt.cycle.prev = '#ui-flickrshow-prev';
                    $.tpl('flickrshow.toolbar', {
                        link: data.link, 
                        browseTarget: opt.browseTarget
                    }).appendTo(wrapper);
                }

                wrapper.append($(tpl.join('')))
                    .find('.ui-flickrshow-body').cycle(opt.cycle);

                if (opt.slimbox && $.slimbox) {
                    $("a[href^='http://www.flickr.com/photos/'] > img:first-child[src]", wrapper.find('.ui-flickrshow-body')).parent().slimbox({}, function(el) {
                        return [el.firstChild.src.replace(/_[mts]\.(\w+)$/, ".$1"),
                                (el.title || el.firstChild.alt) + '<br /><a href="' + el.href + '">Flickr page</a>'];
                    });                    
                }
            });
            return $(el);
		}
	});
})(jQuery);
(function($){
    $._i18n = { trans: {}, 'default':  'en', language: 'en' };
    $.i18n = function() {
        var getTrans = function(ns, str) {
            var trans = false;
            // check if string exists in translation
            if ($._i18n.trans[$._i18n.language] 
                && $._i18n.trans[$._i18n.language][ns]
                && $._i18n.trans[$._i18n.language][ns][str]) {
                trans = $._i18n.trans[$._i18n.language][ns][str];
            }
            // or exists in default
            else if ($._i18n.trans[$._i18n['default']] 
                     && $._i18n.trans[$._i18n['default']][ns]
                     && $._i18n.trans[$._i18n['default']][ns][str]) {
                trans = $._i18n.trans[$._i18n['default']][ns][str];
            }
            // return trans or original string
            return trans || str;
        };
        // Set language
        if (arguments.length < 2 && arguments[0].length == 2) {
            return $._i18n.language = arguments[0];
        }
        else {
            // get translation
            if (typeof(arguments[1]) == 'string') {
                var trans = getTrans(arguments[0], arguments[1]);
                // has variables for string formating
                if (arguments[2] && typeof(arguments[2]) == 'object') {
                    return $.format(trans, arguments[2]);
                }
                else {
                    return trans;
                }
            }
            // set translation
            else {
                var tmp  = arguments[0].split('.');
                var lang = tmp[0];
                var ns   = tmp[1] || 'jQuery';
                if (!$._i18n.trans[lang]) {
                    $._i18n.trans[lang] = {};
                    $._i18n.trans[lang][ns] = arguments[1];
                }
                else {
                    $.extend($._i18n.trans[lang][ns], arguments[1]);
                }
            }
        }
    };
})(jQuery);
/* Copyright (c) 2006 Brandon Aaron (brandon.aaron@gmail.com || 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.
 * Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers.
 * Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix.
 *
 * $LastChangedDate: 2007-12-20 09:02:08 -0600 (Thu, 20 Dec 2007) $
 * $Rev: 4265 $
 *
 * Version: 3.0
 * 
 * Requires: $ 1.2.2+
 */

(function($) {

$.event.special.mousewheel = {
	setup: function() {
		var handler = $.event.special.mousewheel.handler;
		
		// Fix pageX, pageY, clientX and clientY for mozilla
		if ( $.browser.mozilla )
			$(this).bind('mousemove.mousewheel', function(event) {
				$.data(this, 'mwcursorposdata', {
					pageX: event.pageX,
					pageY: event.pageY,
					clientX: event.clientX,
					clientY: event.clientY
				});
			});
	
		if ( this.addEventListener )
			this.addEventListener( ($.browser.mozilla ? 'DOMMouseScroll' : 'mousewheel'), handler, false);
		else
			this.onmousewheel = handler;
	},
	
	teardown: function() {
		var handler = $.event.special.mousewheel.handler;
		
		$(this).unbind('mousemove.mousewheel');
		
		if ( this.removeEventListener )
			this.removeEventListener( ($.browser.mozilla ? 'DOMMouseScroll' : 'mousewheel'), handler, false);
		else
			this.onmousewheel = function(){};
		
		$.removeData(this, 'mwcursorposdata');
	},
	
	handler: function(event) {
		var args = Array.prototype.slice.call( arguments, 1 );
		
		event = $.event.fix(event || window.event);
		// Get correct pageX, pageY, clientX and clientY for mozilla
		$.extend( event, $.data(this, 'mwcursorposdata') || {} );
		var delta = 0, returnValue = true;
		
		if ( event.wheelDelta ) delta = event.wheelDelta/120;
		if ( event.detail     ) delta = -event.detail/3;
		if ( $.browser.opera  ) delta = -event.wheelDelta;
		
		event.data  = event.data || {};
		event.type  = "mousewheel";
		
		// Add delta to the front of the arguments
		args.unshift(delta);
		// Add event to the front of the arguments
		args.unshift(event);

		return $.event.handle.apply(this, args);
	}
};

$.fn.extend({
	mousewheel: function(fn) {
		return fn ? this.bind("mousewheel", fn) : this.trigger("mousewheel");
	},
	
	unmousewheel: function(fn) {
		return this.unbind("mousewheel", fn);
	}
});

})(jQuery);/*!
        Slimbox v2.02 - The ultimate lightweight Lightbox clone for jQuery
        (c) 2007-2009 Christophe Beyls <http://www.digitalia.be>
        MIT-style license.
*/

(function($) {

        // Global variables, accessible to Slimbox only
        var win = $(window), options, images, activeImage = -1, activeURL, prevImage, nextImage, compatibleOverlay, middle, centerWidth, centerHeight, ie6 = !window.XMLHttpRequest,
                operaFix = window.opera && (document.compatMode == "CSS1Compat") && ($.browser.version >= 9.3), documentElement = document.documentElement,

        // Preload images
        preload = {}, preloadPrev = new Image(), preloadNext = new Image(),

        // DOM elements
        overlay, center, image, sizer, prevLink, nextLink, bottomContainer, bottom, caption, number;

        /*
                Initialization
        */

        $(function() {
                // Append the Slimbox HTML code at the bottom of the document
                $("body").append(
                        $([
                                overlay = $('<div id="lbOverlay" />')[0],
                                center = $('<div id="lbCenter" />')[0],
                                bottomContainer = $('<div id="lbBottomContainer" />')[0]
                        ]).css("display", "none")
                );

                image = $('<div id="lbImage" />').appendTo(center).append(
                        sizer = $('<div style="position: relative;" />').append([
                                prevLink = $('<a id="lbPrevLink" href="#" />').click(previous)[0],
                                nextLink = $('<a id="lbNextLink" href="#" />').click(next)[0]
                        ])[0]
                )[0];

                bottom = $('<div id="lbBottom" />').appendTo(bottomContainer).append([
                        $('<a id="lbCloseLink" href="#" />').add(overlay).click(close)[0],
                        caption = $('<div id="lbCaption" />')[0],
                        number = $('<div id="lbNumber" />')[0],
                        $('<div style="clear: both;" />')[0]
                ])[0];
        });


        /*
                API
        */

        // Open Slimbox with the specified parameters
        $.slimbox = function(_images, startImage, _options) {
                options = $.extend({
                        loop: false,                            // Allows to navigate between first and last images
                        overlayOpacity: 0.8,                    // 1 is opaque, 0 is completely transparent (change the color in the CSS file)
                        overlayFadeDuration: 400,               // Duration of the overlay fade-in and fade-out animations (in milliseconds)
                        resizeDuration: 400,                    // Duration of each of the box resize animations (in milliseconds)
                        resizeEasing: "swing",                  // "swing" is jQuery's default easing
                        initialWidth: 250,                      // Initial width of the box (in pixels)
                        initialHeight: 250,                     // Initial height of the box (in pixels)
                        imageFadeDuration: 400,                 // Duration of the image fade-in animation (in milliseconds)
                        captionAnimationDuration: 400,          // Duration of the caption animation (in milliseconds)
                        counterText: "Image {x} of {y}",        // Translate or change as you wish, or set it to false to disable counter text for image groups
                        closeKeys: [27, 88, 67],                // Array of keycodes to close Slimbox, default: Esc (27), 'x' (88), 'c' (67)
                        previousKeys: [37, 80],                 // Array of keycodes to navigate to the previous image, default: Left arrow (37), 'p' (80)
                        nextKeys: [39, 78]                      // Array of keycodes to navigate to the next image, default: Right arrow (39), 'n' (78)
                }, _options);

                // The function is called for a single image, with URL and Title as first two arguments
                if (typeof _images == "string") {
                        _images = [[_images, startImage]];
                        startImage = 0;
                }

                middle = win.scrollTop() + ((operaFix ? documentElement.clientHeight : win.height()) / 2);
                centerWidth = options.initialWidth;
                centerHeight = options.initialHeight;
                $(center).css({top: Math.max(0, middle - (centerHeight / 2)), width: centerWidth, height: centerHeight, marginLeft: -centerWidth/2}).show();
                compatibleOverlay = ie6 || (overlay.currentStyle && (overlay.currentStyle.position != "fixed"));
                if (compatibleOverlay) overlay.style.position = "absolute";
                $(overlay).css("opacity", options.overlayOpacity).fadeIn(options.overlayFadeDuration);
                position();
                setup(1);

                images = _images;
                options.loop = options.loop && (images.length > 1);
                return changeImage(startImage);
        };

        /*
                options:        Optional options object, see jQuery.slimbox()
                linkMapper:     Optional function taking a link DOM element and an index as arguments and returning an array containing 2 elements:
                                the image URL and the image caption (may contain HTML)
                linksFilter:    Optional function taking a link DOM element and an index as arguments and returning true if the element is part of
                                the image collection that will be shown on click, false if not. "this" refers to the element that was clicked.
                                This function must always return true when the DOM element argument is "this".
        */
        $.fn.slimbox = function(_options, linkMapper, linksFilter) {
                linkMapper = linkMapper || function(el) {
                        return [el.href, el.title];
                };

                linksFilter = linksFilter || function() {
                        return true;
                };

                var links = this;

                return links.unbind("click").click(function() {
                        // Build the list of images that will be displayed
                        var link = this, startIndex = 0, filteredLinks, i = 0, length;
                        filteredLinks = $.grep(links, function(el, i) {
                                return linksFilter.call(link, el, i);
                        });

                        // We cannot use jQuery.map() because it flattens the returned array
                        for (length = filteredLinks.length; i < length; ++i) {
                                if (filteredLinks[i] == link) startIndex = i;
                                filteredLinks[i] = linkMapper(filteredLinks[i], i);
                        }

                        return $.slimbox(filteredLinks, startIndex, _options);
                });
        };


        /*
                Internal functions
        */

        function position() {
                var l = win.scrollLeft(), w = operaFix ? documentElement.clientWidth : win.width();
                $([center, bottomContainer]).css("left", l + (w / 2));
                if (compatibleOverlay) $(overlay).css({left: l, top: win.scrollTop(), width: w, height: win.height()});
        }

        function setup(open) {
                $("object").add(ie6 ? "select" : "embed").each(function(index, el) {
                        if (open) $.data(el, "slimbox", el.style.visibility);
                        el.style.visibility = open ? "hidden" : $.data(el, "slimbox");
                });
                var fn = open ? "bind" : "unbind";
                win[fn]("scroll resize", position);
                $(document)[fn]("keydown", keyDown);
        }

        function keyDown(event) {
                var code = event.keyCode, fn = $.inArray;
                // Prevent default keyboard action (like navigating inside the page)
                return (fn(code, options.closeKeys) >= 0) ? close()
                        : (fn(code, options.nextKeys) >= 0) ? next()
                        : (fn(code, options.previousKeys) >= 0) ? previous()
                        : false;
        }

        function previous() {
                return changeImage(prevImage);
        }

        function next() {
                return changeImage(nextImage);
        }

        function changeImage(imageIndex) {
                if (imageIndex >= 0) {
                        activeImage = imageIndex;
                        activeURL = images[activeImage][0];
                        prevImage = (activeImage || (options.loop ? images.length : 0)) - 1;
                        nextImage = ((activeImage + 1) % images.length) || (options.loop ? 0 : -1);

                        stop();
                        center.className = "lbLoading";

                        preload = new Image();
                        preload.onload = animateBox;
                        preload.src = activeURL;
                }

                return false;
        }

        function animateBox() {
                center.className = "";
                $(image).css({backgroundImage: "url(" + activeURL + ")", visibility: "hidden", display: ""});
                $(sizer).width(preload.width);
                $([sizer, prevLink, nextLink]).height(preload.height);

                $(caption).html(images[activeImage][1] || "");
                $(number).html((((images.length > 1) && options.counterText) || "").replace(/{x}/, activeImage + 1).replace(/{y}/, images.length));

                if (prevImage >= 0) preloadPrev.src = images[prevImage][0];
                if (nextImage >= 0) preloadNext.src = images[nextImage][0];

                centerWidth = image.offsetWidth;
                centerHeight = image.offsetHeight;
                var top = Math.max(0, middle - (centerHeight / 2));
                if (center.offsetHeight != centerHeight) {
                        $(center).animate({height: centerHeight, top: top}, options.resizeDuration, options.resizeEasing);
                }
                if (center.offsetWidth != centerWidth) {
                        $(center).animate({width: centerWidth, marginLeft: -centerWidth/2}, options.resizeDuration, options.resizeEasing);
                }
                $(center).queue(function() {
                        $(bottomContainer).css({width: centerWidth, top: top + centerHeight, marginLeft: -centerWidth/2, visibility: "hidden", display: ""});
                        $(image).css({display: "none", visibility: "", opacity: ""}).fadeIn(options.imageFadeDuration, animateCaption);
                });
        }


        function animateCaption() {
                if (prevImage >= 0) $(prevLink).show();
                if (nextImage >= 0) $(nextLink).show();
                $(bottom).css("marginTop", -bottom.offsetHeight).animate({marginTop: 0}, options.captionAnimationDuration);
                bottomContainer.style.visibility = "";
        }

        function stop() {
                preload.onload = null;
                preload.src = preloadPrev.src = preloadNext.src = activeURL;
                $([center, image, bottom]).stop(true);
                $([prevLink, nextLink, image, bottomContainer]).hide();
        }

        function close() {
                if (activeImage >= 0) {
                        stop();
                        activeImage = prevImage = nextImage = -1;
                        $(center).hide();
                        $(overlay).stop().fadeOut(options.overlayFadeDuration, setup);
                }

                return false;
        }

})(jQuery);
/*
 * timeago: a jQuery plugin, version: 0.5.1 (08/20/2008)
 * @requires jQuery v1.2 or later
 *
 * Timeago is a jQuery plugin that makes it easy to support automatically
 * updating fuzzy timestamps (e.g. "4 minutes ago" or "about 1 day ago").
 *
 * For usage and examples, visit:
 * http://timeago.yarp.com/
 *
 * Licensed under the MIT:
 * http://www.opensource.org/licenses/mit-license.php
 *
 * Copyright (c) 2008, Ryan McGeary (ryanonjavascript -[at]- mcgeary [*dot*] org)
 */
(function($) {
  $.timeago = function(timestamp) {
    if (timestamp instanceof Date) return inWords(timestamp);
    else if (typeof timestamp == "string") return inWords($.timeago.parse(timestamp));
    else return inWords($.timeago.parse($(timestamp).attr("title")));
  };
  var $t = $.timeago;

  $.extend($.timeago, {
    settings: {
      refreshMillis: 60000,
      allowFuture: false,
      strings: {
        ago: "ago",
        fromNow: "from now",
        seconds: "less than a minute",
        minute: "about a minute",
        minutes: "%d minutes",
        hour: "about an hour",
        hours: "about %d hours",
        day: "a day",
        days: "%d days",
        month: "about a month",
        months: "%d months",
        year: "about a year",
        years: "%d years"
      }
    },
    inWords: function(distanceMillis) {
      var $l = this.settings.strings;
      var suffix = $l.ago;
      if (this.settings.allowFuture) {
        if (distanceMillis < 0) suffix = $l.fromNow;
        distanceMillis = Math.abs(distanceMillis);
      }

      var seconds = distanceMillis / 1000;
      var minutes = seconds / 60;
      var hours = minutes / 60;
      var days = hours / 24;
      var years = days / 365;

      var words = seconds < 45 && sprintf($l.seconds, Math.round(seconds)) ||
        seconds < 90 && $l.minute ||
        minutes < 45 && sprintf($l.minutes, Math.round(minutes)) ||
        minutes < 90 && $l.hour ||
        hours < 24 && sprintf($l.hours, Math.round(hours)) ||
        hours < 48 && $l.day ||
        days < 30 && sprintf($l.days, Math.floor(days)) ||
        days < 60 && $l.month ||
        days < 365 && sprintf($l.months, Math.floor(days / 30)) ||
        years < 2 && $l.year ||
        sprintf($l.years, Math.floor(years));

      return words + " " + suffix;
    },
    parse: function(iso8601) {
      var s = $.trim(iso8601);
      s = s.replace(/-/,"/").replace(/-/,"/");
      s = s.replace(/T/," ").replace(/Z/," UTC");
      s = s.replace(/([\+-]\d\d)\:?(\d\d)/," $1$2"); // -04:00 -> -0400
      return new Date(s);
    }
  });

  $.fn.timeago = function() {
    var self = this;
    self.each(refresh);

    var $s = $t.settings;
    if ($s.refreshMillis > 0) {
      setInterval(function() { self.each(refresh); }, $s.refreshMillis);
    }
    return self;
  };

  function refresh() {
    var date = $t.parse(this.title);
    if (!isNaN(date)) {
      $(this).text(inWords(date));
    }
    return this;
  }

  function inWords(date) {
    return $t.inWords(distance(date));
  }

  function distance(date) {
    return (new Date().getTime() - date.getTime());
  }

  // lame sprintf implementation
  function sprintf(string, value) {
    return string.replace(/%d/i, value);
  }

  // fix for IE6 suckage
  if ($.browser.msie && $.browser.version < 7.0) {
    document.createElement('abbr');
  }
})(jQuery);

/*
  jQuery youtubeLinksToEmbed - 0.3
  http://code.google.com/p/jquery-utils/

  (c) Maxime Haineault <haineault@gmail.com>
  http://haineault.com   

  MIT License (http://www.opensource.org/licenses/mit-license.php)

*/

(function($){
    var youtubeURL = 'http://www.youtube.com/v/';

    var yl2e = {
        onclick: function() {
            if ($(this).next().hasClass('youtubeLinksToEmbed')) { return false; }

            href    =  youtubeURL + this.href.match(/[a-zA-Z0-9-_]+$/) + '&rel=1';
            wrapper = $('<div class="youtubeLinksToEmbed" style="display:none;"><span>Loading...</span><div style="display:none;"></div></div>');
            player  = $('div:first', wrapper);

            player.flash({src: href, width: 425, height: 355});
            $(this).after(wrapper);

            wrapper.queue(function(){
                $(this).css('height', 40);
                $(this).dequeue();
                $(this).slideDown();
                $(this).dequeue();
            });
    
            setTimeout(function(){
                wrapper.queue(function(){
                    $(this).find('span').hide().end();
                    $(this).dequeue();
                    $(this).animate({height: 375});
                    $(this).dequeue();
                });
                setTimeout(function(){
                    player.show();    
                }, 500);
            }, 1500);

            return false;
        }    
    };

    $.fn.youtubeLinksToEmbed = function(options){
        var opt = $.extend({autoOpen: false}, options);
        $(this).find('a[href*=youtube.com/watch?v=]')
            .addClass('youtubeLinksToEmbed')
            .each(function(){ 
                $(this).click(yl2e.onclick);
                if (opt.autoOpen) {
                    $(this).trigger('click');
                }});
    };

    $.fn.youtubeInputsToEmbed = function(options) {
        $(this).find('input[value*=youtube.com/watch?v=]')
            .addClass('youtubeLinksToEmbed')
            .each(function(){ 
                $('<a href="'+ $(this).val() +'">watch</a>')
                    .insertAfter(this);});
        $(this).youtubeLinksToEmbed(options);
    };
})(jQuery);

/* the following is removed because it was causing errors in Willow
$(document).ready(function(){
    //$('body').youtubeLinksToEmbed();
});
*/

/*
  jQuery utils - 0.8.0
  http://code.google.com/p/jquery-utils/

  (c) Maxime Haineault <haineault@gmail.com> 
  http://haineault.com

  MIT License (http://www.opensource.org/licenses/mit-license.php

*/

(function($){
     $.extend($.expr[':'], {
        // case insensitive version of :contains
        icontains: function(a,i,m){return (a.textContent||a.innerText||jQuery(a).text()||"").toLowerCase().indexOf(m[3].toLowerCase())>=0;}
    });

    $.iterators = {
        getText:  function() { return $(this).text(); },
        parseInt: function(v){ return parseInt(v, 10); }
    };

	$.extend({ 

        // Taken from ui.core.js. 
        // Why are you keeping this gem for yourself guys ? :|
        keyCode: {
            BACKSPACE: 8, CAPS_LOCK: 20, COMMA: 188, CONTROL: 17, DELETE: 46, DOWN: 40,
            END: 35, ENTER: 13, ESCAPE: 27, HOME: 36, INSERT:  45, LEFT: 37,
            NUMPAD_ADD: 107, NUMPAD_DECIMAL: 110, NUMPAD_DIVIDE: 111, NUMPAD_ENTER: 108, 
            NUMPAD_MULTIPLY: 106, NUMPAD_SUBTRACT: 109, PAGE_DOWN: 34, PAGE_UP: 33, 
            PERIOD: 190, RIGHT: 39, SHIFT: 16, SPACE: 32, TAB: 9, UP: 38
        },
        
        keyIs: function(k, e) {
            return parseInt($.keyCode[k.toUpperCase()], 10) == parseInt((typeof(e) == 'number' )? e: e.keyCode, 10);
        },

        // Redirect to a specified url
        redirect: function(url) {
            window.location.href = url;
            return url;
        },

        // Stop event shorthand
        stop: function(e, preventDefault, stopPropagation) {
            if (preventDefault)  { e.preventDefault(); }
            if (stopPropagation) { e.stopPropagation(); }
            return preventDefault && false || true;
        },

        // Returns the basename of a path
        basename: function(path) {
            var t = path.split('/');
            return t[t.length] === '' && s || t.slice(0, t.length).join('/');
        },

        // Returns the filename of a path
        filename: function(path) {
            return path.split('/').pop();
        }, 

        // Returns a formated file size
        filesizeformat: function(bytes, suffixes){
            var b = parseInt(bytes, 10);
            var s = suffixes || ['byte', 'bytes', 'KB', 'MB', 'GB'];
            if (isNaN(b) || b === 0) { return '0 ' + s[0]; }
            if (b == 1)              { return '1 ' + s[0]; }
            if (b < 1024)            { return  b.toFixed(2) + ' ' + s[1]; }
            if (b < 1048576)         { return (b / 1024).toFixed(2) + ' ' + s[2]; }
            if (b < 1073741824)      { return (b / 1048576).toFixed(2) + ' '+ s[3]; }
            else                     { return (b / 1073741824).toFixed(2) + ' '+ s[4]; }
        },

        fileExtension: function(s) {
            var tokens = s.split('.');
            return tokens[tokens.length-1] || false;
        },
        
        // Returns true if an object is a String
        isString: function(o) {
            return typeof(o) == 'string' && true || false;
        },
        
        // Returns true if an object is a RegExp
		isRegExp: function(o) {
			return o && o.constructor.toString().indexOf('RegExp()') != -1 || false;
		},
        
        // Returns true if an object is an array
        // Mark Miller - http://blog.360.yahoo.com/blog-TBPekxc1dLNy5DOloPfzVvFIVOWMB0li?p=916
		isArray: function(o) {
            if (!o) { return false; }
            return Object.prototype.toString.apply(o.constructor.prototype) === '[object Array]';
		},

        isObject: function(o) {
            return (typeof(o) == 'object');
        },
        
        // Convert input to currency (two decimal fixed number)
		toCurrency: function(i) {
			i = parseFloat(i, 10).toFixed(2);
			return (i=='NaN') ? '0.00' : i;
		},

        /*-------------------------------------------------------------------- 
         * javascript method: "pxToEm"
         * by:
           Scott Jehl (scott@filamentgroup.com) 
           Maggie Wachs (maggie@filamentgroup.com)
           http://www.filamentgroup.com
         *
         * Copyright (c) 2008 Filament Group
         * Dual licensed under the MIT (filamentgroup.com/examples/mit-license.txt) and GPL (filamentgroup.com/examples/gpl-license.txt) licenses.
         *
         * Description: pxToEm converts a pixel value to ems depending on inherited font size.  
         * Article: http://www.filamentgroup.com/lab/retaining_scalable_interfaces_with_pixel_to_em_conversion/
         * Demo: http://www.filamentgroup.com/examples/pxToEm/	 	
         *							
         * Options:  	 								
                scope: string or jQuery selector for font-size scoping
                reverse: Boolean, true reverses the conversion to em-px
         * Dependencies: jQuery library						  
         * Usage Example: myPixelValue.pxToEm(); or myPixelValue.pxToEm({'scope':'#navigation', reverse: true});
         *
         * Version: 2.1, 18.12.2008
         * Changelog:
         *		08.02.2007 initial Version 1.0
         *		08.01.2008 - fixed font-size calculation for IE
         *		18.12.2008 - removed native object prototyping to stay in jQuery's spirit, jsLinted (Maxime Haineault <haineault@gmail.com>)
        --------------------------------------------------------------------*/

        pxToEm: function(i, settings){
            //set defaults
            settings = jQuery.extend({
                scope: 'body',
                reverse: false
            }, settings);
            
            var pxVal = (i === '') ? 0 : parseFloat(i);
            var scopeVal;
            var getWindowWidth = function(){
                var de = document.documentElement;
                return self.innerWidth || (de && de.clientWidth) || document.body.clientWidth;
            };	
            
            /* When a percentage-based font-size is set on the body, IE returns that percent of the window width as the font-size. 
                For example, if the body font-size is 62.5% and the window width is 1000px, IE will return 625px as the font-size. 	
                When this happens, we calculate the correct body font-size (%) and multiply it by 16 (the standard browser font size) 
                to get an accurate em value. */
                        
            if (settings.scope == 'body' && $.browser.msie && (parseFloat($('body').css('font-size')) / getWindowWidth()).toFixed(1) > 0.0) {
                var calcFontSize = function(){		
                    return (parseFloat($('body').css('font-size'))/getWindowWidth()).toFixed(3) * 16;
                };
                scopeVal = calcFontSize();
            }
            else { scopeVal = parseFloat(jQuery(settings.scope).css("font-size")); }
                    
            var result = (settings.reverse === true) ? (pxVal * scopeVal).toFixed(2) + 'px' : (pxVal / scopeVal).toFixed(2) + 'em';
            return result;
        }
	});

	$.extend($.fn, { 
        // Select a text range in a textarea
        selectRange: function(start, end){
            // use only the first one since only one input can be focused
            if ($(this).get(0).createTextRange) {
                var range = $(this).get(0).createTextRange();
                range.collapse(true);
                range.moveEnd('character',   end);
                range.moveStart('character', start);
                range.select();
            }
            else if ($(this).get(0).setSelectionRange) {
                $(this).bind('focus', function(e){
                    e.preventDefault();
                }).get(0).setSelectionRange(start, end);
            }
            return $(this);
        },

        /*-------------------------------------------------------------------- 
         * JQuery Plugin: "EqualHeights"
         * by:	Scott Jehl, Todd Parker, Maggie Costello Wachs (http://www.filamentgroup.com)
         *
         * Copyright (c) 2008 Filament Group
         * Licensed under GPL (http://www.opensource.org/licenses/gpl-license.php)
         *
         * Description: Compares the heights or widths of the top-level children of a provided element 
                and sets their min-height to the tallest height (or width to widest width). Sets in em units 
                by default if pxToEm() method is available.
         * Dependencies: jQuery library, pxToEm method	(article: 
                http://www.filamentgroup.com/lab/retaining_scalable_interfaces_with_pixel_to_em_conversion/)							  
         * Usage Example: $(element).equalHeights();
                Optional: to set min-height in px, pass a true argument: $(element).equalHeights(true);
         * Version: 2.1, 18.12.2008
         *
         * Note: Changed pxToEm call to call $.pxToEm instead, jsLinted (Maxime Haineault <haineault@gmail.com>)
        --------------------------------------------------------------------*/

        equalHeights: function(px){
            $(this).each(function(){
                var currentTallest = 0;
                $(this).children().each(function(i){
                    if ($(this).height() > currentTallest) { currentTallest = $(this).height(); }
                });
                if (!px || !$.pxToEm) { currentTallest = $.pxToEm(currentTallest); } //use ems unless px is specified
                // for ie6, set height since min-height isn't supported
                if ($.browser.msie && $.browser.version == 6.0) { $(this).children().css({'height': currentTallest}); }
                $(this).children().css({'min-height': currentTallest}); 
            });
            return this;
        },

        // Copyright (c) 2009 James Padolsey
        // http://james.padolsey.com/javascript/jquery-delay-plugin/
        delay: function(time, callback){
            jQuery.fx.step.delay = function(){};
            return this.animate({delay:1}, time, callback);
        }        
	});
})(jQuery);


/*********** jquery.nyroModal-1.5.5.js *************/
/*
 * nyroModal - jQuery Plugin
 * http://nyromodal.nyrodev.com
 *
 * Copyright (c) 2008 Cedric Nirousset (nyrodev.com)
 * Licensed under the MIT license
 *
 * $Date: 2009-08-14 (Fri, 14 Aug 2009) $
 * $version: 1.5.5
 */
jQuery(function($) {

	// -------------------------------------------------------
	// Private Variables
	// -------------------------------------------------------

	var userAgent = navigator.userAgent.toLowerCase();
	var browserVersion = (userAgent.match(/.+(?:rv|webkit|khtml|opera|msie)[\/: ]([\d.]+)/ ) || [0,'0'])[1];

	var isIE6 = (/msie/.test(userAgent) && !/opera/.test(userAgent) && parseInt(browserVersion) < 7 && (!window.XMLHttpRequest || typeof(XMLHttpRequest) === 'function'));
	var body = $('body');

	var currentSettings;
	var callingSettings;

	var shouldResize = false;

	var gallery = {};

	// To know if the fix for the Issue 10 should be applied (or has been applied)
	var fixFF = false;

	// Used for retrieve the content from an hidden div
	var contentElt;
	var contentEltLast;

	// Contains info about nyroModal state and all div references
	var modal = {
		started: false,
		ready: false,
		dataReady: false,
		anim: false,
		animContent: false,
		loadingShown: false,
		transition: false,
		resizing: false,
		closing: false,
		error: false,
		blocker: null,
		blockerVars: null,
		full: null,
		bg: null,
		loading: null,
		tmp: null,
		content: null,
		wrapper: null,
		contentWrapper: null,
		scripts: new Array(),
		scriptsShown: new Array()
	};

	// Indicate of the height or the width was resized, to reinit the currentsettings related to null
	var resized = {
		width: false,
		height: false,
		windowResizing: false
	};

	var initSettingsSize = {
		width: null,
		height: null,
		windowResizing: true
	};

	var windowResizeTimeout;


	// -------------------------------------------------------
	// Public function
	// -------------------------------------------------------

	// jQuery extension function. A paramater object could be used to overwrite the default settings
	$.fn.nyroModal = function(settings) {
		if (!this)
			return false;
		return this.each(function() {
			var me = $(this);
			if (this.nodeName.toLowerCase() == 'form') {
				me
				.unbind('submit.nyroModal')
				.bind('submit.nyroModal', function(e) {
					if(e.isDefaultPrevented())
						return false;
					if (me.data('nyroModalprocessing'))
						return true;
					if (this.enctype == 'multipart/form-data') {
						processModal($.extend(settings, {
							from: this
						}));
						return true;
					}
					e.preventDefault();
					processModal($.extend(settings, {
						from: this
					}));
					return false;
				});
			} else {
				me
				.unbind('click.nyroModal')
				.bind('click.nyroModal', function(e) {
					if(e.isDefaultPrevented())
						return false;
					e.preventDefault();
					processModal($.extend(settings, {
						from: this
					}));
					return false;
				});
			}
		});
	};

	// jQuery extension function to call manually the modal. A paramater object could be used to overwrite the default settings
	$.fn.nyroModalManual = function(settings) {
		if (!this.length)
			processModal(settings);
		return this.each(function(){
			processModal($.extend(settings, {
				from: this
			}));
		});
	};

	$.nyroModalManual = function(settings) {
		processModal(settings);
	};

	// Update the current settings
	// object settings
	// string deep1 first key where overwrite the settings
	// string deep2 second key where overwrite the settings
	$.nyroModalSettings = function(settings, deep1, deep2) {
		setCurrentSettings(settings, deep1, deep2);
		if (!deep1 && modal.started) {
			if (modal.bg && settings.bgColor)
				currentSettings.updateBgColor(modal, currentSettings, function(){});

			if (modal.contentWrapper && settings.title)
				setTitle();

			if (!modal.error && (settings.windowResizing || (!modal.resizing && (('width' in settings && settings.width == currentSettings.width) || ('height' in settings && settings.height == currentSettings.height))))) {
				modal.resizing = true;
				if (modal.contentWrapper)
					calculateSize(true);
				if (modal.contentWrapper && modal.contentWrapper.is(':visible') && !modal.animContent) {
					if (fixFF)
						modal.content.css({position: ''});
					currentSettings.resize(modal, currentSettings, function() {
						currentSettings.windowResizing = false;
						modal.resizing = false;
						if (fixFF)
							modal.content.css({position: 'fixed'});
						if ($.isFunction(currentSettings.endResize))
							currentSettings.endResize(modal, currentSettings);
					});
				}
			}
		}
	};

	// Remove the modal function
	$.nyroModalRemove = function() {
		removeModal();
	};

	// Go to the next image for a gallery
	// return false if nothing was done
	$.nyroModalNext = function() {
		var link = getGalleryLink(1);
		if (link)
			return link.nyroModalManual(getCurrentSettingsNew());
		return false;
	};

	// Go to the previous image for a gallery
	// return false if nothing was done
	$.nyroModalPrev = function() {
		var link = getGalleryLink(-1);
		if (link)
			return link.nyroModalManual(getCurrentSettingsNew());
		return false;
	};


	// -------------------------------------------------------
	// Default Settings
	// -------------------------------------------------------

	$.fn.nyroModal.settings = {
		debug: false, // Show the debug in the background

		blocker: false, // Element which will be blocked by the modal
		
		windowResize: true, // indicates if the modal should resize when the window is resized

		modal: false, // Esc key or click backgrdound enabling or not

		type: '', // nyroModal type (form, formData, iframe, image, etc...)
		forceType: null, // Used to force the type
		from: '', // Dom object where the call come from
		hash: '', // Eventual hash in the url

		processHandler: null, // Handler just before the real process

		selIndicator: 'nyroModalSel', // Value added when a form or Ajax is sent with a filter content

		formIndicator: 'nyroModal', // Value added when a form is sent

		content: null, // Raw content if type content is used

		bgColor: '#000000', // Background color

		ajax: {}, // Ajax option (url, data, type, success will be overwritten for a form, url and success only for an ajax call)

		swf: { // Swf player options if swf type is used.
			wmode: 'transparent'
		},

		width: null, // default Width If null, will be calculate automatically
		height: null, // default Height If null, will be calculate automatically

		minWidth: 400, // Minimum width
		minHeight: 300, // Minimum height

		resizable: true, // Indicate if the content is resizable. Will be set to false for swf
		autoSizable: true, // Indicate if the content is auto sizable. If not, the min size will be used

		padding: 25, // padding for the max modal size

		regexImg: '[^\.]\.(jpg|jpeg|png|tiff|gif|bmp)\s*$', // Regex to find images
		addImageDivTitle: false, // Indicate if the div title should be inserted
		defaultImgAlt: 'Image', // Default alt attribute for the images
		setWidthImgTitle: true, // Set the width to the image title
		ltr: true, // Left to Right by default. Put to false for Hebrew or Right to Left language

		gallery: null, // Gallery name if provided
		galleryLinks: '<a href="#" class="nyroModalPrev">Prev</a><a href="#"  class="nyroModalNext">Next</a>', // Use .nyroModalPrev and .nyroModalNext to set the navigation link
		galleryCounts: galleryCounts, // Callback to show the gallery count
		galleryLoop: false, // Indicate if the gallery should loop

		zIndexStart: 100,

		css: { // Default CSS option for the nyroModal Div. Some will be overwritten or updated when using IE6
			bg: {
				position: 'absolute',
				overflow: 'hidden',
				top: 0,
				left: 0,
				height: '100%',
				width: '100%'
			},
			wrapper: {
				position: 'absolute',
				top: '50%',
				left: '50%'
			},
			wrapper2: {
			},
			content: {
			},
			loading: {
				position: 'absolute',
				top: '50%',
				left: '50%',
				marginTop: '-50px',
				marginLeft: '-50px'
			}
		},

		wrap: { // Wrapper div used to style the modal regarding the content type
			div: '<div class="wrapper"></div>',
			ajax: '<div class="wrapper"></div>',
			form: '<div class="wrapper"></div>',
			formData: '<div class="wrapper"></div>',
			image: '<div class="wrapperImg"></div>',
			swf: '<div class="wrapperSwf"></div>',
			iframe: '<div class="wrapperIframe"></div>',
			iframeForm: '<div class="wrapperIframe"></div>',
			manual: '<div class="wrapper"></div>'
		},

		closeButton: '<a href="#" class="nyroModalClose" id="closeBut" title="close">Close</a>', // Adding automaticly as the first child of #nyroModalWrapper

		title: null, // Modal title
		titleFromIframe: true, // When using iframe in the same domain, try to get the title from it

		openSelector: '.nyroModal', // selector for open a new modal. will be used to parse automaticly at page loading
		closeSelector: '.nyroModalClose', // selector to close the modal

		contentLoading: '<a href="#" class="nyroModalClose">Cancel</a>', // Loading div content

		errorClass: 'error', // CSS Error class added to the loading div in case of error
		contentError: 'The requested content cannot be loaded.<br />Please try again later.<br /><a href="#" class="nyroModalClose">Close</a>', // Content placed in the loading div in case of error

		handleError: null, // Callback in case of error

		showBackground: showBackground, // Show background animation function
		hideBackground: hideBackground, // Hide background animation function

		endFillContent: null, // Will be called after filling and wraping the content, before parsing closeSelector and openSelector and showing the content
		showContent: showContent, // Show content animation function
		endShowContent: null, // Will be called once the content is shown
		beforeHideContent: null, // Will be called just before the modal closing
		hideContent: hideContent, // Hide content animation function

		showTransition: showTransition, // Show the transition animation (a modal is already shown and a new one is requested)
		hideTransition: hideTransition, // Hide the transition animation to show the content

		showLoading: showLoading, // show loading animation function
		hideLoading: hideLoading, // hide loading animation function

		resize: resize, // Resize animation function
		endResize: null, // Will be called one the content is resized

		updateBgColor: updateBgColor, // Change background color animation function

		endRemove: null // Will be called once the modal is totally gone
	};

	// -------------------------------------------------------
	// Private function
	// -------------------------------------------------------

	// Main function
	function processModal(settings) {
		if (modal.loadingShown || modal.transition || modal.anim)
			return;
		debug('processModal');
		modal.started = true;
		callingSettings = $.extend(true, settings);
		setDefaultCurrentSettings(settings);
		if (!modal.full)
			modal.blockerVars = modal.blocker = null;
		modal.error = false;
		modal.closing = false;
		modal.dataReady = false;
		modal.scripts = new Array();
		modal.scriptsShown = new Array();

		currentSettings.type = fileType();
		if (currentSettings.forceType) {
			if (!currentSettings.content)
				currentSettings.from = true;
			currentSettings.type = currentSettings.forceType;
			currentSettings.forceType = null;
		}

		if ($.isFunction(currentSettings.processHandler))
			currentSettings.processHandler(currentSettings);

		var from = currentSettings.from;
		var url = currentSettings.url;

		initSettingsSize.width = currentSettings.width;
		initSettingsSize.height = currentSettings.height;

		if (currentSettings.type == 'swf') {
			// Swf is transforming as a raw content
			setCurrentSettings({overflow: 'visible'}, 'css', 'content');
			currentSettings.content = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+currentSettings.width+'" height="'+currentSettings.height+'"><param name="movie" value="'+url+'"></param>';
			var tmp = '';
			$.each(currentSettings.swf, function(name, val) {
				currentSettings.content+= '<param name="'+name+'" value="'+val+'"></param>';
				tmp+= ' '+name+'="'+val+'"';
			});
			currentSettings.content+= '<embed src="'+url+'" type="application/x-shockwave-flash" width="'+currentSettings.width+'" height="'+currentSettings.height+'"'+tmp+'></embed></object>';
		}

		if (from) {
			var jFrom = $(from).blur();
			if (currentSettings.type == 'form') {
				var data = $(from).serializeArray();
				data.push({name: currentSettings.formIndicator, value: 1});
				if (currentSettings.selector)
					data.push({name: currentSettings.selIndicator, value: currentSettings.selector.substring(1)});
				$.ajax($.extend({}, currentSettings.ajax, {
						url: url,
						data: data,
						type: jFrom.attr('method') ? jFrom.attr('method') : 'get',
						success: ajaxLoaded,
						error: loadingError
					}));
				debug('Form Ajax Load: '+jFrom.attr('action'));
				showModal();
			} else if (currentSettings.type == 'formData') {
				// Form with data. We're using a hidden iframe
				initModal();
				jFrom.attr('target', 'nyroModalIframe');
				jFrom.attr('action', url);
				jFrom.prepend('<input type="hidden" name="'+currentSettings.formIndicator+'" value="1" />');
				if (currentSettings.selector)
					jFrom.prepend('<input type="hidden" name="'+currentSettings.selIndicator+'" value="'+currentSettings.selector.substring(1)+'" />');
				modal.tmp.html('<iframe frameborder="0" hspace="0" name="nyroModalIframe" src="javascript:\'\';"></iframe>');
				$('iframe', modal.tmp)
					.css({
						width: currentSettings.width,
						height: currentSettings.height
					})
					.error(loadingError)
					.load(formDataLoaded);
				debug('Form Data Load: '+jFrom.attr('action'));
				showModal();
				showContentOrLoading();
			} else if (currentSettings.type == 'image') {
				debug('Image Load: '+url);
				var title = jFrom.attr('title') || currentSettings.defaultImgAlt;
				initModal();
				modal.tmp.html('<img id="nyroModalImg" />').find('img').attr('alt', title);
				modal.tmp.css({lineHeight: 0});
				$('img', modal.tmp)
					.error(loadingError)
					.load(function() {
						debug('Image Loaded: '+this.src);
						$(this).unbind('load');
						var w = modal.tmp.width();
						var h = modal.tmp.height();
						modal.tmp.css({lineHeight: ''});
						resized.width = w;
						resized.height = h;
						setCurrentSettings({
							width: w,
							height: h,
							imgWidth: w,
							imgHeight: h
						});
						initSettingsSize.width = w;
						initSettingsSize.height = h;
						setCurrentSettings({overflow: 'visible'}, 'css', 'content');
						modal.dataReady = true;
						if (modal.loadingShown || modal.transition)
							showContentOrLoading();
					})
					.attr('src', url);
				showModal();
			} else if (currentSettings.type == 'iframeForm') {
				initModal();
				modal.tmp.html('<iframe frameborder="0" hspace="0" src="javascript:\'\';" name="nyroModalIframe" id="nyroModalIframe"></iframe>');
				debug('Iframe Form Load: '+url);
				$('iframe', modal.tmp).eq(0)
					.css({
						width: '100%',
						height: $.support.boxModel? '99%' : '100%'
					})
					.load(iframeLoaded);
				modal.dataReady = true;
				showModal();
			} else if (currentSettings.type == 'iframe') {
				initModal();
				modal.tmp.html('<iframe frameborder="0" hspace="0" src="javascript:\'\';" name="nyroModalIframe" id="nyroModalIframe"></iframe>');
				debug('Iframe Load: '+url);
				$('iframe', modal.tmp).eq(0)
					.css({
						width: '100%',
						height: $.support.boxModel? '99%' : '100%'
					})
					.load(iframeLoaded);
				modal.dataReady = true;
				showModal();
			} else if (currentSettings.type) {
				// Could be every other kind of type or a dom selector
				debug('Content: '+currentSettings.type);
				initModal();
				modal.tmp.html(currentSettings.content);
				var w = modal.tmp.width();
				var h = modal.tmp.height();
				var div = $(currentSettings.type);
				if (div.length) {
					setCurrentSettings({type: 'div'});
					w = div.width();
					h = div.height();
					if (contentElt)
						contentEltLast = contentElt;
					contentElt = div;
					modal.tmp.append(div.contents());
				}
				initSettingsSize.width = w;
				initSettingsSize.height = h;
				setCurrentSettings({
					width: w,
					height: h
				});
				if (modal.tmp.html())
					modal.dataReady = true;
				else
					loadingError();
				if (!modal.ready)
					showModal();
				else
					endHideContent();
			} else {
				debug('Ajax Load: '+url);
				setCurrentSettings({type: 'ajax'});
				var data = currentSettings.ajax.data || {};
				if (currentSettings.selector) {
					if (typeof data == "string") {
						data+= '&'+currentSettings.selIndicator+'='+currentSettings.selector.substring(1);
					} else {
						data[currentSettings.selIndicator] = currentSettings.selector.substring(1);
					}
				}
				$.ajax($.extend(true, currentSettings.ajax, {
					url: url,
					success: ajaxLoaded,
					error: loadingError,
					data: data
				}));
				showModal();
			}
		} else if (currentSettings.content) {
			// Raw content not from a DOM element
			debug('Content: '+currentSettings.type);
			setCurrentSettings({type: 'manual'});
			initModal();
			modal.tmp.html($('<div/>').html(currentSettings.content).contents());
			if (modal.tmp.html())
				modal.dataReady = true;
			else
				loadingError();
			showModal();
		} else {
			// What should we show here? nothing happen
		}
	}

	// Update the current settings
	// object settings
	// string deep1 first key where overwrite the settings
	// string deep2 second key where overwrite the settings
	function setDefaultCurrentSettings(settings) {
		debug('setDefaultCurrentSettings');
		currentSettings = $.extend(true, {}, $.fn.nyroModal.settings, settings);
		setMargin();
	}

	function setCurrentSettings(settings, deep1, deep2) {
		if (modal.started) {
			if (deep1 && deep2) {
				$.extend(true, currentSettings[deep1][deep2], settings);
			} else if (deep1) {
				$.extend(true, currentSettings[deep1], settings);
			} else {
				if (modal.animContent) {
					if ('width' in settings) {
						if (!modal.resizing) {
							settings.setWidth = settings.width;
							shouldResize = true;
						}
						delete settings['width'];
					}
					if ('height' in settings) {
						if (!modal.resizing) {
							settings.setHeight = settings.height;
							shouldResize = true;
						}
						delete settings['height'];
					}
				}
				$.extend(true, currentSettings, settings);
			}
		} else {
			if (deep1 && deep2) {
				$.extend(true, $.fn.nyroModal.settings[deep1][deep2], settings);
			} else if (deep1) {
				$.extend(true, $.fn.nyroModal.settings[deep1], settings);
			} else {
				$.extend(true, $.fn.nyroModal.settings, settings);
			}
		}
	}

	// Set the margin for postionning the element. Useful for IE6
	function setMarginScroll() {
		if (isIE6 && !modal.blocker) {
			if (document.documentElement) {
				currentSettings.marginScrollLeft = document.documentElement.scrollLeft;
				currentSettings.marginScrollTop = document.documentElement.scrollTop;
			} else {
				currentSettings.marginScrollLeft = document.body.scrollLeft;
				currentSettings.marginScrollTop = document.body.scrollTop;
			}
		} else {
			currentSettings.marginScrollLeft = 0;
			currentSettings.marginScrollTop = 0;
		}
	}

	// Set the margin for the content
	function setMargin() {
		setMarginScroll();
		currentSettings.marginLeft = -(currentSettings.width+currentSettings.borderW)/2;
		currentSettings.marginTop = -(currentSettings.height+currentSettings.borderH)/2;
		if (!modal.blocker) {
			currentSettings.marginLeft+= currentSettings.marginScrollLeft;
			currentSettings.marginTop+= currentSettings.marginScrollTop;
		}
	}

	// Set the margin for the current loading
	function setMarginLoading() {
		setMarginScroll();
		var outer = getOuter(modal.loading);
		currentSettings.marginTopLoading = -(modal.loading.height() + outer.h.border + outer.h.padding)/2;
		currentSettings.marginLeftLoading = -(modal.loading.width() + outer.w.border + outer.w.padding)/2;
		if (!modal.blocker) {
			currentSettings.marginLefttLoading+= currentSettings.marginScrollLeft;
			currentSettings.marginTopLoading+= currentSettings.marginScrollTop;
		}
	}

	// Set the modal Title
	function setTitle() {
		var title = $('h1#nyroModalTitle', modal.contentWrapper);
		if (title.length)
			title.text(currentSettings.title);
		else
			modal.contentWrapper.prepend('<h1 id="nyroModalTitle">'+currentSettings.title+'</h1>');
	}

	// Init the nyroModal div by settings the CSS elements and hide needed elements
	function initModal() {
		debug('initModal');
		if (!modal.full) {
			if (currentSettings.debug)
				setCurrentSettings({color: 'white'}, 'css', 'bg');

			var full = {
				zIndex: currentSettings.zIndexStart,
				position: 'fixed',
				top: 0,
				left: 0,
				width: '100%',
				height: '100%'
			};

			var contain = body;
			var iframeHideIE = '';
			if (currentSettings.blocker) {
				modal.blocker = contain = $(currentSettings.blocker);
				var pos = modal.blocker.offset();
				var w = modal.blocker.outerWidth();
				var h = modal.blocker.outerHeight();
				if (isIE6) {
					setCurrentSettings({
						height: '100%',
						width: '100%',
						top: 0,
						left: 0
					}, 'css', 'bg');
				}
				modal.blockerVars = {
					top: pos.top,
					left: pos.left,
					width: w,
					height: h
				};
				var plusTop = (/msie/.test(userAgent) ?0:getCurCSS(body.get(0), 'borderTopWidth'));
				var plusLeft = (/msie/.test(userAgent) ?0:getCurCSS(body.get(0), 'borderLeftWidth'));
				full = {
					position: 'absolute',
					top: pos.top + plusTop,
					left: pos.left + plusLeft,
					width: w,
					height: h
				};
			} else if (isIE6) {
				body.css({
					height: (body.height()+200)+'px', //130%
					width: (body.width()+200)+'px', //130%
					position: 'static',
					overflow: 'hidden'
				});
				$('html').css({overflow: 'hidden'});
				setCurrentSettings({
					css: {
						bg: {
							position: 'absolute',
							zIndex: currentSettings.zIndexStart+1,
							height: '110%',
							width: '110%',
							top: currentSettings.marginScrollTop+'px',
							left: currentSettings.marginScrollLeft+'px'
						},
						wrapper: { zIndex: currentSettings.zIndexStart+2 },
						loading: { zIndex: currentSettings.zIndexStart+3 }
					}
				});

				iframeHideIE = $('<iframe id="nyroModalIframeHideIe" src="javascript:\'\';"></iframe>')
								.css($.extend({},
									currentSettings.css.bg, {
										opacity: 0,
										zIndex: 50,
										border: 'none'
									}));
			}

			contain.append($('<div id="nyroModalFull"><div id="nyroModalBg"></div><div id="nyroModalWrapper"><div id="nyroModalContent"></div></div><div id="nyrModalTmp"></div><div id="nyroModalLoading"></div></div>').hide());

			modal.full = $('#nyroModalFull')
				.css(full)
				.show();
			modal.bg = $('#nyroModalBg')
				.css($.extend({
						backgroundColor: currentSettings.bgColor
					}, currentSettings.css.bg))
				.before(iframeHideIE);
			modal.bg.bind('click.nyroModal', clickBg);
			modal.loading = $('#nyroModalLoading')
				.css(currentSettings.css.loading)
				.hide();
			modal.contentWrapper = $('#nyroModalWrapper')
				.css(currentSettings.css.wrapper)
				.hide();
			modal.content = $('#nyroModalContent');
			modal.tmp = $('#nyrModalTmp').hide();

			// To stop the mousewheel if the the plugin is available
			if ($.isFunction($.fn.mousewheel)) {
				modal.content.mousewheel(function(e, d) {
					var elt = modal.content.get(0);
					if ((d > 0 && elt.scrollTop == 0) ||
							(d < 0 && elt.scrollHeight - elt.scrollTop == elt.clientHeight)) {
						e.preventDefault();
						e.stopPropagation();
					}
				});
			}

			$(document).bind('keydown.nyroModal', keyHandler);
			modal.content.css({width: 'auto', height: 'auto'});
			modal.contentWrapper.css({width: 'auto', height: 'auto'});

			if (!currentSettings.blocker && currentSettings.windowResize) {
				$(window).bind('resize.nyroModal', function() {
					window.clearTimeout(windowResizeTimeout);
					windowResizeTimeout = window.setTimeout(windowResizeHandler, 200);
				});
			}
		}
	}

	function windowResizeHandler() {
		$.nyroModalSettings(initSettingsSize);
	}

	// Show the modal (ie: the background and then the loading if needed or the content directly)
	function showModal() {
		debug('showModal');
		if (!modal.ready) {
			initModal();
			modal.anim = true;
			currentSettings.showBackground(modal, currentSettings, endBackground);
		} else {
			modal.anim = true;
			modal.transition = true;
			currentSettings.showTransition(modal, currentSettings, function(){endHideContent();modal.anim=false;showContentOrLoading();});
		}
	}

	// Called when user click on background
	function clickBg(e) {
		if (!currentSettings.modal)
			removeModal();
	}
	
	// Used for the escape key or the arrow in the gallery type
	function keyHandler(e) {
		if (e.keyCode == 27) {
			if (!currentSettings.modal)
				removeModal();
		} else if (currentSettings.gallery && modal.ready && modal.dataReady && !modal.anim && !modal.transition) {
			if (e.keyCode == 39 || e.keyCode == 40) {
				e.preventDefault();
				$.nyroModalNext();
				return false;
			} else if (e.keyCode == 37 || e.keyCode == 38) {
				e.preventDefault();
				$.nyroModalPrev();
				return false;
			}
		}
	}

	// Determine the filetype regarding the link DOM element
	function fileType() {
		var from = currentSettings.from;

		var url;

		if (from && from.nodeName) {
			var jFrom = $(from);

			url = jFrom.attr(from.nodeName.toLowerCase() == 'form' ? 'action' : 'href');
			if (!url)
				url = location.href.substring(window.location.host.length+7);
			currentSettings.url = url;

			if (jFrom.attr('rev') == 'modal')
				currentSettings.modal = true;

			currentSettings.title = jFrom.attr('title');

			if (from && from.rel && from.rel.toLowerCase() != 'nofollow') {
				var indexSpace = from.rel.indexOf(' ');
				currentSettings.gallery = indexSpace > 0 ? from.rel.substr(0, indexSpace) : from.rel;
			}

			var imgType = imageType(url, from);
			if (imgType)
				return imgType;

			if (isSwf(url))
				return 'swf';

			var iframe = false;
			if (from.target && from.target.toLowerCase() == '_blank' || (from.hostname && from.hostname.replace(/:\d*$/,'') != window.location.hostname.replace(/:\d*$/,''))) {
				iframe = true;
			}
			if (from.nodeName.toLowerCase() == 'form') {
				if (iframe)
					return 'iframeForm';
				setCurrentSettings(extractUrlSel(url));
				if (jFrom.attr('enctype') == 'multipart/form-data')
					return 'formData';
				return 'form';
			}
			if (iframe)
				return 'iframe';
		} else {
			url = currentSettings.url;
			if (!currentSettings.content)
				currentSettings.from = true;

			if (!url)
				return null;

			if (isSwf(url))
				return 'swf';

			var reg1 = new RegExp("^http://|https://", "g");
			if (url.match(reg1))
				return 'iframe';
		}

		var imgType = imageType(url, from);
		if (imgType)
			return imgType;

		var tmp = extractUrlSel(url);
		setCurrentSettings(tmp);

		if (!tmp.url)
			return tmp.selector;
	}

	function imageType(url, from) {
		var image = new RegExp(currentSettings.regexImg, 'i');
		if (image.test(url)) {
			return 'image';
		}
	}

	function isSwf(url) {
		var swf = new RegExp('[^\.]\.(swf)\s*$', 'i');
		return swf.test(url);
	}

	function extractUrlSel(url) {
		var ret = {
			url: null,
			selector: null
		};

		if (url) {
			var hash = getHash(url);
			var hashLoc = getHash(window.location.href);
			var curLoc = window.location.href.substring(0, window.location.href.length - hashLoc.length);
			var req = url.substring(0, url.length - hash.length);

			if (req == curLoc || req == $('base').attr('href')) {
				ret.selector = hash;
			} else {
				ret.url = req;
				ret.selector = hash;
			}
		}
		return ret;
	}

	// Called when the content cannot be loaded or tiemout reached
	function loadingError() {
		debug('loadingError');

		modal.error = true;

		if (!modal.ready)
			return;

		if ($.isFunction(currentSettings.handleError))
			currentSettings.handleError(modal, currentSettings);

		modal.loading
			.addClass(currentSettings.errorClass)
			.html(currentSettings.contentError);
		$(currentSettings.closeSelector, modal.loading)
			.unbind('click.nyroModal')
			.bind('click.nyroModal', removeModal);
		setMarginLoading();
		modal.loading
			.css({
				marginTop: currentSettings.marginTopLoading+'px',
				marginLeft: currentSettings.marginLeftLoading+'px'
			});
	}

	// Put the content from modal.tmp to modal.content
	function fillContent() {
		debug('fillContent');
		if (!modal.tmp.html())
			return;

		modal.content.html(modal.tmp.contents());
		modal.tmp.empty();
		wrapContent();

		if (currentSettings.type == 'iframeForm') {
			$(currentSettings.from)
				.attr('target', 'nyroModalIframe')
				.data('nyroModalprocessing', 1)
				.submit()
				.attr('target', '_blank')
				.removeData('nyroModalprocessing');
		}

		if (!currentSettings.modal)
			modal.wrapper.prepend(currentSettings.closeButton);

		if ($.isFunction(currentSettings.endFillContent))
			currentSettings.endFillContent(modal, currentSettings);

		modal.content.append(modal.scripts);

		$(currentSettings.closeSelector, modal.contentWrapper)
			.unbind('click.nyroModal')
			.bind('click.nyroModal', removeModal);
		$(currentSettings.openSelector, modal.contentWrapper).nyroModal(getCurrentSettingsNew());
	}

	// Get the current settings to be used in new links
	function getCurrentSettingsNew() {
		return callingSettings;
		var currentSettingsNew = $.extend(true, {}, currentSettings);
		if (resized.width)
			currentSettingsNew.width = null;
		else
			currentSettingsNew.width = initSettingsSize.width;
		if (resized.height)
			currentSettingsNew.height = null;
		else
			currentSettingsNew.height = initSettingsSize.height;
		currentSettingsNew.css.content.overflow = 'auto';
		return currentSettingsNew;
	}

	// Wrap the content and update the modal size if needed
	function wrapContent() {
		debug('wrapContent');

		var wrap = $(currentSettings.wrap[currentSettings.type]);
		modal.content.append(wrap.children().remove());
		modal.contentWrapper.wrapInner(wrap);

		if (currentSettings.gallery) {
			// Set the action for the next and prev button (or remove them)
			modal.content.append(currentSettings.galleryLinks);

			gallery.links = $('[rel="'+currentSettings.gallery+'"], [rel^="'+currentSettings.gallery+' "]');
			gallery.index = gallery.links.index(currentSettings.from);

			if (currentSettings.galleryCounts && $.isFunction(currentSettings.galleryCounts))
				currentSettings.galleryCounts(gallery.index + 1, gallery.links.length, modal, currentSettings);

			var currentSettingsNew = getCurrentSettingsNew();

			var linkPrev = getGalleryLink(-1);
			if (linkPrev) {
				var prev = $('.nyroModalPrev', modal.contentWrapper)
					.attr('href', linkPrev.attr('href'))
					.click(function(e) {
						e.preventDefault();
						$.nyroModalPrev();
						return false;
					});
				if (isIE6 && currentSettings.type == 'swf') {
					prev.before($('<iframe id="nyroModalIframeHideIeGalleryPrev" src="javascript:\'\';"></iframe>').css({
											position: prev.css('position'),
											top: prev.css('top'),
											left: prev.css('left'),
											width: prev.width(),
											height: prev.height(),
											opacity: 0,
											border: 'none'
										}));
				}
			} else {
				$('.nyroModalPrev', modal.contentWrapper).remove();
			}
			var linkNext = getGalleryLink(1);
			if (linkNext) {
				var next = $('.nyroModalNext', modal.contentWrapper)
					.attr('href', linkNext.attr('href'))
					.click(function(e) {
						e.preventDefault();
						$.nyroModalNext();
						return false;
					});
				if (isIE6 && currentSettings.type == 'swf') {
					next.before($('<iframe id="nyroModalIframeHideIeGalleryNext" src="javascript:\'\';"></iframe>')
									.css($.extend({}, {
											position: next.css('position'),
											top: next.css('top'),
											left: next.css('left'),
											width: next.width(),
											height: next.height(),
											opacity: 0,
											border: 'none'
										})));
				}
			} else {
				$('.nyroModalNext', modal.contentWrapper).remove();
			}
		}

		calculateSize();
	}

	function getGalleryLink(dir) {
		if (currentSettings.gallery) {
			if (!currentSettings.ltr)
				dir *= -1;
			var index = gallery.index + dir;
			if (index >= 0 && index < gallery.links.length)
				return gallery.links.eq(index);
			else if (currentSettings.galleryLoop) {
				if (index < 0)
					return gallery.links.eq(gallery.links.length-1);
				else
					return gallery.links.eq(0);
			}
		}
		return false;
	}

	// Calculate the size for the contentWrapper
	function calculateSize(resizing) {
		debug('calculateSize');

		modal.wrapper = modal.contentWrapper.children('div:first');

		resized.width = false;
		resized.height = false;
		if (false && !currentSettings.windowResizing) {
			initSettingsSize.width = currentSettings.width;
			initSettingsSize.height = currentSettings.height;
		}

		if (currentSettings.autoSizable && (!currentSettings.width || !currentSettings.height)) {
			modal.contentWrapper
				.css({
					opacity: 0,
					width: 'auto',
					height: 'auto'
				})
				.show();
			var tmp = {
				width: 'auto',
				height: 'auto'
			};
			if (currentSettings.width) {
				tmp.width = currentSettings.width;
			} else if (currentSettings.type == 'iframe') {
				tmp.width = currentSettings.minWidth;
			}

			if (currentSettings.height) {
				tmp.height = currentSettings.height;
			} else if (currentSettings.type == 'iframe') {
				tmp.height = currentSettings.minHeight;
			}

			modal.content.css(tmp);
			if (!currentSettings.width) {
				currentSettings.width = modal.content.outerWidth(true);
				resized.width = true;
			}
			if (!currentSettings.height) {
				currentSettings.height = modal.content.outerHeight(true);
				resized.height = true;
			}
			modal.contentWrapper.css({opacity: 1});
			if (!resizing)
				modal.contentWrapper.hide();
		}

		if (currentSettings.type != 'image' && currentSettings.type != 'swf') {
			currentSettings.width = Math.max(currentSettings.width, currentSettings.minWidth);
			currentSettings.height = Math.max(currentSettings.height, currentSettings.minHeight);
		}

		var outerWrapper = getOuter(modal.contentWrapper);
		var outerWrapper2 = getOuter(modal.wrapper);
		var outerContent = getOuter(modal.content);

		var tmp = {
			content: {
				width: currentSettings.width,
				height: currentSettings.height
			},
			wrapper2: {
				width: currentSettings.width + outerContent.w.total,
				height: currentSettings.height + outerContent.h.total
			},
			wrapper: {
				width: currentSettings.width + outerContent.w.total + outerWrapper2.w.total,
				height: currentSettings.height + outerContent.h.total + outerWrapper2.h.total
			}
		};

		if (currentSettings.resizable) {
			var maxHeight = modal.blockerVars? modal.blockerVars.height : $(window).height()
								- outerWrapper.h.border
								- (tmp.wrapper.height - currentSettings.height);
			var maxWidth = modal.blockerVars? modal.blockerVars.width : $(window).width()
								- outerWrapper.w.border
								- (tmp.wrapper.width - currentSettings.width);
			maxHeight-= currentSettings.padding*2;
			maxWidth-= currentSettings.padding*2;

			if (tmp.content.height > maxHeight || tmp.content.width > maxWidth) {
				// We're gonna resize the modal as it will goes outside the view port
				if (currentSettings.type == 'image' || currentSettings.type == 'swf') {
					// An image is resized proportionnaly
					var useW = currentSettings.imgWidth?currentSettings.imgWidth : currentSettings.width;
					var useH = currentSettings.imgHeight?currentSettings.imgHeight : currentSettings.height;
					var diffW = tmp.content.width - useW;
					var diffH = tmp.content.height - useH;
						if (diffH < 0) diffH = 0;
						if (diffW < 0) diffW = 0;
					var calcH = maxHeight - diffH;
					var calcW = maxWidth - diffW;
					var ratio = Math.min(calcH/useH, calcW/useW);
					calcW = Math.floor(useW*ratio);
					calcH = Math.floor(useH*ratio);
					tmp.content.height = calcH + diffH;
					tmp.content.width = calcW + diffW;
				} else {
					// For an HTML content, we simply decrease the size
					tmp.content.height = Math.min(tmp.content.height, maxHeight);
					tmp.content.width = Math.min(tmp.content.width, maxWidth);
				}
				tmp.wrapper2 = {
						width: tmp.content.width + outerContent.w.total,
						height: tmp.content.height + outerContent.h.total
					};
				tmp.wrapper = {
						width: tmp.content.width + outerContent.w.total + outerWrapper2.w.total,
						height: tmp.content.height + outerContent.h.total + outerWrapper2.h.total
					};
			}
		}

		if (currentSettings.type == 'swf') {
			$('object, embed', modal.content)
				.attr('width', tmp.content.width)
				.attr('height', tmp.content.height);
		} else if (currentSettings.type == 'image') {
			$('img', modal.content).css({
				width: tmp.content.width,
				height: tmp.content.height
			});
		}

		modal.content.css($.extend({}, tmp.content, currentSettings.css.content));
		modal.wrapper.css($.extend({}, tmp.wrapper2, currentSettings.css.wrapper2));

		if (!resizing)
			modal.contentWrapper.css($.extend({}, tmp.wrapper, currentSettings.css.wrapper));

		if (currentSettings.type == 'image' && currentSettings.addImageDivTitle) {
			// Adding the title for the image
			$('img', modal.content).removeAttr('alt');
			var divTitle = $('div', modal.content);
			if (currentSettings.title != currentSettings.defaultImgAlt && currentSettings.title) {
				if (divTitle.length == 0) {
					divTitle = $('<div>'+currentSettings.title+'</div>');
					modal.content.append(divTitle);
				}
				if (currentSettings.setWidthImgTitle) {
					var outerDivTitle = getOuter(divTitle);
					divTitle.css({width: (tmp.content.width + outerContent.w.padding - outerDivTitle.w.total)+'px'});
				}
			} else if (divTitle.length = 0) {
				divTitle.remove();
			}
		}

		if (currentSettings.title)
			setTitle();

		tmp.wrapper.borderW = outerWrapper.w.border;
		tmp.wrapper.borderH = outerWrapper.h.border;

		setCurrentSettings(tmp.wrapper);
		setMargin();
	}

	function removeModal(e) {
		debug('removeModal');
		if (e)
			e.preventDefault();
		if (modal.full && modal.ready) {
			$(document).unbind('keydown.nyroModal');
			if (!currentSettings.blocker)
				$(window).unbind('resize.nyroModal');
			modal.ready = false;
			modal.anim = true;
			modal.closing = true;
			if (modal.loadingShown || modal.transition) {
				currentSettings.hideLoading(modal, currentSettings, function() {
						modal.loading.hide();
						modal.loadingShown = false;
						modal.transition = false;
						currentSettings.hideBackground(modal, currentSettings, endRemove);
					});
			} else {
				if (fixFF)
					modal.content.css({position: ''}); // Fix Issue #10, remove the attribute
				modal.wrapper.css({overflow: 'hidden'}); // Used to fix a visual issue when hiding
				modal.content.css({overflow: 'hidden'}); // Used to fix a visual issue when hiding
				$('iframe', modal.content).hide(); // Fix issue 359
				if ($.isFunction(currentSettings.beforeHideContent)) {
					currentSettings.beforeHideContent(modal, currentSettings, function() {
						currentSettings.hideContent(modal, currentSettings, function() {
							endHideContent();
							currentSettings.hideBackground(modal, currentSettings, endRemove);
						});
					});
				} else {
					currentSettings.hideContent(modal, currentSettings, function() {
							endHideContent();
							currentSettings.hideBackground(modal, currentSettings, endRemove);
						});
				}
			}
		}
		if (e)
			return false;
	}

	function showContentOrLoading() {
		debug('showContentOrLoading');
		if (modal.ready && !modal.anim) {
			if (modal.dataReady) {
				if (modal.tmp.html()) {
					modal.anim = true;
					if (modal.transition) {
						fillContent();
						modal.animContent = true;
						currentSettings.hideTransition(modal, currentSettings, function() {
							modal.loading.hide();
							modal.transition = false;
							modal.loadingShown = false;
							endShowContent();
						});
					} else {
						currentSettings.hideLoading(modal, currentSettings, function() {
								modal.loading.hide();
								modal.loadingShown = false;
								fillContent();
								setMarginLoading();
								setMargin();
								modal.animContent = true;
								currentSettings.showContent(modal, currentSettings, endShowContent);
							});
					}
				}
			} else if (!modal.loadingShown && !modal.transition) {
				modal.anim = true;
				modal.loadingShown = true;
				if (modal.error)
					loadingError();
				else
					modal.loading.html(currentSettings.contentLoading);
				$(currentSettings.closeSelector, modal.loading)
					.unbind('click.nyroModal')
					.bind('click.nyroModal', removeModal);
				setMarginLoading();
				currentSettings.showLoading(modal, currentSettings, function(){modal.anim=false;showContentOrLoading();});
			}
		}
	}


	// -------------------------------------------------------
	// Private Data Loaded callback
	// -------------------------------------------------------

	function ajaxLoaded(data) {
		debug('AjaxLoaded: '+this.url);
		modal.tmp.html(currentSettings.selector
			?filterScripts($('<div>'+data+'</div>').find(currentSettings.selector).contents())
			:filterScripts(data));
		if (modal.tmp.html()) {
			modal.dataReady = true;
			showContentOrLoading();
		} else
			loadingError();
	}

	function formDataLoaded() {
		debug('formDataLoaded');
		var jFrom = $(currentSettings.from);
		jFrom.attr('action', jFrom.attr('action')+currentSettings.selector);
		jFrom.attr('target', '');
		$('input[name='+currentSettings.formIndicator+']', currentSettings.from).remove();
		var iframe = modal.tmp.children('iframe');
		var iframeContent = iframe.unbind('load').contents().find(currentSettings.selector || 'body').not('script[src]');
		iframe.attr('src', 'about:blank'); // Used to stop the loading in FF
		modal.tmp.html(iframeContent.html());
		if (modal.tmp.html()) {
			modal.dataReady = true;
			showContentOrLoading();
		} else
			loadingError();
	}
	
	function iframeLoaded() {
		if ((window.location.hostname && currentSettings.url.indexOf(window.location.hostname) > -1)
				||	currentSettings.url.indexOf('http://')) {
			var iframe = $('iframe', modal.full).contents();
			var tmp = {};
			if (currentSettings.titleFromIframe)
				tmp.title = iframe.find('title').text();
			if (!tmp.title) {
				// for IE
				try {
					tmp.title = iframe.find('title').html();
				} catch(err) {}
			}
			var body = iframe.find('body');
			if (!currentSettings.height && body.height())
				tmp.height = body.height();
			if (!currentSettings.width && body.width())
				tmp.width = body.width();
			$.extend(initSettingsSize, tmp);
			$.nyroModalSettings(tmp);
		}
	}

	function galleryCounts(nb, total, elts, settings) {
		if (total > 1)
			settings.title+= (settings.title?' - ':'') +nb+'/'+total;
	}


	// -------------------------------------------------------
	// Private Animation callback
	// -------------------------------------------------------

	function endHideContent() {
		debug('endHideContent');
		modal.anim = false;
		if (contentEltLast) {
			contentEltLast.append(modal.content.contents());
			contentEltLast = null;
		} else if (contentElt) {
			contentElt.append(modal.content.contents());
			contentElt= null;
		}
		modal.content.empty();

		gallery = {};

		modal.contentWrapper.hide().children().remove().empty().attr('style', '').hide();

		if (modal.closing || modal.transition)
			modal.contentWrapper.hide();

		modal.contentWrapper
			.css(currentSettings.css.wrapper)
			.append(modal.content);
		showContentOrLoading();
	}

	function endRemove() {
		debug('endRemove');
		$(document).unbind('keydown', keyHandler);
		modal.anim = false;
		modal.full.remove();
		modal.full = null;
		if (isIE6) {
			body.css({height: '', width: '', position: '', overflow: ''});
			$('html').css({overflow: ''});
		}
		if ($.isFunction(currentSettings.endRemove))
			currentSettings.endRemove(modal, currentSettings);
	}

	function endBackground() {
		debug('endBackground');
		modal.ready = true;
		modal.anim = false;
		showContentOrLoading();
	}

	function endShowContent() {
		debug('endShowContent');
		modal.anim = false;
		modal.animContent = false;
		modal.contentWrapper.css({opacity: ''}); // for the close button in IE
		fixFF = /mozilla/.test(userAgent) && !/(compatible|webkit)/.test(userAgent) && parseFloat(browserVersion) < 1.9 && currentSettings.type != 'image';

		if (fixFF)
			modal.content.css({position: 'fixed'}); // Fix Issue #10
		modal.content.append(modal.scriptsShown);

		if(currentSettings.type == 'iframe')
			modal.content.find('iframe').attr('src', currentSettings.url);

		if ($.isFunction(currentSettings.endShowContent))
			currentSettings.endShowContent(modal, currentSettings);

		if (shouldResize) {
			shouldResize = false;
			$.nyroModalSettings({width: currentSettings.setWidth, height: currentSettings.setHeight});
			delete currentSettings['setWidth'];
			delete currentSettings['setHeight'];
		}
		if (resized.width)
			setCurrentSettings({width: null});
		if (resized.height)
			setCurrentSettings({height: null});
	}


	// -------------------------------------------------------
	// Utilities
	// -------------------------------------------------------

	// Get the selector from an url (as string)
	function getHash(url) {
		if (typeof url == 'string') {
			var hashPos = url.indexOf('#');
			if (hashPos > -1)
				return url.substring(hashPos);
		}
		return '';
	}

	// Filter an html content to remove the script[src]
	function filterScripts(data) {
		// Removing the body, head and html tag
		if (typeof data == 'string')
			data = data.replace(/<\/?(html|head|body)([^>]*)>/gi, '');
		var tmp = new Array();
		$.each($.clean({0:data}, this.ownerDocument), function() {
			if ($.nodeName(this, "script")) {
				if (!this.src || $(this).attr('rel') == 'forceLoad') {
					if ($(this).attr('rev') == 'shown')
						modal.scriptsShown.push(this);
					else
						modal.scripts.push(this);
				}
			} else
				tmp.push(this);
		});
		return tmp;
	}

	// Get the vertical and horizontal margin, padding and border dimension
	function getOuter(elm) {
		elm = elm.get(0);
		var ret = {
			h: {
				margin: getCurCSS(elm, 'marginTop') + getCurCSS(elm, 'marginBottom'),
				border: getCurCSS(elm, 'borderTopWidth') + getCurCSS(elm, 'borderBottomWidth'),
				padding: getCurCSS(elm, 'paddingTop') + getCurCSS(elm, 'paddingBottom')
			},
			w: {
				margin: getCurCSS(elm, 'marginLeft') + getCurCSS(elm, 'marginRight'),
				border: getCurCSS(elm, 'borderLeftWidth') + getCurCSS(elm, 'borderRightWidth'),
				padding: getCurCSS(elm, 'paddingLeft') + getCurCSS(elm, 'paddingRight')
			}
		};

		ret.h.outer = ret.h.margin + ret.h.border;
		ret.w.outer = ret.w.margin + ret.w.border;

		ret.h.inner = ret.h.padding + ret.h.border;
		ret.w.inner = ret.w.padding + ret.w.border;

		ret.h.total = ret.h.outer + ret.h.padding;
		ret.w.total = ret.w.outer + ret.w.padding;

		return ret;
	}

	function getCurCSS(elm, name) {
		var ret = parseInt($.curCSS(elm, name, true));
		if (isNaN(ret))
			ret = 0;
		return ret;
	}

	// Proxy Debug function
	function debug(msg) {
		if ($.fn.nyroModal.settings.debug || currentSettings && currentSettings.debug)
			nyroModalDebug(msg, modal, currentSettings || {});
	}

	// -------------------------------------------------------
	// Default animation function
	// -------------------------------------------------------

	function showBackground(elts, settings, callback) {
		elts.bg.css({opacity:0}).fadeTo(500, 0.75, callback);
	}

	function hideBackground(elts, settings, callback) {
		elts.bg.fadeOut(300, callback);
	}

	function showLoading(elts, settings, callback) {
		elts.loading
			.css({
				marginTop: settings.marginTopLoading+'px',
				marginLeft: settings.marginLeftLoading+'px',
				opacity: 0
			})
			.show()
			.animate({
				opacity: 1
			}, {complete: callback, duration: 400});
	}

	function hideLoading(elts, settings, callback) {
		callback();
	}

	function showContent(elts, settings, callback) {
		elts.loading
			.css({
				marginTop: settings.marginTopLoading+'px',
				marginLeft: settings.marginLeftLoading+'px'
			})
			.show()
			.animate({
				width: settings.width+'px',
				height: settings.height+'px',
				marginTop: settings.marginTop+'px',
				marginLeft: settings.marginLeft+'px'
			}, {duration: 350, complete: function() {
				elts.contentWrapper
					.css({
						width: settings.width+'px',
						height: settings.height+'px',
						marginTop: settings.marginTop+'px',
						marginLeft: settings.marginLeft+'px'
					})
					.show();
					elts.loading.fadeOut(200, callback);
				}
			});
	}

	function hideContent(elts, settings, callback) {
		elts.contentWrapper
			.animate({
				height: '50px',
				width: '50px',
				marginTop: (-(25+settings.borderH)/2 + settings.marginScrollTop)+'px',
				marginLeft: (-(25+settings.borderW)/2 + settings.marginScrollLeft)+'px'
			}, {duration: 350, complete: function() {
				elts.contentWrapper.hide();
				callback();
			}});
	}

	function showTransition(elts, settings, callback) {
		// Put the loading with the same dimensions of the current content
		elts.loading
			.css({
				marginTop: elts.contentWrapper.css('marginTop'),
				marginLeft: elts.contentWrapper.css('marginLeft'),
				height: elts.contentWrapper.css('height'),
				width: elts.contentWrapper.css('width'),
				opacity: 0
			})
			.show()
			.fadeTo(400, 1, function() {
					elts.contentWrapper.hide();
					callback();
				});
	}

	function hideTransition(elts, settings, callback) {
		// Place the content wrapper underneath the the loading with the right dimensions
		elts.contentWrapper
			.hide()
			.css({
				width: settings.width+'px',
				height: settings.height+'px',
				marginLeft: settings.marginLeft+'px',
				marginTop: settings.marginTop+'px',
				opacity: 1
			});
		elts.loading
			.animate({
				width: settings.width+'px',
				height: settings.height+'px',
				marginLeft: settings.marginLeft+'px',
				marginTop: settings.marginTop+'px'
			}, {complete: function() {
					elts.contentWrapper.show();
					elts.loading.fadeOut(400, function() {
						elts.loading.hide();
						callback();
					});
				}, duration: 350});
	}

	function resize(elts, settings, callback) {
		elts.contentWrapper
			.animate({
				width: settings.width+'px',
				height: settings.height+'px',
				marginLeft: settings.marginLeft+'px',
				marginTop: settings.marginTop+'px'
			}, {complete: callback, duration: 400});
	}

	function updateBgColor(elts, settings, callback) {
		if (!$.fx.step.backgroundColor) {
			elts.bg.css({backgroundColor: settings.bgColor});
			callback();
		} else
			elts.bg
				.animate({
					backgroundColor: settings.bgColor
				}, {complete: callback, duration: 400});
	}

	// -------------------------------------------------------
	// Default initialization
	// -------------------------------------------------------

	$($.fn.nyroModal.settings.openSelector).nyroModal();

});

// Default debug function, to be overwritten if needed
//      Be aware that the settings parameter could be empty
function nyroModalDebug(msg, elts, settings) {
	if (elts.full)
		elts.bg.prepend(msg+'<br />');
}

/*********** jquery.tooltip.js *************/
/*
 * jQuery Tooltip plugin 1.3
 *
 * http://bassistance.de/jquery-plugins/jquery-plugin-tooltip/
 * http://docs.jquery.com/Plugins/Tooltip
 *
 * Copyright (c) 2006 - 2008 Jörn Zaefferer
 *
 * $Id: jquery.tooltip.js 5741 2008-06-21 15:22:16Z joern.zaefferer $
 * 
 * Dual licensed under the MIT and GPL licenses:
 *   http://www.opensource.org/licenses/mit-license.php
 *   http://www.gnu.org/licenses/gpl.html
 */
 
;(function($) {
	
		// the tooltip element
	var helper = {},
		// the current tooltipped element
		current,
		// the title of the current element, used for restoring
		title,
		// timeout id for delayed tooltips
		tID,
		// IE 5.5 or 6
		IE = $.browser.msie && /MSIE\s(5\.5|6\.)/.test(navigator.userAgent),
		// flag for mouse tracking
		track = false;
	
	$.tooltip = {
		blocked: false,
		defaults: {
			delay: 200,
			fade: false,
			showURL: true,
			extraClass: "",
			top: 15,
			left: 15,
			id: "tooltip"
		},
		block: function() {
			$.tooltip.blocked = !$.tooltip.blocked;
		}
	};
	
	$.fn.extend({
		tooltip: function(settings) {
			settings = $.extend({}, $.tooltip.defaults, settings);
			createHelper(settings);
			return this.each(function() {
					$.data(this, "tooltip", settings);
					this.tOpacity = helper.parent.css("opacity");
					// copy tooltip into its own expando and remove the title
					this.tooltipText = this.title;
					$(this).removeAttr("title");
					// also remove alt attribute to prevent default tooltip in IE
					this.alt = "";
				})
				.mouseover(save)
				.mouseout(hide)
				.click(hide);
		},
		fixPNG: IE ? function() {
			return this.each(function () {
				var image = $(this).css('backgroundImage');
				if (image.match(/^url\(["']?(.*\.png)["']?\)$/i)) {
					image = RegExp.$1;
					$(this).css({
						'backgroundImage': 'none',
						'filter': "progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=crop, src='" + image + "')"
					}).each(function () {
						var position = $(this).css('position');
						if (position != 'absolute' && position != 'relative')
							$(this).css('position', 'relative');
					});
				}
			});
		} : function() { return this; },
		unfixPNG: IE ? function() {
			return this.each(function () {
				$(this).css({'filter': '', backgroundImage: ''});
			});
		} : function() { return this; },
		hideWhenEmpty: function() {
			return this.each(function() {
				$(this)[ $(this).html() ? "show" : "hide" ]();
			});
		},
		url: function() {
			return this.attr('href') || this.attr('src');
		}
	});
	
	function createHelper(settings) {
		// there can be only one tooltip helper
		if( helper.parent )
			return;
		// create the helper, h3 for title, div for url
		helper.parent = $('<div id="' + settings.id + '"><h3></h3><div class="body"></div><div class="url"></div></div>')
			// add to document
			.appendTo(document.body)
			// hide it at first
			.hide();
			
		// apply bgiframe if available
		if ( $.fn.bgiframe )
			helper.parent.bgiframe();
		
		// save references to title and url elements
		helper.title = $('h3', helper.parent);
		helper.body = $('div.body', helper.parent);
		helper.url = $('div.url', helper.parent);
	}
	
	function settings(element) {
		return $.data(element, "tooltip");
	}
	
	// main event handler to start showing tooltips
	function handle(event) {
		// show helper, either with timeout or on instant
		if( settings(this).delay )
			tID = setTimeout(show, settings(this).delay);
		else
			show();
		
		// if selected, update the helper position when the mouse moves
		track = !!settings(this).track;
		$(document.body).bind('mousemove', update);
			
		// update at least once
		update(event);
	}
	
	// save elements title before the tooltip is displayed
	function save() {
		// if this is the current source, or it has no title (occurs with click event), stop
		if ( $.tooltip.blocked || this == current || (!this.tooltipText && !settings(this).bodyHandler) )
			return;

		// save current
		current = this;
		title = this.tooltipText;
		
		if ( settings(this).bodyHandler ) {
			helper.title.hide();
			var bodyContent = settings(this).bodyHandler.call(this);
			if (bodyContent.nodeType || bodyContent.jquery) {
				helper.body.empty().append(bodyContent)
			} else {
				helper.body.html( bodyContent );
			}
			helper.body.show();
		} else if ( settings(this).showBody ) {
			var parts = title.split(settings(this).showBody);
			helper.title.html(parts.shift()).show();
			helper.body.empty();
			for(var i = 0, part; (part = parts[i]); i++) {
				if(i > 0)
					helper.body.append("<br/>");
				helper.body.append(part);
			}
			helper.body.hideWhenEmpty();
		} else {
			helper.title.html(title).show();
			helper.body.hide();
		}
		
		// if element has href or src, add and show it, otherwise hide it
		if( settings(this).showURL && $(this).url() )
			helper.url.html( $(this).url().replace('http://', '') ).show();
		else 
			helper.url.hide();
		
		// add an optional class for this tip
		helper.parent.addClass(settings(this).extraClass);

		// fix PNG background for IE
		if (settings(this).fixPNG )
			helper.parent.fixPNG();
			
		handle.apply(this, arguments);
	}
	
	// delete timeout and show helper
	function show() {
		tID = null;
		if ((!IE || !$.fn.bgiframe) && settings(current).fade) {
			if (helper.parent.is(":animated"))
				helper.parent.stop().show().fadeTo(settings(current).fade, current.tOpacity);
			else
				helper.parent.is(':visible') ? helper.parent.fadeTo(settings(current).fade, current.tOpacity) : helper.parent.fadeIn(settings(current).fade);
		} else {
			helper.parent.show();
		}
		update();
	}
	
	/**
	 * callback for mousemove
	 * updates the helper position
	 * removes itself when no current element
	 */
	function update(event)	{
		if($.tooltip.blocked)
			return;
		
		if (event && event.target.tagName == "OPTION") {
			return;
		}
		
		// stop updating when tracking is disabled and the tooltip is visible
		if ( !track && helper.parent.is(":visible")) {
			$(document.body).unbind('mousemove', update)
		}
		
		// if no current element is available, remove this listener
		if( current == null ) {
			$(document.body).unbind('mousemove', update);
			return;	
		}
		
		// remove position helper classes
		helper.parent.removeClass("viewport-right").removeClass("viewport-bottom");
		
		var left = helper.parent[0].offsetLeft;
		var top = helper.parent[0].offsetTop;
		if (event) {
			// position the helper 15 pixel to bottom right, starting from mouse position
			left = event.pageX + settings(current).left;
			top = event.pageY + settings(current).top;
			var right='auto';
			if (settings(current).positionLeft) {
				right = $(window).width() - left;
				left = 'auto';
			}
			helper.parent.css({
				left: left,
				right: right,
				top: top
			});
		}
		
		var v = viewport(),
			h = helper.parent[0];
		// check horizontal position
		if (v.x + v.cx < h.offsetLeft + h.offsetWidth) {
			left -= h.offsetWidth + 20 + settings(current).left;
			helper.parent.css({left: left + 'px'}).addClass("viewport-right");
		}
		// check vertical position
		if (v.y + v.cy < h.offsetTop + h.offsetHeight) {
			top -= h.offsetHeight + 20 + settings(current).top;
			helper.parent.css({top: top + 'px'}).addClass("viewport-bottom");
		}
	}
	
	function viewport() {
		return {
			x: $(window).scrollLeft(),
			y: $(window).scrollTop(),
			cx: $(window).width(),
			cy: $(window).height()
		};
	}
	
	// hide helper and restore added classes and the title
	function hide(event) {
		if($.tooltip.blocked)
			return;
		// clear timeout if possible
		if(tID)
			clearTimeout(tID);
		// no more current element
		current = null;
		
		var tsettings = settings(this);
		function complete() {
			helper.parent.removeClass( tsettings.extraClass ).hide().css("opacity", "");
		}
		if ((!IE || !$.fn.bgiframe) && tsettings.fade) {
			if (helper.parent.is(':animated'))
				helper.parent.stop().fadeTo(tsettings.fade, 0, complete);
			else
				helper.parent.stop().fadeOut(tsettings.fade, complete);
		} else
			complete();
		
		if( settings(this).fixPNG )
			helper.parent.unfixPNG();
	}
	
})(jQuery);

