hgbook

changeset 1013:44946b10a4b3

merge with André Sintzoff
author Romain PELISSE <belaran@gmail.com>
date Tue Nov 24 11:44:49 2009 +0100 (2009-11-24)
parents cd06c45e1631 7ec542fabc34
children 4650cddc0c27
files fr/ch00-preface.xml web/icons/caution.png web/icons/favicon.png web/icons/important.png web/icons/note.png web/icons/remark.png web/icons/rss.png web/icons/shell.png web/icons/source.png web/icons/tip.png web/icons/warning.png web/javascript/form-min.js web/javascript/form.js web/javascript/jquery-min.js web/javascript/jquery.js web/styles.css
line diff
     1.1 --- a/Makefile	Mon Sep 21 00:02:10 2009 +0200
     1.2 +++ b/Makefile	Tue Nov 24 11:44:49 2009 +0100
     1.3 @@ -6,7 +6,7 @@
     1.4  FORMATS=html html-single pdf epub
     1.5  
     1.6  PO_LANGUAGES := zh
     1.7 -DBK_LANGUAGES := en
     1.8 +DBK_LANGUAGES := en it
     1.9  LANGUAGES := $(DBK_LANGUAGES) $(PO_LANGUAGES)
    1.10  
    1.11  UPDATEPO = PERLLIB=$(PO4A_LIB) $(PO4A_HOME)/po4a-updatepo -M UTF-8 \
    1.12 @@ -22,76 +22,38 @@
    1.13  #rev_id = $(shell hg parents --template '{node|short} ({date|isodate})')
    1.14  rev_id = $(shell hg parents --template '{node|short} ({date|shortdate})')
    1.15  
    1.16 -images := \
    1.17 -	en/figs/bad-merge-1.png \
    1.18 -	en/figs/bad-merge-2.png \
    1.19 -	en/figs/bad-merge-3.png \
    1.20 -	en/figs/bad-merge-4.png \
    1.21 -	en/figs/bad-merge-5.png \
    1.22 -	en/figs/feature-branches.png \
    1.23 -	en/figs/filelog.png \
    1.24 -	en/figs/metadata.png \
    1.25 -	en/figs/mq-stack.png \
    1.26 -	en/figs/revlog.png \
    1.27 -	en/figs/snapshot.png \
    1.28 -	en/figs/tour-history.png \
    1.29 -	en/figs/tour-merge-conflict.png \
    1.30 -	en/figs/tour-merge-merge.png \
    1.31 -	en/figs/tour-merge-pull.png \
    1.32 -	en/figs/tour-merge-sep-repos.png \
    1.33 -	en/figs/undo-manual-merge.png \
    1.34 -	en/figs/undo-manual.png \
    1.35 -	en/figs/undo-non-tip.png \
    1.36 -	en/figs/undo-simple.png \
    1.37 -	en/figs/wdir-after-commit.png \
    1.38 -	en/figs/wdir-branch.png \
    1.39 -	en/figs/wdir-merge.png \
    1.40 -	en/figs/wdir.png \
    1.41 -	en/figs/wdir-pre-branch.png
    1.42 +images-dot := $(wildcard en/figs/*.dot)
    1.43 +
    1.44 +images-svg := $(wildcard en/figs/*.svg)
    1.45 +images-svg :=$(filter-out %-tmp.svg, $(images-svg))
    1.46 +images-svg -= $(images-dot:dot=svg)
    1.47 +
    1.48 +images-dst := $(wildcard en/figs/*.png)
    1.49 +images-dst += $(images-dot:dot=png)
    1.50 +images-dst += $(images-svg:svg=png)
    1.51 +
    1.52 +images-gen := $(images-dot:dot=png)
    1.53 +images-gen += $(images-svg:svg=png)
    1.54 +images-gen += $(wildcard en/figs/*-tmp.svg)
    1.55  
    1.56  help:
    1.57 -	@echo "  make epub         [LINGUA=en|zh|...]"
    1.58 -	@echo "  make html         [LINGUA=en|zh|...]"
    1.59 -	@echo "  make html-single  [LINGUA=en|zh|...]"
    1.60 -	@echo "  make pdf          [LINGUA=en|zh|...]"
    1.61 -	@echo "  make validate     [LINGUA=en|zh|...] # always before commit!"
    1.62 +	@echo "  make epub         [LINGUA=en|it|zh|...]"
    1.63 +	@echo "  make html         [LINGUA=en|it|zh|...]"
    1.64 +	@echo "  make html-single  [LINGUA=en|it|zh|...]"
    1.65 +	@echo "  make pdf          [LINGUA=en|it|zh|...]"
    1.66 +	@echo "  make validate     [LINGUA=en|it|zh|...] # always before commit!"
    1.67  	@echo "  make tidypo       [LINGUA=zh|...]    # always before commit!"
    1.68  	@echo "  make updatepo     [LINGUA=zh|...]    # update po files."
    1.69 -	@echo "  make all          [LINGUA=en|zh|...]"
    1.70 +	@echo "  make all          [LINGUA=en|it|zh|...]"
    1.71  	@echo "  make stat         # print statistics about po files."
    1.72  	@echo "  make clean        # Remove the build files."
    1.73  
    1.74  clean:
    1.75 -	@rm -fr build po/*.mo hello en/hello en/html en/.validated-00book.xml en/examples/.run en/examples/results \
    1.76 -          stylesheets/system-xsl en/figs/*-tmp.svg \
    1.77 -          web/index-read.html.in \
    1.78 -          en/figs/bad-merge-1.png \
    1.79 -          en/figs/bad-merge-2.png \
    1.80 -          en/figs/bad-merge-3.png \
    1.81 -          en/figs/bad-merge-4.png \
    1.82 -          en/figs/bad-merge-5.png \
    1.83 -          en/figs/feature-branches.png \
    1.84 -          en/figs/filelog.png \
    1.85 -          en/figs/feature-branches.png \
    1.86 -          en/figs/filelog.png \
    1.87 -          en/figs/metadata.png \
    1.88 -          en/figs/mq-stack.png \
    1.89 -          en/figs/revlog.png \
    1.90 -          en/figs/snapshot.png \
    1.91 -          en/figs/tour-history.png \
    1.92 -          en/figs/tour-merge-conflict.png \
    1.93 -          en/figs/tour-merge-merge.png \
    1.94 -          en/figs/tour-merge-pull.png \
    1.95 -          en/figs/tour-merge-sep-repos.png \
    1.96 -          en/figs/undo-manual-merge.png \
    1.97 -          en/figs/undo-manual.png \
    1.98 -          en/figs/undo-non-tip.png \
    1.99 -          en/figs/undo-simple.png \
   1.100 -          en/figs/wdir-after-commit.png \
   1.101 -          en/figs/wdir-branch.png \
   1.102 -          en/figs/wdir-merge.png \
   1.103 -          en/figs/wdir-pre-branch.png \
   1.104 -          en/figs/wdir.png
   1.105 +	@rm -fr build hello po/*.mo /tmp/REV*-hello en/examples/results
   1.106 +
   1.107 +	@(for l in $(DBK_LANGUAGES); do \
   1.108 +	  rm -fr $(subst en/figs/, $$l/figs/, $(images-gen))  $$l/examples/.run;\
   1.109 +	done)
   1.110  
   1.111  all:
   1.112  ifdef LINGUA
   1.113 @@ -117,8 +79,10 @@
   1.114  
   1.115  tidypo:
   1.116  ifdef LINGUA
   1.117 +  ifneq "$(findstring $(LINGUA),$(PO_LANGUAGES))" ""
   1.118  	msgcat --sort-by-file --width=80 po/$(LINGUA).po > po/$(LINGUA).tmp && \
   1.119  	    mv po/$(LINGUA).tmp po/$(LINGUA).po;
   1.120 +  endif
   1.121  else
   1.122  	for po in $(wildcard po/*.po); do \
   1.123  	    msgcat --sort-by-file --width=80 $$po > $$po.tmp && mv $$po.tmp $$po; \
   1.124 @@ -131,13 +95,15 @@
   1.125  	    $(MAKE) $@ LINGUA=$$l; \
   1.126  	done
   1.127  else
   1.128 -updatepo:
   1.129 -ifneq "$(findstring $(LINGUA),$(PO_LANGUAGES))" ""
   1.130 +po/$(LINGUA).po: $(wildcard en/*.xml)
   1.131 +  ifneq "$(findstring $(LINGUA),$(PO_LANGUAGES))" ""
   1.132  	(cd po; \
   1.133  	$(UPDATEPO) -m ../en/00book.xml -p $(LINGUA).po; \
   1.134  	)
   1.135  	$(MAKE) tidypo LINGUA=$(LINGUA)
   1.136 -endif
   1.137 +  endif
   1.138 +
   1.139 +updatepo: po/$(LINGUA).po
   1.140  endif
   1.141  
   1.142  ifndef LINGUA
   1.143 @@ -149,24 +115,28 @@
   1.144  validate: build/$(LINGUA)/source/hgbook.xml
   1.145  	xmllint --nonet --noout --postvalid --xinclude $<
   1.146  
   1.147 -ifneq "$(findstring $(LINGUA),$(DBK_LANGUAGES))" ""
   1.148 +  ifneq "$(findstring $(LINGUA),$(DBK_LANGUAGES))" ""
   1.149  $(LINGUA)/examples/.run:
   1.150 -	(cd $(LINGUA)/examples; ./run-example -v -a)
   1.151 -
   1.152 -build/$(LINGUA)/source/hgbook.xml: $(wildcard $(LINGUA)/*.xml) $(images) $(LINGUA)/examples/.run
   1.153 +	if test -x $(LINGUA)/examples/run-example; then \
   1.154 +	  (cd $(LINGUA)/examples; ./run-example -a); \
   1.155 +	else \
   1.156 +	  touch $@; \
   1.157 +	fi
   1.158 +
   1.159 +build/$(LINGUA)/source/hgbook.xml: $(wildcard $(LINGUA)/*.xml) $(subst en/figs/, $(LINGUA)/figs/, $(images-dst)) $(LINGUA)/examples/.run
   1.160  	mkdir -p build/$(LINGUA)/source/figs
   1.161  	cp $(LINGUA)/figs/*.png build/$(LINGUA)/source/figs
   1.162  	cp stylesheets/hgbook.css build/$(LINGUA)/source
   1.163  	(cd $(LINGUA); xmllint --nonet --noent --xinclude --postvalid --output ../$@.tmp 00book.xml)
   1.164  	cat $@.tmp | sed 's/\$$rev_id\$$/${rev_id}/' > $@
   1.165 -else
   1.166 +  else
   1.167  en/examples/.run:
   1.168 -	(cd en/examples; ./run-example -v -a)
   1.169 +	(cd en/examples; ./run-example -a)
   1.170  
   1.171  build/en/source/hgbook.xml:
   1.172  	${MAKE} LINGUA=en $@
   1.173  
   1.174 -build/$(LINGUA)/source/hgbook.xml: $(wildcard en/*.xml) po/$(LINGUA).po $(images)
   1.175 +build/$(LINGUA)/source/hgbook.xml: $(wildcard en/*.xml) po/$(LINGUA).po $(images-dst) en/examples/.run
   1.176  	mkdir -p build/$(LINGUA)/source/figs
   1.177  	cp en/figs/*.png build/$(LINGUA)/source/figs
   1.178  	cp stylesheets/hgbook.css build/$(LINGUA)/source
   1.179 @@ -174,7 +144,7 @@
   1.180  	xmllint --nonet --noent --xinclude --postvalid --output $@.tmp en/hgbook.xml.$(LINGUA)
   1.181  	cat $@.tmp | sed 's/\$$rev_id\$$/${rev_id}/' > $@
   1.182  	mv en/hgbook.xml.$(LINGUA) build/$(LINGUA)/source
   1.183 -endif
   1.184 +  endif
   1.185  
   1.186  endif
   1.187  
   1.188 @@ -246,6 +216,17 @@
   1.189  	(cd build/$(LINGUA)/source && $(FOP_HOME)/fop.sh -c $(FOP_HOME)/conf/userconfig.xml hgbook.fo ../pdf/hgbook.pdf)
   1.190  endif
   1.191  
   1.192 +$(LINGUA)/figs/%.png: $(LINGUA)/figs/%.svg 
   1.193 +	if test -x $(LINGUA)/fixsvg; then \
   1.194 +	  $(LINGUA)/fixsvg $<; \
   1.195 +	  inkscape -D -d 120 -e $@ $<-tmp.svg; \
   1.196 +	else \
   1.197 +	  inkscape -D -d 120 -e $@ $<; \
   1.198 +	fi
   1.199 +
   1.200 +$(LINGUA)/figs/%.svg: $(LINGUA)/figs/%.dot
   1.201 +	dot -Tsvg -o $@ $<
   1.202 +
   1.203  en/figs/%.png: en/figs/%.svg en/fixsvg
   1.204  	en/fixsvg $<
   1.205  	inkscape -D -d 120 -e $@ $<-tmp.svg
     2.1 --- a/Makefile.vars.tmpl	Mon Sep 21 00:02:10 2009 +0200
     2.2 +++ b/Makefile.vars.tmpl	Tue Nov 24 11:44:49 2009 +0100
     2.3 @@ -1,20 +1,20 @@
     2.4  #
     2.5 -# Please create your Makefile.vars file from this template file.
     2.6 +# Please create your Makefile.vars from this template file.
     2.7  #
     2.8  # Please use absolute path, DO NOT use relative path !
     2.9  #
    2.10  
    2.11 -# po4a (>= 0.36.1): Only for PO based Makefile !
    2.12 +# po4a (>= 0.36.1): Only for PO based translation !
    2.13  # po4A_HOME=/usr/bin
    2.14  # PO4A_LIB=/usr/share/perl5
    2.15 -PO4A_HOME=/home/dongsheng/var/svn/i18n-zh/trunk/lib/po4a
    2.16 +PO4A_HOME=/home/dongsheng/vcs/svn/i18n-zh/trunk/lib/po4a
    2.17  PO4A_LIB=$(PO4A_HOME)/lib
    2.18  
    2.19  # saxon65.jar, saxon65-dbxsl.jar, xml-commons-resolver-1.2.jar: Only for pdf format !
    2.20 -JAVA_LIB=/home/dongsheng/var/svn/i18n-zh/trunk/lib/share/java
    2.21 +JAVA_LIB=/home/dongsheng/vcs/svn/i18n-zh/trunk/lib/share/java
    2.22  
    2.23  # fop (>= 0.9.6): Only for pdf format !
    2.24 -FOP_HOME=/home/dongsheng/var/svn/i18n-zh/trunk/lib/fop
    2.25 +FOP_HOME=/home/dongsheng/vcs/svn/i18n-zh/trunk/lib/fop
    2.26  
    2.27  # docbook-xsl (>= 1.74.3): Only for ePub format !
    2.28 -DB2EPUB=/home/dongsheng/var/svn/i18n-zh/trunk/lib/docbook/docbook-xsl/epub/bin/dbtoepub
    2.29 +DB2EPUB=/home/dongsheng/vcs/svn/i18n-zh/trunk/lib/docbook/docbook-xsl/epub/bin/dbtoepub
     3.1 --- a/README	Mon Sep 21 00:02:10 2009 +0200
     3.2 +++ b/README	Tue Nov 24 11:44:49 2009 +0100
     3.3 @@ -8,9 +8,13 @@
     3.4  
     3.5  Here's a top-level tour of interesting directories:
     3.6  
     3.7 -en        English-language content
     3.8 -es        Spanish-language content
     3.9 -examples  Miscellaneous example scripts
    3.10 -tools     Old, largely unused conversion scripts
    3.11 -web       Content and comment system for http://hgbook.red-bean.com/
    3.12 -xsl       XSLT scripts for generating HTML
    3.13 +contrib         Miscellaneous scripts
    3.14 +en              English-language content (DocBook XML format)
    3.15 +stylesheets     XSLT scripts for generating HTML
    3.16 +web             Content and comment system for http://hgbook.red-bean.com/
    3.17 +
    3.18 +po              PO based translation    Chinese translation
    3.19 +
    3.20 +it              Italian translation     DocBook XML format
    3.21 +es              Spanish translation     old tex format
    3.22 +ja              Japanese translation    old tex format
     4.1 --- a/README.BUILD	Mon Sep 21 00:02:10 2009 +0200
     4.2 +++ b/README.BUILD	Tue Nov 24 11:44:49 2009 +0100
     4.3 @@ -16,17 +16,13 @@
     4.4  
     4.5  I. PRIMER
     4.6  
     4.7 -  DocBook has a tortured, confusing history.  Before you do anything,
     4.8 -  take a look at Eric Raymond's excellent "DocBook Demystification HOWTO":
     4.9 +  DocBook has a tortured, confusing history. Before you do anything,
    4.10 +  take a look at:
    4.11  
    4.12 -      http://tldp.org/HOWTO/DocBook-Demystification-HOWTO/
    4.13 -
    4.14 -  It's very short and clears up many things.
    4.15 -
    4.16 +      http://wiki.docbook.org/topic/DocBookTutorials
    4.17  
    4.18  II. COMPILING THE DOCS
    4.19  
    4.20 -
    4.21  1. Install XML DTD and XSL stylesheets for DocBook
    4.22  
    4.23        % sudo apt-get install docbook-xml docbook-xsl
    4.24 @@ -35,27 +31,44 @@
    4.25  
    4.26        % sudo apt-get install libxml2-utils
    4.27  
    4.28 -3. Install graph drawing tools
    4.29 +3. Install graph drawing and patches tools
    4.30  
    4.31 -      % sudo apt-get install graphviz inkscape
    4.32 +      % sudo apt-get install graphviz inkscape patchutils
    4.33  
    4.34  4. Install pdf support
    4.35  
    4.36        % sudo apt-get install openjdk-6-jdk docbook-xsl-saxon libsaxon-java fop
    4.37  
    4.38 -  The Makefile will actually invoke tools/fop/fop.sh, you should do
    4.39 +  The Makefile will actually invoke $FOP_HOME/fop.sh, you should do
    4.40    some trick, let fop's CLASSPATH include saxon.jar and docbook-xsl-saxon.jar .
    4.41  
    4.42 -5. Make
    4.43 +5. Configure XML Catalogs
    4.44 +  For non pdf output, we use xsltproc for XSLT process, xsltproc use system
    4.45 +  catalog files automatically, usually /etc/xml/catalog. Users do not need to
    4.46 +  care about it.
    4.47 +
    4.48 +  For pdf output, we need use the xsl extensions (docbook-xsl-saxon), so we must
    4.49 +  create file $JAVA_LIB/CatalogManager.properties like this:
    4.50 +
    4.51 +      catalogs=/etc/xml/catalog
    4.52 +      relative-catalogs=true
    4.53 +      static-catalog=yes
    4.54 +      catalog-class-name=org.apache.xml.resolver.Resolver
    4.55 +      verbosity=1
    4.56 +
    4.57 +6. Create Makefile.vars
    4.58 +  Please create your Makefile.vars from Makefile.vars.tmpl .
    4.59 +
    4.60 +7. Make
    4.61    Run 'make' for more details, for example:
    4.62  
    4.63 -  * make all document(pdf, html and html-single for all languages)
    4.64 +  * make all document(pdf, epub, html and html-single for all languages)
    4.65        % make all
    4.66  
    4.67 -  * make english document(pdf, html and html-single for all languages)
    4.68 +  * make english document(pdf, epub, html and html-single for all languages)
    4.69        % make LINGUA=en all
    4.70  
    4.71 -  * make Chinese document(pdf, html and html-single for all languages)
    4.72 +  * make Chinese document(pdf, epub, html and html-single for all languages)
    4.73        % make LINGUA=zh all
    4.74  
    4.75    * make Chinese pdf document
    4.76 @@ -65,24 +78,22 @@
    4.77  
    4.78  In addition to everything in section II:
    4.79  
    4.80 -
    4.81 -1. Get a nice editing environment for SGML/XML.
    4.82 +1. Get a nice editing environment for XML
    4.83  
    4.84    This isn't strictly required, but it's nice when your editor
    4.85    colorizes things, understands the DTD, tells you what tags you can
    4.86    insert, etc.
    4.87  
    4.88 -  If you use emacs, we recommend the PSGML major-mode.  Most free
    4.89 +  If you use emacs, we recommend the nxml-mode. Most free
    4.90    operating systems package it, or its home page is here:
    4.91  
    4.92 -      http://www.lysator.liu.se/projects/about_psgml.html
    4.93 +      http://www.emacswiki.org/emacs/NxmlMode
    4.94  
    4.95    If you use vim, you might check out xmledit, at:
    4.96  
    4.97        http://www.vim.org/scripts/script.php?script_id=301
    4.98  
    4.99 -
   4.100 -2. Get a validating parser.
   4.101 +2. Get a validating parser
   4.102  
   4.103    Actually, if you have what you need to compile the documentation,
   4.104    then you almost certainly have an XML validator installed already -
   4.105 @@ -93,7 +104,7 @@
   4.106  
   4.107        $ make validate
   4.108  
   4.109 -3. Read about DocBook.
   4.110 +3. Read about DocBook
   4.111  
   4.112    You'll want to get real intimate with a DocBook reference, such as
   4.113    can be found at:  http://www.docbook.org/tdg/en/html/
     5.1 --- a/contrib/hg-package	Mon Sep 21 00:02:10 2009 +0200
     5.2 +++ b/contrib/hg-package	Tue Nov 24 11:44:49 2009 +0100
     5.3 @@ -1,9 +1,13 @@
     5.4  #!/bin/sh
     5.5  
     5.6 +#
     5.7 +# Package build results & Upload to i18n-zh
     5.8 +#
     5.9 +
    5.10  build_dir=`dirname "$0"`/../build
    5.11  rev_id=`hg parents --template '{date|shortdate}' | sed 's/-//g'`
    5.12  
    5.13 -for l in en zh; do
    5.14 +for l in en zh it; do
    5.15    (
    5.16    if [ ! -d "${build_dir}/${l}" ] ; then
    5.17      continue
     6.1 --- a/en/ch12-mq.xml	Mon Sep 21 00:02:10 2009 +0200
     6.2 +++ b/en/ch12-mq.xml	Tue Nov 24 11:44:49 2009 +0100
     6.3 @@ -438,7 +438,7 @@
     6.4  	<command role="hg-ext-mq">qpop</command> each operate on a
     6.5  	single patch at a time by default, you can push and pop many
     6.6  	patches in one go.  The <option
     6.7 -	  role="hg-ext-mq-cmd-qpush-opt">hg -a</option> option to
     6.8 +	  role="hg-ext-mq-cmd-qpush-opt">-a</option> option to
     6.9  	<command role="hg-ext-mq">qpush</command> causes it to push
    6.10  	all unapplied patches, while the <option
    6.11  	  role="hg-ext-mq-cmd-qpop-opt">-a</option> option to <command
    6.12 @@ -469,10 +469,10 @@
    6.13  	named <option>-f</option>.  The exact meaning of
    6.14  	<option>-f</option> depends on the command.  For example,
    6.15  	<command role="hg-cmd">hg qnew <option
    6.16 -	    role="hg-ext-mq-cmd-qnew-opt">hg -f</option></command>
    6.17 +	    role="hg-ext-mq-cmd-qnew-opt">-f</option></command>
    6.18  	will incorporate any outstanding changes into the new patch it
    6.19  	creates, but <command role="hg-cmd">hg qpop <option
    6.20 -	    role="hg-ext-mq-cmd-qpop-opt">hg -f</option></command>
    6.21 +	    role="hg-ext-mq-cmd-qpop-opt">-f</option></command>
    6.22  	will revert modifications to any files affected by the patch
    6.23  	that it is popping.  Be sure to read the documentation for a
    6.24  	command's <option>-f</option> option before you use it!</para>
    6.25 @@ -808,9 +808,9 @@
    6.26  
    6.27      <para id="x_404">On my old, slow laptop, I was able to <command
    6.28  	role="hg-cmd">hg qpush <option
    6.29 -	  role="hg-ext-mq-cmd-qpush-opt">hg -a</option></command> all
    6.30 +	  role="hg-ext-mq-cmd-qpush-opt">-a</option></command> all
    6.31        1,738 patches in 3.5 minutes, and <command role="hg-cmd">hg qpop
    6.32 -	<option role="hg-ext-mq-cmd-qpop-opt">hg -a</option></command>
    6.33 +	<option role="hg-ext-mq-cmd-qpop-opt">-a</option></command>
    6.34        them all in 30 seconds.  (On a newer laptop, the time to push
    6.35        all patches dropped to two minutes.)  I could <command
    6.36  	role="hg-ext-mq">qrefresh</command> one of the biggest patches
    6.37 @@ -866,7 +866,7 @@
    6.38  	  -a</option></command> your patches, then <command
    6.39  	role="hg-cmd">hg pull</command> changes into the underlying
    6.40        repository, and finally <command role="hg-cmd">hg qpush <option
    6.41 -	  role="hg-ext-mq-cmd-qpop-opt">hg -a</option></command> your
    6.42 +	  role="hg-ext-mq-cmd-qpop-opt">-a</option></command> your
    6.43        patches again.  MQ will stop pushing any time it runs across a
    6.44        patch that fails to apply during conflicts, allowing you to fix
    6.45        your conflicts, <command role="hg-ext-mq">qrefresh</command> the
    6.46 @@ -1138,9 +1138,9 @@
    6.47  	  update</command> changes to patches or the <filename
    6.48  	  role="special">series</filename> file, you will have to
    6.49  	<command role="hg-cmd">hg qpop <option
    6.50 -	    role="hg-ext-mq-cmd-qpop-opt">hg -a</option></command> and
    6.51 +	    role="hg-ext-mq-cmd-qpop-opt">-a</option></command> and
    6.52  	then <command role="hg-cmd">hg qpush <option
    6.53 -	    role="hg-ext-mq-cmd-qpush-opt">hg -a</option></command> in
    6.54 +	    role="hg-ext-mq-cmd-qpush-opt">-a</option></command> in
    6.55  	the underlying repository to see those changes show up there.
    6.56  	If you forget to do this, you can confuse MQ's idea of which
    6.57  	patches are applied.</para>
     7.1 --- a/fr/ch00-preface.xml	Mon Sep 21 00:02:10 2009 +0200
     7.2 +++ b/fr/ch00-preface.xml	Tue Nov 24 11:44:49 2009 +0100
     7.3 @@ -2,7 +2,7 @@
     7.4  
     7.5  <preface id="chap:preface">
     7.6    <?dbhtml filename="preface.html"?>
     7.7 -  <title>Preface</title>
     7.8 +  <title>Préface</title>
     7.9  
    7.10    <sect1>
    7.11      <title>Un conte technique</title>
    7.12 @@ -14,15 +14,15 @@
    7.13  
    7.14      <para id="x_72f">Bien qu'à cette époque je passais beaucoup de temps
    7.15      à travailler sur les entrailles de Mercurial, je me suis mis à la 
    7.16 -    rédaction de ce livre parce que ça me semblait être la manière la plus efficace
    7.17 +    rédaction de ce livre parce qu'il me semblait la manière la plus efficace
    7.18      d'aider notre logiciel à atteindre un vaste auditoire, toujours avec 
    7.19 -    l'idée que la gestion de révisions devrait être distribuée par nature. J'ai 
    7.20 +    l'idée que la gestion de révision devrait être distribuée par nature. J'ai 
    7.21      publié ce libre en ligne sous une licence libre pour la même raison : pour 
    7.22      diffuser la parole auprès du monde.</para>
    7.23  
    7.24      <para id="x_730">Il y a un rythme familier à un bon livre sur un logiciel 
    7.25      qui ressemble de près au fait de conter une histoire : Pourquoi ceci est ? 
    7.26 -    Pourquoi ceci est important ? Comment peut il m'aider ? Comment m'en 
    7.27 +    Pourquoi ceci est important ? Comment peut-il m'aider ? Comment m'en 
    7.28      servir ? Dans ce livre, j'essaye de répondre à toutes ces questions pour
    7.29      la gestion de révisions distribuée en général, et pour Mercurial en 
    7.30      particulier.</para>
    7.31 @@ -55,23 +55,23 @@
    7.32      </para>
    7.33  
    7.34      <para id="x_734">Mes collègues et amis m'ont aidé et assisté de 
    7.35 -    de nombreuses manières. Cette liste de personne est nécessaire mais très
    7.36 +    de nombreuses manières. Cette liste de personnes est forcément très
    7.37      incomplète : Stephen Hahn, Karyn Ritter, Bonnie Corwin, James Vasile,
    7.38      Matt Norwood, Eben Moglen, Bradley Kuhn, Robert Walsh, Jeremy
    7.39      Fitzhardinge, Rachel Chalmers.</para>
    7.40  
    7.41      <para id="x_735">J'ai conçu ce livre de manière ouverte, en publiant
    7.42 -    des brouillons de chapitres du livre sur des site web, au fur et à 
    7.43 +    des brouillons des chapitres du livre sur des site web, au fur et à 
    7.44      mesure que je les réalisais. Leurs lecteurs m'ont fait des retours 
    7.45      utilisant l'application web que j'avais développée. A la fin de sa
    7.46      conception, plus de 100 personnes m'avaient fait des commentaires, 
    7.47 -    un chiffre incroyable quand on considère que ce système de 
    7.48 +    un chiffre incroyable quand l'on considère que ce système de 
    7.49      commentaire n'a tourné que dans les deux derniers mois de la 
    7.50      rédaction du livre.</para>
    7.51  
    7.52      <para id="x_736">J'aimerais particulièrement remercier les 
    7.53      personnes suivantes, dont les commentaires représentent plus
    7.54 -    d'un tiers de l'ensemble de ces derniers. Je voudrai les 
    7.55 +    d'un tiers de l'ensemble de ces derniers. Je voudrais les 
    7.56      remercier pour leurs attentions et efforts à me faire des retours
    7.57      très détaillés.</para>
    7.58  
     8.1 --- a/fr/ch12-mq.xml	Mon Sep 21 00:02:10 2009 +0200
     8.2 +++ b/fr/ch12-mq.xml	Tue Nov 24 11:44:49 2009 +0100
     8.3 @@ -438,7 +438,7 @@
     8.4  	<command role="hg-ext-mq">qpop</command> each operate on a
     8.5  	single patch at a time by default, you can push and pop many
     8.6  	patches in one go.  The <option
     8.7 -	  role="hg-ext-mq-cmd-qpush-opt">hg -a</option> option to
     8.8 +	  role="hg-ext-mq-cmd-qpush-opt">-a</option> option to
     8.9  	<command role="hg-ext-mq">qpush</command> causes it to push
    8.10  	all unapplied patches, while the <option
    8.11  	  role="hg-ext-mq-cmd-qpop-opt">-a</option> option to <command
    8.12 @@ -469,10 +469,10 @@
    8.13  	named <option>-f</option>.  The exact meaning of
    8.14  	<option>-f</option> depends on the command.  For example,
    8.15  	<command role="hg-cmd">hg qnew <option
    8.16 -	    role="hg-ext-mq-cmd-qnew-opt">hg -f</option></command>
    8.17 +	    role="hg-ext-mq-cmd-qnew-opt">-f</option></command>
    8.18  	will incorporate any outstanding changes into the new patch it
    8.19  	creates, but <command role="hg-cmd">hg qpop <option
    8.20 -	    role="hg-ext-mq-cmd-qpop-opt">hg -f</option></command>
    8.21 +	    role="hg-ext-mq-cmd-qpop-opt">-f</option></command>
    8.22  	will revert modifications to any files affected by the patch
    8.23  	that it is popping.  Be sure to read the documentation for a
    8.24  	command's <option>-f</option> option before you use it!</para>
    8.25 @@ -808,9 +808,9 @@
    8.26  
    8.27      <para id="x_404">On my old, slow laptop, I was able to <command
    8.28  	role="hg-cmd">hg qpush <option
    8.29 -	  role="hg-ext-mq-cmd-qpush-opt">hg -a</option></command> all
    8.30 +	  role="hg-ext-mq-cmd-qpush-opt">-a</option></command> all
    8.31        1,738 patches in 3.5 minutes, and <command role="hg-cmd">hg qpop
    8.32 -	<option role="hg-ext-mq-cmd-qpop-opt">hg -a</option></command>
    8.33 +	<option role="hg-ext-mq-cmd-qpop-opt">-a</option></command>
    8.34        them all in 30 seconds.  (On a newer laptop, the time to push
    8.35        all patches dropped to two minutes.)  I could <command
    8.36  	role="hg-ext-mq">qrefresh</command> one of the biggest patches
    8.37 @@ -866,7 +866,7 @@
    8.38  	  -a</option></command> your patches, then <command
    8.39  	role="hg-cmd">hg pull</command> changes into the underlying
    8.40        repository, and finally <command role="hg-cmd">hg qpush <option
    8.41 -	  role="hg-ext-mq-cmd-qpop-opt">hg -a</option></command> your
    8.42 +	  role="hg-ext-mq-cmd-qpop-opt">-a</option></command> your
    8.43        patches again.  MQ will stop pushing any time it runs across a
    8.44        patch that fails to apply during conflicts, allowing you to fix
    8.45        your conflicts, <command role="hg-ext-mq">qrefresh</command> the
    8.46 @@ -1138,9 +1138,9 @@
    8.47  	  update</command> changes to patches or the <filename
    8.48  	  role="special">series</filename> file, you will have to
    8.49  	<command role="hg-cmd">hg qpop <option
    8.50 -	    role="hg-ext-mq-cmd-qpop-opt">hg -a</option></command> and
    8.51 +	    role="hg-ext-mq-cmd-qpop-opt">-a</option></command> and
    8.52  	then <command role="hg-cmd">hg qpush <option
    8.53 -	    role="hg-ext-mq-cmd-qpush-opt">hg -a</option></command> in
    8.54 +	    role="hg-ext-mq-cmd-qpush-opt">-a</option></command> in
    8.55  	the underlying repository to see those changes show up there.
    8.56  	If you forget to do this, you can confuse MQ's idea of which
    8.57  	patches are applied.</para>
     9.1 Binary file it/figs/caution.png has changed
    10.1 Binary file it/figs/note.png has changed
    11.1 Binary file it/figs/tip.png has changed
    12.1 Binary file it/figs/warning.png has changed
    13.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    13.2 +++ b/plastex-theme/README.txt	Tue Nov 24 11:44:49 2009 +0100
    13.3 @@ -0,0 +1,12 @@
    13.4 +This is a theme designed to use with the plasTeX page template
    13.5 +renderer to generate commentable documents.
    13.6 +
    13.7 +To "install" it, symlink this folder from the plasTeX XHTML Themes
    13.8 +folder. Example:
    13.9 +
   13.10 +faraday:/usr/lib/pymodules/python2.5/plasTeX/Renderers/XHTML/Themes#
   13.11 +ln -s (this folder) alqua
   13.12 +
   13.13 +Usage example:
   13.14 +
   13.15 +$ plastex --theme=alqua --split-level=0 mylatex.tex
    14.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    14.2 +++ b/plastex-theme/default-layout.html	Tue Nov 24 11:44:49 2009 +0100
    14.3 @@ -0,0 +1,145 @@
    14.4 +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    14.5 +<html tal:define="links self/links" 
    14.6 +      xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    14.7 +  <head>
    14.8 +
    14.9 +    <meta name="generator" content="plasTeX" />
   14.10 +    <meta http-equiv="content-type"
   14.11 +          tal:attributes="content string:text/html;; charset=${config/files/output-encoding}" />
   14.12 +
   14.13 +    <title tal:condition="python:path('self/level') &gt; -10"
   14.14 +           tal:content="stripped string:${links/document/title}: ${self/title}">
   14.15 +      Book title
   14.16 +    </title>
   14.17 +    <link tal:condition="links/next" 
   14.18 +          rel="next" 
   14.19 +          tal:attributes="href links/next/url; title links/next/title/textContent" />
   14.20 +    <link tal:condition="links/prev" 
   14.21 +          rel="prev" 
   14.22 +          tal:attributes="href links/prev/url; title links/prev/title/textContent" />
   14.23 +    <link tal:condition="links/up" 
   14.24 +          rel="up" 
   14.25 +          tal:attributes="href links/up/url; title links/up/title/textContent" />
   14.26 +
   14.27 +    <link rel="stylesheet" href="styles/styles.css"/>
   14.28 +    <link rel="stylesheet" href="/support/styles/styles.css"/>
   14.29 +
   14.30 +    <link rel="alternate" type="application/atom+xml" title="Comments"
   14.31 +          href="/feeds/comments/"/>
   14.32 +    <link rel="shortcut icon" type="image/png"
   14.33 +          href="/support/figs/favicon.png"/>
   14.34 +
   14.35 +    <script type="text/javascript" src="/support/javascript/jquery.js"></script>
   14.36 +    <script type="text/javascript" src="/support/javascript/form-min.js"></script>
   14.37 +
   14.38 +  </head>
   14.39 +
   14.40 +  <body>
   14.41 +
   14.42 +    <div class="navheader"><h2 class="booktitle">
   14.43 +        <tal:booktitle replace="links/document/title" />
   14.44 +        <div class="authors">by 
   14.45 +          <tal:author tal:content="links/document/attributes/author">
   14.46 +            Author
   14.47 +          </tal:author>
   14.48 +        </div>
   14.49 +      </h2>
   14.50 +    </div>
   14.51 +
   14.52 +    <div class="navheader" metal:define-macro="navigation">
   14.53 +      <table width="100%">
   14.54 +        <tr>
   14.55 +          <td width="40%" align="left">
   14.56 +            <a tal:condition="links/prev"
   14.57 +               tal:attributes="href links/prev/url;
   14.58 +                               title stripped:links/prev/title"
   14.59 +               accesskey="p">Prev</a> </td>
   14.60 +          <td width="20%" align="center"> 
   14.61 +            <a tal:condition="links/up"
   14.62 +               tal:attributes="href links/up/url">Up</a>
   14.63 +          </td>
   14.64 +          <td width="40%" align="right"> 
   14.65 +            <a tal:condition="links/next"
   14.66 +               tal:attributes="href links/next/url;
   14.67 +                               title stripped:links/next/title"
   14.68 +               accesskey="n">Next</a>
   14.69 +          </td>
   14.70 +        </tr>
   14.71 +        <tr>
   14.72 +          <td width="40%" align="left">
   14.73 +            <span tal:condition="links/prev"
   14.74 +               tal:replace="stripped:links/prev/title">Prev</span>
   14.75 +          </td>
   14.76 +          <td width="20%" align="center"> </td>
   14.77 +          <td width="40%" align="right"> 
   14.78 +            <span tal:condition="links/next"
   14.79 +               tal:replace="stripped:links/next/title">Next</span>
   14.80 +          </td>
   14.81 +        </tr>
   14.82 +      </table>
   14.83 +    </div>
   14.84 +
   14.85 +    <div class="chapter" 
   14.86 +         tal:attributes="id string:${links/document/title}: ${self/title}">
   14.87 +      
   14.88 +      <div class="file_contents" tal:content="self">File contents.</div>
   14.89 +      
   14.90 +      <div tal:condition="self/tableofcontents" 
   14.91 +           tal:attributes="class
   14.92 +                           string:contents
   14.93 +                           ${self/nodeName}-contents">
   14.94 +        <ul>
   14.95 +          <li tal:repeat="section self/tableofcontents"><a href="." tal:attributes="href section/url" tal:content="section/fullTocEntry">Aliquam est. Aliquam fringilla pede</a>
   14.96 +            <ul tal:condition="section/tableofcontents">
   14.97 +              <li tal:repeat="subsection section/tableofcontents"><a href="." tal:attributes="href subsection/url" tal:content="subsection/fullTocEntry"></a>
   14.98 +                <ul tal:condition="subsection/tableofcontents">
   14.99 +                  <li tal:repeat="subsubsection subsection/tableofcontents"><a href="." tal:attributes="href subsubsection/url" tal:content="subsubsection/fullTocEntry"></a>
  14.100 +                    <ul tal:condition="subsubsection/tableofcontents">
  14.101 +                      <li tal:repeat="paragraph subsubsection/tableofcontents"><a href="." tal:attributes="href paragraph/url" tal:content="paragraph/fullTocEntry"></a>
  14.102 +                        <ul tal:condition="paragraph/tableofcontents">
  14.103 +                          <li tal:repeat="subparagraph paragraph/tableofcontents"><a href="." tal:attributes="href subparagraph/url" tal:content="subparagraph/fullTocEntry"></a></li>
  14.104 +                        </ul>
  14.105 +                      </li>
  14.106 +                    </ul>
  14.107 +                  </li>
  14.108 +                </ul>
  14.109 +              </li>
  14.110 +            </ul>
  14.111 +          </li>
  14.112 +          <li tal:replace="nothing"><a href=".">Maecenas id purus</a></li>
  14.113 +        </ul>
  14.114 +      </div>
  14.115 +
  14.116 +
  14.117 +      <div id="footnotes" tal:condition="self/footnotes">
  14.118 +        <p><b>Footnotes</b></p>
  14.119 +        <ol>
  14.120 +          <li tal:repeat="footnote self/footnotes" 
  14.121 +              tal:content="footnote" 
  14.122 +              tal:attributes="id footnote/id">footnote text</li>
  14.123 +        </ol>
  14.124 +      </div>
  14.125 +
  14.126 +    </div>
  14.127 +
  14.128 +    <div class="navfooter"
  14.129 +	 metal:use-macro="template/macros/navigation" />
  14.130 +
  14.131 +    <div class="hgbookfooter"> <p><img src="/support/icons/rss.png"> Want to stay
  14.132 +	up to date? Subscribe to the comment feed for the 
  14.133 +        <a class="feed"
  14.134 +	   href="/feeds/comments/">entire book</a>.</p> 
  14.135 +      <p>Icons by
  14.136 +	<a href="mailto:mattahan@gmail.com">Paul Davey</a> aka 
  14.137 +        <a href="http://mattahan.deviantart.com/">Mattahan</a>.</p>
  14.138 +      </div>
  14.139 +
  14.140 +  </body>
  14.141 +
  14.142 +  <script language="javascript" src="icons/imgadjust.js"
  14.143 +	  type="text/javascript">
  14.144 +  </script>
  14.145 +  <script type="text/javascript" src="/support/javascript/hsbook.js">
  14.146 +  </script>
  14.147 +
  14.148 +</html>
    15.1 --- a/po/zh.po	Mon Sep 21 00:02:10 2009 +0200
    15.2 +++ b/po/zh.po	Tue Nov 24 11:44:49 2009 +0100
    15.3 @@ -42,7 +42,7 @@
    15.4  msgstr ""
    15.5  "Project-Id-Version: hgbook 1.2\n"
    15.6  "POT-Creation-Date: 2009-05-21 14:26+0800\n"
    15.7 -"PO-Revision-Date: 2009-05-21 16:42+0800\n"
    15.8 +"PO-Revision-Date: 2009-10-21 16:42+0800\n"
    15.9  "Last-Translator: 宋冬生 <songdonogsheng@live.cn>\n"
   15.10  "Language-Team: Simplified Chinese <i18n-zh@googlegroups.com >\n"
   15.11  "MIME-Version: 1.0\n"
   15.12 @@ -2372,7 +2372,7 @@
   15.13  #. type: Content of: <book><chapter><title>
   15.14  #: ../en/ch01-intro.xml:5
   15.15  msgid "How did we get here?"
   15.16 -msgstr ""
   15.17 +msgstr "写在前面"
   15.18  
   15.19  #. type: Content of: <book><chapter><sect1><title>
   15.20  #: ../en/ch01-intro.xml:8
    16.1 --- a/stylesheets/fo.xsl	Mon Sep 21 00:02:10 2009 +0200
    16.2 +++ b/stylesheets/fo.xsl	Tue Nov 24 11:44:49 2009 +0100
    16.3 @@ -1,8 +1,12 @@
    16.4  <?xml version="1.0"?>
    16.5 -<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version='1.0'>
    16.6 +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    16.7 +      xmlns:fo="http://www.w3.org/1999/XSL/Format"
    16.8 +      version='1.0'>
    16.9  
   16.10    <xsl:import href="http://docbook.sourceforge.net/release/xsl/current/fo/docbook.xsl"/>
   16.11  
   16.12 +  <xsl:param name="l10n.gentext.language" select="'en'"/>
   16.13 +  <xsl:param name="paper.type" select="'A4'"></xsl:param>
   16.14    <xsl:param name="draft.mode" select="no"/>
   16.15  
   16.16    <!-- These extensions are required for table printing and other stuff -->
   16.17 @@ -22,42 +26,24 @@
   16.18    <xsl:param name="section.autolabel" select="1" />
   16.19    <xsl:param name="section.label.includes.component.label">1</xsl:param>
   16.20  
   16.21 -  <xsl:param name="variablelist.as.blocks" select="1" />        <!-- fo only -->
   16.22 -  <xsl:param name="hyphenate">false</xsl:param>                 <!-- fo only -->
   16.23 -  <xsl:param name="paper.type" select="'A4'"></xsl:param>       <!-- fo only -->
   16.24 +  <xsl:param name="variablelist.as.blocks" select="1" />
   16.25 +  <xsl:param name="hyphenate">false</xsl:param>
   16.26  
   16.27 -  <!-- Default font settings -->
   16.28 -  <!--
   16.29 -  <xsl:param name="title.font.family">sans-serif</xsl:param>
   16.30 -  <xsl:param name="body.font.family">serif</xsl:param>
   16.31 -  <xsl:param name="sans.font.family">sans-serif</xsl:param>
   16.32 -  <xsl:param name="dingbat.font.family">serif</xsl:param>
   16.33 -  <xsl:param name="monospace.font.family">monospace</xsl:param>
   16.34 +  <!-- Font settings, we use characters out of base14 even for english -->
   16.35 +  <xsl:param name="title.font.family">sans-serif,Arial</xsl:param>
   16.36 +  <xsl:param name="body.font.family">serif,Times New Roman</xsl:param>
   16.37 +  <xsl:param name="sans.font.family">sans-serif,Arial</xsl:param>
   16.38 +  <xsl:param name="dingbat.font.family">serif,Times New Roman</xsl:param>
   16.39 +  <xsl:param name="monospace.font.family">monospace,Courier New</xsl:param>
   16.40    <xsl:param name="symbol.font.family">Symbol,ZapfDingbats</xsl:param>
   16.41 -  -->
   16.42  
   16.43 -  <!-- Custom font settings - preferred truetype font -->
   16.44 -  <xsl:param name="title.font.family">Calibri,sans-serif,SimHei</xsl:param>
   16.45 -  <xsl:param name="body.font.family">Cambria,Cambria Math,serif,SimSun</xsl:param>
   16.46 -  <xsl:param name="sans.font.family">Calibri,sans-serif,SimHei</xsl:param>
   16.47 -  <xsl:param name="dingbat.font.family">Cambria,Cambria Math,serif,SimSun</xsl:param>
   16.48 -  <xsl:param name="monospace.font.family">Courier New,monospace,FangSong</xsl:param>
   16.49 -
   16.50 -  <!-- Page related Settings -->
   16.51 +  <!-- Page related settings -->
   16.52    <xsl:param name="page.margin.inner">1.5cm</xsl:param>
   16.53    <xsl:param name="page.margin.outer">1.5cm</xsl:param>
   16.54    <xsl:param name="title.margin.left">0pt</xsl:param>
   16.55    <xsl:param name="body.start.indent">24pt</xsl:param>
   16.56    <xsl:param name="body.end.indent">0pt</xsl:param>
   16.57  
   16.58 -  <!-- Breaking long lines -->
   16.59 -  <xsl:param name="hyphenate.verbatim">0</xsl:param>
   16.60 -  <xsl:attribute-set name="monospace.verbatim.properties"
   16.61 -                     use-attribute-sets="verbatim.properties monospace.properties">
   16.62 -    <xsl:attribute name="wrap-option">wrap</xsl:attribute>
   16.63 -    <xsl:attribute name="hyphenation-character">&#x25BA;</xsl:attribute>
   16.64 -  </xsl:attribute-set>
   16.65 -
   16.66    <!-- Prevent blank pages in output -->
   16.67    <xsl:template name="book.titlepage.before.verso">
   16.68    </xsl:template>
   16.69 @@ -66,6 +52,105 @@
   16.70    <xsl:template name="book.titlepage.separator">
   16.71    </xsl:template>
   16.72  
   16.73 +  <!-- titlepage settings -->
   16.74 +  <xsl:template name="book.titlepage">
   16.75 +    <fo:block>
   16.76 +        <fo:table table-layout="fixed" space-after.optimum="10pt" width="100%">
   16.77 +            <fo:table-body>
   16.78 +                <fo:table-row>
   16.79 +                    <fo:table-cell>
   16.80 +                        <fo:block text-align="center">
   16.81 +                          <!--fo:external-graphic src="url(figs/cover-logo.png)"
   16.82 +                              width="90%"  height="auto" content-width="scale-to-fit" content-height="scale-to-fit" /-->
   16.83 +                        </fo:block>
   16.84 +                    </fo:table-cell>
   16.85 +                </fo:table-row>
   16.86 +            </fo:table-body>
   16.87 +        </fo:table>
   16.88 +    </fo:block>
   16.89 +
   16.90 +    <fo:block text-align="center" color="#000000" margin-left="1cm" margin-right="1cm"
   16.91 +        space-before.optimum="3cm" space-after.optimum="5.0cm"
   16.92 +        font-weight="900" font-size="32pt">
   16.93 +      <xsl:attribute name="font-family"><xsl:value-of select="$title.font.family" /></xsl:attribute>
   16.94 +
   16.95 +      <xsl:value-of select="/book/title"/>
   16.96 +    </fo:block>
   16.97 +
   16.98 +    <fo:block text-align="center" color="#000080" margin-left="1cm" margin-right="1cm"
   16.99 +        space-before.optimum="2cm" space-after.optimum="8.0cm"
  16.100 +        font-weight="900" font-size="16pt">
  16.101 +      <xsl:attribute name="font-family"><xsl:value-of select="$title.font.family" /></xsl:attribute>
  16.102 +
  16.103 +      <xsl:value-of select="/book/subtitle"/>
  16.104 +    </fo:block>
  16.105 +
  16.106 +    <fo:block text-align="center" color="#000000" margin-left="1cm" margin-right="1cm"
  16.107 +        space-before.optimum="8cm" space-after.optimum="10cm"
  16.108 +        font-weight="600" font-size="24pt">
  16.109 +      <xsl:attribute name="font-family"><xsl:value-of select="$title.font.family" /></xsl:attribute>
  16.110 +
  16.111 +      <xsl:call-template name="person.name.list">
  16.112 +        <xsl:with-param name="person.list" select="bookinfo/authorgroup/author"/>
  16.113 +      </xsl:call-template>
  16.114 +    </fo:block>
  16.115 +
  16.116 +    <!--fo:block text-align="end"    color="#666D70" margin-left="1cm" margin-right="1cm"
  16.117 +        font-family="sans-serif" font-weight="normal" font-size="10pt" >
  16.118 +      <xsl:value-of select="/book/subtitle"/>
  16.119 +    </fo:block-->
  16.120 +  </xsl:template>
  16.121 +
  16.122 +  <!-- title settings -->
  16.123 +  <xsl:attribute-set name="preface.titlepage.recto.style">
  16.124 +    <xsl:attribute name="color">#7C1C51</xsl:attribute>
  16.125 +  </xsl:attribute-set>
  16.126 +  <xsl:attribute-set name="chapter.titlepage.recto.style">
  16.127 +    <xsl:attribute name="color">#7C1C51</xsl:attribute>
  16.128 +  </xsl:attribute-set>
  16.129 +  <xsl:attribute-set name="section.titlepage.recto.style">
  16.130 +    <xsl:attribute name="color">#7C1C51</xsl:attribute>
  16.131 +  </xsl:attribute-set>
  16.132 +  <xsl:attribute-set name="appendix.titlepage.recto.style">
  16.133 +    <xsl:attribute name="color">#7C1C51</xsl:attribute>
  16.134 +  </xsl:attribute-set>
  16.135 +
  16.136 +  <!-- Verbatim related settings -->
  16.137 +  <xsl:param name="hyphenate.verbatim">0</xsl:param>
  16.138 +
  16.139 +  <xsl:attribute-set name="monospace.properties">
  16.140 +    <xsl:attribute name="font-family">
  16.141 +      <xsl:value-of select="$monospace.font.family"/>
  16.142 +    </xsl:attribute>
  16.143 +      <xsl:attribute name="color">#000080</xsl:attribute>
  16.144 +  </xsl:attribute-set>
  16.145 +
  16.146 +  <xsl:attribute-set name="monospace.verbatim.properties"
  16.147 +                     use-attribute-sets="verbatim.properties monospace.properties">
  16.148 +    <xsl:attribute name="border-color">blue</xsl:attribute>
  16.149 +    <xsl:attribute name="border-width">thin</xsl:attribute>
  16.150 +    <xsl:attribute name="border-style">solid</xsl:attribute>
  16.151 +    <xsl:attribute name="font-size">8pt</xsl:attribute>
  16.152 +    <xsl:attribute name="wrap-option">wrap</xsl:attribute>
  16.153 +    <xsl:attribute name="hyphenation-character">&#x25BA;</xsl:attribute>
  16.154 +    <!--xsl:attribute name="hyphenation-character">&#x27A4;</xsl:attribute-->
  16.155 +  </xsl:attribute-set>
  16.156 +
  16.157 +  <!-- emphasis settings -->
  16.158 +  <xsl:template match="emphasis">
  16.159 +    <xsl:param name="content">
  16.160 +      <xsl:call-template name="simple.xlink">
  16.161 +        <xsl:with-param name="content">
  16.162 +          <xsl:apply-templates/>
  16.163 +        </xsl:with-param>
  16.164 +      </xsl:call-template>
  16.165 +    </xsl:param>
  16.166 +
  16.167 +    <fo:inline color="#7C1C51" font-weight="bold">
  16.168 +      <xsl:copy-of select="$content"/>
  16.169 +    </fo:inline>
  16.170 +  </xsl:template>
  16.171 +
  16.172    <!-- Colourize links in output -->
  16.173    <xsl:attribute-set name="xref.properties">
  16.174      <xsl:attribute name="color">
    17.1 --- a/stylesheets/zh/fo.xsl	Mon Sep 21 00:02:10 2009 +0200
    17.2 +++ b/stylesheets/zh/fo.xsl	Tue Nov 24 11:44:49 2009 +0100
    17.3 @@ -8,6 +8,13 @@
    17.4    <xsl:param name="l10n.gentext.language" select="'zh'"/>
    17.5  
    17.6    <!-- Chinese font related settings -->
    17.7 +  <xsl:param name="title.font.family">Calibri,sans-serif,SimHei</xsl:param>
    17.8 +  <xsl:param name="body.font.family">Cambria,Cambria Math,serif,SimSun</xsl:param>
    17.9 +  <xsl:param name="sans.font.family">Calibri,sans-serif,SimHei</xsl:param>
   17.10 +  <xsl:param name="dingbat.font.family">Cambria,Cambria Math,serif,SimSun</xsl:param>
   17.11 +  <xsl:param name="monospace.font.family">Courier New,monospace,FangSong</xsl:param>
   17.12 +
   17.13 +  <!-- Chinese para related settings -->
   17.14    <xsl:param name="body.font.master">12</xsl:param>
   17.15  
   17.16    <xsl:attribute-set name="standard.para.spacing" use-attribute-sets="normal.para.spacing">
    18.1 --- a/web/hgbook/__init__.py	Mon Sep 21 00:02:10 2009 +0200
    18.2 +++ b/web/hgbook/__init__.py	Tue Nov 24 11:44:49 2009 +0100
    18.3 @@ -0,0 +1,1 @@
    18.4 +import admin
    19.1 --- a/web/hgbook/admin.py	Mon Sep 21 00:02:10 2009 +0200
    19.2 +++ b/web/hgbook/admin.py	Tue Nov 24 11:44:49 2009 +0100
    19.3 @@ -8,12 +8,13 @@
    19.4      date_hierarchy = 'date'
    19.5      list_filter = ['date', 'submitter_name']
    19.6      search_fields = ['title', 'submitter_name', 'submitter_url']
    19.7 -    fields = (
    19.8 +    fieldsets = (
    19.9          (None, {'fields': ('submitter_name', 'element', 'comment')}),
   19.10 -        ('Review and presentation state',
   19.11 -         {'fields': ('reviewed', 'hidden')}),
   19.12 -        ('Other info', {'fields': ('date', 'submitter_url', 'ip')}),
   19.13 +        ('Review and presentation state', {'fields': ('reviewed', 'hidden')}),
   19.14 +        ('Other info', {'fields': ('submitter_url', 'ip')}),
   19.15          )
   19.16 +    # XXX: adding 'date' to the 'Other info' fieldset results in a
   19.17 +    # ImproperlyConfigured error. :S
   19.18  
   19.19  class ElementAdmin(admin.ModelAdmin):
   19.20      search_fields = ['id', 'chapter']
    20.1 --- a/web/hgbook/comments/models.py	Mon Sep 21 00:02:10 2009 +0200
    20.2 +++ b/web/hgbook/comments/models.py	Tue Nov 24 11:44:49 2009 +0100
    20.3 @@ -6,7 +6,7 @@
    20.4  class Element(models.Model):
    20.5      id = models.CharField('ID attribute', max_length=64, editable=False,
    20.6                            primary_key=True)
    20.7 -    chapter = models.CharField('Chapter ID', max_length=64, editable=False,
    20.8 +    chapter = models.CharField('Chapter ID', max_length=100, editable=False,
    20.9                                 db_index=True)
   20.10      title = models.CharField('Section title', max_length=256, editable=False)
   20.11  
    21.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    21.2 +++ b/web/hgbook/converter.py	Tue Nov 24 11:44:49 2009 +0100
    21.3 @@ -0,0 +1,52 @@
    21.4 +from lxml import etree
    21.5 +from lxml import html
    21.6 +from lxml.cssselect import CSSSelector
    21.7 +import md5
    21.8 +import sys
    21.9 +
   21.10 +
   21.11 +args = sys.argv[1:]
   21.12 +
   21.13 +# django stuff
   21.14 +from django.core.management import setup_environ
   21.15 +import settings # Assumed to be in the same directory.
   21.16 +setup_environ(settings)       # ugly django collateral effects :(
   21.17 +from comments.models import Element
   21.18 +
   21.19 +doc_id = 'MMSC'
   21.20 +sel = CSSSelector('div.chapter p, pre, h1, table.equation')
   21.21 +chapter_sel = CSSSelector('div.chapter')
   21.22 +
   21.23 +try:
   21.24 +    filename = args[0]
   21.25 +except IndexError:
   21.26 +    raise IndexError("Usage: %s <path-to-html-file>" % __file__)
   21.27 +
   21.28 +tree = etree.parse(filename, html.HTMLParser(remove_blank_text=True))
   21.29 +root = tree.getroot()
   21.30 +
   21.31 +chapter = chapter_sel(root)[0]
   21.32 +chapter_title = chapter.get('id').split(':')[1]
   21.33 +chapter_hash = md5.new(chapter.get('id').encode('utf8')).hexdigest()
   21.34 +
   21.35 +chapter.set('id', chapter_hash)
   21.36 +
   21.37 +for element in sel(root):
   21.38 +    hsh_source = element.text or element.get('alt') or etree.tostring(element)
   21.39 +
   21.40 +    if hsh_source:
   21.41 +        hsh_source_encoded = hsh_source.encode('utf8')
   21.42 +        hsh = md5.new(hsh_source_encoded).hexdigest()
   21.43 +        element.set('id', '%s-%s' % (chapter_hash, hsh))
   21.44 +    
   21.45 +        # create the commentable element in the DB
   21.46 +        e = Element()
   21.47 +        e.id = '%s-%s' % (chapter_hash, hsh)
   21.48 +        e.chapter = chapter_hash
   21.49 +        e.title = chapter_title
   21.50 +        e.save()
   21.51 +
   21.52 +
   21.53 +
   21.54 +print etree.tostring(root)      # pipe to a file if you wish
   21.55 +
    22.1 --- a/web/hgbook/settings.py	Mon Sep 21 00:02:10 2009 +0200
    22.2 +++ b/web/hgbook/settings.py	Tue Nov 24 11:44:49 2009 +0100
    22.3 @@ -6,7 +6,7 @@
    22.4  TEMPLATE_DEBUG = DEBUG
    22.5  
    22.6  ADMINS = (
    22.7 -    ("Bryan O'Sullivan", 'bos@serpentine.com'),
    22.8 +    ("Bryan O'Sullivan", 'bos@localhost'),
    22.9  )
   22.10  
   22.11  MANAGERS = ADMINS
    23.1 --- a/web/hgbook/urls.py	Mon Sep 21 00:02:10 2009 +0200
    23.2 +++ b/web/hgbook/urls.py	Tue Nov 24 11:44:49 2009 +0100
    23.3 @@ -1,4 +1,4 @@
    23.4 -import os
    23.5 +import os, sys
    23.6  from django.conf.urls.defaults import *
    23.7  import hgbook.comments.feeds as feeds
    23.8  from django.contrib import admin
    23.9 @@ -16,9 +16,12 @@
   23.10       {'feed_dict': feeds}),          
   23.11  
   23.12      # Only uncomment this for local testing without Apache.
   23.13 -    # (r'^html/(?P<path>.*)$', 'django.views.static.serve',
   23.14 -    # {'document_root': os.path.realpath(os.path.dirname(
   23.15 -    #    sys.modules[__name__].__file__) + '/../../en/html'),
   23.16 +     (r'^html/(?P<path>.*)$', 'django.views.static.serve',
   23.17 +     {'document_root': os.path.realpath(os.path.dirname(
   23.18 +        sys.modules[__name__].__file__) + '/../html')}),
   23.19 +     (r'^support/(?P<path>.*)$', 'django.views.static.serve',
   23.20 +     {'document_root': os.path.realpath(os.path.dirname(
   23.21 +        sys.modules[__name__].__file__) + '/../support')}),
   23.22  
   23.23      # Uncomment this for admin:
   23.24      (r'^admin/(.*)', admin.site.root),
    24.1 Binary file web/icons/caution.png has changed
    25.1 Binary file web/icons/favicon.png has changed
    26.1 Binary file web/icons/important.png has changed
    27.1 Binary file web/icons/note.png has changed
    28.1 Binary file web/icons/remark.png has changed
    29.1 Binary file web/icons/rss.png has changed
    30.1 Binary file web/icons/shell.png has changed
    31.1 Binary file web/icons/source.png has changed
    32.1 Binary file web/icons/tip.png has changed
    33.1 Binary file web/icons/warning.png has changed
    34.1 --- a/web/javascript/form-min.js	Mon Sep 21 00:02:10 2009 +0200
    34.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    34.3 @@ -1,1 +0,0 @@
    34.4 -(function($){$.fn.ajaxSubmit=function(_2){if(typeof _2=="function"){_2={success:_2};}_2=$.extend({url:this.attr("action")||window.location,type:this.attr("method")||"GET"},_2||{});var _3={};$.event.trigger("form.pre.serialize",[this,_2,_3]);if(_3.veto){return this;}var a=this.formToArray(_2.semantic);if(_2.data){for(var n in _2.data){a.push({name:n,value:_2.data[n]});}}if(_2.beforeSubmit&&_2.beforeSubmit(a,this,_2)===false){return this;}$.event.trigger("form.submit.validate",[a,this,_2,_3]);if(_3.veto){return this;}var q=$.param(a);if(_2.type.toUpperCase()=="GET"){_2.url+=(_2.url.indexOf("?")>=0?"&":"?")+q;_2.data=null;}else{_2.data=q;}var _7=this,callbacks=[];if(_2.resetForm){callbacks.push(function(){_7.resetForm();});}if(_2.clearForm){callbacks.push(function(){_7.clearForm();});}if(!_2.dataType&&_2.target){var _8=_2.success||function(){};callbacks.push(function(_9){if(this.evalScripts){$(_2.target).attr("innerHTML",_9).evalScripts().each(_8,arguments);}else{$(_2.target).html(_9).each(_8,arguments);}});}else{if(_2.success){callbacks.push(_2.success);}}_2.success=function(_a,_b){for(var i=0,max=callbacks.length;i<max;i++){callbacks[i](_a,_b,_7);}};var _d=$("input:file",this).fieldValue();var _e=false;for(var j=0;j<_d.length;j++){if(_d[j]){_e=true;}}if(_2.iframe||_e){fileUpload();}else{$.ajax(_2);}$.event.trigger("form.submit.notify",[this,_2]);return this;function fileUpload(){var _10=_7[0];var _11=$.extend({},$.ajaxSettings,_2);var id="jqFormIO"+$.fn.ajaxSubmit.counter++;var $io=$("<iframe id=\""+id+"\" name=\""+id+"\" />");var io=$io[0];var op8=$.browser.opera&&window.opera.version()<9;if($.browser.msie||op8){io.src="javascript:false;document.write(\"\");";}$io.css({position:"absolute",top:"-1000px",left:"-1000px"});var xhr={responseText:null,responseXML:null,status:0,statusText:"n/a",getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){}};var g=_11.global;if(g&&!$.active++){$.event.trigger("ajaxStart");}if(g){$.event.trigger("ajaxSend",[xhr,_11]);}var _18=0;var _19=0;setTimeout(function(){$io.appendTo("body");io.attachEvent?io.attachEvent("onload",cb):io.addEventListener("load",cb,false);var _1a=_10.encoding?"encoding":"enctype";var t=_7.attr("target");_7.attr({target:id,method:"POST",action:_11.url});_10[_1a]="multipart/form-data";if(_11.timeout){setTimeout(function(){_19=true;cb();},_11.timeout);}_10.submit();_7.attr("target",t);},10);function cb(){if(_18++){return;}io.detachEvent?io.detachEvent("onload",cb):io.removeEventListener("load",cb,false);var ok=true;try{if(_19){throw "timeout";}var _1d,doc;doc=io.contentWindow?io.contentWindow.document:io.contentDocument?io.contentDocument:io.document;xhr.responseText=doc.body?doc.body.innerHTML:null;xhr.responseXML=doc.XMLDocument?doc.XMLDocument:doc;if(_11.dataType=="json"||_11.dataType=="script"){var ta=doc.getElementsByTagName("textarea")[0];_1d=ta?ta.value:xhr.responseText;if(_11.dataType=="json"){eval("data = "+_1d);}else{$.globalEval(_1d);}}else{if(_11.dataType=="xml"){_1d=xhr.responseXML;if(!_1d&&xhr.responseText!=null){_1d=toXml(xhr.responseText);}}else{_1d=xhr.responseText;}}}catch(e){ok=false;$.handleError(_11,xhr,"error",e);}if(ok){_11.success(_1d,"success");if(g){$.event.trigger("ajaxSuccess",[xhr,_11]);}}if(g){$.event.trigger("ajaxComplete",[xhr,_11]);}if(g&&!--$.active){$.event.trigger("ajaxStop");}if(_11.complete){_11.complete(xhr,ok?"success":"error");}setTimeout(function(){$io.remove();xhr.responseXML=null;},100);}function toXml(s,doc){if(window.ActiveXObject){doc=new ActiveXObject("Microsoft.XMLDOM");doc.async="false";doc.loadXML(s);}else{doc=(new DOMParser()).parseFromString(s,"text/xml");}return (doc&&doc.documentElement&&doc.documentElement.tagName!="parsererror")?doc:null;}}};$.fn.ajaxSubmit.counter=0;$.fn.ajaxForm=function(_21){return this.ajaxFormUnbind().submit(submitHandler).each(function(){this.formPluginId=$.fn.ajaxForm.counter++;$.fn.ajaxForm.optionHash[this.formPluginId]=_21;$(":submit,input:image",this).click(clickHandler);});};$.fn.ajaxForm.counter=1;$.fn.ajaxForm.optionHash={};function clickHandler(e){var _23=this.form;_23.clk=this;if(this.type=="image"){if(e.offsetX!=undefined){_23.clk_x=e.offsetX;_23.clk_y=e.offsetY;}else{if(typeof $.fn.offset=="function"){var _24=$(this).offset();_23.clk_x=e.pageX-_24.left;_23.clk_y=e.pageY-_24.top;}else{_23.clk_x=e.pageX-this.offsetLeft;_23.clk_y=e.pageY-this.offsetTop;}}}setTimeout(function(){_23.clk=_23.clk_x=_23.clk_y=null;},10);}function submitHandler(){var id=this.formPluginId;var _26=$.fn.ajaxForm.optionHash[id];$(this).ajaxSubmit(_26);return false;}$.fn.ajaxFormUnbind=function(){this.unbind("submit",submitHandler);return this.each(function(){$(":submit,input:image",this).unbind("click",clickHandler);});};$.fn.formToArray=function(_27){var a=[];if(this.length==0){return a;}var _29=this[0];var els=_27?_29.getElementsByTagName("*"):_29.elements;if(!els){return a;}for(var i=0,max=els.length;i<max;i++){var el=els[i];var n=el.name;if(!n){continue;}if(_27&&_29.clk&&el.type=="image"){if(!el.disabled&&_29.clk==el){a.push({name:n+".x",value:_29.clk_x},{name:n+".y",value:_29.clk_y});}continue;}var v=$.fieldValue(el,true);if(v&&v.constructor==Array){for(var j=0,jmax=v.length;j<jmax;j++){a.push({name:n,value:v[j]});}}else{if(v!==null&&typeof v!="undefined"){a.push({name:n,value:v});}}}if(!_27&&_29.clk){var _30=_29.getElementsByTagName("input");for(var i=0,max=_30.length;i<max;i++){var _32=_30[i];var n=_32.name;if(n&&!_32.disabled&&_32.type=="image"&&_29.clk==_32){a.push({name:n+".x",value:_29.clk_x},{name:n+".y",value:_29.clk_y});}}}return a;};$.fn.formSerialize=function(_34){return $.param(this.formToArray(_34));};$.fn.fieldSerialize=function(_35){var a=[];this.each(function(){var n=this.name;if(!n){return;}var v=$.fieldValue(this,_35);if(v&&v.constructor==Array){for(var i=0,max=v.length;i<max;i++){a.push({name:n,value:v[i]});}}else{if(v!==null&&typeof v!="undefined"){a.push({name:this.name,value:v});}}});return $.param(a);};$.fn.fieldValue=function(_3a){for(var val=[],i=0,max=this.length;i<max;i++){var el=this[i];var v=$.fieldValue(el,_3a);if(v===null||typeof v=="undefined"||(v.constructor==Array&&!v.length)){continue;}v.constructor==Array?$.merge(val,v):val.push(v);}return val;};$.fieldValue=function(el,_3f){var n=el.name,t=el.type,tag=el.tagName.toLowerCase();if(typeof _3f=="undefined"){_3f=true;}if(_3f&&(!n||el.disabled||t=="reset"||t=="button"||(t=="checkbox"||t=="radio")&&!el.checked||(t=="submit"||t=="image")&&el.form&&el.form.clk!=el||tag=="select"&&el.selectedIndex==-1)){return null;}if(tag=="select"){var _41=el.selectedIndex;if(_41<0){return null;}var a=[],ops=el.options;var one=(t=="select-one");var max=(one?_41+1:ops.length);for(var i=(one?_41:0);i<max;i++){var op=ops[i];if(op.selected){var v=$.browser.msie&&!(op.attributes["value"].specified)?op.text:op.value;if(one){return v;}a.push(v);}}return a;}return el.value;};$.fn.clearForm=function(){return this.each(function(){$("input,select,textarea",this).clearFields();});};$.fn.clearFields=$.fn.clearInputs=function(){return this.each(function(){var t=this.type,tag=this.tagName.toLowerCase();if(t=="text"||t=="password"||tag=="textarea"){this.value="";}else{if(t=="checkbox"||t=="radio"){this.checked=false;}else{if(tag=="select"){this.selectedIndex=-1;}}}});};$.fn.resetForm=function(){return this.each(function(){if(typeof this.reset=="function"||(typeof this.reset=="object"&&!this.reset.nodeType)){this.reset();}});};})(jQuery);
    34.5 \ No newline at end of file
    35.1 --- a/web/javascript/form.js	Mon Sep 21 00:02:10 2009 +0200
    35.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    35.3 @@ -1,819 +0,0 @@
    35.4 -/*
    35.5 - * jQuery Form Plugin
    35.6 - * @requires jQuery v1.1 or later
    35.7 - *
    35.8 - * Examples at: http://malsup.com/jquery/form/
    35.9 - * Dual licensed under the MIT and GPL licenses:
   35.10 - *   http://www.opensource.org/licenses/mit-license.php
   35.11 - *   http://www.gnu.org/licenses/gpl.html
   35.12 - *
   35.13 - * Revision: $Id$
   35.14 - */
   35.15 - (function($) {
   35.16 -/**
   35.17 - * ajaxSubmit() provides a mechanism for submitting an HTML form using AJAX.
   35.18 - *
   35.19 - * ajaxSubmit accepts a single argument which can be either a success callback function
   35.20 - * or an options Object.  If a function is provided it will be invoked upon successful
   35.21 - * completion of the submit and will be passed the response from the server.
   35.22 - * If an options Object is provided, the following attributes are supported:
   35.23 - *
   35.24 - *  target:   Identifies the element(s) in the page to be updated with the server response.
   35.25 - *            This value may be specified as a jQuery selection string, a jQuery object,
   35.26 - *            or a DOM element.
   35.27 - *            default value: null
   35.28 - *
   35.29 - *  url:      URL to which the form data will be submitted.
   35.30 - *            default value: value of form's 'action' attribute
   35.31 - *
   35.32 - *  type:     The method in which the form data should be submitted, 'GET' or 'POST'.
   35.33 - *            default value: value of form's 'method' attribute (or 'GET' if none found)
   35.34 - *
   35.35 - *  data:     Additional data to add to the request, specified as key/value pairs (see $.ajax).
   35.36 - *
   35.37 - *  beforeSubmit:  Callback method to be invoked before the form is submitted.
   35.38 - *            default value: null
   35.39 - *
   35.40 - *  success:  Callback method to be invoked after the form has been successfully submitted
   35.41 - *            and the response has been returned from the server
   35.42 - *            default value: null
   35.43 - *
   35.44 - *  dataType: Expected dataType of the response.  One of: null, 'xml', 'script', or 'json'
   35.45 - *            default value: null
   35.46 - *
   35.47 - *  semantic: Boolean flag indicating whether data must be submitted in semantic order (slower).
   35.48 - *            default value: false
   35.49 - *
   35.50 - *  resetForm: Boolean flag indicating whether the form should be reset if the submit is successful
   35.51 - *
   35.52 - *  clearForm: Boolean flag indicating whether the form should be cleared if the submit is successful
   35.53 - *
   35.54 - *
   35.55 - * The 'beforeSubmit' callback can be provided as a hook for running pre-submit logic or for
   35.56 - * validating the form data.  If the 'beforeSubmit' callback returns false then the form will
   35.57 - * not be submitted. The 'beforeSubmit' callback is invoked with three arguments: the form data
   35.58 - * in array format, the jQuery object, and the options object passed into ajaxSubmit.
   35.59 - * The form data array takes the following form:
   35.60 - *
   35.61 - *     [ { name: 'username', value: 'jresig' }, { name: 'password', value: 'secret' } ]
   35.62 - *
   35.63 - * If a 'success' callback method is provided it is invoked after the response has been returned
   35.64 - * from the server.  It is passed the responseText or responseXML value (depending on dataType).
   35.65 - * See jQuery.ajax for further details.
   35.66 - *
   35.67 - *
   35.68 - * The dataType option provides a means for specifying how the server response should be handled.
   35.69 - * This maps directly to the jQuery.httpData method.  The following values are supported:
   35.70 - *
   35.71 - *      'xml':    if dataType == 'xml' the server response is treated as XML and the 'success'
   35.72 - *                   callback method, if specified, will be passed the responseXML value
   35.73 - *      'json':   if dataType == 'json' the server response will be evaluted and passed to
   35.74 - *                   the 'success' callback, if specified
   35.75 - *      'script': if dataType == 'script' the server response is evaluated in the global context
   35.76 - *
   35.77 - *
   35.78 - * Note that it does not make sense to use both the 'target' and 'dataType' options.  If both
   35.79 - * are provided the target will be ignored.
   35.80 - *
   35.81 - * The semantic argument can be used to force form serialization in semantic order.
   35.82 - * This is normally true anyway, unless the form contains input elements of type='image'.
   35.83 - * If your form must be submitted with name/value pairs in semantic order and your form
   35.84 - * contains an input of type='image" then pass true for this arg, otherwise pass false
   35.85 - * (or nothing) to avoid the overhead for this logic.
   35.86 - *
   35.87 - *
   35.88 - * When used on its own, ajaxSubmit() is typically bound to a form's submit event like this:
   35.89 - *
   35.90 - * $("#form-id").submit(function() {
   35.91 - *     $(this).ajaxSubmit(options);
   35.92 - *     return false; // cancel conventional submit
   35.93 - * });
   35.94 - *
   35.95 - * When using ajaxForm(), however, this is done for you.
   35.96 - *
   35.97 - * @example
   35.98 - * $('#myForm').ajaxSubmit(function(data) {
   35.99 - *     alert('Form submit succeeded! Server returned: ' + data);
  35.100 - * });
  35.101 - * @desc Submit form and alert server response
  35.102 - *
  35.103 - *
  35.104 - * @example
  35.105 - * var options = {
  35.106 - *     target: '#myTargetDiv'
  35.107 - * };
  35.108 - * $('#myForm').ajaxSubmit(options);
  35.109 - * @desc Submit form and update page element with server response
  35.110 - *
  35.111 - *
  35.112 - * @example
  35.113 - * var options = {
  35.114 - *     success: function(responseText) {
  35.115 - *         alert(responseText);
  35.116 - *     }
  35.117 - * };
  35.118 - * $('#myForm').ajaxSubmit(options);
  35.119 - * @desc Submit form and alert the server response
  35.120 - *
  35.121 - *
  35.122 - * @example
  35.123 - * var options = {
  35.124 - *     beforeSubmit: function(formArray, jqForm) {
  35.125 - *         if (formArray.length == 0) {
  35.126 - *             alert('Please enter data.');
  35.127 - *             return false;
  35.128 - *         }
  35.129 - *     }
  35.130 - * };
  35.131 - * $('#myForm').ajaxSubmit(options);
  35.132 - * @desc Pre-submit validation which aborts the submit operation if form data is empty
  35.133 - *
  35.134 - *
  35.135 - * @example
  35.136 - * var options = {
  35.137 - *     url: myJsonUrl.php,
  35.138 - *     dataType: 'json',
  35.139 - *     success: function(data) {
  35.140 - *        // 'data' is an object representing the the evaluated json data
  35.141 - *     }
  35.142 - * };
  35.143 - * $('#myForm').ajaxSubmit(options);
  35.144 - * @desc json data returned and evaluated
  35.145 - *
  35.146 - *
  35.147 - * @example
  35.148 - * var options = {
  35.149 - *     url: myXmlUrl.php,
  35.150 - *     dataType: 'xml',
  35.151 - *     success: function(responseXML) {
  35.152 - *        // responseXML is XML document object
  35.153 - *        var data = $('myElement', responseXML).text();
  35.154 - *     }
  35.155 - * };
  35.156 - * $('#myForm').ajaxSubmit(options);
  35.157 - * @desc XML data returned from server
  35.158 - *
  35.159 - *
  35.160 - * @example
  35.161 - * var options = {
  35.162 - *     resetForm: true
  35.163 - * };
  35.164 - * $('#myForm').ajaxSubmit(options);
  35.165 - * @desc submit form and reset it if successful
  35.166 - *
  35.167 - * @example
  35.168 - * $('#myForm).submit(function() {
  35.169 - *    $(this).ajaxSubmit();
  35.170 - *    return false;
  35.171 - * });
  35.172 - * @desc Bind form's submit event to use ajaxSubmit
  35.173 - *
  35.174 - *
  35.175 - * @name ajaxSubmit
  35.176 - * @type jQuery
  35.177 - * @param options  object literal containing options which control the form submission process
  35.178 - * @cat Plugins/Form
  35.179 - * @return jQuery
  35.180 - */
  35.181 -$.fn.ajaxSubmit = function(options) {
  35.182 -    if (typeof options == 'function')
  35.183 -        options = { success: options };
  35.184 -
  35.185 -    options = $.extend({
  35.186 -        url:  this.attr('action') || window.location,
  35.187 -        type: this.attr('method') || 'GET'
  35.188 -    }, options || {});
  35.189 -
  35.190 -    // hook for manipulating the form data before it is extracted;
  35.191 -    // convenient for use with rich editors like tinyMCE or FCKEditor
  35.192 -    var veto = {};
  35.193 -    $.event.trigger('form.pre.serialize', [this, options, veto]);
  35.194 -    if (veto.veto) return this;
  35.195 -
  35.196 -    var a = this.formToArray(options.semantic);
  35.197 -	if (options.data) {
  35.198 -	    for (var n in options.data)
  35.199 -	        a.push( { name: n, value: options.data[n] } );
  35.200 -	}
  35.201 -
  35.202 -    // give pre-submit callback an opportunity to abort the submit
  35.203 -    if (options.beforeSubmit && options.beforeSubmit(a, this, options) === false) return this;
  35.204 -
  35.205 -    // fire vetoable 'validate' event
  35.206 -    $.event.trigger('form.submit.validate', [a, this, options, veto]);
  35.207 -    if (veto.veto) return this;
  35.208 -
  35.209 -    var q = $.param(a);//.replace(/%20/g,'+');
  35.210 -
  35.211 -    if (options.type.toUpperCase() == 'GET') {
  35.212 -        options.url += (options.url.indexOf('?') >= 0 ? '&' : '?') + q;
  35.213 -        options.data = null;  // data is null for 'get'
  35.214 -    }
  35.215 -    else
  35.216 -        options.data = q; // data is the query string for 'post'
  35.217 -
  35.218 -    var $form = this, callbacks = [];
  35.219 -    if (options.resetForm) callbacks.push(function() { $form.resetForm(); });
  35.220 -    if (options.clearForm) callbacks.push(function() { $form.clearForm(); });
  35.221 -
  35.222 -    // perform a load on the target only if dataType is not provided
  35.223 -    if (!options.dataType && options.target) {
  35.224 -        var oldSuccess = options.success || function(){};
  35.225 -        callbacks.push(function(data) {
  35.226 -            if (this.evalScripts)
  35.227 -                $(options.target).attr("innerHTML", data).evalScripts().each(oldSuccess, arguments);
  35.228 -            else // jQuery v1.1.4
  35.229 -                $(options.target).html(data).each(oldSuccess, arguments);
  35.230 -        });
  35.231 -    }
  35.232 -    else if (options.success)
  35.233 -        callbacks.push(options.success);
  35.234 -
  35.235 -    options.success = function(data, status) {
  35.236 -        for (var i=0, max=callbacks.length; i < max; i++)
  35.237 -            callbacks[i](data, status, $form);
  35.238 -    };
  35.239 -
  35.240 -    // are there files to upload?
  35.241 -    var files = $('input:file', this).fieldValue();
  35.242 -    var found = false;
  35.243 -    for (var j=0; j < files.length; j++)
  35.244 -        if (files[j])
  35.245 -            found = true;
  35.246 -
  35.247 -    if (options.iframe || found) // options.iframe allows user to force iframe mode
  35.248 -        fileUpload();
  35.249 -    else
  35.250 -        $.ajax(options);
  35.251 -
  35.252 -    // fire 'notify' event
  35.253 -    $.event.trigger('form.submit.notify', [this, options]);
  35.254 -    return this;
  35.255 -
  35.256 -
  35.257 -    // private function for handling file uploads (hat tip to YAHOO!)
  35.258 -    function fileUpload() {
  35.259 -        var form = $form[0];
  35.260 -        var opts = $.extend({}, $.ajaxSettings, options);
  35.261 -
  35.262 -        var id = 'jqFormIO' + $.fn.ajaxSubmit.counter++;
  35.263 -        var $io = $('<iframe id="' + id + '" name="' + id + '" />');
  35.264 -        var io = $io[0];
  35.265 -        var op8 = $.browser.opera && window.opera.version() < 9;
  35.266 -        if ($.browser.msie || op8) io.src = 'javascript:false;document.write("");';
  35.267 -        $io.css({ position: 'absolute', top: '-1000px', left: '-1000px' });
  35.268 -
  35.269 -        var xhr = { // mock object
  35.270 -            responseText: null,
  35.271 -            responseXML: null,
  35.272 -            status: 0,
  35.273 -            statusText: 'n/a',
  35.274 -            getAllResponseHeaders: function() {},
  35.275 -            getResponseHeader: function() {},
  35.276 -            setRequestHeader: function() {}
  35.277 -        };
  35.278 -
  35.279 -        var g = opts.global;
  35.280 -        // trigger ajax global events so that activity/block indicators work like normal
  35.281 -        if (g && ! $.active++) $.event.trigger("ajaxStart");
  35.282 -        if (g) $.event.trigger("ajaxSend", [xhr, opts]);
  35.283 -
  35.284 -        var cbInvoked = 0;
  35.285 -        var timedOut = 0;
  35.286 -
  35.287 -        // take a breath so that pending repaints get some cpu time before the upload starts
  35.288 -        setTimeout(function() {
  35.289 -            $io.appendTo('body');
  35.290 -            // jQuery's event binding doesn't work for iframe events in IE
  35.291 -            io.attachEvent ? io.attachEvent('onload', cb) : io.addEventListener('load', cb, false);
  35.292 -
  35.293 -            // make sure form attrs are set
  35.294 -            var encAttr = form.encoding ? 'encoding' : 'enctype';
  35.295 -            var t = $form.attr('target');
  35.296 -            $form.attr({
  35.297 -                target:   id,
  35.298 -                method:  'POST',
  35.299 -                action:   opts.url
  35.300 -            });
  35.301 -            form[encAttr] = 'multipart/form-data';
  35.302 -
  35.303 -            // support timout
  35.304 -            if (opts.timeout)
  35.305 -                setTimeout(function() { timedOut = true; cb(); }, opts.timeout);
  35.306 -
  35.307 -            form.submit();
  35.308 -            $form.attr('target', t); // reset target
  35.309 -        }, 10);
  35.310 -
  35.311 -        function cb() {
  35.312 -            if (cbInvoked++) return;
  35.313 -
  35.314 -            io.detachEvent ? io.detachEvent('onload', cb) : io.removeEventListener('load', cb, false);
  35.315 -
  35.316 -            var ok = true;
  35.317 -            try {
  35.318 -                if (timedOut) throw 'timeout';
  35.319 -                // extract the server response from the iframe
  35.320 -                var data, doc;
  35.321 -                doc = io.contentWindow ? io.contentWindow.document : io.contentDocument ? io.contentDocument : io.document;
  35.322 -                xhr.responseText = doc.body ? doc.body.innerHTML : null;
  35.323 -                xhr.responseXML = doc.XMLDocument ? doc.XMLDocument : doc;
  35.324 -
  35.325 -                if (opts.dataType == 'json' || opts.dataType == 'script') {
  35.326 -                    var ta = doc.getElementsByTagName('textarea')[0];
  35.327 -                    data = ta ? ta.value : xhr.responseText;
  35.328 -                    if (opts.dataType == 'json')
  35.329 -                        eval("data = " + data);
  35.330 -                    else
  35.331 -                        $.globalEval(data);
  35.332 -                }
  35.333 -                else if (opts.dataType == 'xml') {
  35.334 -                    data = xhr.responseXML;
  35.335 -                    if (!data && xhr.responseText != null)
  35.336 -                        data = toXml(xhr.responseText);
  35.337 -                }
  35.338 -                else {
  35.339 -                    data = xhr.responseText;
  35.340 -                }
  35.341 -            }
  35.342 -            catch(e){
  35.343 -                ok = false;
  35.344 -                $.handleError(opts, xhr, 'error', e);
  35.345 -            }
  35.346 -
  35.347 -            // ordering of these callbacks/triggers is odd, but that's how $.ajax does it
  35.348 -            if (ok) {
  35.349 -                opts.success(data, 'success');
  35.350 -                if (g) $.event.trigger("ajaxSuccess", [xhr, opts]);
  35.351 -            }
  35.352 -            if (g) $.event.trigger("ajaxComplete", [xhr, opts]);
  35.353 -            if (g && ! --$.active) $.event.trigger("ajaxStop");
  35.354 -            if (opts.complete) opts.complete(xhr, ok ? 'success' : 'error');
  35.355 -
  35.356 -            // clean up
  35.357 -            setTimeout(function() {
  35.358 -                $io.remove();
  35.359 -                xhr.responseXML = null;
  35.360 -            }, 100);
  35.361 -        };
  35.362 -
  35.363 -        function toXml(s, doc) {
  35.364 -            if (window.ActiveXObject) {
  35.365 -                doc = new ActiveXObject('Microsoft.XMLDOM');
  35.366 -                doc.async = 'false';
  35.367 -                doc.loadXML(s);
  35.368 -            }
  35.369 -            else
  35.370 -                doc = (new DOMParser()).parseFromString(s, 'text/xml');
  35.371 -            return (doc && doc.documentElement && doc.documentElement.tagName != 'parsererror') ? doc : null;
  35.372 -        };
  35.373 -    };
  35.374 -};
  35.375 -$.fn.ajaxSubmit.counter = 0; // used to create unique iframe ids
  35.376 -
  35.377 -/**
  35.378 - * ajaxForm() provides a mechanism for fully automating form submission.
  35.379 - *
  35.380 - * The advantages of using this method instead of ajaxSubmit() are:
  35.381 - *
  35.382 - * 1: This method will include coordinates for <input type="image" /> elements (if the element
  35.383 - *    is used to submit the form).
  35.384 - * 2. This method will include the submit element's name/value data (for the element that was
  35.385 - *    used to submit the form).
  35.386 - * 3. This method binds the submit() method to the form for you.
  35.387 - *
  35.388 - * Note that for accurate x/y coordinates of image submit elements in all browsers
  35.389 - * you need to also use the "dimensions" plugin (this method will auto-detect its presence).
  35.390 - *
  35.391 - * The options argument for ajaxForm works exactly as it does for ajaxSubmit.  ajaxForm merely
  35.392 - * passes the options argument along after properly binding events for submit elements and
  35.393 - * the form itself.  See ajaxSubmit for a full description of the options argument.
  35.394 - *
  35.395 - *
  35.396 - * @example
  35.397 - * var options = {
  35.398 - *     target: '#myTargetDiv'
  35.399 - * };
  35.400 - * $('#myForm').ajaxSForm(options);
  35.401 - * @desc Bind form's submit event so that 'myTargetDiv' is updated with the server response
  35.402 - *       when the form is submitted.
  35.403 - *
  35.404 - *
  35.405 - * @example
  35.406 - * var options = {
  35.407 - *     success: function(responseText) {
  35.408 - *         alert(responseText);
  35.409 - *     }
  35.410 - * };
  35.411 - * $('#myForm').ajaxSubmit(options);
  35.412 - * @desc Bind form's submit event so that server response is alerted after the form is submitted.
  35.413 - *
  35.414 - *
  35.415 - * @example
  35.416 - * var options = {
  35.417 - *     beforeSubmit: function(formArray, jqForm) {
  35.418 - *         if (formArray.length == 0) {
  35.419 - *             alert('Please enter data.');
  35.420 - *             return false;
  35.421 - *         }
  35.422 - *     }
  35.423 - * };
  35.424 - * $('#myForm').ajaxSubmit(options);
  35.425 - * @desc Bind form's submit event so that pre-submit callback is invoked before the form
  35.426 - *       is submitted.
  35.427 - *
  35.428 - *
  35.429 - * @name   ajaxForm
  35.430 - * @param  options  object literal containing options which control the form submission process
  35.431 - * @return jQuery
  35.432 - * @cat    Plugins/Form
  35.433 - * @type   jQuery
  35.434 - */
  35.435 -$.fn.ajaxForm = function(options) {
  35.436 -    return this.ajaxFormUnbind().submit(submitHandler).each(function() {
  35.437 -        // store options in hash
  35.438 -        this.formPluginId = $.fn.ajaxForm.counter++;
  35.439 -        $.fn.ajaxForm.optionHash[this.formPluginId] = options;
  35.440 -        $(":submit,input:image", this).click(clickHandler);
  35.441 -    });
  35.442 -};
  35.443 -
  35.444 -$.fn.ajaxForm.counter = 1;
  35.445 -$.fn.ajaxForm.optionHash = {};
  35.446 -
  35.447 -function clickHandler(e) {
  35.448 -    var $form = this.form;
  35.449 -    $form.clk = this;
  35.450 -    if (this.type == 'image') {
  35.451 -        if (e.offsetX != undefined) {
  35.452 -            $form.clk_x = e.offsetX;
  35.453 -            $form.clk_y = e.offsetY;
  35.454 -        } else if (typeof $.fn.offset == 'function') { // try to use dimensions plugin
  35.455 -            var offset = $(this).offset();
  35.456 -            $form.clk_x = e.pageX - offset.left;
  35.457 -            $form.clk_y = e.pageY - offset.top;
  35.458 -        } else {
  35.459 -            $form.clk_x = e.pageX - this.offsetLeft;
  35.460 -            $form.clk_y = e.pageY - this.offsetTop;
  35.461 -        }
  35.462 -    }
  35.463 -    // clear form vars
  35.464 -    setTimeout(function() { $form.clk = $form.clk_x = $form.clk_y = null; }, 10);
  35.465 -};
  35.466 -
  35.467 -function submitHandler() {
  35.468 -    // retrieve options from hash
  35.469 -    var id = this.formPluginId;
  35.470 -    var options = $.fn.ajaxForm.optionHash[id];
  35.471 -    $(this).ajaxSubmit(options);
  35.472 -    return false;
  35.473 -};
  35.474 -
  35.475 -/**
  35.476 - * ajaxFormUnbind unbinds the event handlers that were bound by ajaxForm
  35.477 - *
  35.478 - * @name   ajaxFormUnbind
  35.479 - * @return jQuery
  35.480 - * @cat    Plugins/Form
  35.481 - * @type   jQuery
  35.482 - */
  35.483 -$.fn.ajaxFormUnbind = function() {
  35.484 -    this.unbind('submit', submitHandler);
  35.485 -    return this.each(function() {
  35.486 -        $(":submit,input:image", this).unbind('click', clickHandler);
  35.487 -    });
  35.488 -
  35.489 -};
  35.490 -
  35.491 -/**
  35.492 - * formToArray() gathers form element data into an array of objects that can
  35.493 - * be passed to any of the following ajax functions: $.get, $.post, or load.
  35.494 - * Each object in the array has both a 'name' and 'value' property.  An example of
  35.495 - * an array for a simple login form might be:
  35.496 - *
  35.497 - * [ { name: 'username', value: 'jresig' }, { name: 'password', value: 'secret' } ]
  35.498 - *
  35.499 - * It is this array that is passed to pre-submit callback functions provided to the
  35.500 - * ajaxSubmit() and ajaxForm() methods.
  35.501 - *
  35.502 - * The semantic argument can be used to force form serialization in semantic order.
  35.503 - * This is normally true anyway, unless the form contains input elements of type='image'.
  35.504 - * If your form must be submitted with name/value pairs in semantic order and your form
  35.505 - * contains an input of type='image" then pass true for this arg, otherwise pass false
  35.506 - * (or nothing) to avoid the overhead for this logic.
  35.507 - *
  35.508 - * @example var data = $("#myForm").formToArray();
  35.509 - * $.post( "myscript.cgi", data );
  35.510 - * @desc Collect all the data from a form and submit it to the server.
  35.511 - *
  35.512 - * @name formToArray
  35.513 - * @param semantic true if serialization must maintain strict semantic ordering of elements (slower)
  35.514 - * @type Array<Object>
  35.515 - * @cat Plugins/Form
  35.516 - */
  35.517 -$.fn.formToArray = function(semantic) {
  35.518 -    var a = [];
  35.519 -    if (this.length == 0) return a;
  35.520 -
  35.521 -    var form = this[0];
  35.522 -    var els = semantic ? form.getElementsByTagName('*') : form.elements;
  35.523 -    if (!els) return a;
  35.524 -    for(var i=0, max=els.length; i < max; i++) {
  35.525 -        var el = els[i];
  35.526 -        var n = el.name;
  35.527 -        if (!n) continue;
  35.528 -
  35.529 -        if (semantic && form.clk && el.type == "image") {
  35.530 -            // handle image inputs on the fly when semantic == true
  35.531 -            if(!el.disabled && form.clk == el)
  35.532 -                a.push({name: n+'.x', value: form.clk_x}, {name: n+'.y', value: form.clk_y});
  35.533 -            continue;
  35.534 -        }
  35.535 -
  35.536 -        var v = $.fieldValue(el, true);
  35.537 -        if (v && v.constructor == Array) {
  35.538 -            for(var j=0, jmax=v.length; j < jmax; j++)
  35.539 -                a.push({name: n, value: v[j]});
  35.540 -        }
  35.541 -        else if (v !== null && typeof v != 'undefined')
  35.542 -            a.push({name: n, value: v});
  35.543 -    }
  35.544 -
  35.545 -    if (!semantic && form.clk) {
  35.546 -        // input type=='image' are not found in elements array! handle them here
  35.547 -        var inputs = form.getElementsByTagName("input");
  35.548 -        for(var i=0, max=inputs.length; i < max; i++) {
  35.549 -            var input = inputs[i];
  35.550 -            var n = input.name;
  35.551 -            if(n && !input.disabled && input.type == "image" && form.clk == input)
  35.552 -                a.push({name: n+'.x', value: form.clk_x}, {name: n+'.y', value: form.clk_y});
  35.553 -        }
  35.554 -    }
  35.555 -    return a;
  35.556 -};
  35.557 -
  35.558 -
  35.559 -/**
  35.560 - * Serializes form data into a 'submittable' string. This method will return a string
  35.561 - * in the format: name1=value1&amp;name2=value2
  35.562 - *
  35.563 - * The semantic argument can be used to force form serialization in semantic order.
  35.564 - * If your form must be submitted with name/value pairs in semantic order then pass
  35.565 - * true for this arg, otherwise pass false (or nothing) to avoid the overhead for
  35.566 - * this logic (which can be significant for very large forms).
  35.567 - *
  35.568 - * @example var data = $("#myForm").formSerialize();
  35.569 - * $.ajax('POST', "myscript.cgi", data);
  35.570 - * @desc Collect all the data from a form into a single string
  35.571 - *
  35.572 - * @name formSerialize
  35.573 - * @param semantic true if serialization must maintain strict semantic ordering of elements (slower)
  35.574 - * @type String
  35.575 - * @cat Plugins/Form
  35.576 - */
  35.577 -$.fn.formSerialize = function(semantic) {
  35.578 -    //hand off to jQuery.param for proper encoding
  35.579 -    return $.param(this.formToArray(semantic));
  35.580 -};
  35.581 -
  35.582 -
  35.583 -/**
  35.584 - * Serializes all field elements in the jQuery object into a query string.
  35.585 - * This method will return a string in the format: name1=value1&amp;name2=value2
  35.586 - *
  35.587 - * The successful argument controls whether or not serialization is limited to
  35.588 - * 'successful' controls (per http://www.w3.org/TR/html4/interact/forms.html#successful-controls).
  35.589 - * The default value of the successful argument is true.
  35.590 - *
  35.591 - * @example var data = $("input").formSerialize();
  35.592 - * @desc Collect the data from all successful input elements into a query string
  35.593 - *
  35.594 - * @example var data = $(":radio").formSerialize();
  35.595 - * @desc Collect the data from all successful radio input elements into a query string
  35.596 - *
  35.597 - * @example var data = $("#myForm :checkbox").formSerialize();
  35.598 - * @desc Collect the data from all successful checkbox input elements in myForm into a query string
  35.599 - *
  35.600 - * @example var data = $("#myForm :checkbox").formSerialize(false);
  35.601 - * @desc Collect the data from all checkbox elements in myForm (even the unchecked ones) into a query string
  35.602 - *
  35.603 - * @example var data = $(":input").formSerialize();
  35.604 - * @desc Collect the data from all successful input, select, textarea and button elements into a query string
  35.605 - *
  35.606 - * @name fieldSerialize
  35.607 - * @param successful true if only successful controls should be serialized (default is true)
  35.608 - * @type String
  35.609 - * @cat Plugins/Form
  35.610 - */
  35.611 -$.fn.fieldSerialize = function(successful) {
  35.612 -    var a = [];
  35.613 -    this.each(function() {
  35.614 -        var n = this.name;
  35.615 -        if (!n) return;
  35.616 -        var v = $.fieldValue(this, successful);
  35.617 -        if (v && v.constructor == Array) {
  35.618 -            for (var i=0,max=v.length; i < max; i++)
  35.619 -                a.push({name: n, value: v[i]});
  35.620 -        }
  35.621 -        else if (v !== null && typeof v != 'undefined')
  35.622 -            a.push({name: this.name, value: v});
  35.623 -    });
  35.624 -    //hand off to jQuery.param for proper encoding
  35.625 -    return $.param(a);
  35.626 -};
  35.627 -
  35.628 -
  35.629 -/**
  35.630 - * Returns the value(s) of the element in the matched set.  For example, consider the following form:
  35.631 - *
  35.632 - *  <form><fieldset>
  35.633 - *      <input name="A" type="text" />
  35.634 - *      <input name="A" type="text" />
  35.635 - *      <input name="B" type="checkbox" value="B1" />
  35.636 - *      <input name="B" type="checkbox" value="B2"/>
  35.637 - *      <input name="C" type="radio" value="C1" />
  35.638 - *      <input name="C" type="radio" value="C2" />
  35.639 - *  </fieldset></form>
  35.640 - *
  35.641 - *  var v = $(':text').fieldValue();
  35.642 - *  // if no values are entered into the text inputs
  35.643 - *  v == ['','']
  35.644 - *  // if values entered into the text inputs are 'foo' and 'bar'
  35.645 - *  v == ['foo','bar']
  35.646 - *
  35.647 - *  var v = $(':checkbox').fieldValue();
  35.648 - *  // if neither checkbox is checked
  35.649 - *  v === undefined
  35.650 - *  // if both checkboxes are checked
  35.651 - *  v == ['B1', 'B2']
  35.652 - *
  35.653 - *  var v = $(':radio').fieldValue();
  35.654 - *  // if neither radio is checked
  35.655 - *  v === undefined
  35.656 - *  // if first radio is checked
  35.657 - *  v == ['C1']
  35.658 - *
  35.659 - * The successful argument controls whether or not the field element must be 'successful'
  35.660 - * (per http://www.w3.org/TR/html4/interact/forms.html#successful-controls).
  35.661 - * The default value of the successful argument is true.  If this value is false the value(s)
  35.662 - * for each element is returned.
  35.663 - *
  35.664 - * Note: This method *always* returns an array.  If no valid value can be determined the
  35.665 - *       array will be empty, otherwise it will contain one or more values.
  35.666 - *
  35.667 - * @example var data = $("#myPasswordElement").fieldValue();
  35.668 - * alert(data[0]);
  35.669 - * @desc Alerts the current value of the myPasswordElement element
  35.670 - *
  35.671 - * @example var data = $("#myForm :input").fieldValue();
  35.672 - * @desc Get the value(s) of the form elements in myForm
  35.673 - *
  35.674 - * @example var data = $("#myForm :checkbox").fieldValue();
  35.675 - * @desc Get the value(s) for the successful checkbox element(s) in the jQuery object.
  35.676 - *
  35.677 - * @example var data = $("#mySingleSelect").fieldValue();
  35.678 - * @desc Get the value(s) of the select control
  35.679 - *
  35.680 - * @example var data = $(':text').fieldValue();
  35.681 - * @desc Get the value(s) of the text input or textarea elements
  35.682 - *
  35.683 - * @example var data = $("#myMultiSelect").fieldValue();
  35.684 - * @desc Get the values for the select-multiple control
  35.685 - *
  35.686 - * @name fieldValue
  35.687 - * @param Boolean successful true if only the values for successful controls should be returned (default is true)
  35.688 - * @type Array<String>
  35.689 - * @cat Plugins/Form
  35.690 - */
  35.691 -$.fn.fieldValue = function(successful) {
  35.692 -    for (var val=[], i=0, max=this.length; i < max; i++) {
  35.693 -        var el = this[i];
  35.694 -        var v = $.fieldValue(el, successful);
  35.695 -        if (v === null || typeof v == 'undefined' || (v.constructor == Array && !v.length))
  35.696 -            continue;
  35.697 -        v.constructor == Array ? $.merge(val, v) : val.push(v);
  35.698 -    }
  35.699 -    return val;
  35.700 -};
  35.701 -
  35.702 -/**
  35.703 - * Returns the value of the field element.
  35.704 - *
  35.705 - * The successful argument controls whether or not the field element must be 'successful'
  35.706 - * (per http://www.w3.org/TR/html4/interact/forms.html#successful-controls).
  35.707 - * The default value of the successful argument is true.  If the given element is not
  35.708 - * successful and the successful arg is not false then the returned value will be null.
  35.709 - *
  35.710 - * Note: If the successful flag is true (default) but the element is not successful, the return will be null
  35.711 - * Note: The value returned for a successful select-multiple element will always be an array.
  35.712 - * Note: If the element has no value the return value will be undefined.
  35.713 - *
  35.714 - * @example var data = jQuery.fieldValue($("#myPasswordElement")[0]);
  35.715 - * @desc Gets the current value of the myPasswordElement element
  35.716 - *
  35.717 - * @name fieldValue
  35.718 - * @param Element el The DOM element for which the value will be returned
  35.719 - * @param Boolean successful true if value returned must be for a successful controls (default is true)
  35.720 - * @type String or Array<String> or null or undefined
  35.721 - * @cat Plugins/Form
  35.722 - */
  35.723 -$.fieldValue = function(el, successful) {
  35.724 -    var n = el.name, t = el.type, tag = el.tagName.toLowerCase();
  35.725 -    if (typeof successful == 'undefined') successful = true;
  35.726 -
  35.727 -    if (successful && (!n || el.disabled || t == 'reset' || t == 'button' ||
  35.728 -        (t == 'checkbox' || t == 'radio') && !el.checked ||
  35.729 -        (t == 'submit' || t == 'image') && el.form && el.form.clk != el ||
  35.730 -        tag == 'select' && el.selectedIndex == -1))
  35.731 -            return null;
  35.732 -
  35.733 -    if (tag == 'select') {
  35.734 -        var index = el.selectedIndex;
  35.735 -        if (index < 0) return null;
  35.736 -        var a = [], ops = el.options;
  35.737 -        var one = (t == 'select-one');
  35.738 -        var max = (one ? index+1 : ops.length);
  35.739 -        for(var i=(one ? index : 0); i < max; i++) {
  35.740 -            var op = ops[i];
  35.741 -            if (op.selected) {
  35.742 -                // extra pain for IE...
  35.743 -                var v = $.browser.msie && !(op.attributes['value'].specified) ? op.text : op.value;
  35.744 -                if (one) return v;
  35.745 -                a.push(v);
  35.746 -            }
  35.747 -        }
  35.748 -        return a;
  35.749 -    }
  35.750 -    return el.value;
  35.751 -};
  35.752 -
  35.753 -
  35.754 -/**
  35.755 - * Clears the form data.  Takes the following actions on the form's input fields:
  35.756 - *  - input text fields will have their 'value' property set to the empty string
  35.757 - *  - select elements will have their 'selectedIndex' property set to -1
  35.758 - *  - checkbox and radio inputs will have their 'checked' property set to false
  35.759 - *  - inputs of type submit, button, reset, and hidden will *not* be effected
  35.760 - *  - button elements will *not* be effected
  35.761 - *
  35.762 - * @example $('form').clearForm();
  35.763 - * @desc Clears all forms on the page.
  35.764 - *
  35.765 - * @name clearForm
  35.766 - * @type jQuery
  35.767 - * @cat Plugins/Form
  35.768 - */
  35.769 -$.fn.clearForm = function() {
  35.770 -    return this.each(function() {
  35.771 -        $('input,select,textarea', this).clearFields();
  35.772 -    });
  35.773 -};
  35.774 -
  35.775 -/**
  35.776 - * Clears the selected form elements.  Takes the following actions on the matched elements:
  35.777 - *  - input text fields will have their 'value' property set to the empty string
  35.778 - *  - select elements will have their 'selectedIndex' property set to -1
  35.779 - *  - checkbox and radio inputs will have their 'checked' property set to false
  35.780 - *  - inputs of type submit, button, reset, and hidden will *not* be effected
  35.781 - *  - button elements will *not* be effected
  35.782 - *
  35.783 - * @example $('.myInputs').clearFields();
  35.784 - * @desc Clears all inputs with class myInputs
  35.785 - *
  35.786 - * @name clearFields
  35.787 - * @type jQuery
  35.788 - * @cat Plugins/Form
  35.789 - */
  35.790 -$.fn.clearFields = $.fn.clearInputs = function() {
  35.791 -    return this.each(function() {
  35.792 -        var t = this.type, tag = this.tagName.toLowerCase();
  35.793 -        if (t == 'text' || t == 'password' || tag == 'textarea')
  35.794 -            this.value = '';
  35.795 -        else if (t == 'checkbox' || t == 'radio')
  35.796 -            this.checked = false;
  35.797 -        else if (tag == 'select')
  35.798 -            this.selectedIndex = -1;
  35.799 -    });
  35.800 -};
  35.801 -
  35.802 -
  35.803 -/**
  35.804 - * Resets the form data.  Causes all form elements to be reset to their original value.
  35.805 - *
  35.806 - * @example $('form').resetForm();
  35.807 - * @desc Resets all forms on the page.
  35.808 - *
  35.809 - * @name resetForm
  35.810 - * @type jQuery
  35.811 - * @cat Plugins/Form
  35.812 - */
  35.813 -$.fn.resetForm = function() {
  35.814 -    return this.each(function() {
  35.815 -        // guard against an input with the name of 'reset'
  35.816 -        // note that IE reports the reset function as an 'object'
  35.817 -        if (typeof this.reset == 'function' || (typeof this.reset == 'object' && !this.reset.nodeType))
  35.818 -            this.reset();
  35.819 -    });
  35.820 -};
  35.821 -
  35.822 -})(jQuery);
    36.1 --- a/web/javascript/hsbook.js	Mon Sep 21 00:02:10 2009 +0200
    36.2 +++ b/web/javascript/hsbook.js	Tue Nov 24 11:44:49 2009 +0100
    36.3 @@ -65,10 +65,13 @@
    36.4    $("p[@id]").each(function() {
    36.5      $(this).append(loading($(this).attr("id")));
    36.6    });
    36.7 +  $("table[@id].equation").each(function() {
    36.8 +    $(this).after(loading($(this).attr("id")));
    36.9 +  });
   36.10    $("pre[@id]").each(function() {
   36.11      $(this).after(loading($(this).attr("id")));
   36.12    });
   36.13 -  var chapid = $("div.preface, div.chapter, div.appendix, div.bibliography").attr("id");
   36.14 +  var chapid = $("body, div.preface, div.chapter, div.appendix, div.bibliography").attr("id");
   36.15    $("#chapterfeed").attr("href",
   36.16  			 $("#chapterfeed").attr("href") + chapid + "/");
   36.17    $.getJSON(location.protocol + "//" + location.host + "/comments/chapter/" +
    37.1 --- a/web/javascript/jquery-min.js	Mon Sep 21 00:02:10 2009 +0200
    37.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    37.3 @@ -1,31 +0,0 @@
    37.4 -/*
    37.5 - * jQuery 1.2.1 - New Wave Javascript
    37.6 - *
    37.7 - * Copyright (c) 2007 John Resig (jquery.com)
    37.8 - * Dual licensed under the MIT (MIT-LICENSE.txt)
    37.9 - * and GPL (GPL-LICENSE.txt) licenses.
   37.10 - *
   37.11 - * $Date: 2007-09-16 23:42:06 -0400 (Sun, 16 Sep 2007) $
   37.12 - * $Rev: 3353 $
   37.13 - */
   37.14 -(function(){if(typeof jQuery!="undefined")var _jQuery=jQuery;var jQuery=window.jQuery=function(selector,context){return this instanceof jQuery?this.init(selector,context):new jQuery(selector,context);};if(typeof $!="undefined")var _$=$;window.$=jQuery;var quickExpr=/^[^<]*(<(.|\s)+>)[^>]*$|^#(\w+)$/;jQuery.fn=jQuery.prototype={init:function(selector,context){selector=selector||document;if(typeof selector=="string"){var m=quickExpr.exec(selector);if(m&&(m[1]||!context)){if(m[1])selector=jQuery.clean([m[1]],context);else{var tmp=document.getElementById(m[3]);if(tmp)if(tmp.id!=m[3])return jQuery().find(selector);else{this[0]=tmp;this.length=1;return this;}else
   37.15 -selector=[];}}else
   37.16 -return new jQuery(context).find(selector);}else if(jQuery.isFunction(selector))return new jQuery(document)[jQuery.fn.ready?"ready":"load"](selector);return this.setArray(selector.constructor==Array&&selector||(selector.jquery||selector.length&&selector!=window&&!selector.nodeType&&selector[0]!=undefined&&selector[0].nodeType)&&jQuery.makeArray(selector)||[selector]);},jquery:"1.2.1",size:function(){return this.length;},length:0,get:function(num){return num==undefined?jQuery.makeArray(this):this[num];},pushStack:function(a){var ret=jQuery(a);ret.prevObject=this;return ret;},setArray:function(a){this.length=0;Array.prototype.push.apply(this,a);return this;},each:function(fn,args){return jQuery.each(this,fn,args);},index:function(obj){var pos=-1;this.each(function(i){if(this==obj)pos=i;});return pos;},attr:function(key,value,type){var obj=key;if(key.constructor==String)if(value==undefined)return this.length&&jQuery[type||"attr"](this[0],key)||undefined;else{obj={};obj[key]=value;}return this.each(function(index){for(var prop in obj)jQuery.attr(type?this.style:this,prop,jQuery.prop(this,obj[prop],type,index,prop));});},css:function(key,value){return this.attr(key,value,"curCSS");},text:function(e){if(typeof e!="object"&&e!=null)return this.empty().append(document.createTextNode(e));var t="";jQuery.each(e||this,function(){jQuery.each(this.childNodes,function(){if(this.nodeType!=8)t+=this.nodeType!=1?this.nodeValue:jQuery.fn.text([this]);});});return t;},wrapAll:function(html){if(this[0])jQuery(html,this[0].ownerDocument).clone().insertBefore(this[0]).map(function(){var elem=this;while(elem.firstChild)elem=elem.firstChild;return elem;}).append(this);return this;},wrapInner:function(html){return this.each(function(){jQuery(this).contents().wrapAll(html);});},wrap:function(html){return this.each(function(){jQuery(this).wrapAll(html);});},append:function(){return this.domManip(arguments,true,1,function(a){this.appendChild(a);});},prepend:function(){return this.domManip(arguments,true,-1,function(a){this.insertBefore(a,this.firstChild);});},before:function(){return this.domManip(arguments,false,1,function(a){this.parentNode.insertBefore(a,this);});},after:function(){return this.domManip(arguments,false,-1,function(a){this.parentNode.insertBefore(a,this.nextSibling);});},end:function(){return this.prevObject||jQuery([]);},find:function(t){var data=jQuery.map(this,function(a){return jQuery.find(t,a);});return this.pushStack(/[^+>] [^+>]/.test(t)||t.indexOf("..")>-1?jQuery.unique(data):data);},clone:function(events){var ret=this.map(function(){return this.outerHTML?jQuery(this.outerHTML)[0]:this.cloneNode(true);});var clone=ret.find("*").andSelf().each(function(){if(this[expando]!=undefined)this[expando]=null;});if(events===true)this.find("*").andSelf().each(function(i){var events=jQuery.data(this,"events");for(var type in events)for(var handler in events[type])jQuery.event.add(clone[i],type,events[type][handler],events[type][handler].data);});return ret;},filter:function(t){return this.pushStack(jQuery.isFunction(t)&&jQuery.grep(this,function(el,index){return t.apply(el,[index]);})||jQuery.multiFilter(t,this));},not:function(t){return this.pushStack(t.constructor==String&&jQuery.multiFilter(t,this,true)||jQuery.grep(this,function(a){return(t.constructor==Array||t.jquery)?jQuery.inArray(a,t)<0:a!=t;}));},add:function(t){return this.pushStack(jQuery.merge(this.get(),t.constructor==String?jQuery(t).get():t.length!=undefined&&(!t.nodeName||jQuery.nodeName(t,"form"))?t:[t]));},is:function(expr){return expr?jQuery.multiFilter(expr,this).length>0:false;},hasClass:function(expr){return this.is("."+expr);},val:function(val){if(val==undefined){if(this.length){var elem=this[0];if(jQuery.nodeName(elem,"select")){var index=elem.selectedIndex,a=[],options=elem.options,one=elem.type=="select-one";if(index<0)return null;for(var i=one?index:0,max=one?index+1:options.length;i<max;i++){var option=options[i];if(option.selected){var val=jQuery.browser.msie&&!option.attributes["value"].specified?option.text:option.value;if(one)return val;a.push(val);}}return a;}else
   37.17 -return this[0].value.replace(/\r/g,"");}}else
   37.18 -return this.each(function(){if(val.constructor==Array&&/radio|checkbox/.test(this.type))this.checked=(jQuery.inArray(this.value,val)>=0||jQuery.inArray(this.name,val)>=0);else if(jQuery.nodeName(this,"select")){var tmp=val.constructor==Array?val:[val];jQuery("option",this).each(function(){this.selected=(jQuery.inArray(this.value,tmp)>=0||jQuery.inArray(this.text,tmp)>=0);});if(!tmp.length)this.selectedIndex=-1;}else
   37.19 -this.value=val;});},html:function(val){return val==undefined?(this.length?this[0].innerHTML:null):this.empty().append(val);},replaceWith:function(val){return this.after(val).remove();},eq:function(i){return this.slice(i,i+1);},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments));},map:function(fn){return this.pushStack(jQuery.map(this,function(elem,i){return fn.call(elem,i,elem);}));},andSelf:function(){return this.add(this.prevObject);},domManip:function(args,table,dir,fn){var clone=this.length>1,a;return this.each(function(){if(!a){a=jQuery.clean(args,this.ownerDocument);if(dir<0)a.reverse();}var obj=this;if(table&&jQuery.nodeName(this,"table")&&jQuery.nodeName(a[0],"tr"))obj=this.getElementsByTagName("tbody")[0]||this.appendChild(document.createElement("tbody"));jQuery.each(a,function(){var elem=clone?this.cloneNode(true):this;if(!evalScript(0,elem))fn.call(obj,elem);});});}};function evalScript(i,elem){var script=jQuery.nodeName(elem,"script");if(script){if(elem.src)jQuery.ajax({url:elem.src,async:false,dataType:"script"});else
   37.20 -jQuery.globalEval(elem.text||elem.textContent||elem.innerHTML||"");if(elem.parentNode)elem.parentNode.removeChild(elem);}else if(elem.nodeType==1)jQuery("script",elem).each(evalScript);return script;}jQuery.extend=jQuery.fn.extend=function(){var target=arguments[0]||{},a=1,al=arguments.length,deep=false;if(target.constructor==Boolean){deep=target;target=arguments[1]||{};}if(al==1){target=this;a=0;}var prop;for(;a<al;a++)if((prop=arguments[a])!=null)for(var i in prop){if(target==prop[i])continue;if(deep&&typeof prop[i]=='object'&&target[i])jQuery.extend(target[i],prop[i]);else if(prop[i]!=undefined)target[i]=prop[i];}return target;};var expando="jQuery"+(new Date()).getTime(),uuid=0,win={};jQuery.extend({noConflict:function(deep){window.$=_$;if(deep)window.jQuery=_jQuery;return jQuery;},isFunction:function(fn){return!!fn&&typeof fn!="string"&&!fn.nodeName&&fn.constructor!=Array&&/function/i.test(fn+"");},isXMLDoc:function(elem){return elem.documentElement&&!elem.body||elem.tagName&&elem.ownerDocument&&!elem.ownerDocument.body;},globalEval:function(data){data=jQuery.trim(data);if(data){if(window.execScript)window.execScript(data);else if(jQuery.browser.safari)window.setTimeout(data,0);else
   37.21 -eval.call(window,data);}},nodeName:function(elem,name){return elem.nodeName&&elem.nodeName.toUpperCase()==name.toUpperCase();},cache:{},data:function(elem,name,data){elem=elem==window?win:elem;var id=elem[expando];if(!id)id=elem[expando]=++uuid;if(name&&!jQuery.cache[id])jQuery.cache[id]={};if(data!=undefined)jQuery.cache[id][name]=data;return name?jQuery.cache[id][name]:id;},removeData:function(elem,name){elem=elem==window?win:elem;var id=elem[expando];if(name){if(jQuery.cache[id]){delete jQuery.cache[id][name];name="";for(name in jQuery.cache[id])break;if(!name)jQuery.removeData(elem);}}else{try{delete elem[expando];}catch(e){if(elem.removeAttribute)elem.removeAttribute(expando);}delete jQuery.cache[id];}},each:function(obj,fn,args){if(args){if(obj.length==undefined)for(var i in obj)fn.apply(obj[i],args);else
   37.22 -for(var i=0,ol=obj.length;i<ol;i++)if(fn.apply(obj[i],args)===false)break;}else{if(obj.length==undefined)for(var i in obj)fn.call(obj[i],i,obj[i]);else
   37.23 -for(var i=0,ol=obj.length,val=obj[0];i<ol&&fn.call(val,i,val)!==false;val=obj[++i]){}}return obj;},prop:function(elem,value,type,index,prop){if(jQuery.isFunction(value))value=value.call(elem,[index]);var exclude=/z-?index|font-?weight|opacity|zoom|line-?height/i;return value&&value.constructor==Number&&type=="curCSS"&&!exclude.test(prop)?value+"px":value;},className:{add:function(elem,c){jQuery.each((c||"").split(/\s+/),function(i,cur){if(!jQuery.className.has(elem.className,cur))elem.className+=(elem.className?" ":"")+cur;});},remove:function(elem,c){elem.className=c!=undefined?jQuery.grep(elem.className.split(/\s+/),function(cur){return!jQuery.className.has(c,cur);}).join(" "):"";},has:function(t,c){return jQuery.inArray(c,(t.className||t).toString().split(/\s+/))>-1;}},swap:function(e,o,f){for(var i in o){e.style["old"+i]=e.style[i];e.style[i]=o[i];}f.apply(e,[]);for(var i in o)e.style[i]=e.style["old"+i];},css:function(e,p){if(p=="height"||p=="width"){var old={},oHeight,oWidth,d=["Top","Bottom","Right","Left"];jQuery.each(d,function(){old["padding"+this]=0;old["border"+this+"Width"]=0;});jQuery.swap(e,old,function(){if(jQuery(e).is(':visible')){oHeight=e.offsetHeight;oWidth=e.offsetWidth;}else{e=jQuery(e.cloneNode(true)).find(":radio").removeAttr("checked").end().css({visibility:"hidden",position:"absolute",display:"block",right:"0",left:"0"}).appendTo(e.parentNode)[0];var parPos=jQuery.css(e.parentNode,"position")||"static";if(parPos=="static")e.parentNode.style.position="relative";oHeight=e.clientHeight;oWidth=e.clientWidth;if(parPos=="static")e.parentNode.style.position="static";e.parentNode.removeChild(e);}});return p=="height"?oHeight:oWidth;}return jQuery.curCSS(e,p);},curCSS:function(elem,prop,force){var ret,stack=[],swap=[];function color(a){if(!jQuery.browser.safari)return false;var ret=document.defaultView.getComputedStyle(a,null);return!ret||ret.getPropertyValue("color")=="";}if(prop=="opacity"&&jQuery.browser.msie){ret=jQuery.attr(elem.style,"opacity");return ret==""?"1":ret;}if(prop.match(/float/i))prop=styleFloat;if(!force&&elem.style[prop])ret=elem.style[prop];else if(document.defaultView&&document.defaultView.getComputedStyle){if(prop.match(/float/i))prop="float";prop=prop.replace(/([A-Z])/g,"-$1").toLowerCase();var cur=document.defaultView.getComputedStyle(elem,null);if(cur&&!color(elem))ret=cur.getPropertyValue(prop);else{for(var a=elem;a&&color(a);a=a.parentNode)stack.unshift(a);for(a=0;a<stack.length;a++)if(color(stack[a])){swap[a]=stack[a].style.display;stack[a].style.display="block";}ret=prop=="display"&&swap[stack.length-1]!=null?"none":document.defaultView.getComputedStyle(elem,null).getPropertyValue(prop)||"";for(a=0;a<swap.length;a++)if(swap[a]!=null)stack[a].style.display=swap[a];}if(prop=="opacity"&&ret=="")ret="1";}else if(elem.currentStyle){var newProp=prop.replace(/\-(\w)/g,function(m,c){return c.toUpperCase();});ret=elem.currentStyle[prop]||elem.currentStyle[newProp];if(!/^\d+(px)?$/i.test(ret)&&/^\d/.test(ret)){var style=elem.style.left;var runtimeStyle=elem.runtimeStyle.left;elem.runtimeStyle.left=elem.currentStyle.left;elem.style.left=ret||0;ret=elem.style.pixelLeft+"px";elem.style.left=style;elem.runtimeStyle.left=runtimeStyle;}}return ret;},clean:function(a,doc){var r=[];doc=doc||document;jQuery.each(a,function(i,arg){if(!arg)return;if(arg.constructor==Number)arg=arg.toString();if(typeof arg=="string"){arg=arg.replace(/(<(\w+)[^>]*?)\/>/g,function(m,all,tag){return tag.match(/^(abbr|br|col|img|input|link|meta|param|hr|area)$/i)?m:all+"></"+tag+">";});var s=jQuery.trim(arg).toLowerCase(),div=doc.createElement("div"),tb=[];var wrap=!s.indexOf("<opt")&&[1,"<select>","</select>"]||!s.indexOf("<leg")&&[1,"<fieldset>","</fieldset>"]||s.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"<table>","</table>"]||!s.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!s.indexOf("<td")||!s.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||!s.indexOf("<col")&&[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"]||jQuery.browser.msie&&[1,"div<div>","</div>"]||[0,"",""];div.innerHTML=wrap[1]+arg+wrap[2];while(wrap[0]--)div=div.lastChild;if(jQuery.browser.msie){if(!s.indexOf("<table")&&s.indexOf("<tbody")<0)tb=div.firstChild&&div.firstChild.childNodes;else if(wrap[1]=="<table>"&&s.indexOf("<tbody")<0)tb=div.childNodes;for(var n=tb.length-1;n>=0;--n)if(jQuery.nodeName(tb[n],"tbody")&&!tb[n].childNodes.length)tb[n].parentNode.removeChild(tb[n]);if(/^\s/.test(arg))div.insertBefore(doc.createTextNode(arg.match(/^\s*/)[0]),div.firstChild);}arg=jQuery.makeArray(div.childNodes);}if(0===arg.length&&(!jQuery.nodeName(arg,"form")&&!jQuery.nodeName(arg,"select")))return;if(arg[0]==undefined||jQuery.nodeName(arg,"form")||arg.options)r.push(arg);else
   37.24 -r=jQuery.merge(r,arg);});return r;},attr:function(elem,name,value){var fix=jQuery.isXMLDoc(elem)?{}:jQuery.props;if(name=="selected"&&jQuery.browser.safari)elem.parentNode.selectedIndex;if(fix[name]){if(value!=undefined)elem[fix[name]]=value;return elem[fix[name]];}else if(jQuery.browser.msie&&name=="style")return jQuery.attr(elem.style,"cssText",value);else if(value==undefined&&jQuery.browser.msie&&jQuery.nodeName(elem,"form")&&(name=="action"||name=="method"))return elem.getAttributeNode(name).nodeValue;else if(elem.tagName){if(value!=undefined){if(name=="type"&&jQuery.nodeName(elem,"input")&&elem.parentNode)throw"type property can't be changed";elem.setAttribute(name,value);}if(jQuery.browser.msie&&/href|src/.test(name)&&!jQuery.isXMLDoc(elem))return elem.getAttribute(name,2);return elem.getAttribute(name);}else{if(name=="opacity"&&jQuery.browser.msie){if(value!=undefined){elem.zoom=1;elem.filter=(elem.filter||"").replace(/alpha\([^)]*\)/,"")+(parseFloat(value).toString()=="NaN"?"":"alpha(opacity="+value*100+")");}return elem.filter?(parseFloat(elem.filter.match(/opacity=([^)]*)/)[1])/100).toString():"";}name=name.replace(/-([a-z])/ig,function(z,b){return b.toUpperCase();});if(value!=undefined)elem[name]=value;return elem[name];}},trim:function(t){return(t||"").replace(/^\s+|\s+$/g,"");},makeArray:function(a){var r=[];if(typeof a!="array")for(var i=0,al=a.length;i<al;i++)r.push(a[i]);else
   37.25 -r=a.slice(0);return r;},inArray:function(b,a){for(var i=0,al=a.length;i<al;i++)if(a[i]==b)return i;return-1;},merge:function(first,second){if(jQuery.browser.msie){for(var i=0;second[i];i++)if(second[i].nodeType!=8)first.push(second[i]);}else
   37.26 -for(var i=0;second[i];i++)first.push(second[i]);return first;},unique:function(first){var r=[],done={};try{for(var i=0,fl=first.length;i<fl;i++){var id=jQuery.data(first[i]);if(!done[id]){done[id]=true;r.push(first[i]);}}}catch(e){r=first;}return r;},grep:function(elems,fn,inv){if(typeof fn=="string")fn=eval("false||function(a,i){return "+fn+"}");var result=[];for(var i=0,el=elems.length;i<el;i++)if(!inv&&fn(elems[i],i)||inv&&!fn(elems[i],i))result.push(elems[i]);return result;},map:function(elems,fn){if(typeof fn=="string")fn=eval("false||function(a){return "+fn+"}");var result=[];for(var i=0,el=elems.length;i<el;i++){var val=fn(elems[i],i);if(val!==null&&val!=undefined){if(val.constructor!=Array)val=[val];result=result.concat(val);}}return result;}});var userAgent=navigator.userAgent.toLowerCase();jQuery.browser={version:(userAgent.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[])[1],safari:/webkit/.test(userAgent),opera:/opera/.test(userAgent),msie:/msie/.test(userAgent)&&!/opera/.test(userAgent),mozilla:/mozilla/.test(userAgent)&&!/(compatible|webkit)/.test(userAgent)};var styleFloat=jQuery.browser.msie?"styleFloat":"cssFloat";jQuery.extend({boxModel:!jQuery.browser.msie||document.compatMode=="CSS1Compat",styleFloat:jQuery.browser.msie?"styleFloat":"cssFloat",props:{"for":"htmlFor","class":"className","float":styleFloat,cssFloat:styleFloat,styleFloat:styleFloat,innerHTML:"innerHTML",className:"className",value:"value",disabled:"disabled",checked:"checked",readonly:"readOnly",selected:"selected",maxlength:"maxLength"}});jQuery.each({parent:"a.parentNode",parents:"jQuery.dir(a,'parentNode')",next:"jQuery.nth(a,2,'nextSibling')",prev:"jQuery.nth(a,2,'previousSibling')",nextAll:"jQuery.dir(a,'nextSibling')",prevAll:"jQuery.dir(a,'previousSibling')",siblings:"jQuery.sibling(a.parentNode.firstChild,a)",children:"jQuery.sibling(a.firstChild)",contents:"jQuery.nodeName(a,'iframe')?a.contentDocument||a.contentWindow.document:jQuery.makeArray(a.childNodes)"},function(i,n){jQuery.fn[i]=function(a){var ret=jQuery.map(this,n);if(a&&typeof a=="string")ret=jQuery.multiFilter(a,ret);return this.pushStack(jQuery.unique(ret));};});jQuery.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(i,n){jQuery.fn[i]=function(){var a=arguments;return this.each(function(){for(var j=0,al=a.length;j<al;j++)jQuery(a[j])[n](this);});};});jQuery.each({removeAttr:function(key){jQuery.attr(this,key,"");this.removeAttribute(key);},addClass:function(c){jQuery.className.add(this,c);},removeClass:function(c){jQuery.className.remove(this,c);},toggleClass:function(c){jQuery.className[jQuery.className.has(this,c)?"remove":"add"](this,c);},remove:function(a){if(!a||jQuery.filter(a,[this]).r.length){jQuery.removeData(this);this.parentNode.removeChild(this);}},empty:function(){jQuery("*",this).each(function(){jQuery.removeData(this);});while(this.firstChild)this.removeChild(this.firstChild);}},function(i,n){jQuery.fn[i]=function(){return this.each(n,arguments);};});jQuery.each(["Height","Width"],function(i,name){var n=name.toLowerCase();jQuery.fn[n]=function(h){return this[0]==window?jQuery.browser.safari&&self["inner"+name]||jQuery.boxModel&&Math.max(document.documentElement["client"+name],document.body["client"+name])||document.body["client"+name]:this[0]==document?Math.max(document.body["scroll"+name],document.body["offset"+name]):h==undefined?(this.length?jQuery.css(this[0],n):null):this.css(n,h.constructor==String?h:h+"px");};});var chars=jQuery.browser.safari&&parseInt(jQuery.browser.version)<417?"(?:[\\w*_-]|\\\\.)":"(?:[\\w\u0128-\uFFFF*_-]|\\\\.)",quickChild=new RegExp("^>\\s*("+chars+"+)"),quickID=new RegExp("^("+chars+"+)(#)("+chars+"+)"),quickClass=new RegExp("^([#.]?)("+chars+"*)");jQuery.extend({expr:{"":"m[2]=='*'||jQuery.nodeName(a,m[2])","#":"a.getAttribute('id')==m[2]",":":{lt:"i<m[3]-0",gt:"i>m[3]-0",nth:"m[3]-0==i",eq:"m[3]-0==i",first:"i==0",last:"i==r.length-1",even:"i%2==0",odd:"i%2","first-child":"a.parentNode.getElementsByTagName('*')[0]==a","last-child":"jQuery.nth(a.parentNode.lastChild,1,'previousSibling')==a","only-child":"!jQuery.nth(a.parentNode.lastChild,2,'previousSibling')",parent:"a.firstChild",empty:"!a.firstChild",contains:"(a.textContent||a.innerText||jQuery(a).text()||'').indexOf(m[3])>=0",visible:'"hidden"!=a.type&&jQuery.css(a,"display")!="none"&&jQuery.css(a,"visibility")!="hidden"',hidden:'"hidden"==a.type||jQuery.css(a,"display")=="none"||jQuery.css(a,"visibility")=="hidden"',enabled:"!a.disabled",disabled:"a.disabled",checked:"a.checked",selected:"a.selected||jQuery.attr(a,'selected')",text:"'text'==a.type",radio:"'radio'==a.type",checkbox:"'checkbox'==a.type",file:"'file'==a.type",password:"'password'==a.type",submit:"'submit'==a.type",image:"'image'==a.type",reset:"'reset'==a.type",button:'"button"==a.type||jQuery.nodeName(a,"button")',input:"/input|select|textarea|button/i.test(a.nodeName)",has:"jQuery.find(m[3],a).length",header:"/h\\d/i.test(a.nodeName)",animated:"jQuery.grep(jQuery.timers,function(fn){return a==fn.elem;}).length"}},parse:[/^(\[) *@?([\w-]+) *([!*$^~=]*) *('?"?)(.*?)\4 *\]/,/^(:)([\w-]+)\("?'?(.*?(\(.*?\))?[^(]*?)"?'?\)/,new RegExp("^([:.#]*)("+chars+"+)")],multiFilter:function(expr,elems,not){var old,cur=[];while(expr&&expr!=old){old=expr;var f=jQuery.filter(expr,elems,not);expr=f.t.replace(/^\s*,\s*/,"");cur=not?elems=f.r:jQuery.merge(cur,f.r);}return cur;},find:function(t,context){if(typeof t!="string")return[t];if(context&&!context.nodeType)context=null;context=context||document;var ret=[context],done=[],last;while(t&&last!=t){var r=[];last=t;t=jQuery.trim(t);var foundToken=false;var re=quickChild;var m=re.exec(t);if(m){var nodeName=m[1].toUpperCase();for(var i=0;ret[i];i++)for(var c=ret[i].firstChild;c;c=c.nextSibling)if(c.nodeType==1&&(nodeName=="*"||c.nodeName.toUpperCase()==nodeName.toUpperCase()))r.push(c);ret=r;t=t.replace(re,"");if(t.indexOf(" ")==0)continue;foundToken=true;}else{re=/^([>+~])\s*(\w*)/i;if((m=re.exec(t))!=null){r=[];var nodeName=m[2],merge={};m=m[1];for(var j=0,rl=ret.length;j<rl;j++){var n=m=="~"||m=="+"?ret[j].nextSibling:ret[j].firstChild;for(;n;n=n.nextSibling)if(n.nodeType==1){var id=jQuery.data(n);if(m=="~"&&merge[id])break;if(!nodeName||n.nodeName.toUpperCase()==nodeName.toUpperCase()){if(m=="~")merge[id]=true;r.push(n);}if(m=="+")break;}}ret=r;t=jQuery.trim(t.replace(re,""));foundToken=true;}}if(t&&!foundToken){if(!t.indexOf(",")){if(context==ret[0])ret.shift();done=jQuery.merge(done,ret);r=ret=[context];t=" "+t.substr(1,t.length);}else{var re2=quickID;var m=re2.exec(t);if(m){m=[0,m[2],m[3],m[1]];}else{re2=quickClass;m=re2.exec(t);}m[2]=m[2].replace(/\\/g,"");var elem=ret[ret.length-1];if(m[1]=="#"&&elem&&elem.getElementById&&!jQuery.isXMLDoc(elem)){var oid=elem.getElementById(m[2]);if((jQuery.browser.msie||jQuery.browser.opera)&&oid&&typeof oid.id=="string"&&oid.id!=m[2])oid=jQuery('[@id="'+m[2]+'"]',elem)[0];ret=r=oid&&(!m[3]||jQuery.nodeName(oid,m[3]))?[oid]:[];}else{for(var i=0;ret[i];i++){var tag=m[1]=="#"&&m[3]?m[3]:m[1]!=""||m[0]==""?"*":m[2];if(tag=="*"&&ret[i].nodeName.toLowerCase()=="object")tag="param";r=jQuery.merge(r,ret[i].getElementsByTagName(tag));}if(m[1]==".")r=jQuery.classFilter(r,m[2]);if(m[1]=="#"){var tmp=[];for(var i=0;r[i];i++)if(r[i].getAttribute("id")==m[2]){tmp=[r[i]];break;}r=tmp;}ret=r;}t=t.replace(re2,"");}}if(t){var val=jQuery.filter(t,r);ret=r=val.r;t=jQuery.trim(val.t);}}if(t)ret=[];if(ret&&context==ret[0])ret.shift();done=jQuery.merge(done,ret);return done;},classFilter:function(r,m,not){m=" "+m+" ";var tmp=[];for(var i=0;r[i];i++){var pass=(" "+r[i].className+" ").indexOf(m)>=0;if(!not&&pass||not&&!pass)tmp.push(r[i]);}return tmp;},filter:function(t,r,not){var last;while(t&&t!=last){last=t;var p=jQuery.parse,m;for(var i=0;p[i];i++){m=p[i].exec(t);if(m){t=t.substring(m[0].length);m[2]=m[2].replace(/\\/g,"");break;}}if(!m)break;if(m[1]==":"&&m[2]=="not")r=jQuery.filter(m[3],r,true).r;else if(m[1]==".")r=jQuery.classFilter(r,m[2],not);else if(m[1]=="["){var tmp=[],type=m[3];for(var i=0,rl=r.length;i<rl;i++){var a=r[i],z=a[jQuery.props[m[2]]||m[2]];if(z==null||/href|src|selected/.test(m[2]))z=jQuery.attr(a,m[2])||'';if((type==""&&!!z||type=="="&&z==m[5]||type=="!="&&z!=m[5]||type=="^="&&z&&!z.indexOf(m[5])||type=="$="&&z.substr(z.length-m[5].length)==m[5]||(type=="*="||type=="~=")&&z.indexOf(m[5])>=0)^not)tmp.push(a);}r=tmp;}else if(m[1]==":"&&m[2]=="nth-child"){var merge={},tmp=[],test=/(\d*)n\+?(\d*)/.exec(m[3]=="even"&&"2n"||m[3]=="odd"&&"2n+1"||!/\D/.test(m[3])&&"n+"+m[3]||m[3]),first=(test[1]||1)-0,last=test[2]-0;for(var i=0,rl=r.length;i<rl;i++){var node=r[i],parentNode=node.parentNode,id=jQuery.data(parentNode);if(!merge[id]){var c=1;for(var n=parentNode.firstChild;n;n=n.nextSibling)if(n.nodeType==1)n.nodeIndex=c++;merge[id]=true;}var add=false;if(first==1){if(last==0||node.nodeIndex==last)add=true;}else if((node.nodeIndex+last)%first==0)add=true;if(add^not)tmp.push(node);}r=tmp;}else{var f=jQuery.expr[m[1]];if(typeof f!="string")f=jQuery.expr[m[1]][m[2]];f=eval("false||function(a,i){return "+f+"}");r=jQuery.grep(r,f,not);}}return{r:r,t:t};},dir:function(elem,dir){var matched=[];var cur=elem[dir];while(cur&&cur!=document){if(cur.nodeType==1)matched.push(cur);cur=cur[dir];}return matched;},nth:function(cur,result,dir,elem){result=result||1;var num=0;for(;cur;cur=cur[dir])if(cur.nodeType==1&&++num==result)break;return cur;},sibling:function(n,elem){var r=[];for(;n;n=n.nextSibling){if(n.nodeType==1&&(!elem||n!=elem))r.push(n);}return r;}});jQuery.event={add:function(element,type,handler,data){if(jQuery.browser.msie&&element.setInterval!=undefined)element=window;if(!handler.guid)handler.guid=this.guid++;if(data!=undefined){var fn=handler;handler=function(){return fn.apply(this,arguments);};handler.data=data;handler.guid=fn.guid;}var parts=type.split(".");type=parts[0];handler.type=parts[1];var events=jQuery.data(element,"events")||jQuery.data(element,"events",{});var handle=jQuery.data(element,"handle",function(){var val;if(typeof jQuery=="undefined"||jQuery.event.triggered)return val;val=jQuery.event.handle.apply(element,arguments);return val;});var handlers=events[type];if(!handlers){handlers=events[type]={};if(element.addEventListener)element.addEventListener(type,handle,false);else
   37.27 -element.attachEvent("on"+type,handle);}handlers[handler.guid]=handler;this.global[type]=true;},guid:1,global:{},remove:function(element,type,handler){var events=jQuery.data(element,"events"),ret,index;if(typeof type=="string"){var parts=type.split(".");type=parts[0];}if(events){if(type&&type.type){handler=type.handler;type=type.type;}if(!type){for(type in events)this.remove(element,type);}else if(events[type]){if(handler)delete events[type][handler.guid];else
   37.28 -for(handler in events[type])if(!parts[1]||events[type][handler].type==parts[1])delete events[type][handler];for(ret in events[type])break;if(!ret){if(element.removeEventListener)element.removeEventListener(type,jQuery.data(element,"handle"),false);else
   37.29 -element.detachEvent("on"+type,jQuery.data(element,"handle"));ret=null;delete events[type];}}for(ret in events)break;if(!ret){jQuery.removeData(element,"events");jQuery.removeData(element,"handle");}}},trigger:function(type,data,element,donative,extra){data=jQuery.makeArray(data||[]);if(!element){if(this.global[type])jQuery("*").add([window,document]).trigger(type,data);}else{var val,ret,fn=jQuery.isFunction(element[type]||null),evt=!data[0]||!data[0].preventDefault;if(evt)data.unshift(this.fix({type:type,target:element}));data[0].type=type;if(jQuery.isFunction(jQuery.data(element,"handle")))val=jQuery.data(element,"handle").apply(element,data);if(!fn&&element["on"+type]&&element["on"+type].apply(element,data)===false)val=false;if(evt)data.shift();if(extra&&extra.apply(element,data)===false)val=false;if(fn&&donative!==false&&val!==false&&!(jQuery.nodeName(element,'a')&&type=="click")){this.triggered=true;element[type]();}this.triggered=false;}return val;},handle:function(event){var val;event=jQuery.event.fix(event||window.event||{});var parts=event.type.split(".");event.type=parts[0];var c=jQuery.data(this,"events")&&jQuery.data(this,"events")[event.type],args=Array.prototype.slice.call(arguments,1);args.unshift(event);for(var j in c){args[0].handler=c[j];args[0].data=c[j].data;if(!parts[1]||c[j].type==parts[1]){var tmp=c[j].apply(this,args);if(val!==false)val=tmp;if(tmp===false){event.preventDefault();event.stopPropagation();}}}if(jQuery.browser.msie)event.target=event.preventDefault=event.stopPropagation=event.handler=event.data=null;return val;},fix:function(event){var originalEvent=event;event=jQuery.extend({},originalEvent);event.preventDefault=function(){if(originalEvent.preventDefault)originalEvent.preventDefault();originalEvent.returnValue=false;};event.stopPropagation=function(){if(originalEvent.stopPropagation)originalEvent.stopPropagation();originalEvent.cancelBubble=true;};if(!event.target&&event.srcElement)event.target=event.srcElement;if(jQuery.browser.safari&&event.target.nodeType==3)event.target=originalEvent.target.parentNode;if(!event.relatedTarget&&event.fromElement)event.relatedTarget=event.fromElement==event.target?event.toElement:event.fromElement;if(event.pageX==null&&event.clientX!=null){var e=document.documentElement,b=document.body;event.pageX=event.clientX+(e&&e.scrollLeft||b.scrollLeft||0);event.pageY=event.clientY+(e&&e.scrollTop||b.scrollTop||0);}if(!event.which&&(event.charCode||event.keyCode))event.which=event.charCode||event.keyCode;if(!event.metaKey&&event.ctrlKey)event.metaKey=event.ctrlKey;if(!event.which&&event.button)event.which=(event.button&1?1:(event.button&2?3:(event.button&4?2:0)));return event;}};jQuery.fn.extend({bind:function(type,data,fn){return type=="unload"?this.one(type,data,fn):this.each(function(){jQuery.event.add(this,type,fn||data,fn&&data);});},one:function(type,data,fn){return this.each(function(){jQuery.event.add(this,type,function(event){jQuery(this).unbind(event);return(fn||data).apply(this,arguments);},fn&&data);});},unbind:function(type,fn){return this.each(function(){jQuery.event.remove(this,type,fn);});},trigger:function(type,data,fn){return this.each(function(){jQuery.event.trigger(type,data,this,true,fn);});},triggerHandler:function(type,data,fn){if(this[0])return jQuery.event.trigger(type,data,this[0],false,fn);},toggle:function(){var a=arguments;return this.click(function(e){this.lastToggle=0==this.lastToggle?1:0;e.preventDefault();return a[this.lastToggle].apply(this,[e])||false;});},hover:function(f,g){function handleHover(e){var p=e.relatedTarget;while(p&&p!=this)try{p=p.parentNode;}catch(e){p=this;};if(p==this)return false;return(e.type=="mouseover"?f:g).apply(this,[e]);}return this.mouseover(handleHover).mouseout(handleHover);},ready:function(f){bindReady();if(jQuery.isReady)f.apply(document,[jQuery]);else
   37.30 -jQuery.readyList.push(function(){return f.apply(this,[jQuery]);});return this;}});jQuery.extend({isReady:false,readyList:[],ready:function(){if(!jQuery.isReady){jQuery.isReady=true;if(jQuery.readyList){jQuery.each(jQuery.readyList,function(){this.apply(document);});jQuery.readyList=null;}if(jQuery.browser.mozilla||jQuery.browser.opera)document.removeEventListener("DOMContentLoaded",jQuery.ready,false);if(!window.frames.length)jQuery(window).load(function(){jQuery("#__ie_init").remove();});}}});jQuery.each(("blur,focus,load,resize,scroll,unload,click,dblclick,"+"mousedown,mouseup,mousemove,mouseover,mouseout,change,select,"+"submit,keydown,keypress,keyup,error").split(","),function(i,o){jQuery.fn[o]=function(f){return f?this.bind(o,f):this.trigger(o);};});var readyBound=false;function bindReady(){if(readyBound)return;readyBound=true;if(jQuery.browser.mozilla||jQuery.browser.opera)document.addEventListener("DOMContentLoaded",jQuery.ready,false);else if(jQuery.browser.msie){document.write("<scr"+"ipt id=__ie_init defer=true "+"src=//:><\/script>");var script=document.getElementById("__ie_init");if(script)script.onreadystatechange=function(){if(this.readyState!="complete")return;jQuery.ready();};script=null;}else if(jQuery.browser.safari)jQuery.safariTimer=setInterval(function(){if(document.readyState=="loaded"||document.readyState=="complete"){clearInterval(jQuery.safariTimer);jQuery.safariTimer=null;jQuery.ready();}},10);jQuery.event.add(window,"load",jQuery.ready);}jQuery.fn.extend({load:function(url,params,callback){if(jQuery.isFunction(url))return this.bind("load",url);var off=url.indexOf(" ");if(off>=0){var selector=url.slice(off,url.length);url=url.slice(0,off);}callback=callback||function(){};var type="GET";if(params)if(jQuery.isFunction(params)){callback=params;params=null;}else{params=jQuery.param(params);type="POST";}var self=this;jQuery.ajax({url:url,type:type,data:params,complete:function(res,status){if(status=="success"||status=="notmodified")self.html(selector?jQuery("<div/>").append(res.responseText.replace(/<script(.|\s)*?\/script>/g,"")).find(selector):res.responseText);setTimeout(function(){self.each(callback,[res.responseText,status,res]);},13);}});return this;},serialize:function(){return jQuery.param(this.serializeArray());},serializeArray:function(){return this.map(function(){return jQuery.nodeName(this,"form")?jQuery.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(i,elem){var val=jQuery(this).val();return val==null?null:val.constructor==Array?jQuery.map(val,function(val,i){return{name:elem.name,value:val};}):{name:elem.name,value:val};}).get();}});jQuery.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(i,o){jQuery.fn[o]=function(f){return this.bind(o,f);};});var jsc=(new Date).getTime();jQuery.extend({get:function(url,data,callback,type){if(jQuery.isFunction(data)){callback=data;data=null;}return jQuery.ajax({type:"GET",url:url,data:data,success:callback,dataType:type});},getScript:function(url,callback){return jQuery.get(url,null,callback,"script");},getJSON:function(url,data,callback){return jQuery.get(url,data,callback,"json");},post:function(url,data,callback,type){if(jQuery.isFunction(data)){callback=data;data={};}return jQuery.ajax({type:"POST",url:url,data:data,success:callback,dataType:type});},ajaxSetup:function(settings){jQuery.extend(jQuery.ajaxSettings,settings);},ajaxSettings:{global:true,type:"GET",timeout:0,contentType:"application/x-www-form-urlencoded",processData:true,async:true,data:null},lastModified:{},ajax:function(s){var jsonp,jsre=/=(\?|%3F)/g,status,data;s=jQuery.extend(true,s,jQuery.extend(true,{},jQuery.ajaxSettings,s));if(s.data&&s.processData&&typeof s.data!="string")s.data=jQuery.param(s.data);if(s.dataType=="jsonp"){if(s.type.toLowerCase()=="get"){if(!s.url.match(jsre))s.url+=(s.url.match(/\?/)?"&":"?")+(s.jsonp||"callback")+"=?";}else if(!s.data||!s.data.match(jsre))s.data=(s.data?s.data+"&":"")+(s.jsonp||"callback")+"=?";s.dataType="json";}if(s.dataType=="json"&&(s.data&&s.data.match(jsre)||s.url.match(jsre))){jsonp="jsonp"+jsc++;if(s.data)s.data=s.data.replace(jsre,"="+jsonp);s.url=s.url.replace(jsre,"="+jsonp);s.dataType="script";window[jsonp]=function(tmp){data=tmp;success();complete();window[jsonp]=undefined;try{delete window[jsonp];}catch(e){}};}if(s.dataType=="script"&&s.cache==null)s.cache=false;if(s.cache===false&&s.type.toLowerCase()=="get")s.url+=(s.url.match(/\?/)?"&":"?")+"_="+(new Date()).getTime();if(s.data&&s.type.toLowerCase()=="get"){s.url+=(s.url.match(/\?/)?"&":"?")+s.data;s.data=null;}if(s.global&&!jQuery.active++)jQuery.event.trigger("ajaxStart");if(!s.url.indexOf("http")&&s.dataType=="script"){var head=document.getElementsByTagName("head")[0];var script=document.createElement("script");script.src=s.url;if(!jsonp&&(s.success||s.complete)){var done=false;script.onload=script.onreadystatechange=function(){if(!done&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){done=true;success();complete();head.removeChild(script);}};}head.appendChild(script);return;}var requestDone=false;var xml=window.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest();xml.open(s.type,s.url,s.async);if(s.data)xml.setRequestHeader("Content-Type",s.contentType);if(s.ifModified)xml.setRequestHeader("If-Modified-Since",jQuery.lastModified[s.url]||"Thu, 01 Jan 1970 00:00:00 GMT");xml.setRequestHeader("X-Requested-With","XMLHttpRequest");if(s.beforeSend)s.beforeSend(xml);if(s.global)jQuery.event.trigger("ajaxSend",[xml,s]);var onreadystatechange=function(isTimeout){if(!requestDone&&xml&&(xml.readyState==4||isTimeout=="timeout")){requestDone=true;if(ival){clearInterval(ival);ival=null;}status=isTimeout=="timeout"&&"timeout"||!jQuery.httpSuccess(xml)&&"error"||s.ifModified&&jQuery.httpNotModified(xml,s.url)&&"notmodified"||"success";if(status=="success"){try{data=jQuery.httpData(xml,s.dataType);}catch(e){status="parsererror";}}if(status=="success"){var modRes;try{modRes=xml.getResponseHeader("Last-Modified");}catch(e){}if(s.ifModified&&modRes)jQuery.lastModified[s.url]=modRes;if(!jsonp)success();}else
   37.31 -jQuery.handleError(s,xml,status);complete();if(s.async)xml=null;}};if(s.async){var ival=setInterval(onreadystatechange,13);if(s.timeout>0)setTimeout(function(){if(xml){xml.abort();if(!requestDone)onreadystatechange("timeout");}},s.timeout);}try{xml.send(s.data);}catch(e){jQuery.handleError(s,xml,null,e);}if(!s.async)onreadystatechange();return xml;function success(){if(s.success)s.success(data,status);if(s.global)jQuery.event.trigger("ajaxSuccess",[xml,s]);}function complete(){if(s.complete)s.complete(xml,status);if(s.global)jQuery.event.trigger("ajaxComplete",[xml,s]);if(s.global&&!--jQuery.active)jQuery.event.trigger("ajaxStop");}},handleError:function(s,xml,status,e){if(s.error)s.error(xml,status,e);if(s.global)jQuery.event.trigger("ajaxError",[xml,s,e]);},active:0,httpSuccess:function(r){try{return!r.status&&location.protocol=="file:"||(r.status>=200&&r.status<300)||r.status==304||jQuery.browser.safari&&r.status==undefined;}catch(e){}return false;},httpNotModified:function(xml,url){try{var xmlRes=xml.getResponseHeader("Last-Modified");return xml.status==304||xmlRes==jQuery.lastModified[url]||jQuery.browser.safari&&xml.status==undefined;}catch(e){}return false;},httpData:function(r,type){var ct=r.getResponseHeader("content-type");var xml=type=="xml"||!type&&ct&&ct.indexOf("xml")>=0;var data=xml?r.responseXML:r.responseText;if(xml&&data.documentElement.tagName=="parsererror")throw"parsererror";if(type=="script")jQuery.globalEval(data);if(type=="json")data=eval("("+data+")");return data;},param:function(a){var s=[];if(a.constructor==Array||a.jquery)jQuery.each(a,function(){s.push(encodeURIComponent(this.name)+"="+encodeURIComponent(this.value));});else
   37.32 -for(var j in a)if(a[j]&&a[j].constructor==Array)jQuery.each(a[j],function(){s.push(encodeURIComponent(j)+"="+encodeURIComponent(this));});else
   37.33 -s.push(encodeURIComponent(j)+"="+encodeURIComponent(a[j]));return s.join("&").replace(/%20/g,"+");}});jQuery.fn.extend({show:function(speed,callback){return speed?this.animate({height:"show",width:"show",opacity:"show"},speed,callback):this.filter(":hidden").each(function(){this.style.display=this.oldblock?this.oldblock:"";if(jQuery.css(this,"display")=="none")this.style.display="block";}).end();},hide:function(speed,callback){return speed?this.animate({height:"hide",width:"hide",opacity:"hide"},speed,callback):this.filter(":visible").each(function(){this.oldblock=this.oldblock||jQuery.css(this,"display");if(this.oldblock=="none")this.oldblock="block";this.style.display="none";}).end();},_toggle:jQuery.fn.toggle,toggle:function(fn,fn2){return jQuery.isFunction(fn)&&jQuery.isFunction(fn2)?this._toggle(fn,fn2):fn?this.animate({height:"toggle",width:"toggle",opacity:"toggle"},fn,fn2):this.each(function(){jQuery(this)[jQuery(this).is(":hidden")?"show":"hide"]();});},slideDown:function(speed,callback){return this.animate({height:"show"},speed,callback);},slideUp:function(speed,callback){return this.animate({height:"hide"},speed,callback);},slideToggle:function(speed,callback){return this.animate({height:"toggle"},speed,callback);},fadeIn:function(speed,callback){return this.animate({opacity:"show"},speed,callback);},fadeOut:function(speed,callback){return this.animate({opacity:"hide"},speed,callback);},fadeTo:function(speed,to,callback){return this.animate({opacity:to},speed,callback);},animate:function(prop,speed,easing,callback){var opt=jQuery.speed(speed,easing,callback);return this[opt.queue===false?"each":"queue"](function(){opt=jQuery.extend({},opt);var hidden=jQuery(this).is(":hidden"),self=this;for(var p in prop){if(prop[p]=="hide"&&hidden||prop[p]=="show"&&!hidden)return jQuery.isFunction(opt.complete)&&opt.complete.apply(this);if(p=="height"||p=="width"){opt.display=jQuery.css(this,"display");opt.overflow=this.style.overflow;}}if(opt.overflow!=null)this.style.overflow="hidden";opt.curAnim=jQuery.extend({},prop);jQuery.each(prop,function(name,val){var e=new jQuery.fx(self,opt,name);if(/toggle|show|hide/.test(val))e[val=="toggle"?hidden?"show":"hide":val](prop);else{var parts=val.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),start=e.cur(true)||0;if(parts){var end=parseFloat(parts[2]),unit=parts[3]||"px";if(unit!="px"){self.style[name]=(end||1)+unit;start=((end||1)/e.cur(true))*start;self.style[name]=start+unit;}if(parts[1])end=((parts[1]=="-="?-1:1)*end)+start;e.custom(start,end,unit);}else
   37.34 -e.custom(start,val,"");}});return true;});},queue:function(type,fn){if(jQuery.isFunction(type)){fn=type;type="fx";}if(!type||(typeof type=="string"&&!fn))return queue(this[0],type);return this.each(function(){if(fn.constructor==Array)queue(this,type,fn);else{queue(this,type).push(fn);if(queue(this,type).length==1)fn.apply(this);}});},stop:function(){var timers=jQuery.timers;return this.each(function(){for(var i=0;i<timers.length;i++)if(timers[i].elem==this)timers.splice(i--,1);}).dequeue();}});var queue=function(elem,type,array){if(!elem)return;var q=jQuery.data(elem,type+"queue");if(!q||array)q=jQuery.data(elem,type+"queue",array?jQuery.makeArray(array):[]);return q;};jQuery.fn.dequeue=function(type){type=type||"fx";return this.each(function(){var q=queue(this,type);q.shift();if(q.length)q[0].apply(this);});};jQuery.extend({speed:function(speed,easing,fn){var opt=speed&&speed.constructor==Object?speed:{complete:fn||!fn&&easing||jQuery.isFunction(speed)&&speed,duration:speed,easing:fn&&easing||easing&&easing.constructor!=Function&&easing};opt.duration=(opt.duration&&opt.duration.constructor==Number?opt.duration:{slow:600,fast:200}[opt.duration])||400;opt.old=opt.complete;opt.complete=function(){jQuery(this).dequeue();if(jQuery.isFunction(opt.old))opt.old.apply(this);};return opt;},easing:{linear:function(p,n,firstNum,diff){return firstNum+diff*p;},swing:function(p,n,firstNum,diff){return((-Math.cos(p*Math.PI)/2)+0.5)*diff+firstNum;}},timers:[],fx:function(elem,options,prop){this.options=options;this.elem=elem;this.prop=prop;if(!options.orig)options.orig={};}});jQuery.fx.prototype={update:function(){if(this.options.step)this.options.step.apply(this.elem,[this.now,this]);(jQuery.fx.step[this.prop]||jQuery.fx.step._default)(this);if(this.prop=="height"||this.prop=="width")this.elem.style.display="block";},cur:function(force){if(this.elem[this.prop]!=null&&this.elem.style[this.prop]==null)return this.elem[this.prop];var r=parseFloat(jQuery.curCSS(this.elem,this.prop,force));return r&&r>-10000?r:parseFloat(jQuery.css(this.elem,this.prop))||0;},custom:function(from,to,unit){this.startTime=(new Date()).getTime();this.start=from;this.end=to;this.unit=unit||this.unit||"px";this.now=this.start;this.pos=this.state=0;this.update();var self=this;function t(){return self.step();}t.elem=this.elem;jQuery.timers.push(t);if(jQuery.timers.length==1){var timer=setInterval(function(){var timers=jQuery.timers;for(var i=0;i<timers.length;i++)if(!timers[i]())timers.splice(i--,1);if(!timers.length)clearInterval(timer);},13);}},show:function(){this.options.orig[this.prop]=jQuery.attr(this.elem.style,this.prop);this.options.show=true;this.custom(0,this.cur());if(this.prop=="width"||this.prop=="height")this.elem.style[this.prop]="1px";jQuery(this.elem).show();},hide:function(){this.options.orig[this.prop]=jQuery.attr(this.elem.style,this.prop);this.options.hide=true;this.custom(this.cur(),0);},step:function(){var t=(new Date()).getTime();if(t>this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var done=true;for(var i in this.options.curAnim)if(this.options.curAnim[i]!==true)done=false;if(done){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(jQuery.css(this.elem,"display")=="none")this.elem.style.display="block";}if(this.options.hide)this.elem.style.display="none";if(this.options.hide||this.options.show)for(var p in this.options.curAnim)jQuery.attr(this.elem.style,p,this.options.orig[p]);}if(done&&jQuery.isFunction(this.options.complete))this.options.complete.apply(this.elem);return false;}else{var n=t-this.startTime;this.state=n/this.options.duration;this.pos=jQuery.easing[this.options.easing||(jQuery.easing.swing?"swing":"linear")](this.state,n,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update();}return true;}};jQuery.fx.step={scrollLeft:function(fx){fx.elem.scrollLeft=fx.now;},scrollTop:function(fx){fx.elem.scrollTop=fx.now;},opacity:function(fx){jQuery.attr(fx.elem.style,"opacity",fx.now);},_default:function(fx){fx.elem.style[fx.prop]=fx.now+fx.unit;}};jQuery.fn.offset=function(){var left=0,top=0,elem=this[0],results;if(elem)with(jQuery.browser){var absolute=jQuery.css(elem,"position")=="absolute",parent=elem.parentNode,offsetParent=elem.offsetParent,doc=elem.ownerDocument,safari2=safari&&parseInt(version)<522;if(elem.getBoundingClientRect){box=elem.getBoundingClientRect();add(box.left+Math.max(doc.documentElement.scrollLeft,doc.body.scrollLeft),box.top+Math.max(doc.documentElement.scrollTop,doc.body.scrollTop));if(msie){var border=jQuery("html").css("borderWidth");border=(border=="medium"||jQuery.boxModel&&parseInt(version)>=7)&&2||border;add(-border,-border);}}else{add(elem.offsetLeft,elem.offsetTop);while(offsetParent){add(offsetParent.offsetLeft,offsetParent.offsetTop);if(mozilla&&/^t[d|h]$/i.test(parent.tagName)||!safari2)border(offsetParent);if(safari2&&!absolute&&jQuery.css(offsetParent,"position")=="absolute")absolute=true;offsetParent=offsetParent.offsetParent;}while(parent.tagName&&!/^body|html$/i.test(parent.tagName)){if(!/^inline|table-row.*$/i.test(jQuery.css(parent,"display")))add(-parent.scrollLeft,-parent.scrollTop);if(mozilla&&jQuery.css(parent,"overflow")!="visible")border(parent);parent=parent.parentNode;}if(safari2&&absolute)add(-doc.body.offsetLeft,-doc.body.offsetTop);}results={top:top,left:left};}return results;function border(elem){add(jQuery.css(elem,"borderLeftWidth"),jQuery.css(elem,"borderTopWidth"));}function add(l,t){left+=parseInt(l)||0;top+=parseInt(t)||0;}};})();
   37.35 \ No newline at end of file
    38.1 --- a/web/javascript/jquery.js	Mon Sep 21 00:02:10 2009 +0200
    38.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    38.3 @@ -1,2992 +0,0 @@
    38.4 -(function(){
    38.5 -/*
    38.6 - * jQuery 1.2.1 - New Wave Javascript
    38.7 - *
    38.8 - * Copyright (c) 2007 John Resig (jquery.com)
    38.9 - * Dual licensed under the MIT (MIT-LICENSE.txt)
   38.10 - * and GPL (GPL-LICENSE.txt) licenses.
   38.11 - *
   38.12 - * $Date: 2007-09-16 23:42:06 -0400 (Sun, 16 Sep 2007) $
   38.13 - * $Rev: 3353 $
   38.14 - */
   38.15 -
   38.16 -// Map over jQuery in case of overwrite
   38.17 -if ( typeof jQuery != "undefined" )
   38.18 -	var _jQuery = jQuery;
   38.19 -
   38.20 -var jQuery = window.jQuery = function(selector, context) {
   38.21 -	// If the context is a namespace object, return a new object
   38.22 -	return this instanceof jQuery ?
   38.23 -		this.init(selector, context) :
   38.24 -		new jQuery(selector, context);
   38.25 -};
   38.26 -
   38.27 -// Map over the $ in case of overwrite
   38.28 -if ( typeof $ != "undefined" )
   38.29 -	var _$ = $;
   38.30 -	
   38.31 -// Map the jQuery namespace to the '$' one
   38.32 -window.$ = jQuery;
   38.33 -
   38.34 -var quickExpr = /^[^<]*(<(.|\s)+>)[^>]*$|^#(\w+)$/;
   38.35 -
   38.36 -jQuery.fn = jQuery.prototype = {
   38.37 -	init: function(selector, context) {
   38.38 -		// Make sure that a selection was provided
   38.39 -		selector = selector || document;
   38.40 -
   38.41 -		// Handle HTML strings
   38.42 -		if ( typeof selector  == "string" ) {
   38.43 -			var m = quickExpr.exec(selector);
   38.44 -			if ( m && (m[1] || !context) ) {
   38.45 -				// HANDLE: $(html) -> $(array)
   38.46 -				if ( m[1] )
   38.47 -					selector = jQuery.clean( [ m[1] ], context );
   38.48 -
   38.49 -				// HANDLE: $("#id")
   38.50 -				else {
   38.51 -					var tmp = document.getElementById( m[3] );
   38.52 -					if ( tmp )
   38.53 -						// Handle the case where IE and Opera return items
   38.54 -						// by name instead of ID
   38.55 -						if ( tmp.id != m[3] )
   38.56 -							return jQuery().find( selector );
   38.57 -						else {
   38.58 -							this[0] = tmp;
   38.59 -							this.length = 1;
   38.60 -							return this;
   38.61 -						}
   38.62 -					else
   38.63 -						selector = [];
   38.64 -				}
   38.65 -
   38.66 -			// HANDLE: $(expr)
   38.67 -			} else
   38.68 -				return new jQuery( context ).find( selector );
   38.69 -
   38.70 -		// HANDLE: $(function)
   38.71 -		// Shortcut for document ready
   38.72 -		} else if ( jQuery.isFunction(selector) )
   38.73 -			return new jQuery(document)[ jQuery.fn.ready ? "ready" : "load" ]( selector );
   38.74 -
   38.75 -		return this.setArray(
   38.76 -			// HANDLE: $(array)
   38.77 -			selector.constructor == Array && selector ||
   38.78 -
   38.79 -			// HANDLE: $(arraylike)
   38.80 -			// Watch for when an array-like object is passed as the selector
   38.81 -			(selector.jquery || selector.length && selector != window && !selector.nodeType && selector[0] != undefined && selector[0].nodeType) && jQuery.makeArray( selector ) ||
   38.82 -
   38.83 -			// HANDLE: $(*)
   38.84 -			[ selector ] );
   38.85 -	},
   38.86 -	
   38.87 -	jquery: "1.2.1",
   38.88 -
   38.89 -	size: function() {
   38.90 -		return this.length;
   38.91 -	},
   38.92 -	
   38.93 -	length: 0,
   38.94 -
   38.95 -	get: function( num ) {
   38.96 -		return num == undefined ?
   38.97 -
   38.98 -			// Return a 'clean' array
   38.99 -			jQuery.makeArray( this ) :
  38.100 -
  38.101 -			// Return just the object
  38.102 -			this[num];
  38.103 -	},
  38.104 -	
  38.105 -	pushStack: function( a ) {
  38.106 -		var ret = jQuery(a);
  38.107 -		ret.prevObject = this;
  38.108 -		return ret;
  38.109 -	},
  38.110 -	
  38.111 -	setArray: function( a ) {
  38.112 -		this.length = 0;
  38.113 -		Array.prototype.push.apply( this, a );
  38.114 -		return this;
  38.115 -	},
  38.116 -
  38.117 -	each: function( fn, args ) {
  38.118 -		return jQuery.each( this, fn, args );
  38.119 -	},
  38.120 -
  38.121 -	index: function( obj ) {
  38.122 -		var pos = -1;
  38.123 -		this.each(function(i){
  38.124 -			if ( this == obj ) pos = i;
  38.125 -		});
  38.126 -		return pos;
  38.127 -	},
  38.128 -
  38.129 -	attr: function( key, value, type ) {
  38.130 -		var obj = key;
  38.131 -		
  38.132 -		// Look for the case where we're accessing a style value
  38.133 -		if ( key.constructor == String )
  38.134 -			if ( value == undefined )
  38.135 -				return this.length && jQuery[ type || "attr" ]( this[0], key ) || undefined;
  38.136 -			else {
  38.137 -				obj = {};
  38.138 -				obj[ key ] = value;
  38.139 -			}
  38.140 -		
  38.141 -		// Check to see if we're setting style values
  38.142 -		return this.each(function(index){
  38.143 -			// Set all the styles
  38.144 -			for ( var prop in obj )
  38.145 -				jQuery.attr(
  38.146 -					type ? this.style : this,
  38.147 -					prop, jQuery.prop(this, obj[prop], type, index, prop)
  38.148 -				);
  38.149 -		});
  38.150 -	},
  38.151 -
  38.152 -	css: function( key, value ) {
  38.153 -		return this.attr( key, value, "curCSS" );
  38.154 -	},
  38.155 -
  38.156 -	text: function(e) {
  38.157 -		if ( typeof e != "object" && e != null )
  38.158 -			return this.empty().append( document.createTextNode( e ) );
  38.159 -
  38.160 -		var t = "";
  38.161 -		jQuery.each( e || this, function(){
  38.162 -			jQuery.each( this.childNodes, function(){
  38.163 -				if ( this.nodeType != 8 )
  38.164 -					t += this.nodeType != 1 ?
  38.165 -						this.nodeValue : jQuery.fn.text([ this ]);
  38.166 -			});
  38.167 -		});
  38.168 -		return t;
  38.169 -	},
  38.170 -
  38.171 -	wrapAll: function(html) {
  38.172 -		if ( this[0] )
  38.173 -			// The elements to wrap the target around
  38.174 -			jQuery(html, this[0].ownerDocument)
  38.175 -				.clone()
  38.176 -				.insertBefore(this[0])
  38.177 -				.map(function(){
  38.178 -					var elem = this;
  38.179 -					while ( elem.firstChild )
  38.180 -						elem = elem.firstChild;
  38.181 -					return elem;
  38.182 -				})
  38.183 -				.append(this);
  38.184 -
  38.185 -		return this;
  38.186 -	},
  38.187 -
  38.188 -	wrapInner: function(html) {
  38.189 -		return this.each(function(){
  38.190 -			jQuery(this).contents().wrapAll(html);
  38.191 -		});
  38.192 -	},
  38.193 -
  38.194 -	wrap: function(html) {
  38.195 -		return this.each(function(){
  38.196 -			jQuery(this).wrapAll(html);
  38.197 -		});
  38.198 -	},
  38.199 -
  38.200 -	append: function() {
  38.201 -		return this.domManip(arguments, true, 1, function(a){
  38.202 -			this.appendChild( a );
  38.203 -		});
  38.204 -	},
  38.205 -
  38.206 -	prepend: function() {
  38.207 -		return this.domManip(arguments, true, -1, function(a){
  38.208 -			this.insertBefore( a, this.firstChild );
  38.209 -		});
  38.210 -	},
  38.211 -	
  38.212 -	before: function() {
  38.213 -		return this.domManip(arguments, false, 1, function(a){
  38.214 -			this.parentNode.insertBefore( a, this );
  38.215 -		});
  38.216 -	},
  38.217 -
  38.218 -	after: function() {
  38.219 -		return this.domManip(arguments, false, -1, function(a){
  38.220 -			this.parentNode.insertBefore( a, this.nextSibling );
  38.221 -		});
  38.222 -	},
  38.223 -
  38.224 -	end: function() {
  38.225 -		return this.prevObject || jQuery([]);
  38.226 -	},
  38.227 -
  38.228 -	find: function(t) {
  38.229 -		var data = jQuery.map(this, function(a){ return jQuery.find(t,a); });
  38.230 -		return this.pushStack( /[^+>] [^+>]/.test( t ) || t.indexOf("..") > -1 ?
  38.231 -			jQuery.unique( data ) : data );
  38.232 -	},
  38.233 -
  38.234 -	clone: function(events) {
  38.235 -		// Do the clone
  38.236 -		var ret = this.map(function(){
  38.237 -			return this.outerHTML ? jQuery(this.outerHTML)[0] : this.cloneNode(true);
  38.238 -		});
  38.239 -
  38.240 -		// Need to set the expando to null on the cloned set if it exists
  38.241 -		// removeData doesn't work here, IE removes it from the original as well
  38.242 -		// this is primarily for IE but the data expando shouldn't be copied over in any browser
  38.243 -		var clone = ret.find("*").andSelf().each(function(){
  38.244 -			if ( this[ expando ] != undefined )
  38.245 -				this[ expando ] = null;
  38.246 -		});
  38.247 -		
  38.248 -		// Copy the events from the original to the clone
  38.249 -		if (events === true)
  38.250 -			this.find("*").andSelf().each(function(i) {
  38.251 -				var events = jQuery.data(this, "events");
  38.252 -				for ( var type in events )
  38.253 -					for ( var handler in events[type] )
  38.254 -						jQuery.event.add(clone[i], type, events[type][handler], events[type][handler].data);
  38.255 -			});
  38.256 -
  38.257 -		// Return the cloned set
  38.258 -		return ret;
  38.259 -	},
  38.260 -
  38.261 -	filter: function(t) {
  38.262 -		return this.pushStack(
  38.263 -			jQuery.isFunction( t ) &&
  38.264 -			jQuery.grep(this, function(el, index){
  38.265 -				return t.apply(el, [index]);
  38.266 -			}) ||
  38.267 -
  38.268 -			jQuery.multiFilter(t,this) );
  38.269 -	},
  38.270 -
  38.271 -	not: function(t) {
  38.272 -		return this.pushStack(
  38.273 -			t.constructor == String &&
  38.274 -			jQuery.multiFilter(t, this, true) ||
  38.275 -
  38.276 -			jQuery.grep(this, function(a) {
  38.277 -				return ( t.constructor == Array || t.jquery )
  38.278 -					? jQuery.inArray( a, t ) < 0
  38.279 -					: a != t;
  38.280 -			})
  38.281 -		);
  38.282 -	},
  38.283 -
  38.284 -	add: function(t) {
  38.285 -		return this.pushStack( jQuery.merge(
  38.286 -			this.get(),
  38.287 -			t.constructor == String ?
  38.288 -				jQuery(t).get() :
  38.289 -				t.length != undefined && (!t.nodeName || jQuery.nodeName(t, "form")) ?
  38.290 -					t : [t] )
  38.291 -		);
  38.292 -	},
  38.293 -
  38.294 -	is: function(expr) {
  38.295 -		return expr ? jQuery.multiFilter(expr,this).length > 0 : false;
  38.296 -	},
  38.297 -
  38.298 -	hasClass: function(expr) {
  38.299 -		return this.is("." + expr);
  38.300 -	},
  38.301 -	
  38.302 -	val: function( val ) {
  38.303 -		if ( val == undefined ) {
  38.304 -			if ( this.length ) {
  38.305 -				var elem = this[0];
  38.306 -		    	
  38.307 -				// We need to handle select boxes special
  38.308 -				if ( jQuery.nodeName(elem, "select") ) {
  38.309 -					var index = elem.selectedIndex,
  38.310 -						a = [],
  38.311 -						options = elem.options,
  38.312 -						one = elem.type == "select-one";
  38.313 -					
  38.314 -					// Nothing was selected
  38.315 -					if ( index < 0 )
  38.316 -						return null;
  38.317 -
  38.318 -					// Loop through all the selected options
  38.319 -					for ( var i = one ? index : 0, max = one ? index + 1 : options.length; i < max; i++ ) {
  38.320 -						var option = options[i];
  38.321 -						if ( option.selected ) {
  38.322 -							// Get the specifc value for the option
  38.323 -							var val = jQuery.browser.msie && !option.attributes["value"].specified ? option.text : option.value;
  38.324 -							
  38.325 -							// We don't need an array for one selects
  38.326 -							if ( one )
  38.327 -								return val;
  38.328 -							
  38.329 -							// Multi-Selects return an array
  38.330 -							a.push(val);
  38.331 -						}
  38.332 -					}
  38.333 -					
  38.334 -					return a;
  38.335 -					
  38.336 -				// Everything else, we just grab the value
  38.337 -				} else
  38.338 -					return this[0].value.replace(/\r/g, "");
  38.339 -			}
  38.340 -		} else
  38.341 -			return this.each(function(){
  38.342 -				if ( val.constructor == Array && /radio|checkbox/.test(this.type) )
  38.343 -					this.checked = (jQuery.inArray(this.value, val) >= 0 ||
  38.344 -						jQuery.inArray(this.name, val) >= 0);
  38.345 -				else if ( jQuery.nodeName(this, "select") ) {
  38.346 -					var tmp = val.constructor == Array ? val : [val];
  38.347 -
  38.348 -					jQuery("option", this).each(function(){
  38.349 -						this.selected = (jQuery.inArray(this.value, tmp) >= 0 ||
  38.350 -						jQuery.inArray(this.text, tmp) >= 0);
  38.351 -					});
  38.352 -
  38.353 -					if ( !tmp.length )
  38.354 -						this.selectedIndex = -1;
  38.355 -				} else
  38.356 -					this.value = val;
  38.357 -			});
  38.358 -	},
  38.359 -	
  38.360 -	html: function( val ) {
  38.361 -		return val == undefined ?
  38.362 -			( this.length ? this[0].innerHTML : null ) :
  38.363 -			this.empty().append( val );
  38.364 -	},
  38.365 -
  38.366 -	replaceWith: function( val ) {
  38.367 -		return this.after( val ).remove();
  38.368 -	},
  38.369 -
  38.370 -	eq: function(i){
  38.371 -		return this.slice(i, i+1);
  38.372 -	},
  38.373 -
  38.374 -	slice: function() {
  38.375 -		return this.pushStack( Array.prototype.slice.apply( this, arguments ) );
  38.376 -	},
  38.377 -
  38.378 -	map: function(fn) {
  38.379 -		return this.pushStack(jQuery.map( this, function(elem,i){
  38.380 -			return fn.call( elem, i, elem );
  38.381 -		}));
  38.382 -	},
  38.383 -
  38.384 -	andSelf: function() {
  38.385 -		return this.add( this.prevObject );
  38.386 -	},
  38.387 -	
  38.388 -	domManip: function(args, table, dir, fn) {
  38.389 -		var clone = this.length > 1, a; 
  38.390 -
  38.391 -		return this.each(function(){
  38.392 -			if ( !a ) {
  38.393 -				a = jQuery.clean(args, this.ownerDocument);
  38.394 -				if ( dir < 0 )
  38.395 -					a.reverse();
  38.396 -			}
  38.397 -
  38.398 -			var obj = this;
  38.399 -
  38.400 -			if ( table && jQuery.nodeName(this, "table") && jQuery.nodeName(a[0], "tr") )
  38.401 -				obj = this.getElementsByTagName("tbody")[0] || this.appendChild(document.createElement("tbody"));
  38.402 -
  38.403 -			jQuery.each( a, function(){
  38.404 -				var elem = clone ? this.cloneNode(true) : this;
  38.405 -				if ( !evalScript(0, elem) )
  38.406 -					fn.call( obj, elem );
  38.407 -			});
  38.408 -		});
  38.409 -	}
  38.410 -};
  38.411 -
  38.412 -function evalScript(i, elem){
  38.413 -	var script = jQuery.nodeName(elem, "script");
  38.414 -
  38.415 -	if ( script ) {
  38.416 -		if ( elem.src )
  38.417 -			jQuery.ajax({ url: elem.src, async: false, dataType: "script" });
  38.418 -		else
  38.419 -			jQuery.globalEval( elem.text || elem.textContent || elem.innerHTML || "" );
  38.420 -	
  38.421 -		if ( elem.parentNode )
  38.422 -			elem.parentNode.removeChild(elem);
  38.423 -
  38.424 -	} else if ( elem.nodeType == 1 )
  38.425 -    jQuery("script", elem).each(evalScript);
  38.426 -
  38.427 -	return script;
  38.428 -}
  38.429 -
  38.430 -jQuery.extend = jQuery.fn.extend = function() {
  38.431 -	// copy reference to target object
  38.432 -	var target = arguments[0] || {}, a = 1, al = arguments.length, deep = false;
  38.433 -
  38.434 -	// Handle a deep copy situation
  38.435 -	if ( target.constructor == Boolean ) {
  38.436 -		deep = target;
  38.437 -		target = arguments[1] || {};
  38.438 -	}
  38.439 -
  38.440 -	// extend jQuery itself if only one argument is passed
  38.441 -	if ( al == 1 ) {
  38.442 -		target = this;
  38.443 -		a = 0;
  38.444 -	}
  38.445 -
  38.446 -	var prop;
  38.447 -
  38.448 -	for ( ; a < al; a++ )
  38.449 -		// Only deal with non-null/undefined values
  38.450 -		if ( (prop = arguments[a]) != null )
  38.451 -			// Extend the base object
  38.452 -			for ( var i in prop ) {
  38.453 -				// Prevent never-ending loop
  38.454 -				if ( target == prop[i] )
  38.455 -					continue;
  38.456 -
  38.457 -				// Recurse if we're merging object values
  38.458 -				if ( deep && typeof prop[i] == 'object' && target[i] )
  38.459 -					jQuery.extend( target[i], prop[i] );
  38.460 -
  38.461 -				// Don't bring in undefined values
  38.462 -				else if ( prop[i] != undefined )
  38.463 -					target[i] = prop[i];
  38.464 -			}
  38.465 -
  38.466 -	// Return the modified object
  38.467 -	return target;
  38.468 -};
  38.469 -
  38.470 -var expando = "jQuery" + (new Date()).getTime(), uuid = 0, win = {};
  38.471 -
  38.472 -jQuery.extend({
  38.473 -	noConflict: function(deep) {
  38.474 -		window.$ = _$;
  38.475 -		if ( deep )
  38.476 -			window.jQuery = _jQuery;
  38.477 -		return jQuery;
  38.478 -	},
  38.479 -
  38.480 -	// This may seem like some crazy code, but trust me when I say that this
  38.481 -	// is the only cross-browser way to do this. --John
  38.482 -	isFunction: function( fn ) {
  38.483 -		return !!fn && typeof fn != "string" && !fn.nodeName && 
  38.484 -			fn.constructor != Array && /function/i.test( fn + "" );
  38.485 -	},
  38.486 -	
  38.487 -	// check if an element is in a XML document
  38.488 -	isXMLDoc: function(elem) {
  38.489 -		return elem.documentElement && !elem.body ||
  38.490 -			elem.tagName && elem.ownerDocument && !elem.ownerDocument.body;
  38.491 -	},
  38.492 -
  38.493 -	// Evalulates a script in a global context
  38.494 -	// Evaluates Async. in Safari 2 :-(
  38.495 -	globalEval: function( data ) {
  38.496 -		data = jQuery.trim( data );
  38.497 -		if ( data ) {
  38.498 -			if ( window.execScript )
  38.499 -				window.execScript( data );
  38.500 -			else if ( jQuery.browser.safari )
  38.501 -				// safari doesn't provide a synchronous global eval
  38.502 -				window.setTimeout( data, 0 );
  38.503 -			else
  38.504 -				eval.call( window, data );
  38.505 -		}
  38.506 -	},
  38.507 -
  38.508 -	nodeName: function( elem, name ) {
  38.509 -		return elem.nodeName && elem.nodeName.toUpperCase() == name.toUpperCase();
  38.510 -	},
  38.511 -	
  38.512 -	cache: {},
  38.513 -	
  38.514 -	data: function( elem, name, data ) {
  38.515 -		elem = elem == window ? win : elem;
  38.516 -
  38.517 -		var id = elem[ expando ];
  38.518 -
  38.519 -		// Compute a unique ID for the element
  38.520 -		if ( !id ) 
  38.521 -			id = elem[ expando ] = ++uuid;
  38.522 -
  38.523 -		// Only generate the data cache if we're
  38.524 -		// trying to access or manipulate it
  38.525 -		if ( name && !jQuery.cache[ id ] )
  38.526 -			jQuery.cache[ id ] = {};
  38.527 -		
  38.528 -		// Prevent overriding the named cache with undefined values
  38.529 -		if ( data != undefined )
  38.530 -			jQuery.cache[ id ][ name ] = data;
  38.531 -		
  38.532 -		// Return the named cache data, or the ID for the element	
  38.533 -		return name ? jQuery.cache[ id ][ name ] : id;
  38.534 -	},
  38.535 -	
  38.536 -	removeData: function( elem, name ) {
  38.537 -		elem = elem == window ? win : elem;
  38.538 -
  38.539 -		var id = elem[ expando ];
  38.540 -
  38.541 -		// If we want to remove a specific section of the element's data
  38.542 -		if ( name ) {
  38.543 -			if ( jQuery.cache[ id ] ) {
  38.544 -				// Remove the section of cache data
  38.545 -				delete jQuery.cache[ id ][ name ];
  38.546 -
  38.547 -				// If we've removed all the data, remove the element's cache
  38.548 -				name = "";
  38.549 -				for ( name in jQuery.cache[ id ] ) break;
  38.550 -				if ( !name )
  38.551 -					jQuery.removeData( elem );
  38.552 -			}
  38.553 -
  38.554 -		// Otherwise, we want to remove all of the element's data
  38.555 -		} else {
  38.556 -			// Clean up the element expando
  38.557 -			try {
  38.558 -				delete elem[ expando ];
  38.559 -			} catch(e){
  38.560 -				// IE has trouble directly removing the expando
  38.561 -				// but it's ok with using removeAttribute
  38.562 -				if ( elem.removeAttribute )
  38.563 -					elem.removeAttribute( expando );
  38.564 -			}
  38.565 -
  38.566 -			// Completely remove the data cache
  38.567 -			delete jQuery.cache[ id ];
  38.568 -		}
  38.569 -	},
  38.570 -
  38.571 -	// args is for internal usage only
  38.572 -	each: function( obj, fn, args ) {
  38.573 -		if ( args ) {
  38.574 -			if ( obj.length == undefined )
  38.575 -				for ( var i in obj )
  38.576 -					fn.apply( obj[i], args );
  38.577 -			else
  38.578 -				for ( var i = 0, ol = obj.length; i < ol; i++ )
  38.579 -					if ( fn.apply( obj[i], args ) === false ) break;
  38.580 -
  38.581 -		// A special, fast, case for the most common use of each
  38.582 -		} else {
  38.583 -			if ( obj.length == undefined )
  38.584 -				for ( var i in obj )
  38.585 -					fn.call( obj[i], i, obj[i] );
  38.586 -			else
  38.587 -				for ( var i = 0, ol = obj.length, val = obj[0]; 
  38.588 -					i < ol && fn.call(val,i,val) !== false; val = obj[++i] ){}
  38.589 -		}
  38.590 -
  38.591 -		return obj;
  38.592 -	},
  38.593 -	
  38.594 -	prop: function(elem, value, type, index, prop){
  38.595 -			// Handle executable functions
  38.596 -			if ( jQuery.isFunction( value ) )
  38.597 -				value = value.call( elem, [index] );
  38.598 -				
  38.599 -			// exclude the following css properties to add px
  38.600 -			var exclude = /z-?index|font-?weight|opacity|zoom|line-?height/i;
  38.601 -
  38.602 -			// Handle passing in a number to a CSS property
  38.603 -			return value && value.constructor == Number && type == "curCSS" && !exclude.test(prop) ?
  38.604 -				value + "px" :
  38.605 -				value;
  38.606 -	},
  38.607 -
  38.608 -	className: {
  38.609 -		// internal only, use addClass("class")
  38.610 -		add: function( elem, c ){
  38.611 -			jQuery.each( (c || "").split(/\s+/), function(i, cur){
  38.612 -				if ( !jQuery.className.has( elem.className, cur ) )
  38.613 -					elem.className += ( elem.className ? " " : "" ) + cur;
  38.614 -			});
  38.615 -		},
  38.616 -
  38.617 -		// internal only, use removeClass("class")
  38.618 -		remove: function( elem, c ){
  38.619 -			elem.className = c != undefined ?
  38.620 -				jQuery.grep( elem.className.split(/\s+/), function(cur){
  38.621 -					return !jQuery.className.has( c, cur );	
  38.622 -				}).join(" ") : "";
  38.623 -		},
  38.624 -
  38.625 -		// internal only, use is(".class")
  38.626 -		has: function( t, c ) {
  38.627 -			return jQuery.inArray( c, (t.className || t).toString().split(/\s+/) ) > -1;
  38.628 -		}
  38.629 -	},
  38.630 -
  38.631 -	swap: function(e,o,f) {
  38.632 -		for ( var i in o ) {
  38.633 -			e.style["old"+i] = e.style[i];
  38.634 -			e.style[i] = o[i];
  38.635 -		}
  38.636 -		f.apply( e, [] );
  38.637 -		for ( var i in o )
  38.638 -			e.style[i] = e.style["old"+i];
  38.639 -	},
  38.640 -
  38.641 -	css: function(e,p) {
  38.642 -		if ( p == "height" || p == "width" ) {
  38.643 -			var old = {}, oHeight, oWidth, d = ["Top","Bottom","Right","Left"];
  38.644 -
  38.645 -			jQuery.each( d, function(){
  38.646 -				old["padding" + this] = 0;
  38.647 -				old["border" + this + "Width"] = 0;
  38.648 -			});
  38.649 -
  38.650 -			jQuery.swap( e, old, function() {
  38.651 -				if ( jQuery(e).is(':visible') ) {
  38.652 -					oHeight = e.offsetHeight;
  38.653 -					oWidth = e.offsetWidth;
  38.654 -				} else {
  38.655 -					e = jQuery(e.cloneNode(true))
  38.656 -						.find(":radio").removeAttr("checked").end()
  38.657 -						.css({
  38.658 -							visibility: "hidden", position: "absolute", display: "block", right: "0", left: "0"
  38.659 -						}).appendTo(e.parentNode)[0];
  38.660 -
  38.661 -					var parPos = jQuery.css(e.parentNode,"position") || "static";
  38.662 -					if ( parPos == "static" )
  38.663 -						e.parentNode.style.position = "relative";
  38.664 -
  38.665 -					oHeight = e.clientHeight;
  38.666 -					oWidth = e.clientWidth;
  38.667 -
  38.668 -					if ( parPos == "static" )
  38.669 -						e.parentNode.style.position = "static";
  38.670 -
  38.671 -					e.parentNode.removeChild(e);
  38.672 -				}
  38.673 -			});
  38.674 -
  38.675 -			return p == "height" ? oHeight : oWidth;
  38.676 -		}
  38.677 -
  38.678 -		return jQuery.curCSS( e, p );
  38.679 -	},
  38.680 -
  38.681 -	curCSS: function(elem, prop, force) {
  38.682 -		var ret, stack = [], swap = [];
  38.683 -
  38.684 -		// A helper method for determining if an element's values are broken
  38.685 -		function color(a){
  38.686 -			if ( !jQuery.browser.safari )
  38.687 -				return false;
  38.688 -
  38.689 -			var ret = document.defaultView.getComputedStyle(a,null);
  38.690 -			return !ret || ret.getPropertyValue("color") == "";
  38.691 -		}
  38.692 -
  38.693 -		if (prop == "opacity" && jQuery.browser.msie) {
  38.694 -			ret = jQuery.attr(elem.style, "opacity");
  38.695 -			return ret == "" ? "1" : ret;
  38.696 -		}
  38.697 -		
  38.698 -		if (prop.match(/float/i))
  38.699 -			prop = styleFloat;
  38.700 -
  38.701 -		if (!force && elem.style[prop])
  38.702 -			ret = elem.style[prop];
  38.703 -
  38.704 -		else if (document.defaultView && document.defaultView.getComputedStyle) {
  38.705 -
  38.706 -			if (prop.match(/float/i))
  38.707 -				prop = "float";
  38.708 -
  38.709 -			prop = prop.replace(/([A-Z])/g,"-$1").toLowerCase();
  38.710 -			var cur = document.defaultView.getComputedStyle(elem, null);
  38.711 -
  38.712 -			if ( cur && !color(elem) )
  38.713 -				ret = cur.getPropertyValue(prop);
  38.714 -
  38.715 -			// If the element isn't reporting its values properly in Safari
  38.716 -			// then some display: none elements are involved
  38.717 -			else {
  38.718 -				// Locate all of the parent display: none elements
  38.719 -				for ( var a = elem; a && color(a); a = a.parentNode )
  38.720 -					stack.unshift(a);
  38.721 -
  38.722 -				// Go through and make them visible, but in reverse
  38.723 -				// (It would be better if we knew the exact display type that they had)
  38.724 -				for ( a = 0; a < stack.length; a++ )
  38.725 -					if ( color(stack[a]) ) {
  38.726 -						swap[a] = stack[a].style.display;
  38.727 -						stack[a].style.display = "block";
  38.728 -					}
  38.729 -
  38.730 -				// Since we flip the display style, we have to handle that
  38.731 -				// one special, otherwise get the value
  38.732 -				ret = prop == "display" && swap[stack.length-1] != null ?
  38.733 -					"none" :
  38.734 -					document.defaultView.getComputedStyle(elem,null).getPropertyValue(prop) || "";
  38.735 -
  38.736 -				// Finally, revert the display styles back
  38.737 -				for ( a = 0; a < swap.length; a++ )
  38.738 -					if ( swap[a] != null )
  38.739 -						stack[a].style.display = swap[a];
  38.740 -			}
  38.741 -
  38.742 -			if ( prop == "opacity" && ret == "" )
  38.743 -				ret = "1";
  38.744 -
  38.745 -		} else if (elem.currentStyle) {
  38.746 -			var newProp = prop.replace(/\-(\w)/g,function(m,c){return c.toUpperCase();});
  38.747 -			ret = elem.currentStyle[prop] || elem.currentStyle[newProp];
  38.748 -
  38.749 -			// From the awesome hack by Dean Edwards
  38.750 -			// http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291
  38.751 -
  38.752 -			// If we're not dealing with a regular pixel number
  38.753 -			// but a number that has a weird ending, we need to convert it to pixels
  38.754 -			if ( !/^\d+(px)?$/i.test(ret) && /^\d/.test(ret) ) {
  38.755 -				var style = elem.style.left;
  38.756 -				var runtimeStyle = elem.runtimeStyle.left;
  38.757 -				elem.runtimeStyle.left = elem.currentStyle.left;
  38.758 -				elem.style.left = ret || 0;
  38.759 -				ret = elem.style.pixelLeft + "px";
  38.760 -				elem.style.left = style;
  38.761 -				elem.runtimeStyle.left = runtimeStyle;
  38.762 -			}
  38.763 -		}
  38.764 -
  38.765 -		return ret;
  38.766 -	},
  38.767 -	
  38.768 -	clean: function(a, doc) {
  38.769 -		var r = [];
  38.770 -		doc = doc || document;
  38.771 -
  38.772 -		jQuery.each( a, function(i,arg){
  38.773 -			if ( !arg ) return;
  38.774 -
  38.775 -			if ( arg.constructor == Number )
  38.776 -				arg = arg.toString();
  38.777 -			
  38.778 -			// Convert html string into DOM nodes
  38.779 -			if ( typeof arg == "string" ) {
  38.780 -				// Fix "XHTML"-style tags in all browsers
  38.781 -				arg = arg.replace(/(<(\w+)[^>]*?)\/>/g, function(m, all, tag){
  38.782 -					return tag.match(/^(abbr|br|col|img|input|link|meta|param|hr|area)$/i)? m : all+"></"+tag+">";
  38.783 -				});
  38.784 -
  38.785 -				// Trim whitespace, otherwise indexOf won't work as expected
  38.786 -				var s = jQuery.trim(arg).toLowerCase(), div = doc.createElement("div"), tb = [];
  38.787 -
  38.788 -				var wrap =
  38.789 -					// option or optgroup
  38.790 -					!s.indexOf("<opt") &&
  38.791 -					[1, "<select>", "</select>"] ||
  38.792 -					
  38.793 -					!s.indexOf("<leg") &&
  38.794 -					[1, "<fieldset>", "</fieldset>"] ||
  38.795 -					
  38.796 -					s.match(/^<(thead|tbody|tfoot|colg|cap)/) &&
  38.797 -					[1, "<table>", "</table>"] ||
  38.798 -					
  38.799 -					!s.indexOf("<tr") &&
  38.800 -					[2, "<table><tbody>", "</tbody></table>"] ||
  38.801 -					
  38.802 -				 	// <thead> matched above
  38.803 -					(!s.indexOf("<td") || !s.indexOf("<th")) &&
  38.804 -					[3, "<table><tbody><tr>", "</tr></tbody></table>"] ||
  38.805 -					
  38.806 -					!s.indexOf("<col") &&
  38.807 -					[2, "<table><tbody></tbody><colgroup>", "</colgroup></table>"] ||
  38.808 -
  38.809 -					// IE can't serialize <link> and <script> tags normally
  38.810 -					jQuery.browser.msie &&
  38.811 -					[1, "div<div>", "</div>"] ||
  38.812 -					
  38.813 -					[0,"",""];
  38.814 -
  38.815 -				// Go to html and back, then peel off extra wrappers
  38.816 -				div.innerHTML = wrap[1] + arg + wrap[2];
  38.817 -				
  38.818 -				// Move to the right depth
  38.819 -				while ( wrap[0]-- )
  38.820 -					div = div.lastChild;
  38.821 -				
  38.822 -				// Remove IE's autoinserted <tbody> from table fragments
  38.823 -				if ( jQuery.browser.msie ) {
  38.824 -					
  38.825 -					// String was a <table>, *may* have spurious <tbody>
  38.826 -					if ( !s.indexOf("<table") && s.indexOf("<tbody") < 0 ) 
  38.827 -						tb = div.firstChild && div.firstChild.childNodes;
  38.828 -						
  38.829 -					// String was a bare <thead> or <tfoot>
  38.830 -					else if ( wrap[1] == "<table>" && s.indexOf("<tbody") < 0 )
  38.831 -						tb = div.childNodes;
  38.832 -
  38.833 -					for ( var n = tb.length-1; n >= 0 ; --n )
  38.834 -						if ( jQuery.nodeName(tb[n], "tbody") && !tb[n].childNodes.length )
  38.835 -							tb[n].parentNode.removeChild(tb[n]);
  38.836 -	
  38.837 -					// IE completely kills leading whitespace when innerHTML is used	
  38.838 -					if ( /^\s/.test(arg) )	
  38.839 -						div.insertBefore( doc.createTextNode( arg.match(/^\s*/)[0] ), div.firstChild );
  38.840 -
  38.841 -				}
  38.842 -				
  38.843 -				arg = jQuery.makeArray( div.childNodes );
  38.844 -			}
  38.845 -
  38.846 -			if ( 0 === arg.length && (!jQuery.nodeName(arg, "form") && !jQuery.nodeName(arg, "select")) )
  38.847 -				return;
  38.848 -
  38.849 -			if ( arg[0] == undefined || jQuery.nodeName(arg, "form") || arg.options )
  38.850 -				r.push( arg );
  38.851 -			else
  38.852 -				r = jQuery.merge( r, arg );
  38.853 -
  38.854 -		});
  38.855 -
  38.856 -		return r;
  38.857 -	},
  38.858 -	
  38.859 -	attr: function(elem, name, value){
  38.860 -		var fix = jQuery.isXMLDoc(elem) ? {} : jQuery.props;
  38.861 -
  38.862 -		// Safari mis-reports the default selected property of a hidden option
  38.863 -		// Accessing the parent's selectedIndex property fixes it
  38.864 -		if ( name == "selected" && jQuery.browser.safari )
  38.865 -			elem.parentNode.selectedIndex;
  38.866 -		
  38.867 -		// Certain attributes only work when accessed via the old DOM 0 way
  38.868 -		if ( fix[name] ) {
  38.869 -			if ( value != undefined ) elem[fix[name]] = value;
  38.870 -			return elem[fix[name]];
  38.871 -		} else if ( jQuery.browser.msie && name == "style" )
  38.872 -			return jQuery.attr( elem.style, "cssText", value );
  38.873 -
  38.874 -		else if ( value == undefined && jQuery.browser.msie && jQuery.nodeName(elem, "form") && (name == "action" || name == "method") )
  38.875 -			return elem.getAttributeNode(name).nodeValue;
  38.876 -
  38.877 -		// IE elem.getAttribute passes even for style
  38.878 -		else if ( elem.tagName ) {
  38.879 -
  38.880 -			if ( value != undefined ) {
  38.881 -				if ( name == "type" && jQuery.nodeName(elem,"input") && elem.parentNode )
  38.882 -					throw "type property can't be changed";
  38.883 -				elem.setAttribute( name, value );
  38.884 -			}
  38.885 -
  38.886 -			if ( jQuery.browser.msie && /href|src/.test(name) && !jQuery.isXMLDoc(elem) ) 
  38.887 -				return elem.getAttribute( name, 2 );
  38.888 -
  38.889 -			return elem.getAttribute( name );
  38.890 -
  38.891 -		// elem is actually elem.style ... set the style
  38.892 -		} else {
  38.893 -			// IE actually uses filters for opacity
  38.894 -			if ( name == "opacity" && jQuery.browser.msie ) {
  38.895 -				if ( value != undefined ) {
  38.896 -					// IE has trouble with opacity if it does not have layout
  38.897 -					// Force it by setting the zoom level
  38.898 -					elem.zoom = 1; 
  38.899 -	
  38.900 -					// Set the alpha filter to set the opacity
  38.901 -					elem.filter = (elem.filter || "").replace(/alpha\([^)]*\)/,"") +
  38.902 -						(parseFloat(value).toString() == "NaN" ? "" : "alpha(opacity=" + value * 100 + ")");
  38.903 -				}
  38.904 -	
  38.905 -				return elem.filter ? 
  38.906 -					(parseFloat( elem.filter.match(/opacity=([^)]*)/)[1] ) / 100).toString() : "";
  38.907 -			}
  38.908 -			name = name.replace(/-([a-z])/ig,function(z,b){return b.toUpperCase();});
  38.909 -			if ( value != undefined ) elem[name] = value;
  38.910 -			return elem[name];
  38.911 -		}
  38.912 -	},
  38.913 -	
  38.914 -	trim: function(t){
  38.915 -		return (t||"").replace(/^\s+|\s+$/g, "");
  38.916 -	},
  38.917 -
  38.918 -	makeArray: function( a ) {
  38.919 -		var r = [];
  38.920 -
  38.921 -		// Need to use typeof to fight Safari childNodes crashes
  38.922 -		if ( typeof a != "array" )
  38.923 -			for ( var i = 0, al = a.length; i < al; i++ )
  38.924 -				r.push( a[i] );
  38.925 -		else
  38.926 -			r = a.slice( 0 );
  38.927 -
  38.928 -		return r;
  38.929 -	},
  38.930 -
  38.931 -	inArray: function( b, a ) {
  38.932 -		for ( var i = 0, al = a.length; i < al; i++ )
  38.933 -			if ( a[i] == b )
  38.934 -				return i;
  38.935 -		return -1;
  38.936 -	},
  38.937 -
  38.938 -	merge: function(first, second) {
  38.939 -		// We have to loop this way because IE & Opera overwrite the length
  38.940 -		// expando of getElementsByTagName
  38.941 -
  38.942 -		// Also, we need to make sure that the correct elements are being returned
  38.943 -		// (IE returns comment nodes in a '*' query)
  38.944 -		if ( jQuery.browser.msie ) {
  38.945 -			for ( var i = 0; second[i]; i++ )
  38.946 -				if ( second[i].nodeType != 8 )
  38.947 -					first.push(second[i]);
  38.948 -		} else
  38.949 -			for ( var i = 0; second[i]; i++ )
  38.950 -				first.push(second[i]);
  38.951 -
  38.952 -		return first;
  38.953 -	},
  38.954 -
  38.955 -	unique: function(first) {
  38.956 -		var r = [], done = {};
  38.957 -
  38.958 -		try {
  38.959 -			for ( var i = 0, fl = first.length; i < fl; i++ ) {
  38.960 -				var id = jQuery.data(first[i]);
  38.961 -				if ( !done[id] ) {
  38.962 -					done[id] = true;
  38.963 -					r.push(first[i]);
  38.964 -				}
  38.965 -			}
  38.966 -		} catch(e) {
  38.967 -			r = first;
  38.968 -		}
  38.969 -
  38.970 -		return r;
  38.971 -	},
  38.972 -
  38.973 -	grep: function(elems, fn, inv) {
  38.974 -		// If a string is passed in for the function, make a function
  38.975 -		// for it (a handy shortcut)
  38.976 -		if ( typeof fn == "string" )
  38.977 -			fn = eval("false||function(a,i){return " + fn + "}");
  38.978 -
  38.979 -		var result = [];
  38.980 -
  38.981 -		// Go through the array, only saving the items
  38.982 -		// that pass the validator function
  38.983 -		for ( var i = 0, el = elems.length; i < el; i++ )
  38.984 -			if ( !inv && fn(elems[i],i) || inv && !fn(elems[i],i) )
  38.985 -				result.push( elems[i] );
  38.986 -
  38.987 -		return result;
  38.988 -	},
  38.989 -
  38.990 -	map: function(elems, fn) {
  38.991 -		// If a string is passed in for the function, make a function
  38.992 -		// for it (a handy shortcut)
  38.993 -		if ( typeof fn == "string" )
  38.994 -			fn = eval("false||function(a){return " + fn + "}");
  38.995 -
  38.996 -		var result = [];
  38.997 -
  38.998 -		// Go through the array, translating each of the items to their
  38.999 -		// new value (or values).
 38.1000 -		for ( var i = 0, el = elems.length; i < el; i++ ) {
 38.1001 -			var val = fn(elems[i],i);
 38.1002 -
 38.1003 -			if ( val !== null && val != undefined ) {
 38.1004 -				if ( val.constructor != Array ) val = [val];
 38.1005 -				result = result.concat( val );
 38.1006 -			}
 38.1007 -		}
 38.1008 -
 38.1009 -		return result;
 38.1010 -	}
 38.1011 -});
 38.1012 -
 38.1013 -var userAgent = navigator.userAgent.toLowerCase();
 38.1014 -
 38.1015 -// Figure out what browser is being used
 38.1016 -jQuery.browser = {
 38.1017 -	version: (userAgent.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/) || [])[1],
 38.1018 -	safari: /webkit/.test(userAgent),
 38.1019 -	opera: /opera/.test(userAgent),
 38.1020 -	msie: /msie/.test(userAgent) && !/opera/.test(userAgent),
 38.1021 -	mozilla: /mozilla/.test(userAgent) && !/(compatible|webkit)/.test(userAgent)
 38.1022 -};
 38.1023 -
 38.1024 -var styleFloat = jQuery.browser.msie ? "styleFloat" : "cssFloat";
 38.1025 -	
 38.1026 -jQuery.extend({
 38.1027 -	// Check to see if the W3C box model is being used
 38.1028 -	boxModel: !jQuery.browser.msie || document.compatMode == "CSS1Compat",
 38.1029 -	
 38.1030 -	styleFloat: jQuery.browser.msie ? "styleFloat" : "cssFloat",
 38.1031 -	
 38.1032 -	props: {
 38.1033 -		"for": "htmlFor",
 38.1034 -		"class": "className",
 38.1035 -		"float": styleFloat,
 38.1036 -		cssFloat: styleFloat,
 38.1037 -		styleFloat: styleFloat,
 38.1038 -		innerHTML: "innerHTML",
 38.1039 -		className: "className",
 38.1040 -		value: "value",
 38.1041 -		disabled: "disabled",
 38.1042 -		checked: "checked",
 38.1043 -		readonly: "readOnly",
 38.1044 -		selected: "selected",
 38.1045 -		maxlength: "maxLength"
 38.1046 -	}
 38.1047 -});
 38.1048 -
 38.1049 -jQuery.each({
 38.1050 -	parent: "a.parentNode",
 38.1051 -	parents: "jQuery.dir(a,'parentNode')",
 38.1052 -	next: "jQuery.nth(a,2,'nextSibling')",
 38.1053 -	prev: "jQuery.nth(a,2,'previousSibling')",
 38.1054 -	nextAll: "jQuery.dir(a,'nextSibling')",
 38.1055 -	prevAll: "jQuery.dir(a,'previousSibling')",
 38.1056 -	siblings: "jQuery.sibling(a.parentNode.firstChild,a)",
 38.1057 -	children: "jQuery.sibling(a.firstChild)",
 38.1058 -	contents: "jQuery.nodeName(a,'iframe')?a.contentDocument||a.contentWindow.document:jQuery.makeArray(a.childNodes)"
 38.1059 -}, function(i,n){
 38.1060 -	jQuery.fn[ i ] = function(a) {
 38.1061 -		var ret = jQuery.map(this,n);
 38.1062 -		if ( a && typeof a == "string" )
 38.1063 -			ret = jQuery.multiFilter(a,ret);
 38.1064 -		return this.pushStack( jQuery.unique(ret) );
 38.1065 -	};
 38.1066 -});
 38.1067 -
 38.1068 -jQuery.each({
 38.1069 -	appendTo: "append",
 38.1070 -	prependTo: "prepend",
 38.1071 -	insertBefore: "before",
 38.1072 -	insertAfter: "after",
 38.1073 -	replaceAll: "replaceWith"
 38.1074 -}, function(i,n){
 38.1075 -	jQuery.fn[ i ] = function(){
 38.1076 -		var a = arguments;
 38.1077 -		return this.each(function(){
 38.1078 -			for ( var j = 0, al = a.length; j < al; j++ )
 38.1079 -				jQuery(a[j])[n]( this );
 38.1080 -		});
 38.1081 -	};
 38.1082 -});
 38.1083 -
 38.1084 -jQuery.each( {
 38.1085 -	removeAttr: function( key ) {
 38.1086 -		jQuery.attr( this, key, "" );
 38.1087 -		this.removeAttribute( key );
 38.1088 -	},
 38.1089 -	addClass: function(c){
 38.1090 -		jQuery.className.add(this,c);
 38.1091 -	},
 38.1092 -	removeClass: function(c){
 38.1093 -		jQuery.className.remove(this,c);
 38.1094 -	},
 38.1095 -	toggleClass: function( c ){
 38.1096 -		jQuery.className[ jQuery.className.has(this,c) ? "remove" : "add" ](this, c);
 38.1097 -	},
 38.1098 -	remove: function(a){
 38.1099 -		if ( !a || jQuery.filter( a, [this] ).r.length ) {
 38.1100 -			jQuery.removeData( this );
 38.1101 -			this.parentNode.removeChild( this );
 38.1102 -		}
 38.1103 -	},
 38.1104 -	empty: function() {
 38.1105 -		// Clean up the cache
 38.1106 -		jQuery("*", this).each(function(){ jQuery.removeData(this); });
 38.1107 -
 38.1108 -		while ( this.firstChild )
 38.1109 -			this.removeChild( this.firstChild );
 38.1110 -	}
 38.1111 -}, function(i,n){
 38.1112 -	jQuery.fn[ i ] = function() {
 38.1113 -		return this.each( n, arguments );
 38.1114 -	};
 38.1115 -});
 38.1116 -
 38.1117 -jQuery.each( [ "Height", "Width" ], function(i,name){
 38.1118 -	var n = name.toLowerCase();
 38.1119 -	
 38.1120 -	jQuery.fn[ n ] = function(h) {
 38.1121 -		return this[0] == window ?
 38.1122 -			jQuery.browser.safari && self["inner" + name] ||
 38.1123 -			jQuery.boxModel && Math.max(document.documentElement["client" + name], document.body["client" + name]) ||
 38.1124 -			document.body["client" + name] :
 38.1125 -		
 38.1126 -			this[0] == document ?
 38.1127 -				Math.max( document.body["scroll" + name], document.body["offset" + name] ) :
 38.1128 -        
 38.1129 -				h == undefined ?
 38.1130 -					( this.length ? jQuery.css( this[0], n ) : null ) :
 38.1131 -					this.css( n, h.constructor == String ? h : h + "px" );
 38.1132 -	};
 38.1133 -});
 38.1134 -
 38.1135 -var chars = jQuery.browser.safari && parseInt(jQuery.browser.version) < 417 ?
 38.1136 -		"(?:[\\w*_-]|\\\\.)" :
 38.1137 -		"(?:[\\w\u0128-\uFFFF*_-]|\\\\.)",
 38.1138 -	quickChild = new RegExp("^>\\s*(" + chars + "+)"),
 38.1139 -	quickID = new RegExp("^(" + chars + "+)(#)(" + chars + "+)"),
 38.1140 -	quickClass = new RegExp("^([#.]?)(" + chars + "*)");
 38.1141 -
 38.1142 -jQuery.extend({
 38.1143 -	expr: {
 38.1144 -		"": "m[2]=='*'||jQuery.nodeName(a,m[2])",
 38.1145 -		"#": "a.getAttribute('id')==m[2]",
 38.1146 -		":": {
 38.1147 -			// Position Checks
 38.1148 -			lt: "i<m[3]-0",
 38.1149 -			gt: "i>m[3]-0",
 38.1150 -			nth: "m[3]-0==i",
 38.1151 -			eq: "m[3]-0==i",
 38.1152 -			first: "i==0",
 38.1153 -			last: "i==r.length-1",
 38.1154 -			even: "i%2==0",
 38.1155 -			odd: "i%2",
 38.1156 -
 38.1157 -			// Child Checks
 38.1158 -			"first-child": "a.parentNode.getElementsByTagName('*')[0]==a",
 38.1159 -			"last-child": "jQuery.nth(a.parentNode.lastChild,1,'previousSibling')==a",
 38.1160 -			"only-child": "!jQuery.nth(a.parentNode.lastChild,2,'previousSibling')",
 38.1161 -
 38.1162 -			// Parent Checks
 38.1163 -			parent: "a.firstChild",
 38.1164 -			empty: "!a.firstChild",
 38.1165 -
 38.1166 -			// Text Check
 38.1167 -			contains: "(a.textContent||a.innerText||jQuery(a).text()||'').indexOf(m[3])>=0",
 38.1168 -
 38.1169 -			// Visibility
 38.1170 -			visible: '"hidden"!=a.type&&jQuery.css(a,"display")!="none"&&jQuery.css(a,"visibility")!="hidden"',
 38.1171 -			hidden: '"hidden"==a.type||jQuery.css(a,"display")=="none"||jQuery.css(a,"visibility")=="hidden"',
 38.1172 -
 38.1173 -			// Form attributes
 38.1174 -			enabled: "!a.disabled",
 38.1175 -			disabled: "a.disabled",
 38.1176 -			checked: "a.checked",
 38.1177 -			selected: "a.selected||jQuery.attr(a,'selected')",
 38.1178 -
 38.1179 -			// Form elements
 38.1180 -			text: "'text'==a.type",
 38.1181 -			radio: "'radio'==a.type",
 38.1182 -			checkbox: "'checkbox'==a.type",
 38.1183 -			file: "'file'==a.type",
 38.1184 -			password: "'password'==a.type",
 38.1185 -			submit: "'submit'==a.type",
 38.1186 -			image: "'image'==a.type",
 38.1187 -			reset: "'reset'==a.type",
 38.1188 -			button: '"button"==a.type||jQuery.nodeName(a,"button")',
 38.1189 -			input: "/input|select|textarea|button/i.test(a.nodeName)",
 38.1190 -
 38.1191 -			// :has()
 38.1192 -			has: "jQuery.find(m[3],a).length",
 38.1193 -
 38.1194 -			// :header
 38.1195 -			header: "/h\\d/i.test(a.nodeName)",
 38.1196 -
 38.1197 -			// :animated
 38.1198 -			animated: "jQuery.grep(jQuery.timers,function(fn){return a==fn.elem;}).length"
 38.1199 -		}
 38.1200 -	},
 38.1201 -	
 38.1202 -	// The regular expressions that power the parsing engine
 38.1203 -	parse: [
 38.1204 -		// Match: [@value='test'], [@foo]
 38.1205 -		/^(\[) *@?([\w-]+) *([!*$^~=]*) *('?"?)(.*?)\4 *\]/,
 38.1206 -
 38.1207 -		// Match: :contains('foo')
 38.1208 -		/^(:)([\w-]+)\("?'?(.*?(\(.*?\))?[^(]*?)"?'?\)/,
 38.1209 -
 38.1210 -		// Match: :even, :last-chlid, #id, .class
 38.1211 -		new RegExp("^([:.#]*)(" + chars + "+)")
 38.1212 -	],
 38.1213 -
 38.1214 -	multiFilter: function( expr, elems, not ) {
 38.1215 -		var old, cur = [];
 38.1216 -
 38.1217 -		while ( expr && expr != old ) {
 38.1218 -			old = expr;
 38.1219 -			var f = jQuery.filter( expr, elems, not );
 38.1220 -			expr = f.t.replace(/^\s*,\s*/, "" );
 38.1221 -			cur = not ? elems = f.r : jQuery.merge( cur, f.r );
 38.1222 -		}
 38.1223 -
 38.1224 -		return cur;
 38.1225 -	},
 38.1226 -
 38.1227 -	find: function( t, context ) {
 38.1228 -		// Quickly handle non-string expressions
 38.1229 -		if ( typeof t != "string" )
 38.1230 -			return [ t ];
 38.1231 -
 38.1232 -		// Make sure that the context is a DOM Element
 38.1233 -		if ( context && !context.nodeType )
 38.1234 -			context = null;
 38.1235 -
 38.1236 -		// Set the correct context (if none is provided)
 38.1237 -		context = context || document;
 38.1238 -
 38.1239 -		// Initialize the search
 38.1240 -		var ret = [context], done = [], last;
 38.1241 -
 38.1242 -		// Continue while a selector expression exists, and while
 38.1243 -		// we're no longer looping upon ourselves
 38.1244 -		while ( t && last != t ) {
 38.1245 -			var r = [];
 38.1246 -			last = t;
 38.1247 -
 38.1248 -			t = jQuery.trim(t);
 38.1249 -
 38.1250 -			var foundToken = false;
 38.1251 -
 38.1252 -			// An attempt at speeding up child selectors that
 38.1253 -			// point to a specific element tag
 38.1254 -			var re = quickChild;
 38.1255 -			var m = re.exec(t);
 38.1256 -
 38.1257 -			if ( m ) {
 38.1258 -				var nodeName = m[1].toUpperCase();
 38.1259 -
 38.1260 -				// Perform our own iteration and filter
 38.1261 -				for ( var i = 0; ret[i]; i++ )
 38.1262 -					for ( var c = ret[i].firstChild; c; c = c.nextSibling )
 38.1263 -						if ( c.nodeType == 1 && (nodeName == "*" || c.nodeName.toUpperCase() == nodeName.toUpperCase()) )
 38.1264 -							r.push( c );
 38.1265 -
 38.1266 -				ret = r;
 38.1267 -				t = t.replace( re, "" );
 38.1268 -				if ( t.indexOf(" ") == 0 ) continue;
 38.1269 -				foundToken = true;
 38.1270 -			} else {
 38.1271 -				re = /^([>+~])\s*(\w*)/i;
 38.1272 -
 38.1273 -				if ( (m = re.exec(t)) != null ) {
 38.1274 -					r = [];
 38.1275 -
 38.1276 -					var nodeName = m[2], merge = {};
 38.1277 -					m = m[1];
 38.1278 -
 38.1279 -					for ( var j = 0, rl = ret.length; j < rl; j++ ) {
 38.1280 -						var n = m == "~" || m == "+" ? ret[j].nextSibling : ret[j].firstChild;
 38.1281 -						for ( ; n; n = n.nextSibling )
 38.1282 -							if ( n.nodeType == 1 ) {
 38.1283 -								var id = jQuery.data(n);
 38.1284 -
 38.1285 -								if ( m == "~" && merge[id] ) break;
 38.1286 -								
 38.1287 -								if (!nodeName || n.nodeName.toUpperCase() == nodeName.toUpperCase() ) {
 38.1288 -									if ( m == "~" ) merge[id] = true;
 38.1289 -									r.push( n );
 38.1290 -								}
 38.1291 -								
 38.1292 -								if ( m == "+" ) break;
 38.1293 -							}
 38.1294 -					}
 38.1295 -
 38.1296 -					ret = r;
 38.1297 -
 38.1298 -					// And remove the token
 38.1299 -					t = jQuery.trim( t.replace( re, "" ) );
 38.1300 -					foundToken = true;
 38.1301 -				}
 38.1302 -			}
 38.1303 -
 38.1304 -			// See if there's still an expression, and that we haven't already
 38.1305 -			// matched a token
 38.1306 -			if ( t && !foundToken ) {
 38.1307 -				// Handle multiple expressions
 38.1308 -				if ( !t.indexOf(",") ) {
 38.1309 -					// Clean the result set
 38.1310 -					if ( context == ret[0] ) ret.shift();
 38.1311 -
 38.1312 -					// Merge the result sets
 38.1313 -					done = jQuery.merge( done, ret );
 38.1314 -
 38.1315 -					// Reset the context
 38.1316 -					r = ret = [context];
 38.1317 -
 38.1318 -					// Touch up the selector string
 38.1319 -					t = " " + t.substr(1,t.length);
 38.1320 -
 38.1321 -				} else {
 38.1322 -					// Optimize for the case nodeName#idName
 38.1323 -					var re2 = quickID;
 38.1324 -					var m = re2.exec(t);
 38.1325 -					
 38.1326 -					// Re-organize the results, so that they're consistent
 38.1327 -					if ( m ) {
 38.1328 -					   m = [ 0, m[2], m[3], m[1] ];
 38.1329 -
 38.1330 -					} else {
 38.1331 -						// Otherwise, do a traditional filter check for
 38.1332 -						// ID, class, and element selectors
 38.1333 -						re2 = quickClass;
 38.1334 -						m = re2.exec(t);
 38.1335 -					}
 38.1336 -
 38.1337 -					m[2] = m[2].replace(/\\/g, "");
 38.1338 -
 38.1339 -					var elem = ret[ret.length-1];
 38.1340 -
 38.1341 -					// Try to do a global search by ID, where we can
 38.1342 -					if ( m[1] == "#" && elem && elem.getElementById && !jQuery.isXMLDoc(elem) ) {
 38.1343 -						// Optimization for HTML document case
 38.1344 -						var oid = elem.getElementById(m[2]);
 38.1345 -						
 38.1346 -						// Do a quick check for the existence of the actual ID attribute
 38.1347 -						// to avoid selecting by the name attribute in IE
 38.1348 -						// also check to insure id is a string to avoid selecting an element with the name of 'id' inside a form
 38.1349 -						if ( (jQuery.browser.msie||jQuery.browser.opera) && oid && typeof oid.id == "string" && oid.id != m[2] )
 38.1350 -							oid = jQuery('[@id="'+m[2]+'"]', elem)[0];
 38.1351 -
 38.1352 -						// Do a quick check for node name (where applicable) so
 38.1353 -						// that div#foo searches will be really fast
 38.1354 -						ret = r = oid && (!m[3] || jQuery.nodeName(oid, m[3])) ? [oid] : [];
 38.1355 -					} else {
 38.1356 -						// We need to find all descendant elements
 38.1357 -						for ( var i = 0; ret[i]; i++ ) {
 38.1358 -							// Grab the tag name being searched for
 38.1359 -							var tag = m[1] == "#" && m[3] ? m[3] : m[1] != "" || m[0] == "" ? "*" : m[2];
 38.1360 -
 38.1361 -							// Handle IE7 being really dumb about <object>s
 38.1362 -							if ( tag == "*" && ret[i].nodeName.toLowerCase() == "object" )
 38.1363 -								tag = "param";
 38.1364 -
 38.1365 -							r = jQuery.merge( r, ret[i].getElementsByTagName( tag ));
 38.1366 -						}
 38.1367 -
 38.1368 -						// It's faster to filter by class and be done with it
 38.1369 -						if ( m[1] == "." )
 38.1370 -							r = jQuery.classFilter( r, m[2] );
 38.1371 -
 38.1372 -						// Same with ID filtering
 38.1373 -						if ( m[1] == "#" ) {
 38.1374 -							var tmp = [];
 38.1375 -
 38.1376 -							// Try to find the element with the ID
 38.1377 -							for ( var i = 0; r[i]; i++ )
 38.1378 -								if ( r[i].getAttribute("id") == m[2] ) {
 38.1379 -									tmp = [ r[i] ];
 38.1380 -									break;
 38.1381 -								}
 38.1382 -
 38.1383 -							r = tmp;
 38.1384 -						}
 38.1385 -
 38.1386 -						ret = r;
 38.1387 -					}
 38.1388 -
 38.1389 -					t = t.replace( re2, "" );
 38.1390 -				}
 38.1391 -
 38.1392 -			}
 38.1393 -
 38.1394 -			// If a selector string still exists
 38.1395 -			if ( t ) {
 38.1396 -				// Attempt to filter it
 38.1397 -				var val = jQuery.filter(t,r);
 38.1398 -				ret = r = val.r;
 38.1399 -				t = jQuery.trim(val.t);
 38.1400 -			}
 38.1401 -		}
 38.1402 -
 38.1403 -		// An error occurred with the selector;
 38.1404 -		// just return an empty set instead
 38.1405 -		if ( t )
 38.1406 -			ret = [];
 38.1407 -
 38.1408 -		// Remove the root context
 38.1409 -		if ( ret && context == ret[0] )
 38.1410 -			ret.shift();
 38.1411 -
 38.1412 -		// And combine the results
 38.1413 -		done = jQuery.merge( done, ret );
 38.1414 -
 38.1415 -		return done;
 38.1416 -	},
 38.1417 -
 38.1418 -	classFilter: function(r,m,not){
 38.1419 -		m = " " + m + " ";
 38.1420 -		var tmp = [];
 38.1421 -		for ( var i = 0; r[i]; i++ ) {
 38.1422 -			var pass = (" " + r[i].className + " ").indexOf( m ) >= 0;
 38.1423 -			if ( !not && pass || not && !pass )
 38.1424 -				tmp.push( r[i] );
 38.1425 -		}
 38.1426 -		return tmp;
 38.1427 -	},
 38.1428 -
 38.1429 -	filter: function(t,r,not) {
 38.1430 -		var last;
 38.1431 -
 38.1432 -		// Look for common filter expressions
 38.1433 -		while ( t  && t != last ) {
 38.1434 -			last = t;
 38.1435 -
 38.1436 -			var p = jQuery.parse, m;
 38.1437 -
 38.1438 -			for ( var i = 0; p[i]; i++ ) {
 38.1439 -				m = p[i].exec( t );
 38.1440 -
 38.1441 -				if ( m ) {
 38.1442 -					// Remove what we just matched
 38.1443 -					t = t.substring( m[0].length );
 38.1444 -
 38.1445 -					m[2] = m[2].replace(/\\/g, "");
 38.1446 -					break;
 38.1447 -				}
 38.1448 -			}
 38.1449 -
 38.1450 -			if ( !m )
 38.1451 -				break;
 38.1452 -
 38.1453 -			// :not() is a special case that can be optimized by
 38.1454 -			// keeping it out of the expression list
 38.1455 -			if ( m[1] == ":" && m[2] == "not" )
 38.1456 -				r = jQuery.filter(m[3], r, true).r;
 38.1457 -
 38.1458 -			// We can get a big speed boost by filtering by class here
 38.1459 -			else if ( m[1] == "." )
 38.1460 -				r = jQuery.classFilter(r, m[2], not);
 38.1461 -
 38.1462 -			else if ( m[1] == "[" ) {
 38.1463 -				var tmp = [], type = m[3];
 38.1464 -				
 38.1465 -				for ( var i = 0, rl = r.length; i < rl; i++ ) {
 38.1466 -					var a = r[i], z = a[ jQuery.props[m[2]] || m[2] ];
 38.1467 -					
 38.1468 -					if ( z == null || /href|src|selected/.test(m[2]) )
 38.1469 -						z = jQuery.attr(a,m[2]) || '';
 38.1470 -
 38.1471 -					if ( (type == "" && !!z ||
 38.1472 -						 type == "=" && z == m[5] ||
 38.1473 -						 type == "!=" && z != m[5] ||
 38.1474 -						 type == "^=" && z && !z.indexOf(m[5]) ||
 38.1475 -						 type == "$=" && z.substr(z.length - m[5].length) == m[5] ||
 38.1476 -						 (type == "*=" || type == "~=") && z.indexOf(m[5]) >= 0) ^ not )
 38.1477 -							tmp.push( a );
 38.1478 -				}
 38.1479 -				
 38.1480 -				r = tmp;
 38.1481 -
 38.1482 -			// We can get a speed boost by handling nth-child here
 38.1483 -			} else if ( m[1] == ":" && m[2] == "nth-child" ) {
 38.1484 -				var merge = {}, tmp = [],
 38.1485 -					test = /(\d*)n\+?(\d*)/.exec(
 38.1486 -						m[3] == "even" && "2n" || m[3] == "odd" && "2n+1" ||
 38.1487 -						!/\D/.test(m[3]) && "n+" + m[3] || m[3]),
 38.1488 -					first = (test[1] || 1) - 0, last = test[2] - 0;
 38.1489 -
 38.1490 -				for ( var i = 0, rl = r.length; i < rl; i++ ) {
 38.1491 -					var node = r[i], parentNode = node.parentNode, id = jQuery.data(parentNode);
 38.1492 -
 38.1493 -					if ( !merge[id] ) {
 38.1494 -						var c = 1;
 38.1495 -
 38.1496 -						for ( var n = parentNode.firstChild; n; n = n.nextSibling )
 38.1497 -							if ( n.nodeType == 1 )
 38.1498 -								n.nodeIndex = c++;
 38.1499 -
 38.1500 -						merge[id] = true;
 38.1501 -					}
 38.1502 -
 38.1503 -					var add = false;
 38.1504 -
 38.1505 -					if ( first == 1 ) {
 38.1506 -						if ( last == 0 || node.nodeIndex == last )
 38.1507 -							add = true;
 38.1508 -					} else if ( (node.nodeIndex + last) % first == 0 )
 38.1509 -						add = true;
 38.1510 -
 38.1511 -					if ( add ^ not )
 38.1512 -						tmp.push( node );
 38.1513 -				}
 38.1514 -
 38.1515 -				r = tmp;
 38.1516 -
 38.1517 -			// Otherwise, find the expression to execute
 38.1518 -			} else {
 38.1519 -				var f = jQuery.expr[m[1]];
 38.1520 -				if ( typeof f != "string" )
 38.1521 -					f = jQuery.expr[m[1]][m[2]];
 38.1522 -
 38.1523 -				// Build a custom macro to enclose it
 38.1524 -				f = eval("false||function(a,i){return " + f + "}");
 38.1525 -
 38.1526 -				// Execute it against the current filter
 38.1527 -				r = jQuery.grep( r, f, not );
 38.1528 -			}
 38.1529 -		}
 38.1530 -
 38.1531 -		// Return an array of filtered elements (r)
 38.1532 -		// and the modified expression string (t)
 38.1533 -		return { r: r, t: t };
 38.1534 -	},
 38.1535 -
 38.1536 -	dir: function( elem, dir ){
 38.1537 -		var matched = [];
 38.1538 -		var cur = elem[dir];
 38.1539 -		while ( cur && cur != document ) {
 38.1540 -			if ( cur.nodeType == 1 )
 38.1541 -				matched.push( cur );
 38.1542 -			cur = cur[dir];
 38.1543 -		}
 38.1544 -		return matched;
 38.1545 -	},
 38.1546 -	
 38.1547 -	nth: function(cur,result,dir,elem){
 38.1548 -		result = result || 1;
 38.1549 -		var num = 0;
 38.1550 -
 38.1551 -		for ( ; cur; cur = cur[dir] )
 38.1552 -			if ( cur.nodeType == 1 && ++num == result )
 38.1553 -				break;
 38.1554 -
 38.1555 -		return cur;
 38.1556 -	},
 38.1557 -	
 38.1558 -	sibling: function( n, elem ) {
 38.1559 -		var r = [];
 38.1560 -
 38.1561 -		for ( ; n; n = n.nextSibling ) {
 38.1562 -			if ( n.nodeType == 1 && (!elem || n != elem) )
 38.1563 -				r.push( n );
 38.1564 -		}
 38.1565 -
 38.1566 -		return r;
 38.1567 -	}
 38.1568 -});
 38.1569 -/*
 38.1570 - * A number of helper functions used for managing events.
 38.1571 - * Many of the ideas behind this code orignated from 
 38.1572 - * Dean Edwards' addEvent library.
 38.1573 - */
 38.1574 -jQuery.event = {
 38.1575 -
 38.1576 -	// Bind an event to an element
 38.1577 -	// Original by Dean Edwards
 38.1578 -	add: function(element, type, handler, data) {
 38.1579 -		// For whatever reason, IE has trouble passing the window object
 38.1580 -		// around, causing it to be cloned in the process
 38.1581 -		if ( jQuery.browser.msie && element.setInterval != undefined )
 38.1582 -			element = window;
 38.1583 -
 38.1584 -		// Make sure that the function being executed has a unique ID
 38.1585 -		if ( !handler.guid )
 38.1586 -			handler.guid = this.guid++;
 38.1587 -			
 38.1588 -		// if data is passed, bind to handler 
 38.1589 -		if( data != undefined ) { 
 38.1590 -        		// Create temporary function pointer to original handler 
 38.1591 -			var fn = handler; 
 38.1592 -
 38.1593 -			// Create unique handler function, wrapped around original handler 
 38.1594 -			handler = function() { 
 38.1595 -				// Pass arguments and context to original handler 
 38.1596 -				return fn.apply(this, arguments); 
 38.1597 -			};
 38.1598 -
 38.1599 -			// Store data in unique handler 
 38.1600 -			handler.data = data;
 38.1601 -
 38.1602 -			// Set the guid of unique handler to the same of original handler, so it can be removed 
 38.1603 -			handler.guid = fn.guid;
 38.1604 -		}
 38.1605 -
 38.1606 -		// Namespaced event handlers
 38.1607 -		var parts = type.split(".");
 38.1608 -		type = parts[0];
 38.1609 -		handler.type = parts[1];
 38.1610 -
 38.1611 -		// Init the element's event structure
 38.1612 -		var events = jQuery.data(element, "events") || jQuery.data(element, "events", {});
 38.1613 -		
 38.1614 -		var handle = jQuery.data(element, "handle", function(){
 38.1615 -			// returned undefined or false
 38.1616 -			var val;
 38.1617 -
 38.1618 -			// Handle the second event of a trigger and when
 38.1619 -			// an event is called after a page has unloaded
 38.1620 -			if ( typeof jQuery == "undefined" || jQuery.event.triggered )
 38.1621 -				return val;
 38.1622 -			
 38.1623 -			val = jQuery.event.handle.apply(element, arguments);
 38.1624 -			
 38.1625 -			return val;
 38.1626 -		});
 38.1627 -
 38.1628 -		// Get the current list of functions bound to this event
 38.1629 -		var handlers = events[type];
 38.1630 -
 38.1631 -		// Init the event handler queue
 38.1632 -		if (!handlers) {
 38.1633 -			handlers = events[type] = {};	
 38.1634 -			
 38.1635 -			// And bind the global event handler to the element
 38.1636 -			if (element.addEventListener)
 38.1637 -				element.addEventListener(type, handle, false);
 38.1638 -			else
 38.1639 -				element.attachEvent("on" + type, handle);
 38.1640 -		}
 38.1641 -
 38.1642 -		// Add the function to the element's handler list
 38.1643 -		handlers[handler.guid] = handler;
 38.1644 -
 38.1645 -		// Keep track of which events have been used, for global triggering
 38.1646 -		this.global[type] = true;
 38.1647 -	},
 38.1648 -
 38.1649 -	guid: 1,
 38.1650 -	global: {},
 38.1651 -
 38.1652 -	// Detach an event or set of events from an element
 38.1653 -	remove: function(element, type, handler) {
 38.1654 -		var events = jQuery.data(element, "events"), ret, index;
 38.1655 -
 38.1656 -		// Namespaced event handlers
 38.1657 -		if ( typeof type == "string" ) {
 38.1658 -			var parts = type.split(".");
 38.1659 -			type = parts[0];
 38.1660 -		}
 38.1661 -
 38.1662 -		if ( events ) {
 38.1663 -			// type is actually an event object here
 38.1664 -			if ( type && type.type ) {
 38.1665 -				handler = type.handler;
 38.1666 -				type = type.type;
 38.1667 -			}
 38.1668 -			
 38.1669 -			if ( !type ) {
 38.1670 -				for ( type in events )
 38.1671 -					this.remove( element, type );
 38.1672 -
 38.1673 -			} else if ( events[type] ) {
 38.1674 -				// remove the given handler for the given type
 38.1675 -				if ( handler )
 38.1676 -					delete events[type][handler.guid];
 38.1677 -				
 38.1678 -				// remove all handlers for the given type
 38.1679 -				else
 38.1680 -					for ( handler in events[type] )
 38.1681 -						// Handle the removal of namespaced events
 38.1682 -						if ( !parts[1] || events[type][handler].type == parts[1] )
 38.1683 -							delete events[type][handler];
 38.1684 -
 38.1685 -				// remove generic event handler if no more handlers exist
 38.1686 -				for ( ret in events[type] ) break;
 38.1687 -				if ( !ret ) {
 38.1688 -					if (element.removeEventListener)
 38.1689 -						element.removeEventListener(type, jQuery.data(element, "handle"), false);
 38.1690 -					else
 38.1691 -						element.detachEvent("on" + type, jQuery.data(element, "handle"));
 38.1692 -					ret = null;
 38.1693 -					delete events[type];
 38.1694 -				}
 38.1695 -			}
 38.1696 -
 38.1697 -			// Remove the expando if it's no longer used
 38.1698 -			for ( ret in events ) break;
 38.1699 -			if ( !ret ) {
 38.1700 -				jQuery.removeData( element, "events" );
 38.1701 -				jQuery.removeData( element, "handle" );
 38.1702 -			}
 38.1703 -		}
 38.1704 -	},
 38.1705 -
 38.1706 -	trigger: function(type, data, element, donative, extra) {
 38.1707 -		// Clone the incoming data, if any
 38.1708 -		data = jQuery.makeArray(data || []);
 38.1709 -
 38.1710 -		// Handle a global trigger
 38.1711 -		if ( !element ) {
 38.1712 -			// Only trigger if we've ever bound an event for it
 38.1713 -			if ( this.global[type] )
 38.1714 -				jQuery("*").add([window, document]).trigger(type, data);
 38.1715 -
 38.1716 -		// Handle triggering a single element
 38.1717 -		} else {
 38.1718 -			var val, ret, fn = jQuery.isFunction( element[ type ] || null ),
 38.1719 -				// Check to see if we need to provide a fake event, or not
 38.1720 -				evt = !data[0] || !data[0].preventDefault;
 38.1721 -			
 38.1722 -			// Pass along a fake event
 38.1723 -			if ( evt )
 38.1724 -				data.unshift( this.fix({ type: type, target: element }) );
 38.1725 -
 38.1726 -			// Enforce the right trigger type
 38.1727 -			data[0].type = type;
 38.1728 -
 38.1729 -			// Trigger the event
 38.1730 -			if ( jQuery.isFunction( jQuery.data(element, "handle") ) )
 38.1731 -				val = jQuery.data(element, "handle").apply( element, data );
 38.1732 -
 38.1733 -			// Handle triggering native .onfoo handlers
 38.1734 -			if ( !fn && element["on"+type] && element["on"+type].apply( element, data ) === false )
 38.1735 -				val = false;
 38.1736 -
 38.1737 -			// Extra functions don't get the custom event object
 38.1738 -			if ( evt )
 38.1739 -				data.shift();
 38.1740 -
 38.1741 -			// Handle triggering of extra function
 38.1742 -			if ( extra && extra.apply( element, data ) === false )
 38.1743 -				val = false;
 38.1744 -
 38.1745 -			// Trigger the native events (except for clicks on links)
 38.1746 -			if ( fn && donative !== false && val !== false && !(jQuery.nodeName(element, 'a') && type == "click") ) {
 38.1747 -				this.triggered = true;
 38.1748 -				element[ type ]();
 38.1749 -			}
 38.1750 -
 38.1751 -			this.triggered = false;
 38.1752 -		}
 38.1753 -
 38.1754 -		return val;
 38.1755 -	},
 38.1756 -
 38.1757 -	handle: function(event) {
 38.1758 -		// returned undefined or false
 38.1759 -		var val;
 38.1760 -
 38.1761 -		// Empty object is for triggered events with no data
 38.1762 -		event = jQuery.event.fix( event || window.event || {} ); 
 38.1763 -
 38.1764 -		// Namespaced event handlers
 38.1765 -		var parts = event.type.split(".");
 38.1766 -		event.type = parts[0];
 38.1767 -
 38.1768 -		var c = jQuery.data(this, "events") && jQuery.data(this, "events")[event.type], args = Array.prototype.slice.call( arguments, 1 );
 38.1769 -		args.unshift( event );
 38.1770 -
 38.1771 -		for ( var j in c ) {
 38.1772 -			// Pass in a reference to the handler function itself
 38.1773 -			// So that we can later remove it
 38.1774 -			args[0].handler = c[j];
 38.1775 -			args[0].data = c[j].data;
 38.1776 -
 38.1777 -			// Filter the functions by class
 38.1778 -			if ( !parts[1] || c[j].type == parts[1] ) {
 38.1779 -				var tmp = c[j].apply( this, args );
 38.1780 -
 38.1781 -				if ( val !== false )
 38.1782 -					val = tmp;
 38.1783 -
 38.1784 -				if ( tmp === false ) {
 38.1785 -					event.preventDefault();
 38.1786 -					event.stopPropagation();
 38.1787 -				}
 38.1788 -			}
 38.1789 -		}
 38.1790 -
 38.1791 -		// Clean up added properties in IE to prevent memory leak
 38.1792 -		if (jQuery.browser.msie)
 38.1793 -			event.target = event.preventDefault = event.stopPropagation =
 38.1794 -				event.handler = event.data = null;
 38.1795 -
 38.1796 -		return val;
 38.1797 -	},
 38.1798 -
 38.1799 -	fix: function(event) {
 38.1800 -		// store a copy of the original event object 
 38.1801 -		// and clone to set read-only properties
 38.1802 -		var originalEvent = event;
 38.1803 -		event = jQuery.extend({}, originalEvent);
 38.1804 -		
 38.1805 -		// add preventDefault and stopPropagation since 
 38.1806 -		// they will not work on the clone
 38.1807 -		event.preventDefault = function() {
 38.1808 -			// if preventDefault exists run it on the original event
 38.1809 -			if (originalEvent.preventDefault)
 38.1810 -				originalEvent.preventDefault();
 38.1811 -			// otherwise set the returnValue property of the original event to false (IE)
 38.1812 -			originalEvent.returnValue = false;
 38.1813 -		};
 38.1814 -		event.stopPropagation = function() {
 38.1815 -			// if stopPropagation exists run it on the original event
 38.1816 -			if (originalEvent.stopPropagation)
 38.1817 -				originalEvent.stopPropagation();
 38.1818 -			// otherwise set the cancelBubble property of the original event to true (IE)
 38.1819 -			originalEvent.cancelBubble = true;
 38.1820 -		};
 38.1821 -		
 38.1822 -		// Fix target property, if necessary
 38.1823 -		if ( !event.target && event.srcElement )
 38.1824 -			event.target = event.srcElement;
 38.1825 -				
 38.1826 -		// check if target is a textnode (safari)
 38.1827 -		if (jQuery.browser.safari && event.target.nodeType == 3)
 38.1828 -			event.target = originalEvent.target.parentNode;
 38.1829 -
 38.1830 -		// Add relatedTarget, if necessary
 38.1831 -		if ( !event.relatedTarget && event.fromElement )
 38.1832 -			event.relatedTarget = event.fromElement == event.target ? event.toElement : event.fromElement;
 38.1833 -
 38.1834 -		// Calculate pageX/Y if missing and clientX/Y available
 38.1835 -		if ( event.pageX == null && event.clientX != null ) {
 38.1836 -			var e = document.documentElement, b = document.body;
 38.1837 -			event.pageX = event.clientX + (e && e.scrollLeft || b.scrollLeft || 0);
 38.1838 -			event.pageY = event.clientY + (e && e.scrollTop || b.scrollTop || 0);
 38.1839 -		}
 38.1840 -			
 38.1841 -		// Add which for key events
 38.1842 -		if ( !event.which && (event.charCode || event.keyCode) )
 38.1843 -			event.which = event.charCode || event.keyCode;
 38.1844 -		
 38.1845 -		// Add metaKey to non-Mac browsers (use ctrl for PC's and Meta for Macs)
 38.1846 -		if ( !event.metaKey && event.ctrlKey )
 38.1847 -			event.metaKey = event.ctrlKey;
 38.1848 -
 38.1849 -		// Add which for click: 1 == left; 2 == middle; 3 == right
 38.1850 -		// Note: button is not normalized, so don't use it
 38.1851 -		if ( !event.which && event.button )
 38.1852 -			event.which = (event.button & 1 ? 1 : ( event.button & 2 ? 3 : ( event.button & 4 ? 2 : 0 ) ));
 38.1853 -			
 38.1854 -		return event;
 38.1855 -	}
 38.1856 -};
 38.1857 -
 38.1858 -jQuery.fn.extend({
 38.1859 -	bind: function( type, data, fn ) {
 38.1860 -		return type == "unload" ? this.one(type, data, fn) : this.each(function(){
 38.1861 -			jQuery.event.add( this, type, fn || data, fn && data );
 38.1862 -		});
 38.1863 -	},
 38.1864 -	
 38.1865 -	one: function( type, data, fn ) {
 38.1866 -		return this.each(function(){
 38.1867 -			jQuery.event.add( this, type, function(event) {
 38.1868 -				jQuery(this).unbind(event);
 38.1869 -				return (fn || data).apply( this, arguments);
 38.1870 -			}, fn && data);
 38.1871 -		});
 38.1872 -	},
 38.1873 -
 38.1874 -	unbind: function( type, fn ) {
 38.1875 -		return this.each(function(){
 38.1876 -			jQuery.event.remove( this, type, fn );
 38.1877 -		});
 38.1878 -	},
 38.1879 -
 38.1880 -	trigger: function( type, data, fn ) {
 38.1881 -		return this.each(function(){
 38.1882 -			jQuery.event.trigger( type, data, this, true, fn );
 38.1883 -		});
 38.1884 -	},
 38.1885 -
 38.1886 -	triggerHandler: function( type, data, fn ) {
 38.1887 -		if ( this[0] )
 38.1888 -			return jQuery.event.trigger( type, data, this[0], false, fn );
 38.1889 -	},
 38.1890 -
 38.1891 -	toggle: function() {
 38.1892 -		// Save reference to arguments for access in closure
 38.1893 -		var a = arguments;
 38.1894 -
 38.1895 -		return this.click(function(e) {
 38.1896 -			// Figure out which function to execute
 38.1897 -			this.lastToggle = 0 == this.lastToggle ? 1 : 0;
 38.1898 -			
 38.1899 -			// Make sure that clicks stop
 38.1900 -			e.preventDefault();
 38.1901 -			
 38.1902 -			// and execute the function
 38.1903 -			return a[this.lastToggle].apply( this, [e] ) || false;
 38.1904 -		});
 38.1905 -	},
 38.1906 -
 38.1907 -	hover: function(f,g) {
 38.1908 -		
 38.1909 -		// A private function for handling mouse 'hovering'
 38.1910 -		function handleHover(e) {
 38.1911 -			// Check if mouse(over|out) are still within the same parent element
 38.1912 -			var p = e.relatedTarget;
 38.1913 -	
 38.1914 -			// Traverse up the tree
 38.1915 -			while ( p && p != this ) try { p = p.parentNode; } catch(e) { p = this; };
 38.1916 -			
 38.1917 -			// If we actually just moused on to a sub-element, ignore it
 38.1918 -			if ( p == this ) return false;
 38.1919 -			
 38.1920 -			// Execute the right function
 38.1921 -			return (e.type == "mouseover" ? f : g).apply(this, [e]);
 38.1922 -		}
 38.1923 -		
 38.1924 -		// Bind the function to the two event listeners
 38.1925 -		return this.mouseover(handleHover).mouseout(handleHover);
 38.1926 -	},
 38.1927 -	
 38.1928 -	ready: function(f) {
 38.1929 -		// Attach the listeners
 38.1930 -		bindReady();
 38.1931 -
 38.1932 -		// If the DOM is already ready
 38.1933 -		if ( jQuery.isReady )
 38.1934 -			// Execute the function immediately
 38.1935 -			f.apply( document, [jQuery] );
 38.1936 -			
 38.1937 -		// Otherwise, remember the function for later
 38.1938 -		else
 38.1939 -			// Add the function to the wait list
 38.1940 -			jQuery.readyList.push( function() { return f.apply(this, [jQuery]); } );
 38.1941 -	
 38.1942 -		return this;
 38.1943 -	}
 38.1944 -});
 38.1945 -
 38.1946 -jQuery.extend({
 38.1947 -	/*
 38.1948 -	 * All the code that makes DOM Ready work nicely.
 38.1949 -	 */
 38.1950 -	isReady: false,
 38.1951 -	readyList: [],
 38.1952 -	
 38.1953 -	// Handle when the DOM is ready
 38.1954 -	ready: function() {
 38.1955 -		// Make sure that the DOM is not already loaded
 38.1956 -		if ( !jQuery.isReady ) {
 38.1957 -			// Remember that the DOM is ready
 38.1958 -			jQuery.isReady = true;
 38.1959 -			
 38.1960 -			// If there are functions bound, to execute
 38.1961 -			if ( jQuery.readyList ) {
 38.1962 -				// Execute all of them
 38.1963 -				jQuery.each( jQuery.readyList, function(){
 38.1964 -					this.apply( document );
 38.1965 -				});
 38.1966 -				
 38.1967 -				// Reset the list of functions
 38.1968 -				jQuery.readyList = null;
 38.1969 -			}
 38.1970 -			// Remove event listener to avoid memory leak
 38.1971 -			if ( jQuery.browser.mozilla || jQuery.browser.opera )
 38.1972 -				document.removeEventListener( "DOMContentLoaded", jQuery.ready, false );
 38.1973 -			
 38.1974 -			// Remove script element used by IE hack
 38.1975 -			if( !window.frames.length ) // don't remove if frames are present (#1187)
 38.1976 -				jQuery(window).load(function(){ jQuery("#__ie_init").remove(); });
 38.1977 -		}
 38.1978 -	}
 38.1979 -});
 38.1980 -
 38.1981 -jQuery.each( ("blur,focus,load,resize,scroll,unload,click,dblclick," +
 38.1982 -	"mousedown,mouseup,mousemove,mouseover,mouseout,change,select," + 
 38.1983 -	"submit,keydown,keypress,keyup,error").split(","), function(i,o){
 38.1984 -	
 38.1985 -	// Handle event binding
 38.1986 -	jQuery.fn[o] = function(f){
 38.1987 -		return f ? this.bind(o, f) : this.trigger(o);
 38.1988 -	};
 38.1989 -});
 38.1990 -
 38.1991 -var readyBound = false;
 38.1992 -
 38.1993 -function bindReady(){
 38.1994 -	if ( readyBound ) return;
 38.1995 -	readyBound = true;
 38.1996 -
 38.1997 -	// If Mozilla is used
 38.1998 -	if ( jQuery.browser.mozilla || jQuery.browser.opera )
 38.1999 -		// Use the handy event callback
 38.2000 -		document.addEventListener( "DOMContentLoaded", jQuery.ready, false );
 38.2001 -	
 38.2002 -	// If IE is used, use the excellent hack by Matthias Miller
 38.2003 -	// http://www.outofhanwell.com/blog/index.php?title=the_window_onload_problem_revisited
 38.2004 -	else if ( jQuery.browser.msie ) {
 38.2005 -	
 38.2006 -		// Only works if you document.write() it
 38.2007 -		document.write("<scr" + "ipt id=__ie_init defer=true " + 
 38.2008 -			"src=//:><\/script>");
 38.2009 -	
 38.2010 -		// Use the defer script hack
 38.2011 -		var script = document.getElementById("__ie_init");
 38.2012 -		
 38.2013 -		// script does not exist if jQuery is loaded dynamically
 38.2014 -		if ( script ) 
 38.2015 -			script.onreadystatechange = function() {
 38.2016 -				if ( this.readyState != "complete" ) return;
 38.2017 -				jQuery.ready();
 38.2018 -			};
 38.2019 -	
 38.2020 -		// Clear from memory
 38.2021 -		script = null;
 38.2022 -	
 38.2023 -	// If Safari  is used
 38.2024 -	} else if ( jQuery.browser.safari )
 38.2025 -		// Continually check to see if the document.readyState is valid
 38.2026 -		jQuery.safariTimer = setInterval(function(){
 38.2027 -			// loaded and complete are both valid states
 38.2028 -			if ( document.readyState == "loaded" || 
 38.2029 -				document.readyState == "complete" ) {
 38.2030 -	
 38.2031 -				// If either one are found, remove the timer
 38.2032 -				clearInterval( jQuery.safariTimer );
 38.2033 -				jQuery.safariTimer = null;
 38.2034 -	
 38.2035 -				// and execute any waiting functions
 38.2036 -				jQuery.ready();
 38.2037 -			}
 38.2038 -		}, 10); 
 38.2039 -
 38.2040 -	// A fallback to window.onload, that will always work
 38.2041 -	jQuery.event.add( window, "load", jQuery.ready );
 38.2042 -}
 38.2043 -jQuery.fn.extend({
 38.2044 -	load: function( url, params, callback ) {
 38.2045 -		if ( jQuery.isFunction( url ) )
 38.2046 -			return this.bind("load", url);
 38.2047 -
 38.2048 -		var off = url.indexOf(" ");
 38.2049 -		if ( off >= 0 ) {
 38.2050 -			var selector = url.slice(off, url.length);
 38.2051 -			url = url.slice(0, off);
 38.2052 -		}
 38.2053 -
 38.2054 -		callback = callback || function(){};
 38.2055 -
 38.2056 -		// Default to a GET request
 38.2057 -		var type = "GET";
 38.2058 -
 38.2059 -		// If the second parameter was provided
 38.2060 -		if ( params )
 38.2061 -			// If it's a function
 38.2062 -			if ( jQuery.isFunction( params ) ) {
 38.2063 -				// We assume that it's the callback
 38.2064 -				callback = params;
 38.2065 -				params = null;
 38.2066 -
 38.2067 -			// Otherwise, build a param string
 38.2068 -			} else {
 38.2069 -				params = jQuery.param( params );
 38.2070 -				type = "POST";
 38.2071 -			}
 38.2072 -
 38.2073 -		var self = this;
 38.2074 -
 38.2075 -		// Request the remote document
 38.2076 -		jQuery.ajax({
 38.2077 -			url: url,
 38.2078 -			type: type,
 38.2079 -			data: params,
 38.2080 -			complete: function(res, status){
 38.2081 -				// If successful, inject the HTML into all the matched elements
 38.2082 -				if ( status == "success" || status == "notmodified" )
 38.2083 -					// See if a selector was specified
 38.2084 -					self.html( selector ?
 38.2085 -						// Create a dummy div to hold the results
 38.2086 -						jQuery("<div/>")
 38.2087 -							// inject the contents of the document in, removing the scripts
 38.2088 -							// to avoid any 'Permission Denied' errors in IE
 38.2089 -							.append(res.responseText.replace(/<script(.|\s)*?\/script>/g, ""))
 38.2090 -
 38.2091 -							// Locate the specified elements
 38.2092 -							.find(selector) :
 38.2093 -
 38.2094 -						// If not, just inject the full result
 38.2095 -						res.responseText );
 38.2096 -
 38.2097 -				// Add delay to account for Safari's delay in globalEval
 38.2098 -				setTimeout(function(){
 38.2099 -					self.each( callback, [res.responseText, status, res] );
 38.2100 -				}, 13);
 38.2101 -			}
 38.2102 -		});
 38.2103 -		return this;
 38.2104 -	},
 38.2105 -
 38.2106 -	serialize: function() {
 38.2107 -		return jQuery.param(this.serializeArray());
 38.2108 -	},
 38.2109 -	serializeArray: function() {
 38.2110 -		return this.map(function(){
 38.2111 -			return jQuery.nodeName(this, "form") ?
 38.2112 -				jQuery.makeArray(this.elements) : this;
 38.2113 -		})
 38.2114 -		.filter(function(){
 38.2115 -			return this.name && !this.disabled && 
 38.2116 -				(this.checked || /select|textarea/i.test(this.nodeName) || 
 38.2117 -					/text|hidden|password/i.test(this.type));
 38.2118 -		})
 38.2119 -		.map(function(i, elem){
 38.2120 -			var val = jQuery(this).val();
 38.2121 -			return val == null ? null :
 38.2122 -				val.constructor == Array ?
 38.2123 -					jQuery.map( val, function(val, i){
 38.2124 -						return {name: elem.name, value: val};
 38.2125 -					}) :
 38.2126 -					{name: elem.name, value: val};
 38.2127 -		}).get();
 38.2128 -	}
 38.2129 -});
 38.2130 -
 38.2131 -// Attach a bunch of functions for handling common AJAX events
 38.2132 -jQuery.each( "ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","), function(i,o){
 38.2133 -	jQuery.fn[o] = function(f){
 38.2134 -		return this.bind(o, f);
 38.2135 -	};
 38.2136 -});
 38.2137 -
 38.2138 -var jsc = (new Date).getTime();
 38.2139 -
 38.2140 -jQuery.extend({
 38.2141 -	get: function( url, data, callback, type ) {
 38.2142 -		// shift arguments if data argument was ommited
 38.2143 -		if ( jQuery.isFunction( data ) ) {
 38.2144 -			callback = data;
 38.2145 -			data = null;
 38.2146 -		}
 38.2147 -		
 38.2148 -		return jQuery.ajax({
 38.2149 -			type: "GET",
 38.2150 -			url: url,
 38.2151 -			data: data,
 38.2152 -			success: callback,
 38.2153 -			dataType: type
 38.2154 -		});
 38.2155 -	},
 38.2156 -
 38.2157 -	getScript: function( url, callback ) {
 38.2158 -		return jQuery.get(url, null, callback, "script");
 38.2159 -	},
 38.2160 -
 38.2161 -	getJSON: function( url, data, callback ) {
 38.2162 -		return jQuery.get(url, data, callback, "json");
 38.2163 -	},
 38.2164 -
 38.2165 -	post: function( url, data, callback, type ) {
 38.2166 -		if ( jQuery.isFunction( data ) ) {
 38.2167 -			callback = data;
 38.2168 -			data = {};
 38.2169 -		}
 38.2170 -
 38.2171 -		return jQuery.ajax({
 38.2172 -			type: "POST",
 38.2173 -			url: url,
 38.2174 -			data: data,
 38.2175 -			success: callback,
 38.2176 -			dataType: type
 38.2177 -		});
 38.2178 -	},
 38.2179 -
 38.2180 -	ajaxSetup: function( settings ) {
 38.2181 -		jQuery.extend( jQuery.ajaxSettings, settings );
 38.2182 -	},
 38.2183 -
 38.2184 -	ajaxSettings: {
 38.2185 -		global: true,
 38.2186 -		type: "GET",
 38.2187 -		timeout: 0,
 38.2188 -		contentType: "application/x-www-form-urlencoded",
 38.2189 -		processData: true,
 38.2190 -		async: true,
 38.2191 -		data: null
 38.2192 -	},
 38.2193 -	
 38.2194 -	// Last-Modified header cache for next request
 38.2195 -	lastModified: {},
 38.2196 -
 38.2197 -	ajax: function( s ) {
 38.2198 -		var jsonp, jsre = /=(\?|%3F)/g, status, data;
 38.2199 -
 38.2200 -		// Extend the settings, but re-extend 's' so that it can be
 38.2201 -		// checked again later (in the test suite, specifically)
 38.2202 -		s = jQuery.extend(true, s, jQuery.extend(true, {}, jQuery.ajaxSettings, s));
 38.2203 -
 38.2204 -		// convert data if not already a string
 38.2205 -		if ( s.data && s.processData && typeof s.data != "string" )
 38.2206 -			s.data = jQuery.param(s.data);
 38.2207 -
 38.2208 -		// Handle JSONP Parameter Callbacks
 38.2209 -		if ( s.dataType == "jsonp" ) {
 38.2210 -			if ( s.type.toLowerCase() == "get" ) {
 38.2211 -				if ( !s.url.match(jsre) )
 38.2212 -					s.url += (s.url.match(/\?/) ? "&" : "?") + (s.jsonp || "callback") + "=?";
 38.2213 -			} else if ( !s.data || !s.data.match(jsre) )
 38.2214 -				s.data = (s.data ? s.data + "&" : "") + (s.jsonp || "callback") + "=?";
 38.2215 -			s.dataType = "json";
 38.2216 -		}
 38.2217 -
 38.2218 -		// Build temporary JSONP function
 38.2219 -		if ( s.dataType == "json" && (s.data && s.data.match(jsre) || s.url.match(jsre)) ) {
 38.2220 -			jsonp = "jsonp" + jsc++;
 38.2221 -
 38.2222 -			// Replace the =? sequence both in the query string and the data
 38.2223 -			if ( s.data )
 38.2224 -				s.data = s.data.replace(jsre, "=" + jsonp);
 38.2225 -			s.url = s.url.replace(jsre, "=" + jsonp);
 38.2226 -
 38.2227 -			// We need to make sure
 38.2228 -			// that a JSONP style response is executed properly
 38.2229 -			s.dataType = "script";
 38.2230 -
 38.2231 -			// Handle JSONP-style loading
 38.2232 -			window[ jsonp ] = function(tmp){
 38.2233 -				data = tmp;
 38.2234 -				success();
 38.2235 -				complete();
 38.2236 -				// Garbage collect
 38.2237 -				window[ jsonp ] = undefined;
 38.2238 -				try{ delete window[ jsonp ]; } catch(e){}
 38.2239 -			};
 38.2240 -		}
 38.2241 -
 38.2242 -		if ( s.dataType == "script" && s.cache == null )
 38.2243 -			s.cache = false;
 38.2244 -
 38.2245 -		if ( s.cache === false && s.type.toLowerCase() == "get" )
 38.2246 -			s.url += (s.url.match(/\?/) ? "&" : "?") + "_=" + (new Date()).getTime();
 38.2247 -
 38.2248 -		// If data is available, append data to url for get requests
 38.2249 -		if ( s.data && s.type.toLowerCase() == "get" ) {
 38.2250 -			s.url += (s.url.match(/\?/) ? "&" : "?") + s.data;
 38.2251 -
 38.2252 -			// IE likes to send both get and post data, prevent this
 38.2253 -			s.data = null;
 38.2254 -		}
 38.2255 -
 38.2256 -		// Watch for a new set of requests
 38.2257 -		if ( s.global && ! jQuery.active++ )
 38.2258 -			jQuery.event.trigger( "ajaxStart" );
 38.2259 -
 38.2260 -		// If we're requesting a remote document
 38.2261 -		// and trying to load JSON or Script
 38.2262 -		if ( !s.url.indexOf("http") && s.dataType == "script" ) {
 38.2263 -			var head = document.getElementsByTagName("head")[0];
 38.2264 -			var script = document.createElement("script");
 38.2265 -			script.src = s.url;
 38.2266 -
 38.2267 -			// Handle Script loading
 38.2268 -			if ( !jsonp && (s.success || s.complete) ) {
 38.2269 -				var done = false;
 38.2270 -
 38.2271 -				// Attach handlers for all browsers
 38.2272 -				script.onload = script.onreadystatechange = function(){
 38.2273 -					if ( !done && (!this.readyState || 
 38.2274 -							this.readyState == "loaded" || this.readyState == "complete") ) {
 38.2275 -						done = true;
 38.2276 -						success();
 38.2277 -						complete();
 38.2278 -						head.removeChild( script );
 38.2279 -					}
 38.2280 -				};
 38.2281 -			}
 38.2282 -
 38.2283 -			head.appendChild(script);
 38.2284 -
 38.2285 -			// We handle everything using the script element injection
 38.2286 -			return;
 38.2287 -		}
 38.2288 -
 38.2289 -		var requestDone = false;
 38.2290 -
 38.2291 -		// Create the request object; Microsoft failed to properly
 38.2292 -		// implement the XMLHttpRequest in IE7, so we use the ActiveXObject when it is available
 38.2293 -		var xml = window.ActiveXObject ? new ActiveXObject("Microsoft.XMLHTTP") : new XMLHttpRequest();
 38.2294 -
 38.2295 -		// Open the socket
 38.2296 -		xml.open(s.type, s.url, s.async);
 38.2297 -
 38.2298 -		// Set the correct header, if data is being sent
 38.2299 -		if ( s.data )
 38.2300 -			xml.setRequestHeader("Content-Type", s.contentType);
 38.2301 -
 38.2302 -		// Set the If-Modified-Since header, if ifModified mode.
 38.2303 -		if ( s.ifModified )
 38.2304 -			xml.setRequestHeader("If-Modified-Since",
 38.2305 -				jQuery.lastModified[s.url] || "Thu, 01 Jan 1970 00:00:00 GMT" );
 38.2306 -
 38.2307 -		// Set header so the called script knows that it's an XMLHttpRequest
 38.2308 -		xml.setRequestHeader("X-Requested-With", "XMLHttpRequest");
 38.2309 -
 38.2310 -		// Allow custom headers/mimetypes
 38.2311 -		if ( s.beforeSend )
 38.2312 -			s.beforeSend(xml);
 38.2313 -			
 38.2314 -		if ( s.global )
 38.2315 -		    jQuery.event.trigger("ajaxSend", [xml, s]);
 38.2316 -
 38.2317 -		// Wait for a response to come back
 38.2318 -		var onreadystatechange = function(isTimeout){
 38.2319 -			// The transfer is complete and the data is available, or the request timed out
 38.2320 -			if ( !requestDone && xml && (xml.readyState == 4 || isTimeout == "timeout") ) {
 38.2321 -				requestDone = true;
 38.2322 -				
 38.2323 -				// clear poll interval
 38.2324 -				if (ival) {
 38.2325 -					clearInterval(ival);
 38.2326 -					ival = null;
 38.2327 -				}
 38.2328 -				
 38.2329 -				status = isTimeout == "timeout" && "timeout" ||
 38.2330 -					!jQuery.httpSuccess( xml ) && "error" ||
 38.2331 -					s.ifModified && jQuery.httpNotModified( xml, s.url ) && "notmodified" ||
 38.2332 -					"success";
 38.2333 -
 38.2334 -				if ( status == "success" ) {
 38.2335 -					// Watch for, and catch, XML document parse errors
 38.2336 -					try {
 38.2337 -						// process the data (runs the xml through httpData regardless of callback)
 38.2338 -						data = jQuery.httpData( xml, s.dataType );
 38.2339 -					} catch(e) {
 38.2340 -						status = "parsererror";
 38.2341 -					}
 38.2342 -				}
 38.2343 -
 38.2344 -				// Make sure that the request was successful or notmodified
 38.2345 -				if ( status == "success" ) {
 38.2346 -					// Cache Last-Modified header, if ifModified mode.
 38.2347 -					var modRes;
 38.2348 -					try {
 38.2349 -						modRes = xml.getResponseHeader("Last-Modified");
 38.2350 -					} catch(e) {} // swallow exception thrown by FF if header is not available
 38.2351 -	
 38.2352 -					if ( s.ifModified && modRes )
 38.2353 -						jQuery.lastModified[s.url] = modRes;
 38.2354 -
 38.2355 -					// JSONP handles its own success callback
 38.2356 -					if ( !jsonp )
 38.2357 -						success();	
 38.2358 -				} else
 38.2359 -					jQuery.handleError(s, xml, status);
 38.2360 -
 38.2361 -				// Fire the complete handlers
 38.2362 -				complete();
 38.2363 -
 38.2364 -				// Stop memory leaks
 38.2365 -				if ( s.async )
 38.2366 -					xml = null;
 38.2367 -			}
 38.2368 -		};
 38.2369 -		
 38.2370 -		if ( s.async ) {
 38.2371 -			// don't attach the handler to the request, just poll it instead
 38.2372 -			var ival = setInterval(onreadystatechange, 13); 
 38.2373 -
 38.2374 -			// Timeout checker
 38.2375 -			if ( s.timeout > 0 )
 38.2376 -				setTimeout(function(){
 38.2377 -					// Check to see if the request is still happening
 38.2378 -					if ( xml ) {
 38.2379 -						// Cancel the request
 38.2380 -						xml.abort();
 38.2381 -	
 38.2382 -						if( !requestDone )
 38.2383 -							onreadystatechange( "timeout" );
 38.2384 -					}
 38.2385 -				}, s.timeout);
 38.2386 -		}
 38.2387 -			
 38.2388 -		// Send the data
 38.2389 -		try {
 38.2390 -			xml.send(s.data);
 38.2391 -		} catch(e) {
 38.2392 -			jQuery.handleError(s, xml, null, e);
 38.2393 -		}
 38.2394 -		
 38.2395 -		// firefox 1.5 doesn't fire statechange for sync requests
 38.2396 -		if ( !s.async )
 38.2397 -			onreadystatechange();
 38.2398 -		
 38.2399 -		// return XMLHttpRequest to allow aborting the request etc.
 38.2400 -		return xml;
 38.2401 -
 38.2402 -		function success(){
 38.2403 -			// If a local callback was specified, fire it and pass it the data
 38.2404 -			if ( s.success )
 38.2405 -				s.success( data, status );
 38.2406 -
 38.2407 -			// Fire the global callback
 38.2408 -			if ( s.global )
 38.2409 -				jQuery.event.trigger( "ajaxSuccess", [xml, s] );
 38.2410 -		}
 38.2411 -
 38.2412 -		function complete(){
 38.2413 -			// Process result
 38.2414 -			if ( s.complete )
 38.2415 -				s.complete(xml, status);
 38.2416 -
 38.2417 -			// The request was completed
 38.2418 -			if ( s.global )
 38.2419 -				jQuery.event.trigger( "ajaxComplete", [xml, s] );
 38.2420 -
 38.2421 -			// Handle the global AJAX counter
 38.2422 -			if ( s.global && ! --jQuery.active )
 38.2423 -				jQuery.event.trigger( "ajaxStop" );
 38.2424 -		}
 38.2425 -	},
 38.2426 -
 38.2427 -	handleError: function( s, xml, status, e ) {
 38.2428 -		// If a local callback was specified, fire it
 38.2429 -		if ( s.error ) s.error( xml, status, e );
 38.2430 -
 38.2431 -		// Fire the global callback
 38.2432 -		if ( s.global )
 38.2433 -			jQuery.event.trigger( "ajaxError", [xml, s, e] );
 38.2434 -	},
 38.2435 -
 38.2436 -	// Counter for holding the number of active queries
 38.2437 -	active: 0,
 38.2438 -
 38.2439 -	// Determines if an XMLHttpRequest was successful or not
 38.2440 -	httpSuccess: function( r ) {
 38.2441 -		try {
 38.2442 -			return !r.status && location.protocol == "file:" ||
 38.2443 -				( r.status >= 200 && r.status < 300 ) || r.status == 304 ||
 38.2444 -				jQuery.browser.safari && r.status == undefined;
 38.2445 -		} catch(e){}
 38.2446 -		return false;
 38.2447 -	},
 38.2448 -
 38.2449 -	// Determines if an XMLHttpRequest returns NotModified
 38.2450 -	httpNotModified: function( xml, url ) {
 38.2451 -		try {
 38.2452 -			var xmlRes = xml.getResponseHeader("Last-Modified");
 38.2453 -
 38.2454 -			// Firefox always returns 200. check Last-Modified date
 38.2455 -			return xml.status == 304 || xmlRes == jQuery.lastModified[url] ||
 38.2456 -				jQuery.browser.safari && xml.status == undefined;
 38.2457 -		} catch(e){}
 38.2458 -		return false;
 38.2459 -	},
 38.2460 -
 38.2461 -	httpData: function( r, type ) {
 38.2462 -		var ct = r.getResponseHeader("content-type");
 38.2463 -		var xml = type == "xml" || !type && ct && ct.indexOf("xml") >= 0;
 38.2464 -		var data = xml ? r.responseXML : r.responseText;
 38.2465 -
 38.2466 -		if ( xml && data.documentElement.tagName == "parsererror" )
 38.2467 -			throw "parsererror";
 38.2468 -
 38.2469 -		// If the type is "script", eval it in global context
 38.2470 -		if ( type == "script" )
 38.2471 -			jQuery.globalEval( data );
 38.2472 -
 38.2473 -		// Get the JavaScript object, if JSON is used.
 38.2474 -		if ( type == "json" )
 38.2475 -			data = eval("(" + data + ")");
 38.2476 -
 38.2477 -		return data;
 38.2478 -	},
 38.2479 -
 38.2480 -	// Serialize an array of form elements or a set of
 38.2481 -	// key/values into a query string
 38.2482 -	param: function( a ) {
 38.2483 -		var s = [];
 38.2484 -
 38.2485 -		// If an array was passed in, assume that it is an array
 38.2486 -		// of form elements
 38.2487 -		if ( a.constructor == Array || a.jquery )
 38.2488 -			// Serialize the form elements
 38.2489 -			jQuery.each( a, function(){
 38.2490 -				s.push( encodeURIComponent(this.name) + "=" + encodeURIComponent( this.value ) );
 38.2491 -			});
 38.2492 -
 38.2493 -		// Otherwise, assume that it's an object of key/value pairs
 38.2494 -		else
 38.2495 -			// Serialize the key/values
 38.2496 -			for ( var j in a )
 38.2497 -				// If the value is an array then the key names need to be repeated
 38.2498 -				if ( a[j] && a[j].constructor == Array )
 38.2499 -					jQuery.each( a[j], function(){
 38.2500 -						s.push( encodeURIComponent(j) + "=" + encodeURIComponent( this ) );
 38.2501 -					});
 38.2502 -				else
 38.2503 -					s.push( encodeURIComponent(j) + "=" + encodeURIComponent( a[j] ) );
 38.2504 -
 38.2505 -		// Return the resulting serialization
 38.2506 -		return s.join("&").replace(/%20/g, "+");
 38.2507 -	}
 38.2508 -
 38.2509 -});
 38.2510 -jQuery.fn.extend({
 38.2511 -	show: function(speed,callback){
 38.2512 -		return speed ?
 38.2513 -			this.animate({
 38.2514 -				height: "show", width: "show", opacity: "show"
 38.2515 -			}, speed, callback) :
 38.2516 -			
 38.2517 -			this.filter(":hidden").each(function(){
 38.2518 -				this.style.display = this.oldblock ? this.oldblock : "";
 38.2519 -				if ( jQuery.css(this,"display") == "none" )
 38.2520 -					this.style.display = "block";
 38.2521 -			}).end();
 38.2522 -	},
 38.2523 -	
 38.2524 -	hide: function(speed,callback){
 38.2525 -		return speed ?
 38.2526 -			this.animate({
 38.2527 -				height: "hide", width: "hide", opacity: "hide"
 38.2528 -			}, speed, callback) :
 38.2529 -			
 38.2530 -			this.filter(":visible").each(function(){
 38.2531 -				this.oldblock = this.oldblock || jQuery.css(this,"display");
 38.2532 -				if ( this.oldblock == "none" )
 38.2533 -					this.oldblock = "block";
 38.2534 -				this.style.display = "none";
 38.2535 -			}).end();
 38.2536 -	},
 38.2537 -
 38.2538 -	// Save the old toggle function
 38.2539 -	_toggle: jQuery.fn.toggle,
 38.2540 -	
 38.2541 -	toggle: function( fn, fn2 ){
 38.2542 -		return jQuery.isFunction(fn) && jQuery.isFunction(fn2) ?
 38.2543 -			this._toggle( fn, fn2 ) :
 38.2544 -			fn ?
 38.2545 -				this.animate({
 38.2546 -					height: "toggle", width: "toggle", opacity: "toggle"
 38.2547 -				}, fn, fn2) :
 38.2548 -				this.each(function(){
 38.2549 -					jQuery(this)[ jQuery(this).is(":hidden") ? "show" : "hide" ]();
 38.2550 -				});
 38.2551 -	},
 38.2552 -	
 38.2553 -	slideDown: function(speed,callback){
 38.2554 -		return this.animate({height: "show"}, speed, callback);
 38.2555 -	},
 38.2556 -	
 38.2557 -	slideUp: function(speed,callback){
 38.2558 -		return this.animate({height: "hide"}, speed, callback);
 38.2559 -	},
 38.2560 -
 38.2561 -	slideToggle: function(speed, callback){
 38.2562 -		return this.animate({height: "toggle"}, speed, callback);
 38.2563 -	},
 38.2564 -	
 38.2565 -	fadeIn: function(speed, callback){
 38.2566 -		return this.animate({opacity: "show"}, speed, callback);
 38.2567 -	},
 38.2568 -	
 38.2569 -	fadeOut: function(speed, callback){
 38.2570 -		return this.animate({opacity: "hide"}, speed, callback);
 38.2571 -	},
 38.2572 -	
 38.2573 -	fadeTo: function(speed,to,callback){
 38.2574 -		return this.animate({opacity: to}, speed, callback);
 38.2575 -	},
 38.2576 -	
 38.2577 -	animate: function( prop, speed, easing, callback ) {
 38.2578 -		var opt = jQuery.speed(speed, easing, callback);
 38.2579 -
 38.2580 -		return this[ opt.queue === false ? "each" : "queue" ](function(){
 38.2581 -			opt = jQuery.extend({}, opt);
 38.2582 -			var hidden = jQuery(this).is(":hidden"), self = this;
 38.2583 -			
 38.2584 -			for ( var p in prop ) {
 38.2585 -				if ( prop[p] == "hide" && hidden || prop[p] == "show" && !hidden )
 38.2586 -					return jQuery.isFunction(opt.complete) && opt.complete.apply(this);
 38.2587 -
 38.2588 -				if ( p == "height" || p == "width" ) {
 38.2589 -					// Store display property
 38.2590 -					opt.display = jQuery.css(this, "display");
 38.2591 -
 38.2592 -					// Make sure that nothing sneaks out
 38.2593 -					opt.overflow = this.style.overflow;
 38.2594 -				}
 38.2595 -			}
 38.2596 -
 38.2597 -			if ( opt.overflow != null )
 38.2598 -				this.style.overflow = "hidden";
 38.2599 -
 38.2600 -			opt.curAnim = jQuery.extend({}, prop);
 38.2601 -			
 38.2602 -			jQuery.each( prop, function(name, val){
 38.2603 -				var e = new jQuery.fx( self, opt, name );
 38.2604 -
 38.2605 -				if ( /toggle|show|hide/.test(val) )
 38.2606 -					e[ val == "toggle" ? hidden ? "show" : "hide" : val ]( prop );
 38.2607 -				else {
 38.2608 -					var parts = val.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),
 38.2609 -						start = e.cur(true) || 0;
 38.2610 -
 38.2611 -					if ( parts ) {
 38.2612 -						var end = parseFloat(parts[2]),
 38.2613 -							unit = parts[3] || "px";
 38.2614 -
 38.2615 -						// We need to compute starting value
 38.2616 -						if ( unit != "px" ) {
 38.2617 -							self.style[ name ] = (end || 1) + unit;
 38.2618 -							start = ((end || 1) / e.cur(true)) * start;
 38.2619 -							self.style[ name ] = start + unit;
 38.2620 -						}
 38.2621 -
 38.2622 -						// If a +=/-= token was provided, we're doing a relative animation
 38.2623 -						if ( parts[1] )
 38.2624 -							end = ((parts[1] == "-=" ? -1 : 1) * end) + start;
 38.2625 -
 38.2626 -						e.custom( start, end, unit );
 38.2627 -					} else
 38.2628 -						e.custom( start, val, "" );
 38.2629 -				}
 38.2630 -			});
 38.2631 -
 38.2632 -			// For JS strict compliance
 38.2633 -			return true;
 38.2634 -		});
 38.2635 -	},
 38.2636 -	
 38.2637 -	queue: function(type, fn){
 38.2638 -		if ( jQuery.isFunction(type) ) {
 38.2639 -			fn = type;
 38.2640 -			type = "fx";
 38.2641 -		}
 38.2642 -
 38.2643 -		if ( !type || (typeof type == "string" && !fn) )
 38.2644 -			return queue( this[0], type );
 38.2645 -
 38.2646 -		return this.each(function(){
 38.2647 -			if ( fn.constructor == Array )
 38.2648 -				queue(this, type, fn);
 38.2649 -			else {
 38.2650 -				queue(this, type).push( fn );
 38.2651 -			
 38.2652 -				if ( queue(this, type).length == 1 )
 38.2653 -					fn.apply(this);
 38.2654 -			}
 38.2655 -		});
 38.2656 -	},
 38.2657 -
 38.2658 -	stop: function(){
 38.2659 -		var timers = jQuery.timers;
 38.2660 -
 38.2661 -		return this.each(function(){
 38.2662 -			for ( var i = 0; i < timers.length; i++ )
 38.2663 -				if ( timers[i].elem == this )
 38.2664 -					timers.splice(i--, 1);
 38.2665 -		}).dequeue();
 38.2666 -	}
 38.2667 -
 38.2668 -});
 38.2669 -
 38.2670 -var queue = function( elem, type, array ) {
 38.2671 -	if ( !elem )
 38.2672 -		return;
 38.2673 -
 38.2674 -	var q = jQuery.data( elem, type + "queue" );
 38.2675 -
 38.2676 -	if ( !q || array )
 38.2677 -		q = jQuery.data( elem, type + "queue", 
 38.2678 -			array ? jQuery.makeArray(array) : [] );
 38.2679 -
 38.2680 -	return q;
 38.2681 -};
 38.2682 -
 38.2683 -jQuery.fn.dequeue = function(type){
 38.2684 -	type = type || "fx";
 38.2685 -
 38.2686 -	return this.each(function(){
 38.2687 -		var q = queue(this, type);
 38.2688 -
 38.2689 -		q.shift();
 38.2690 -
 38.2691 -		if ( q.length )
 38.2692 -			q[0].apply( this );
 38.2693 -	});
 38.2694 -};
 38.2695 -
 38.2696 -jQuery.extend({
 38.2697 -	
 38.2698 -	speed: function(speed, easing, fn) {
 38.2699 -		var opt = speed && speed.constructor == Object ? speed : {
 38.2700 -			complete: fn || !fn && easing || 
 38.2701 -				jQuery.isFunction( speed ) && speed,
 38.2702 -			duration: speed,
 38.2703 -			easing: fn && easing || easing && easing.constructor != Function && easing
 38.2704 -		};
 38.2705 -
 38.2706 -		opt.duration = (opt.duration && opt.duration.constructor == Number ? 
 38.2707 -			opt.duration : 
 38.2708 -			{ slow: 600, fast: 200 }[opt.duration]) || 400;
 38.2709 -	
 38.2710 -		// Queueing
 38.2711 -		opt.old = opt.complete;
 38.2712 -		opt.complete = function(){
 38.2713 -			jQuery(this).dequeue();
 38.2714 -			if ( jQuery.isFunction( opt.old ) )
 38.2715 -				opt.old.apply( this );
 38.2716 -		};
 38.2717 -	
 38.2718 -		return opt;
 38.2719 -	},
 38.2720 -	
 38.2721 -	easing: {
 38.2722 -		linear: function( p, n, firstNum, diff ) {
 38.2723 -			return firstNum + diff * p;
 38.2724 -		},
 38.2725 -		swing: function( p, n, firstNum, diff ) {
 38.2726 -			return ((-Math.cos(p*Math.PI)/2) + 0.5) * diff + firstNum;
 38.2727 -		}
 38.2728 -	},
 38.2729 -	
 38.2730 -	timers: [],
 38.2731 -
 38.2732 -	fx: function( elem, options, prop ){
 38.2733 -		this.options = options;
 38.2734 -		this.elem = elem;
 38.2735 -		this.prop = prop;
 38.2736 -
 38.2737 -		if ( !options.orig )
 38.2738 -			options.orig = {};
 38.2739 -	}
 38.2740 -
 38.2741 -});
 38.2742 -
 38.2743 -jQuery.fx.prototype = {
 38.2744 -
 38.2745 -	// Simple function for setting a style value
 38.2746 -	update: function(){
 38.2747 -		if ( this.options.step )
 38.2748 -			this.options.step.apply( this.elem, [ this.now, this ] );
 38.2749 -
 38.2750 -		(jQuery.fx.step[this.prop] || jQuery.fx.step._default)( this );
 38.2751 -
 38.2752 -		// Set display property to block for height/width animations
 38.2753 -		if ( this.prop == "height" || this.prop == "width" )
 38.2754 -			this.elem.style.display = "block";
 38.2755 -	},
 38.2756 -
 38.2757 -	// Get the current size
 38.2758 -	cur: function(force){
 38.2759 -		if ( this.elem[this.prop] != null && this.elem.style[this.prop] == null )
 38.2760 -			return this.elem[ this.prop ];
 38.2761 -
 38.2762 -		var r = parseFloat(jQuery.curCSS(this.elem, this.prop, force));
 38.2763 -		return r && r > -10000 ? r : parseFloat(jQuery.css(this.elem, this.prop)) || 0;
 38.2764 -	},
 38.2765 -
 38.2766 -	// Start an animation from one number to another
 38.2767 -	custom: function(from, to, unit){
 38.2768 -		this.startTime = (new Date()).getTime();
 38.2769 -		this.start = from;
 38.2770 -		this.end = to;
 38.2771 -		this.unit = unit || this.unit || "px";
 38.2772 -		this.now = this.start;
 38.2773 -		this.pos = this.state = 0;
 38.2774 -		this.update();
 38.2775 -
 38.2776 -		var self = this;
 38.2777 -		function t(){
 38.2778 -			return self.step();
 38.2779 -		}
 38.2780 -
 38.2781 -		t.elem = this.elem;
 38.2782 -
 38.2783 -		jQuery.timers.push(t);
 38.2784 -
 38.2785 -		if ( jQuery.timers.length == 1 ) {
 38.2786 -			var timer = setInterval(function(){
 38.2787 -				var timers = jQuery.timers;
 38.2788 -				
 38.2789 -				for ( var i = 0; i < timers.length; i++ )
 38.2790 -					if ( !timers[i]() )
 38.2791 -						timers.splice(i--, 1);
 38.2792 -
 38.2793 -				if ( !timers.length )
 38.2794 -					clearInterval( timer );
 38.2795 -			}, 13);
 38.2796 -		}
 38.2797 -	},
 38.2798 -
 38.2799 -	// Simple 'show' function
 38.2800 -	show: function(){
 38.2801 -		// Remember where we started, so that we can go back to it later
 38.2802 -		this.options.orig[this.prop] = jQuery.attr( this.elem.style, this.prop );
 38.2803 -		this.options.show = true;
 38.2804 -
 38.2805 -		// Begin the animation
 38.2806 -		this.custom(0, this.cur());
 38.2807 -
 38.2808 -		// Make sure that we start at a small width/height to avoid any
 38.2809 -		// flash of content
 38.2810 -		if ( this.prop == "width" || this.prop == "height" )
 38.2811 -			this.elem.style[this.prop] = "1px";
 38.2812 -		
 38.2813 -		// Start by showing the element
 38.2814 -		jQuery(this.elem).show();
 38.2815 -	},
 38.2816 -
 38.2817 -	// Simple 'hide' function
 38.2818 -	hide: function(){
 38.2819 -		// Remember where we started, so that we can go back to it later
 38.2820 -		this.options.orig[this.prop] = jQuery.attr( this.elem.style, this.prop );
 38.2821 -		this.options.hide = true;
 38.2822 -
 38.2823 -		// Begin the animation
 38.2824 -		this.custom(this.cur(), 0);
 38.2825 -	},
 38.2826 -
 38.2827 -	// Each step of an animation
 38.2828 -	step: function(){
 38.2829 -		var t = (new Date()).getTime();
 38.2830 -
 38.2831 -		if ( t > this.options.duration + this.startTime ) {
 38.2832 -			this.now = this.end;
 38.2833 -			this.pos = this.state = 1;
 38.2834 -			this.update();
 38.2835 -
 38.2836 -			this.options.curAnim[ this.prop ] = true;
 38.2837 -
 38.2838 -			var done = true;
 38.2839 -			for ( var i in this.options.curAnim )
 38.2840 -				if ( this.options.curAnim[i] !== true )
 38.2841 -					done = false;
 38.2842 -
 38.2843 -			if ( done ) {
 38.2844 -				if ( this.options.display != null ) {
 38.2845 -					// Reset the overflow
 38.2846 -					this.elem.style.overflow = this.options.overflow;
 38.2847 -				
 38.2848 -					// Reset the display
 38.2849 -					this.elem.style.display = this.options.display;
 38.2850 -					if ( jQuery.css(this.elem, "display") == "none" )
 38.2851 -						this.elem.style.display = "block";
 38.2852 -				}
 38.2853 -
 38.2854 -				// Hide the element if the "hide" operation was done
 38.2855 -				if ( this.options.hide )
 38.2856 -					this.elem.style.display = "none";
 38.2857 -
 38.2858 -				// Reset the properties, if the item has been hidden or shown
 38.2859 -				if ( this.options.hide || this.options.show )
 38.2860 -					for ( var p in this.options.curAnim )
 38.2861 -						jQuery.attr(this.elem.style, p, this.options.orig[p]);
 38.2862 -			}
 38.2863 -
 38.2864 -			// If a callback was provided, execute it
 38.2865 -			if ( done && jQuery.isFunction( this.options.complete ) )
 38.2866 -				// Execute the complete function
 38.2867 -				this.options.complete.apply( this.elem );
 38.2868 -
 38.2869 -			return false;
 38.2870 -		} else {
 38.2871 -			var n = t - this.startTime;
 38.2872 -			this.state = n / this.options.duration;
 38.2873 -
 38.2874 -			// Perform the easing function, defaults to swing
 38.2875 -			this.pos = jQuery.easing[this.options.easing || (jQuery.easing.swing ? "swing" : "linear")](this.state, n, 0, 1, this.options.duration);
 38.2876 -			this.now = this.start + ((this.end - this.start) * this.pos);
 38.2877 -
 38.2878 -			// Perform the next step of the animation
 38.2879 -			this.update();
 38.2880 -		}
 38.2881 -
 38.2882 -		return true;
 38.2883 -	}
 38.2884 -
 38.2885 -};
 38.2886 -
 38.2887 -jQuery.fx.step = {
 38.2888 -	scrollLeft: function(fx){
 38.2889 -		fx.elem.scrollLeft = fx.now;
 38.2890 -	},
 38.2891 -
 38.2892 -	scrollTop: function(fx){
 38.2893 -		fx.elem.scrollTop = fx.now;
 38.2894 -	},
 38.2895 -
 38.2896 -	opacity: function(fx){
 38.2897 -		jQuery.attr(fx.elem.style, "opacity", fx.now);
 38.2898 -	},
 38.2899 -
 38.2900 -	_default: function(fx){
 38.2901 -		fx.elem.style[ fx.prop ] = fx.now + fx.unit;
 38.2902 -	}
 38.2903 -};
 38.2904 -// The Offset Method
 38.2905 -// Originally By Brandon Aaron, part of the Dimension Plugin
 38.2906 -// http://jquery.com/plugins/project/dimensions
 38.2907 -jQuery.fn.offset = function() {
 38.2908 -	var left = 0, top = 0, elem = this[0], results;
 38.2909 -	
 38.2910 -	if ( elem ) with ( jQuery.browser ) {
 38.2911 -		var	absolute     = jQuery.css(elem, "position") == "absolute", 
 38.2912 -		    parent       = elem.parentNode, 
 38.2913 -		    offsetParent = elem.offsetParent, 
 38.2914 -		    doc          = elem.ownerDocument,
 38.2915 -		    safari2      = safari && parseInt(version) < 522;
 38.2916 -	
 38.2917 -		// Use getBoundingClientRect if available
 38.2918 -		if ( elem.getBoundingClientRect ) {
 38.2919 -			box = elem.getBoundingClientRect();
 38.2920 -		
 38.2921 -			// Add the document scroll offsets
 38.2922 -			add(
 38.2923 -				box.left + Math.max(doc.documentElement.scrollLeft, doc.body.scrollLeft),
 38.2924 -				box.top  + Math.max(doc.documentElement.scrollTop,  doc.body.scrollTop)
 38.2925 -			);
 38.2926 -		
 38.2927 -			// IE adds the HTML element's border, by default it is medium which is 2px
 38.2928 -			// IE 6 and IE 7 quirks mode the border width is overwritable by the following css html { border: 0; }
 38.2929 -			// IE 7 standards mode, the border is always 2px
 38.2930 -			if ( msie ) {
 38.2931 -				var border = jQuery("html").css("borderWidth");
 38.2932 -				border = (border == "medium" || jQuery.boxModel && parseInt(version) >= 7) && 2 || border;
 38.2933 -				add( -border, -border );
 38.2934 -			}
 38.2935 -	
 38.2936 -		// Otherwise loop through the offsetParents and parentNodes
 38.2937 -		} else {
 38.2938 -		
 38.2939 -			// Initial element offsets
 38.2940 -			add( elem.offsetLeft, elem.offsetTop );
 38.2941 -		
 38.2942 -			// Get parent offsets
 38.2943 -			while ( offsetParent ) {
 38.2944 -				// Add offsetParent offsets
 38.2945 -				add( offsetParent.offsetLeft, offsetParent.offsetTop );
 38.2946 -			
 38.2947 -				// Mozilla and Safari > 2 does not include the border on offset parents
 38.2948 -				// However Mozilla adds the border for table cells
 38.2949 -				if ( mozilla && /^t[d|h]$/i.test(parent.tagName) || !safari2 )
 38.2950 -					border( offsetParent );
 38.2951 -				
 38.2952 -				// Safari <= 2 doubles body offsets with an absolutely positioned element or parent
 38.2953 -				if ( safari2 && !absolute && jQuery.css(offsetParent, "position") == "absolute" )
 38.2954 -					absolute = true;
 38.2955 -			
 38.2956 -				// Get next offsetParent
 38.2957 -				offsetParent = offsetParent.offsetParent;
 38.2958 -			}
 38.2959 -		
 38.2960 -			// Get parent scroll offsets
 38.2961 -			while ( parent.tagName && !/^body|html$/i.test(parent.tagName) ) {
 38.2962 -				// Work around opera inline/table scrollLeft/Top bug
 38.2963 -				if ( !/^inline|table-row.*$/i.test(jQuery.css(parent, "display")) )
 38.2964 -					// Subtract parent scroll offsets
 38.2965 -					add( -parent.scrollLeft, -parent.scrollTop );
 38.2966 -			
 38.2967 -				// Mozilla does not add the border for a parent that has overflow != visible
 38.2968 -				if ( mozilla && jQuery.css(parent, "overflow") != "visible" )
 38.2969 -					border( parent );
 38.2970 -			
 38.2971 -				// Get next parent
 38.2972 -				parent = parent.parentNode;
 38.2973 -			}
 38.2974 -		
 38.2975 -			// Safari doubles body offsets with an absolutely positioned element or parent
 38.2976 -			if ( safari2 && absolute )
 38.2977 -				add( -doc.body.offsetLeft, -doc.body.offsetTop );
 38.2978 -		}
 38.2979 -
 38.2980 -		// Return an object with top and left properties
 38.2981 -		results = { top: top, left: left };
 38.2982 -	}
 38.2983 -
 38.2984 -	return results;
 38.2985 -
 38.2986 -	function border(elem) {
 38.2987 -		add( jQuery.css(elem, "borderLeftWidth"), jQuery.css(elem, "borderTopWidth") );
 38.2988 -	}
 38.2989 -
 38.2990 -	function add(l, t) {
 38.2991 -		left += parseInt(l) || 0;
 38.2992 -		top += parseInt(t) || 0;
 38.2993 -	}
 38.2994 -};
 38.2995 -})();
    39.1 --- a/web/styles.css	Mon Sep 21 00:02:10 2009 +0200
    39.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    39.3 @@ -1,292 +0,0 @@
    39.4 -body {
    39.5 -  background: #f2f1f0;
    39.6 -  font-family: verdana,sans-serif;
    39.7 -}
    39.8 -
    39.9 -.navheader, .book, .preface, .chapter, .appendix, .bibliography, .navfooter, .basetemplate {
   39.10 -  width: 50em;
   39.11 -  margin-left: auto;
   39.12 -  margin-right: auto;
   39.13 -}
   39.14 -
   39.15 -a.commenttoggle:hover, a.commenttoggle:active {
   39.16 -  opacity: 0.7;
   39.17 -}
   39.18 -
   39.19 -a:hover, a:active {
   39.20 -  border-bottom: 1px solid #aaaaaa;
   39.21 -}
   39.22 -
   39.23 -.book, .preface, .chapter, .appendix, .bibliography, .basetemplate {
   39.24 -  background: white;
   39.25 -  padding: 2em;
   39.26 -}
   39.27 -
   39.28 -h1 {
   39.29 -  margin-top: 1.5em;
   39.30 -}
   39.31 -
   39.32 -span.beta {
   39.33 -  font-size: 80%;
   39.34 -  font-style: italic;
   39.35 -  opacity: 0.4;
   39.36 -}
   39.37 -
   39.38 -h2, h3 {
   39.39 -  margin-top: 2em;
   39.40 -}
   39.41 -
   39.42 -h1, h2, h3 {
   39.43 -  font-family: georgia,serif;
   39.44 -  font-weight: normal;
   39.45 -  margin-bottom: 0.5em;
   39.46 -}
   39.47 -
   39.48 -h1.booktitle {
   39.49 -  margin-bottom: 0px;
   39.50 -}
   39.51 -
   39.52 -h2.booktitle {
   39.53 -  text-align: center;
   39.54 -}
   39.55 -
   39.56 -h2.booktitle > a {
   39.57 -  color: black;
   39.58 -}
   39.59 -
   39.60 -div.authors {
   39.61 -  font-size: 80%;
   39.62 -  margin-bottom: 1em;
   39.63 -  padding-left: 0.25em;
   39.64 -}
   39.65 -
   39.66 -span.authors {
   39.67 -  font-size: 80%;
   39.68 -  opacity: 0.55;
   39.69 -  padding-left: 0.5em;
   39.70 -}
   39.71 -
   39.72 -div.note th, div.tip th, div.warning th {
   39.73 -  font-family: georgia,serif;
   39.74 -  font-weight: normal;
   39.75 -  font-size: 110%;
   39.76 -}
   39.77 -
   39.78 -div.navheader th, div.navfooter td {
   39.79 -  font-family: georgia,serif;
   39.80 -}
   39.81 -
   39.82 -div.navheader th {
   39.83 -  opacity: 0;
   39.84 -  font-size: 0;
   39.85 -}
   39.86 -
   39.87 -pre.screen {
   39.88 -  background-image: url(figs/shell.png);
   39.89 -}
   39.90 -
   39.91 -pre.programlisting {
   39.92 -  background-image: url(figs/source.png);
   39.93 -}
   39.94 -
   39.95 -pre.programlisting, pre.screen, p.remark {
   39.96 -  border-style: solid;
   39.97 -  border-width: 1px;
   39.98 -  font-size: medium;
   39.99 -  padding: 1em;
  39.100 -  background-repeat: no-repeat;
  39.101 -  background-position: 10px 10px;
  39.102 -  padding-left: 70px;
  39.103 -}
  39.104 -
  39.105 -strong.command, code, pre, span.type {
  39.106 -  font-family: monospace;
  39.107 -  font-weight: normal;
  39.108 -}
  39.109 -
  39.110 -strong.userinput > code {
  39.111 -  font-weight: bolder;
  39.112 -  color: #303030;
  39.113 -}
  39.114 -
  39.115 -div.toc > p {
  39.116 -  opacity: 0.35;
  39.117 -  font-family: georgia,serif;
  39.118 -  cursor: pointer;
  39.119 -}
  39.120 -
  39.121 -div.toc b {
  39.122 -  font-weight: normal;
  39.123 -  font-size: large;
  39.124 -}
  39.125 -
  39.126 -ul.booktoc {
  39.127 -  padding-left: 0px;
  39.128 -  list-style-type: none;
  39.129 -}
  39.130 -
  39.131 -.booktoc > li {
  39.132 -  padding: 0.5em;
  39.133 -}
  39.134 -
  39.135 -.chapinfo {
  39.136 -  float: right;
  39.137 -  color: #a0a0a0;
  39.138 -}
  39.139 -
  39.140 -.unpublished {
  39.141 -  color: #a0a0a0;
  39.142 -}
  39.143 -
  39.144 -.chapinfo img {
  39.145 -  vertical-align: -35%;
  39.146 -  border: 0px;
  39.147 -}
  39.148 -
  39.149 -.zebra_b {
  39.150 -  background: #f4f4f4;
  39.151 -}
  39.152 -
  39.153 -.book .titlepage {
  39.154 -  display: none;
  39.155 -}
  39.156 -
  39.157 -.chapter div.toc > dl {
  39.158 -  display: none;
  39.159 -}
  39.160 -
  39.161 -pre.programlisting, pre.screen, p.remark {
  39.162 -  overflow: hidden;
  39.163 -}
  39.164 -
  39.165 -p.remark {
  39.166 -  background-image: url(figs/remark.png);
  39.167 -}
  39.168 -
  39.169 -div.warning, p.remark {
  39.170 -  background-color: #FFEFE8;
  39.171 -  border-color: #e0a8a0;
  39.172 -}
  39.173 -
  39.174 -span.remark {
  39.175 -  font-style: normal;
  39.176 -  color: #707070;
  39.177 -}
  39.178 -
  39.179 -.screen {
  39.180 -  background: #e7ffc7 none repeat scroll 0% 50%;
  39.181 -  border-color: #94DA3A;
  39.182 -}
  39.183 -
  39.184 -.programlisting {
  39.185 -  background: #F0F4FF none repeat scroll 0% 50%;
  39.186 -  border-color: #B4BAEA;
  39.187 -}
  39.188 -
  39.189 -.prompt {
  39.190 -  color: #448844;
  39.191 -}
  39.192 -
  39.193 -div.note, div.tip {
  39.194 -  background: #ffffc9;
  39.195 -  border-color: #B4BAEA;
  39.196 -}
  39.197 -
  39.198 -div.note, div.warning, div.tip {
  39.199 -  border-style: solid;
  39.200 -  border-width: 1px;
  39.201 -  padding: 1em;
  39.202 -}
  39.203 -
  39.204 -.note .title {
  39.205 -  font-size: 90%;
  39.206 -}
  39.207 -
  39.208 -.comment {
  39.209 -  font-size: 80%;
  39.210 -}
  39.211 -
  39.212 -div.comment, div.new_comment {
  39.213 -  padding: 0.5em;
  39.214 -  margin: 0.5em;
  39.215 -  margin-left: 2em;
  39.216 -  border-style: solid;
  39.217 -  border-width: 1px;
  39.218 -  border-color: #aaaaff;
  39.219 -}
  39.220 -
  39.221 -div.comment {
  39.222 -  background: #eeeeff;
  39.223 -}
  39.224 -
  39.225 -div.new_comment {
  39.226 -  background: #d0d0ff;
  39.227 -}
  39.228 -
  39.229 -.commenttoggle {
  39.230 -  opacity: 0.35;
  39.231 -}
  39.232 -
  39.233 -.comment_help {
  39.234 -  font-size: 80%;
  39.235 -}
  39.236 -
  39.237 -.comment_header {
  39.238 -  opacity: 0.75;
  39.239 -}
  39.240 -
  39.241 -.comment_id {
  39.242 -  float: right;
  39.243 -  opacity: 0.3;
  39.244 -  font-size: 60%;
  39.245 -}
  39.246 -
  39.247 -.comment_name {
  39.248 -  font-weight: bolder;
  39.249 -}
  39.250 -
  39.251 -.comment_reviewed {
  39.252 -  color: darkgreen;
  39.253 -  margin-left: 1em;
  39.254 -  font-style: italic;
  39.255 -}
  39.256 -
  39.257 -.comment_date {
  39.258 -  opacity: 0.75;
  39.259 -}
  39.260 -
  39.261 -.comment_thanks {
  39.262 -  color: darkblue;
  39.263 -  margin-left: 1em;
  39.264 -  font-style: italic;
  39.265 -  font-weight: bolder;
  39.266 -}
  39.267 -
  39.268 -.comment_error {
  39.269 -  padding-left: 1em;
  39.270 -  font-weight: bolder;
  39.271 -  font-size: 80%;
  39.272 -  color: darkred;
  39.273 -}
  39.274 -
  39.275 -.hgfooter {
  39.276 -  width: 60em;
  39.277 -  margin-left: auto;
  39.278 -  margin-right: auto;
  39.279 -  margin-top: 2em;
  39.280 -  margin-bottom: 2em;
  39.281 -  font-size: 80%;
  39.282 -  color: #727272;
  39.283 -}
  39.284 -
  39.285 -.hgfooter a {
  39.286 -  color: #5555ff;
  39.287 -}
  39.288 -
  39.289 -.hgfooter a:visited {
  39.290 -  opacity: 0.7;
  39.291 -}
  39.292 -
  39.293 -.hgfooter img {
  39.294 -  vertical-align: -45%;
  39.295 -}
    40.1 Binary file web/support/icons/caution.png has changed
    41.1 Binary file web/support/icons/favicon.png has changed
    42.1 Binary file web/support/icons/important.png has changed
    43.1 Binary file web/support/icons/note.png has changed
    44.1 Binary file web/support/icons/remark.png has changed
    45.1 Binary file web/support/icons/rss.png has changed
    46.1 Binary file web/support/icons/shell.png has changed
    47.1 Binary file web/support/icons/source.png has changed
    48.1 Binary file web/support/icons/throbber.gif has changed
    49.1 Binary file web/support/icons/tip.png has changed
    50.1 Binary file web/support/icons/warning.png has changed
    51.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    51.2 +++ b/web/support/javascript/form-min.js	Tue Nov 24 11:44:49 2009 +0100
    51.3 @@ -0,0 +1,1 @@
    51.4 +(function($){$.fn.ajaxSubmit=function(_2){if(typeof _2=="function"){_2={success:_2};}_2=$.extend({url:this.attr("action")||window.location,type:this.attr("method")||"GET"},_2||{});var _3={};$.event.trigger("form.pre.serialize",[this,_2,_3]);if(_3.veto){return this;}var a=this.formToArray(_2.semantic);if(_2.data){for(var n in _2.data){a.push({name:n,value:_2.data[n]});}}if(_2.beforeSubmit&&_2.beforeSubmit(a,this,_2)===false){return this;}$.event.trigger("form.submit.validate",[a,this,_2,_3]);if(_3.veto){return this;}var q=$.param(a);if(_2.type.toUpperCase()=="GET"){_2.url+=(_2.url.indexOf("?")>=0?"&":"?")+q;_2.data=null;}else{_2.data=q;}var _7=this,callbacks=[];if(_2.resetForm){callbacks.push(function(){_7.resetForm();});}if(_2.clearForm){callbacks.push(function(){_7.clearForm();});}if(!_2.dataType&&_2.target){var _8=_2.success||function(){};callbacks.push(function(_9){if(this.evalScripts){$(_2.target).attr("innerHTML",_9).evalScripts().each(_8,arguments);}else{$(_2.target).html(_9).each(_8,arguments);}});}else{if(_2.success){callbacks.push(_2.success);}}_2.success=function(_a,_b){for(var i=0,max=callbacks.length;i<max;i++){callbacks[i](_a,_b,_7);}};var _d=$("input:file",this).fieldValue();var _e=false;for(var j=0;j<_d.length;j++){if(_d[j]){_e=true;}}if(_2.iframe||_e){fileUpload();}else{$.ajax(_2);}$.event.trigger("form.submit.notify",[this,_2]);return this;function fileUpload(){var _10=_7[0];var _11=$.extend({},$.ajaxSettings,_2);var id="jqFormIO"+$.fn.ajaxSubmit.counter++;var $io=$("<iframe id=\""+id+"\" name=\""+id+"\" />");var io=$io[0];var op8=$.browser.opera&&window.opera.version()<9;if($.browser.msie||op8){io.src="javascript:false;document.write(\"\");";}$io.css({position:"absolute",top:"-1000px",left:"-1000px"});var xhr={responseText:null,responseXML:null,status:0,statusText:"n/a",getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){}};var g=_11.global;if(g&&!$.active++){$.event.trigger("ajaxStart");}if(g){$.event.trigger("ajaxSend",[xhr,_11]);}var _18=0;var _19=0;setTimeout(function(){$io.appendTo("body");io.attachEvent?io.attachEvent("onload",cb):io.addEventListener("load",cb,false);var _1a=_10.encoding?"encoding":"enctype";var t=_7.attr("target");_7.attr({target:id,method:"POST",action:_11.url});_10[_1a]="multipart/form-data";if(_11.timeout){setTimeout(function(){_19=true;cb();},_11.timeout);}_10.submit();_7.attr("target",t);},10);function cb(){if(_18++){return;}io.detachEvent?io.detachEvent("onload",cb):io.removeEventListener("load",cb,false);var ok=true;try{if(_19){throw "timeout";}var _1d,doc;doc=io.contentWindow?io.contentWindow.document:io.contentDocument?io.contentDocument:io.document;xhr.responseText=doc.body?doc.body.innerHTML:null;xhr.responseXML=doc.XMLDocument?doc.XMLDocument:doc;if(_11.dataType=="json"||_11.dataType=="script"){var ta=doc.getElementsByTagName("textarea")[0];_1d=ta?ta.value:xhr.responseText;if(_11.dataType=="json"){eval("data = "+_1d);}else{$.globalEval(_1d);}}else{if(_11.dataType=="xml"){_1d=xhr.responseXML;if(!_1d&&xhr.responseText!=null){_1d=toXml(xhr.responseText);}}else{_1d=xhr.responseText;}}}catch(e){ok=false;$.handleError(_11,xhr,"error",e);}if(ok){_11.success(_1d,"success");if(g){$.event.trigger("ajaxSuccess",[xhr,_11]);}}if(g){$.event.trigger("ajaxComplete",[xhr,_11]);}if(g&&!--$.active){$.event.trigger("ajaxStop");}if(_11.complete){_11.complete(xhr,ok?"success":"error");}setTimeout(function(){$io.remove();xhr.responseXML=null;},100);}function toXml(s,doc){if(window.ActiveXObject){doc=new ActiveXObject("Microsoft.XMLDOM");doc.async="false";doc.loadXML(s);}else{doc=(new DOMParser()).parseFromString(s,"text/xml");}return (doc&&doc.documentElement&&doc.documentElement.tagName!="parsererror")?doc:null;}}};$.fn.ajaxSubmit.counter=0;$.fn.ajaxForm=function(_21){return this.ajaxFormUnbind().submit(submitHandler).each(function(){this.formPluginId=$.fn.ajaxForm.counter++;$.fn.ajaxForm.optionHash[this.formPluginId]=_21;$(":submit,input:image",this).click(clickHandler);});};$.fn.ajaxForm.counter=1;$.fn.ajaxForm.optionHash={};function clickHandler(e){var _23=this.form;_23.clk=this;if(this.type=="image"){if(e.offsetX!=undefined){_23.clk_x=e.offsetX;_23.clk_y=e.offsetY;}else{if(typeof $.fn.offset=="function"){var _24=$(this).offset();_23.clk_x=e.pageX-_24.left;_23.clk_y=e.pageY-_24.top;}else{_23.clk_x=e.pageX-this.offsetLeft;_23.clk_y=e.pageY-this.offsetTop;}}}setTimeout(function(){_23.clk=_23.clk_x=_23.clk_y=null;},10);}function submitHandler(){var id=this.formPluginId;var _26=$.fn.ajaxForm.optionHash[id];$(this).ajaxSubmit(_26);return false;}$.fn.ajaxFormUnbind=function(){this.unbind("submit",submitHandler);return this.each(function(){$(":submit,input:image",this).unbind("click",clickHandler);});};$.fn.formToArray=function(_27){var a=[];if(this.length==0){return a;}var _29=this[0];var els=_27?_29.getElementsByTagName("*"):_29.elements;if(!els){return a;}for(var i=0,max=els.length;i<max;i++){var el=els[i];var n=el.name;if(!n){continue;}if(_27&&_29.clk&&el.type=="image"){if(!el.disabled&&_29.clk==el){a.push({name:n+".x",value:_29.clk_x},{name:n+".y",value:_29.clk_y});}continue;}var v=$.fieldValue(el,true);if(v&&v.constructor==Array){for(var j=0,jmax=v.length;j<jmax;j++){a.push({name:n,value:v[j]});}}else{if(v!==null&&typeof v!="undefined"){a.push({name:n,value:v});}}}if(!_27&&_29.clk){var _30=_29.getElementsByTagName("input");for(var i=0,max=_30.length;i<max;i++){var _32=_30[i];var n=_32.name;if(n&&!_32.disabled&&_32.type=="image"&&_29.clk==_32){a.push({name:n+".x",value:_29.clk_x},{name:n+".y",value:_29.clk_y});}}}return a;};$.fn.formSerialize=function(_34){return $.param(this.formToArray(_34));};$.fn.fieldSerialize=function(_35){var a=[];this.each(function(){var n=this.name;if(!n){return;}var v=$.fieldValue(this,_35);if(v&&v.constructor==Array){for(var i=0,max=v.length;i<max;i++){a.push({name:n,value:v[i]});}}else{if(v!==null&&typeof v!="undefined"){a.push({name:this.name,value:v});}}});return $.param(a);};$.fn.fieldValue=function(_3a){for(var val=[],i=0,max=this.length;i<max;i++){var el=this[i];var v=$.fieldValue(el,_3a);if(v===null||typeof v=="undefined"||(v.constructor==Array&&!v.length)){continue;}v.constructor==Array?$.merge(val,v):val.push(v);}return val;};$.fieldValue=function(el,_3f){var n=el.name,t=el.type,tag=el.tagName.toLowerCase();if(typeof _3f=="undefined"){_3f=true;}if(_3f&&(!n||el.disabled||t=="reset"||t=="button"||(t=="checkbox"||t=="radio")&&!el.checked||(t=="submit"||t=="image")&&el.form&&el.form.clk!=el||tag=="select"&&el.selectedIndex==-1)){return null;}if(tag=="select"){var _41=el.selectedIndex;if(_41<0){return null;}var a=[],ops=el.options;var one=(t=="select-one");var max=(one?_41+1:ops.length);for(var i=(one?_41:0);i<max;i++){var op=ops[i];if(op.selected){var v=$.browser.msie&&!(op.attributes["value"].specified)?op.text:op.value;if(one){return v;}a.push(v);}}return a;}return el.value;};$.fn.clearForm=function(){return this.each(function(){$("input,select,textarea",this).clearFields();});};$.fn.clearFields=$.fn.clearInputs=function(){return this.each(function(){var t=this.type,tag=this.tagName.toLowerCase();if(t=="text"||t=="password"||tag=="textarea"){this.value="";}else{if(t=="checkbox"||t=="radio"){this.checked=false;}else{if(tag=="select"){this.selectedIndex=-1;}}}});};$.fn.resetForm=function(){return this.each(function(){if(typeof this.reset=="function"||(typeof this.reset=="object"&&!this.reset.nodeType)){this.reset();}});};})(jQuery);
    51.5 \ No newline at end of file
    52.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    52.2 +++ b/web/support/javascript/form.js	Tue Nov 24 11:44:49 2009 +0100
    52.3 @@ -0,0 +1,819 @@
    52.4 +/*
    52.5 + * jQuery Form Plugin
    52.6 + * @requires jQuery v1.1 or later
    52.7 + *
    52.8 + * Examples at: http://malsup.com/jquery/form/
    52.9 + * Dual licensed under the MIT and GPL licenses:
   52.10 + *   http://www.opensource.org/licenses/mit-license.php
   52.11 + *   http://www.gnu.org/licenses/gpl.html
   52.12 + *
   52.13 + * Revision: $Id$
   52.14 + */
   52.15 + (function($) {
   52.16 +/**
   52.17 + * ajaxSubmit() provides a mechanism for submitting an HTML form using AJAX.
   52.18 + *
   52.19 + * ajaxSubmit accepts a single argument which can be either a success callback function
   52.20 + * or an options Object.  If a function is provided it will be invoked upon successful
   52.21 + * completion of the submit and will be passed the response from the server.
   52.22 + * If an options Object is provided, the following attributes are supported:
   52.23 + *
   52.24 + *  target:   Identifies the element(s) in the page to be updated with the server response.
   52.25 + *            This value may be specified as a jQuery selection string, a jQuery object,
   52.26 + *            or a DOM element.
   52.27 + *            default value: null
   52.28 + *
   52.29 + *  url:      URL to which the form data will be submitted.
   52.30 + *            default value: value of form's 'action' attribute
   52.31 + *
   52.32 + *  type:     The method in which the form data should be submitted, 'GET' or 'POST'.
   52.33 + *            default value: value of form's 'method' attribute (or 'GET' if none found)
   52.34 + *
   52.35 + *  data:     Additional data to add to the request, specified as key/value pairs (see $.ajax).
   52.36 + *
   52.37 + *  beforeSubmit:  Callback method to be invoked before the form is submitted.
   52.38 + *            default value: null
   52.39 + *
   52.40 + *  success:  Callback method to be invoked after the form has been successfully submitted
   52.41 + *            and the response has been returned from the server
   52.42 + *            default value: null
   52.43 + *
   52.44 + *  dataType: Expected dataType of the response.  One of: null, 'xml', 'script', or 'json'
   52.45 + *            default value: null
   52.46 + *
   52.47 + *  semantic: Boolean flag indicating whether data must be submitted in semantic order (slower).
   52.48 + *            default value: false
   52.49 + *
   52.50 + *  resetForm: Boolean flag indicating whether the form should be reset if the submit is successful
   52.51 + *
   52.52 + *  clearForm: Boolean flag indicating whether the form should be cleared if the submit is successful
   52.53 + *
   52.54 + *
   52.55 + * The 'beforeSubmit' callback can be provided as a hook for running pre-submit logic or for
   52.56 + * validating the form data.  If the 'beforeSubmit' callback returns false then the form will
   52.57 + * not be submitted. The 'beforeSubmit' callback is invoked with three arguments: the form data
   52.58 + * in array format, the jQuery object, and the options object passed into ajaxSubmit.
   52.59 + * The form data array takes the following form:
   52.60 + *
   52.61 + *     [ { name: 'username', value: 'jresig' }, { name: 'password', value: 'secret' } ]
   52.62 + *
   52.63 + * If a 'success' callback method is provided it is invoked after the response has been returned
   52.64 + * from the server.  It is passed the responseText or responseXML value (depending on dataType).
   52.65 + * See jQuery.ajax for further details.
   52.66 + *
   52.67 + *
   52.68 + * The dataType option provides a means for specifying how the server response should be handled.
   52.69 + * This maps directly to the jQuery.httpData method.  The following values are supported:
   52.70 + *
   52.71 + *      'xml':    if dataType == 'xml' the server response is treated as XML and the 'success'
   52.72 + *                   callback method, if specified, will be passed the responseXML value
   52.73 + *      'json':   if dataType == 'json' the server response will be evaluted and passed to
   52.74 + *                   the 'success' callback, if specified
   52.75 + *      'script': if dataType == 'script' the server response is evaluated in the global context
   52.76 + *
   52.77 + *
   52.78 + * Note that it does not make sense to use both the 'target' and 'dataType' options.  If both
   52.79 + * are provided the target will be ignored.
   52.80 + *
   52.81 + * The semantic argument can be used to force form serialization in semantic order.
   52.82 + * This is normally true anyway, unless the form contains input elements of type='image'.
   52.83 + * If your form must be submitted with name/value pairs in semantic order and your form
   52.84 + * contains an input of type='image" then pass true for this arg, otherwise pass false
   52.85 + * (or nothing) to avoid the overhead for this logic.
   52.86 + *
   52.87 + *
   52.88 + * When used on its own, ajaxSubmit() is typically bound to a form's submit event like this:
   52.89 + *
   52.90 + * $("#form-id").submit(function() {
   52.91 + *     $(this).ajaxSubmit(options);
   52.92 + *     return false; // cancel conventional submit
   52.93 + * });
   52.94 + *
   52.95 + * When using ajaxForm(), however, this is done for you.
   52.96 + *
   52.97 + * @example
   52.98 + * $('#myForm').ajaxSubmit(function(data) {
   52.99 + *     alert('Form submit succeeded! Server returned: ' + data);
  52.100 + * });
  52.101 + * @desc Submit form and alert server response
  52.102 + *
  52.103 + *
  52.104 + * @example
  52.105 + * var options = {
  52.106 + *     target: '#myTargetDiv'
  52.107 + * };
  52.108 + * $('#myForm').ajaxSubmit(options);
  52.109 + * @desc Submit form and update page element with server response
  52.110 + *
  52.111 + *
  52.112 + * @example
  52.113 + * var options = {
  52.114 + *     success: function(responseText) {
  52.115 + *         alert(responseText);
  52.116 + *     }
  52.117 + * };
  52.118 + * $('#myForm').ajaxSubmit(options);
  52.119 + * @desc Submit form and alert the server response
  52.120 + *
  52.121 + *
  52.122 + * @example
  52.123 + * var options = {
  52.124 + *     beforeSubmit: function(formArray, jqForm) {
  52.125 + *         if (formArray.length == 0) {
  52.126 + *             alert('Please enter data.');
  52.127 + *             return false;
  52.128 + *         }
  52.129 + *     }
  52.130 + * };
  52.131 + * $('#myForm').ajaxSubmit(options);
  52.132 + * @desc Pre-submit validation which aborts the submit operation if form data is empty
  52.133 + *
  52.134 + *
  52.135 + * @example
  52.136 + * var options = {
  52.137 + *     url: myJsonUrl.php,
  52.138 + *     dataType: 'json',
  52.139 + *     success: function(data) {
  52.140 + *        // 'data' is an object representing the the evaluated json data
  52.141 + *     }
  52.142 + * };
  52.143 + * $('#myForm').ajaxSubmit(options);
  52.144 + * @desc json data returned and evaluated
  52.145 + *
  52.146 + *
  52.147 + * @example
  52.148 + * var options = {
  52.149 + *     url: myXmlUrl.php,
  52.150 + *     dataType: 'xml',
  52.151 + *     success: function(responseXML) {
  52.152 + *        // responseXML is XML document object
  52.153 + *        var data = $('myElement', responseXML).text();
  52.154 + *     }
  52.155 + * };
  52.156 + * $('#myForm').ajaxSubmit(options);
  52.157 + * @desc XML data returned from server
  52.158 + *
  52.159 + *
  52.160 + * @example
  52.161 + * var options = {
  52.162 + *     resetForm: true
  52.163 + * };
  52.164 + * $('#myForm').ajaxSubmit(options);
  52.165 + * @desc submit form and reset it if successful
  52.166 + *
  52.167 + * @example
  52.168 + * $('#myForm).submit(function() {
  52.169 + *    $(this).ajaxSubmit();
  52.170 + *    return false;
  52.171 + * });
  52.172 + * @desc Bind form's submit event to use ajaxSubmit
  52.173 + *
  52.174 + *
  52.175 + * @name ajaxSubmit
  52.176 + * @type jQuery
  52.177 + * @param options  object literal containing options which control the form submission process
  52.178 + * @cat Plugins/Form
  52.179 + * @return jQuery
  52.180 + */
  52.181 +$.fn.ajaxSubmit = function(options) {
  52.182 +    if (typeof options == 'function')
  52.183 +        options = { success: options };
  52.184 +
  52.185 +    options = $.extend({
  52.186 +        url:  this.attr('action') || window.location,
  52.187 +        type: this.attr('method') || 'GET'
  52.188 +    }, options || {});
  52.189 +
  52.190 +    // hook for manipulating the form data before it is extracted;
  52.191 +    // convenient for use with rich editors like tinyMCE or FCKEditor
  52.192 +    var veto = {};
  52.193 +    $.event.trigger('form.pre.serialize', [this, options, veto]);
  52.194 +    if (veto.veto) return this;
  52.195 +
  52.196 +    var a = this.formToArray(options.semantic);
  52.197 +	if (options.data) {
  52.198 +	    for (var n in options.data)
  52.199 +	        a.push( { name: n, value: options.data[n] } );
  52.200 +	}
  52.201 +
  52.202 +    // give pre-submit callback an opportunity to abort the submit
  52.203 +    if (options.beforeSubmit && options.beforeSubmit(a, this, options) === false) return this;
  52.204 +
  52.205 +    // fire vetoable 'validate' event
  52.206 +    $.event.trigger('form.submit.validate', [a, this, options, veto]);
  52.207 +    if (veto.veto) return this;
  52.208 +
  52.209 +    var q = $.param(a);//.replace(/%20/g,'+');
  52.210 +
  52.211 +    if (options.type.toUpperCase() == 'GET') {
  52.212 +        options.url += (options.url.indexOf('?') >= 0 ? '&' : '?') + q;
  52.213 +        options.data = null;  // data is null for 'get'
  52.214 +    }
  52.215 +    else
  52.216 +        options.data = q; // data is the query string for 'post'
  52.217 +
  52.218 +    var $form = this, callbacks = [];
  52.219 +    if (options.resetForm) callbacks.push(function() { $form.resetForm(); });
  52.220 +    if (options.clearForm) callbacks.push(function() { $form.clearForm(); });
  52.221 +
  52.222 +    // perform a load on the target only if dataType is not provided
  52.223 +    if (!options.dataType && options.target) {
  52.224 +        var oldSuccess = options.success || function(){};
  52.225 +        callbacks.push(function(data) {
  52.226 +            if (this.evalScripts)
  52.227 +                $(options.target).attr("innerHTML", data).evalScripts().each(oldSuccess, arguments);
  52.228 +            else // jQuery v1.1.4
  52.229 +                $(options.target).html(data).each(oldSuccess, arguments);
  52.230 +        });
  52.231 +    }
  52.232 +    else if (options.success)
  52.233 +        callbacks.push(options.success);
  52.234 +
  52.235 +    options.success = function(data, status) {
  52.236 +        for (var i=0, max=callbacks.length; i < max; i++)
  52.237 +            callbacks[i](data, status, $form);
  52.238 +    };
  52.239 +
  52.240 +    // are there files to upload?
  52.241 +    var files = $('input:file', this).fieldValue();
  52.242 +    var found = false;
  52.243 +    for (var j=0; j < files.length; j++)
  52.244 +        if (files[j])
  52.245 +            found = true;
  52.246 +
  52.247 +    if (options.iframe || found) // options.iframe allows user to force iframe mode
  52.248 +        fileUpload();
  52.249 +    else
  52.250 +        $.ajax(options);
  52.251 +
  52.252 +    // fire 'notify' event
  52.253 +    $.event.trigger('form.submit.notify', [this, options]);
  52.254 +    return this;
  52.255 +
  52.256 +
  52.257 +    // private function for handling file uploads (hat tip to YAHOO!)
  52.258 +    function fileUpload() {
  52.259 +        var form = $form[0];
  52.260 +        var opts = $.extend({}, $.ajaxSettings, options);
  52.261 +
  52.262 +        var id = 'jqFormIO' + $.fn.ajaxSubmit.counter++;
  52.263 +        var $io = $('<iframe id="' + id + '" name="' + id + '" />');
  52.264 +        var io = $io[0];
  52.265 +        var op8 = $.browser.opera && window.opera.version() < 9;
  52.266 +        if ($.browser.msie || op8) io.src = 'javascript:false;document.write("");';
  52.267 +        $io.css({ position: 'absolute', top: '-1000px', left: '-1000px' });
  52.268 +
  52.269 +        var xhr = { // mock object
  52.270 +            responseText: null,
  52.271 +            responseXML: null,
  52.272 +            status: 0,
  52.273 +            statusText: 'n/a',
  52.274 +            getAllResponseHeaders: function() {},
  52.275 +            getResponseHeader: function() {},
  52.276 +            setRequestHeader: function() {}
  52.277 +        };
  52.278 +
  52.279 +        var g = opts.global;
  52.280 +        // trigger ajax global events so that activity/block indicators work like normal
  52.281 +        if (g && ! $.active++) $.event.trigger("ajaxStart");
  52.282 +        if (g) $.event.trigger("ajaxSend", [xhr, opts]);
  52.283 +
  52.284 +        var cbInvoked = 0;
  52.285 +        var timedOut = 0;
  52.286 +
  52.287 +        // take a breath so that pending repaints get some cpu time before the upload starts
  52.288 +        setTimeout(function() {
  52.289 +            $io.appendTo('body');
  52.290 +            // jQuery's event binding doesn't work for iframe events in IE
  52.291 +            io.attachEvent ? io.attachEvent('onload', cb) : io.addEventListener('load', cb, false);
  52.292 +
  52.293 +            // make sure form attrs are set
  52.294 +            var encAttr = form.encoding ? 'encoding' : 'enctype';
  52.295 +            var t = $form.attr('target');
  52.296 +            $form.attr({
  52.297 +                target:   id,
  52.298 +                method:  'POST',
  52.299 +                action:   opts.url
  52.300 +            });
  52.301 +            form[encAttr] = 'multipart/form-data';
  52.302 +
  52.303 +            // support timout
  52.304 +            if (opts.timeout)
  52.305 +                setTimeout(function() { timedOut = true; cb(); }, opts.timeout);
  52.306 +
  52.307 +            form.submit();
  52.308 +            $form.attr('target', t); // reset target
  52.309 +        }, 10);
  52.310 +
  52.311 +        function cb() {
  52.312 +            if (cbInvoked++) return;
  52.313 +
  52.314 +            io.detachEvent ? io.detachEvent('onload', cb) : io.removeEventListener('load', cb, false);
  52.315 +
  52.316 +            var ok = true;
  52.317 +            try {
  52.318 +                if (timedOut) throw 'timeout';
  52.319 +                // extract the server response from the iframe
  52.320 +                var data, doc;
  52.321 +                doc = io.contentWindow ? io.contentWindow.document : io.contentDocument ? io.contentDocument : io.document;
  52.322 +                xhr.responseText = doc.body ? doc.body.innerHTML : null;
  52.323 +                xhr.responseXML = doc.XMLDocument ? doc.XMLDocument : doc;
  52.324 +
  52.325 +                if (opts.dataType == 'json' || opts.dataType == 'script') {
  52.326 +                    var ta = doc.getElementsByTagName('textarea')[0];
  52.327 +                    data = ta ? ta.value : xhr.responseText;
  52.328 +                    if (opts.dataType == 'json')
  52.329 +                        eval("data = " + data);
  52.330 +                    else
  52.331 +                        $.globalEval(data);
  52.332 +                }
  52.333 +                else if (opts.dataType == 'xml') {
  52.334 +                    data = xhr.responseXML;
  52.335 +                    if (!data && xhr.responseText != null)
  52.336 +                        data = toXml(xhr.responseText);
  52.337 +                }
  52.338 +                else {
  52.339 +                    data = xhr.responseText;
  52.340 +                }
  52.341 +            }
  52.342 +            catch(e){
  52.343 +                ok = false;
  52.344 +                $.handleError(opts, xhr, 'error', e);
  52.345 +            }
  52.346 +
  52.347 +            // ordering of these callbacks/triggers is odd, but that's how $.ajax does it
  52.348 +            if (ok) {
  52.349 +                opts.success(data, 'success');
  52.350 +                if (g) $.event.trigger("ajaxSuccess", [xhr, opts]);
  52.351 +            }
  52.352 +            if (g) $.event.trigger("ajaxComplete", [xhr, opts]);
  52.353 +            if (g && ! --$.active) $.event.trigger("ajaxStop");
  52.354 +            if (opts.complete) opts.complete(xhr, ok ? 'success' : 'error');
  52.355 +
  52.356 +            // clean up
  52.357 +            setTimeout(function() {
  52.358 +                $io.remove();
  52.359 +                xhr.responseXML = null;
  52.360 +            }, 100);
  52.361 +        };
  52.362 +
  52.363 +        function toXml(s, doc) {
  52.364 +            if (window.ActiveXObject) {
  52.365 +                doc = new ActiveXObject('Microsoft.XMLDOM');
  52.366 +                doc.async = 'false';
  52.367 +                doc.loadXML(s);
  52.368 +            }
  52.369 +            else
  52.370 +                doc = (new DOMParser()).parseFromString(s, 'text/xml');
  52.371 +            return (doc && doc.documentElement && doc.documentElement.tagName != 'parsererror') ? doc : null;
  52.372 +        };
  52.373 +    };
  52.374 +};
  52.375 +$.fn.ajaxSubmit.counter = 0; // used to create unique iframe ids
  52.376 +
  52.377 +/**
  52.378 + * ajaxForm() provides a mechanism for fully automating form submission.
  52.379 + *
  52.380 + * The advantages of using this method instead of ajaxSubmit() are:
  52.381 + *
  52.382 + * 1: This method will include coordinates for <input type="image" /> elements (if the element
  52.383 + *    is used to submit the form).
  52.384 + * 2. This method will include the submit element's name/value data (for the element that was
  52.385 + *    used to submit the form).
  52.386 + * 3. This method binds the submit() method to the form for you.
  52.387 + *
  52.388 + * Note that for accurate x/y coordinates of image submit elements in all browsers
  52.389 + * you need to also use the "dimensions" plugin (this method will auto-detect its presence).
  52.390 + *
  52.391 + * The options argument for ajaxForm works exactly as it does for ajaxSubmit.  ajaxForm merely
  52.392 + * passes the options argument along after properly binding events for submit elements and
  52.393 + * the form itself.  See ajaxSubmit for a full description of the options argument.
  52.394 + *
  52.395 + *
  52.396 + * @example
  52.397 + * var options = {
  52.398 + *     target: '#myTargetDiv'
  52.399 + * };
  52.400 + * $('#myForm').ajaxSForm(options);
  52.401 + * @desc Bind form's submit event so that 'myTargetDiv' is updated with the server response
  52.402 + *       when the form is submitted.
  52.403 + *
  52.404 + *
  52.405 + * @example
  52.406 + * var options = {
  52.407 + *     success: function(responseText) {
  52.408 + *         alert(responseText);
  52.409 + *     }
  52.410 + * };
  52.411 + * $('#myForm').ajaxSubmit(options);
  52.412 + * @desc Bind form's submit event so that server response is alerted after the form is submitted.
  52.413 + *
  52.414 + *
  52.415 + * @example
  52.416 + * var options = {
  52.417 + *     beforeSubmit: function(formArray, jqForm) {
  52.418 + *         if (formArray.length == 0) {
  52.419 + *             alert('Please enter data.');
  52.420 + *             return false;
  52.421 + *         }
  52.422 + *     }
  52.423 + * };
  52.424 + * $('#myForm').ajaxSubmit(options);
  52.425 + * @desc Bind form's submit event so that pre-submit callback is invoked before the form
  52.426 + *       is submitted.
  52.427 + *
  52.428 + *
  52.429 + * @name   ajaxForm
  52.430 + * @param  options  object literal containing options which control the form submission process
  52.431 + * @return jQuery
  52.432 + * @cat    Plugins/Form
  52.433 + * @type   jQuery
  52.434 + */
  52.435 +$.fn.ajaxForm = function(options) {
  52.436 +    return this.ajaxFormUnbind().submit(submitHandler).each(function() {
  52.437 +        // store options in hash
  52.438 +        this.formPluginId = $.fn.ajaxForm.counter++;
  52.439 +        $.fn.ajaxForm.optionHash[this.formPluginId] = options;
  52.440 +        $(":submit,input:image", this).click(clickHandler);
  52.441 +    });
  52.442 +};
  52.443 +
  52.444 +$.fn.ajaxForm.counter = 1;
  52.445 +$.fn.ajaxForm.optionHash = {};
  52.446 +
  52.447 +function clickHandler(e) {
  52.448 +    var $form = this.form;
  52.449 +    $form.clk = this;
  52.450 +    if (this.type == 'image') {
  52.451 +        if (e.offsetX != undefined) {
  52.452 +            $form.clk_x = e.offsetX;
  52.453 +            $form.clk_y = e.offsetY;
  52.454 +        } else if (typeof $.fn.offset == 'function') { // try to use dimensions plugin
  52.455 +            var offset = $(this).offset();
  52.456 +            $form.clk_x = e.pageX - offset.left;
  52.457 +            $form.clk_y = e.pageY - offset.top;
  52.458 +        } else {
  52.459 +            $form.clk_x = e.pageX - this.offsetLeft;
  52.460 +            $form.clk_y = e.pageY - this.offsetTop;
  52.461 +        }
  52.462 +    }
  52.463 +    // clear form vars
  52.464 +    setTimeout(function() { $form.clk = $form.clk_x = $form.clk_y = null; }, 10);
  52.465 +};
  52.466 +
  52.467 +function submitHandler() {
  52.468 +    // retrieve options from hash
  52.469 +    var id = this.formPluginId;
  52.470 +    var options = $.fn.ajaxForm.optionHash[id];
  52.471 +    $(this).ajaxSubmit(options);
  52.472 +    return false;
  52.473 +};
  52.474 +
  52.475 +/**
  52.476 + * ajaxFormUnbind unbinds the event handlers that were bound by ajaxForm
  52.477 + *
  52.478 + * @name   ajaxFormUnbind
  52.479 + * @return jQuery
  52.480 + * @cat    Plugins/Form
  52.481 + * @type   jQuery
  52.482 + */
  52.483 +$.fn.ajaxFormUnbind = function() {
  52.484 +    this.unbind('submit', submitHandler);
  52.485 +    return this.each(function() {
  52.486 +        $(":submit,input:image", this).unbind('click', clickHandler);
  52.487 +    });
  52.488 +
  52.489 +};
  52.490 +
  52.491 +/**
  52.492 + * formToArray() gathers form element data into an array of objects that can
  52.493 + * be passed to any of the following ajax functions: $.get, $.post, or load.
  52.494 + * Each object in the array has both a 'name' and 'value' property.  An example of
  52.495 + * an array for a simple login form might be:
  52.496 + *
  52.497 + * [ { name: 'username', value: 'jresig' }, { name: 'password', value: 'secret' } ]
  52.498 + *
  52.499 + * It is this array that is passed to pre-submit callback functions provided to the
  52.500 + * ajaxSubmit() and ajaxForm() methods.
  52.501 + *
  52.502 + * The semantic argument can be used to force form serialization in semantic order.
  52.503 + * This is normally true anyway, unless the form contains input elements of type='image'.
  52.504 + * If your form must be submitted with name/value pairs in semantic order and your form
  52.505 + * contains an input of type='image" then pass true for this arg, otherwise pass false
  52.506 + * (or nothing) to avoid the overhead for this logic.
  52.507 + *
  52.508 + * @example var data = $("#myForm").formToArray();
  52.509 + * $.post( "myscript.cgi", data );
  52.510 + * @desc Collect all the data from a form and submit it to the server.
  52.511 + *
  52.512 + * @name formToArray
  52.513 + * @param semantic true if serialization must maintain strict semantic ordering of elements (slower)
  52.514 + * @type Array<Object>
  52.515 + * @cat Plugins/Form
  52.516 + */
  52.517 +$.fn.formToArray = function(semantic) {
  52.518 +    var a = [];
  52.519 +    if (this.length == 0) return a;
  52.520 +
  52.521 +    var form = this[0];
  52.522 +    var els = semantic ? form.getElementsByTagName('*') : form.elements;
  52.523 +    if (!els) return a;
  52.524 +    for(var i=0, max=els.length; i < max; i++) {
  52.525 +        var el = els[i];
  52.526 +        var n = el.name;
  52.527 +        if (!n) continue;
  52.528 +
  52.529 +        if (semantic && form.clk && el.type == "image") {
  52.530 +            // handle image inputs on the fly when semantic == true
  52.531 +            if(!el.disabled && form.clk == el)
  52.532 +                a.push({name: n+'.x', value: form.clk_x}, {name: n+'.y', value: form.clk_y});
  52.533 +            continue;
  52.534 +        }
  52.535 +
  52.536 +        var v = $.fieldValue(el, true);
  52.537 +        if (v && v.constructor == Array) {
  52.538 +            for(var j=0, jmax=v.length; j < jmax; j++)
  52.539 +                a.push({name: n, value: v[j]});
  52.540 +        }
  52.541 +        else if (v !== null && typeof v != 'undefined')
  52.542 +            a.push({name: n, value: v});
  52.543 +    }
  52.544 +
  52.545 +    if (!semantic && form.clk) {
  52.546 +        // input type=='image' are not found in elements array! handle them here
  52.547 +        var inputs = form.getElementsByTagName("input");
  52.548 +        for(var i=0, max=inputs.length; i < max; i++) {
  52.549 +            var input = inputs[i];
  52.550 +            var n = input.name;
  52.551 +            if(n && !input.disabled && input.type == "image" && form.clk == input)
  52.552 +                a.push({name: n+'.x', value: form.clk_x}, {name: n+'.y', value: form.clk_y});
  52.553 +        }
  52.554 +    }
  52.555 +    return a;
  52.556 +};
  52.557 +
  52.558 +
  52.559 +/**
  52.560 + * Serializes form data into a 'submittable' string. This method will return a string
  52.561 + * in the format: name1=value1&amp;name2=value2
  52.562 + *
  52.563 + * The semantic argument can be used to force form serialization in semantic order.
  52.564 + * If your form must be submitted with name/value pairs in semantic order then pass
  52.565 + * true for this arg, otherwise pass false (or nothing) to avoid the overhead for
  52.566 + * this logic (which can be significant for very large forms).
  52.567 + *
  52.568 + * @example var data = $("#myForm").formSerialize();
  52.569 + * $.ajax('POST', "myscript.cgi", data);
  52.570 + * @desc Collect all the data from a form into a single string
  52.571 + *
  52.572 + * @name formSerialize
  52.573 + * @param semantic true if serialization must maintain strict semantic ordering of elements (slower)
  52.574 + * @type String
  52.575 + * @cat Plugins/Form
  52.576 + */
  52.577 +$.fn.formSerialize = function(semantic) {
  52.578 +    //hand off to jQuery.param for proper encoding
  52.579 +    return $.param(this.formToArray(semantic));
  52.580 +};
  52.581 +
  52.582 +
  52.583 +/**
  52.584 + * Serializes all field elements in the jQuery object into a query string.
  52.585 + * This method will return a string in the format: name1=value1&amp;name2=value2
  52.586 + *
  52.587 + * The successful argument controls whether or not serialization is limited to
  52.588 + * 'successful' controls (per http://www.w3.org/TR/html4/interact/forms.html#successful-controls).
  52.589 + * The default value of the successful argument is true.
  52.590 + *
  52.591 + * @example var data = $("input").formSerialize();
  52.592 + * @desc Collect the data from all successful input elements into a query string
  52.593 + *
  52.594 + * @example var data = $(":radio").formSerialize();
  52.595 + * @desc Collect the data from all successful radio input elements into a query string
  52.596 + *
  52.597 + * @example var data = $("#myForm :checkbox").formSerialize();
  52.598 + * @desc Collect the data from all successful checkbox input elements in myForm into a query string
  52.599 + *
  52.600 + * @example var data = $("#myForm :checkbox").formSerialize(false);
  52.601 + * @desc Collect the data from all checkbox elements in myForm (even the unchecked ones) into a query string
  52.602 + *
  52.603 + * @example var data = $(":input").formSerialize();
  52.604 + * @desc Collect the data from all successful input, select, textarea and button elements into a query string
  52.605 + *
  52.606 + * @name fieldSerialize
  52.607 + * @param successful true if only successful controls should be serialized (default is true)
  52.608 + * @type String
  52.609 + * @cat Plugins/Form
  52.610 + */
  52.611 +$.fn.fieldSerialize = function(successful) {
  52.612 +    var a = [];
  52.613 +    this.each(function() {
  52.614 +        var n = this.name;
  52.615 +        if (!n) return;
  52.616 +        var v = $.fieldValue(this, successful);
  52.617 +        if (v && v.constructor == Array) {
  52.618 +            for (var i=0,max=v.length; i < max; i++)
  52.619 +                a.push({name: n, value: v[i]});
  52.620 +        }
  52.621 +        else if (v !== null && typeof v != 'undefined')
  52.622 +            a.push({name: this.name, value: v});
  52.623 +    });
  52.624 +    //hand off to jQuery.param for proper encoding
  52.625 +    return $.param(a);
  52.626 +};
  52.627 +
  52.628 +
  52.629 +/**
  52.630 + * Returns the value(s) of the element in the matched set.  For example, consider the following form:
  52.631 + *
  52.632 + *  <form><fieldset>
  52.633 + *      <input name="A" type="text" />
  52.634 + *      <input name="A" type="text" />
  52.635 + *      <input name="B" type="checkbox" value="B1" />
  52.636 + *      <input name="B" type="checkbox" value="B2"/>
  52.637 + *      <input name="C" type="radio" value="C1" />
  52.638 + *      <input name="C" type="radio" value="C2" />
  52.639 + *  </fieldset></form>
  52.640 + *
  52.641 + *  var v = $(':text').fieldValue();
  52.642 + *  // if no values are entered into the text inputs
  52.643 + *  v == ['','']
  52.644 + *  // if values entered into the text inputs are 'foo' and 'bar'
  52.645 + *  v == ['foo','bar']
  52.646 + *
  52.647 + *  var v = $(':checkbox').fieldValue();
  52.648 + *  // if neither checkbox is checked
  52.649 + *  v === undefined
  52.650 + *  // if both checkboxes are checked
  52.651 + *  v == ['B1', 'B2']
  52.652 + *
  52.653 + *  var v = $(':radio').fieldValue();
  52.654 + *  // if neither radio is checked
  52.655 + *  v === undefined
  52.656 + *  // if first radio is checked
  52.657 + *  v == ['C1']
  52.658 + *
  52.659 + * The successful argument controls whether or not the field element must be 'successful'
  52.660 + * (per http://www.w3.org/TR/html4/interact/forms.html#successful-controls).
  52.661 + * The default value of the successful argument is true.  If this value is false the value(s)
  52.662 + * for each element is returned.
  52.663 + *
  52.664 + * Note: This method *always* returns an array.  If no valid value can be determined the
  52.665 + *       array will be empty, otherwise it will contain one or more values.
  52.666 + *
  52.667 + * @example var data = $("#myPasswordElement").fieldValue();
  52.668 + * alert(data[0]);
  52.669 + * @desc Alerts the current value of the myPasswordElement element
  52.670 + *
  52.671 + * @example var data = $("#myForm :input").fieldValue();
  52.672 + * @desc Get the value(s) of the form elements in myForm
  52.673 + *
  52.674 + * @example var data = $("#myForm :checkbox").fieldValue();
  52.675 + * @desc Get the value(s) for the successful checkbox element(s) in the jQuery object.
  52.676 + *
  52.677 + * @example var data = $("#mySingleSelect").fieldValue();
  52.678 + * @desc Get the value(s) of the select control
  52.679 + *
  52.680 + * @example var data = $(':text').fieldValue();
  52.681 + * @desc Get the value(s) of the text input or textarea elements
  52.682 + *
  52.683 + * @example var data = $("#myMultiSelect").fieldValue();
  52.684 + * @desc Get the values for the select-multiple control
  52.685 + *
  52.686 + * @name fieldValue
  52.687 + * @param Boolean successful true if only the values for successful controls should be returned (default is true)
  52.688 + * @type Array<String>
  52.689 + * @cat Plugins/Form
  52.690 + */
  52.691 +$.fn.fieldValue = function(successful) {
  52.692 +    for (var val=[], i=0, max=this.length; i < max; i++) {
  52.693 +        var el = this[i];
  52.694 +        var v = $.fieldValue(el, successful);
  52.695 +        if (v === null || typeof v == 'undefined' || (v.constructor == Array && !v.length))
  52.696 +            continue;
  52.697 +        v.constructor == Array ? $.merge(val, v) : val.push(v);
  52.698 +    }
  52.699 +    return val;
  52.700 +};
  52.701 +
  52.702 +/**
  52.703 + * Returns the value of the field element.
  52.704 + *
  52.705 + * The successful argument controls whether or not the field element must be 'successful'
  52.706 + * (per http://www.w3.org/TR/html4/interact/forms.html#successful-controls).
  52.707 + * The default value of the successful argument is true.  If the given element is not
  52.708 + * successful and the successful arg is not false then the returned value will be null.
  52.709 + *
  52.710 + * Note: If the successful flag is true (default) but the element is not successful, the return will be null
  52.711 + * Note: The value returned for a successful select-multiple element will always be an array.
  52.712 + * Note: If the element has no value the return value will be undefined.
  52.713 + *
  52.714 + * @example var data = jQuery.fieldValue($("#myPasswordElement")[0]);
  52.715 + * @desc Gets the current value of the myPasswordElement element
  52.716 + *
  52.717 + * @name fieldValue
  52.718 + * @param Element el The DOM element for which the value will be returned
  52.719 + * @param Boolean successful true if value returned must be for a successful controls (default is true)
  52.720 + * @type String or Array<String> or null or undefined
  52.721 + * @cat Plugins/Form
  52.722 + */
  52.723 +$.fieldValue = function(el, successful) {
  52.724 +    var n = el.name, t = el.type, tag = el.tagName.toLowerCase();
  52.725 +    if (typeof successful == 'undefined') successful = true;
  52.726 +
  52.727 +    if (successful && (!n || el.disabled || t == 'reset' || t == 'button' ||
  52.728 +        (t == 'checkbox' || t == 'radio') && !el.checked ||
  52.729 +        (t == 'submit' || t == 'image') && el.form && el.form.clk != el ||
  52.730 +        tag == 'select' && el.selectedIndex == -1))
  52.731 +            return null;
  52.732 +
  52.733 +    if (tag == 'select') {
  52.734 +        var index = el.selectedIndex;
  52.735 +        if (index < 0) return null;
  52.736 +        var a = [], ops = el.options;
  52.737 +        var one = (t == 'select-one');
  52.738 +        var max = (one ? index+1 : ops.length);
  52.739 +        for(var i=(one ? index : 0); i < max; i++) {
  52.740 +            var op = ops[i];
  52.741 +            if (op.selected) {
  52.742 +                // extra pain for IE...
  52.743 +                var v = $.browser.msie && !(op.attributes['value'].specified) ? op.text : op.value;
  52.744 +                if (one) return v;
  52.745 +                a.push(v);
  52.746 +            }
  52.747 +        }
  52.748 +        return a;
  52.749 +    }
  52.750 +    return el.value;
  52.751 +};
  52.752 +
  52.753 +
  52.754 +/**
  52.755 + * Clears the form data.  Takes the following actions on the form's input fields:
  52.756 + *  - input text fields will have their 'value' property set to the empty string
  52.757 + *  - select elements will have their 'selectedIndex' property set to -1
  52.758 + *  - checkbox and radio inputs will have their 'checked' property set to false
  52.759 + *  - inputs of type submit, button, reset, and hidden will *not* be effected
  52.760 + *  - button elements will *not* be effected
  52.761 + *
  52.762 + * @example $('form').clearForm();
  52.763 + * @desc Clears all forms on the page.
  52.764 + *
  52.765 + * @name clearForm
  52.766 + * @type jQuery
  52.767 + * @cat Plugins/Form
  52.768 + */
  52.769 +$.fn.clearForm = function() {
  52.770 +    return this.each(function() {
  52.771 +        $('input,select,textarea', this).clearFields();
  52.772 +    });
  52.773 +};
  52.774 +
  52.775 +/**
  52.776 + * Clears the selected form elements.  Takes the following actions on the matched elements:
  52.777 + *  - input text fields will have their 'value' property set to the empty string
  52.778 + *  - select elements will have their 'selectedIndex' property set to -1
  52.779 + *  - checkbox and radio inputs will have their 'checked' property set to false
  52.780 + *  - inputs of type submit, button, reset, and hidden will *not* be effected
  52.781 + *  - button elements will *not* be effected
  52.782 + *
  52.783 + * @example $('.myInputs').clearFields();
  52.784 + * @desc Clears all inputs with class myInputs
  52.785 + *
  52.786 + * @name clearFields
  52.787 + * @type jQuery
  52.788 + * @cat Plugins/Form
  52.789 + */
  52.790 +$.fn.clearFields = $.fn.clearInputs = function() {
  52.791 +    return this.each(function() {
  52.792 +        var t = this.type, tag = this.tagName.toLowerCase();
  52.793 +        if (t == 'text' || t == 'password' || tag == 'textarea')
  52.794 +            this.value = '';
  52.795 +        else if (t == 'checkbox' || t == 'radio')
  52.796 +            this.checked = false;
  52.797 +        else if (tag == 'select')
  52.798 +            this.selectedIndex = -1;
  52.799 +    });
  52.800 +};
  52.801 +
  52.802 +
  52.803 +/**
  52.804 + * Resets the form data.  Causes all form elements to be reset to their original value.
  52.805 + *
  52.806 + * @example $('form').resetForm();
  52.807 + * @desc Resets all forms on the page.
  52.808 + *
  52.809 + * @name resetForm
  52.810 + * @type jQuery
  52.811 + * @cat Plugins/Form
  52.812 + */
  52.813 +$.fn.resetForm = function() {
  52.814 +    return this.each(function() {
  52.815 +        // guard against an input with the name of 'reset'
  52.816 +        // note that IE reports the reset function as an 'object'
  52.817 +        if (typeof this.reset == 'function' || (typeof this.reset == 'object' && !this.reset.nodeType))
  52.818 +            this.reset();
  52.819 +    });
  52.820 +};
  52.821 +
  52.822 +})(jQuery);
    53.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    53.2 +++ b/web/support/javascript/hsbook.js	Tue Nov 24 11:44:49 2009 +0100
    53.3 @@ -0,0 +1,95 @@
    53.4 +function qid(id) {
    53.5 +  return id.replace(/([.:])/g, "\\$1");
    53.6 +}
    53.7 +
    53.8 +function beforeComment(formData, jqForm, options) {
    53.9 +  var form = jqForm[0];
   53.10 +  if (!form.comment.value) {
   53.11 +    $(options.target + " span.comment_error").empty().append(
   53.12 +      "<span class=\"comment_error\">Your comment is empty</span>");
   53.13 +    return false;
   53.14 +  }
   53.15 +  if (!form.name.value) {
   53.16 +    $(options.target + " span.comment_error").empty().append(
   53.17 +      "<span class=\"comment_error\">Please provide a name</span>");
   53.18 +    return false;
   53.19 +  }
   53.20 +  $(options.target + " span.comment_error").empty().after(
   53.21 +    "<img src=\"/support/icons/throbber.gif\" style=\"vertical-align: middle\"/>");
   53.22 +  $(options.target + " input[@name=submit]").attr("disabled", true);
   53.23 +}
   53.24 +
   53.25 +function ajaxifyForm(id) {
   53.26 +  var q = qid(id);
   53.27 +  
   53.28 +  $("#form_" + q).ajaxForm({ beforeSubmit: beforeComment,
   53.29 +			     success: function() { ajaxifyForm(id); },
   53.30 +			     target: "#comments_" + q });
   53.31 +}
   53.32 +
   53.33 +function toggleComment(id) {
   53.34 +  $("#toggle_" + qid(id)).nextAll().toggle();
   53.35 +  return false;
   53.36 +}
   53.37 +
   53.38 +function loadComments(id) {
   53.39 +  $("#comments_" + qid(id)).load(location.protocol + "//" + location.host +
   53.40 +				 "/comments/single/" + id + "/", function() {
   53.41 +    ajaxifyForm(id);
   53.42 +  });
   53.43 +  return false;
   53.44 +}
   53.45 +
   53.46 +function loadAllComments() {
   53.47 +  $("a.commenttoggle").each(function() {
   53.48 +    var id = $(this).attr("pid");
   53.49 +    if (id) {
   53.50 +      loadComments(id);
   53.51 +    }
   53.52 +  });
   53.53 +}
   53.54 +
   53.55 +$(document).ready(function() {
   53.56 +  function loading(id) {
   53.57 +    return " <span id=\"comments_" + id + "\" class=\"comment\">" +
   53.58 +      "<span pid=\"" + id + "\" class=\"commenttoggle\">Loading..." +
   53.59 +      "</span></span>";
   53.60 +  }
   53.61 +  $("div.toc>p")
   53.62 +    .after("<p style='display: none;'><a onclick='return loadAllComments()'>" +
   53.63 +	   "Load all comments (<b>slow</b>)</a></p>")
   53.64 +    .toggle(function() { $(this).nextAll().show("normal"); },
   53.65 +	    function() { $(this).nextAll().hide("normal"); })
   53.66 +    .hover(function() { $(this).fadeTo("normal", 0.8); },
   53.67 +	   function() { $(this).fadeTo("normal", 0.35); });
   53.68 +  $(".chapter p[@id]").each(function() {
   53.69 +    $(this).append(loading($(this).attr("id")));
   53.70 +  });
   53.71 +  $(".chapter table[@id].equation").each(function() {
   53.72 +    id = $(this).attr("id");
   53.73 +    $("#" + id + " tr").after('<tr><td colspan="4">' + loading($(this).attr("id")) + '</td></tr>');
   53.74 +  });
   53.75 +  $(".chapter pre[@id]").each(function() {
   53.76 +    $(this).after(loading($(this).attr("id")));
   53.77 +  });
   53.78 +  var chapid = $("div.preface, div.chapter, div.appendix, div.bibliography").attr("id");
   53.79 +  $("#chapterfeed").attr("href",
   53.80 +			 $("#chapterfeed").attr("href") + chapid + "/");
   53.81 +  $.getJSON(location.protocol + "//" + location.host + "/comments/chapter/" +
   53.82 +	    chapid + "/count/", function(data) {
   53.83 +    $.each(data, function(id, item) {
   53.84 +      var s = item == 1 ? "" : "s";
   53.85 +      $("#comments_" + qid(id) + " span.commenttoggle").replaceWith(
   53.86 +        "<a class='commenttoggle' id='toggle_" + id + "' " +
   53.87 +	"pid='" + id + "' " +
   53.88 +	"onclick='return loadComments(\"" + id + "\")' " +
   53.89 +	"href='comments: show / hide'>" + item + " comment" + s + "</a>");
   53.90 +    });
   53.91 +    $("span.commenttoggle").each(function() {
   53.92 +      var id = $(this).attr("pid");
   53.93 +      $(this).replaceWith("<a class='commenttoggle' id='toggle_" + id + "' " +
   53.94 +			  "onclick='return loadComments(\"" + id + "\")' " +
   53.95 +			  "href='comment: add'>No comments</a>");
   53.96 +    });
   53.97 +  });
   53.98 +});
    54.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    54.2 +++ b/web/support/javascript/jquery-min.js	Tue Nov 24 11:44:49 2009 +0100
    54.3 @@ -0,0 +1,31 @@
    54.4 +/*
    54.5 + * jQuery 1.2.1 - New Wave Javascript
    54.6 + *
    54.7 + * Copyright (c) 2007 John Resig (jquery.com)
    54.8 + * Dual licensed under the MIT (MIT-LICENSE.txt)
    54.9 + * and GPL (GPL-LICENSE.txt) licenses.
   54.10 + *
   54.11 + * $Date: 2007-09-16 23:42:06 -0400 (Sun, 16 Sep 2007) $
   54.12 + * $Rev: 3353 $
   54.13 + */
   54.14 +(function(){if(typeof jQuery!="undefined")var _jQuery=jQuery;var jQuery=window.jQuery=function(selector,context){return this instanceof jQuery?this.init(selector,context):new jQuery(selector,context);};if(typeof $!="undefined")var _$=$;window.$=jQuery;var quickExpr=/^[^<]*(<(.|\s)+>)[^>]*$|^#(\w+)$/;jQuery.fn=jQuery.prototype={init:function(selector,context){selector=selector||document;if(typeof selector=="string"){var m=quickExpr.exec(selector);if(m&&(m[1]||!context)){if(m[1])selector=jQuery.clean([m[1]],context);else{var tmp=document.getElementById(m[3]);if(tmp)if(tmp.id!=m[3])return jQuery().find(selector);else{this[0]=tmp;this.length=1;return this;}else
   54.15 +selector=[];}}else
   54.16 +return new jQuery(context).find(selector);}else if(jQuery.isFunction(selector))return new jQuery(document)[jQuery.fn.ready?"ready":"load"](selector);return this.setArray(selector.constructor==Array&&selector||(selector.jquery||selector.length&&selector!=window&&!selector.nodeType&&selector[0]!=undefined&&selector[0].nodeType)&&jQuery.makeArray(selector)||[selector]);},jquery:"1.2.1",size:function(){return this.length;},length:0,get:function(num){return num==undefined?jQuery.makeArray(this):this[num];},pushStack:function(a){var ret=jQuery(a);ret.prevObject=this;return ret;},setArray:function(a){this.length=0;Array.prototype.push.apply(this,a);return this;},each:function(fn,args){return jQuery.each(this,fn,args);},index:function(obj){var pos=-1;this.each(function(i){if(this==obj)pos=i;});return pos;},attr:function(key,value,type){var obj=key;if(key.constructor==String)if(value==undefined)return this.length&&jQuery[type||"attr"](this[0],key)||undefined;else{obj={};obj[key]=value;}return this.each(function(index){for(var prop in obj)jQuery.attr(type?this.style:this,prop,jQuery.prop(this,obj[prop],type,index,prop));});},css:function(key,value){return this.attr(key,value,"curCSS");},text:function(e){if(typeof e!="object"&&e!=null)return this.empty().append(document.createTextNode(e));var t="";jQuery.each(e||this,function(){jQuery.each(this.childNodes,function(){if(this.nodeType!=8)t+=this.nodeType!=1?this.nodeValue:jQuery.fn.text([this]);});});return t;},wrapAll:function(html){if(this[0])jQuery(html,this[0].ownerDocument).clone().insertBefore(this[0]).map(function(){var elem=this;while(elem.firstChild)elem=elem.firstChild;return elem;}).append(this);return this;},wrapInner:function(html){return this.each(function(){jQuery(this).contents().wrapAll(html);});},wrap:function(html){return this.each(function(){jQuery(this).wrapAll(html);});},append:function(){return this.domManip(arguments,true,1,function(a){this.appendChild(a);});},prepend:function(){return this.domManip(arguments,true,-1,function(a){this.insertBefore(a,this.firstChild);});},before:function(){return this.domManip(arguments,false,1,function(a){this.parentNode.insertBefore(a,this);});},after:function(){return this.domManip(arguments,false,-1,function(a){this.parentNode.insertBefore(a,this.nextSibling);});},end:function(){return this.prevObject||jQuery([]);},find:function(t){var data=jQuery.map(this,function(a){return jQuery.find(t,a);});return this.pushStack(/[^+>] [^+>]/.test(t)||t.indexOf("..")>-1?jQuery.unique(data):data);},clone:function(events){var ret=this.map(function(){return this.outerHTML?jQuery(this.outerHTML)[0]:this.cloneNode(true);});var clone=ret.find("*").andSelf().each(function(){if(this[expando]!=undefined)this[expando]=null;});if(events===true)this.find("*").andSelf().each(function(i){var events=jQuery.data(this,"events");for(var type in events)for(var handler in events[type])jQuery.event.add(clone[i],type,events[type][handler],events[type][handler].data);});return ret;},filter:function(t){return this.pushStack(jQuery.isFunction(t)&&jQuery.grep(this,function(el,index){return t.apply(el,[index]);})||jQuery.multiFilter(t,this));},not:function(t){return this.pushStack(t.constructor==String&&jQuery.multiFilter(t,this,true)||jQuery.grep(this,function(a){return(t.constructor==Array||t.jquery)?jQuery.inArray(a,t)<0:a!=t;}));},add:function(t){return this.pushStack(jQuery.merge(this.get(),t.constructor==String?jQuery(t).get():t.length!=undefined&&(!t.nodeName||jQuery.nodeName(t,"form"))?t:[t]));},is:function(expr){return expr?jQuery.multiFilter(expr,this).length>0:false;},hasClass:function(expr){return this.is("."+expr);},val:function(val){if(val==undefined){if(this.length){var elem=this[0];if(jQuery.nodeName(elem,"select")){var index=elem.selectedIndex,a=[],options=elem.options,one=elem.type=="select-one";if(index<0)return null;for(var i=one?index:0,max=one?index+1:options.length;i<max;i++){var option=options[i];if(option.selected){var val=jQuery.browser.msie&&!option.attributes["value"].specified?option.text:option.value;if(one)return val;a.push(val);}}return a;}else
   54.17 +return this[0].value.replace(/\r/g,"");}}else
   54.18 +return this.each(function(){if(val.constructor==Array&&/radio|checkbox/.test(this.type))this.checked=(jQuery.inArray(this.value,val)>=0||jQuery.inArray(this.name,val)>=0);else if(jQuery.nodeName(this,"select")){var tmp=val.constructor==Array?val:[val];jQuery("option",this).each(function(){this.selected=(jQuery.inArray(this.value,tmp)>=0||jQuery.inArray(this.text,tmp)>=0);});if(!tmp.length)this.selectedIndex=-1;}else
   54.19 +this.value=val;});},html:function(val){return val==undefined?(this.length?this[0].innerHTML:null):this.empty().append(val);},replaceWith:function(val){return this.after(val).remove();},eq:function(i){return this.slice(i,i+1);},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments));},map:function(fn){return this.pushStack(jQuery.map(this,function(elem,i){return fn.call(elem,i,elem);}));},andSelf:function(){return this.add(this.prevObject);},domManip:function(args,table,dir,fn){var clone=this.length>1,a;return this.each(function(){if(!a){a=jQuery.clean(args,this.ownerDocument);if(dir<0)a.reverse();}var obj=this;if(table&&jQuery.nodeName(this,"table")&&jQuery.nodeName(a[0],"tr"))obj=this.getElementsByTagName("tbody")[0]||this.appendChild(document.createElement("tbody"));jQuery.each(a,function(){var elem=clone?this.cloneNode(true):this;if(!evalScript(0,elem))fn.call(obj,elem);});});}};function evalScript(i,elem){var script=jQuery.nodeName(elem,"script");if(script){if(elem.src)jQuery.ajax({url:elem.src,async:false,dataType:"script"});else
   54.20 +jQuery.globalEval(elem.text||elem.textContent||elem.innerHTML||"");if(elem.parentNode)elem.parentNode.removeChild(elem);}else if(elem.nodeType==1)jQuery("script",elem).each(evalScript);return script;}jQuery.extend=jQuery.fn.extend=function(){var target=arguments[0]||{},a=1,al=arguments.length,deep=false;if(target.constructor==Boolean){deep=target;target=arguments[1]||{};}if(al==1){target=this;a=0;}var prop;for(;a<al;a++)if((prop=arguments[a])!=null)for(var i in prop){if(target==prop[i])continue;if(deep&&typeof prop[i]=='object'&&target[i])jQuery.extend(target[i],prop[i]);else if(prop[i]!=undefined)target[i]=prop[i];}return target;};var expando="jQuery"+(new Date()).getTime(),uuid=0,win={};jQuery.extend({noConflict:function(deep){window.$=_$;if(deep)window.jQuery=_jQuery;return jQuery;},isFunction:function(fn){return!!fn&&typeof fn!="string"&&!fn.nodeName&&fn.constructor!=Array&&/function/i.test(fn+"");},isXMLDoc:function(elem){return elem.documentElement&&!elem.body||elem.tagName&&elem.ownerDocument&&!elem.ownerDocument.body;},globalEval:function(data){data=jQuery.trim(data);if(data){if(window.execScript)window.execScript(data);else if(jQuery.browser.safari)window.setTimeout(data,0);else
   54.21 +eval.call(window,data);}},nodeName:function(elem,name){return elem.nodeName&&elem.nodeName.toUpperCase()==name.toUpperCase();},cache:{},data:function(elem,name,data){elem=elem==window?win:elem;var id=elem[expando];if(!id)id=elem[expando]=++uuid;if(name&&!jQuery.cache[id])jQuery.cache[id]={};if(data!=undefined)jQuery.cache[id][name]=data;return name?jQuery.cache[id][name]:id;},removeData:function(elem,name){elem=elem==window?win:elem;var id=elem[expando];if(name){if(jQuery.cache[id]){delete jQuery.cache[id][name];name="";for(name in jQuery.cache[id])break;if(!name)jQuery.removeData(elem);}}else{try{delete elem[expando];}catch(e){if(elem.removeAttribute)elem.removeAttribute(expando);}delete jQuery.cache[id];}},each:function(obj,fn,args){if(args){if(obj.length==undefined)for(var i in obj)fn.apply(obj[i],args);else
   54.22 +for(var i=0,ol=obj.length;i<ol;i++)if(fn.apply(obj[i],args)===false)break;}else{if(obj.length==undefined)for(var i in obj)fn.call(obj[i],i,obj[i]);else
   54.23 +for(var i=0,ol=obj.length,val=obj[0];i<ol&&fn.call(val,i,val)!==false;val=obj[++i]){}}return obj;},prop:function(elem,value,type,index,prop){if(jQuery.isFunction(value))value=value.call(elem,[index]);var exclude=/z-?index|font-?weight|opacity|zoom|line-?height/i;return value&&value.constructor==Number&&type=="curCSS"&&!exclude.test(prop)?value+"px":value;},className:{add:function(elem,c){jQuery.each((c||"").split(/\s+/),function(i,cur){if(!jQuery.className.has(elem.className,cur))elem.className+=(elem.className?" ":"")+cur;});},remove:function(elem,c){elem.className=c!=undefined?jQuery.grep(elem.className.split(/\s+/),function(cur){return!jQuery.className.has(c,cur);}).join(" "):"";},has:function(t,c){return jQuery.inArray(c,(t.className||t).toString().split(/\s+/))>-1;}},swap:function(e,o,f){for(var i in o){e.style["old"+i]=e.style[i];e.style[i]=o[i];}f.apply(e,[]);for(var i in o)e.style[i]=e.style["old"+i];},css:function(e,p){if(p=="height"||p=="width"){var old={},oHeight,oWidth,d=["Top","Bottom","Right","Left"];jQuery.each(d,function(){old["padding"+this]=0;old["border"+this+"Width"]=0;});jQuery.swap(e,old,function(){if(jQuery(e).is(':visible')){oHeight=e.offsetHeight;oWidth=e.offsetWidth;}else{e=jQuery(e.cloneNode(true)).find(":radio").removeAttr("checked").end().css({visibility:"hidden",position:"absolute",display:"block",right:"0",left:"0"}).appendTo(e.parentNode)[0];var parPos=jQuery.css(e.parentNode,"position")||"static";if(parPos=="static")e.parentNode.style.position="relative";oHeight=e.clientHeight;oWidth=e.clientWidth;if(parPos=="static")e.parentNode.style.position="static";e.parentNode.removeChild(e);}});return p=="height"?oHeight:oWidth;}return jQuery.curCSS(e,p);},curCSS:function(elem,prop,force){var ret,stack=[],swap=[];function color(a){if(!jQuery.browser.safari)return false;var ret=document.defaultView.getComputedStyle(a,null);return!ret||ret.getPropertyValue("color")=="";}if(prop=="opacity"&&jQuery.browser.msie){ret=jQuery.attr(elem.style,"opacity");return ret==""?"1":ret;}if(prop.match(/float/i))prop=styleFloat;if(!force&&elem.style[prop])ret=elem.style[prop];else if(document.defaultView&&document.defaultView.getComputedStyle){if(prop.match(/float/i))prop="float";prop=prop.replace(/([A-Z])/g,"-$1").toLowerCase();var cur=document.defaultView.getComputedStyle(elem,null);if(cur&&!color(elem))ret=cur.getPropertyValue(prop);else{for(var a=elem;a&&color(a);a=a.parentNode)stack.unshift(a);for(a=0;a<stack.length;a++)if(color(stack[a])){swap[a]=stack[a].style.display;stack[a].style.display="block";}ret=prop=="display"&&swap[stack.length-1]!=null?"none":document.defaultView.getComputedStyle(elem,null).getPropertyValue(prop)||"";for(a=0;a<swap.length;a++)if(swap[a]!=null)stack[a].style.display=swap[a];}if(prop=="opacity"&&ret=="")ret="1";}else if(elem.currentStyle){var newProp=prop.replace(/\-(\w)/g,function(m,c){return c.toUpperCase();});ret=elem.currentStyle[prop]||elem.currentStyle[newProp];if(!/^\d+(px)?$/i.test(ret)&&/^\d/.test(ret)){var style=elem.style.left;var runtimeStyle=elem.runtimeStyle.left;elem.runtimeStyle.left=elem.currentStyle.left;elem.style.left=ret||0;ret=elem.style.pixelLeft+"px";elem.style.left=style;elem.runtimeStyle.left=runtimeStyle;}}return ret;},clean:function(a,doc){var r=[];doc=doc||document;jQuery.each(a,function(i,arg){if(!arg)return;if(arg.constructor==Number)arg=arg.toString();if(typeof arg=="string"){arg=arg.replace(/(<(\w+)[^>]*?)\/>/g,function(m,all,tag){return tag.match(/^(abbr|br|col|img|input|link|meta|param|hr|area)$/i)?m:all+"></"+tag+">";});var s=jQuery.trim(arg).toLowerCase(),div=doc.createElement("div"),tb=[];var wrap=!s.indexOf("<opt")&&[1,"<select>","</select>"]||!s.indexOf("<leg")&&[1,"<fieldset>","</fieldset>"]||s.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"<table>","</table>"]||!s.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!s.indexOf("<td")||!s.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||!s.indexOf("<col")&&[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"]||jQuery.browser.msie&&[1,"div<div>","</div>"]||[0,"",""];div.innerHTML=wrap[1]+arg+wrap[2];while(wrap[0]--)div=div.lastChild;if(jQuery.browser.msie){if(!s.indexOf("<table")&&s.indexOf("<tbody")<0)tb=div.firstChild&&div.firstChild.childNodes;else if(wrap[1]=="<table>"&&s.indexOf("<tbody")<0)tb=div.childNodes;for(var n=tb.length-1;n>=0;--n)if(jQuery.nodeName(tb[n],"tbody")&&!tb[n].childNodes.length)tb[n].parentNode.removeChild(tb[n]);if(/^\s/.test(arg))div.insertBefore(doc.createTextNode(arg.match(/^\s*/)[0]),div.firstChild);}arg=jQuery.makeArray(div.childNodes);}if(0===arg.length&&(!jQuery.nodeName(arg,"form")&&!jQuery.nodeName(arg,"select")))return;if(arg[0]==undefined||jQuery.nodeName(arg,"form")||arg.options)r.push(arg);else
   54.24 +r=jQuery.merge(r,arg);});return r;},attr:function(elem,name,value){var fix=jQuery.isXMLDoc(elem)?{}:jQuery.props;if(name=="selected"&&jQuery.browser.safari)elem.parentNode.selectedIndex;if(fix[name]){if(value!=undefined)elem[fix[name]]=value;return elem[fix[name]];}else if(jQuery.browser.msie&&name=="style")return jQuery.attr(elem.style,"cssText",value);else if(value==undefined&&jQuery.browser.msie&&jQuery.nodeName(elem,"form")&&(name=="action"||name=="method"))return elem.getAttributeNode(name).nodeValue;else if(elem.tagName){if(value!=undefined){if(name=="type"&&jQuery.nodeName(elem,"input")&&elem.parentNode)throw"type property can't be changed";elem.setAttribute(name,value);}if(jQuery.browser.msie&&/href|src/.test(name)&&!jQuery.isXMLDoc(elem))return elem.getAttribute(name,2);return elem.getAttribute(name);}else{if(name=="opacity"&&jQuery.browser.msie){if(value!=undefined){elem.zoom=1;elem.filter=(elem.filter||"").replace(/alpha\([^)]*\)/,"")+(parseFloat(value).toString()=="NaN"?"":"alpha(opacity="+value*100+")");}return elem.filter?(parseFloat(elem.filter.match(/opacity=([^)]*)/)[1])/100).toString():"";}name=name.replace(/-([a-z])/ig,function(z,b){return b.toUpperCase();});if(value!=undefined)elem[name]=value;return elem[name];}},trim:function(t){return(t||"").replace(/^\s+|\s+$/g,"");},makeArray:function(a){var r=[];if(typeof a!="array")for(var i=0,al=a.length;i<al;i++)r.push(a[i]);else
   54.25 +r=a.slice(0);return r;},inArray:function(b,a){for(var i=0,al=a.length;i<al;i++)if(a[i]==b)return i;return-1;},merge:function(first,second){if(jQuery.browser.msie){for(var i=0;second[i];i++)if(second[i].nodeType!=8)first.push(second[i]);}else
   54.26 +for(var i=0;second[i];i++)first.push(second[i]);return first;},unique:function(first){var r=[],done={};try{for(var i=0,fl=first.length;i<fl;i++){var id=jQuery.data(first[i]);if(!done[id]){done[id]=true;r.push(first[i]);}}}catch(e){r=first;}return r;},grep:function(elems,fn,inv){if(typeof fn=="string")fn=eval("false||function(a,i){return "+fn+"}");var result=[];for(var i=0,el=elems.length;i<el;i++)if(!inv&&fn(elems[i],i)||inv&&!fn(elems[i],i))result.push(elems[i]);return result;},map:function(elems,fn){if(typeof fn=="string")fn=eval("false||function(a){return "+fn+"}");var result=[];for(var i=0,el=elems.length;i<el;i++){var val=fn(elems[i],i);if(val!==null&&val!=undefined){if(val.constructor!=Array)val=[val];result=result.concat(val);}}return result;}});var userAgent=navigator.userAgent.toLowerCase();jQuery.browser={version:(userAgent.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[])[1],safari:/webkit/.test(userAgent),opera:/opera/.test(userAgent),msie:/msie/.test(userAgent)&&!/opera/.test(userAgent),mozilla:/mozilla/.test(userAgent)&&!/(compatible|webkit)/.test(userAgent)};var styleFloat=jQuery.browser.msie?"styleFloat":"cssFloat";jQuery.extend({boxModel:!jQuery.browser.msie||document.compatMode=="CSS1Compat",styleFloat:jQuery.browser.msie?"styleFloat":"cssFloat",props:{"for":"htmlFor","class":"className","float":styleFloat,cssFloat:styleFloat,styleFloat:styleFloat,innerHTML:"innerHTML",className:"className",value:"value",disabled:"disabled",checked:"checked",readonly:"readOnly",selected:"selected",maxlength:"maxLength"}});jQuery.each({parent:"a.parentNode",parents:"jQuery.dir(a,'parentNode')",next:"jQuery.nth(a,2,'nextSibling')",prev:"jQuery.nth(a,2,'previousSibling')",nextAll:"jQuery.dir(a,'nextSibling')",prevAll:"jQuery.dir(a,'previousSibling')",siblings:"jQuery.sibling(a.parentNode.firstChild,a)",children:"jQuery.sibling(a.firstChild)",contents:"jQuery.nodeName(a,'iframe')?a.contentDocument||a.contentWindow.document:jQuery.makeArray(a.childNodes)"},function(i,n){jQuery.fn[i]=function(a){var ret=jQuery.map(this,n);if(a&&typeof a=="string")ret=jQuery.multiFilter(a,ret);return this.pushStack(jQuery.unique(ret));};});jQuery.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(i,n){jQuery.fn[i]=function(){var a=arguments;return this.each(function(){for(var j=0,al=a.length;j<al;j++)jQuery(a[j])[n](this);});};});jQuery.each({removeAttr:function(key){jQuery.attr(this,key,"");this.removeAttribute(key);},addClass:function(c){jQuery.className.add(this,c);},removeClass:function(c){jQuery.className.remove(this,c);},toggleClass:function(c){jQuery.className[jQuery.className.has(this,c)?"remove":"add"](this,c);},remove:function(a){if(!a||jQuery.filter(a,[this]).r.length){jQuery.removeData(this);this.parentNode.removeChild(this);}},empty:function(){jQuery("*",this).each(function(){jQuery.removeData(this);});while(this.firstChild)this.removeChild(this.firstChild);}},function(i,n){jQuery.fn[i]=function(){return this.each(n,arguments);};});jQuery.each(["Height","Width"],function(i,name){var n=name.toLowerCase();jQuery.fn[n]=function(h){return this[0]==window?jQuery.browser.safari&&self["inner"+name]||jQuery.boxModel&&Math.max(document.documentElement["client"+name],document.body["client"+name])||document.body["client"+name]:this[0]==document?Math.max(document.body["scroll"+name],document.body["offset"+name]):h==undefined?(this.length?jQuery.css(this[0],n):null):this.css(n,h.constructor==String?h:h+"px");};});var chars=jQuery.browser.safari&&parseInt(jQuery.browser.version)<417?"(?:[\\w*_-]|\\\\.)":"(?:[\\w\u0128-\uFFFF*_-]|\\\\.)",quickChild=new RegExp("^>\\s*("+chars+"+)"),quickID=new RegExp("^("+chars+"+)(#)("+chars+"+)"),quickClass=new RegExp("^([#.]?)("+chars+"*)");jQuery.extend({expr:{"":"m[2]=='*'||jQuery.nodeName(a,m[2])","#":"a.getAttribute('id')==m[2]",":":{lt:"i<m[3]-0",gt:"i>m[3]-0",nth:"m[3]-0==i",eq:"m[3]-0==i",first:"i==0",last:"i==r.length-1",even:"i%2==0",odd:"i%2","first-child":"a.parentNode.getElementsByTagName('*')[0]==a","last-child":"jQuery.nth(a.parentNode.lastChild,1,'previousSibling')==a","only-child":"!jQuery.nth(a.parentNode.lastChild,2,'previousSibling')",parent:"a.firstChild",empty:"!a.firstChild",contains:"(a.textContent||a.innerText||jQuery(a).text()||'').indexOf(m[3])>=0",visible:'"hidden"!=a.type&&jQuery.css(a,"display")!="none"&&jQuery.css(a,"visibility")!="hidden"',hidden:'"hidden"==a.type||jQuery.css(a,"display")=="none"||jQuery.css(a,"visibility")=="hidden"',enabled:"!a.disabled",disabled:"a.disabled",checked:"a.checked",selected:"a.selected||jQuery.attr(a,'selected')",text:"'text'==a.type",radio:"'radio'==a.type",checkbox:"'checkbox'==a.type",file:"'file'==a.type",password:"'password'==a.type",submit:"'submit'==a.type",image:"'image'==a.type",reset:"'reset'==a.type",button:'"button"==a.type||jQuery.nodeName(a,"button")',input:"/input|select|textarea|button/i.test(a.nodeName)",has:"jQuery.find(m[3],a).length",header:"/h\\d/i.test(a.nodeName)",animated:"jQuery.grep(jQuery.timers,function(fn){return a==fn.elem;}).length"}},parse:[/^(\[) *@?([\w-]+) *([!*$^~=]*) *('?"?)(.*?)\4 *\]/,/^(:)([\w-]+)\("?'?(.*?(\(.*?\))?[^(]*?)"?'?\)/,new RegExp("^([:.#]*)("+chars+"+)")],multiFilter:function(expr,elems,not){var old,cur=[];while(expr&&expr!=old){old=expr;var f=jQuery.filter(expr,elems,not);expr=f.t.replace(/^\s*,\s*/,"");cur=not?elems=f.r:jQuery.merge(cur,f.r);}return cur;},find:function(t,context){if(typeof t!="string")return[t];if(context&&!context.nodeType)context=null;context=context||document;var ret=[context],done=[],last;while(t&&last!=t){var r=[];last=t;t=jQuery.trim(t);var foundToken=false;var re=quickChild;var m=re.exec(t);if(m){var nodeName=m[1].toUpperCase();for(var i=0;ret[i];i++)for(var c=ret[i].firstChild;c;c=c.nextSibling)if(c.nodeType==1&&(nodeName=="*"||c.nodeName.toUpperCase()==nodeName.toUpperCase()))r.push(c);ret=r;t=t.replace(re,"");if(t.indexOf(" ")==0)continue;foundToken=true;}else{re=/^([>+~])\s*(\w*)/i;if((m=re.exec(t))!=null){r=[];var nodeName=m[2],merge={};m=m[1];for(var j=0,rl=ret.length;j<rl;j++){var n=m=="~"||m=="+"?ret[j].nextSibling:ret[j].firstChild;for(;n;n=n.nextSibling)if(n.nodeType==1){var id=jQuery.data(n);if(m=="~"&&merge[id])break;if(!nodeName||n.nodeName.toUpperCase()==nodeName.toUpperCase()){if(m=="~")merge[id]=true;r.push(n);}if(m=="+")break;}}ret=r;t=jQuery.trim(t.replace(re,""));foundToken=true;}}if(t&&!foundToken){if(!t.indexOf(",")){if(context==ret[0])ret.shift();done=jQuery.merge(done,ret);r=ret=[context];t=" "+t.substr(1,t.length);}else{var re2=quickID;var m=re2.exec(t);if(m){m=[0,m[2],m[3],m[1]];}else{re2=quickClass;m=re2.exec(t);}m[2]=m[2].replace(/\\/g,"");var elem=ret[ret.length-1];if(m[1]=="#"&&elem&&elem.getElementById&&!jQuery.isXMLDoc(elem)){var oid=elem.getElementById(m[2]);if((jQuery.browser.msie||jQuery.browser.opera)&&oid&&typeof oid.id=="string"&&oid.id!=m[2])oid=jQuery('[@id="'+m[2]+'"]',elem)[0];ret=r=oid&&(!m[3]||jQuery.nodeName(oid,m[3]))?[oid]:[];}else{for(var i=0;ret[i];i++){var tag=m[1]=="#"&&m[3]?m[3]:m[1]!=""||m[0]==""?"*":m[2];if(tag=="*"&&ret[i].nodeName.toLowerCase()=="object")tag="param";r=jQuery.merge(r,ret[i].getElementsByTagName(tag));}if(m[1]==".")r=jQuery.classFilter(r,m[2]);if(m[1]=="#"){var tmp=[];for(var i=0;r[i];i++)if(r[i].getAttribute("id")==m[2]){tmp=[r[i]];break;}r=tmp;}ret=r;}t=t.replace(re2,"");}}if(t){var val=jQuery.filter(t,r);ret=r=val.r;t=jQuery.trim(val.t);}}if(t)ret=[];if(ret&&context==ret[0])ret.shift();done=jQuery.merge(done,ret);return done;},classFilter:function(r,m,not){m=" "+m+" ";var tmp=[];for(var i=0;r[i];i++){var pass=(" "+r[i].className+" ").indexOf(m)>=0;if(!not&&pass||not&&!pass)tmp.push(r[i]);}return tmp;},filter:function(t,r,not){var last;while(t&&t!=last){last=t;var p=jQuery.parse,m;for(var i=0;p[i];i++){m=p[i].exec(t);if(m){t=t.substring(m[0].length);m[2]=m[2].replace(/\\/g,"");break;}}if(!m)break;if(m[1]==":"&&m[2]=="not")r=jQuery.filter(m[3],r,true).r;else if(m[1]==".")r=jQuery.classFilter(r,m[2],not);else if(m[1]=="["){var tmp=[],type=m[3];for(var i=0,rl=r.length;i<rl;i++){var a=r[i],z=a[jQuery.props[m[2]]||m[2]];if(z==null||/href|src|selected/.test(m[2]))z=jQuery.attr(a,m[2])||'';if((type==""&&!!z||type=="="&&z==m[5]||type=="!="&&z!=m[5]||type=="^="&&z&&!z.indexOf(m[5])||type=="$="&&z.substr(z.length-m[5].length)==m[5]||(type=="*="||type=="~=")&&z.indexOf(m[5])>=0)^not)tmp.push(a);}r=tmp;}else if(m[1]==":"&&m[2]=="nth-child"){var merge={},tmp=[],test=/(\d*)n\+?(\d*)/.exec(m[3]=="even"&&"2n"||m[3]=="odd"&&"2n+1"||!/\D/.test(m[3])&&"n+"+m[3]||m[3]),first=(test[1]||1)-0,last=test[2]-0;for(var i=0,rl=r.length;i<rl;i++){var node=r[i],parentNode=node.parentNode,id=jQuery.data(parentNode);if(!merge[id]){var c=1;for(var n=parentNode.firstChild;n;n=n.nextSibling)if(n.nodeType==1)n.nodeIndex=c++;merge[id]=true;}var add=false;if(first==1){if(last==0||node.nodeIndex==last)add=true;}else if((node.nodeIndex+last)%first==0)add=true;if(add^not)tmp.push(node);}r=tmp;}else{var f=jQuery.expr[m[1]];if(typeof f!="string")f=jQuery.expr[m[1]][m[2]];f=eval("false||function(a,i){return "+f+"}");r=jQuery.grep(r,f,not);}}return{r:r,t:t};},dir:function(elem,dir){var matched=[];var cur=elem[dir];while(cur&&cur!=document){if(cur.nodeType==1)matched.push(cur);cur=cur[dir];}return matched;},nth:function(cur,result,dir,elem){result=result||1;var num=0;for(;cur;cur=cur[dir])if(cur.nodeType==1&&++num==result)break;return cur;},sibling:function(n,elem){var r=[];for(;n;n=n.nextSibling){if(n.nodeType==1&&(!elem||n!=elem))r.push(n);}return r;}});jQuery.event={add:function(element,type,handler,data){if(jQuery.browser.msie&&element.setInterval!=undefined)element=window;if(!handler.guid)handler.guid=this.guid++;if(data!=undefined){var fn=handler;handler=function(){return fn.apply(this,arguments);};handler.data=data;handler.guid=fn.guid;}var parts=type.split(".");type=parts[0];handler.type=parts[1];var events=jQuery.data(element,"events")||jQuery.data(element,"events",{});var handle=jQuery.data(element,"handle",function(){var val;if(typeof jQuery=="undefined"||jQuery.event.triggered)return val;val=jQuery.event.handle.apply(element,arguments);return val;});var handlers=events[type];if(!handlers){handlers=events[type]={};if(element.addEventListener)element.addEventListener(type,handle,false);else
   54.27 +element.attachEvent("on"+type,handle);}handlers[handler.guid]=handler;this.global[type]=true;},guid:1,global:{},remove:function(element,type,handler){var events=jQuery.data(element,"events"),ret,index;if(typeof type=="string"){var parts=type.split(".");type=parts[0];}if(events){if(type&&type.type){handler=type.handler;type=type.type;}if(!type){for(type in events)this.remove(element,type);}else if(events[type]){if(handler)delete events[type][handler.guid];else
   54.28 +for(handler in events[type])if(!parts[1]||events[type][handler].type==parts[1])delete events[type][handler];for(ret in events[type])break;if(!ret){if(element.removeEventListener)element.removeEventListener(type,jQuery.data(element,"handle"),false);else
   54.29 +element.detachEvent("on"+type,jQuery.data(element,"handle"));ret=null;delete events[type];}}for(ret in events)break;if(!ret){jQuery.removeData(element,"events");jQuery.removeData(element,"handle");}}},trigger:function(type,data,element,donative,extra){data=jQuery.makeArray(data||[]);if(!element){if(this.global[type])jQuery("*").add([window,document]).trigger(type,data);}else{var val,ret,fn=jQuery.isFunction(element[type]||null),evt=!data[0]||!data[0].preventDefault;if(evt)data.unshift(this.fix({type:type,target:element}));data[0].type=type;if(jQuery.isFunction(jQuery.data(element,"handle")))val=jQuery.data(element,"handle").apply(element,data);if(!fn&&element["on"+type]&&element["on"+type].apply(element,data)===false)val=false;if(evt)data.shift();if(extra&&extra.apply(element,data)===false)val=false;if(fn&&donative!==false&&val!==false&&!(jQuery.nodeName(element,'a')&&type=="click")){this.triggered=true;element[type]();}this.triggered=false;}return val;},handle:function(event){var val;event=jQuery.event.fix(event||window.event||{});var parts=event.type.split(".");event.type=parts[0];var c=jQuery.data(this,"events")&&jQuery.data(this,"events")[event.type],args=Array.prototype.slice.call(arguments,1);args.unshift(event);for(var j in c){args[0].handler=c[j];args[0].data=c[j].data;if(!parts[1]||c[j].type==parts[1]){var tmp=c[j].apply(this,args);if(val!==false)val=tmp;if(tmp===false){event.preventDefault();event.stopPropagation();}}}if(jQuery.browser.msie)event.target=event.preventDefault=event.stopPropagation=event.handler=event.data=null;return val;},fix:function(event){var originalEvent=event;event=jQuery.extend({},originalEvent);event.preventDefault=function(){if(originalEvent.preventDefault)originalEvent.preventDefault();originalEvent.returnValue=false;};event.stopPropagation=function(){if(originalEvent.stopPropagation)originalEvent.stopPropagation();originalEvent.cancelBubble=true;};if(!event.target&&event.srcElement)event.target=event.srcElement;if(jQuery.browser.safari&&event.target.nodeType==3)event.target=originalEvent.target.parentNode;if(!event.relatedTarget&&event.fromElement)event.relatedTarget=event.fromElement==event.target?event.toElement:event.fromElement;if(event.pageX==null&&event.clientX!=null){var e=document.documentElement,b=document.body;event.pageX=event.clientX+(e&&e.scrollLeft||b.scrollLeft||0);event.pageY=event.clientY+(e&&e.scrollTop||b.scrollTop||0);}if(!event.which&&(event.charCode||event.keyCode))event.which=event.charCode||event.keyCode;if(!event.metaKey&&event.ctrlKey)event.metaKey=event.ctrlKey;if(!event.which&&event.button)event.which=(event.button&1?1:(event.button&2?3:(event.button&4?2:0)));return event;}};jQuery.fn.extend({bind:function(type,data,fn){return type=="unload"?this.one(type,data,fn):this.each(function(){jQuery.event.add(this,type,fn||data,fn&&data);});},one:function(type,data,fn){return this.each(function(){jQuery.event.add(this,type,function(event){jQuery(this).unbind(event);return(fn||data).apply(this,arguments);},fn&&data);});},unbind:function(type,fn){return this.each(function(){jQuery.event.remove(this,type,fn);});},trigger:function(type,data,fn){return this.each(function(){jQuery.event.trigger(type,data,this,true,fn);});},triggerHandler:function(type,data,fn){if(this[0])return jQuery.event.trigger(type,data,this[0],false,fn);},toggle:function(){var a=arguments;return this.click(function(e){this.lastToggle=0==this.lastToggle?1:0;e.preventDefault();return a[this.lastToggle].apply(this,[e])||false;});},hover:function(f,g){function handleHover(e){var p=e.relatedTarget;while(p&&p!=this)try{p=p.parentNode;}catch(e){p=this;};if(p==this)return false;return(e.type=="mouseover"?f:g).apply(this,[e]);}return this.mouseover(handleHover).mouseout(handleHover);},ready:function(f){bindReady();if(jQuery.isReady)f.apply(document,[jQuery]);else
   54.30 +jQuery.readyList.push(function(){return f.apply(this,[jQuery]);});return this;}});jQuery.extend({isReady:false,readyList:[],ready:function(){if(!jQuery.isReady){jQuery.isReady=true;if(jQuery.readyList){jQuery.each(jQuery.readyList,function(){this.apply(document);});jQuery.readyList=null;}if(jQuery.browser.mozilla||jQuery.browser.opera)document.removeEventListener("DOMContentLoaded",jQuery.ready,false);if(!window.frames.length)jQuery(window).load(function(){jQuery("#__ie_init").remove();});}}});jQuery.each(("blur,focus,load,resize,scroll,unload,click,dblclick,"+"mousedown,mouseup,mousemove,mouseover,mouseout,change,select,"+"submit,keydown,keypress,keyup,error").split(","),function(i,o){jQuery.fn[o]=function(f){return f?this.bind(o,f):this.trigger(o);};});var readyBound=false;function bindReady(){if(readyBound)return;readyBound=true;if(jQuery.browser.mozilla||jQuery.browser.opera)document.addEventListener("DOMContentLoaded",jQuery.ready,false);else if(jQuery.browser.msie){document.write("<scr"+"ipt id=__ie_init defer=true "+"src=//:><\/script>");var script=document.getElementById("__ie_init");if(script)script.onreadystatechange=function(){if(this.readyState!="complete")return;jQuery.ready();};script=null;}else if(jQuery.browser.safari)jQuery.safariTimer=setInterval(function(){if(document.readyState=="loaded"||document.readyState=="complete"){clearInterval(jQuery.safariTimer);jQuery.safariTimer=null;jQuery.ready();}},10);jQuery.event.add(window,"load",jQuery.ready);}jQuery.fn.extend({load:function(url,params,callback){if(jQuery.isFunction(url))return this.bind("load",url);var off=url.indexOf(" ");if(off>=0){var selector=url.slice(off,url.length);url=url.slice(0,off);}callback=callback||function(){};var type="GET";if(params)if(jQuery.isFunction(params)){callback=params;params=null;}else{params=jQuery.param(params);type="POST";}var self=this;jQuery.ajax({url:url,type:type,data:params,complete:function(res,status){if(status=="success"||status=="notmodified")self.html(selector?jQuery("<div/>").append(res.responseText.replace(/<script(.|\s)*?\/script>/g,"")).find(selector):res.responseText);setTimeout(function(){self.each(callback,[res.responseText,status,res]);},13);}});return this;},serialize:function(){return jQuery.param(this.serializeArray());},serializeArray:function(){return this.map(function(){return jQuery.nodeName(this,"form")?jQuery.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(i,elem){var val=jQuery(this).val();return val==null?null:val.constructor==Array?jQuery.map(val,function(val,i){return{name:elem.name,value:val};}):{name:elem.name,value:val};}).get();}});jQuery.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(i,o){jQuery.fn[o]=function(f){return this.bind(o,f);};});var jsc=(new Date).getTime();jQuery.extend({get:function(url,data,callback,type){if(jQuery.isFunction(data)){callback=data;data=null;}return jQuery.ajax({type:"GET",url:url,data:data,success:callback,dataType:type});},getScript:function(url,callback){return jQuery.get(url,null,callback,"script");},getJSON:function(url,data,callback){return jQuery.get(url,data,callback,"json");},post:function(url,data,callback,type){if(jQuery.isFunction(data)){callback=data;data={};}return jQuery.ajax({type:"POST",url:url,data:data,success:callback,dataType:type});},ajaxSetup:function(settings){jQuery.extend(jQuery.ajaxSettings,settings);},ajaxSettings:{global:true,type:"GET",timeout:0,contentType:"application/x-www-form-urlencoded",processData:true,async:true,data:null},lastModified:{},ajax:function(s){var jsonp,jsre=/=(\?|%3F)/g,status,data;s=jQuery.extend(true,s,jQuery.extend(true,{},jQuery.ajaxSettings,s));if(s.data&&s.processData&&typeof s.data!="string")s.data=jQuery.param(s.data);if(s.dataType=="jsonp"){if(s.type.toLowerCase()=="get"){if(!s.url.match(jsre))s.url+=(s.url.match(/\?/)?"&":"?")+(s.jsonp||"callback")+"=?";}else if(!s.data||!s.data.match(jsre))s.data=(s.data?s.data+"&":"")+(s.jsonp||"callback")+"=?";s.dataType="json";}if(s.dataType=="json"&&(s.data&&s.data.match(jsre)||s.url.match(jsre))){jsonp="jsonp"+jsc++;if(s.data)s.data=s.data.replace(jsre,"="+jsonp);s.url=s.url.replace(jsre,"="+jsonp);s.dataType="script";window[jsonp]=function(tmp){data=tmp;success();complete();window[jsonp]=undefined;try{delete window[jsonp];}catch(e){}};}if(s.dataType=="script"&&s.cache==null)s.cache=false;if(s.cache===false&&s.type.toLowerCase()=="get")s.url+=(s.url.match(/\?/)?"&":"?")+"_="+(new Date()).getTime();if(s.data&&s.type.toLowerCase()=="get"){s.url+=(s.url.match(/\?/)?"&":"?")+s.data;s.data=null;}if(s.global&&!jQuery.active++)jQuery.event.trigger("ajaxStart");if(!s.url.indexOf("http")&&s.dataType=="script"){var head=document.getElementsByTagName("head")[0];var script=document.createElement("script");script.src=s.url;if(!jsonp&&(s.success||s.complete)){var done=false;script.onload=script.onreadystatechange=function(){if(!done&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){done=true;success();complete();head.removeChild(script);}};}head.appendChild(script);return;}var requestDone=false;var xml=window.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest();xml.open(s.type,s.url,s.async);if(s.data)xml.setRequestHeader("Content-Type",s.contentType);if(s.ifModified)xml.setRequestHeader("If-Modified-Since",jQuery.lastModified[s.url]||"Thu, 01 Jan 1970 00:00:00 GMT");xml.setRequestHeader("X-Requested-With","XMLHttpRequest");if(s.beforeSend)s.beforeSend(xml);if(s.global)jQuery.event.trigger("ajaxSend",[xml,s]);var onreadystatechange=function(isTimeout){if(!requestDone&&xml&&(xml.readyState==4||isTimeout=="timeout")){requestDone=true;if(ival){clearInterval(ival);ival=null;}status=isTimeout=="timeout"&&"timeout"||!jQuery.httpSuccess(xml)&&"error"||s.ifModified&&jQuery.httpNotModified(xml,s.url)&&"notmodified"||"success";if(status=="success"){try{data=jQuery.httpData(xml,s.dataType);}catch(e){status="parsererror";}}if(status=="success"){var modRes;try{modRes=xml.getResponseHeader("Last-Modified");}catch(e){}if(s.ifModified&&modRes)jQuery.lastModified[s.url]=modRes;if(!jsonp)success();}else
   54.31 +jQuery.handleError(s,xml,status);complete();if(s.async)xml=null;}};if(s.async){var ival=setInterval(onreadystatechange,13);if(s.timeout>0)setTimeout(function(){if(xml){xml.abort();if(!requestDone)onreadystatechange("timeout");}},s.timeout);}try{xml.send(s.data);}catch(e){jQuery.handleError(s,xml,null,e);}if(!s.async)onreadystatechange();return xml;function success(){if(s.success)s.success(data,status);if(s.global)jQuery.event.trigger("ajaxSuccess",[xml,s]);}function complete(){if(s.complete)s.complete(xml,status);if(s.global)jQuery.event.trigger("ajaxComplete",[xml,s]);if(s.global&&!--jQuery.active)jQuery.event.trigger("ajaxStop");}},handleError:function(s,xml,status,e){if(s.error)s.error(xml,status,e);if(s.global)jQuery.event.trigger("ajaxError",[xml,s,e]);},active:0,httpSuccess:function(r){try{return!r.status&&location.protocol=="file:"||(r.status>=200&&r.status<300)||r.status==304||jQuery.browser.safari&&r.status==undefined;}catch(e){}return false;},httpNotModified:function(xml,url){try{var xmlRes=xml.getResponseHeader("Last-Modified");return xml.status==304||xmlRes==jQuery.lastModified[url]||jQuery.browser.safari&&xml.status==undefined;}catch(e){}return false;},httpData:function(r,type){var ct=r.getResponseHeader("content-type");var xml=type=="xml"||!type&&ct&&ct.indexOf("xml")>=0;var data=xml?r.responseXML:r.responseText;if(xml&&data.documentElement.tagName=="parsererror")throw"parsererror";if(type=="script")jQuery.globalEval(data);if(type=="json")data=eval("("+data+")");return data;},param:function(a){var s=[];if(a.constructor==Array||a.jquery)jQuery.each(a,function(){s.push(encodeURIComponent(this.name)+"="+encodeURIComponent(this.value));});else
   54.32 +for(var j in a)if(a[j]&&a[j].constructor==Array)jQuery.each(a[j],function(){s.push(encodeURIComponent(j)+"="+encodeURIComponent(this));});else
   54.33 +s.push(encodeURIComponent(j)+"="+encodeURIComponent(a[j]));return s.join("&").replace(/%20/g,"+");}});jQuery.fn.extend({show:function(speed,callback){return speed?this.animate({height:"show",width:"show",opacity:"show"},speed,callback):this.filter(":hidden").each(function(){this.style.display=this.oldblock?this.oldblock:"";if(jQuery.css(this,"display")=="none")this.style.display="block";}).end();},hide:function(speed,callback){return speed?this.animate({height:"hide",width:"hide",opacity:"hide"},speed,callback):this.filter(":visible").each(function(){this.oldblock=this.oldblock||jQuery.css(this,"display");if(this.oldblock=="none")this.oldblock="block";this.style.display="none";}).end();},_toggle:jQuery.fn.toggle,toggle:function(fn,fn2){return jQuery.isFunction(fn)&&jQuery.isFunction(fn2)?this._toggle(fn,fn2):fn?this.animate({height:"toggle",width:"toggle",opacity:"toggle"},fn,fn2):this.each(function(){jQuery(this)[jQuery(this).is(":hidden")?"show":"hide"]();});},slideDown:function(speed,callback){return this.animate({height:"show"},speed,callback);},slideUp:function(speed,callback){return this.animate({height:"hide"},speed,callback);},slideToggle:function(speed,callback){return this.animate({height:"toggle"},speed,callback);},fadeIn:function(speed,callback){return this.animate({opacity:"show"},speed,callback);},fadeOut:function(speed,callback){return this.animate({opacity:"hide"},speed,callback);},fadeTo:function(speed,to,callback){return this.animate({opacity:to},speed,callback);},animate:function(prop,speed,easing,callback){var opt=jQuery.speed(speed,easing,callback);return this[opt.queue===false?"each":"queue"](function(){opt=jQuery.extend({},opt);var hidden=jQuery(this).is(":hidden"),self=this;for(var p in prop){if(prop[p]=="hide"&&hidden||prop[p]=="show"&&!hidden)return jQuery.isFunction(opt.complete)&&opt.complete.apply(this);if(p=="height"||p=="width"){opt.display=jQuery.css(this,"display");opt.overflow=this.style.overflow;}}if(opt.overflow!=null)this.style.overflow="hidden";opt.curAnim=jQuery.extend({},prop);jQuery.each(prop,function(name,val){var e=new jQuery.fx(self,opt,name);if(/toggle|show|hide/.test(val))e[val=="toggle"?hidden?"show":"hide":val](prop);else{var parts=val.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),start=e.cur(true)||0;if(parts){var end=parseFloat(parts[2]),unit=parts[3]||"px";if(unit!="px"){self.style[name]=(end||1)+unit;start=((end||1)/e.cur(true))*start;self.style[name]=start+unit;}if(parts[1])end=((parts[1]=="-="?-1:1)*end)+start;e.custom(start,end,unit);}else
   54.34 +e.custom(start,val,"");}});return true;});},queue:function(type,fn){if(jQuery.isFunction(type)){fn=type;type="fx";}if(!type||(typeof type=="string"&&!fn))return queue(this[0],type);return this.each(function(){if(fn.constructor==Array)queue(this,type,fn);else{queue(this,type).push(fn);if(queue(this,type).length==1)fn.apply(this);}});},stop:function(){var timers=jQuery.timers;return this.each(function(){for(var i=0;i<timers.length;i++)if(timers[i].elem==this)timers.splice(i--,1);}).dequeue();}});var queue=function(elem,type,array){if(!elem)return;var q=jQuery.data(elem,type+"queue");if(!q||array)q=jQuery.data(elem,type+"queue",array?jQuery.makeArray(array):[]);return q;};jQuery.fn.dequeue=function(type){type=type||"fx";return this.each(function(){var q=queue(this,type);q.shift();if(q.length)q[0].apply(this);});};jQuery.extend({speed:function(speed,easing,fn){var opt=speed&&speed.constructor==Object?speed:{complete:fn||!fn&&easing||jQuery.isFunction(speed)&&speed,duration:speed,easing:fn&&easing||easing&&easing.constructor!=Function&&easing};opt.duration=(opt.duration&&opt.duration.constructor==Number?opt.duration:{slow:600,fast:200}[opt.duration])||400;opt.old=opt.complete;opt.complete=function(){jQuery(this).dequeue();if(jQuery.isFunction(opt.old))opt.old.apply(this);};return opt;},easing:{linear:function(p,n,firstNum,diff){return firstNum+diff*p;},swing:function(p,n,firstNum,diff){return((-Math.cos(p*Math.PI)/2)+0.5)*diff+firstNum;}},timers:[],fx:function(elem,options,prop){this.options=options;this.elem=elem;this.prop=prop;if(!options.orig)options.orig={};}});jQuery.fx.prototype={update:function(){if(this.options.step)this.options.step.apply(this.elem,[this.now,this]);(jQuery.fx.step[this.prop]||jQuery.fx.step._default)(this);if(this.prop=="height"||this.prop=="width")this.elem.style.display="block";},cur:function(force){if(this.elem[this.prop]!=null&&this.elem.style[this.prop]==null)return this.elem[this.prop];var r=parseFloat(jQuery.curCSS(this.elem,this.prop,force));return r&&r>-10000?r:parseFloat(jQuery.css(this.elem,this.prop))||0;},custom:function(from,to,unit){this.startTime=(new Date()).getTime();this.start=from;this.end=to;this.unit=unit||this.unit||"px";this.now=this.start;this.pos=this.state=0;this.update();var self=this;function t(){return self.step();}t.elem=this.elem;jQuery.timers.push(t);if(jQuery.timers.length==1){var timer=setInterval(function(){var timers=jQuery.timers;for(var i=0;i<timers.length;i++)if(!timers[i]())timers.splice(i--,1);if(!timers.length)clearInterval(timer);},13);}},show:function(){this.options.orig[this.prop]=jQuery.attr(this.elem.style,this.prop);this.options.show=true;this.custom(0,this.cur());if(this.prop=="width"||this.prop=="height")this.elem.style[this.prop]="1px";jQuery(this.elem).show();},hide:function(){this.options.orig[this.prop]=jQuery.attr(this.elem.style,this.prop);this.options.hide=true;this.custom(this.cur(),0);},step:function(){var t=(new Date()).getTime();if(t>this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var done=true;for(var i in this.options.curAnim)if(this.options.curAnim[i]!==true)done=false;if(done){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(jQuery.css(this.elem,"display")=="none")this.elem.style.display="block";}if(this.options.hide)this.elem.style.display="none";if(this.options.hide||this.options.show)for(var p in this.options.curAnim)jQuery.attr(this.elem.style,p,this.options.orig[p]);}if(done&&jQuery.isFunction(this.options.complete))this.options.complete.apply(this.elem);return false;}else{var n=t-this.startTime;this.state=n/this.options.duration;this.pos=jQuery.easing[this.options.easing||(jQuery.easing.swing?"swing":"linear")](this.state,n,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update();}return true;}};jQuery.fx.step={scrollLeft:function(fx){fx.elem.scrollLeft=fx.now;},scrollTop:function(fx){fx.elem.scrollTop=fx.now;},opacity:function(fx){jQuery.attr(fx.elem.style,"opacity",fx.now);},_default:function(fx){fx.elem.style[fx.prop]=fx.now+fx.unit;}};jQuery.fn.offset=function(){var left=0,top=0,elem=this[0],results;if(elem)with(jQuery.browser){var absolute=jQuery.css(elem,"position")=="absolute",parent=elem.parentNode,offsetParent=elem.offsetParent,doc=elem.ownerDocument,safari2=safari&&parseInt(version)<522;if(elem.getBoundingClientRect){box=elem.getBoundingClientRect();add(box.left+Math.max(doc.documentElement.scrollLeft,doc.body.scrollLeft),box.top+Math.max(doc.documentElement.scrollTop,doc.body.scrollTop));if(msie){var border=jQuery("html").css("borderWidth");border=(border=="medium"||jQuery.boxModel&&parseInt(version)>=7)&&2||border;add(-border,-border);}}else{add(elem.offsetLeft,elem.offsetTop);while(offsetParent){add(offsetParent.offsetLeft,offsetParent.offsetTop);if(mozilla&&/^t[d|h]$/i.test(parent.tagName)||!safari2)border(offsetParent);if(safari2&&!absolute&&jQuery.css(offsetParent,"position")=="absolute")absolute=true;offsetParent=offsetParent.offsetParent;}while(parent.tagName&&!/^body|html$/i.test(parent.tagName)){if(!/^inline|table-row.*$/i.test(jQuery.css(parent,"display")))add(-parent.scrollLeft,-parent.scrollTop);if(mozilla&&jQuery.css(parent,"overflow")!="visible")border(parent);parent=parent.parentNode;}if(safari2&&absolute)add(-doc.body.offsetLeft,-doc.body.offsetTop);}results={top:top,left:left};}return results;function border(elem){add(jQuery.css(elem,"borderLeftWidth"),jQuery.css(elem,"borderTopWidth"));}function add(l,t){left+=parseInt(l)||0;top+=parseInt(t)||0;}};})();
   54.35 \ No newline at end of file
    55.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    55.2 +++ b/web/support/javascript/jquery.js	Tue Nov 24 11:44:49 2009 +0100
    55.3 @@ -0,0 +1,2992 @@
    55.4 +(function(){
    55.5 +/*
    55.6 + * jQuery 1.2.1 - New Wave Javascript
    55.7 + *
    55.8 + * Copyright (c) 2007 John Resig (jquery.com)
    55.9 + * Dual licensed under the MIT (MIT-LICENSE.txt)
   55.10 + * and GPL (GPL-LICENSE.txt) licenses.
   55.11 + *
   55.12 + * $Date: 2007-09-16 23:42:06 -0400 (Sun, 16 Sep 2007) $
   55.13 + * $Rev: 3353 $
   55.14 + */
   55.15 +
   55.16 +// Map over jQuery in case of overwrite
   55.17 +if ( typeof jQuery != "undefined" )
   55.18 +	var _jQuery = jQuery;
   55.19 +
   55.20 +var jQuery = window.jQuery = function(selector, context) {
   55.21 +	// If the context is a namespace object, return a new object
   55.22 +	return this instanceof jQuery ?
   55.23 +		this.init(selector, context) :
   55.24 +		new jQuery(selector, context);
   55.25 +};
   55.26 +
   55.27 +// Map over the $ in case of overwrite
   55.28 +if ( typeof $ != "undefined" )
   55.29 +	var _$ = $;
   55.30 +	
   55.31 +// Map the jQuery namespace to the '$' one
   55.32 +window.$ = jQuery;
   55.33 +
   55.34 +var quickExpr = /^[^<]*(<(.|\s)+>)[^>]*$|^#(\w+)$/;
   55.35 +
   55.36 +jQuery.fn = jQuery.prototype = {
   55.37 +	init: function(selector, context) {
   55.38 +		// Make sure that a selection was provided
   55.39 +		selector = selector || document;
   55.40 +
   55.41 +		// Handle HTML strings
   55.42 +		if ( typeof selector  == "string" ) {
   55.43 +			var m = quickExpr.exec(selector);
   55.44 +			if ( m && (m[1] || !context) ) {
   55.45 +				// HANDLE: $(html) -> $(array)
   55.46 +				if ( m[1] )
   55.47 +					selector = jQuery.clean( [ m[1] ], context );
   55.48 +
   55.49 +				// HANDLE: $("#id")
   55.50 +				else {
   55.51 +					var tmp = document.getElementById( m[3] );
   55.52 +					if ( tmp )
   55.53 +						// Handle the case where IE and Opera return items
   55.54 +						// by name instead of ID
   55.55 +						if ( tmp.id != m[3] )
   55.56 +							return jQuery().find( selector );
   55.57 +						else {
   55.58 +							this[0] = tmp;
   55.59 +							this.length = 1;
   55.60 +							return this;
   55.61 +						}
   55.62 +					else
   55.63 +						selector = [];
   55.64 +				}
   55.65 +
   55.66 +			// HANDLE: $(expr)
   55.67 +			} else
   55.68 +				return new jQuery( context ).find( selector );
   55.69 +
   55.70 +		// HANDLE: $(function)
   55.71 +		// Shortcut for document ready
   55.72 +		} else if ( jQuery.isFunction(selector) )
   55.73 +			return new jQuery(document)[ jQuery.fn.ready ? "ready" : "load" ]( selector );
   55.74 +
   55.75 +		return this.setArray(
   55.76 +			// HANDLE: $(array)
   55.77 +			selector.constructor == Array && selector ||
   55.78 +
   55.79 +			// HANDLE: $(arraylike)
   55.80 +			// Watch for when an array-like object is passed as the selector
   55.81 +			(selector.jquery || selector.length && selector != window && !selector.nodeType && selector[0] != undefined && selector[0].nodeType) && jQuery.makeArray( selector ) ||
   55.82 +
   55.83 +			// HANDLE: $(*)
   55.84 +			[ selector ] );
   55.85 +	},
   55.86 +	
   55.87 +	jquery: "1.2.1",
   55.88 +
   55.89 +	size: function() {
   55.90 +		return this.length;
   55.91 +	},
   55.92 +	
   55.93 +	length: 0,
   55.94 +
   55.95 +	get: function( num ) {
   55.96 +		return num == undefined ?
   55.97 +
   55.98 +			// Return a 'clean' array
   55.99 +			jQuery.makeArray( this ) :
  55.100 +
  55.101 +			// Return just the object
  55.102 +			this[num];
  55.103 +	},
  55.104 +	
  55.105 +	pushStack: function( a ) {
  55.106 +		var ret = jQuery(a);
  55.107 +		ret.prevObject = this;
  55.108 +		return ret;
  55.109 +	},
  55.110 +	
  55.111 +	setArray: function( a ) {
  55.112 +		this.length = 0;
  55.113 +		Array.prototype.push.apply( this, a );
  55.114 +		return this;
  55.115 +	},
  55.116 +
  55.117 +	each: function( fn, args ) {
  55.118 +		return jQuery.each( this, fn, args );
  55.119 +	},
  55.120 +
  55.121 +	index: function( obj ) {
  55.122 +		var pos = -1;
  55.123 +		this.each(function(i){
  55.124 +			if ( this == obj ) pos = i;
  55.125 +		});
  55.126 +		return pos;
  55.127 +	},
  55.128 +
  55.129 +	attr: function( key, value, type ) {
  55.130 +		var obj = key;
  55.131 +		
  55.132 +		// Look for the case where we're accessing a style value
  55.133 +		if ( key.constructor == String )
  55.134 +			if ( value == undefined )
  55.135 +				return this.length && jQuery[ type || "attr" ]( this[0], key ) || undefined;
  55.136 +			else {
  55.137 +				obj = {};
  55.138 +				obj[ key ] = value;
  55.139 +			}
  55.140 +		
  55.141 +		// Check to see if we're setting style values
  55.142 +		return this.each(function(index){
  55.143 +			// Set all the styles
  55.144 +			for ( var prop in obj )
  55.145 +				jQuery.attr(
  55.146 +					type ? this.style : this,
  55.147 +					prop, jQuery.prop(this, obj[prop], type, index, prop)
  55.148 +				);
  55.149 +		});
  55.150 +	},
  55.151 +
  55.152 +	css: function( key, value ) {
  55.153 +		return this.attr( key, value, "curCSS" );
  55.154 +	},
  55.155 +
  55.156 +	text: function(e) {
  55.157 +		if ( typeof e != "object" && e != null )
  55.158 +			return this.empty().append( document.createTextNode( e ) );
  55.159 +
  55.160 +		var t = "";
  55.161 +		jQuery.each( e || this, function(){
  55.162 +			jQuery.each( this.childNodes, function(){
  55.163 +				if ( this.nodeType != 8 )
  55.164 +					t += this.nodeType != 1 ?
  55.165 +						this.nodeValue : jQuery.fn.text([ this ]);
  55.166 +			});
  55.167 +		});
  55.168 +		return t;
  55.169 +	},
  55.170 +
  55.171 +	wrapAll: function(html) {
  55.172 +		if ( this[0] )
  55.173 +			// The elements to wrap the target around
  55.174 +			jQuery(html, this[0].ownerDocument)
  55.175 +				.clone()
  55.176 +				.insertBefore(this[0])
  55.177 +				.map(function(){
  55.178 +					var elem = this;
  55.179 +					while ( elem.firstChild )
  55.180 +						elem = elem.firstChild;
  55.181 +					return elem;
  55.182 +				})
  55.183 +				.append(this);
  55.184 +
  55.185 +		return this;
  55.186 +	},
  55.187 +
  55.188 +	wrapInner: function(html) {
  55.189 +		return this.each(function(){
  55.190 +			jQuery(this).contents().wrapAll(html);
  55.191 +		});
  55.192 +	},
  55.193 +
  55.194 +	wrap: function(html) {
  55.195 +		return this.each(function(){
  55.196 +			jQuery(this).wrapAll(html);
  55.197 +		});
  55.198 +	},
  55.199 +
  55.200 +	append: function() {
  55.201 +		return this.domManip(arguments, true, 1, function(a){
  55.202 +			this.appendChild( a );
  55.203 +		});
  55.204 +	},
  55.205 +
  55.206 +	prepend: function() {
  55.207 +		return this.domManip(arguments, true, -1, function(a){
  55.208 +			this.insertBefore( a, this.firstChild );
  55.209 +		});
  55.210 +	},
  55.211 +	
  55.212 +	before: function() {
  55.213 +		return this.domManip(arguments, false, 1, function(a){
  55.214 +			this.parentNode.insertBefore( a, this );
  55.215 +		});
  55.216 +	},
  55.217 +
  55.218 +	after: function() {
  55.219 +		return this.domManip(arguments, false, -1, function(a){
  55.220 +			this.parentNode.insertBefore( a, this.nextSibling );
  55.221 +		});
  55.222 +	},
  55.223 +
  55.224 +	end: function() {
  55.225 +		return this.prevObject || jQuery([]);
  55.226 +	},
  55.227 +
  55.228 +	find: function(t) {
  55.229 +		var data = jQuery.map(this, function(a){ return jQuery.find(t,a); });
  55.230 +		return this.pushStack( /[^+>] [^+>]/.test( t ) || t.indexOf("..") > -1 ?
  55.231 +			jQuery.unique( data ) : data );
  55.232 +	},
  55.233 +
  55.234 +	clone: function(events) {
  55.235 +		// Do the clone
  55.236 +		var ret = this.map(function(){
  55.237 +			return this.outerHTML ? jQuery(this.outerHTML)[0] : this.cloneNode(true);
  55.238 +		});
  55.239 +
  55.240 +		// Need to set the expando to null on the cloned set if it exists
  55.241 +		// removeData doesn't work here, IE removes it from the original as well
  55.242 +		// this is primarily for IE but the data expando shouldn't be copied over in any browser
  55.243 +		var clone = ret.find("*").andSelf().each(function(){
  55.244 +			if ( this[ expando ] != undefined )
  55.245 +				this[ expando ] = null;
  55.246 +		});
  55.247 +		
  55.248 +		// Copy the events from the original to the clone
  55.249 +		if (events === true)
  55.250 +			this.find("*").andSelf().each(function(i) {
  55.251 +				var events = jQuery.data(this, "events");
  55.252 +				for ( var type in events )
  55.253 +					for ( var handler in events[type] )
  55.254 +						jQuery.event.add(clone[i], type, events[type][handler], events[type][handler].data);
  55.255 +			});
  55.256 +
  55.257 +		// Return the cloned set
  55.258 +		return ret;
  55.259 +	},
  55.260 +
  55.261 +	filter: function(t) {
  55.262 +		return this.pushStack(
  55.263 +			jQuery.isFunction( t ) &&
  55.264 +			jQuery.grep(this, function(el, index){
  55.265 +				return t.apply(el, [index]);
  55.266 +			}) ||
  55.267 +
  55.268 +			jQuery.multiFilter(t,this) );
  55.269 +	},
  55.270 +
  55.271 +	not: function(t) {
  55.272 +		return this.pushStack(
  55.273 +			t.constructor == String &&
  55.274 +			jQuery.multiFilter(t, this, true) ||
  55.275 +
  55.276 +			jQuery.grep(this, function(a) {
  55.277 +				return ( t.constructor == Array || t.jquery )
  55.278 +					? jQuery.inArray( a, t ) < 0
  55.279 +					: a != t;
  55.280 +			})
  55.281 +		);
  55.282 +	},
  55.283 +
  55.284 +	add: function(t) {
  55.285 +		return this.pushStack( jQuery.merge(
  55.286 +			this.get(),
  55.287 +			t.constructor == String ?
  55.288 +				jQuery(t).get() :
  55.289 +				t.length != undefined && (!t.nodeName || jQuery.nodeName(t, "form")) ?
  55.290 +					t : [t] )
  55.291 +		);
  55.292 +	},
  55.293 +
  55.294 +	is: function(expr) {
  55.295 +		return expr ? jQuery.multiFilter(expr,this).length > 0 : false;
  55.296 +	},
  55.297 +
  55.298 +	hasClass: function(expr) {
  55.299 +		return this.is("." + expr);
  55.300 +	},
  55.301 +	
  55.302 +	val: function( val ) {
  55.303 +		if ( val == undefined ) {
  55.304 +			if ( this.length ) {
  55.305 +				var elem = this[0];
  55.306 +		    	
  55.307 +				// We need to handle select boxes special
  55.308 +				if ( jQuery.nodeName(elem, "select") ) {
  55.309 +					var index = elem.selectedIndex,
  55.310 +						a = [],
  55.311 +						options = elem.options,
  55.312 +						one = elem.type == "select-one";
  55.313 +					
  55.314 +					// Nothing was selected
  55.315 +					if ( index < 0 )
  55.316 +						return null;
  55.317 +
  55.318 +					// Loop through all the selected options
  55.319 +					for ( var i = one ? index : 0, max = one ? index + 1 : options.length; i < max; i++ ) {
  55.320 +						var option = options[i];
  55.321 +						if ( option.selected ) {
  55.322 +							// Get the specifc value for the option
  55.323 +							var val = jQuery.browser.msie && !option.attributes["value"].specified ? option.text : option.value;
  55.324 +							
  55.325 +							// We don't need an array for one selects
  55.326 +							if ( one )
  55.327 +								return val;
  55.328 +							
  55.329 +							// Multi-Selects return an array
  55.330 +							a.push(val);
  55.331 +						}
  55.332 +					}
  55.333 +					
  55.334 +					return a;
  55.335 +					
  55.336 +				// Everything else, we just grab the value
  55.337 +				} else
  55.338 +					return this[0].value.replace(/\r/g, "");
  55.339 +			}
  55.340 +		} else
  55.341 +			return this.each(function(){
  55.342 +				if ( val.constructor == Array && /radio|checkbox/.test(this.type) )
  55.343 +					this.checked = (jQuery.inArray(this.value, val) >= 0 ||
  55.344 +						jQuery.inArray(this.name, val) >= 0);
  55.345 +				else if ( jQuery.nodeName(this, "select") ) {
  55.346 +					var tmp = val.constructor == Array ? val : [val];
  55.347 +
  55.348 +					jQuery("option", this).each(function(){
  55.349 +						this.selected = (jQuery.inArray(this.value, tmp) >= 0 ||
  55.350 +						jQuery.inArray(this.text, tmp) >= 0);
  55.351 +					});
  55.352 +
  55.353 +					if ( !tmp.length )
  55.354 +						this.selectedIndex = -1;
  55.355 +				} else
  55.356 +					this.value = val;
  55.357 +			});
  55.358 +	},
  55.359 +	
  55.360 +	html: function( val ) {
  55.361 +		return val == undefined ?
  55.362 +			( this.length ? this[0].innerHTML : null ) :
  55.363 +			this.empty().append( val );
  55.364 +	},
  55.365 +
  55.366 +	replaceWith: function( val ) {
  55.367 +		return this.after( val ).remove();
  55.368 +	},
  55.369 +
  55.370 +	eq: function(i){
  55.371 +		return this.slice(i, i+1);
  55.372 +	},
  55.373 +
  55.374 +	slice: function() {
  55.375 +		return this.pushStack( Array.prototype.slice.apply( this, arguments ) );
  55.376 +	},
  55.377 +
  55.378 +	map: function(fn) {
  55.379 +		return this.pushStack(jQuery.map( this, function(elem,i){
  55.380 +			return fn.call( elem, i, elem );
  55.381 +		}));
  55.382 +	},
  55.383 +
  55.384 +	andSelf: function() {
  55.385 +		return this.add( this.prevObject );
  55.386 +	},
  55.387 +	
  55.388 +	domManip: function(args, table, dir, fn) {
  55.389 +		var clone = this.length > 1, a; 
  55.390 +
  55.391 +		return this.each(function(){
  55.392 +			if ( !a ) {
  55.393 +				a = jQuery.clean(args, this.ownerDocument);
  55.394 +				if ( dir < 0 )
  55.395 +					a.reverse();
  55.396 +			}
  55.397 +
  55.398 +			var obj = this;
  55.399 +
  55.400 +			if ( table && jQuery.nodeName(this, "table") && jQuery.nodeName(a[0], "tr") )
  55.401 +				obj = this.getElementsByTagName("tbody")[0] || this.appendChild(document.createElement("tbody"));
  55.402 +
  55.403 +			jQuery.each( a, function(){
  55.404 +				var elem = clone ? this.cloneNode(true) : this;
  55.405 +				if ( !evalScript(0, elem) )
  55.406 +					fn.call( obj, elem );
  55.407 +			});
  55.408 +		});
  55.409 +	}
  55.410 +};
  55.411 +
  55.412 +function evalScript(i, elem){
  55.413 +	var script = jQuery.nodeName(elem, "script");
  55.414 +
  55.415 +	if ( script ) {
  55.416 +		if ( elem.src )
  55.417 +			jQuery.ajax({ url: elem.src, async: false, dataType: "script" });
  55.418 +		else
  55.419 +			jQuery.globalEval( elem.text || elem.textContent || elem.innerHTML || "" );
  55.420 +	
  55.421 +		if ( elem.parentNode )
  55.422 +			elem.parentNode.removeChild(elem);
  55.423 +
  55.424 +	} else if ( elem.nodeType == 1 )
  55.425 +    jQuery("script", elem).each(evalScript);
  55.426 +
  55.427 +	return script;
  55.428 +}
  55.429 +
  55.430 +jQuery.extend = jQuery.fn.extend = function() {
  55.431 +	// copy reference to target object
  55.432 +	var target = arguments[0] || {}, a = 1, al = arguments.length, deep = false;
  55.433 +
  55.434 +	// Handle a deep copy situation
  55.435 +	if ( target.constructor == Boolean ) {
  55.436 +		deep = target;
  55.437 +		target = arguments[1] || {};
  55.438 +	}
  55.439 +
  55.440 +	// extend jQuery itself if only one argument is passed
  55.441 +	if ( al == 1 ) {
  55.442 +		target = this;
  55.443 +		a = 0;
  55.444 +	}
  55.445 +
  55.446 +	var prop;
  55.447 +
  55.448 +	for ( ; a < al; a++ )
  55.449 +		// Only deal with non-null/undefined values
  55.450 +		if ( (prop = arguments[a]) != null )
  55.451 +			// Extend the base object
  55.452 +			for ( var i in prop ) {
  55.453 +				// Prevent never-ending loop
  55.454 +				if ( target == prop[i] )
  55.455 +					continue;
  55.456 +
  55.457 +				// Recurse if we're merging object values
  55.458 +				if ( deep && typeof prop[i] == 'object' && target[i] )
  55.459 +					jQuery.extend( target[i], prop[i] );
  55.460 +
  55.461 +				// Don't bring in undefined values
  55.462 +				else if ( prop[i] != undefined )
  55.463 +					target[i] = prop[i];
  55.464 +			}
  55.465 +
  55.466 +	// Return the modified object
  55.467 +	return target;
  55.468 +};
  55.469 +
  55.470 +var expando = "jQuery" + (new Date()).getTime(), uuid = 0, win = {};
  55.471 +
  55.472 +jQuery.extend({
  55.473 +	noConflict: function(deep) {
  55.474 +		window.$ = _$;
  55.475 +		if ( deep )
  55.476 +			window.jQuery = _jQuery;
  55.477 +		return jQuery;
  55.478 +	},
  55.479 +
  55.480 +	// This may seem like some crazy code, but trust me when I say that this
  55.481 +	// is the only cross-browser way to do this. --John
  55.482 +	isFunction: function( fn ) {
  55.483 +		return !!fn && typeof fn != "string" && !fn.nodeName && 
  55.484 +			fn.constructor != Array && /function/i.test( fn + "" );
  55.485 +	},
  55.486 +	
  55.487 +	// check if an element is in a XML document
  55.488 +	isXMLDoc: function(elem) {
  55.489 +		return elem.documentElement && !elem.body ||
  55.490 +			elem.tagName && elem.ownerDocument && !elem.ownerDocument.body;
  55.491 +	},
  55.492 +
  55.493 +	// Evalulates a script in a global context
  55.494 +	// Evaluates Async. in Safari 2 :-(
  55.495 +	globalEval: function( data ) {
  55.496 +		data = jQuery.trim( data );
  55.497 +		if ( data ) {
  55.498 +			if ( window.execScript )
  55.499 +				window.execScript( data );
  55.500 +			else if ( jQuery.browser.safari )
  55.501 +				// safari doesn't provide a synchronous global eval
  55.502 +				window.setTimeout( data, 0 );
  55.503 +			else
  55.504 +				eval.call( window, data );
  55.505 +		}
  55.506 +	},
  55.507 +
  55.508 +	nodeName: function( elem, name ) {
  55.509 +		return elem.nodeName && elem.nodeName.toUpperCase() == name.toUpperCase();
  55.510 +	},
  55.511 +	
  55.512 +	cache: {},
  55.513 +	
  55.514 +	data: function( elem, name, data ) {
  55.515 +		elem = elem == window ? win : elem;
  55.516 +
  55.517 +		var id = elem[ expando ];
  55.518 +
  55.519 +		// Compute a unique ID for the element
  55.520 +		if ( !id ) 
  55.521 +			id = elem[ expando ] = ++uuid;
  55.522 +
  55.523 +		// Only generate the data cache if we're
  55.524 +		// trying to access or manipulate it
  55.525 +		if ( name && !jQuery.cache[ id ] )
  55.526 +			jQuery.cache[ id ] = {};
  55.527 +		
  55.528 +		// Prevent overriding the named cache with undefined values
  55.529 +		if ( data != undefined )
  55.530 +			jQuery.cache[ id ][ name ] = data;
  55.531 +		
  55.532 +		// Return the named cache data, or the ID for the element	
  55.533 +		return name ? jQuery.cache[ id ][ name ] : id;
  55.534 +	},
  55.535 +	
  55.536 +	removeData: function( elem, name ) {
  55.537 +		elem = elem == window ? win : elem;
  55.538 +
  55.539 +		var id = elem[ expando ];
  55.540 +
  55.541 +		// If we want to remove a specific section of the element's data
  55.542 +		if ( name ) {
  55.543 +			if ( jQuery.cache[ id ] ) {
  55.544 +				// Remove the section of cache data
  55.545 +				delete jQuery.cache[ id ][ name ];
  55.546 +
  55.547 +				// If we've removed all the data, remove the element's cache
  55.548 +				name = "";
  55.549 +				for ( name in jQuery.cache[ id ] ) break;
  55.550 +				if ( !name )
  55.551 +					jQuery.removeData( elem );
  55.552 +			}
  55.553 +
  55.554 +		// Otherwise, we want to remove all of the element's data
  55.555 +		} else {
  55.556 +			// Clean up the element expando
  55.557 +			try {
  55.558 +				delete elem[ expando ];
  55.559 +			} catch(e){
  55.560 +				// IE has trouble directly removing the expando
  55.561 +				// but it's ok with using removeAttribute
  55.562 +				if ( elem.removeAttribute )
  55.563 +					elem.removeAttribute( expando );
  55.564 +			}
  55.565 +
  55.566 +			// Completely remove the data cache
  55.567 +			delete jQuery.cache[ id ];
  55.568 +		}
  55.569 +	},
  55.570 +
  55.571 +	// args is for internal usage only
  55.572 +	each: function( obj, fn, args ) {
  55.573 +		if ( args ) {
  55.574 +			if ( obj.length == undefined )
  55.575 +				for ( var i in obj )
  55.576 +					fn.apply( obj[i], args );
  55.577 +			else
  55.578 +				for ( var i = 0, ol = obj.length; i < ol; i++ )
  55.579 +					if ( fn.apply( obj[i], args ) === false ) break;
  55.580 +
  55.581 +		// A special, fast, case for the most common use of each
  55.582 +		} else {
  55.583 +			if ( obj.length == undefined )
  55.584 +				for ( var i in obj )
  55.585 +					fn.call( obj[i], i, obj[i] );
  55.586 +			else
  55.587 +				for ( var i = 0, ol = obj.length, val = obj[0]; 
  55.588 +					i < ol && fn.call(val,i,val) !== false; val = obj[++i] ){}
  55.589 +		}
  55.590 +
  55.591 +		return obj;
  55.592 +	},
  55.593 +	
  55.594 +	prop: function(elem, value, type, index, prop){
  55.595 +			// Handle executable functions
  55.596 +			if ( jQuery.isFunction( value ) )
  55.597 +				value = value.call( elem, [index] );
  55.598 +				
  55.599 +			// exclude the following css properties to add px
  55.600 +			var exclude = /z-?index|font-?weight|opacity|zoom|line-?height/i;
  55.601 +
  55.602 +			// Handle passing in a number to a CSS property
  55.603 +			return value && value.constructor == Number && type == "curCSS" && !exclude.test(prop) ?
  55.604 +				value + "px" :
  55.605 +				value;
  55.606 +	},
  55.607 +
  55.608 +	className: {
  55.609 +		// internal only, use addClass("class")
  55.610 +		add: function( elem, c ){
  55.611 +			jQuery.each( (c || "").split(/\s+/), function(i, cur){
  55.612 +				if ( !jQuery.className.has( elem.className, cur ) )
  55.613 +					elem.className += ( elem.className ? " " : "" ) + cur;
  55.614 +			});
  55.615 +		},
  55.616 +
  55.617 +		// internal only, use removeClass("class")
  55.618 +		remove: function( elem, c ){
  55.619 +			elem.className = c != undefined ?
  55.620 +				jQuery.grep( elem.className.split(/\s+/), function(cur){
  55.621 +					return !jQuery.className.has( c, cur );	
  55.622 +				}).join(" ") : "";
  55.623 +		},
  55.624 +
  55.625 +		// internal only, use is(".class")
  55.626 +		has: function( t, c ) {
  55.627 +			return jQuery.inArray( c, (t.className || t).toString().split(/\s+/) ) > -1;
  55.628 +		}
  55.629 +	},
  55.630 +
  55.631 +	swap: function(e,o,f) {
  55.632 +		for ( var i in o ) {
  55.633 +			e.style["old"+i] = e.style[i];
  55.634 +			e.style[i] = o[i];
  55.635 +		}
  55.636 +		f.apply( e, [] );
  55.637 +		for ( var i in o )
  55.638 +			e.style[i] = e.style["old"+i];
  55.639 +	},
  55.640 +
  55.641 +	css: function(e,p) {
  55.642 +		if ( p == "height" || p == "width" ) {
  55.643 +			var old = {}, oHeight, oWidth, d = ["Top","Bottom","Right","Left"];
  55.644 +
  55.645 +			jQuery.each( d, function(){
  55.646 +				old["padding" + this] = 0;
  55.647 +				old["border" + this + "Width"] = 0;
  55.648 +			});
  55.649 +
  55.650 +			jQuery.swap( e, old, function() {
  55.651 +				if ( jQuery(e).is(':visible') ) {
  55.652 +					oHeight = e.offsetHeight;
  55.653 +					oWidth = e.offsetWidth;
  55.654 +				} else {
  55.655 +					e = jQuery(e.cloneNode(true))
  55.656 +						.find(":radio").removeAttr("checked").end()
  55.657 +						.css({
  55.658 +							visibility: "hidden", position: "absolute", display: "block", right: "0", left: "0"
  55.659 +						}).appendTo(e.parentNode)[0];
  55.660 +
  55.661 +					var parPos = jQuery.css(e.parentNode,"position") || "static";
  55.662 +					if ( parPos == "static" )
  55.663 +						e.parentNode.style.position = "relative";
  55.664 +
  55.665 +					oHeight = e.clientHeight;
  55.666 +					oWidth = e.clientWidth;
  55.667 +
  55.668 +					if ( parPos == "static" )
  55.669 +						e.parentNode.style.position = "static";
  55.670 +
  55.671 +					e.parentNode.removeChild(e);
  55.672 +				}
  55.673 +			});
  55.674 +
  55.675 +			return p == "height" ? oHeight : oWidth;
  55.676 +		}
  55.677 +
  55.678 +		return jQuery.curCSS( e, p );
  55.679 +	},
  55.680 +
  55.681 +	curCSS: function(elem, prop, force) {
  55.682 +		var ret, stack = [], swap = [];
  55.683 +
  55.684 +		// A helper method for determining if an element's values are broken
  55.685 +		function color(a){
  55.686 +			if ( !jQuery.browser.safari )
  55.687 +				return false;
  55.688 +
  55.689 +			var ret = document.defaultView.getComputedStyle(a,null);
  55.690 +			return !ret || ret.getPropertyValue("color") == "";
  55.691 +		}
  55.692 +
  55.693 +		if (prop == "opacity" && jQuery.browser.msie) {
  55.694 +			ret = jQuery.attr(elem.style, "opacity");
  55.695 +			return ret == "" ? "1" : ret;
  55.696 +		}
  55.697 +		
  55.698 +		if (prop.match(/float/i))
  55.699 +			prop = styleFloat;
  55.700 +
  55.701 +		if (!force && elem.style[prop])
  55.702 +			ret = elem.style[prop];
  55.703 +
  55.704 +		else if (document.defaultView && document.defaultView.getComputedStyle) {
  55.705 +
  55.706 +			if (prop.match(/float/i))
  55.707 +				prop = "float";
  55.708 +
  55.709 +			prop = prop.replace(/([A-Z])/g,"-$1").toLowerCase();
  55.710 +			var cur = document.defaultView.getComputedStyle(elem, null);
  55.711 +
  55.712 +			if ( cur && !color(elem) )
  55.713 +				ret = cur.getPropertyValue(prop);
  55.714 +
  55.715 +			// If the element isn't reporting its values properly in Safari
  55.716 +			// then some display: none elements are involved
  55.717 +			else {
  55.718 +				// Locate all of the parent display: none elements
  55.719 +				for ( var a = elem; a && color(a); a = a.parentNode )
  55.720 +					stack.unshift(a);
  55.721 +
  55.722 +				// Go through and make them visible, but in reverse
  55.723 +				// (It would be better if we knew the exact display type that they had)
  55.724 +				for ( a = 0; a < stack.length; a++ )
  55.725 +					if ( color(stack[a]) ) {
  55.726 +						swap[a] = stack[a].style.display;
  55.727 +						stack[a].style.display = "block";
  55.728 +					}
  55.729 +
  55.730 +				// Since we flip the display style, we have to handle that
  55.731 +				// one special, otherwise get the value
  55.732 +				ret = prop == "display" && swap[stack.length-1] != null ?
  55.733 +					"none" :
  55.734 +					document.defaultView.getComputedStyle(elem,null).getPropertyValue(prop) || "";
  55.735 +
  55.736 +				// Finally, revert the display styles back
  55.737 +				for ( a = 0; a < swap.length; a++ )
  55.738 +					if ( swap[a] != null )
  55.739 +						stack[a].style.display = swap[a];
  55.740 +			}
  55.741 +
  55.742 +			if ( prop == "opacity" && ret == "" )
  55.743 +				ret = "1";
  55.744 +
  55.745 +		} else if (elem.currentStyle) {
  55.746 +			var newProp = prop.replace(/\-(\w)/g,function(m,c){return c.toUpperCase();});
  55.747 +			ret = elem.currentStyle[prop] || elem.currentStyle[newProp];
  55.748 +
  55.749 +			// From the awesome hack by Dean Edwards
  55.750 +			// http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291
  55.751 +
  55.752 +			// If we're not dealing with a regular pixel number
  55.753 +			// but a number that has a weird ending, we need to convert it to pixels
  55.754 +			if ( !/^\d+(px)?$/i.test(ret) && /^\d/.test(ret) ) {
  55.755 +				var style = elem.style.left;
  55.756 +				var runtimeStyle = elem.runtimeStyle.left;
  55.757 +				elem.runtimeStyle.left = elem.currentStyle.left;
  55.758 +				elem.style.left = ret || 0;
  55.759 +				ret = elem.style.pixelLeft + "px";
  55.760 +				elem.style.left = style;
  55.761 +				elem.runtimeStyle.left = runtimeStyle;
  55.762 +			}
  55.763 +		}
  55.764 +
  55.765 +		return ret;
  55.766 +	},
  55.767 +	
  55.768 +	clean: function(a, doc) {
  55.769 +		var r = [];
  55.770 +		doc = doc || document;
  55.771 +
  55.772 +		jQuery.each( a, function(i,arg){
  55.773 +			if ( !arg ) return;
  55.774 +
  55.775 +			if ( arg.constructor == Number )
  55.776 +				arg = arg.toString();
  55.777 +			
  55.778 +			// Convert html string into DOM nodes
  55.779 +			if ( typeof arg == "string" ) {
  55.780 +				// Fix "XHTML"-style tags in all browsers
  55.781 +				arg = arg.replace(/(<(\w+)[^>]*?)\/>/g, function(m, all, tag){
  55.782 +					return tag.match(/^(abbr|br|col|img|input|link|meta|param|hr|area)$/i)? m : all+"></"+tag+">";
  55.783 +				});
  55.784 +
  55.785 +				// Trim whitespace, otherwise indexOf won't work as expected
  55.786 +				var s = jQuery.trim(arg).toLowerCase(), div = doc.createElement("div"), tb = [];
  55.787 +
  55.788 +				var wrap =
  55.789 +					// option or optgroup
  55.790 +					!s.indexOf("<opt") &&
  55.791 +					[1, "<select>", "</select>"] ||
  55.792 +					
  55.793 +					!s.indexOf("<leg") &&
  55.794 +					[1, "<fieldset>", "</fieldset>"] ||
  55.795 +					
  55.796 +					s.match(/^<(thead|tbody|tfoot|colg|cap)/) &&
  55.797 +					[1, "<table>", "</table>"] ||
  55.798 +					
  55.799 +					!s.indexOf("<tr") &&
  55.800 +					[2, "<table><tbody>", "</tbody></table>"] ||
  55.801 +					
  55.802 +				 	// <thead> matched above
  55.803 +					(!s.indexOf("<td") || !s.indexOf("<th")) &&
  55.804 +					[3, "<table><tbody><tr>", "</tr></tbody></table>"] ||
  55.805 +					
  55.806 +					!s.indexOf("<col") &&
  55.807 +					[2, "<table><tbody></tbody><colgroup>", "</colgroup></table>"] ||
  55.808 +
  55.809 +					// IE can't serialize <link> and <script> tags normally
  55.810 +					jQuery.browser.msie &&
  55.811 +					[1, "div<div>", "</div>"] ||
  55.812 +					
  55.813 +					[0,"",""];
  55.814 +
  55.815 +				// Go to html and back, then peel off extra wrappers
  55.816 +				div.innerHTML = wrap[1] + arg + wrap[2];
  55.817 +				
  55.818 +				// Move to the right depth
  55.819 +				while ( wrap[0]-- )
  55.820 +					div = div.lastChild;
  55.821 +				
  55.822 +				// Remove IE's autoinserted <tbody> from table fragments
  55.823 +				if ( jQuery.browser.msie ) {
  55.824 +					
  55.825 +					// String was a <table>, *may* have spurious <tbody>
  55.826 +					if ( !s.indexOf("<table") && s.indexOf("<tbody") < 0 ) 
  55.827 +						tb = div.firstChild && div.firstChild.childNodes;
  55.828 +						
  55.829 +					// String was a bare <thead> or <tfoot>
  55.830 +					else if ( wrap[1] == "<table>" && s.indexOf("<tbody") < 0 )
  55.831 +						tb = div.childNodes;
  55.832 +
  55.833 +					for ( var n = tb.length-1; n >= 0 ; --n )
  55.834 +						if ( jQuery.nodeName(tb[n], "tbody") && !tb[n].childNodes.length )
  55.835 +							tb[n].parentNode.removeChild(tb[n]);
  55.836 +	
  55.837 +					// IE completely kills leading whitespace when innerHTML is used	
  55.838 +					if ( /^\s/.test(arg) )	
  55.839 +						div.insertBefore( doc.createTextNode( arg.match(/^\s*/)[0] ), div.firstChild );
  55.840 +
  55.841 +				}
  55.842 +				
  55.843 +				arg = jQuery.makeArray( div.childNodes );
  55.844 +			}
  55.845 +
  55.846 +			if ( 0 === arg.length && (!jQuery.nodeName(arg, "form") && !jQuery.nodeName(arg, "select")) )
  55.847 +				return;
  55.848 +
  55.849 +			if ( arg[0] == undefined || jQuery.nodeName(arg, "form") || arg.options )
  55.850 +				r.push( arg );
  55.851 +			else
  55.852 +				r = jQuery.merge( r, arg );
  55.853 +
  55.854 +		});
  55.855 +
  55.856 +		return r;
  55.857 +	},
  55.858 +	
  55.859 +	attr: function(elem, name, value){
  55.860 +		var fix = jQuery.isXMLDoc(elem) ? {} : jQuery.props;
  55.861 +
  55.862 +		// Safari mis-reports the default selected property of a hidden option
  55.863 +		// Accessing the parent's selectedIndex property fixes it
  55.864 +		if ( name == "selected" && jQuery.browser.safari )
  55.865 +			elem.parentNode.selectedIndex;
  55.866 +		
  55.867 +		// Certain attributes only work when accessed via the old DOM 0 way
  55.868 +		if ( fix[name] ) {
  55.869 +			if ( value != undefined ) elem[fix[name]] = value;
  55.870 +			return elem[fix[name]];
  55.871 +		} else if ( jQuery.browser.msie && name == "style" )
  55.872 +			return jQuery.attr( elem.style, "cssText", value );
  55.873 +
  55.874 +		else if ( value == undefined && jQuery.browser.msie && jQuery.nodeName(elem, "form") && (name == "action" || name == "method") )
  55.875 +			return elem.getAttributeNode(name).nodeValue;
  55.876 +
  55.877 +		// IE elem.getAttribute passes even for style
  55.878 +		else if ( elem.tagName ) {
  55.879 +
  55.880 +			if ( value != undefined ) {
  55.881 +				if ( name == "type" && jQuery.nodeName(elem,"input") && elem.parentNode )
  55.882 +					throw "type property can't be changed";
  55.883 +				elem.setAttribute( name, value );
  55.884 +			}
  55.885 +
  55.886 +			if ( jQuery.browser.msie && /href|src/.test(name) && !jQuery.isXMLDoc(elem) ) 
  55.887 +				return elem.getAttribute( name, 2 );
  55.888 +
  55.889 +			return elem.getAttribute( name );
  55.890 +
  55.891 +		// elem is actually elem.style ... set the style
  55.892 +		} else {
  55.893 +			// IE actually uses filters for opacity
  55.894 +			if ( name == "opacity" && jQuery.browser.msie ) {
  55.895 +				if ( value != undefined ) {
  55.896 +					// IE has trouble with opacity if it does not have layout
  55.897 +					// Force it by setting the zoom level
  55.898 +					elem.zoom = 1; 
  55.899 +	
  55.900 +					// Set the alpha filter to set the opacity
  55.901 +					elem.filter = (elem.filter || "").replace(/alpha\([^)]*\)/,"") +
  55.902 +						(parseFloat(value).toString() == "NaN" ? "" : "alpha(opacity=" + value * 100 + ")");
  55.903 +				}
  55.904 +	
  55.905 +				return elem.filter ? 
  55.906 +					(parseFloat( elem.filter.match(/opacity=([^)]*)/)[1] ) / 100).toString() : "";
  55.907 +			}
  55.908 +			name = name.replace(/-([a-z])/ig,function(z,b){return b.toUpperCase();});
  55.909 +			if ( value != undefined ) elem[name] = value;
  55.910 +			return elem[name];
  55.911 +		}
  55.912 +	},
  55.913 +	
  55.914 +	trim: function(t){
  55.915 +		return (t||"").replace(/^\s+|\s+$/g, "");
  55.916 +	},
  55.917 +
  55.918 +	makeArray: function( a ) {
  55.919 +		var r = [];
  55.920 +
  55.921 +		// Need to use typeof to fight Safari childNodes crashes
  55.922 +		if ( typeof a != "array" )
  55.923 +			for ( var i = 0, al = a.length; i < al; i++ )
  55.924 +				r.push( a[i] );
  55.925 +		else
  55.926 +			r = a.slice( 0 );
  55.927 +
  55.928 +		return r;
  55.929 +	},
  55.930 +
  55.931 +	inArray: function( b, a ) {
  55.932 +		for ( var i = 0, al = a.length; i < al; i++ )
  55.933 +			if ( a[i] == b )
  55.934 +				return i;
  55.935 +		return -1;
  55.936 +	},
  55.937 +
  55.938 +	merge: function(first, second) {
  55.939 +		// We have to loop this way because IE & Opera overwrite the length
  55.940 +		// expando of getElementsByTagName
  55.941 +
  55.942 +		// Also, we need to make sure that the correct elements are being returned
  55.943 +		// (IE returns comment nodes in a '*' query)
  55.944 +		if ( jQuery.browser.msie ) {
  55.945 +			for ( var i = 0; second[i]; i++ )
  55.946 +				if ( second[i].nodeType != 8 )
  55.947 +					first.push(second[i]);
  55.948 +		} else
  55.949 +			for ( var i = 0; second[i]; i++ )
  55.950 +				first.push(second[i]);
  55.951 +
  55.952 +		return first;
  55.953 +	},
  55.954 +
  55.955 +	unique: function(first) {
  55.956 +		var r = [], done = {};
  55.957 +
  55.958 +		try {
  55.959 +			for ( var i = 0, fl = first.length; i < fl; i++ ) {
  55.960 +				var id = jQuery.data(first[i]);
  55.961 +				if ( !done[id] ) {
  55.962 +					done[id] = true;
  55.963 +					r.push(first[i]);
  55.964 +				}
  55.965 +			}
  55.966 +		} catch(e) {
  55.967 +			r = first;
  55.968 +		}
  55.969 +
  55.970 +		return r;
  55.971 +	},
  55.972 +
  55.973 +	grep: function(elems, fn, inv) {
  55.974 +		// If a string is passed in for the function, make a function
  55.975 +		// for it (a handy shortcut)
  55.976 +		if ( typeof fn == "string" )
  55.977 +			fn = eval("false||function(a,i){return " + fn + "}");
  55.978 +
  55.979 +		var result = [];
  55.980 +
  55.981 +		// Go through the array, only saving the items
  55.982 +		// that pass the validator function
  55.983 +		for ( var i = 0, el = elems.length; i < el; i++ )
  55.984 +			if ( !inv && fn(elems[i],i) || inv && !fn(elems[i],i) )
  55.985 +				result.push( elems[i] );
  55.986 +
  55.987 +		return result;
  55.988 +	},
  55.989 +
  55.990 +	map: function(elems, fn) {
  55.991 +		// If a string is passed in for the function, make a function
  55.992 +		// for it (a handy shortcut)
  55.993 +		if ( typeof fn == "string" )
  55.994 +			fn = eval("false||function(a){return " + fn + "}");
  55.995 +
  55.996 +		var result = [];
  55.997 +
  55.998 +		// Go through the array, translating each of the items to their
  55.999 +		// new value (or values).
 55.1000 +		for ( var i = 0, el = elems.length; i < el; i++ ) {
 55.1001 +			var val = fn(elems[i],i);
 55.1002 +
 55.1003 +			if ( val !== null && val != undefined ) {
 55.1004 +				if ( val.constructor != Array ) val = [val];
 55.1005 +				result = result.concat( val );
 55.1006 +			}
 55.1007 +		}
 55.1008 +
 55.1009 +		return result;
 55.1010 +	}
 55.1011 +});
 55.1012 +
 55.1013 +var userAgent = navigator.userAgent.toLowerCase();
 55.1014 +
 55.1015 +// Figure out what browser is being used
 55.1016 +jQuery.browser = {
 55.1017 +	version: (userAgent.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/) || [])[1],
 55.1018 +	safari: /webkit/.test(userAgent),
 55.1019 +	opera: /opera/.test(userAgent),
 55.1020 +	msie: /msie/.test(userAgent) && !/opera/.test(userAgent),
 55.1021 +	mozilla: /mozilla/.test(userAgent) && !/(compatible|webkit)/.test(userAgent)
 55.1022 +};
 55.1023 +
 55.1024 +var styleFloat = jQuery.browser.msie ? "styleFloat" : "cssFloat";
 55.1025 +	
 55.1026 +jQuery.extend({
 55.1027 +	// Check to see if the W3C box model is being used
 55.1028 +	boxModel: !jQuery.browser.msie || document.compatMode == "CSS1Compat",
 55.1029 +	
 55.1030 +	styleFloat: jQuery.browser.msie ? "styleFloat" : "cssFloat",
 55.1031 +	
 55.1032 +	props: {
 55.1033 +		"for": "htmlFor",
 55.1034 +		"class": "className",
 55.1035 +		"float": styleFloat,
 55.1036 +		cssFloat: styleFloat,
 55.1037 +		styleFloat: styleFloat,
 55.1038 +		innerHTML: "innerHTML",
 55.1039 +		className: "className",
 55.1040 +		value: "value",
 55.1041 +		disabled: "disabled",
 55.1042 +		checked: "checked",
 55.1043 +		readonly: "readOnly",
 55.1044 +		selected: "selected",
 55.1045 +		maxlength: "maxLength"
 55.1046 +	}
 55.1047 +});
 55.1048 +
 55.1049 +jQuery.each({
 55.1050 +	parent: "a.parentNode",
 55.1051 +	parents: "jQuery.dir(a,'parentNode')",
 55.1052 +	next: "jQuery.nth(a,2,'nextSibling')",
 55.1053 +	prev: "jQuery.nth(a,2,'previousSibling')",
 55.1054 +	nextAll: "jQuery.dir(a,'nextSibling')",
 55.1055 +	prevAll: "jQuery.dir(a,'previousSibling')",
 55.1056 +	siblings: "jQuery.sibling(a.parentNode.firstChild,a)",
 55.1057 +	children: "jQuery.sibling(a.firstChild)",
 55.1058 +	contents: "jQuery.nodeName(a,'iframe')?a.contentDocument||a.contentWindow.document:jQuery.makeArray(a.childNodes)"
 55.1059 +}, function(i,n){
 55.1060 +	jQuery.fn[ i ] = function(a) {
 55.1061 +		var ret = jQuery.map(this,n);
 55.1062 +		if ( a && typeof a == "string" )
 55.1063 +			ret = jQuery.multiFilter(a,ret);
 55.1064 +		return this.pushStack( jQuery.unique(ret) );
 55.1065 +	};
 55.1066 +});
 55.1067 +
 55.1068 +jQuery.each({
 55.1069 +	appendTo: "append",
 55.1070 +	prependTo: "prepend",
 55.1071 +	insertBefore: "before",
 55.1072 +	insertAfter: "after",
 55.1073 +	replaceAll: "replaceWith"
 55.1074 +}, function(i,n){
 55.1075 +	jQuery.fn[ i ] = function(){
 55.1076 +		var a = arguments;
 55.1077 +		return this.each(function(){
 55.1078 +			for ( var j = 0, al = a.length; j < al; j++ )
 55.1079 +				jQuery(a[j])[n]( this );
 55.1080 +		});
 55.1081 +	};
 55.1082 +});
 55.1083 +
 55.1084 +jQuery.each( {
 55.1085 +	removeAttr: function( key ) {
 55.1086 +		jQuery.attr( this, key, "" );
 55.1087 +		this.removeAttribute( key );
 55.1088 +	},
 55.1089 +	addClass: function(c){
 55.1090 +		jQuery.className.add(this,c);
 55.1091 +	},
 55.1092 +	removeClass: function(c){
 55.1093 +		jQuery.className.remove(this,c);
 55.1094 +	},
 55.1095 +	toggleClass: function( c ){
 55.1096 +		jQuery.className[ jQuery.className.has(this,c) ? "remove" : "add" ](this, c);
 55.1097 +	},
 55.1098 +	remove: function(a){
 55.1099 +		if ( !a || jQuery.filter( a, [this] ).r.length ) {
 55.1100 +			jQuery.removeData( this );
 55.1101 +			this.parentNode.removeChild( this );
 55.1102 +		}
 55.1103 +	},
 55.1104 +	empty: function() {
 55.1105 +		// Clean up the cache
 55.1106 +		jQuery("*", this).each(function(){ jQuery.removeData(this); });
 55.1107 +
 55.1108 +		while ( this.firstChild )
 55.1109 +			this.removeChild( this.firstChild );
 55.1110 +	}
 55.1111 +}, function(i,n){
 55.1112 +	jQuery.fn[ i ] = function() {
 55.1113 +		return this.each( n, arguments );
 55.1114 +	};
 55.1115 +});
 55.1116 +
 55.1117 +jQuery.each( [ "Height", "Width" ], function(i,name){
 55.1118 +	var n = name.toLowerCase();
 55.1119 +	
 55.1120 +	jQuery.fn[ n ] = function(h) {
 55.1121 +		return this[0] == window ?
 55.1122 +			jQuery.browser.safari && self["inner" + name] ||
 55.1123 +			jQuery.boxModel && Math.max(document.documentElement["client" + name], document.body["client" + name]) ||
 55.1124 +			document.body["client" + name] :
 55.1125 +		
 55.1126 +			this[0] == document ?
 55.1127 +				Math.max( document.body["scroll" + name], document.body["offset" + name] ) :
 55.1128 +        
 55.1129 +				h == undefined ?
 55.1130 +					( this.length ? jQuery.css( this[0], n ) : null ) :
 55.1131 +					this.css( n, h.constructor == String ? h : h + "px" );
 55.1132 +	};
 55.1133 +});
 55.1134 +
 55.1135 +var chars = jQuery.browser.safari && parseInt(jQuery.browser.version) < 417 ?
 55.1136 +		"(?:[\\w*_-]|\\\\.)" :
 55.1137 +		"(?:[\\w\u0128-\uFFFF*_-]|\\\\.)",
 55.1138 +	quickChild = new RegExp("^>\\s*(" + chars + "+)"),
 55.1139 +	quickID = new RegExp("^(" + chars + "+)(#)(" + chars + "+)"),
 55.1140 +	quickClass = new RegExp("^([#.]?)(" + chars + "*)");
 55.1141 +
 55.1142 +jQuery.extend({
 55.1143 +	expr: {
 55.1144 +		"": "m[2]=='*'||jQuery.nodeName(a,m[2])",
 55.1145 +		"#": "a.getAttribute('id')==m[2]",
 55.1146 +		":": {
 55.1147 +			// Position Checks
 55.1148 +			lt: "i<m[3]-0",
 55.1149 +			gt: "i>m[3]-0",
 55.1150 +			nth: "m[3]-0==i",
 55.1151 +			eq: "m[3]-0==i",
 55.1152 +			first: "i==0",
 55.1153 +			last: "i==r.length-1",
 55.1154 +			even: "i%2==0",
 55.1155 +			odd: "i%2",
 55.1156 +
 55.1157 +			// Child Checks
 55.1158 +			"first-child": "a.parentNode.getElementsByTagName('*')[0]==a",
 55.1159 +			"last-child": "jQuery.nth(a.parentNode.lastChild,1,'previousSibling')==a",
 55.1160 +			"only-child": "!jQuery.nth(a.parentNode.lastChild,2,'previousSibling')",
 55.1161 +
 55.1162 +			// Parent Checks
 55.1163 +			parent: "a.firstChild",
 55.1164 +			empty: "!a.firstChild",
 55.1165 +
 55.1166 +			// Text Check
 55.1167 +			contains: "(a.textContent||a.innerText||jQuery(a).text()||'').indexOf(m[3])>=0",
 55.1168 +
 55.1169 +			// Visibility
 55.1170 +			visible: '"hidden"!=a.type&&jQuery.css(a,"display")!="none"&&jQuery.css(a,"visibility")!="hidden"',
 55.1171 +			hidden: '"hidden"==a.type||jQuery.css(a,"display")=="none"||jQuery.css(a,"visibility")=="hidden"',
 55.1172 +
 55.1173 +			// Form attributes
 55.1174 +			enabled: "!a.disabled",
 55.1175 +			disabled: "a.disabled",
 55.1176 +			checked: "a.checked",
 55.1177 +			selected: "a.selected||jQuery.attr(a,'selected')",
 55.1178 +
 55.1179 +			// Form elements
 55.1180 +			text: "'text'==a.type",
 55.1181 +			radio: "'radio'==a.type",
 55.1182 +			checkbox: "'checkbox'==a.type",
 55.1183 +			file: "'file'==a.type",
 55.1184 +			password: "'password'==a.type",
 55.1185 +			submit: "'submit'==a.type",
 55.1186 +			image: "'image'==a.type",
 55.1187 +			reset: "'reset'==a.type",
 55.1188 +			button: '"button"==a.type||jQuery.nodeName(a,"button")',
 55.1189 +			input: "/input|select|textarea|button/i.test(a.nodeName)",
 55.1190 +
 55.1191 +			// :has()
 55.1192 +			has: "jQuery.find(m[3],a).length",
 55.1193 +
 55.1194 +			// :header
 55.1195 +			header: "/h\\d/i.test(a.nodeName)",
 55.1196 +
 55.1197 +			// :animated
 55.1198 +			animated: "jQuery.grep(jQuery.timers,function(fn){return a==fn.elem;}).length"
 55.1199 +		}
 55.1200 +	},
 55.1201 +	
 55.1202 +	// The regular expressions that power the parsing engine
 55.1203 +	parse: [
 55.1204 +		// Match: [@value='test'], [@foo]
 55.1205 +		/^(\[) *@?([\w-]+) *([!*$^~=]*) *('?"?)(.*?)\4 *\]/,
 55.1206 +
 55.1207 +		// Match: :contains('foo')
 55.1208 +		/^(:)([\w-]+)\("?'?(.*?(\(.*?\))?[^(]*?)"?'?\)/,
 55.1209 +
 55.1210 +		// Match: :even, :last-chlid, #id, .class
 55.1211 +		new RegExp("^([:.#]*)(" + chars + "+)")
 55.1212 +	],
 55.1213 +
 55.1214 +	multiFilter: function( expr, elems, not ) {
 55.1215 +		var old, cur = [];
 55.1216 +
 55.1217 +		while ( expr && expr != old ) {
 55.1218 +			old = expr;
 55.1219 +			var f = jQuery.filter( expr, elems, not );
 55.1220 +			expr = f.t.replace(/^\s*,\s*/, "" );
 55.1221 +			cur = not ? elems = f.r : jQuery.merge( cur, f.r );
 55.1222 +		}
 55.1223 +
 55.1224 +		return cur;
 55.1225 +	},
 55.1226 +
 55.1227 +	find: function( t, context ) {
 55.1228 +		// Quickly handle non-string expressions
 55.1229 +		if ( typeof t != "string" )
 55.1230 +			return [ t ];
 55.1231 +
 55.1232 +		// Make sure that the context is a DOM Element
 55.1233 +		if ( context && !context.nodeType )
 55.1234 +			context = null;
 55.1235 +
 55.1236 +		// Set the correct context (if none is provided)
 55.1237 +		context = context || document;
 55.1238 +
 55.1239 +		// Initialize the search
 55.1240 +		var ret = [context], done = [], last;
 55.1241 +
 55.1242 +		// Continue while a selector expression exists, and while
 55.1243 +		// we're no longer looping upon ourselves
 55.1244 +		while ( t && last != t ) {
 55.1245 +			var r = [];
 55.1246 +			last = t;
 55.1247 +
 55.1248 +			t = jQuery.trim(t);
 55.1249 +
 55.1250 +			var foundToken = false;
 55.1251 +
 55.1252 +			// An attempt at speeding up child selectors that
 55.1253 +			// point to a specific element tag
 55.1254 +			var re = quickChild;
 55.1255 +			var m = re.exec(t);
 55.1256 +
 55.1257 +			if ( m ) {
 55.1258 +				var nodeName = m[1].toUpperCase();
 55.1259 +
 55.1260 +				// Perform our own iteration and filter
 55.1261 +				for ( var i = 0; ret[i]; i++ )
 55.1262 +					for ( var c = ret[i].firstChild; c; c = c.nextSibling )
 55.1263 +						if ( c.nodeType == 1 && (nodeName == "*" || c.nodeName.toUpperCase() == nodeName.toUpperCase()) )
 55.1264 +							r.push( c );
 55.1265 +
 55.1266 +				ret = r;
 55.1267 +				t = t.replace( re, "" );
 55.1268 +				if ( t.indexOf(" ") == 0 ) continue;
 55.1269 +				foundToken = true;
 55.1270 +			} else {
 55.1271 +				re = /^([>+~])\s*(\w*)/i;
 55.1272 +
 55.1273 +				if ( (m = re.exec(t)) != null ) {
 55.1274 +					r = [];
 55.1275 +
 55.1276 +					var nodeName = m[2], merge = {};
 55.1277 +					m = m[1];
 55.1278 +
 55.1279 +					for ( var j = 0, rl = ret.length; j < rl; j++ ) {
 55.1280 +						var n = m == "~" || m == "+" ? ret[j].nextSibling : ret[j].firstChild;
 55.1281 +						for ( ; n; n = n.nextSibling )
 55.1282 +							if ( n.nodeType == 1 ) {
 55.1283 +								var id = jQuery.data(n);
 55.1284 +
 55.1285 +								if ( m == "~" && merge[id] ) break;
 55.1286 +								
 55.1287 +								if (!nodeName || n.nodeName.toUpperCase() == nodeName.toUpperCase() ) {
 55.1288 +									if ( m == "~" ) merge[id] = true;
 55.1289 +									r.push( n );
 55.1290 +								}
 55.1291 +								
 55.1292 +								if ( m == "+" ) break;
 55.1293 +							}
 55.1294 +					}
 55.1295 +
 55.1296 +					ret = r;
 55.1297 +
 55.1298 +					// And remove the token
 55.1299 +					t = jQuery.trim( t.replace( re, "" ) );
 55.1300 +					foundToken = true;
 55.1301 +				}
 55.1302 +			}
 55.1303 +
 55.1304 +			// See if there's still an expression, and that we haven't already
 55.1305 +			// matched a token
 55.1306 +			if ( t && !foundToken ) {
 55.1307 +				// Handle multiple expressions
 55.1308 +				if ( !t.indexOf(",") ) {
 55.1309 +					// Clean the result set
 55.1310 +					if ( context == ret[0] ) ret.shift();
 55.1311 +
 55.1312 +					// Merge the result sets
 55.1313 +					done = jQuery.merge( done, ret );
 55.1314 +
 55.1315 +					// Reset the context
 55.1316 +					r = ret = [context];
 55.1317 +
 55.1318 +					// Touch up the selector string
 55.1319 +					t = " " + t.substr(1,t.length);
 55.1320 +
 55.1321 +				} else {
 55.1322 +					// Optimize for the case nodeName#idName
 55.1323 +					var re2 = quickID;
 55.1324 +					var m = re2.exec(t);
 55.1325 +					
 55.1326 +					// Re-organize the results, so that they're consistent
 55.1327 +					if ( m ) {
 55.1328 +					   m = [ 0, m[2], m[3], m[1] ];
 55.1329 +
 55.1330 +					} else {
 55.1331 +						// Otherwise, do a traditional filter check for
 55.1332 +						// ID, class, and element selectors
 55.1333 +						re2 = quickClass;
 55.1334 +						m = re2.exec(t);
 55.1335 +					}
 55.1336 +
 55.1337 +					m[2] = m[2].replace(/\\/g, "");
 55.1338 +
 55.1339 +					var elem = ret[ret.length-1];
 55.1340 +
 55.1341 +					// Try to do a global search by ID, where we can
 55.1342 +					if ( m[1] == "#" && elem && elem.getElementById && !jQuery.isXMLDoc(elem) ) {
 55.1343 +						// Optimization for HTML document case
 55.1344 +						var oid = elem.getElementById(m[2]);
 55.1345 +						
 55.1346 +						// Do a quick check for the existence of the actual ID attribute
 55.1347 +						// to avoid selecting by the name attribute in IE
 55.1348 +						// also check to insure id is a string to avoid selecting an element with the name of 'id' inside a form
 55.1349 +						if ( (jQuery.browser.msie||jQuery.browser.opera) && oid && typeof oid.id == "string" && oid.id != m[2] )
 55.1350 +							oid = jQuery('[@id="'+m[2]+'"]', elem)[0];
 55.1351 +
 55.1352 +						// Do a quick check for node name (where applicable) so
 55.1353 +						// that div#foo searches will be really fast
 55.1354 +						ret = r = oid && (!m[3] || jQuery.nodeName(oid, m[3])) ? [oid] : [];
 55.1355 +					} else {
 55.1356 +						// We need to find all descendant elements
 55.1357 +						for ( var i = 0; ret[i]; i++ ) {
 55.1358 +							// Grab the tag name being searched for
 55.1359 +							var tag = m[1] == "#" && m[3] ? m[3] : m[1] != "" || m[0] == "" ? "*" : m[2];
 55.1360 +
 55.1361 +							// Handle IE7 being really dumb about <object>s
 55.1362 +							if ( tag == "*" && ret[i].nodeName.toLowerCase() == "object" )
 55.1363 +								tag = "param";
 55.1364 +
 55.1365 +							r = jQuery.merge( r, ret[i].getElementsByTagName( tag ));
 55.1366 +						}
 55.1367 +
 55.1368 +						// It's faster to filter by class and be done with it
 55.1369 +						if ( m[1] == "." )
 55.1370 +							r = jQuery.classFilter( r, m[2] );
 55.1371 +
 55.1372 +						// Same with ID filtering
 55.1373 +						if ( m[1] == "#" ) {
 55.1374 +							var tmp = [];
 55.1375 +
 55.1376 +							// Try to find the element with the ID
 55.1377 +							for ( var i = 0; r[i]; i++ )
 55.1378 +								if ( r[i].getAttribute("id") == m[2] ) {
 55.1379 +									tmp = [ r[i] ];
 55.1380 +									break;
 55.1381 +								}
 55.1382 +
 55.1383 +							r = tmp;
 55.1384 +						}
 55.1385 +
 55.1386 +						ret = r;
 55.1387 +					}
 55.1388 +
 55.1389 +					t = t.replace( re2, "" );
 55.1390 +				}
 55.1391 +
 55.1392 +			}
 55.1393 +
 55.1394 +			// If a selector string still exists
 55.1395 +			if ( t ) {
 55.1396 +				// Attempt to filter it
 55.1397 +				var val = jQuery.filter(t,r);
 55.1398 +				ret = r = val.r;
 55.1399 +				t = jQuery.trim(val.t);
 55.1400 +			}
 55.1401 +		}
 55.1402 +
 55.1403 +		// An error occurred with the selector;
 55.1404 +		// just return an empty set instead
 55.1405 +		if ( t )
 55.1406 +			ret = [];
 55.1407 +
 55.1408 +		// Remove the root context
 55.1409 +		if ( ret && context == ret[0] )
 55.1410 +			ret.shift();
 55.1411 +
 55.1412 +		// And combine the results
 55.1413 +		done = jQuery.merge( done, ret );
 55.1414 +
 55.1415 +		return done;
 55.1416 +	},
 55.1417 +
 55.1418 +	classFilter: function(r,m,not){
 55.1419 +		m = " " + m + " ";
 55.1420 +		var tmp = [];
 55.1421 +		for ( var i = 0; r[i]; i++ ) {
 55.1422 +			var pass = (" " + r[i].className + " ").indexOf( m ) >= 0;
 55.1423 +			if ( !not && pass || not && !pass )
 55.1424 +				tmp.push( r[i] );
 55.1425 +		}
 55.1426 +		return tmp;
 55.1427 +	},
 55.1428 +
 55.1429 +	filter: function(t,r,not) {
 55.1430 +		var last;
 55.1431 +
 55.1432 +		// Look for common filter expressions
 55.1433 +		while ( t  && t != last ) {
 55.1434 +			last = t;
 55.1435 +
 55.1436 +			var p = jQuery.parse, m;
 55.1437 +
 55.1438 +			for ( var i = 0; p[i]; i++ ) {
 55.1439 +				m = p[i].exec( t );
 55.1440 +
 55.1441 +				if ( m ) {
 55.1442 +					// Remove what we just matched
 55.1443 +					t = t.substring( m[0].length );
 55.1444 +
 55.1445 +					m[2] = m[2].replace(/\\/g, "");
 55.1446 +					break;
 55.1447 +				}
 55.1448 +			}
 55.1449 +
 55.1450 +			if ( !m )
 55.1451 +				break;
 55.1452 +
 55.1453 +			// :not() is a special case that can be optimized by
 55.1454 +			// keeping it out of the expression list
 55.1455 +			if ( m[1] == ":" && m[2] == "not" )
 55.1456 +				r = jQuery.filter(m[3], r, true).r;
 55.1457 +
 55.1458 +			// We can get a big speed boost by filtering by class here
 55.1459 +			else if ( m[1] == "." )
 55.1460 +				r = jQuery.classFilter(r, m[2], not);
 55.1461 +
 55.1462 +			else if ( m[1] == "[" ) {
 55.1463 +				var tmp = [], type = m[3];
 55.1464 +				
 55.1465 +				for ( var i = 0, rl = r.length; i < rl; i++ ) {
 55.1466 +					var a = r[i], z = a[ jQuery.props[m[2]] || m[2] ];
 55.1467 +					
 55.1468 +					if ( z == null || /href|src|selected/.test(m[2]) )
 55.1469 +						z = jQuery.attr(a,m[2]) || '';
 55.1470 +
 55.1471 +					if ( (type == "" && !!z ||
 55.1472 +						 type == "=" && z == m[5] ||
 55.1473 +						 type == "!=" && z != m[5] ||
 55.1474 +						 type == "^=" && z && !z.indexOf(m[5]) ||
 55.1475 +						 type == "$=" && z.substr(z.length - m[5].length) == m[5] ||
 55.1476 +						 (type == "*=" || type == "~=") && z.indexOf(m[5]) >= 0) ^ not )
 55.1477 +							tmp.push( a );
 55.1478 +				}
 55.1479 +				
 55.1480 +				r = tmp;
 55.1481 +
 55.1482 +			// We can get a speed boost by handling nth-child here
 55.1483 +			} else if ( m[1] == ":" && m[2] == "nth-child" ) {
 55.1484 +				var merge = {}, tmp = [],
 55.1485 +					test = /(\d*)n\+?(\d*)/.exec(
 55.1486 +						m[3] == "even" && "2n" || m[3] == "odd" && "2n+1" ||
 55.1487 +						!/\D/.test(m[3]) && "n+" + m[3] || m[3]),
 55.1488 +					first = (test[1] || 1) - 0, last = test[2] - 0;
 55.1489 +
 55.1490 +				for ( var i = 0, rl = r.length; i < rl; i++ ) {
 55.1491 +					var node = r[i], parentNode = node.parentNode, id = jQuery.data(parentNode);
 55.1492 +
 55.1493 +					if ( !merge[id] ) {
 55.1494 +						var c = 1;
 55.1495 +
 55.1496 +						for ( var n = parentNode.firstChild; n; n = n.nextSibling )
 55.1497 +							if ( n.nodeType == 1 )
 55.1498 +								n.nodeIndex = c++;
 55.1499 +
 55.1500 +						merge[id] = true;
 55.1501 +					}
 55.1502 +
 55.1503 +					var add = false;
 55.1504 +
 55.1505 +					if ( first == 1 ) {
 55.1506 +						if ( last == 0 || node.nodeIndex == last )
 55.1507 +							add = true;
 55.1508 +					} else if ( (node.nodeIndex + last) % first == 0 )
 55.1509 +						add = true;
 55.1510 +
 55.1511 +					if ( add ^ not )
 55.1512 +						tmp.push( node );
 55.1513 +				}
 55.1514 +
 55.1515 +				r = tmp;
 55.1516 +
 55.1517 +			// Otherwise, find the expression to execute
 55.1518 +			} else {
 55.1519 +				var f = jQuery.expr[m[1]];
 55.1520 +				if ( typeof f != "string" )
 55.1521 +					f = jQuery.expr[m[1]][m[2]];
 55.1522 +
 55.1523 +				// Build a custom macro to enclose it
 55.1524 +				f = eval("false||function(a,i){return " + f + "}");
 55.1525 +
 55.1526 +				// Execute it against the current filter
 55.1527 +				r = jQuery.grep( r, f, not );
 55.1528 +			}
 55.1529 +		}
 55.1530 +
 55.1531 +		// Return an array of filtered elements (r)
 55.1532 +		// and the modified expression string (t)
 55.1533 +		return { r: r, t: t };
 55.1534 +	},
 55.1535 +
 55.1536 +	dir: function( elem, dir ){
 55.1537 +		var matched = [];
 55.1538 +		var cur = elem[dir];
 55.1539 +		while ( cur && cur != document ) {
 55.1540 +			if ( cur.nodeType == 1 )
 55.1541 +				matched.push( cur );
 55.1542 +			cur = cur[dir];
 55.1543 +		}
 55.1544 +		return matched;
 55.1545 +	},
 55.1546 +	
 55.1547 +	nth: function(cur,result,dir,elem){
 55.1548 +		result = result || 1;
 55.1549 +		var num = 0;
 55.1550 +
 55.1551 +		for ( ; cur; cur = cur[dir] )
 55.1552 +			if ( cur.nodeType == 1 && ++num == result )
 55.1553 +				break;
 55.1554 +
 55.1555 +		return cur;
 55.1556 +	},
 55.1557 +	
 55.1558 +	sibling: function( n, elem ) {
 55.1559 +		var r = [];
 55.1560 +
 55.1561 +		for ( ; n; n = n.nextSibling ) {
 55.1562 +			if ( n.nodeType == 1 && (!elem || n != elem) )
 55.1563 +				r.push( n );
 55.1564 +		}
 55.1565 +
 55.1566 +		return r;
 55.1567 +	}
 55.1568 +});
 55.1569 +/*
 55.1570 + * A number of helper functions used for managing events.
 55.1571 + * Many of the ideas behind this code orignated from 
 55.1572 + * Dean Edwards' addEvent library.
 55.1573 + */
 55.1574 +jQuery.event = {
 55.1575 +
 55.1576 +	// Bind an event to an element
 55.1577 +	// Original by Dean Edwards
 55.1578 +	add: function(element, type, handler, data) {
 55.1579 +		// For whatever reason, IE has trouble passing the window object
 55.1580 +		// around, causing it to be cloned in the process
 55.1581 +		if ( jQuery.browser.msie && element.setInterval != undefined )
 55.1582 +			element = window;
 55.1583 +
 55.1584 +		// Make sure that the function being executed has a unique ID
 55.1585 +		if ( !handler.guid )
 55.1586 +			handler.guid = this.guid++;
 55.1587 +			
 55.1588 +		// if data is passed, bind to handler 
 55.1589 +		if( data != undefined ) { 
 55.1590 +        		// Create temporary function pointer to original handler 
 55.1591 +			var fn = handler; 
 55.1592 +
 55.1593 +			// Create unique handler function, wrapped around original handler 
 55.1594 +			handler = function() { 
 55.1595 +				// Pass arguments and context to original handler 
 55.1596 +				return fn.apply(this, arguments); 
 55.1597 +			};
 55.1598 +
 55.1599 +			// Store data in unique handler 
 55.1600 +			handler.data = data;
 55.1601 +
 55.1602 +			// Set the guid of unique handler to the same of original handler, so it can be removed 
 55.1603 +			handler.guid = fn.guid;
 55.1604 +		}
 55.1605 +
 55.1606 +		// Namespaced event handlers
 55.1607 +		var parts = type.split(".");
 55.1608 +		type = parts[0];
 55.1609 +		handler.type = parts[1];
 55.1610 +
 55.1611 +		// Init the element's event structure
 55.1612 +		var events = jQuery.data(element, "events") || jQuery.data(element, "events", {});
 55.1613 +		
 55.1614 +		var handle = jQuery.data(element, "handle", function(){
 55.1615 +			// returned undefined or false
 55.1616 +			var val;
 55.1617 +
 55.1618 +			// Handle the second event of a trigger and when
 55.1619 +			// an event is called after a page has unloaded
 55.1620 +			if ( typeof jQuery == "undefined" || jQuery.event.triggered )
 55.1621 +				return val;
 55.1622 +			
 55.1623 +			val = jQuery.event.handle.apply(element, arguments);
 55.1624 +			
 55.1625 +			return val;
 55.1626 +		});
 55.1627 +
 55.1628 +		// Get the current list of functions bound to this event
 55.1629 +		var handlers = events[type];
 55.1630 +
 55.1631 +		// Init the event handler queue
 55.1632 +		if (!handlers) {
 55.1633 +			handlers = events[type] = {};	
 55.1634 +			
 55.1635 +			// And bind the global event handler to the element
 55.1636 +			if (element.addEventListener)
 55.1637 +				element.addEventListener(type, handle, false);
 55.1638 +			else
 55.1639 +				element.attachEvent("on" + type, handle);
 55.1640 +		}
 55.1641 +
 55.1642 +		// Add the function to the element's handler list
 55.1643 +		handlers[handler.guid] = handler;
 55.1644 +
 55.1645 +		// Keep track of which events have been used, for global triggering
 55.1646 +		this.global[type] = true;
 55.1647 +	},
 55.1648 +
 55.1649 +	guid: 1,
 55.1650 +	global: {},
 55.1651 +
 55.1652 +	// Detach an event or set of events from an element
 55.1653 +	remove: function(element, type, handler) {
 55.1654 +		var events = jQuery.data(element, "events"), ret, index;
 55.1655 +
 55.1656 +		// Namespaced event handlers
 55.1657 +		if ( typeof type == "string" ) {
 55.1658 +			var parts = type.split(".");
 55.1659 +			type = parts[0];
 55.1660 +		}
 55.1661 +
 55.1662 +		if ( events ) {
 55.1663 +			// type is actually an event object here
 55.1664 +			if ( type && type.type ) {
 55.1665 +				handler = type.handler;
 55.1666 +				type = type.type;
 55.1667 +			}
 55.1668 +			
 55.1669 +			if ( !type ) {
 55.1670 +				for ( type in events )
 55.1671 +					this.remove( element, type );
 55.1672 +
 55.1673 +			} else if ( events[type] ) {
 55.1674 +				// remove the given handler for the given type
 55.1675 +				if ( handler )
 55.1676 +					delete events[type][handler.guid];
 55.1677 +				
 55.1678 +				// remove all handlers for the given type
 55.1679 +				else
 55.1680 +					for ( handler in events[type] )
 55.1681 +						// Handle the removal of namespaced events
 55.1682 +						if ( !parts[1] || events[type][handler].type == parts[1] )
 55.1683 +							delete events[type][handler];
 55.1684 +
 55.1685 +				// remove generic event handler if no more handlers exist
 55.1686 +				for ( ret in events[type] ) break;
 55.1687 +				if ( !ret ) {
 55.1688 +					if (element.removeEventListener)
 55.1689 +						element.removeEventListener(type, jQuery.data(element, "handle"), false);
 55.1690 +					else
 55.1691 +						element.detachEvent("on" + type, jQuery.data(element, "handle"));
 55.1692 +					ret = null;
 55.1693 +					delete events[type];
 55.1694 +				}
 55.1695 +			}
 55.1696 +
 55.1697 +			// Remove the expando if it's no longer used
 55.1698 +			for ( ret in events ) break;
 55.1699 +			if ( !ret ) {
 55.1700 +				jQuery.removeData( element, "events" );
 55.1701 +				jQuery.removeData( element, "handle" );
 55.1702 +			}
 55.1703 +		}
 55.1704 +	},
 55.1705 +
 55.1706 +	trigger: function(type, data, element, donative, extra) {
 55.1707 +		// Clone the incoming data, if any
 55.1708 +		data = jQuery.makeArray(data || []);
 55.1709 +
 55.1710 +		// Handle a global trigger
 55.1711 +		if ( !element ) {
 55.1712 +			// Only trigger if we've ever bound an event for it
 55.1713 +			if ( this.global[type] )
 55.1714 +				jQuery("*").add([window, document]).trigger(type, data);
 55.1715 +
 55.1716 +		// Handle triggering a single element
 55.1717 +		} else {
 55.1718 +			var val, ret, fn = jQuery.isFunction( element[ type ] || null ),
 55.1719 +				// Check to see if we need to provide a fake event, or not
 55.1720 +				evt = !data[0] || !data[0].preventDefault;
 55.1721 +			
 55.1722 +			// Pass along a fake event
 55.1723 +			if ( evt )
 55.1724 +				data.unshift( this.fix({ type: type, target: element }) );
 55.1725 +
 55.1726 +			// Enforce the right trigger type
 55.1727 +			data[0].type = type;
 55.1728 +
 55.1729 +			// Trigger the event
 55.1730 +			if ( jQuery.isFunction( jQuery.data(element, "handle") ) )
 55.1731 +				val = jQuery.data(element, "handle").apply( element, data );
 55.1732 +
 55.1733 +			// Handle triggering native .onfoo handlers
 55.1734 +			if ( !fn && element["on"+type] && element["on"+type].apply( element, data ) === false )
 55.1735 +				val = false;
 55.1736 +
 55.1737 +			// Extra functions don't get the custom event object
 55.1738 +			if ( evt )
 55.1739 +				data.shift();
 55.1740 +
 55.1741 +			// Handle triggering of extra function
 55.1742 +			if ( extra && extra.apply( element, data ) === false )
 55.1743 +				val = false;
 55.1744 +
 55.1745 +			// Trigger the native events (except for clicks on links)
 55.1746 +			if ( fn && donative !== false && val !== false && !(jQuery.nodeName(element, 'a') && type == "click") ) {
 55.1747 +				this.triggered = true;
 55.1748 +				element[ type ]();
 55.1749 +			}
 55.1750 +
 55.1751 +			this.triggered = false;
 55.1752 +		}
 55.1753 +
 55.1754 +		return val;
 55.1755 +	},
 55.1756 +
 55.1757 +	handle: function(event) {
 55.1758 +		// returned undefined or false
 55.1759 +		var val;
 55.1760 +
 55.1761 +		// Empty object is for triggered events with no data
 55.1762 +		event = jQuery.event.fix( event || window.event || {} ); 
 55.1763 +
 55.1764 +		// Namespaced event handlers
 55.1765 +		var parts = event.type.split(".");
 55.1766 +		event.type = parts[0];
 55.1767 +
 55.1768 +		var c = jQuery.data(this, "events") && jQuery.data(this, "events")[event.type], args = Array.prototype.slice.call( arguments, 1 );
 55.1769 +		args.unshift( event );
 55.1770 +
 55.1771 +		for ( var j in c ) {
 55.1772 +			// Pass in a reference to the handler function itself
 55.1773 +			// So that we can later remove it
 55.1774 +			args[0].handler = c[j];
 55.1775 +			args[0].data = c[j].data;
 55.1776 +
 55.1777 +			// Filter the functions by class
 55.1778 +			if ( !parts[1] || c[j].type == parts[1] ) {
 55.1779 +				var tmp = c[j].apply( this, args );
 55.1780 +
 55.1781 +				if ( val !== false )
 55.1782 +					val = tmp;
 55.1783 +
 55.1784 +				if ( tmp === false ) {
 55.1785 +					event.preventDefault();
 55.1786 +					event.stopPropagation();
 55.1787 +				}
 55.1788 +			}
 55.1789 +		}
 55.1790 +
 55.1791 +		// Clean up added properties in IE to prevent memory leak
 55.1792 +		if (jQuery.browser.msie)
 55.1793 +			event.target = event.preventDefault = event.stopPropagation =
 55.1794 +				event.handler = event.data = null;
 55.1795 +
 55.1796 +		return val;
 55.1797 +	},
 55.1798 +
 55.1799 +	fix: function(event) {
 55.1800 +		// store a copy of the original event object 
 55.1801 +		// and clone to set read-only properties
 55.1802 +		var originalEvent = event;
 55.1803 +		event = jQuery.extend({}, originalEvent);
 55.1804 +		
 55.1805 +		// add preventDefault and stopPropagation since 
 55.1806 +		// they will not work on the clone
 55.1807 +		event.preventDefault = function() {
 55.1808 +			// if preventDefault exists run it on the original event
 55.1809 +			if (originalEvent.preventDefault)
 55.1810 +				originalEvent.preventDefault();
 55.1811 +			// otherwise set the returnValue property of the original event to false (IE)
 55.1812 +			originalEvent.returnValue = false;
 55.1813 +		};
 55.1814 +		event.stopPropagation = function() {
 55.1815 +			// if stopPropagation exists run it on the original event
 55.1816 +			if (originalEvent.stopPropagation)
 55.1817 +				originalEvent.stopPropagation();
 55.1818 +			// otherwise set the cancelBubble property of the original event to true (IE)
 55.1819 +			originalEvent.cancelBubble = true;
 55.1820 +		};
 55.1821 +		
 55.1822 +		// Fix target property, if necessary
 55.1823 +		if ( !event.target && event.srcElement )
 55.1824 +			event.target = event.srcElement;
 55.1825 +				
 55.1826 +		// check if target is a textnode (safari)
 55.1827 +		if (jQuery.browser.safari && event.target.nodeType == 3)
 55.1828 +			event.target = originalEvent.target.parentNode;
 55.1829 +
 55.1830 +		// Add relatedTarget, if necessary
 55.1831 +		if ( !event.relatedTarget && event.fromElement )
 55.1832 +			event.relatedTarget = event.fromElement == event.target ? event.toElement : event.fromElement;
 55.1833 +
 55.1834 +		// Calculate pageX/Y if missing and clientX/Y available
 55.1835 +		if ( event.pageX == null && event.clientX != null ) {
 55.1836 +			var e = document.documentElement, b = document.body;
 55.1837 +			event.pageX = event.clientX + (e && e.scrollLeft || b.scrollLeft || 0);
 55.1838 +			event.pageY = event.clientY + (e && e.scrollTop || b.scrollTop || 0);
 55.1839 +		}
 55.1840 +			
 55.1841 +		// Add which for key events
 55.1842 +		if ( !event.which && (event.charCode || event.keyCode) )
 55.1843 +			event.which = event.charCode || event.keyCode;
 55.1844 +		
 55.1845 +		// Add metaKey to non-Mac browsers (use ctrl for PC's and Meta for Macs)
 55.1846 +		if ( !event.metaKey && event.ctrlKey )
 55.1847 +			event.metaKey = event.ctrlKey;
 55.1848 +
 55.1849 +		// Add which for click: 1 == left; 2 == middle; 3 == right
 55.1850 +		// Note: button is not normalized, so don't use it
 55.1851 +		if ( !event.which && event.button )
 55.1852 +			event.which = (event.button & 1 ? 1 : ( event.button & 2 ? 3 : ( event.button & 4 ? 2 : 0 ) ));
 55.1853 +			
 55.1854 +		return event;
 55.1855 +	}
 55.1856 +};
 55.1857 +
 55.1858 +jQuery.fn.extend({
 55.1859 +	bind: function( type, data, fn ) {
 55.1860 +		return type == "unload" ? this.one(type, data, fn) : this.each(function(){
 55.1861 +			jQuery.event.add( this, type, fn || data, fn && data );
 55.1862 +		});
 55.1863 +	},
 55.1864 +	
 55.1865 +	one: function( type, data, fn ) {
 55.1866 +		return this.each(function(){
 55.1867 +			jQuery.event.add( this, type, function(event) {
 55.1868 +				jQuery(this).unbind(event);
 55.1869 +				return (fn || data).apply( this, arguments);
 55.1870 +			}, fn && data);
 55.1871 +		});
 55.1872 +	},
 55.1873 +
 55.1874 +	unbind: function( type, fn ) {
 55.1875 +		return this.each(function(){
 55.1876 +			jQuery.event.remove( this, type, fn );
 55.1877 +		});
 55.1878 +	},
 55.1879 +
 55.1880 +	trigger: function( type, data, fn ) {
 55.1881 +		return this.each(function(){
 55.1882 +			jQuery.event.trigger( type, data, this, true, fn );
 55.1883 +		});
 55.1884 +	},
 55.1885 +
 55.1886 +	triggerHandler: function( type, data, fn ) {
 55.1887 +		if ( this[0] )
 55.1888 +			return jQuery.event.trigger( type, data, this[0], false, fn );
 55.1889 +	},
 55.1890 +
 55.1891 +	toggle: function() {
 55.1892 +		// Save reference to arguments for access in closure
 55.1893 +		var a = arguments;
 55.1894 +
 55.1895 +		return this.click(function(e) {
 55.1896 +			// Figure out which function to execute
 55.1897 +			this.lastToggle = 0 == this.lastToggle ? 1 : 0;
 55.1898 +			
 55.1899 +			// Make sure that clicks stop
 55.1900 +			e.preventDefault();
 55.1901 +			
 55.1902 +			// and execute the function
 55.1903 +			return a[this.lastToggle].apply( this, [e] ) || false;
 55.1904 +		});
 55.1905 +	},
 55.1906 +
 55.1907 +	hover: function(f,g) {
 55.1908 +		
 55.1909 +		// A private function for handling mouse 'hovering'
 55.1910 +		function handleHover(e) {
 55.1911 +			// Check if mouse(over|out) are still within the same parent element
 55.1912 +			var p = e.relatedTarget;
 55.1913 +	
 55.1914 +			// Traverse up the tree
 55.1915 +			while ( p && p != this ) try { p = p.parentNode; } catch(e) { p = this; };
 55.1916 +			
 55.1917 +			// If we actually just moused on to a sub-element, ignore it
 55.1918 +			if ( p == this ) return false;
 55.1919 +			
 55.1920 +			// Execute the right function
 55.1921 +			return (e.type == "mouseover" ? f : g).apply(this, [e]);
 55.1922 +		}
 55.1923 +		
 55.1924 +		// Bind the function to the two event listeners
 55.1925 +		return this.mouseover(handleHover).mouseout(handleHover);
 55.1926 +	},
 55.1927 +	
 55.1928 +	ready: function(f) {
 55.1929 +		// Attach the listeners
 55.1930 +		bindReady();
 55.1931 +
 55.1932 +		// If the DOM is already ready
 55.1933 +		if ( jQuery.isReady )
 55.1934 +			// Execute the function immediately
 55.1935 +			f.apply( document, [jQuery] );
 55.1936 +			
 55.1937 +		// Otherwise, remember the function for later
 55.1938 +		else
 55.1939 +			// Add the function to the wait list
 55.1940 +			jQuery.readyList.push( function() { return f.apply(this, [jQuery]); } );
 55.1941 +	
 55.1942 +		return this;
 55.1943 +	}
 55.1944 +});
 55.1945 +
 55.1946 +jQuery.extend({
 55.1947 +	/*
 55.1948 +	 * All the code that makes DOM Ready work nicely.
 55.1949 +	 */
 55.1950 +	isReady: false,
 55.1951 +	readyList: [],
 55.1952 +	
 55.1953 +	// Handle when the DOM is ready
 55.1954 +	ready: function() {
 55.1955 +		// Make sure that the DOM is not already loaded
 55.1956 +		if ( !jQuery.isReady ) {
 55.1957 +			// Remember that the DOM is ready
 55.1958 +			jQuery.isReady = true;
 55.1959 +			
 55.1960 +			// If there are functions bound, to execute
 55.1961 +			if ( jQuery.readyList ) {
 55.1962 +				// Execute all of them
 55.1963 +				jQuery.each( jQuery.readyList, function(){
 55.1964 +					this.apply( document );
 55.1965 +				});
 55.1966 +				
 55.1967 +				// Reset the list of functions
 55.1968 +				jQuery.readyList = null;
 55.1969 +			}
 55.1970 +			// Remove event listener to avoid memory leak
 55.1971 +			if ( jQuery.browser.mozilla || jQuery.browser.opera )
 55.1972 +				document.removeEventListener( "DOMContentLoaded", jQuery.ready, false );
 55.1973 +			
 55.1974 +			// Remove script element used by IE hack
 55.1975 +			if( !window.frames.length ) // don't remove if frames are present (#1187)
 55.1976 +				jQuery(window).load(function(){ jQuery("#__ie_init").remove(); });
 55.1977 +		}
 55.1978 +	}
 55.1979 +});
 55.1980 +
 55.1981 +jQuery.each( ("blur,focus,load,resize,scroll,unload,click,dblclick," +
 55.1982 +	"mousedown,mouseup,mousemove,mouseover,mouseout,change,select," + 
 55.1983 +	"submit,keydown,keypress,keyup,error").split(","), function(i,o){
 55.1984 +	
 55.1985 +	// Handle event binding
 55.1986 +	jQuery.fn[o] = function(f){
 55.1987 +		return f ? this.bind(o, f) : this.trigger(o);
 55.1988 +	};
 55.1989 +});
 55.1990 +
 55.1991 +var readyBound = false;
 55.1992 +
 55.1993 +function bindReady(){
 55.1994 +	if ( readyBound ) return;
 55.1995 +	readyBound = true;
 55.1996 +
 55.1997 +	// If Mozilla is used
 55.1998 +	if ( jQuery.browser.mozilla || jQuery.browser.opera )
 55.1999 +		// Use the handy event callback
 55.2000 +		document.addEventListener( "DOMContentLoaded", jQuery.ready, false );
 55.2001 +	
 55.2002 +	// If IE is used, use the excellent hack by Matthias Miller
 55.2003 +	// http://www.outofhanwell.com/blog/index.php?title=the_window_onload_problem_revisited
 55.2004 +	else if ( jQuery.browser.msie ) {
 55.2005 +	
 55.2006 +		// Only works if you document.write() it
 55.2007 +		document.write("<scr" + "ipt id=__ie_init defer=true " + 
 55.2008 +			"src=//:><\/script>");
 55.2009 +	
 55.2010 +		// Use the defer script hack
 55.2011 +		var script = document.getElementById("__ie_init");
 55.2012 +		
 55.2013 +		// script does not exist if jQuery is loaded dynamically
 55.2014 +		if ( script ) 
 55.2015 +			script.onreadystatechange = function() {
 55.2016 +				if ( this.readyState != "complete" ) return;
 55.2017 +				jQuery.ready();
 55.2018 +			};
 55.2019 +	
 55.2020 +		// Clear from memory
 55.2021 +		script = null;
 55.2022 +	
 55.2023 +	// If Safari  is used
 55.2024 +	} else if ( jQuery.browser.safari )
 55.2025 +		// Continually check to see if the document.readyState is valid
 55.2026 +		jQuery.safariTimer = setInterval(function(){
 55.2027 +			// loaded and complete are both valid states
 55.2028 +			if ( document.readyState == "loaded" || 
 55.2029 +				document.readyState == "complete" ) {
 55.2030 +	
 55.2031 +				// If either one are found, remove the timer
 55.2032 +				clearInterval( jQuery.safariTimer );
 55.2033 +				jQuery.safariTimer = null;
 55.2034 +	
 55.2035 +				// and execute any waiting functions
 55.2036 +				jQuery.ready();
 55.2037 +			}
 55.2038 +		}, 10); 
 55.2039 +
 55.2040 +	// A fallback to window.onload, that will always work
 55.2041 +	jQuery.event.add( window, "load", jQuery.ready );
 55.2042 +}
 55.2043 +jQuery.fn.extend({
 55.2044 +	load: function( url, params, callback ) {
 55.2045 +		if ( jQuery.isFunction( url ) )
 55.2046 +			return this.bind("load", url);
 55.2047 +
 55.2048 +		var off = url.indexOf(" ");
 55.2049 +		if ( off >= 0 ) {
 55.2050 +			var selector = url.slice(off, url.length);
 55.2051 +			url = url.slice(0, off);
 55.2052 +		}
 55.2053 +
 55.2054 +		callback = callback || function(){};
 55.2055 +
 55.2056 +		// Default to a GET request
 55.2057 +		var type = "GET";
 55.2058 +
 55.2059 +		// If the second parameter was provided
 55.2060 +		if ( params )
 55.2061 +			// If it's a function
 55.2062 +			if ( jQuery.isFunction( params ) ) {
 55.2063 +				// We assume that it's the callback
 55.2064 +				callback = params;
 55.2065 +				params = null;
 55.2066 +
 55.2067 +			// Otherwise, build a param string
 55.2068 +			} else {
 55.2069 +				params = jQuery.param( params );
 55.2070 +				type = "POST";
 55.2071 +			}
 55.2072 +
 55.2073 +		var self = this;
 55.2074 +
 55.2075 +		// Request the remote document
 55.2076 +		jQuery.ajax({
 55.2077 +			url: url,
 55.2078 +			type: type,
 55.2079 +			data: params,
 55.2080 +			complete: function(res, status){
 55.2081 +				// If successful, inject the HTML into all the matched elements
 55.2082 +				if ( status == "success" || status == "notmodified" )
 55.2083 +					// See if a selector was specified
 55.2084 +					self.html( selector ?
 55.2085 +						// Create a dummy div to hold the results
 55.2086 +						jQuery("<div/>")
 55.2087 +							// inject the contents of the document in, removing the scripts
 55.2088 +							// to avoid any 'Permission Denied' errors in IE
 55.2089 +							.append(res.responseText.replace(/<script(.|\s)*?\/script>/g, ""))
 55.2090 +
 55.2091 +							// Locate the specified elements
 55.2092 +							.find(selector) :
 55.2093 +
 55.2094 +						// If not, just inject the full result
 55.2095 +						res.responseText );
 55.2096 +
 55.2097 +				// Add delay to account for Safari's delay in globalEval
 55.2098 +				setTimeout(function(){
 55.2099 +					self.each( callback, [res.responseText, status, res] );
 55.2100 +				}, 13);
 55.2101 +			}
 55.2102 +		});
 55.2103 +		return this;
 55.2104 +	},
 55.2105 +
 55.2106 +	serialize: function() {
 55.2107 +		return jQuery.param(this.serializeArray());
 55.2108 +	},
 55.2109 +	serializeArray: function() {
 55.2110 +		return this.map(function(){
 55.2111 +			return jQuery.nodeName(this, "form") ?
 55.2112 +				jQuery.makeArray(this.elements) : this;
 55.2113 +		})
 55.2114 +		.filter(function(){
 55.2115 +			return this.name && !this.disabled && 
 55.2116 +				(this.checked || /select|textarea/i.test(this.nodeName) || 
 55.2117 +					/text|hidden|password/i.test(this.type));
 55.2118 +		})
 55.2119 +		.map(function(i, elem){
 55.2120 +			var val = jQuery(this).val();
 55.2121 +			return val == null ? null :
 55.2122 +				val.constructor == Array ?
 55.2123 +					jQuery.map( val, function(val, i){
 55.2124 +						return {name: elem.name, value: val};
 55.2125 +					}) :
 55.2126 +					{name: elem.name, value: val};
 55.2127 +		}).get();
 55.2128 +	}
 55.2129 +});
 55.2130 +
 55.2131 +// Attach a bunch of functions for handling common AJAX events
 55.2132 +jQuery.each( "ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","), function(i,o){
 55.2133 +	jQuery.fn[o] = function(f){
 55.2134 +		return this.bind(o, f);
 55.2135 +	};
 55.2136 +});
 55.2137 +
 55.2138 +var jsc = (new Date).getTime();
 55.2139 +
 55.2140 +jQuery.extend({
 55.2141 +	get: function( url, data, callback, type ) {
 55.2142 +		// shift arguments if data argument was ommited
 55.2143 +		if ( jQuery.isFunction( data ) ) {
 55.2144 +			callback = data;
 55.2145 +			data = null;
 55.2146 +		}
 55.2147 +		
 55.2148 +		return jQuery.ajax({
 55.2149 +			type: "GET",
 55.2150 +			url: url,
 55.2151 +			data: data,
 55.2152 +			success: callback,
 55.2153 +			dataType: type
 55.2154 +		});
 55.2155 +	},
 55.2156 +
 55.2157 +	getScript: function( url, callback ) {
 55.2158 +		return jQuery.get(url, null, callback, "script");
 55.2159 +	},
 55.2160 +
 55.2161 +	getJSON: function( url, data, callback ) {
 55.2162 +		return jQuery.get(url, data, callback, "json");
 55.2163 +	},
 55.2164 +
 55.2165 +	post: function( url, data, callback, type ) {
 55.2166 +		if ( jQuery.isFunction( data ) ) {
 55.2167 +			callback = data;
 55.2168 +			data = {};
 55.2169 +		}
 55.2170 +
 55.2171 +		return jQuery.ajax({
 55.2172 +			type: "POST",
 55.2173 +			url: url,
 55.2174 +			data: data,
 55.2175 +			success: callback,
 55.2176 +			dataType: type
 55.2177 +		});
 55.2178 +	},
 55.2179 +
 55.2180 +	ajaxSetup: function( settings ) {
 55.2181 +		jQuery.extend( jQuery.ajaxSettings, settings );
 55.2182 +	},
 55.2183 +
 55.2184 +	ajaxSettings: {
 55.2185 +		global: true,
 55.2186 +		type: "GET",
 55.2187 +		timeout: 0,
 55.2188 +		contentType: "application/x-www-form-urlencoded",
 55.2189 +		processData: true,
 55.2190 +		async: true,
 55.2191 +		data: null
 55.2192 +	},
 55.2193 +	
 55.2194 +	// Last-Modified header cache for next request
 55.2195 +	lastModified: {},
 55.2196 +
 55.2197 +	ajax: function( s ) {
 55.2198 +		var jsonp, jsre = /=(\?|%3F)/g, status, data;
 55.2199 +
 55.2200 +		// Extend the settings, but re-extend 's' so that it can be
 55.2201 +		// checked again later (in the test suite, specifically)
 55.2202 +		s = jQuery.extend(true, s, jQuery.extend(true, {}, jQuery.ajaxSettings, s));
 55.2203 +
 55.2204 +		// convert data if not already a string
 55.2205 +		if ( s.data && s.processData && typeof s.data != "string" )
 55.2206 +			s.data = jQuery.param(s.data);
 55.2207 +
 55.2208 +		// Handle JSONP Parameter Callbacks
 55.2209 +		if ( s.dataType == "jsonp" ) {
 55.2210 +			if ( s.type.toLowerCase() == "get" ) {
 55.2211 +				if ( !s.url.match(jsre) )
 55.2212 +					s.url += (s.url.match(/\?/) ? "&" : "?") + (s.jsonp || "callback") + "=?";
 55.2213 +			} else if ( !s.data || !s.data.match(jsre) )
 55.2214 +				s.data = (s.data ? s.data + "&" : "") + (s.jsonp || "callback") + "=?";
 55.2215 +			s.dataType = "json";
 55.2216 +		}
 55.2217 +
 55.2218 +		// Build temporary JSONP function
 55.2219 +		if ( s.dataType == "json" && (s.data && s.data.match(jsre) || s.url.match(jsre)) ) {
 55.2220 +			jsonp = "jsonp" + jsc++;
 55.2221 +
 55.2222 +			// Replace the =? sequence both in the query string and the data
 55.2223 +			if ( s.data )
 55.2224 +				s.data = s.data.replace(jsre, "=" + jsonp);
 55.2225 +			s.url = s.url.replace(jsre, "=" + jsonp);
 55.2226 +
 55.2227 +			// We need to make sure
 55.2228 +			// that a JSONP style response is executed properly
 55.2229 +			s.dataType = "script";
 55.2230 +
 55.2231 +			// Handle JSONP-style loading
 55.2232 +			window[ jsonp ] = function(tmp){
 55.2233 +				data = tmp;
 55.2234 +				success();
 55.2235 +				complete();
 55.2236 +				// Garbage collect
 55.2237 +				window[ jsonp ] = undefined;
 55.2238 +				try{ delete window[ jsonp ]; } catch(e){}
 55.2239 +			};
 55.2240 +		}
 55.2241 +
 55.2242 +		if ( s.dataType == "script" && s.cache == null )
 55.2243 +			s.cache = false;
 55.2244 +
 55.2245 +		if ( s.cache === false && s.type.toLowerCase() == "get" )
 55.2246 +			s.url += (s.url.match(/\?/) ? "&" : "?") + "_=" + (new Date()).getTime();
 55.2247 +
 55.2248 +		// If data is available, append data to url for get requests
 55.2249 +		if ( s.data && s.type.toLowerCase() == "get" ) {
 55.2250 +			s.url += (s.url.match(/\?/) ? "&" : "?") + s.data;
 55.2251 +
 55.2252 +			// IE likes to send both get and post data, prevent this
 55.2253 +			s.data = null;
 55.2254 +		}
 55.2255 +
 55.2256 +		// Watch for a new set of requests
 55.2257 +		if ( s.global && ! jQuery.active++ )
 55.2258 +			jQuery.event.trigger( "ajaxStart" );
 55.2259 +
 55.2260 +		// If we're requesting a remote document
 55.2261 +		// and trying to load JSON or Script
 55.2262 +		if ( !s.url.indexOf("http") && s.dataType == "script" ) {
 55.2263 +			var head = document.getElementsByTagName("head")[0];
 55.2264 +			var script = document.createElement("script");
 55.2265 +			script.src = s.url;
 55.2266 +
 55.2267 +			// Handle Script loading
 55.2268 +			if ( !jsonp && (s.success || s.complete) ) {
 55.2269 +				var done = false;
 55.2270 +
 55.2271 +				// Attach handlers for all browsers
 55.2272 +				script.onload = script.onreadystatechange = function(){
 55.2273 +					if ( !done && (!this.readyState || 
 55.2274 +							this.readyState == "loaded" || this.readyState == "complete") ) {
 55.2275 +						done = true;
 55.2276 +						success();
 55.2277 +						complete();
 55.2278 +						head.removeChild( script );
 55.2279 +					}
 55.2280 +				};
 55.2281 +			}
 55.2282 +
 55.2283 +			head.appendChild(script);
 55.2284 +
 55.2285 +			// We handle everything using the script element injection
 55.2286 +			return;
 55.2287 +		}
 55.2288 +
 55.2289 +		var requestDone = false;
 55.2290 +
 55.2291 +		// Create the request object; Microsoft failed to properly
 55.2292 +		// implement the XMLHttpRequest in IE7, so we use the ActiveXObject when it is available
 55.2293 +		var xml = window.ActiveXObject ? new ActiveXObject("Microsoft.XMLHTTP") : new XMLHttpRequest();
 55.2294 +
 55.2295 +		// Open the socket
 55.2296 +		xml.open(s.type, s.url, s.async);
 55.2297 +
 55.2298 +		// Set the correct header, if data is being sent
 55.2299 +		if ( s.data )
 55.2300 +			xml.setRequestHeader("Content-Type", s.contentType);
 55.2301 +
 55.2302 +		// Set the If-Modified-Since header, if ifModified mode.
 55.2303 +		if ( s.ifModified )
 55.2304 +			xml.setRequestHeader("If-Modified-Since",
 55.2305 +				jQuery.lastModified[s.url] || "Thu, 01 Jan 1970 00:00:00 GMT" );
 55.2306 +
 55.2307 +		// Set header so the called script knows that it's an XMLHttpRequest
 55.2308 +		xml.setRequestHeader("X-Requested-With", "XMLHttpRequest");
 55.2309 +
 55.2310 +		// Allow custom headers/mimetypes
 55.2311 +		if ( s.beforeSend )
 55.2312 +			s.beforeSend(xml);
 55.2313 +			
 55.2314 +		if ( s.global )
 55.2315 +		    jQuery.event.trigger("ajaxSend", [xml, s]);
 55.2316 +
 55.2317 +		// Wait for a response to come back
 55.2318 +		var onreadystatechange = function(isTimeout){
 55.2319 +			// The transfer is complete and the data is available, or the request timed out
 55.2320 +			if ( !requestDone && xml && (xml.readyState == 4 || isTimeout == "timeout") ) {
 55.2321 +				requestDone = true;
 55.2322 +				
 55.2323 +				// clear poll interval
 55.2324 +				if (ival) {
 55.2325 +					clearInterval(ival);
 55.2326 +					ival = null;
 55.2327 +				}
 55.2328 +				
 55.2329 +				status = isTimeout == "timeout" && "timeout" ||
 55.2330 +					!jQuery.httpSuccess( xml ) && "error" ||
 55.2331 +					s.ifModified && jQuery.httpNotModified( xml, s.url ) && "notmodified" ||
 55.2332 +					"success";
 55.2333 +
 55.2334 +				if ( status == "success" ) {
 55.2335 +					// Watch for, and catch, XML document parse errors
 55.2336 +					try {
 55.2337 +						// process the data (runs the xml through httpData regardless of callback)
 55.2338 +						data = jQuery.httpData( xml, s.dataType );
 55.2339 +					} catch(e) {
 55.2340 +						status = "parsererror";
 55.2341 +					}
 55.2342 +				}
 55.2343 +
 55.2344 +				// Make sure that the request was successful or notmodified
 55.2345 +				if ( status == "success" ) {
 55.2346 +					// Cache Last-Modified header, if ifModified mode.
 55.2347 +					var modRes;
 55.2348 +					try {
 55.2349 +						modRes = xml.getResponseHeader("Last-Modified");
 55.2350 +					} catch(e) {} // swallow exception thrown by FF if header is not available
 55.2351 +	
 55.2352 +					if ( s.ifModified && modRes )
 55.2353 +						jQuery.lastModified[s.url] = modRes;
 55.2354 +
 55.2355 +					// JSONP handles its own success callback
 55.2356 +					if ( !jsonp )
 55.2357 +						success();	
 55.2358 +				} else
 55.2359 +					jQuery.handleError(s, xml, status);
 55.2360 +
 55.2361 +				// Fire the complete handlers
 55.2362 +				complete();
 55.2363 +
 55.2364 +				// Stop memory leaks
 55.2365 +				if ( s.async )
 55.2366 +					xml = null;
 55.2367 +			}
 55.2368 +		};
 55.2369 +		
 55.2370 +		if ( s.async ) {
 55.2371 +			// don't attach the handler to the request, just poll it instead
 55.2372 +			var ival = setInterval(onreadystatechange, 13); 
 55.2373 +
 55.2374 +			// Timeout checker
 55.2375 +			if ( s.timeout > 0 )
 55.2376 +				setTimeout(function(){
 55.2377 +					// Check to see if the request is still happening
 55.2378 +					if ( xml ) {
 55.2379 +						// Cancel the request
 55.2380 +						xml.abort();
 55.2381 +	
 55.2382 +						if( !requestDone )
 55.2383 +							onreadystatechange( "timeout" );
 55.2384 +					}
 55.2385 +				}, s.timeout);
 55.2386 +		}
 55.2387 +			
 55.2388 +		// Send the data
 55.2389 +		try {
 55.2390 +			xml.send(s.data);
 55.2391 +		} catch(e) {
 55.2392 +			jQuery.handleError(s, xml, null, e);
 55.2393 +		}
 55.2394 +		
 55.2395 +		// firefox 1.5 doesn't fire statechange for sync requests
 55.2396 +		if ( !s.async )
 55.2397 +			onreadystatechange();
 55.2398 +		
 55.2399 +		// return XMLHttpRequest to allow aborting the request etc.
 55.2400 +		return xml;
 55.2401 +
 55.2402 +		function success(){
 55.2403 +			// If a local callback was specified, fire it and pass it the data
 55.2404 +			if ( s.success )
 55.2405 +				s.success( data, status );
 55.2406 +
 55.2407 +			// Fire the global callback
 55.2408 +			if ( s.global )
 55.2409 +				jQuery.event.trigger( "ajaxSuccess", [xml, s] );
 55.2410 +		}
 55.2411 +
 55.2412 +		function complete(){
 55.2413 +			// Process result
 55.2414 +			if ( s.complete )
 55.2415 +				s.complete(xml, status);
 55.2416 +
 55.2417 +			// The request was completed
 55.2418 +			if ( s.global )
 55.2419 +				jQuery.event.trigger( "ajaxComplete", [xml, s] );
 55.2420 +
 55.2421 +			// Handle the global AJAX counter
 55.2422 +			if ( s.global && ! --jQuery.active )
 55.2423 +				jQuery.event.trigger( "ajaxStop" );
 55.2424 +		}
 55.2425 +	},
 55.2426 +
 55.2427 +	handleError: function( s, xml, status, e ) {
 55.2428 +		// If a local callback was specified, fire it
 55.2429 +		if ( s.error ) s.error( xml, status, e );
 55.2430 +
 55.2431 +		// Fire the global callback
 55.2432 +		if ( s.global )
 55.2433 +			jQuery.event.trigger( "ajaxError", [xml, s, e] );
 55.2434 +	},
 55.2435 +
 55.2436 +	// Counter for holding the number of active queries
 55.2437 +	active: 0,
 55.2438 +
 55.2439 +	// Determines if an XMLHttpRequest was successful or not
 55.2440 +	httpSuccess: function( r ) {
 55.2441 +		try {
 55.2442 +			return !r.status && location.protocol == "file:" ||
 55.2443 +				( r.status >= 200 && r.status < 300 ) || r.status == 304 ||
 55.2444 +				jQuery.browser.safari && r.status == undefined;
 55.2445 +		} catch(e){}
 55.2446 +		return false;
 55.2447 +	},
 55.2448 +
 55.2449 +	// Determines if an XMLHttpRequest returns NotModified
 55.2450 +	httpNotModified: function( xml, url ) {
 55.2451 +		try {
 55.2452 +			var xmlRes = xml.getResponseHeader("Last-Modified");
 55.2453 +
 55.2454 +			// Firefox always returns 200. check Last-Modified date
 55.2455 +			return xml.status == 304 || xmlRes == jQuery.lastModified[url] ||
 55.2456 +				jQuery.browser.safari && xml.status == undefined;
 55.2457 +		} catch(e){}
 55.2458 +		return false;
 55.2459 +	},
 55.2460 +
 55.2461 +	httpData: function( r, type ) {
 55.2462 +		var ct = r.getResponseHeader("content-type");
 55.2463 +		var xml = type == "xml" || !type && ct && ct.indexOf("xml") >= 0;
 55.2464 +		var data = xml ? r.responseXML : r.responseText;
 55.2465 +
 55.2466 +		if ( xml && data.documentElement.tagName == "parsererror" )
 55.2467 +			throw "parsererror";
 55.2468 +
 55.2469 +		// If the type is "script", eval it in global context
 55.2470 +		if ( type == "script" )
 55.2471 +			jQuery.globalEval( data );
 55.2472 +
 55.2473 +		// Get the JavaScript object, if JSON is used.
 55.2474 +		if ( type == "json" )
 55.2475 +			data = eval("(" + data + ")");
 55.2476 +
 55.2477 +		return data;
 55.2478 +	},
 55.2479 +
 55.2480 +	// Serialize an array of form elements or a set of
 55.2481 +	// key/values into a query string
 55.2482 +	param: function( a ) {
 55.2483 +		var s = [];
 55.2484 +
 55.2485 +		// If an array was passed in, assume that it is an array
 55.2486 +		// of form elements
 55.2487 +		if ( a.constructor == Array || a.jquery )
 55.2488 +			// Serialize the form elements
 55.2489 +			jQuery.each( a, function(){
 55.2490 +				s.push( encodeURIComponent(this.name) + "=" + encodeURIComponent( this.value ) );
 55.2491 +			});
 55.2492 +
 55.2493 +		// Otherwise, assume that it's an object of key/value pairs
 55.2494 +		else
 55.2495 +			// Serialize the key/values
 55.2496 +			for ( var j in a )
 55.2497 +				// If the value is an array then the key names need to be repeated
 55.2498 +				if ( a[j] && a[j].constructor == Array )
 55.2499 +					jQuery.each( a[j], function(){
 55.2500 +						s.push( encodeURIComponent(j) + "=" + encodeURIComponent( this ) );
 55.2501 +					});
 55.2502 +				else
 55.2503 +					s.push( encodeURIComponent(j) + "=" + encodeURIComponent( a[j] ) );
 55.2504 +
 55.2505 +		// Return the resulting serialization
 55.2506 +		return s.join("&").replace(/%20/g, "+");
 55.2507 +	}
 55.2508 +
 55.2509 +});
 55.2510 +jQuery.fn.extend({
 55.2511 +	show: function(speed,callback){
 55.2512 +		return speed ?
 55.2513 +			this.animate({
 55.2514 +				height: "show", width: "show", opacity: "show"
 55.2515 +			}, speed, callback) :
 55.2516 +			
 55.2517 +			this.filter(":hidden").each(function(){
 55.2518 +				this.style.display = this.oldblock ? this.oldblock : "";
 55.2519 +				if ( jQuery.css(this,"display") == "none" )
 55.2520 +					this.style.display = "block";
 55.2521 +			}).end();
 55.2522 +	},
 55.2523 +	
 55.2524 +	hide: function(speed,callback){
 55.2525 +		return speed ?
 55.2526 +			this.animate({
 55.2527 +				height: "hide", width: "hide", opacity: "hide"
 55.2528 +			}, speed, callback) :
 55.2529 +			
 55.2530 +			this.filter(":visible").each(function(){
 55.2531 +				this.oldblock = this.oldblock || jQuery.css(this,"display");
 55.2532 +				if ( this.oldblock == "none" )
 55.2533 +					this.oldblock = "block";
 55.2534 +				this.style.display = "none";
 55.2535 +			}).end();
 55.2536 +	},
 55.2537 +
 55.2538 +	// Save the old toggle function
 55.2539 +	_toggle: jQuery.fn.toggle,
 55.2540 +	
 55.2541 +	toggle: function( fn, fn2 ){
 55.2542 +		return jQuery.isFunction(fn) && jQuery.isFunction(fn2) ?
 55.2543 +			this._toggle( fn, fn2 ) :
 55.2544 +			fn ?
 55.2545 +				this.animate({
 55.2546 +					height: "toggle", width: "toggle", opacity: "toggle"
 55.2547 +				}, fn, fn2) :
 55.2548 +				this.each(function(){
 55.2549 +					jQuery(this)[ jQuery(this).is(":hidden") ? "show" : "hide" ]();
 55.2550 +				});
 55.2551 +	},
 55.2552 +	
 55.2553 +	slideDown: function(speed,callback){
 55.2554 +		return this.animate({height: "show"}, speed, callback);
 55.2555 +	},
 55.2556 +	
 55.2557 +	slideUp: function(speed,callback){
 55.2558 +		return this.animate({height: "hide"}, speed, callback);
 55.2559 +	},
 55.2560 +
 55.2561 +	slideToggle: function(speed, callback){
 55.2562 +		return this.animate({height: "toggle"}, speed, callback);
 55.2563 +	},
 55.2564 +	
 55.2565 +	fadeIn: function(speed, callback){
 55.2566 +		return this.animate({opacity: "show"}, speed, callback);
 55.2567 +	},
 55.2568 +	
 55.2569 +	fadeOut: function(speed, callback){
 55.2570 +		return this.animate({opacity: "hide"}, speed, callback);
 55.2571 +	},
 55.2572 +	
 55.2573 +	fadeTo: function(speed,to,callback){
 55.2574 +		return this.animate({opacity: to}, speed, callback);
 55.2575 +	},
 55.2576 +	
 55.2577 +	animate: function( prop, speed, easing, callback ) {
 55.2578 +		var opt = jQuery.speed(speed, easing, callback);
 55.2579 +
 55.2580 +		return this[ opt.queue === false ? "each" : "queue" ](function(){
 55.2581 +			opt = jQuery.extend({}, opt);
 55.2582 +			var hidden = jQuery(this).is(":hidden"), self = this;
 55.2583 +			
 55.2584 +			for ( var p in prop ) {
 55.2585 +				if ( prop[p] == "hide" && hidden || prop[p] == "show" && !hidden )
 55.2586 +					return jQuery.isFunction(opt.complete) && opt.complete.apply(this);
 55.2587 +
 55.2588 +				if ( p == "height" || p == "width" ) {
 55.2589 +					// Store display property
 55.2590 +					opt.display = jQuery.css(this, "display");
 55.2591 +
 55.2592 +					// Make sure that nothing sneaks out
 55.2593 +					opt.overflow = this.style.overflow;
 55.2594 +				}
 55.2595 +			}
 55.2596 +
 55.2597 +			if ( opt.overflow != null )
 55.2598 +				this.style.overflow = "hidden";
 55.2599 +
 55.2600 +			opt.curAnim = jQuery.extend({}, prop);
 55.2601 +			
 55.2602 +			jQuery.each( prop, function(name, val){
 55.2603 +				var e = new jQuery.fx( self, opt, name );
 55.2604 +
 55.2605 +				if ( /toggle|show|hide/.test(val) )
 55.2606 +					e[ val == "toggle" ? hidden ? "show" : "hide" : val ]( prop );
 55.2607 +				else {
 55.2608 +					var parts = val.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),
 55.2609 +						start = e.cur(true) || 0;
 55.2610 +
 55.2611 +					if ( parts ) {
 55.2612 +						var end = parseFloat(parts[2]),
 55.2613 +							unit = parts[3] || "px";
 55.2614 +
 55.2615 +						// We need to compute starting value
 55.2616 +						if ( unit != "px" ) {
 55.2617 +							self.style[ name ] = (end || 1) + unit;
 55.2618 +							start = ((end || 1) / e.cur(true)) * start;
 55.2619 +							self.style[ name ] = start + unit;
 55.2620 +						}
 55.2621 +
 55.2622 +						// If a +=/-= token was provided, we're doing a relative animation
 55.2623 +						if ( parts[1] )
 55.2624 +							end = ((parts[1] == "-=" ? -1 : 1) * end) + start;
 55.2625 +
 55.2626 +						e.custom( start, end, unit );
 55.2627 +					} else
 55.2628 +						e.custom( start, val, "" );
 55.2629 +				}
 55.2630 +			});
 55.2631 +
 55.2632 +			// For JS strict compliance
 55.2633 +			return true;
 55.2634 +		});
 55.2635 +	},
 55.2636 +	
 55.2637 +	queue: function(type, fn){
 55.2638 +		if ( jQuery.isFunction(type) ) {
 55.2639 +			fn = type;
 55.2640 +			type = "fx";
 55.2641 +		}
 55.2642 +
 55.2643 +		if ( !type || (typeof type == "string" && !fn) )
 55.2644 +			return queue( this[0], type );
 55.2645 +
 55.2646 +		return this.each(function(){
 55.2647 +			if ( fn.constructor == Array )
 55.2648 +				queue(this, type, fn);
 55.2649 +			else {
 55.2650 +				queue(this, type).push( fn );
 55.2651 +			
 55.2652 +				if ( queue(this, type).length == 1 )
 55.2653 +					fn.apply(this);
 55.2654 +			}
 55.2655 +		});
 55.2656 +	},
 55.2657 +
 55.2658 +	stop: function(){
 55.2659 +		var timers = jQuery.timers;
 55.2660 +
 55.2661 +		return this.each(function(){
 55.2662 +			for ( var i = 0; i < timers.length; i++ )
 55.2663 +				if ( timers[i].elem == this )
 55.2664 +					timers.splice(i--, 1);
 55.2665 +		}).dequeue();
 55.2666 +	}
 55.2667 +
 55.2668 +});
 55.2669 +
 55.2670 +var queue = function( elem, type, array ) {
 55.2671 +	if ( !elem )
 55.2672 +		return;
 55.2673 +
 55.2674 +	var q = jQuery.data( elem, type + "queue" );
 55.2675 +
 55.2676 +	if ( !q || array )
 55.2677 +		q = jQuery.data( elem, type + "queue", 
 55.2678 +			array ? jQuery.makeArray(array) : [] );
 55.2679 +
 55.2680 +	return q;
 55.2681 +};
 55.2682 +
 55.2683 +jQuery.fn.dequeue = function(type){
 55.2684 +	type = type || "fx";
 55.2685 +
 55.2686 +	return this.each(function(){
 55.2687 +		var q = queue(this, type);
 55.2688 +
 55.2689 +		q.shift();
 55.2690 +
 55.2691 +		if ( q.length )
 55.2692 +			q[0].apply( this );
 55.2693 +	});
 55.2694 +};
 55.2695 +
 55.2696 +jQuery.extend({
 55.2697 +	
 55.2698 +	speed: function(speed, easing, fn) {
 55.2699 +		var opt = speed && speed.constructor == Object ? speed : {
 55.2700 +			complete: fn || !fn && easing || 
 55.2701 +				jQuery.isFunction( speed ) && speed,
 55.2702 +			duration: speed,
 55.2703 +			easing: fn && easing || easing && easing.constructor != Function && easing
 55.2704 +		};
 55.2705 +
 55.2706 +		opt.duration = (opt.duration && opt.duration.constructor == Number ? 
 55.2707 +			opt.duration : 
 55.2708 +			{ slow: 600, fast: 200 }[opt.duration]) || 400;
 55.2709 +	
 55.2710 +		// Queueing
 55.2711 +		opt.old = opt.complete;
 55.2712 +		opt.complete = function(){
 55.2713 +			jQuery(this).dequeue();
 55.2714 +			if ( jQuery.isFunction( opt.old ) )
 55.2715 +				opt.old.apply( this );
 55.2716 +		};
 55.2717 +	
 55.2718 +		return opt;
 55.2719 +	},
 55.2720 +	
 55.2721 +	easing: {
 55.2722 +		linear: function( p, n, firstNum, diff ) {
 55.2723 +			return firstNum + diff * p;
 55.2724 +		},
 55.2725 +		swing: function( p, n, firstNum, diff ) {
 55.2726 +			return ((-Math.cos(p*Math.PI)/2) + 0.5) * diff + firstNum;
 55.2727 +		}
 55.2728 +	},
 55.2729 +	
 55.2730 +	timers: [],
 55.2731 +
 55.2732 +	fx: function( elem, options, prop ){
 55.2733 +		this.options = options;
 55.2734 +		this.elem = elem;
 55.2735 +		this.prop = prop;
 55.2736 +
 55.2737 +		if ( !options.orig )
 55.2738 +			options.orig = {};
 55.2739 +	}
 55.2740 +
 55.2741 +});
 55.2742 +
 55.2743 +jQuery.fx.prototype = {
 55.2744 +
 55.2745 +	// Simple function for setting a style value
 55.2746 +	update: function(){
 55.2747 +		if ( this.options.step )
 55.2748 +			this.options.step.apply( this.elem, [ this.now, this ] );
 55.2749 +
 55.2750 +		(jQuery.fx.step[this.prop] || jQuery.fx.step._default)( this );
 55.2751 +
 55.2752 +		// Set display property to block for height/width animations
 55.2753 +		if ( this.prop == "height" || this.prop == "width" )
 55.2754 +			this.elem.style.display = "block";
 55.2755 +	},
 55.2756 +
 55.2757 +	// Get the current size
 55.2758 +	cur: function(force){
 55.2759 +		if ( this.elem[this.prop] != null && this.elem.style[this.prop] == null )
 55.2760 +			return this.elem[ this.prop ];
 55.2761 +
 55.2762 +		var r = parseFloat(jQuery.curCSS(this.elem, this.prop, force));
 55.2763 +		return r && r > -10000 ? r : parseFloat(jQuery.css(this.elem, this.prop)) || 0;
 55.2764 +	},
 55.2765 +
 55.2766 +	// Start an animation from one number to another
 55.2767 +	custom: function(from, to, unit){
 55.2768 +		this.startTime = (new Date()).getTime();
 55.2769 +		this.start = from;
 55.2770 +		this.end = to;
 55.2771 +		this.unit = unit || this.unit || "px";
 55.2772 +		this.now = this.start;
 55.2773 +		this.pos = this.state = 0;
 55.2774 +		this.update();
 55.2775 +
 55.2776 +		var self = this;
 55.2777 +		function t(){
 55.2778 +			return self.step();
 55.2779 +		}
 55.2780 +
 55.2781 +		t.elem = this.elem;
 55.2782 +
 55.2783 +		jQuery.timers.push(t);
 55.2784 +
 55.2785 +		if ( jQuery.timers.length == 1 ) {
 55.2786 +			var timer = setInterval(function(){
 55.2787 +				var timers = jQuery.timers;
 55.2788 +				
 55.2789 +				for ( var i = 0; i < timers.length; i++ )
 55.2790 +					if ( !timers[i]() )
 55.2791 +						timers.splice(i--, 1);
 55.2792 +
 55.2793 +				if ( !timers.length )
 55.2794 +					clearInterval( timer );
 55.2795 +			}, 13);
 55.2796 +		}
 55.2797 +	},
 55.2798 +
 55.2799 +	// Simple 'show' function
 55.2800 +	show: function(){
 55.2801 +		// Remember where we started, so that we can go back to it later
 55.2802 +		this.options.orig[this.prop] = jQuery.attr( this.elem.style, this.prop );
 55.2803 +		this.options.show = true;
 55.2804 +
 55.2805 +		// Begin the animation
 55.2806 +		this.custom(0, this.cur());
 55.2807 +
 55.2808 +		// Make sure that we start at a small width/height to avoid any
 55.2809 +		// flash of content
 55.2810 +		if ( this.prop == "width" || this.prop == "height" )
 55.2811 +			this.elem.style[this.prop] = "1px";
 55.2812 +		
 55.2813 +		// Start by showing the element
 55.2814 +		jQuery(this.elem).show();
 55.2815 +	},
 55.2816 +
 55.2817 +	// Simple 'hide' function
 55.2818 +	hide: function(){
 55.2819 +		// Remember where we started, so that we can go back to it later
 55.2820 +		this.options.orig[this.prop] = jQuery.attr( this.elem.style, this.prop );
 55.2821 +		this.options.hide = true;
 55.2822 +
 55.2823 +		// Begin the animation
 55.2824 +		this.custom(this.cur(), 0);
 55.2825 +	},
 55.2826 +
 55.2827 +	// Each step of an animation
 55.2828 +	step: function(){
 55.2829 +		var t = (new Date()).getTime();
 55.2830 +
 55.2831 +		if ( t > this.options.duration + this.startTime ) {
 55.2832 +			this.now = this.end;
 55.2833 +			this.pos = this.state = 1;
 55.2834 +			this.update();
 55.2835 +
 55.2836 +			this.options.curAnim[ this.prop ] = true;
 55.2837 +
 55.2838 +			var done = true;
 55.2839 +			for ( var i in this.options.curAnim )
 55.2840 +				if ( this.options.curAnim[i] !== true )
 55.2841 +					done = false;
 55.2842 +
 55.2843 +			if ( done ) {
 55.2844 +				if ( this.options.display != null ) {
 55.2845 +					// Reset the overflow
 55.2846 +					this.elem.style.overflow = this.options.overflow;
 55.2847 +				
 55.2848 +					// Reset the display
 55.2849 +					this.elem.style.display = this.options.display;
 55.2850 +					if ( jQuery.css(this.elem, "display") == "none" )
 55.2851 +						this.elem.style.display = "block";
 55.2852 +				}
 55.2853 +
 55.2854 +				// Hide the element if the "hide" operation was done
 55.2855 +				if ( this.options.hide )
 55.2856 +					this.elem.style.display = "none";
 55.2857 +
 55.2858 +				// Reset the properties, if the item has been hidden or shown
 55.2859 +				if ( this.options.hide || this.options.show )
 55.2860 +					for ( var p in this.options.curAnim )
 55.2861 +						jQuery.attr(this.elem.style, p, this.options.orig[p]);
 55.2862 +			}
 55.2863 +
 55.2864 +			// If a callback was provided, execute it
 55.2865 +			if ( done && jQuery.isFunction( this.options.complete ) )
 55.2866 +				// Execute the complete function
 55.2867 +				this.options.complete.apply( this.elem );
 55.2868 +
 55.2869 +			return false;
 55.2870 +		} else {
 55.2871 +			var n = t - this.startTime;
 55.2872 +			this.state = n / this.options.duration;
 55.2873 +
 55.2874 +			// Perform the easing function, defaults to swing
 55.2875 +			this.pos = jQuery.easing[this.options.easing || (jQuery.easing.swing ? "swing" : "linear")](this.state, n, 0, 1, this.options.duration);
 55.2876 +			this.now = this.start + ((this.end - this.start) * this.pos);
 55.2877 +
 55.2878 +			// Perform the next step of the animation
 55.2879 +			this.update();
 55.2880 +		}
 55.2881 +
 55.2882 +		return true;
 55.2883 +	}
 55.2884 +
 55.2885 +};
 55.2886 +
 55.2887 +jQuery.fx.step = {
 55.2888 +	scrollLeft: function(fx){
 55.2889 +		fx.elem.scrollLeft = fx.now;
 55.2890 +	},
 55.2891 +
 55.2892 +	scrollTop: function(fx){
 55.2893 +		fx.elem.scrollTop = fx.now;
 55.2894 +	},
 55.2895 +
 55.2896 +	opacity: function(fx){
 55.2897 +		jQuery.attr(fx.elem.style, "opacity", fx.now);
 55.2898 +	},
 55.2899 +
 55.2900 +	_default: function(fx){
 55.2901 +		fx.elem.style[ fx.prop ] = fx.now + fx.unit;
 55.2902 +	}
 55.2903 +};
 55.2904 +// The Offset Method
 55.2905 +// Originally By Brandon Aaron, part of the Dimension Plugin
 55.2906 +// http://jquery.com/plugins/project/dimensions
 55.2907 +jQuery.fn.offset = function() {
 55.2908 +	var left = 0, top = 0, elem = this[0], results;
 55.2909 +	
 55.2910 +	if ( elem ) with ( jQuery.browser ) {
 55.2911 +		var	absolute     = jQuery.css(elem, "position") == "absolute", 
 55.2912 +		    parent       = elem.parentNode, 
 55.2913 +		    offsetParent = elem.offsetParent, 
 55.2914 +		    doc          = elem.ownerDocument,
 55.2915 +		    safari2      = safari && parseInt(version) < 522;
 55.2916 +	
 55.2917 +		// Use getBoundingClientRect if available
 55.2918 +		if ( elem.getBoundingClientRect ) {
 55.2919 +			box = elem.getBoundingClientRect();
 55.2920 +		
 55.2921 +			// Add the document scroll offsets
 55.2922 +			add(
 55.2923 +				box.left + Math.max(doc.documentElement.scrollLeft, doc.body.scrollLeft),
 55.2924 +				box.top  + Math.max(doc.documentElement.scrollTop,  doc.body.scrollTop)
 55.2925 +			);
 55.2926 +		
 55.2927 +			// IE adds the HTML element's border, by default it is medium which is 2px
 55.2928 +			// IE 6 and IE 7 quirks mode the border width is overwritable by the following css html { border: 0; }
 55.2929 +			// IE 7 standards mode, the border is always 2px
 55.2930 +			if ( msie ) {
 55.2931 +				var border = jQuery("html").css("borderWidth");
 55.2932 +				border = (border == "medium" || jQuery.boxModel && parseInt(version) >= 7) && 2 || border;
 55.2933 +				add( -border, -border );
 55.2934 +			}
 55.2935 +	
 55.2936 +		// Otherwise loop through the offsetParents and parentNodes
 55.2937 +		} else {
 55.2938 +		
 55.2939 +			// Initial element offsets
 55.2940 +			add( elem.offsetLeft, elem.offsetTop );
 55.2941 +		
 55.2942 +			// Get parent offsets
 55.2943 +			while ( offsetParent ) {
 55.2944 +				// Add offsetParent offsets
 55.2945 +				add( offsetParent.offsetLeft, offsetParent.offsetTop );
 55.2946 +			
 55.2947 +				// Mozilla and Safari > 2 does not include the border on offset parents
 55.2948 +				// However Mozilla adds the border for table cells
 55.2949 +				if ( mozilla && /^t[d|h]$/i.test(parent.tagName) || !safari2 )
 55.2950 +					border( offsetParent );
 55.2951 +				
 55.2952 +				// Safari <= 2 doubles body offsets with an absolutely positioned element or parent
 55.2953 +				if ( safari2 && !absolute && jQuery.css(offsetParent, "position") == "absolute" )
 55.2954 +					absolute = true;
 55.2955 +			
 55.2956 +				// Get next offsetParent
 55.2957 +				offsetParent = offsetParent.offsetParent;
 55.2958 +			}
 55.2959 +		
 55.2960 +			// Get parent scroll offsets
 55.2961 +			while ( parent.tagName && !/^body|html$/i.test(parent.tagName) ) {
 55.2962 +				// Work around opera inline/table scrollLeft/Top bug
 55.2963 +				if ( !/^inline|table-row.*$/i.test(jQuery.css(parent, "display")) )
 55.2964 +					// Subtract parent scroll offsets
 55.2965 +					add( -parent.scrollLeft, -parent.scrollTop );
 55.2966 +			
 55.2967 +				// Mozilla does not add the border for a parent that has overflow != visible
 55.2968 +				if ( mozilla && jQuery.css(parent, "overflow") != "visible" )
 55.2969 +					border( parent );
 55.2970 +			
 55.2971 +				// Get next parent
 55.2972 +				parent = parent.parentNode;
 55.2973 +			}
 55.2974 +		
 55.2975 +			// Safari doubles body offsets with an absolutely positioned element or parent
 55.2976 +			if ( safari2 && absolute )
 55.2977 +				add( -doc.body.offsetLeft, -doc.body.offsetTop );
 55.2978 +		}
 55.2979 +
 55.2980 +		// Return an object with top and left properties
 55.2981 +		results = { top: top, left: left };
 55.2982 +	}
 55.2983 +
 55.2984 +	return results;
 55.2985 +
 55.2986 +	function border(elem) {
 55.2987 +		add( jQuery.css(elem, "borderLeftWidth"), jQuery.css(elem, "borderTopWidth") );
 55.2988 +	}
 55.2989 +
 55.2990 +	function add(l, t) {
 55.2991 +		left += parseInt(l) || 0;
 55.2992 +		top += parseInt(t) || 0;
 55.2993 +	}
 55.2994 +};
 55.2995 +})();
    56.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    56.2 +++ b/web/support/styles/styles.css	Tue Nov 24 11:44:49 2009 +0100
    56.3 @@ -0,0 +1,293 @@
    56.4 +body {
    56.5 +  background: #F2F1F0;
    56.6 +  font-family: verdana,sans-serif;
    56.7 +}
    56.8 +
    56.9 +.navheader, .book, .preface, .chapter, .appendix, .bibliography, .navfooter, .basetemplate {
   56.10 +  width: 50em;
   56.11 +  margin-left: auto;
   56.12 +  margin-right: auto;
   56.13 +}
   56.14 +
   56.15 +a.commenttoggle:hover, a.commenttoggle:active {
   56.16 +  opacity: 0.7;
   56.17 +}
   56.18 +
   56.19 +.book, .preface, .chapter, .appendix, .bibliography, .basetemplate {
   56.20 +  background: white;
   56.21 +  padding: 2em;
   56.22 +}
   56.23 +
   56.24 +h1 {
   56.25 +  margin-top: 1.5em;
   56.26 +}
   56.27 +
   56.28 +span.beta {
   56.29 +  font-size: 80%;
   56.30 +  font-style: italic;
   56.31 +  opacity: 0.4;
   56.32 +}
   56.33 +
   56.34 +h2, h3 {
   56.35 +  margin-top: 2em;
   56.36 +}
   56.37 +
   56.38 +h1, h2, h3 {
   56.39 +  font-family: georgia,serif;
   56.40 +  font-weight: normal;
   56.41 +  margin-bottom: 0.5em;
   56.42 +}
   56.43 +
   56.44 +h1.booktitle {
   56.45 +  margin-bottom: 0px;
   56.46 +}
   56.47 +
   56.48 +h2.booktitle {
   56.49 +  text-align: center;
   56.50 +}
   56.51 +
   56.52 +h2.booktitle > a {
   56.53 +  color: black;
   56.54 +}
   56.55 +
   56.56 +.authors {
   56.57 +  font-size: 80%;
   56.58 +  opacity: 0.55;
   56.59 +  padding-left: 0.5em;
   56.60 +}
   56.61 +
   56.62 +div.note th, div.tip th, div.warning th {
   56.63 +  font-family: georgia,serif;
   56.64 +  font-weight: normal;
   56.65 +  font-size: 110%;
   56.66 +}
   56.67 +
   56.68 +div.navheader th, div.navfooter td {
   56.69 +  font-family: georgia,serif;
   56.70 +}
   56.71 +
   56.72 +div.navheader th {
   56.73 +  opacity: 0;
   56.74 +  font-size: 0;
   56.75 +}
   56.76 +
   56.77 +pre.screen {
   56.78 +  background-image: url(/support/icons/shell.png);
   56.79 +}
   56.80 +
   56.81 +pre.programlisting {
   56.82 +  background-image: url(/support/icons/source.png);
   56.83 +}
   56.84 +
   56.85 +pre.programlisting, pre.screen, p.remark {
   56.86 +  border-style: solid;
   56.87 +  border-width: 1px;
   56.88 +  font-size: medium;
   56.89 +  padding: 1em;
   56.90 +  background-repeat: no-repeat;
   56.91 +  background-position: 10px 10px;
   56.92 +  padding-left: 70px;
   56.93 +}
   56.94 +
   56.95 +strong.command, code, pre, span.type {
   56.96 +  font-family: monospace;
   56.97 +  font-weight: normal;
   56.98 +}
   56.99 +
  56.100 +strong.userinput > code {
  56.101 +  font-weight: bolder;
  56.102 +  color: #303030;
  56.103 +}
  56.104 +
  56.105 +div.toc > p {
  56.106 +  opacity: 0.35;
  56.107 +  font-family: georgia,serif;
  56.108 +  cursor: pointer;
  56.109 +}
  56.110 +
  56.111 +div.toc b {
  56.112 +  font-weight: normal;
  56.113 +  font-size: large;
  56.114 +}
  56.115 +
  56.116 +ul.booktoc {
  56.117 +  padding-left: 0px;
  56.118 +  list-style-type: none;
  56.119 +}
  56.120 +
  56.121 +.booktoc > li {
  56.122 +  padding: 0.5em;
  56.123 +}
  56.124 +
  56.125 +.chapinfo {
  56.126 +  float: right;
  56.127 +  color: #a0a0a0;
  56.128 +}
  56.129 +
  56.130 +.unpublished {
  56.131 +  color: #a0a0a0;
  56.132 +}
  56.133 +
  56.134 +.chapinfo img {
  56.135 +  vertical-align: -35%;
  56.136 +  border: 0px;
  56.137 +}
  56.138 +
  56.139 +.zebra_b {
  56.140 +  background: #f4f4f4;
  56.141 +}
  56.142 +
  56.143 +.book .titlepage {
  56.144 +  display: none;
  56.145 +}
  56.146 +
  56.147 +.chapter div.toc > dl {
  56.148 +  display: none;
  56.149 +}
  56.150 +
  56.151 +pre.programlisting, pre.screen, p.remark {
  56.152 +  overflow: hidden;
  56.153 +}
  56.154 +
  56.155 +p.remark {
  56.156 +  background-image: url(/support/icons/remark.png);
  56.157 +}
  56.158 +
  56.159 +div.warning, p.remark {
  56.160 +  background-color: #FFEFE8;
  56.161 +  border-color: #e0a8a0;
  56.162 +}
  56.163 +
  56.164 +span.remark {
  56.165 +  font-style: normal;
  56.166 +  color: #707070;
  56.167 +}
  56.168 +
  56.169 +.screen {
  56.170 +  background: #e7ffc7 none repeat scroll 0% 50%;
  56.171 +  border-color: #94DA3A;
  56.172 +}
  56.173 +
  56.174 +.programlisting {
  56.175 +  background: #F0F4FF none repeat scroll 0% 50%;
  56.176 +  border-color: #B4BAEA;
  56.177 +}
  56.178 +
  56.179 +.prompt {
  56.180 +  color: #448844;
  56.181 +}
  56.182 +
  56.183 +div.note, div.tip {
  56.184 +  background: #ffffc9;
  56.185 +  border-color: #B4BAEA;
  56.186 +}
  56.187 +
  56.188 +div.note, div.warning, div.tip {
  56.189 +  border-style: solid;
  56.190 +  border-width: 1px;
  56.191 +  padding: 1em;
  56.192 +}
  56.193 +
  56.194 +.note .title {
  56.195 +  font-size: 90%;
  56.196 +}
  56.197 +
  56.198 +.comment {
  56.199 +  font-size: 80%;
  56.200 +}
  56.201 +
  56.202 +div.comment, div.new_comment {
  56.203 +  padding: 0.5em;
  56.204 +  margin: 0.5em;
  56.205 +  margin-left: 2em;
  56.206 +  border-style: solid;
  56.207 +  border-width: 1px;
  56.208 +  border-color: #aaaaff;
  56.209 +}
  56.210 +
  56.211 +div.comment {
  56.212 +  background: #eeeeff;
  56.213 +}
  56.214 +
  56.215 +div.new_comment {
  56.216 +  background: #d0d0ff;
  56.217 +}
  56.218 +
  56.219 +.commenttoggle {
  56.220 +  opacity: 0.35;
  56.221 +}
  56.222 +
  56.223 +.comment_help {
  56.224 +  font-size: 80%;
  56.225 +}
  56.226 +
  56.227 +.comment_header {
  56.228 +  opacity: 0.75;
  56.229 +}
  56.230 +
  56.231 +.comment_id {
  56.232 +  float: right;
  56.233 +  opacity: 0.3;
  56.234 +  font-size: 60%;
  56.235 +}
  56.236 +
  56.237 +.comment_name {
  56.238 +  font-weight: bolder;
  56.239 +}
  56.240 +
  56.241 +.comment_reviewed {
  56.242 +  color: darkgreen;
  56.243 +  margin-left: 1em;
  56.244 +  font-style: italic;
  56.245 +}
  56.246 +
  56.247 +.comment_date {
  56.248 +  opacity: 0.75;
  56.249 +}
  56.250 +
  56.251 +.comment_thanks {
  56.252 +  color: darkblue;
  56.253 +  margin-left: 1em;
  56.254 +  font-style: italic;
  56.255 +  font-weight: bolder;
  56.256 +}
  56.257 +
  56.258 +.comment_error {
  56.259 +  padding-left: 1em;
  56.260 +  font-weight: bolder;
  56.261 +  font-size: 80%;
  56.262 +  color: darkred;
  56.263 +}
  56.264 +
  56.265 +.hgbookfooter {
  56.266 +  width: 60em;
  56.267 +  margin-left: auto;
  56.268 +  margin-right: auto;
  56.269 +  margin-top: 2em;
  56.270 +  padding: 2em;
  56.271 +  margin-bottom: 2em;
  56.272 +  font-size: 80%;
  56.273 +  color: #727272;
  56.274 +  border-top: 1px solid grey;
  56.275 +}
  56.276 +
  56.277 +.hgbookfooter a {
  56.278 +  color: #5555ff;
  56.279 +}
  56.280 +
  56.281 +.hgbookfooter a:visited {
  56.282 +  opacity: 0.7;
  56.283 +}
  56.284 +
  56.285 +.hgbookfooter img {
  56.286 +  vertical-align: -45%;
  56.287 +}
  56.288 +
  56.289 +table.equation a.commenttoggle {
  56.290 +  text-align: right;
  56.291 +  display: block;
  56.292 +}
  56.293 +
  56.294 +div.comment, div.new_comment, form.comment {
  56.295 +  text-align: left;
  56.296 +}