hgbook
changeset 1011:a05a5ae66c38
merge
author | Romain PELISSE <belaran@gmail.com> |
---|---|
date | Mon Nov 23 10:51:14 2009 +0100 (2009-11-23) |
parents | 0fba9db5e75c 93154fbaae9b |
children | 7ec542fabc34 |
files | fr/ch12-mq.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 Sat Sep 12 20:53:56 2009 +0200 1.2 +++ b/Makefile Mon Nov 23 10:51:14 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 Sat Sep 12 20:53:56 2009 +0200 2.2 +++ b/Makefile.vars.tmpl Mon Nov 23 10:51:14 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 Sat Sep 12 20:53:56 2009 +0200 3.2 +++ b/README Mon Nov 23 10:51:14 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 Sat Sep 12 20:53:56 2009 +0200 4.2 +++ b/README.BUILD Mon Nov 23 10:51:14 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 Sat Sep 12 20:53:56 2009 +0200 5.2 +++ b/contrib/hg-package Mon Nov 23 10:51:14 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 Sat Sep 12 20:53:56 2009 +0200 6.2 +++ b/en/ch12-mq.xml Mon Nov 23 10:51:14 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/ch12-mq.xml Sat Sep 12 20:53:56 2009 +0200 7.2 +++ b/fr/ch12-mq.xml Mon Nov 23 10:51:14 2009 +0100 7.3 @@ -438,7 +438,7 @@ 7.4 <command role="hg-ext-mq">qpop</command> each operate on a 7.5 single patch at a time by default, you can push and pop many 7.6 patches in one go. The <option 7.7 - role="hg-ext-mq-cmd-qpush-opt">hg -a</option> option to 7.8 + role="hg-ext-mq-cmd-qpush-opt">-a</option> option to 7.9 <command role="hg-ext-mq">qpush</command> causes it to push 7.10 all unapplied patches, while the <option 7.11 role="hg-ext-mq-cmd-qpop-opt">-a</option> option to <command 7.12 @@ -469,10 +469,10 @@ 7.13 named <option>-f</option>. The exact meaning of 7.14 <option>-f</option> depends on the command. For example, 7.15 <command role="hg-cmd">hg qnew <option 7.16 - role="hg-ext-mq-cmd-qnew-opt">hg -f</option></command> 7.17 + role="hg-ext-mq-cmd-qnew-opt">-f</option></command> 7.18 will incorporate any outstanding changes into the new patch it 7.19 creates, but <command role="hg-cmd">hg qpop <option 7.20 - role="hg-ext-mq-cmd-qpop-opt">hg -f</option></command> 7.21 + role="hg-ext-mq-cmd-qpop-opt">-f</option></command> 7.22 will revert modifications to any files affected by the patch 7.23 that it is popping. Be sure to read the documentation for a 7.24 command's <option>-f</option> option before you use it!</para> 7.25 @@ -808,9 +808,9 @@ 7.26 7.27 <para id="x_404">On my old, slow laptop, I was able to <command 7.28 role="hg-cmd">hg qpush <option 7.29 - role="hg-ext-mq-cmd-qpush-opt">hg -a</option></command> all 7.30 + role="hg-ext-mq-cmd-qpush-opt">-a</option></command> all 7.31 1,738 patches in 3.5 minutes, and <command role="hg-cmd">hg qpop 7.32 - <option role="hg-ext-mq-cmd-qpop-opt">hg -a</option></command> 7.33 + <option role="hg-ext-mq-cmd-qpop-opt">-a</option></command> 7.34 them all in 30 seconds. (On a newer laptop, the time to push 7.35 all patches dropped to two minutes.) I could <command 7.36 role="hg-ext-mq">qrefresh</command> one of the biggest patches 7.37 @@ -866,7 +866,7 @@ 7.38 -a</option></command> your patches, then <command 7.39 role="hg-cmd">hg pull</command> changes into the underlying 7.40 repository, and finally <command role="hg-cmd">hg qpush <option 7.41 - role="hg-ext-mq-cmd-qpop-opt">hg -a</option></command> your 7.42 + role="hg-ext-mq-cmd-qpop-opt">-a</option></command> your 7.43 patches again. MQ will stop pushing any time it runs across a 7.44 patch that fails to apply during conflicts, allowing you to fix 7.45 your conflicts, <command role="hg-ext-mq">qrefresh</command> the 7.46 @@ -1138,9 +1138,9 @@ 7.47 update</command> changes to patches or the <filename 7.48 role="special">series</filename> file, you will have to 7.49 <command role="hg-cmd">hg qpop <option 7.50 - role="hg-ext-mq-cmd-qpop-opt">hg -a</option></command> and 7.51 + role="hg-ext-mq-cmd-qpop-opt">-a</option></command> and 7.52 then <command role="hg-cmd">hg qpush <option 7.53 - role="hg-ext-mq-cmd-qpush-opt">hg -a</option></command> in 7.54 + role="hg-ext-mq-cmd-qpush-opt">-a</option></command> in 7.55 the underlying repository to see those changes show up there. 7.56 If you forget to do this, you can confuse MQ's idea of which 7.57 patches are applied.</para>
8.1 Binary file it/figs/caution.png has changed
9.1 Binary file it/figs/note.png has changed
10.1 Binary file it/figs/tip.png has changed
11.1 Binary file it/figs/warning.png has changed
12.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 12.2 +++ b/plastex-theme/README.txt Mon Nov 23 10:51:14 2009 +0100 12.3 @@ -0,0 +1,12 @@ 12.4 +This is a theme designed to use with the plasTeX page template 12.5 +renderer to generate commentable documents. 12.6 + 12.7 +To "install" it, symlink this folder from the plasTeX XHTML Themes 12.8 +folder. Example: 12.9 + 12.10 +faraday:/usr/lib/pymodules/python2.5/plasTeX/Renderers/XHTML/Themes# 12.11 +ln -s (this folder) alqua 12.12 + 12.13 +Usage example: 12.14 + 12.15 +$ plastex --theme=alqua --split-level=0 mylatex.tex
13.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 13.2 +++ b/plastex-theme/default-layout.html Mon Nov 23 10:51:14 2009 +0100 13.3 @@ -0,0 +1,145 @@ 13.4 +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 13.5 +<html tal:define="links self/links" 13.6 + xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> 13.7 + <head> 13.8 + 13.9 + <meta name="generator" content="plasTeX" /> 13.10 + <meta http-equiv="content-type" 13.11 + tal:attributes="content string:text/html;; charset=${config/files/output-encoding}" /> 13.12 + 13.13 + <title tal:condition="python:path('self/level') > -10" 13.14 + tal:content="stripped string:${links/document/title}: ${self/title}"> 13.15 + Book title 13.16 + </title> 13.17 + <link tal:condition="links/next" 13.18 + rel="next" 13.19 + tal:attributes="href links/next/url; title links/next/title/textContent" /> 13.20 + <link tal:condition="links/prev" 13.21 + rel="prev" 13.22 + tal:attributes="href links/prev/url; title links/prev/title/textContent" /> 13.23 + <link tal:condition="links/up" 13.24 + rel="up" 13.25 + tal:attributes="href links/up/url; title links/up/title/textContent" /> 13.26 + 13.27 + <link rel="stylesheet" href="styles/styles.css"/> 13.28 + <link rel="stylesheet" href="/support/styles/styles.css"/> 13.29 + 13.30 + <link rel="alternate" type="application/atom+xml" title="Comments" 13.31 + href="/feeds/comments/"/> 13.32 + <link rel="shortcut icon" type="image/png" 13.33 + href="/support/figs/favicon.png"/> 13.34 + 13.35 + <script type="text/javascript" src="/support/javascript/jquery.js"></script> 13.36 + <script type="text/javascript" src="/support/javascript/form-min.js"></script> 13.37 + 13.38 + </head> 13.39 + 13.40 + <body> 13.41 + 13.42 + <div class="navheader"><h2 class="booktitle"> 13.43 + <tal:booktitle replace="links/document/title" /> 13.44 + <div class="authors">by 13.45 + <tal:author tal:content="links/document/attributes/author"> 13.46 + Author 13.47 + </tal:author> 13.48 + </div> 13.49 + </h2> 13.50 + </div> 13.51 + 13.52 + <div class="navheader" metal:define-macro="navigation"> 13.53 + <table width="100%"> 13.54 + <tr> 13.55 + <td width="40%" align="left"> 13.56 + <a tal:condition="links/prev" 13.57 + tal:attributes="href links/prev/url; 13.58 + title stripped:links/prev/title" 13.59 + accesskey="p">Prev</a> </td> 13.60 + <td width="20%" align="center"> 13.61 + <a tal:condition="links/up" 13.62 + tal:attributes="href links/up/url">Up</a> 13.63 + </td> 13.64 + <td width="40%" align="right"> 13.65 + <a tal:condition="links/next" 13.66 + tal:attributes="href links/next/url; 13.67 + title stripped:links/next/title" 13.68 + accesskey="n">Next</a> 13.69 + </td> 13.70 + </tr> 13.71 + <tr> 13.72 + <td width="40%" align="left"> 13.73 + <span tal:condition="links/prev" 13.74 + tal:replace="stripped:links/prev/title">Prev</span> 13.75 + </td> 13.76 + <td width="20%" align="center"> </td> 13.77 + <td width="40%" align="right"> 13.78 + <span tal:condition="links/next" 13.79 + tal:replace="stripped:links/next/title">Next</span> 13.80 + </td> 13.81 + </tr> 13.82 + </table> 13.83 + </div> 13.84 + 13.85 + <div class="chapter" 13.86 + tal:attributes="id string:${links/document/title}: ${self/title}"> 13.87 + 13.88 + <div class="file_contents" tal:content="self">File contents.</div> 13.89 + 13.90 + <div tal:condition="self/tableofcontents" 13.91 + tal:attributes="class 13.92 + string:contents 13.93 + ${self/nodeName}-contents"> 13.94 + <ul> 13.95 + <li tal:repeat="section self/tableofcontents"><a href="." tal:attributes="href section/url" tal:content="section/fullTocEntry">Aliquam est. Aliquam fringilla pede</a> 13.96 + <ul tal:condition="section/tableofcontents"> 13.97 + <li tal:repeat="subsection section/tableofcontents"><a href="." tal:attributes="href subsection/url" tal:content="subsection/fullTocEntry"></a> 13.98 + <ul tal:condition="subsection/tableofcontents"> 13.99 + <li tal:repeat="subsubsection subsection/tableofcontents"><a href="." tal:attributes="href subsubsection/url" tal:content="subsubsection/fullTocEntry"></a> 13.100 + <ul tal:condition="subsubsection/tableofcontents"> 13.101 + <li tal:repeat="paragraph subsubsection/tableofcontents"><a href="." tal:attributes="href paragraph/url" tal:content="paragraph/fullTocEntry"></a> 13.102 + <ul tal:condition="paragraph/tableofcontents"> 13.103 + <li tal:repeat="subparagraph paragraph/tableofcontents"><a href="." tal:attributes="href subparagraph/url" tal:content="subparagraph/fullTocEntry"></a></li> 13.104 + </ul> 13.105 + </li> 13.106 + </ul> 13.107 + </li> 13.108 + </ul> 13.109 + </li> 13.110 + </ul> 13.111 + </li> 13.112 + <li tal:replace="nothing"><a href=".">Maecenas id purus</a></li> 13.113 + </ul> 13.114 + </div> 13.115 + 13.116 + 13.117 + <div id="footnotes" tal:condition="self/footnotes"> 13.118 + <p><b>Footnotes</b></p> 13.119 + <ol> 13.120 + <li tal:repeat="footnote self/footnotes" 13.121 + tal:content="footnote" 13.122 + tal:attributes="id footnote/id">footnote text</li> 13.123 + </ol> 13.124 + </div> 13.125 + 13.126 + </div> 13.127 + 13.128 + <div class="navfooter" 13.129 + metal:use-macro="template/macros/navigation" /> 13.130 + 13.131 + <div class="hgbookfooter"> <p><img src="/support/icons/rss.png"> Want to stay 13.132 + up to date? Subscribe to the comment feed for the 13.133 + <a class="feed" 13.134 + href="/feeds/comments/">entire book</a>.</p> 13.135 + <p>Icons by 13.136 + <a href="mailto:mattahan@gmail.com">Paul Davey</a> aka 13.137 + <a href="http://mattahan.deviantart.com/">Mattahan</a>.</p> 13.138 + </div> 13.139 + 13.140 + </body> 13.141 + 13.142 + <script language="javascript" src="icons/imgadjust.js" 13.143 + type="text/javascript"> 13.144 + </script> 13.145 + <script type="text/javascript" src="/support/javascript/hsbook.js"> 13.146 + </script> 13.147 + 13.148 +</html>
14.1 --- a/po/zh.po Sat Sep 12 20:53:56 2009 +0200 14.2 +++ b/po/zh.po Mon Nov 23 10:51:14 2009 +0100 14.3 @@ -42,7 +42,7 @@ 14.4 msgstr "" 14.5 "Project-Id-Version: hgbook 1.2\n" 14.6 "POT-Creation-Date: 2009-05-21 14:26+0800\n" 14.7 -"PO-Revision-Date: 2009-05-21 16:42+0800\n" 14.8 +"PO-Revision-Date: 2009-10-21 16:42+0800\n" 14.9 "Last-Translator: 宋冬生 <songdonogsheng@live.cn>\n" 14.10 "Language-Team: Simplified Chinese <i18n-zh@googlegroups.com >\n" 14.11 "MIME-Version: 1.0\n" 14.12 @@ -2372,7 +2372,7 @@ 14.13 #. type: Content of: <book><chapter><title> 14.14 #: ../en/ch01-intro.xml:5 14.15 msgid "How did we get here?" 14.16 -msgstr "" 14.17 +msgstr "写在前面" 14.18 14.19 #. type: Content of: <book><chapter><sect1><title> 14.20 #: ../en/ch01-intro.xml:8
15.1 --- a/stylesheets/fo.xsl Sat Sep 12 20:53:56 2009 +0200 15.2 +++ b/stylesheets/fo.xsl Mon Nov 23 10:51:14 2009 +0100 15.3 @@ -1,8 +1,12 @@ 15.4 <?xml version="1.0"?> 15.5 -<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version='1.0'> 15.6 +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 15.7 + xmlns:fo="http://www.w3.org/1999/XSL/Format" 15.8 + version='1.0'> 15.9 15.10 <xsl:import href="http://docbook.sourceforge.net/release/xsl/current/fo/docbook.xsl"/> 15.11 15.12 + <xsl:param name="l10n.gentext.language" select="'en'"/> 15.13 + <xsl:param name="paper.type" select="'A4'"></xsl:param> 15.14 <xsl:param name="draft.mode" select="no"/> 15.15 15.16 <!-- These extensions are required for table printing and other stuff --> 15.17 @@ -22,42 +26,24 @@ 15.18 <xsl:param name="section.autolabel" select="1" /> 15.19 <xsl:param name="section.label.includes.component.label">1</xsl:param> 15.20 15.21 - <xsl:param name="variablelist.as.blocks" select="1" /> <!-- fo only --> 15.22 - <xsl:param name="hyphenate">false</xsl:param> <!-- fo only --> 15.23 - <xsl:param name="paper.type" select="'A4'"></xsl:param> <!-- fo only --> 15.24 + <xsl:param name="variablelist.as.blocks" select="1" /> 15.25 + <xsl:param name="hyphenate">false</xsl:param> 15.26 15.27 - <!-- Default font settings --> 15.28 - <!-- 15.29 - <xsl:param name="title.font.family">sans-serif</xsl:param> 15.30 - <xsl:param name="body.font.family">serif</xsl:param> 15.31 - <xsl:param name="sans.font.family">sans-serif</xsl:param> 15.32 - <xsl:param name="dingbat.font.family">serif</xsl:param> 15.33 - <xsl:param name="monospace.font.family">monospace</xsl:param> 15.34 + <!-- Font settings, we use characters out of base14 even for english --> 15.35 + <xsl:param name="title.font.family">sans-serif,Arial</xsl:param> 15.36 + <xsl:param name="body.font.family">serif,Times New Roman</xsl:param> 15.37 + <xsl:param name="sans.font.family">sans-serif,Arial</xsl:param> 15.38 + <xsl:param name="dingbat.font.family">serif,Times New Roman</xsl:param> 15.39 + <xsl:param name="monospace.font.family">monospace,Courier New</xsl:param> 15.40 <xsl:param name="symbol.font.family">Symbol,ZapfDingbats</xsl:param> 15.41 - --> 15.42 15.43 - <!-- Custom font settings - preferred truetype font --> 15.44 - <xsl:param name="title.font.family">Calibri,sans-serif,SimHei</xsl:param> 15.45 - <xsl:param name="body.font.family">Cambria,Cambria Math,serif,SimSun</xsl:param> 15.46 - <xsl:param name="sans.font.family">Calibri,sans-serif,SimHei</xsl:param> 15.47 - <xsl:param name="dingbat.font.family">Cambria,Cambria Math,serif,SimSun</xsl:param> 15.48 - <xsl:param name="monospace.font.family">Courier New,monospace,FangSong</xsl:param> 15.49 - 15.50 - <!-- Page related Settings --> 15.51 + <!-- Page related settings --> 15.52 <xsl:param name="page.margin.inner">1.5cm</xsl:param> 15.53 <xsl:param name="page.margin.outer">1.5cm</xsl:param> 15.54 <xsl:param name="title.margin.left">0pt</xsl:param> 15.55 <xsl:param name="body.start.indent">24pt</xsl:param> 15.56 <xsl:param name="body.end.indent">0pt</xsl:param> 15.57 15.58 - <!-- Breaking long lines --> 15.59 - <xsl:param name="hyphenate.verbatim">0</xsl:param> 15.60 - <xsl:attribute-set name="monospace.verbatim.properties" 15.61 - use-attribute-sets="verbatim.properties monospace.properties"> 15.62 - <xsl:attribute name="wrap-option">wrap</xsl:attribute> 15.63 - <xsl:attribute name="hyphenation-character">►</xsl:attribute> 15.64 - </xsl:attribute-set> 15.65 - 15.66 <!-- Prevent blank pages in output --> 15.67 <xsl:template name="book.titlepage.before.verso"> 15.68 </xsl:template> 15.69 @@ -66,6 +52,105 @@ 15.70 <xsl:template name="book.titlepage.separator"> 15.71 </xsl:template> 15.72 15.73 + <!-- titlepage settings --> 15.74 + <xsl:template name="book.titlepage"> 15.75 + <fo:block> 15.76 + <fo:table table-layout="fixed" space-after.optimum="10pt" width="100%"> 15.77 + <fo:table-body> 15.78 + <fo:table-row> 15.79 + <fo:table-cell> 15.80 + <fo:block text-align="center"> 15.81 + <!--fo:external-graphic src="url(figs/cover-logo.png)" 15.82 + width="90%" height="auto" content-width="scale-to-fit" content-height="scale-to-fit" /--> 15.83 + </fo:block> 15.84 + </fo:table-cell> 15.85 + </fo:table-row> 15.86 + </fo:table-body> 15.87 + </fo:table> 15.88 + </fo:block> 15.89 + 15.90 + <fo:block text-align="center" color="#000000" margin-left="1cm" margin-right="1cm" 15.91 + space-before.optimum="3cm" space-after.optimum="5.0cm" 15.92 + font-weight="900" font-size="32pt"> 15.93 + <xsl:attribute name="font-family"><xsl:value-of select="$title.font.family" /></xsl:attribute> 15.94 + 15.95 + <xsl:value-of select="/book/title"/> 15.96 + </fo:block> 15.97 + 15.98 + <fo:block text-align="center" color="#000080" margin-left="1cm" margin-right="1cm" 15.99 + space-before.optimum="2cm" space-after.optimum="8.0cm" 15.100 + font-weight="900" font-size="16pt"> 15.101 + <xsl:attribute name="font-family"><xsl:value-of select="$title.font.family" /></xsl:attribute> 15.102 + 15.103 + <xsl:value-of select="/book/subtitle"/> 15.104 + </fo:block> 15.105 + 15.106 + <fo:block text-align="center" color="#000000" margin-left="1cm" margin-right="1cm" 15.107 + space-before.optimum="8cm" space-after.optimum="10cm" 15.108 + font-weight="600" font-size="24pt"> 15.109 + <xsl:attribute name="font-family"><xsl:value-of select="$title.font.family" /></xsl:attribute> 15.110 + 15.111 + <xsl:call-template name="person.name.list"> 15.112 + <xsl:with-param name="person.list" select="bookinfo/authorgroup/author"/> 15.113 + </xsl:call-template> 15.114 + </fo:block> 15.115 + 15.116 + <!--fo:block text-align="end" color="#666D70" margin-left="1cm" margin-right="1cm" 15.117 + font-family="sans-serif" font-weight="normal" font-size="10pt" > 15.118 + <xsl:value-of select="/book/subtitle"/> 15.119 + </fo:block--> 15.120 + </xsl:template> 15.121 + 15.122 + <!-- title settings --> 15.123 + <xsl:attribute-set name="preface.titlepage.recto.style"> 15.124 + <xsl:attribute name="color">#7C1C51</xsl:attribute> 15.125 + </xsl:attribute-set> 15.126 + <xsl:attribute-set name="chapter.titlepage.recto.style"> 15.127 + <xsl:attribute name="color">#7C1C51</xsl:attribute> 15.128 + </xsl:attribute-set> 15.129 + <xsl:attribute-set name="section.titlepage.recto.style"> 15.130 + <xsl:attribute name="color">#7C1C51</xsl:attribute> 15.131 + </xsl:attribute-set> 15.132 + <xsl:attribute-set name="appendix.titlepage.recto.style"> 15.133 + <xsl:attribute name="color">#7C1C51</xsl:attribute> 15.134 + </xsl:attribute-set> 15.135 + 15.136 + <!-- Verbatim related settings --> 15.137 + <xsl:param name="hyphenate.verbatim">0</xsl:param> 15.138 + 15.139 + <xsl:attribute-set name="monospace.properties"> 15.140 + <xsl:attribute name="font-family"> 15.141 + <xsl:value-of select="$monospace.font.family"/> 15.142 + </xsl:attribute> 15.143 + <xsl:attribute name="color">#000080</xsl:attribute> 15.144 + </xsl:attribute-set> 15.145 + 15.146 + <xsl:attribute-set name="monospace.verbatim.properties" 15.147 + use-attribute-sets="verbatim.properties monospace.properties"> 15.148 + <xsl:attribute name="border-color">blue</xsl:attribute> 15.149 + <xsl:attribute name="border-width">thin</xsl:attribute> 15.150 + <xsl:attribute name="border-style">solid</xsl:attribute> 15.151 + <xsl:attribute name="font-size">8pt</xsl:attribute> 15.152 + <xsl:attribute name="wrap-option">wrap</xsl:attribute> 15.153 + <xsl:attribute name="hyphenation-character">►</xsl:attribute> 15.154 + <!--xsl:attribute name="hyphenation-character">➤</xsl:attribute--> 15.155 + </xsl:attribute-set> 15.156 + 15.157 + <!-- emphasis settings --> 15.158 + <xsl:template match="emphasis"> 15.159 + <xsl:param name="content"> 15.160 + <xsl:call-template name="simple.xlink"> 15.161 + <xsl:with-param name="content"> 15.162 + <xsl:apply-templates/> 15.163 + </xsl:with-param> 15.164 + </xsl:call-template> 15.165 + </xsl:param> 15.166 + 15.167 + <fo:inline color="#7C1C51" font-weight="bold"> 15.168 + <xsl:copy-of select="$content"/> 15.169 + </fo:inline> 15.170 + </xsl:template> 15.171 + 15.172 <!-- Colourize links in output --> 15.173 <xsl:attribute-set name="xref.properties"> 15.174 <xsl:attribute name="color">
16.1 --- a/stylesheets/zh/fo.xsl Sat Sep 12 20:53:56 2009 +0200 16.2 +++ b/stylesheets/zh/fo.xsl Mon Nov 23 10:51:14 2009 +0100 16.3 @@ -8,6 +8,13 @@ 16.4 <xsl:param name="l10n.gentext.language" select="'zh'"/> 16.5 16.6 <!-- Chinese font related settings --> 16.7 + <xsl:param name="title.font.family">Calibri,sans-serif,SimHei</xsl:param> 16.8 + <xsl:param name="body.font.family">Cambria,Cambria Math,serif,SimSun</xsl:param> 16.9 + <xsl:param name="sans.font.family">Calibri,sans-serif,SimHei</xsl:param> 16.10 + <xsl:param name="dingbat.font.family">Cambria,Cambria Math,serif,SimSun</xsl:param> 16.11 + <xsl:param name="monospace.font.family">Courier New,monospace,FangSong</xsl:param> 16.12 + 16.13 + <!-- Chinese para related settings --> 16.14 <xsl:param name="body.font.master">12</xsl:param> 16.15 16.16 <xsl:attribute-set name="standard.para.spacing" use-attribute-sets="normal.para.spacing">
17.1 --- a/web/hgbook/__init__.py Sat Sep 12 20:53:56 2009 +0200 17.2 +++ b/web/hgbook/__init__.py Mon Nov 23 10:51:14 2009 +0100 17.3 @@ -0,0 +1,1 @@ 17.4 +import admin
18.1 --- a/web/hgbook/admin.py Sat Sep 12 20:53:56 2009 +0200 18.2 +++ b/web/hgbook/admin.py Mon Nov 23 10:51:14 2009 +0100 18.3 @@ -8,12 +8,13 @@ 18.4 date_hierarchy = 'date' 18.5 list_filter = ['date', 'submitter_name'] 18.6 search_fields = ['title', 'submitter_name', 'submitter_url'] 18.7 - fields = ( 18.8 + fieldsets = ( 18.9 (None, {'fields': ('submitter_name', 'element', 'comment')}), 18.10 - ('Review and presentation state', 18.11 - {'fields': ('reviewed', 'hidden')}), 18.12 - ('Other info', {'fields': ('date', 'submitter_url', 'ip')}), 18.13 + ('Review and presentation state', {'fields': ('reviewed', 'hidden')}), 18.14 + ('Other info', {'fields': ('submitter_url', 'ip')}), 18.15 ) 18.16 + # XXX: adding 'date' to the 'Other info' fieldset results in a 18.17 + # ImproperlyConfigured error. :S 18.18 18.19 class ElementAdmin(admin.ModelAdmin): 18.20 search_fields = ['id', 'chapter']
19.1 --- a/web/hgbook/comments/models.py Sat Sep 12 20:53:56 2009 +0200 19.2 +++ b/web/hgbook/comments/models.py Mon Nov 23 10:51:14 2009 +0100 19.3 @@ -6,7 +6,7 @@ 19.4 class Element(models.Model): 19.5 id = models.CharField('ID attribute', max_length=64, editable=False, 19.6 primary_key=True) 19.7 - chapter = models.CharField('Chapter ID', max_length=64, editable=False, 19.8 + chapter = models.CharField('Chapter ID', max_length=100, editable=False, 19.9 db_index=True) 19.10 title = models.CharField('Section title', max_length=256, editable=False) 19.11
20.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 20.2 +++ b/web/hgbook/converter.py Mon Nov 23 10:51:14 2009 +0100 20.3 @@ -0,0 +1,52 @@ 20.4 +from lxml import etree 20.5 +from lxml import html 20.6 +from lxml.cssselect import CSSSelector 20.7 +import md5 20.8 +import sys 20.9 + 20.10 + 20.11 +args = sys.argv[1:] 20.12 + 20.13 +# django stuff 20.14 +from django.core.management import setup_environ 20.15 +import settings # Assumed to be in the same directory. 20.16 +setup_environ(settings) # ugly django collateral effects :( 20.17 +from comments.models import Element 20.18 + 20.19 +doc_id = 'MMSC' 20.20 +sel = CSSSelector('div.chapter p, pre, h1, table.equation') 20.21 +chapter_sel = CSSSelector('div.chapter') 20.22 + 20.23 +try: 20.24 + filename = args[0] 20.25 +except IndexError: 20.26 + raise IndexError("Usage: %s <path-to-html-file>" % __file__) 20.27 + 20.28 +tree = etree.parse(filename, html.HTMLParser(remove_blank_text=True)) 20.29 +root = tree.getroot() 20.30 + 20.31 +chapter = chapter_sel(root)[0] 20.32 +chapter_title = chapter.get('id').split(':')[1] 20.33 +chapter_hash = md5.new(chapter.get('id').encode('utf8')).hexdigest() 20.34 + 20.35 +chapter.set('id', chapter_hash) 20.36 + 20.37 +for element in sel(root): 20.38 + hsh_source = element.text or element.get('alt') or etree.tostring(element) 20.39 + 20.40 + if hsh_source: 20.41 + hsh_source_encoded = hsh_source.encode('utf8') 20.42 + hsh = md5.new(hsh_source_encoded).hexdigest() 20.43 + element.set('id', '%s-%s' % (chapter_hash, hsh)) 20.44 + 20.45 + # create the commentable element in the DB 20.46 + e = Element() 20.47 + e.id = '%s-%s' % (chapter_hash, hsh) 20.48 + e.chapter = chapter_hash 20.49 + e.title = chapter_title 20.50 + e.save() 20.51 + 20.52 + 20.53 + 20.54 +print etree.tostring(root) # pipe to a file if you wish 20.55 +
21.1 --- a/web/hgbook/settings.py Sat Sep 12 20:53:56 2009 +0200 21.2 +++ b/web/hgbook/settings.py Mon Nov 23 10:51:14 2009 +0100 21.3 @@ -6,7 +6,7 @@ 21.4 TEMPLATE_DEBUG = DEBUG 21.5 21.6 ADMINS = ( 21.7 - ("Bryan O'Sullivan", 'bos@serpentine.com'), 21.8 + ("Bryan O'Sullivan", 'bos@localhost'), 21.9 ) 21.10 21.11 MANAGERS = ADMINS
22.1 --- a/web/hgbook/urls.py Sat Sep 12 20:53:56 2009 +0200 22.2 +++ b/web/hgbook/urls.py Mon Nov 23 10:51:14 2009 +0100 22.3 @@ -1,4 +1,4 @@ 22.4 -import os 22.5 +import os, sys 22.6 from django.conf.urls.defaults import * 22.7 import hgbook.comments.feeds as feeds 22.8 from django.contrib import admin 22.9 @@ -16,9 +16,12 @@ 22.10 {'feed_dict': feeds}), 22.11 22.12 # Only uncomment this for local testing without Apache. 22.13 - # (r'^html/(?P<path>.*)$', 'django.views.static.serve', 22.14 - # {'document_root': os.path.realpath(os.path.dirname( 22.15 - # sys.modules[__name__].__file__) + '/../../en/html'), 22.16 + (r'^html/(?P<path>.*)$', 'django.views.static.serve', 22.17 + {'document_root': os.path.realpath(os.path.dirname( 22.18 + sys.modules[__name__].__file__) + '/../html')}), 22.19 + (r'^support/(?P<path>.*)$', 'django.views.static.serve', 22.20 + {'document_root': os.path.realpath(os.path.dirname( 22.21 + sys.modules[__name__].__file__) + '/../support')}), 22.22 22.23 # Uncomment this for admin: 22.24 (r'^admin/(.*)', admin.site.root),
23.1 Binary file web/icons/caution.png has changed
24.1 Binary file web/icons/favicon.png has changed
25.1 Binary file web/icons/important.png has changed
26.1 Binary file web/icons/note.png has changed
27.1 Binary file web/icons/remark.png has changed
28.1 Binary file web/icons/rss.png has changed
29.1 Binary file web/icons/shell.png has changed
30.1 Binary file web/icons/source.png has changed
31.1 Binary file web/icons/tip.png has changed
32.1 Binary file web/icons/warning.png has changed
33.1 --- a/web/javascript/form-min.js Sat Sep 12 20:53:56 2009 +0200 33.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 33.3 @@ -1,1 +0,0 @@ 33.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); 33.5 \ No newline at end of file
34.1 --- a/web/javascript/form.js Sat Sep 12 20:53:56 2009 +0200 34.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 34.3 @@ -1,819 +0,0 @@ 34.4 -/* 34.5 - * jQuery Form Plugin 34.6 - * @requires jQuery v1.1 or later 34.7 - * 34.8 - * Examples at: http://malsup.com/jquery/form/ 34.9 - * Dual licensed under the MIT and GPL licenses: 34.10 - * http://www.opensource.org/licenses/mit-license.php 34.11 - * http://www.gnu.org/licenses/gpl.html 34.12 - * 34.13 - * Revision: $Id$ 34.14 - */ 34.15 - (function($) { 34.16 -/** 34.17 - * ajaxSubmit() provides a mechanism for submitting an HTML form using AJAX. 34.18 - * 34.19 - * ajaxSubmit accepts a single argument which can be either a success callback function 34.20 - * or an options Object. If a function is provided it will be invoked upon successful 34.21 - * completion of the submit and will be passed the response from the server. 34.22 - * If an options Object is provided, the following attributes are supported: 34.23 - * 34.24 - * target: Identifies the element(s) in the page to be updated with the server response. 34.25 - * This value may be specified as a jQuery selection string, a jQuery object, 34.26 - * or a DOM element. 34.27 - * default value: null 34.28 - * 34.29 - * url: URL to which the form data will be submitted. 34.30 - * default value: value of form's 'action' attribute 34.31 - * 34.32 - * type: The method in which the form data should be submitted, 'GET' or 'POST'. 34.33 - * default value: value of form's 'method' attribute (or 'GET' if none found) 34.34 - * 34.35 - * data: Additional data to add to the request, specified as key/value pairs (see $.ajax). 34.36 - * 34.37 - * beforeSubmit: Callback method to be invoked before the form is submitted. 34.38 - * default value: null 34.39 - * 34.40 - * success: Callback method to be invoked after the form has been successfully submitted 34.41 - * and the response has been returned from the server 34.42 - * default value: null 34.43 - * 34.44 - * dataType: Expected dataType of the response. One of: null, 'xml', 'script', or 'json' 34.45 - * default value: null 34.46 - * 34.47 - * semantic: Boolean flag indicating whether data must be submitted in semantic order (slower). 34.48 - * default value: false 34.49 - * 34.50 - * resetForm: Boolean flag indicating whether the form should be reset if the submit is successful 34.51 - * 34.52 - * clearForm: Boolean flag indicating whether the form should be cleared if the submit is successful 34.53 - * 34.54 - * 34.55 - * The 'beforeSubmit' callback can be provided as a hook for running pre-submit logic or for 34.56 - * validating the form data. If the 'beforeSubmit' callback returns false then the form will 34.57 - * not be submitted. The 'beforeSubmit' callback is invoked with three arguments: the form data 34.58 - * in array format, the jQuery object, and the options object passed into ajaxSubmit. 34.59 - * The form data array takes the following form: 34.60 - * 34.61 - * [ { name: 'username', value: 'jresig' }, { name: 'password', value: 'secret' } ] 34.62 - * 34.63 - * If a 'success' callback method is provided it is invoked after the response has been returned 34.64 - * from the server. It is passed the responseText or responseXML value (depending on dataType). 34.65 - * See jQuery.ajax for further details. 34.66 - * 34.67 - * 34.68 - * The dataType option provides a means for specifying how the server response should be handled. 34.69 - * This maps directly to the jQuery.httpData method. The following values are supported: 34.70 - * 34.71 - * 'xml': if dataType == 'xml' the server response is treated as XML and the 'success' 34.72 - * callback method, if specified, will be passed the responseXML value 34.73 - * 'json': if dataType == 'json' the server response will be evaluted and passed to 34.74 - * the 'success' callback, if specified 34.75 - * 'script': if dataType == 'script' the server response is evaluated in the global context 34.76 - * 34.77 - * 34.78 - * Note that it does not make sense to use both the 'target' and 'dataType' options. If both 34.79 - * are provided the target will be ignored. 34.80 - * 34.81 - * The semantic argument can be used to force form serialization in semantic order. 34.82 - * This is normally true anyway, unless the form contains input elements of type='image'. 34.83 - * If your form must be submitted with name/value pairs in semantic order and your form 34.84 - * contains an input of type='image" then pass true for this arg, otherwise pass false 34.85 - * (or nothing) to avoid the overhead for this logic. 34.86 - * 34.87 - * 34.88 - * When used on its own, ajaxSubmit() is typically bound to a form's submit event like this: 34.89 - * 34.90 - * $("#form-id").submit(function() { 34.91 - * $(this).ajaxSubmit(options); 34.92 - * return false; // cancel conventional submit 34.93 - * }); 34.94 - * 34.95 - * When using ajaxForm(), however, this is done for you. 34.96 - * 34.97 - * @example 34.98 - * $('#myForm').ajaxSubmit(function(data) { 34.99 - * alert('Form submit succeeded! Server returned: ' + data); 34.100 - * }); 34.101 - * @desc Submit form and alert server response 34.102 - * 34.103 - * 34.104 - * @example 34.105 - * var options = { 34.106 - * target: '#myTargetDiv' 34.107 - * }; 34.108 - * $('#myForm').ajaxSubmit(options); 34.109 - * @desc Submit form and update page element with server response 34.110 - * 34.111 - * 34.112 - * @example 34.113 - * var options = { 34.114 - * success: function(responseText) { 34.115 - * alert(responseText); 34.116 - * } 34.117 - * }; 34.118 - * $('#myForm').ajaxSubmit(options); 34.119 - * @desc Submit form and alert the server response 34.120 - * 34.121 - * 34.122 - * @example 34.123 - * var options = { 34.124 - * beforeSubmit: function(formArray, jqForm) { 34.125 - * if (formArray.length == 0) { 34.126 - * alert('Please enter data.'); 34.127 - * return false; 34.128 - * } 34.129 - * } 34.130 - * }; 34.131 - * $('#myForm').ajaxSubmit(options); 34.132 - * @desc Pre-submit validation which aborts the submit operation if form data is empty 34.133 - * 34.134 - * 34.135 - * @example 34.136 - * var options = { 34.137 - * url: myJsonUrl.php, 34.138 - * dataType: 'json', 34.139 - * success: function(data) { 34.140 - * // 'data' is an object representing the the evaluated json data 34.141 - * } 34.142 - * }; 34.143 - * $('#myForm').ajaxSubmit(options); 34.144 - * @desc json data returned and evaluated 34.145 - * 34.146 - * 34.147 - * @example 34.148 - * var options = { 34.149 - * url: myXmlUrl.php, 34.150 - * dataType: 'xml', 34.151 - * success: function(responseXML) { 34.152 - * // responseXML is XML document object 34.153 - * var data = $('myElement', responseXML).text(); 34.154 - * } 34.155 - * }; 34.156 - * $('#myForm').ajaxSubmit(options); 34.157 - * @desc XML data returned from server 34.158 - * 34.159 - * 34.160 - * @example 34.161 - * var options = { 34.162 - * resetForm: true 34.163 - * }; 34.164 - * $('#myForm').ajaxSubmit(options); 34.165 - * @desc submit form and reset it if successful 34.166 - * 34.167 - * @example 34.168 - * $('#myForm).submit(function() { 34.169 - * $(this).ajaxSubmit(); 34.170 - * return false; 34.171 - * }); 34.172 - * @desc Bind form's submit event to use ajaxSubmit 34.173 - * 34.174 - * 34.175 - * @name ajaxSubmit 34.176 - * @type jQuery 34.177 - * @param options object literal containing options which control the form submission process 34.178 - * @cat Plugins/Form 34.179 - * @return jQuery 34.180 - */ 34.181 -$.fn.ajaxSubmit = function(options) { 34.182 - if (typeof options == 'function') 34.183 - options = { success: options }; 34.184 - 34.185 - options = $.extend({ 34.186 - url: this.attr('action') || window.location, 34.187 - type: this.attr('method') || 'GET' 34.188 - }, options || {}); 34.189 - 34.190 - // hook for manipulating the form data before it is extracted; 34.191 - // convenient for use with rich editors like tinyMCE or FCKEditor 34.192 - var veto = {}; 34.193 - $.event.trigger('form.pre.serialize', [this, options, veto]); 34.194 - if (veto.veto) return this; 34.195 - 34.196 - var a = this.formToArray(options.semantic); 34.197 - if (options.data) { 34.198 - for (var n in options.data) 34.199 - a.push( { name: n, value: options.data[n] } ); 34.200 - } 34.201 - 34.202 - // give pre-submit callback an opportunity to abort the submit 34.203 - if (options.beforeSubmit && options.beforeSubmit(a, this, options) === false) return this; 34.204 - 34.205 - // fire vetoable 'validate' event 34.206 - $.event.trigger('form.submit.validate', [a, this, options, veto]); 34.207 - if (veto.veto) return this; 34.208 - 34.209 - var q = $.param(a);//.replace(/%20/g,'+'); 34.210 - 34.211 - if (options.type.toUpperCase() == 'GET') { 34.212 - options.url += (options.url.indexOf('?') >= 0 ? '&' : '?') + q; 34.213 - options.data = null; // data is null for 'get' 34.214 - } 34.215 - else 34.216 - options.data = q; // data is the query string for 'post' 34.217 - 34.218 - var $form = this, callbacks = []; 34.219 - if (options.resetForm) callbacks.push(function() { $form.resetForm(); }); 34.220 - if (options.clearForm) callbacks.push(function() { $form.clearForm(); }); 34.221 - 34.222 - // perform a load on the target only if dataType is not provided 34.223 - if (!options.dataType && options.target) { 34.224 - var oldSuccess = options.success || function(){}; 34.225 - callbacks.push(function(data) { 34.226 - if (this.evalScripts) 34.227 - $(options.target).attr("innerHTML", data).evalScripts().each(oldSuccess, arguments); 34.228 - else // jQuery v1.1.4 34.229 - $(options.target).html(data).each(oldSuccess, arguments); 34.230 - }); 34.231 - } 34.232 - else if (options.success) 34.233 - callbacks.push(options.success); 34.234 - 34.235 - options.success = function(data, status) { 34.236 - for (var i=0, max=callbacks.length; i < max; i++) 34.237 - callbacks[i](data, status, $form); 34.238 - }; 34.239 - 34.240 - // are there files to upload? 34.241 - var files = $('input:file', this).fieldValue(); 34.242 - var found = false; 34.243 - for (var j=0; j < files.length; j++) 34.244 - if (files[j]) 34.245 - found = true; 34.246 - 34.247 - if (options.iframe || found) // options.iframe allows user to force iframe mode 34.248 - fileUpload(); 34.249 - else 34.250 - $.ajax(options); 34.251 - 34.252 - // fire 'notify' event 34.253 - $.event.trigger('form.submit.notify', [this, options]); 34.254 - return this; 34.255 - 34.256 - 34.257 - // private function for handling file uploads (hat tip to YAHOO!) 34.258 - function fileUpload() { 34.259 - var form = $form[0]; 34.260 - var opts = $.extend({}, $.ajaxSettings, options); 34.261 - 34.262 - var id = 'jqFormIO' + $.fn.ajaxSubmit.counter++; 34.263 - var $io = $('<iframe id="' + id + '" name="' + id + '" />'); 34.264 - var io = $io[0]; 34.265 - var op8 = $.browser.opera && window.opera.version() < 9; 34.266 - if ($.browser.msie || op8) io.src = 'javascript:false;document.write("");'; 34.267 - $io.css({ position: 'absolute', top: '-1000px', left: '-1000px' }); 34.268 - 34.269 - var xhr = { // mock object 34.270 - responseText: null, 34.271 - responseXML: null, 34.272 - status: 0, 34.273 - statusText: 'n/a', 34.274 - getAllResponseHeaders: function() {}, 34.275 - getResponseHeader: function() {}, 34.276 - setRequestHeader: function() {} 34.277 - }; 34.278 - 34.279 - var g = opts.global; 34.280 - // trigger ajax global events so that activity/block indicators work like normal 34.281 - if (g && ! $.active++) $.event.trigger("ajaxStart"); 34.282 - if (g) $.event.trigger("ajaxSend", [xhr, opts]); 34.283 - 34.284 - var cbInvoked = 0; 34.285 - var timedOut = 0; 34.286 - 34.287 - // take a breath so that pending repaints get some cpu time before the upload starts 34.288 - setTimeout(function() { 34.289 - $io.appendTo('body'); 34.290 - // jQuery's event binding doesn't work for iframe events in IE 34.291 - io.attachEvent ? io.attachEvent('onload', cb) : io.addEventListener('load', cb, false); 34.292 - 34.293 - // make sure form attrs are set 34.294 - var encAttr = form.encoding ? 'encoding' : 'enctype'; 34.295 - var t = $form.attr('target'); 34.296 - $form.attr({ 34.297 - target: id, 34.298 - method: 'POST', 34.299 - action: opts.url 34.300 - }); 34.301 - form[encAttr] = 'multipart/form-data'; 34.302 - 34.303 - // support timout 34.304 - if (opts.timeout) 34.305 - setTimeout(function() { timedOut = true; cb(); }, opts.timeout); 34.306 - 34.307 - form.submit(); 34.308 - $form.attr('target', t); // reset target 34.309 - }, 10); 34.310 - 34.311 - function cb() { 34.312 - if (cbInvoked++) return; 34.313 - 34.314 - io.detachEvent ? io.detachEvent('onload', cb) : io.removeEventListener('load', cb, false); 34.315 - 34.316 - var ok = true; 34.317 - try { 34.318 - if (timedOut) throw 'timeout'; 34.319 - // extract the server response from the iframe 34.320 - var data, doc; 34.321 - doc = io.contentWindow ? io.contentWindow.document : io.contentDocument ? io.contentDocument : io.document; 34.322 - xhr.responseText = doc.body ? doc.body.innerHTML : null; 34.323 - xhr.responseXML = doc.XMLDocument ? doc.XMLDocument : doc; 34.324 - 34.325 - if (opts.dataType == 'json' || opts.dataType == 'script') { 34.326 - var ta = doc.getElementsByTagName('textarea')[0]; 34.327 - data = ta ? ta.value : xhr.responseText; 34.328 - if (opts.dataType == 'json') 34.329 - eval("data = " + data); 34.330 - else 34.331 - $.globalEval(data); 34.332 - } 34.333 - else if (opts.dataType == 'xml') { 34.334 - data = xhr.responseXML; 34.335 - if (!data && xhr.responseText != null) 34.336 - data = toXml(xhr.responseText); 34.337 - } 34.338 - else { 34.339 - data = xhr.responseText; 34.340 - } 34.341 - } 34.342 - catch(e){ 34.343 - ok = false; 34.344 - $.handleError(opts, xhr, 'error', e); 34.345 - } 34.346 - 34.347 - // ordering of these callbacks/triggers is odd, but that's how $.ajax does it 34.348 - if (ok) { 34.349 - opts.success(data, 'success'); 34.350 - if (g) $.event.trigger("ajaxSuccess", [xhr, opts]); 34.351 - } 34.352 - if (g) $.event.trigger("ajaxComplete", [xhr, opts]); 34.353 - if (g && ! --$.active) $.event.trigger("ajaxStop"); 34.354 - if (opts.complete) opts.complete(xhr, ok ? 'success' : 'error'); 34.355 - 34.356 - // clean up 34.357 - setTimeout(function() { 34.358 - $io.remove(); 34.359 - xhr.responseXML = null; 34.360 - }, 100); 34.361 - }; 34.362 - 34.363 - function toXml(s, doc) { 34.364 - if (window.ActiveXObject) { 34.365 - doc = new ActiveXObject('Microsoft.XMLDOM'); 34.366 - doc.async = 'false'; 34.367 - doc.loadXML(s); 34.368 - } 34.369 - else 34.370 - doc = (new DOMParser()).parseFromString(s, 'text/xml'); 34.371 - return (doc && doc.documentElement && doc.documentElement.tagName != 'parsererror') ? doc : null; 34.372 - }; 34.373 - }; 34.374 -}; 34.375 -$.fn.ajaxSubmit.counter = 0; // used to create unique iframe ids 34.376 - 34.377 -/** 34.378 - * ajaxForm() provides a mechanism for fully automating form submission. 34.379 - * 34.380 - * The advantages of using this method instead of ajaxSubmit() are: 34.381 - * 34.382 - * 1: This method will include coordinates for <input type="image" /> elements (if the element 34.383 - * is used to submit the form). 34.384 - * 2. This method will include the submit element's name/value data (for the element that was 34.385 - * used to submit the form). 34.386 - * 3. This method binds the submit() method to the form for you. 34.387 - * 34.388 - * Note that for accurate x/y coordinates of image submit elements in all browsers 34.389 - * you need to also use the "dimensions" plugin (this method will auto-detect its presence). 34.390 - * 34.391 - * The options argument for ajaxForm works exactly as it does for ajaxSubmit. ajaxForm merely 34.392 - * passes the options argument along after properly binding events for submit elements and 34.393 - * the form itself. See ajaxSubmit for a full description of the options argument. 34.394 - * 34.395 - * 34.396 - * @example 34.397 - * var options = { 34.398 - * target: '#myTargetDiv' 34.399 - * }; 34.400 - * $('#myForm').ajaxSForm(options); 34.401 - * @desc Bind form's submit event so that 'myTargetDiv' is updated with the server response 34.402 - * when the form is submitted. 34.403 - * 34.404 - * 34.405 - * @example 34.406 - * var options = { 34.407 - * success: function(responseText) { 34.408 - * alert(responseText); 34.409 - * } 34.410 - * }; 34.411 - * $('#myForm').ajaxSubmit(options); 34.412 - * @desc Bind form's submit event so that server response is alerted after the form is submitted. 34.413 - * 34.414 - * 34.415 - * @example 34.416 - * var options = { 34.417 - * beforeSubmit: function(formArray, jqForm) { 34.418 - * if (formArray.length == 0) { 34.419 - * alert('Please enter data.'); 34.420 - * return false; 34.421 - * } 34.422 - * } 34.423 - * }; 34.424 - * $('#myForm').ajaxSubmit(options); 34.425 - * @desc Bind form's submit event so that pre-submit callback is invoked before the form 34.426 - * is submitted. 34.427 - * 34.428 - * 34.429 - * @name ajaxForm 34.430 - * @param options object literal containing options which control the form submission process 34.431 - * @return jQuery 34.432 - * @cat Plugins/Form 34.433 - * @type jQuery 34.434 - */ 34.435 -$.fn.ajaxForm = function(options) { 34.436 - return this.ajaxFormUnbind().submit(submitHandler).each(function() { 34.437 - // store options in hash 34.438 - this.formPluginId = $.fn.ajaxForm.counter++; 34.439 - $.fn.ajaxForm.optionHash[this.formPluginId] = options; 34.440 - $(":submit,input:image", this).click(clickHandler); 34.441 - }); 34.442 -}; 34.443 - 34.444 -$.fn.ajaxForm.counter = 1; 34.445 -$.fn.ajaxForm.optionHash = {}; 34.446 - 34.447 -function clickHandler(e) { 34.448 - var $form = this.form; 34.449 - $form.clk = this; 34.450 - if (this.type == 'image') { 34.451 - if (e.offsetX != undefined) { 34.452 - $form.clk_x = e.offsetX; 34.453 - $form.clk_y = e.offsetY; 34.454 - } else if (typeof $.fn.offset == 'function') { // try to use dimensions plugin 34.455 - var offset = $(this).offset(); 34.456 - $form.clk_x = e.pageX - offset.left; 34.457 - $form.clk_y = e.pageY - offset.top; 34.458 - } else { 34.459 - $form.clk_x = e.pageX - this.offsetLeft; 34.460 - $form.clk_y = e.pageY - this.offsetTop; 34.461 - } 34.462 - } 34.463 - // clear form vars 34.464 - setTimeout(function() { $form.clk = $form.clk_x = $form.clk_y = null; }, 10); 34.465 -}; 34.466 - 34.467 -function submitHandler() { 34.468 - // retrieve options from hash 34.469 - var id = this.formPluginId; 34.470 - var options = $.fn.ajaxForm.optionHash[id]; 34.471 - $(this).ajaxSubmit(options); 34.472 - return false; 34.473 -}; 34.474 - 34.475 -/** 34.476 - * ajaxFormUnbind unbinds the event handlers that were bound by ajaxForm 34.477 - * 34.478 - * @name ajaxFormUnbind 34.479 - * @return jQuery 34.480 - * @cat Plugins/Form 34.481 - * @type jQuery 34.482 - */ 34.483 -$.fn.ajaxFormUnbind = function() { 34.484 - this.unbind('submit', submitHandler); 34.485 - return this.each(function() { 34.486 - $(":submit,input:image", this).unbind('click', clickHandler); 34.487 - }); 34.488 - 34.489 -}; 34.490 - 34.491 -/** 34.492 - * formToArray() gathers form element data into an array of objects that can 34.493 - * be passed to any of the following ajax functions: $.get, $.post, or load. 34.494 - * Each object in the array has both a 'name' and 'value' property. An example of 34.495 - * an array for a simple login form might be: 34.496 - * 34.497 - * [ { name: 'username', value: 'jresig' }, { name: 'password', value: 'secret' } ] 34.498 - * 34.499 - * It is this array that is passed to pre-submit callback functions provided to the 34.500 - * ajaxSubmit() and ajaxForm() methods. 34.501 - * 34.502 - * The semantic argument can be used to force form serialization in semantic order. 34.503 - * This is normally true anyway, unless the form contains input elements of type='image'. 34.504 - * If your form must be submitted with name/value pairs in semantic order and your form 34.505 - * contains an input of type='image" then pass true for this arg, otherwise pass false 34.506 - * (or nothing) to avoid the overhead for this logic. 34.507 - * 34.508 - * @example var data = $("#myForm").formToArray(); 34.509 - * $.post( "myscript.cgi", data ); 34.510 - * @desc Collect all the data from a form and submit it to the server. 34.511 - * 34.512 - * @name formToArray 34.513 - * @param semantic true if serialization must maintain strict semantic ordering of elements (slower) 34.514 - * @type Array<Object> 34.515 - * @cat Plugins/Form 34.516 - */ 34.517 -$.fn.formToArray = function(semantic) { 34.518 - var a = []; 34.519 - if (this.length == 0) return a; 34.520 - 34.521 - var form = this[0]; 34.522 - var els = semantic ? form.getElementsByTagName('*') : form.elements; 34.523 - if (!els) return a; 34.524 - for(var i=0, max=els.length; i < max; i++) { 34.525 - var el = els[i]; 34.526 - var n = el.name; 34.527 - if (!n) continue; 34.528 - 34.529 - if (semantic && form.clk && el.type == "image") { 34.530 - // handle image inputs on the fly when semantic == true 34.531 - if(!el.disabled && form.clk == el) 34.532 - a.push({name: n+'.x', value: form.clk_x}, {name: n+'.y', value: form.clk_y}); 34.533 - continue; 34.534 - } 34.535 - 34.536 - var v = $.fieldValue(el, true); 34.537 - if (v && v.constructor == Array) { 34.538 - for(var j=0, jmax=v.length; j < jmax; j++) 34.539 - a.push({name: n, value: v[j]}); 34.540 - } 34.541 - else if (v !== null && typeof v != 'undefined') 34.542 - a.push({name: n, value: v}); 34.543 - } 34.544 - 34.545 - if (!semantic && form.clk) { 34.546 - // input type=='image' are not found in elements array! handle them here 34.547 - var inputs = form.getElementsByTagName("input"); 34.548 - for(var i=0, max=inputs.length; i < max; i++) { 34.549 - var input = inputs[i]; 34.550 - var n = input.name; 34.551 - if(n && !input.disabled && input.type == "image" && form.clk == input) 34.552 - a.push({name: n+'.x', value: form.clk_x}, {name: n+'.y', value: form.clk_y}); 34.553 - } 34.554 - } 34.555 - return a; 34.556 -}; 34.557 - 34.558 - 34.559 -/** 34.560 - * Serializes form data into a 'submittable' string. This method will return a string 34.561 - * in the format: name1=value1&name2=value2 34.562 - * 34.563 - * The semantic argument can be used to force form serialization in semantic order. 34.564 - * If your form must be submitted with name/value pairs in semantic order then pass 34.565 - * true for this arg, otherwise pass false (or nothing) to avoid the overhead for 34.566 - * this logic (which can be significant for very large forms). 34.567 - * 34.568 - * @example var data = $("#myForm").formSerialize(); 34.569 - * $.ajax('POST', "myscript.cgi", data); 34.570 - * @desc Collect all the data from a form into a single string 34.571 - * 34.572 - * @name formSerialize 34.573 - * @param semantic true if serialization must maintain strict semantic ordering of elements (slower) 34.574 - * @type String 34.575 - * @cat Plugins/Form 34.576 - */ 34.577 -$.fn.formSerialize = function(semantic) { 34.578 - //hand off to jQuery.param for proper encoding 34.579 - return $.param(this.formToArray(semantic)); 34.580 -}; 34.581 - 34.582 - 34.583 -/** 34.584 - * Serializes all field elements in the jQuery object into a query string. 34.585 - * This method will return a string in the format: name1=value1&name2=value2 34.586 - * 34.587 - * The successful argument controls whether or not serialization is limited to 34.588 - * 'successful' controls (per http://www.w3.org/TR/html4/interact/forms.html#successful-controls). 34.589 - * The default value of the successful argument is true. 34.590 - * 34.591 - * @example var data = $("input").formSerialize(); 34.592 - * @desc Collect the data from all successful input elements into a query string 34.593 - * 34.594 - * @example var data = $(":radio").formSerialize(); 34.595 - * @desc Collect the data from all successful radio input elements into a query string 34.596 - * 34.597 - * @example var data = $("#myForm :checkbox").formSerialize(); 34.598 - * @desc Collect the data from all successful checkbox input elements in myForm into a query string 34.599 - * 34.600 - * @example var data = $("#myForm :checkbox").formSerialize(false); 34.601 - * @desc Collect the data from all checkbox elements in myForm (even the unchecked ones) into a query string 34.602 - * 34.603 - * @example var data = $(":input").formSerialize(); 34.604 - * @desc Collect the data from all successful input, select, textarea and button elements into a query string 34.605 - * 34.606 - * @name fieldSerialize 34.607 - * @param successful true if only successful controls should be serialized (default is true) 34.608 - * @type String 34.609 - * @cat Plugins/Form 34.610 - */ 34.611 -$.fn.fieldSerialize = function(successful) { 34.612 - var a = []; 34.613 - this.each(function() { 34.614 - var n = this.name; 34.615 - if (!n) return; 34.616 - var v = $.fieldValue(this, successful); 34.617 - if (v && v.constructor == Array) { 34.618 - for (var i=0,max=v.length; i < max; i++) 34.619 - a.push({name: n, value: v[i]}); 34.620 - } 34.621 - else if (v !== null && typeof v != 'undefined') 34.622 - a.push({name: this.name, value: v}); 34.623 - }); 34.624 - //hand off to jQuery.param for proper encoding 34.625 - return $.param(a); 34.626 -}; 34.627 - 34.628 - 34.629 -/** 34.630 - * Returns the value(s) of the element in the matched set. For example, consider the following form: 34.631 - * 34.632 - * <form><fieldset> 34.633 - * <input name="A" type="text" /> 34.634 - * <input name="A" type="text" /> 34.635 - * <input name="B" type="checkbox" value="B1" /> 34.636 - * <input name="B" type="checkbox" value="B2"/> 34.637 - * <input name="C" type="radio" value="C1" /> 34.638 - * <input name="C" type="radio" value="C2" /> 34.639 - * </fieldset></form> 34.640 - * 34.641 - * var v = $(':text').fieldValue(); 34.642 - * // if no values are entered into the text inputs 34.643 - * v == ['',''] 34.644 - * // if values entered into the text inputs are 'foo' and 'bar' 34.645 - * v == ['foo','bar'] 34.646 - * 34.647 - * var v = $(':checkbox').fieldValue(); 34.648 - * // if neither checkbox is checked 34.649 - * v === undefined 34.650 - * // if both checkboxes are checked 34.651 - * v == ['B1', 'B2'] 34.652 - * 34.653 - * var v = $(':radio').fieldValue(); 34.654 - * // if neither radio is checked 34.655 - * v === undefined 34.656 - * // if first radio is checked 34.657 - * v == ['C1'] 34.658 - * 34.659 - * The successful argument controls whether or not the field element must be 'successful' 34.660 - * (per http://www.w3.org/TR/html4/interact/forms.html#successful-controls). 34.661 - * The default value of the successful argument is true. If this value is false the value(s) 34.662 - * for each element is returned. 34.663 - * 34.664 - * Note: This method *always* returns an array. If no valid value can be determined the 34.665 - * array will be empty, otherwise it will contain one or more values. 34.666 - * 34.667 - * @example var data = $("#myPasswordElement").fieldValue(); 34.668 - * alert(data[0]); 34.669 - * @desc Alerts the current value of the myPasswordElement element 34.670 - * 34.671 - * @example var data = $("#myForm :input").fieldValue(); 34.672 - * @desc Get the value(s) of the form elements in myForm 34.673 - * 34.674 - * @example var data = $("#myForm :checkbox").fieldValue(); 34.675 - * @desc Get the value(s) for the successful checkbox element(s) in the jQuery object. 34.676 - * 34.677 - * @example var data = $("#mySingleSelect").fieldValue(); 34.678 - * @desc Get the value(s) of the select control 34.679 - * 34.680 - * @example var data = $(':text').fieldValue(); 34.681 - * @desc Get the value(s) of the text input or textarea elements 34.682 - * 34.683 - * @example var data = $("#myMultiSelect").fieldValue(); 34.684 - * @desc Get the values for the select-multiple control 34.685 - * 34.686 - * @name fieldValue 34.687 - * @param Boolean successful true if only the values for successful controls should be returned (default is true) 34.688 - * @type Array<String> 34.689 - * @cat Plugins/Form 34.690 - */ 34.691 -$.fn.fieldValue = function(successful) { 34.692 - for (var val=[], i=0, max=this.length; i < max; i++) { 34.693 - var el = this[i]; 34.694 - var v = $.fieldValue(el, successful); 34.695 - if (v === null || typeof v == 'undefined' || (v.constructor == Array && !v.length)) 34.696 - continue; 34.697 - v.constructor == Array ? $.merge(val, v) : val.push(v); 34.698 - } 34.699 - return val; 34.700 -}; 34.701 - 34.702 -/** 34.703 - * Returns the value of the field element. 34.704 - * 34.705 - * The successful argument controls whether or not the field element must be 'successful' 34.706 - * (per http://www.w3.org/TR/html4/interact/forms.html#successful-controls). 34.707 - * The default value of the successful argument is true. If the given element is not 34.708 - * successful and the successful arg is not false then the returned value will be null. 34.709 - * 34.710 - * Note: If the successful flag is true (default) but the element is not successful, the return will be null 34.711 - * Note: The value returned for a successful select-multiple element will always be an array. 34.712 - * Note: If the element has no value the return value will be undefined. 34.713 - * 34.714 - * @example var data = jQuery.fieldValue($("#myPasswordElement")[0]); 34.715 - * @desc Gets the current value of the myPasswordElement element 34.716 - * 34.717 - * @name fieldValue 34.718 - * @param Element el The DOM element for which the value will be returned 34.719 - * @param Boolean successful true if value returned must be for a successful controls (default is true) 34.720 - * @type String or Array<String> or null or undefined 34.721 - * @cat Plugins/Form 34.722 - */ 34.723 -$.fieldValue = function(el, successful) { 34.724 - var n = el.name, t = el.type, tag = el.tagName.toLowerCase(); 34.725 - if (typeof successful == 'undefined') successful = true; 34.726 - 34.727 - if (successful && (!n || el.disabled || t == 'reset' || t == 'button' || 34.728 - (t == 'checkbox' || t == 'radio') && !el.checked || 34.729 - (t == 'submit' || t == 'image') && el.form && el.form.clk != el || 34.730 - tag == 'select' && el.selectedIndex == -1)) 34.731 - return null; 34.732 - 34.733 - if (tag == 'select') { 34.734 - var index = el.selectedIndex; 34.735 - if (index < 0) return null; 34.736 - var a = [], ops = el.options; 34.737 - var one = (t == 'select-one'); 34.738 - var max = (one ? index+1 : ops.length); 34.739 - for(var i=(one ? index : 0); i < max; i++) { 34.740 - var op = ops[i]; 34.741 - if (op.selected) { 34.742 - // extra pain for IE... 34.743 - var v = $.browser.msie && !(op.attributes['value'].specified) ? op.text : op.value; 34.744 - if (one) return v; 34.745 - a.push(v); 34.746 - } 34.747 - } 34.748 - return a; 34.749 - } 34.750 - return el.value; 34.751 -}; 34.752 - 34.753 - 34.754 -/** 34.755 - * Clears the form data. Takes the following actions on the form's input fields: 34.756 - * - input text fields will have their 'value' property set to the empty string 34.757 - * - select elements will have their 'selectedIndex' property set to -1 34.758 - * - checkbox and radio inputs will have their 'checked' property set to false 34.759 - * - inputs of type submit, button, reset, and hidden will *not* be effected 34.760 - * - button elements will *not* be effected 34.761 - * 34.762 - * @example $('form').clearForm(); 34.763 - * @desc Clears all forms on the page. 34.764 - * 34.765 - * @name clearForm 34.766 - * @type jQuery 34.767 - * @cat Plugins/Form 34.768 - */ 34.769 -$.fn.clearForm = function() { 34.770 - return this.each(function() { 34.771 - $('input,select,textarea', this).clearFields(); 34.772 - }); 34.773 -}; 34.774 - 34.775 -/** 34.776 - * Clears the selected form elements. Takes the following actions on the matched elements: 34.777 - * - input text fields will have their 'value' property set to the empty string 34.778 - * - select elements will have their 'selectedIndex' property set to -1 34.779 - * - checkbox and radio inputs will have their 'checked' property set to false 34.780 - * - inputs of type submit, button, reset, and hidden will *not* be effected 34.781 - * - button elements will *not* be effected 34.782 - * 34.783 - * @example $('.myInputs').clearFields(); 34.784 - * @desc Clears all inputs with class myInputs 34.785 - * 34.786 - * @name clearFields 34.787 - * @type jQuery 34.788 - * @cat Plugins/Form 34.789 - */ 34.790 -$.fn.clearFields = $.fn.clearInputs = function() { 34.791 - return this.each(function() { 34.792 - var t = this.type, tag = this.tagName.toLowerCase(); 34.793 - if (t == 'text' || t == 'password' || tag == 'textarea') 34.794 - this.value = ''; 34.795 - else if (t == 'checkbox' || t == 'radio') 34.796 - this.checked = false; 34.797 - else if (tag == 'select') 34.798 - this.selectedIndex = -1; 34.799 - }); 34.800 -}; 34.801 - 34.802 - 34.803 -/** 34.804 - * Resets the form data. Causes all form elements to be reset to their original value. 34.805 - * 34.806 - * @example $('form').resetForm(); 34.807 - * @desc Resets all forms on the page. 34.808 - * 34.809 - * @name resetForm 34.810 - * @type jQuery 34.811 - * @cat Plugins/Form 34.812 - */ 34.813 -$.fn.resetForm = function() { 34.814 - return this.each(function() { 34.815 - // guard against an input with the name of 'reset' 34.816 - // note that IE reports the reset function as an 'object' 34.817 - if (typeof this.reset == 'function' || (typeof this.reset == 'object' && !this.reset.nodeType)) 34.818 - this.reset(); 34.819 - }); 34.820 -}; 34.821 - 34.822 -})(jQuery);
35.1 --- a/web/javascript/hsbook.js Sat Sep 12 20:53:56 2009 +0200 35.2 +++ b/web/javascript/hsbook.js Mon Nov 23 10:51:14 2009 +0100 35.3 @@ -65,10 +65,13 @@ 35.4 $("p[@id]").each(function() { 35.5 $(this).append(loading($(this).attr("id"))); 35.6 }); 35.7 + $("table[@id].equation").each(function() { 35.8 + $(this).after(loading($(this).attr("id"))); 35.9 + }); 35.10 $("pre[@id]").each(function() { 35.11 $(this).after(loading($(this).attr("id"))); 35.12 }); 35.13 - var chapid = $("div.preface, div.chapter, div.appendix, div.bibliography").attr("id"); 35.14 + var chapid = $("body, div.preface, div.chapter, div.appendix, div.bibliography").attr("id"); 35.15 $("#chapterfeed").attr("href", 35.16 $("#chapterfeed").attr("href") + chapid + "/"); 35.17 $.getJSON(location.protocol + "//" + location.host + "/comments/chapter/" +
36.1 --- a/web/javascript/jquery-min.js Sat Sep 12 20:53:56 2009 +0200 36.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 36.3 @@ -1,31 +0,0 @@ 36.4 -/* 36.5 - * jQuery 1.2.1 - New Wave Javascript 36.6 - * 36.7 - * Copyright (c) 2007 John Resig (jquery.com) 36.8 - * Dual licensed under the MIT (MIT-LICENSE.txt) 36.9 - * and GPL (GPL-LICENSE.txt) licenses. 36.10 - * 36.11 - * $Date: 2007-09-16 23:42:06 -0400 (Sun, 16 Sep 2007) $ 36.12 - * $Rev: 3353 $ 36.13 - */ 36.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 36.15 -selector=[];}}else 36.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 36.17 -return this[0].value.replace(/\r/g,"");}}else 36.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 36.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 36.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 36.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 36.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 36.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 36.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 36.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 36.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 36.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 36.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 36.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 36.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 36.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 36.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 36.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 36.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;}};})(); 36.35 \ No newline at end of file
37.1 --- a/web/javascript/jquery.js Sat Sep 12 20:53:56 2009 +0200 37.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 37.3 @@ -1,2992 +0,0 @@ 37.4 -(function(){ 37.5 -/* 37.6 - * jQuery 1.2.1 - New Wave Javascript 37.7 - * 37.8 - * Copyright (c) 2007 John Resig (jquery.com) 37.9 - * Dual licensed under the MIT (MIT-LICENSE.txt) 37.10 - * and GPL (GPL-LICENSE.txt) licenses. 37.11 - * 37.12 - * $Date: 2007-09-16 23:42:06 -0400 (Sun, 16 Sep 2007) $ 37.13 - * $Rev: 3353 $ 37.14 - */ 37.15 - 37.16 -// Map over jQuery in case of overwrite 37.17 -if ( typeof jQuery != "undefined" ) 37.18 - var _jQuery = jQuery; 37.19 - 37.20 -var jQuery = window.jQuery = function(selector, context) { 37.21 - // If the context is a namespace object, return a new object 37.22 - return this instanceof jQuery ? 37.23 - this.init(selector, context) : 37.24 - new jQuery(selector, context); 37.25 -}; 37.26 - 37.27 -// Map over the $ in case of overwrite 37.28 -if ( typeof $ != "undefined" ) 37.29 - var _$ = $; 37.30 - 37.31 -// Map the jQuery namespace to the '$' one 37.32 -window.$ = jQuery; 37.33 - 37.34 -var quickExpr = /^[^<]*(<(.|\s)+>)[^>]*$|^#(\w+)$/; 37.35 - 37.36 -jQuery.fn = jQuery.prototype = { 37.37 - init: function(selector, context) { 37.38 - // Make sure that a selection was provided 37.39 - selector = selector || document; 37.40 - 37.41 - // Handle HTML strings 37.42 - if ( typeof selector == "string" ) { 37.43 - var m = quickExpr.exec(selector); 37.44 - if ( m && (m[1] || !context) ) { 37.45 - // HANDLE: $(html) -> $(array) 37.46 - if ( m[1] ) 37.47 - selector = jQuery.clean( [ m[1] ], context ); 37.48 - 37.49 - // HANDLE: $("#id") 37.50 - else { 37.51 - var tmp = document.getElementById( m[3] ); 37.52 - if ( tmp ) 37.53 - // Handle the case where IE and Opera return items 37.54 - // by name instead of ID 37.55 - if ( tmp.id != m[3] ) 37.56 - return jQuery().find( selector ); 37.57 - else { 37.58 - this[0] = tmp; 37.59 - this.length = 1; 37.60 - return this; 37.61 - } 37.62 - else 37.63 - selector = []; 37.64 - } 37.65 - 37.66 - // HANDLE: $(expr) 37.67 - } else 37.68 - return new jQuery( context ).find( selector ); 37.69 - 37.70 - // HANDLE: $(function) 37.71 - // Shortcut for document ready 37.72 - } else if ( jQuery.isFunction(selector) ) 37.73 - return new jQuery(document)[ jQuery.fn.ready ? "ready" : "load" ]( selector ); 37.74 - 37.75 - return this.setArray( 37.76 - // HANDLE: $(array) 37.77 - selector.constructor == Array && selector || 37.78 - 37.79 - // HANDLE: $(arraylike) 37.80 - // Watch for when an array-like object is passed as the selector 37.81 - (selector.jquery || selector.length && selector != window && !selector.nodeType && selector[0] != undefined && selector[0].nodeType) && jQuery.makeArray( selector ) || 37.82 - 37.83 - // HANDLE: $(*) 37.84 - [ selector ] ); 37.85 - }, 37.86 - 37.87 - jquery: "1.2.1", 37.88 - 37.89 - size: function() { 37.90 - return this.length; 37.91 - }, 37.92 - 37.93 - length: 0, 37.94 - 37.95 - get: function( num ) { 37.96 - return num == undefined ? 37.97 - 37.98 - // Return a 'clean' array 37.99 - jQuery.makeArray( this ) : 37.100 - 37.101 - // Return just the object 37.102 - this[num]; 37.103 - }, 37.104 - 37.105 - pushStack: function( a ) { 37.106 - var ret = jQuery(a); 37.107 - ret.prevObject = this; 37.108 - return ret; 37.109 - }, 37.110 - 37.111 - setArray: function( a ) { 37.112 - this.length = 0; 37.113 - Array.prototype.push.apply( this, a ); 37.114 - return this; 37.115 - }, 37.116 - 37.117 - each: function( fn, args ) { 37.118 - return jQuery.each( this, fn, args ); 37.119 - }, 37.120 - 37.121 - index: function( obj ) { 37.122 - var pos = -1; 37.123 - this.each(function(i){ 37.124 - if ( this == obj ) pos = i; 37.125 - }); 37.126 - return pos; 37.127 - }, 37.128 - 37.129 - attr: function( key, value, type ) { 37.130 - var obj = key; 37.131 - 37.132 - // Look for the case where we're accessing a style value 37.133 - if ( key.constructor == String ) 37.134 - if ( value == undefined ) 37.135 - return this.length && jQuery[ type || "attr" ]( this[0], key ) || undefined; 37.136 - else { 37.137 - obj = {}; 37.138 - obj[ key ] = value; 37.139 - } 37.140 - 37.141 - // Check to see if we're setting style values 37.142 - return this.each(function(index){ 37.143 - // Set all the styles 37.144 - for ( var prop in obj ) 37.145 - jQuery.attr( 37.146 - type ? this.style : this, 37.147 - prop, jQuery.prop(this, obj[prop], type, index, prop) 37.148 - ); 37.149 - }); 37.150 - }, 37.151 - 37.152 - css: function( key, value ) { 37.153 - return this.attr( key, value, "curCSS" ); 37.154 - }, 37.155 - 37.156 - text: function(e) { 37.157 - if ( typeof e != "object" && e != null ) 37.158 - return this.empty().append( document.createTextNode( e ) ); 37.159 - 37.160 - var t = ""; 37.161 - jQuery.each( e || this, function(){ 37.162 - jQuery.each( this.childNodes, function(){ 37.163 - if ( this.nodeType != 8 ) 37.164 - t += this.nodeType != 1 ? 37.165 - this.nodeValue : jQuery.fn.text([ this ]); 37.166 - }); 37.167 - }); 37.168 - return t; 37.169 - }, 37.170 - 37.171 - wrapAll: function(html) { 37.172 - if ( this[0] ) 37.173 - // The elements to wrap the target around 37.174 - jQuery(html, this[0].ownerDocument) 37.175 - .clone() 37.176 - .insertBefore(this[0]) 37.177 - .map(function(){ 37.178 - var elem = this; 37.179 - while ( elem.firstChild ) 37.180 - elem = elem.firstChild; 37.181 - return elem; 37.182 - }) 37.183 - .append(this); 37.184 - 37.185 - return this; 37.186 - }, 37.187 - 37.188 - wrapInner: function(html) { 37.189 - return this.each(function(){ 37.190 - jQuery(this).contents().wrapAll(html); 37.191 - }); 37.192 - }, 37.193 - 37.194 - wrap: function(html) { 37.195 - return this.each(function(){ 37.196 - jQuery(this).wrapAll(html); 37.197 - }); 37.198 - }, 37.199 - 37.200 - append: function() { 37.201 - return this.domManip(arguments, true, 1, function(a){ 37.202 - this.appendChild( a ); 37.203 - }); 37.204 - }, 37.205 - 37.206 - prepend: function() { 37.207 - return this.domManip(arguments, true, -1, function(a){ 37.208 - this.insertBefore( a, this.firstChild ); 37.209 - }); 37.210 - }, 37.211 - 37.212 - before: function() { 37.213 - return this.domManip(arguments, false, 1, function(a){ 37.214 - this.parentNode.insertBefore( a, this ); 37.215 - }); 37.216 - }, 37.217 - 37.218 - after: function() { 37.219 - return this.domManip(arguments, false, -1, function(a){ 37.220 - this.parentNode.insertBefore( a, this.nextSibling ); 37.221 - }); 37.222 - }, 37.223 - 37.224 - end: function() { 37.225 - return this.prevObject || jQuery([]); 37.226 - }, 37.227 - 37.228 - find: function(t) { 37.229 - var data = jQuery.map(this, function(a){ return jQuery.find(t,a); }); 37.230 - return this.pushStack( /[^+>] [^+>]/.test( t ) || t.indexOf("..") > -1 ? 37.231 - jQuery.unique( data ) : data ); 37.232 - }, 37.233 - 37.234 - clone: function(events) { 37.235 - // Do the clone 37.236 - var ret = this.map(function(){ 37.237 - return this.outerHTML ? jQuery(this.outerHTML)[0] : this.cloneNode(true); 37.238 - }); 37.239 - 37.240 - // Need to set the expando to null on the cloned set if it exists 37.241 - // removeData doesn't work here, IE removes it from the original as well 37.242 - // this is primarily for IE but the data expando shouldn't be copied over in any browser 37.243 - var clone = ret.find("*").andSelf().each(function(){ 37.244 - if ( this[ expando ] != undefined ) 37.245 - this[ expando ] = null; 37.246 - }); 37.247 - 37.248 - // Copy the events from the original to the clone 37.249 - if (events === true) 37.250 - this.find("*").andSelf().each(function(i) { 37.251 - var events = jQuery.data(this, "events"); 37.252 - for ( var type in events ) 37.253 - for ( var handler in events[type] ) 37.254 - jQuery.event.add(clone[i], type, events[type][handler], events[type][handler].data); 37.255 - }); 37.256 - 37.257 - // Return the cloned set 37.258 - return ret; 37.259 - }, 37.260 - 37.261 - filter: function(t) { 37.262 - return this.pushStack( 37.263 - jQuery.isFunction( t ) && 37.264 - jQuery.grep(this, function(el, index){ 37.265 - return t.apply(el, [index]); 37.266 - }) || 37.267 - 37.268 - jQuery.multiFilter(t,this) ); 37.269 - }, 37.270 - 37.271 - not: function(t) { 37.272 - return this.pushStack( 37.273 - t.constructor == String && 37.274 - jQuery.multiFilter(t, this, true) || 37.275 - 37.276 - jQuery.grep(this, function(a) { 37.277 - return ( t.constructor == Array || t.jquery ) 37.278 - ? jQuery.inArray( a, t ) < 0 37.279 - : a != t; 37.280 - }) 37.281 - ); 37.282 - }, 37.283 - 37.284 - add: function(t) { 37.285 - return this.pushStack( jQuery.merge( 37.286 - this.get(), 37.287 - t.constructor == String ? 37.288 - jQuery(t).get() : 37.289 - t.length != undefined && (!t.nodeName || jQuery.nodeName(t, "form")) ? 37.290 - t : [t] ) 37.291 - ); 37.292 - }, 37.293 - 37.294 - is: function(expr) { 37.295 - return expr ? jQuery.multiFilter(expr,this).length > 0 : false; 37.296 - }, 37.297 - 37.298 - hasClass: function(expr) { 37.299 - return this.is("." + expr); 37.300 - }, 37.301 - 37.302 - val: function( val ) { 37.303 - if ( val == undefined ) { 37.304 - if ( this.length ) { 37.305 - var elem = this[0]; 37.306 - 37.307 - // We need to handle select boxes special 37.308 - if ( jQuery.nodeName(elem, "select") ) { 37.309 - var index = elem.selectedIndex, 37.310 - a = [], 37.311 - options = elem.options, 37.312 - one = elem.type == "select-one"; 37.313 - 37.314 - // Nothing was selected 37.315 - if ( index < 0 ) 37.316 - return null; 37.317 - 37.318 - // Loop through all the selected options 37.319 - for ( var i = one ? index : 0, max = one ? index + 1 : options.length; i < max; i++ ) { 37.320 - var option = options[i]; 37.321 - if ( option.selected ) { 37.322 - // Get the specifc value for the option 37.323 - var val = jQuery.browser.msie && !option.attributes["value"].specified ? option.text : option.value; 37.324 - 37.325 - // We don't need an array for one selects 37.326 - if ( one ) 37.327 - return val; 37.328 - 37.329 - // Multi-Selects return an array 37.330 - a.push(val); 37.331 - } 37.332 - } 37.333 - 37.334 - return a; 37.335 - 37.336 - // Everything else, we just grab the value 37.337 - } else 37.338 - return this[0].value.replace(/\r/g, ""); 37.339 - } 37.340 - } else 37.341 - return this.each(function(){ 37.342 - if ( val.constructor == Array && /radio|checkbox/.test(this.type) ) 37.343 - this.checked = (jQuery.inArray(this.value, val) >= 0 || 37.344 - jQuery.inArray(this.name, val) >= 0); 37.345 - else if ( jQuery.nodeName(this, "select") ) { 37.346 - var tmp = val.constructor == Array ? val : [val]; 37.347 - 37.348 - jQuery("option", this).each(function(){ 37.349 - this.selected = (jQuery.inArray(this.value, tmp) >= 0 || 37.350 - jQuery.inArray(this.text, tmp) >= 0); 37.351 - }); 37.352 - 37.353 - if ( !tmp.length ) 37.354 - this.selectedIndex = -1; 37.355 - } else 37.356 - this.value = val; 37.357 - }); 37.358 - }, 37.359 - 37.360 - html: function( val ) { 37.361 - return val == undefined ? 37.362 - ( this.length ? this[0].innerHTML : null ) : 37.363 - this.empty().append( val ); 37.364 - }, 37.365 - 37.366 - replaceWith: function( val ) { 37.367 - return this.after( val ).remove(); 37.368 - }, 37.369 - 37.370 - eq: function(i){ 37.371 - return this.slice(i, i+1); 37.372 - }, 37.373 - 37.374 - slice: function() { 37.375 - return this.pushStack( Array.prototype.slice.apply( this, arguments ) ); 37.376 - }, 37.377 - 37.378 - map: function(fn) { 37.379 - return this.pushStack(jQuery.map( this, function(elem,i){ 37.380 - return fn.call( elem, i, elem ); 37.381 - })); 37.382 - }, 37.383 - 37.384 - andSelf: function() { 37.385 - return this.add( this.prevObject ); 37.386 - }, 37.387 - 37.388 - domManip: function(args, table, dir, fn) { 37.389 - var clone = this.length > 1, a; 37.390 - 37.391 - return this.each(function(){ 37.392 - if ( !a ) { 37.393 - a = jQuery.clean(args, this.ownerDocument); 37.394 - if ( dir < 0 ) 37.395 - a.reverse(); 37.396 - } 37.397 - 37.398 - var obj = this; 37.399 - 37.400 - if ( table && jQuery.nodeName(this, "table") && jQuery.nodeName(a[0], "tr") ) 37.401 - obj = this.getElementsByTagName("tbody")[0] || this.appendChild(document.createElement("tbody")); 37.402 - 37.403 - jQuery.each( a, function(){ 37.404 - var elem = clone ? this.cloneNode(true) : this; 37.405 - if ( !evalScript(0, elem) ) 37.406 - fn.call( obj, elem ); 37.407 - }); 37.408 - }); 37.409 - } 37.410 -}; 37.411 - 37.412 -function evalScript(i, elem){ 37.413 - var script = jQuery.nodeName(elem, "script"); 37.414 - 37.415 - if ( script ) { 37.416 - if ( elem.src ) 37.417 - jQuery.ajax({ url: elem.src, async: false, dataType: "script" }); 37.418 - else 37.419 - jQuery.globalEval( elem.text || elem.textContent || elem.innerHTML || "" ); 37.420 - 37.421 - if ( elem.parentNode ) 37.422 - elem.parentNode.removeChild(elem); 37.423 - 37.424 - } else if ( elem.nodeType == 1 ) 37.425 - jQuery("script", elem).each(evalScript); 37.426 - 37.427 - return script; 37.428 -} 37.429 - 37.430 -jQuery.extend = jQuery.fn.extend = function() { 37.431 - // copy reference to target object 37.432 - var target = arguments[0] || {}, a = 1, al = arguments.length, deep = false; 37.433 - 37.434 - // Handle a deep copy situation 37.435 - if ( target.constructor == Boolean ) { 37.436 - deep = target; 37.437 - target = arguments[1] || {}; 37.438 - } 37.439 - 37.440 - // extend jQuery itself if only one argument is passed 37.441 - if ( al == 1 ) { 37.442 - target = this; 37.443 - a = 0; 37.444 - } 37.445 - 37.446 - var prop; 37.447 - 37.448 - for ( ; a < al; a++ ) 37.449 - // Only deal with non-null/undefined values 37.450 - if ( (prop = arguments[a]) != null ) 37.451 - // Extend the base object 37.452 - for ( var i in prop ) { 37.453 - // Prevent never-ending loop 37.454 - if ( target == prop[i] ) 37.455 - continue; 37.456 - 37.457 - // Recurse if we're merging object values 37.458 - if ( deep && typeof prop[i] == 'object' && target[i] ) 37.459 - jQuery.extend( target[i], prop[i] ); 37.460 - 37.461 - // Don't bring in undefined values 37.462 - else if ( prop[i] != undefined ) 37.463 - target[i] = prop[i]; 37.464 - } 37.465 - 37.466 - // Return the modified object 37.467 - return target; 37.468 -}; 37.469 - 37.470 -var expando = "jQuery" + (new Date()).getTime(), uuid = 0, win = {}; 37.471 - 37.472 -jQuery.extend({ 37.473 - noConflict: function(deep) { 37.474 - window.$ = _$; 37.475 - if ( deep ) 37.476 - window.jQuery = _jQuery; 37.477 - return jQuery; 37.478 - }, 37.479 - 37.480 - // This may seem like some crazy code, but trust me when I say that this 37.481 - // is the only cross-browser way to do this. --John 37.482 - isFunction: function( fn ) { 37.483 - return !!fn && typeof fn != "string" && !fn.nodeName && 37.484 - fn.constructor != Array && /function/i.test( fn + "" ); 37.485 - }, 37.486 - 37.487 - // check if an element is in a XML document 37.488 - isXMLDoc: function(elem) { 37.489 - return elem.documentElement && !elem.body || 37.490 - elem.tagName && elem.ownerDocument && !elem.ownerDocument.body; 37.491 - }, 37.492 - 37.493 - // Evalulates a script in a global context 37.494 - // Evaluates Async. in Safari 2 :-( 37.495 - globalEval: function( data ) { 37.496 - data = jQuery.trim( data ); 37.497 - if ( data ) { 37.498 - if ( window.execScript ) 37.499 - window.execScript( data ); 37.500 - else if ( jQuery.browser.safari ) 37.501 - // safari doesn't provide a synchronous global eval 37.502 - window.setTimeout( data, 0 ); 37.503 - else 37.504 - eval.call( window, data ); 37.505 - } 37.506 - }, 37.507 - 37.508 - nodeName: function( elem, name ) { 37.509 - return elem.nodeName && elem.nodeName.toUpperCase() == name.toUpperCase(); 37.510 - }, 37.511 - 37.512 - cache: {}, 37.513 - 37.514 - data: function( elem, name, data ) { 37.515 - elem = elem == window ? win : elem; 37.516 - 37.517 - var id = elem[ expando ]; 37.518 - 37.519 - // Compute a unique ID for the element 37.520 - if ( !id ) 37.521 - id = elem[ expando ] = ++uuid; 37.522 - 37.523 - // Only generate the data cache if we're 37.524 - // trying to access or manipulate it 37.525 - if ( name && !jQuery.cache[ id ] ) 37.526 - jQuery.cache[ id ] = {}; 37.527 - 37.528 - // Prevent overriding the named cache with undefined values 37.529 - if ( data != undefined ) 37.530 - jQuery.cache[ id ][ name ] = data; 37.531 - 37.532 - // Return the named cache data, or the ID for the element 37.533 - return name ? jQuery.cache[ id ][ name ] : id; 37.534 - }, 37.535 - 37.536 - removeData: function( elem, name ) { 37.537 - elem = elem == window ? win : elem; 37.538 - 37.539 - var id = elem[ expando ]; 37.540 - 37.541 - // If we want to remove a specific section of the element's data 37.542 - if ( name ) { 37.543 - if ( jQuery.cache[ id ] ) { 37.544 - // Remove the section of cache data 37.545 - delete jQuery.cache[ id ][ name ]; 37.546 - 37.547 - // If we've removed all the data, remove the element's cache 37.548 - name = ""; 37.549 - for ( name in jQuery.cache[ id ] ) break; 37.550 - if ( !name ) 37.551 - jQuery.removeData( elem ); 37.552 - } 37.553 - 37.554 - // Otherwise, we want to remove all of the element's data 37.555 - } else { 37.556 - // Clean up the element expando 37.557 - try { 37.558 - delete elem[ expando ]; 37.559 - } catch(e){ 37.560 - // IE has trouble directly removing the expando 37.561 - // but it's ok with using removeAttribute 37.562 - if ( elem.removeAttribute ) 37.563 - elem.removeAttribute( expando ); 37.564 - } 37.565 - 37.566 - // Completely remove the data cache 37.567 - delete jQuery.cache[ id ]; 37.568 - } 37.569 - }, 37.570 - 37.571 - // args is for internal usage only 37.572 - each: function( obj, fn, args ) { 37.573 - if ( args ) { 37.574 - if ( obj.length == undefined ) 37.575 - for ( var i in obj ) 37.576 - fn.apply( obj[i], args ); 37.577 - else 37.578 - for ( var i = 0, ol = obj.length; i < ol; i++ ) 37.579 - if ( fn.apply( obj[i], args ) === false ) break; 37.580 - 37.581 - // A special, fast, case for the most common use of each 37.582 - } else { 37.583 - if ( obj.length == undefined ) 37.584 - for ( var i in obj ) 37.585 - fn.call( obj[i], i, obj[i] ); 37.586 - else 37.587 - for ( var i = 0, ol = obj.length, val = obj[0]; 37.588 - i < ol && fn.call(val,i,val) !== false; val = obj[++i] ){} 37.589 - } 37.590 - 37.591 - return obj; 37.592 - }, 37.593 - 37.594 - prop: function(elem, value, type, index, prop){ 37.595 - // Handle executable functions 37.596 - if ( jQuery.isFunction( value ) ) 37.597 - value = value.call( elem, [index] ); 37.598 - 37.599 - // exclude the following css properties to add px 37.600 - var exclude = /z-?index|font-?weight|opacity|zoom|line-?height/i; 37.601 - 37.602 - // Handle passing in a number to a CSS property 37.603 - return value && value.constructor == Number && type == "curCSS" && !exclude.test(prop) ? 37.604 - value + "px" : 37.605 - value; 37.606 - }, 37.607 - 37.608 - className: { 37.609 - // internal only, use addClass("class") 37.610 - add: function( elem, c ){ 37.611 - jQuery.each( (c || "").split(/\s+/), function(i, cur){ 37.612 - if ( !jQuery.className.has( elem.className, cur ) ) 37.613 - elem.className += ( elem.className ? " " : "" ) + cur; 37.614 - }); 37.615 - }, 37.616 - 37.617 - // internal only, use removeClass("class") 37.618 - remove: function( elem, c ){ 37.619 - elem.className = c != undefined ? 37.620 - jQuery.grep( elem.className.split(/\s+/), function(cur){ 37.621 - return !jQuery.className.has( c, cur ); 37.622 - }).join(" ") : ""; 37.623 - }, 37.624 - 37.625 - // internal only, use is(".class") 37.626 - has: function( t, c ) { 37.627 - return jQuery.inArray( c, (t.className || t).toString().split(/\s+/) ) > -1; 37.628 - } 37.629 - }, 37.630 - 37.631 - swap: function(e,o,f) { 37.632 - for ( var i in o ) { 37.633 - e.style["old"+i] = e.style[i]; 37.634 - e.style[i] = o[i]; 37.635 - } 37.636 - f.apply( e, [] ); 37.637 - for ( var i in o ) 37.638 - e.style[i] = e.style["old"+i]; 37.639 - }, 37.640 - 37.641 - css: function(e,p) { 37.642 - if ( p == "height" || p == "width" ) { 37.643 - var old = {}, oHeight, oWidth, d = ["Top","Bottom","Right","Left"]; 37.644 - 37.645 - jQuery.each( d, function(){ 37.646 - old["padding" + this] = 0; 37.647 - old["border" + this + "Width"] = 0; 37.648 - }); 37.649 - 37.650 - jQuery.swap( e, old, function() { 37.651 - if ( jQuery(e).is(':visible') ) { 37.652 - oHeight = e.offsetHeight; 37.653 - oWidth = e.offsetWidth; 37.654 - } else { 37.655 - e = jQuery(e.cloneNode(true)) 37.656 - .find(":radio").removeAttr("checked").end() 37.657 - .css({ 37.658 - visibility: "hidden", position: "absolute", display: "block", right: "0", left: "0" 37.659 - }).appendTo(e.parentNode)[0]; 37.660 - 37.661 - var parPos = jQuery.css(e.parentNode,"position") || "static"; 37.662 - if ( parPos == "static" ) 37.663 - e.parentNode.style.position = "relative"; 37.664 - 37.665 - oHeight = e.clientHeight; 37.666 - oWidth = e.clientWidth; 37.667 - 37.668 - if ( parPos == "static" ) 37.669 - e.parentNode.style.position = "static"; 37.670 - 37.671 - e.parentNode.removeChild(e); 37.672 - } 37.673 - }); 37.674 - 37.675 - return p == "height" ? oHeight : oWidth; 37.676 - } 37.677 - 37.678 - return jQuery.curCSS( e, p ); 37.679 - }, 37.680 - 37.681 - curCSS: function(elem, prop, force) { 37.682 - var ret, stack = [], swap = []; 37.683 - 37.684 - // A helper method for determining if an element's values are broken 37.685 - function color(a){ 37.686 - if ( !jQuery.browser.safari ) 37.687 - return false; 37.688 - 37.689 - var ret = document.defaultView.getComputedStyle(a,null); 37.690 - return !ret || ret.getPropertyValue("color") == ""; 37.691 - } 37.692 - 37.693 - if (prop == "opacity" && jQuery.browser.msie) { 37.694 - ret = jQuery.attr(elem.style, "opacity"); 37.695 - return ret == "" ? "1" : ret; 37.696 - } 37.697 - 37.698 - if (prop.match(/float/i)) 37.699 - prop = styleFloat; 37.700 - 37.701 - if (!force && elem.style[prop]) 37.702 - ret = elem.style[prop]; 37.703 - 37.704 - else if (document.defaultView && document.defaultView.getComputedStyle) { 37.705 - 37.706 - if (prop.match(/float/i)) 37.707 - prop = "float"; 37.708 - 37.709 - prop = prop.replace(/([A-Z])/g,"-$1").toLowerCase(); 37.710 - var cur = document.defaultView.getComputedStyle(elem, null); 37.711 - 37.712 - if ( cur && !color(elem) ) 37.713 - ret = cur.getPropertyValue(prop); 37.714 - 37.715 - // If the element isn't reporting its values properly in Safari 37.716 - // then some display: none elements are involved 37.717 - else { 37.718 - // Locate all of the parent display: none elements 37.719 - for ( var a = elem; a && color(a); a = a.parentNode ) 37.720 - stack.unshift(a); 37.721 - 37.722 - // Go through and make them visible, but in reverse 37.723 - // (It would be better if we knew the exact display type that they had) 37.724 - for ( a = 0; a < stack.length; a++ ) 37.725 - if ( color(stack[a]) ) { 37.726 - swap[a] = stack[a].style.display; 37.727 - stack[a].style.display = "block"; 37.728 - } 37.729 - 37.730 - // Since we flip the display style, we have to handle that 37.731 - // one special, otherwise get the value 37.732 - ret = prop == "display" && swap[stack.length-1] != null ? 37.733 - "none" : 37.734 - document.defaultView.getComputedStyle(elem,null).getPropertyValue(prop) || ""; 37.735 - 37.736 - // Finally, revert the display styles back 37.737 - for ( a = 0; a < swap.length; a++ ) 37.738 - if ( swap[a] != null ) 37.739 - stack[a].style.display = swap[a]; 37.740 - } 37.741 - 37.742 - if ( prop == "opacity" && ret == "" ) 37.743 - ret = "1"; 37.744 - 37.745 - } else if (elem.currentStyle) { 37.746 - var newProp = prop.replace(/\-(\w)/g,function(m,c){return c.toUpperCase();}); 37.747 - ret = elem.currentStyle[prop] || elem.currentStyle[newProp]; 37.748 - 37.749 - // From the awesome hack by Dean Edwards 37.750 - // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291 37.751 - 37.752 - // If we're not dealing with a regular pixel number 37.753 - // but a number that has a weird ending, we need to convert it to pixels 37.754 - if ( !/^\d+(px)?$/i.test(ret) && /^\d/.test(ret) ) { 37.755 - var style = elem.style.left; 37.756 - var runtimeStyle = elem.runtimeStyle.left; 37.757 - elem.runtimeStyle.left = elem.currentStyle.left; 37.758 - elem.style.left = ret || 0; 37.759 - ret = elem.style.pixelLeft + "px"; 37.760 - elem.style.left = style; 37.761 - elem.runtimeStyle.left = runtimeStyle; 37.762 - } 37.763 - } 37.764 - 37.765 - return ret; 37.766 - }, 37.767 - 37.768 - clean: function(a, doc) { 37.769 - var r = []; 37.770 - doc = doc || document; 37.771 - 37.772 - jQuery.each( a, function(i,arg){ 37.773 - if ( !arg ) return; 37.774 - 37.775 - if ( arg.constructor == Number ) 37.776 - arg = arg.toString(); 37.777 - 37.778 - // Convert html string into DOM nodes 37.779 - if ( typeof arg == "string" ) { 37.780 - // Fix "XHTML"-style tags in all browsers 37.781 - arg = arg.replace(/(<(\w+)[^>]*?)\/>/g, function(m, all, tag){ 37.782 - return tag.match(/^(abbr|br|col|img|input|link|meta|param|hr|area)$/i)? m : all+"></"+tag+">"; 37.783 - }); 37.784 - 37.785 - // Trim whitespace, otherwise indexOf won't work as expected 37.786 - var s = jQuery.trim(arg).toLowerCase(), div = doc.createElement("div"), tb = []; 37.787 - 37.788 - var wrap = 37.789 - // option or optgroup 37.790 - !s.indexOf("<opt") && 37.791 - [1, "<select>", "</select>"] || 37.792 - 37.793 - !s.indexOf("<leg") && 37.794 - [1, "<fieldset>", "</fieldset>"] || 37.795 - 37.796 - s.match(/^<(thead|tbody|tfoot|colg|cap)/) && 37.797 - [1, "<table>", "</table>"] || 37.798 - 37.799 - !s.indexOf("<tr") && 37.800 - [2, "<table><tbody>", "</tbody></table>"] || 37.801 - 37.802 - // <thead> matched above 37.803 - (!s.indexOf("<td") || !s.indexOf("<th")) && 37.804 - [3, "<table><tbody><tr>", "</tr></tbody></table>"] || 37.805 - 37.806 - !s.indexOf("<col") && 37.807 - [2, "<table><tbody></tbody><colgroup>", "</colgroup></table>"] || 37.808 - 37.809 - // IE can't serialize <link> and <script> tags normally 37.810 - jQuery.browser.msie && 37.811 - [1, "div<div>", "</div>"] || 37.812 - 37.813 - [0,"",""]; 37.814 - 37.815 - // Go to html and back, then peel off extra wrappers 37.816 - div.innerHTML = wrap[1] + arg + wrap[2]; 37.817 - 37.818 - // Move to the right depth 37.819 - while ( wrap[0]-- ) 37.820 - div = div.lastChild; 37.821 - 37.822 - // Remove IE's autoinserted <tbody> from table fragments 37.823 - if ( jQuery.browser.msie ) { 37.824 - 37.825 - // String was a <table>, *may* have spurious <tbody> 37.826 - if ( !s.indexOf("<table") && s.indexOf("<tbody") < 0 ) 37.827 - tb = div.firstChild && div.firstChild.childNodes; 37.828 - 37.829 - // String was a bare <thead> or <tfoot> 37.830 - else if ( wrap[1] == "<table>" && s.indexOf("<tbody") < 0 ) 37.831 - tb = div.childNodes; 37.832 - 37.833 - for ( var n = tb.length-1; n >= 0 ; --n ) 37.834 - if ( jQuery.nodeName(tb[n], "tbody") && !tb[n].childNodes.length ) 37.835 - tb[n].parentNode.removeChild(tb[n]); 37.836 - 37.837 - // IE completely kills leading whitespace when innerHTML is used 37.838 - if ( /^\s/.test(arg) ) 37.839 - div.insertBefore( doc.createTextNode( arg.match(/^\s*/)[0] ), div.firstChild ); 37.840 - 37.841 - } 37.842 - 37.843 - arg = jQuery.makeArray( div.childNodes ); 37.844 - } 37.845 - 37.846 - if ( 0 === arg.length && (!jQuery.nodeName(arg, "form") && !jQuery.nodeName(arg, "select")) ) 37.847 - return; 37.848 - 37.849 - if ( arg[0] == undefined || jQuery.nodeName(arg, "form") || arg.options ) 37.850 - r.push( arg ); 37.851 - else 37.852 - r = jQuery.merge( r, arg ); 37.853 - 37.854 - }); 37.855 - 37.856 - return r; 37.857 - }, 37.858 - 37.859 - attr: function(elem, name, value){ 37.860 - var fix = jQuery.isXMLDoc(elem) ? {} : jQuery.props; 37.861 - 37.862 - // Safari mis-reports the default selected property of a hidden option 37.863 - // Accessing the parent's selectedIndex property fixes it 37.864 - if ( name == "selected" && jQuery.browser.safari ) 37.865 - elem.parentNode.selectedIndex; 37.866 - 37.867 - // Certain attributes only work when accessed via the old DOM 0 way 37.868 - if ( fix[name] ) { 37.869 - if ( value != undefined ) elem[fix[name]] = value; 37.870 - return elem[fix[name]]; 37.871 - } else if ( jQuery.browser.msie && name == "style" ) 37.872 - return jQuery.attr( elem.style, "cssText", value ); 37.873 - 37.874 - else if ( value == undefined && jQuery.browser.msie && jQuery.nodeName(elem, "form") && (name == "action" || name == "method") ) 37.875 - return elem.getAttributeNode(name).nodeValue; 37.876 - 37.877 - // IE elem.getAttribute passes even for style 37.878 - else if ( elem.tagName ) { 37.879 - 37.880 - if ( value != undefined ) { 37.881 - if ( name == "type" && jQuery.nodeName(elem,"input") && elem.parentNode ) 37.882 - throw "type property can't be changed"; 37.883 - elem.setAttribute( name, value ); 37.884 - } 37.885 - 37.886 - if ( jQuery.browser.msie && /href|src/.test(name) && !jQuery.isXMLDoc(elem) ) 37.887 - return elem.getAttribute( name, 2 ); 37.888 - 37.889 - return elem.getAttribute( name ); 37.890 - 37.891 - // elem is actually elem.style ... set the style 37.892 - } else { 37.893 - // IE actually uses filters for opacity 37.894 - if ( name == "opacity" && jQuery.browser.msie ) { 37.895 - if ( value != undefined ) { 37.896 - // IE has trouble with opacity if it does not have layout 37.897 - // Force it by setting the zoom level 37.898 - elem.zoom = 1; 37.899 - 37.900 - // Set the alpha filter to set the opacity 37.901 - elem.filter = (elem.filter || "").replace(/alpha\([^)]*\)/,"") + 37.902 - (parseFloat(value).toString() == "NaN" ? "" : "alpha(opacity=" + value * 100 + ")"); 37.903 - } 37.904 - 37.905 - return elem.filter ? 37.906 - (parseFloat( elem.filter.match(/opacity=([^)]*)/)[1] ) / 100).toString() : ""; 37.907 - } 37.908 - name = name.replace(/-([a-z])/ig,function(z,b){return b.toUpperCase();}); 37.909 - if ( value != undefined ) elem[name] = value; 37.910 - return elem[name]; 37.911 - } 37.912 - }, 37.913 - 37.914 - trim: function(t){ 37.915 - return (t||"").replace(/^\s+|\s+$/g, ""); 37.916 - }, 37.917 - 37.918 - makeArray: function( a ) { 37.919 - var r = []; 37.920 - 37.921 - // Need to use typeof to fight Safari childNodes crashes 37.922 - if ( typeof a != "array" ) 37.923 - for ( var i = 0, al = a.length; i < al; i++ ) 37.924 - r.push( a[i] ); 37.925 - else 37.926 - r = a.slice( 0 ); 37.927 - 37.928 - return r; 37.929 - }, 37.930 - 37.931 - inArray: function( b, a ) { 37.932 - for ( var i = 0, al = a.length; i < al; i++ ) 37.933 - if ( a[i] == b ) 37.934 - return i; 37.935 - return -1; 37.936 - }, 37.937 - 37.938 - merge: function(first, second) { 37.939 - // We have to loop this way because IE & Opera overwrite the length 37.940 - // expando of getElementsByTagName 37.941 - 37.942 - // Also, we need to make sure that the correct elements are being returned 37.943 - // (IE returns comment nodes in a '*' query) 37.944 - if ( jQuery.browser.msie ) { 37.945 - for ( var i = 0; second[i]; i++ ) 37.946 - if ( second[i].nodeType != 8 ) 37.947 - first.push(second[i]); 37.948 - } else 37.949 - for ( var i = 0; second[i]; i++ ) 37.950 - first.push(second[i]); 37.951 - 37.952 - return first; 37.953 - }, 37.954 - 37.955 - unique: function(first) { 37.956 - var r = [], done = {}; 37.957 - 37.958 - try { 37.959 - for ( var i = 0, fl = first.length; i < fl; i++ ) { 37.960 - var id = jQuery.data(first[i]); 37.961 - if ( !done[id] ) { 37.962 - done[id] = true; 37.963 - r.push(first[i]); 37.964 - } 37.965 - } 37.966 - } catch(e) { 37.967 - r = first; 37.968 - } 37.969 - 37.970 - return r; 37.971 - }, 37.972 - 37.973 - grep: function(elems, fn, inv) { 37.974 - // If a string is passed in for the function, make a function 37.975 - // for it (a handy shortcut) 37.976 - if ( typeof fn == "string" ) 37.977 - fn = eval("false||function(a,i){return " + fn + "}"); 37.978 - 37.979 - var result = []; 37.980 - 37.981 - // Go through the array, only saving the items 37.982 - // that pass the validator function 37.983 - for ( var i = 0, el = elems.length; i < el; i++ ) 37.984 - if ( !inv && fn(elems[i],i) || inv && !fn(elems[i],i) ) 37.985 - result.push( elems[i] ); 37.986 - 37.987 - return result; 37.988 - }, 37.989 - 37.990 - map: function(elems, fn) { 37.991 - // If a string is passed in for the function, make a function 37.992 - // for it (a handy shortcut) 37.993 - if ( typeof fn == "string" ) 37.994 - fn = eval("false||function(a){return " + fn + "}"); 37.995 - 37.996 - var result = []; 37.997 - 37.998 - // Go through the array, translating each of the items to their 37.999 - // new value (or values). 37.1000 - for ( var i = 0, el = elems.length; i < el; i++ ) { 37.1001 - var val = fn(elems[i],i); 37.1002 - 37.1003 - if ( val !== null && val != undefined ) { 37.1004 - if ( val.constructor != Array ) val = [val]; 37.1005 - result = result.concat( val ); 37.1006 - } 37.1007 - } 37.1008 - 37.1009 - return result; 37.1010 - } 37.1011 -}); 37.1012 - 37.1013 -var userAgent = navigator.userAgent.toLowerCase(); 37.1014 - 37.1015 -// Figure out what browser is being used 37.1016 -jQuery.browser = { 37.1017 - version: (userAgent.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/) || [])[1], 37.1018 - safari: /webkit/.test(userAgent), 37.1019 - opera: /opera/.test(userAgent), 37.1020 - msie: /msie/.test(userAgent) && !/opera/.test(userAgent), 37.1021 - mozilla: /mozilla/.test(userAgent) && !/(compatible|webkit)/.test(userAgent) 37.1022 -}; 37.1023 - 37.1024 -var styleFloat = jQuery.browser.msie ? "styleFloat" : "cssFloat"; 37.1025 - 37.1026 -jQuery.extend({ 37.1027 - // Check to see if the W3C box model is being used 37.1028 - boxModel: !jQuery.browser.msie || document.compatMode == "CSS1Compat", 37.1029 - 37.1030 - styleFloat: jQuery.browser.msie ? "styleFloat" : "cssFloat", 37.1031 - 37.1032 - props: { 37.1033 - "for": "htmlFor", 37.1034 - "class": "className", 37.1035 - "float": styleFloat, 37.1036 - cssFloat: styleFloat, 37.1037 - styleFloat: styleFloat, 37.1038 - innerHTML: "innerHTML", 37.1039 - className: "className", 37.1040 - value: "value", 37.1041 - disabled: "disabled", 37.1042 - checked: "checked", 37.1043 - readonly: "readOnly", 37.1044 - selected: "selected", 37.1045 - maxlength: "maxLength" 37.1046 - } 37.1047 -}); 37.1048 - 37.1049 -jQuery.each({ 37.1050 - parent: "a.parentNode", 37.1051 - parents: "jQuery.dir(a,'parentNode')", 37.1052 - next: "jQuery.nth(a,2,'nextSibling')", 37.1053 - prev: "jQuery.nth(a,2,'previousSibling')", 37.1054 - nextAll: "jQuery.dir(a,'nextSibling')", 37.1055 - prevAll: "jQuery.dir(a,'previousSibling')", 37.1056 - siblings: "jQuery.sibling(a.parentNode.firstChild,a)", 37.1057 - children: "jQuery.sibling(a.firstChild)", 37.1058 - contents: "jQuery.nodeName(a,'iframe')?a.contentDocument||a.contentWindow.document:jQuery.makeArray(a.childNodes)" 37.1059 -}, function(i,n){ 37.1060 - jQuery.fn[ i ] = function(a) { 37.1061 - var ret = jQuery.map(this,n); 37.1062 - if ( a && typeof a == "string" ) 37.1063 - ret = jQuery.multiFilter(a,ret); 37.1064 - return this.pushStack( jQuery.unique(ret) ); 37.1065 - }; 37.1066 -}); 37.1067 - 37.1068 -jQuery.each({ 37.1069 - appendTo: "append", 37.1070 - prependTo: "prepend", 37.1071 - insertBefore: "before", 37.1072 - insertAfter: "after", 37.1073 - replaceAll: "replaceWith" 37.1074 -}, function(i,n){ 37.1075 - jQuery.fn[ i ] = function(){ 37.1076 - var a = arguments; 37.1077 - return this.each(function(){ 37.1078 - for ( var j = 0, al = a.length; j < al; j++ ) 37.1079 - jQuery(a[j])[n]( this ); 37.1080 - }); 37.1081 - }; 37.1082 -}); 37.1083 - 37.1084 -jQuery.each( { 37.1085 - removeAttr: function( key ) { 37.1086 - jQuery.attr( this, key, "" ); 37.1087 - this.removeAttribute( key ); 37.1088 - }, 37.1089 - addClass: function(c){ 37.1090 - jQuery.className.add(this,c); 37.1091 - }, 37.1092 - removeClass: function(c){ 37.1093 - jQuery.className.remove(this,c); 37.1094 - }, 37.1095 - toggleClass: function( c ){ 37.1096 - jQuery.className[ jQuery.className.has(this,c) ? "remove" : "add" ](this, c); 37.1097 - }, 37.1098 - remove: function(a){ 37.1099 - if ( !a || jQuery.filter( a, [this] ).r.length ) { 37.1100 - jQuery.removeData( this ); 37.1101 - this.parentNode.removeChild( this ); 37.1102 - } 37.1103 - }, 37.1104 - empty: function() { 37.1105 - // Clean up the cache 37.1106 - jQuery("*", this).each(function(){ jQuery.removeData(this); }); 37.1107 - 37.1108 - while ( this.firstChild ) 37.1109 - this.removeChild( this.firstChild ); 37.1110 - } 37.1111 -}, function(i,n){ 37.1112 - jQuery.fn[ i ] = function() { 37.1113 - return this.each( n, arguments ); 37.1114 - }; 37.1115 -}); 37.1116 - 37.1117 -jQuery.each( [ "Height", "Width" ], function(i,name){ 37.1118 - var n = name.toLowerCase(); 37.1119 - 37.1120 - jQuery.fn[ n ] = function(h) { 37.1121 - return this[0] == window ? 37.1122 - jQuery.browser.safari && self["inner" + name] || 37.1123 - jQuery.boxModel && Math.max(document.documentElement["client" + name], document.body["client" + name]) || 37.1124 - document.body["client" + name] : 37.1125 - 37.1126 - this[0] == document ? 37.1127 - Math.max( document.body["scroll" + name], document.body["offset" + name] ) : 37.1128 - 37.1129 - h == undefined ? 37.1130 - ( this.length ? jQuery.css( this[0], n ) : null ) : 37.1131 - this.css( n, h.constructor == String ? h : h + "px" ); 37.1132 - }; 37.1133 -}); 37.1134 - 37.1135 -var chars = jQuery.browser.safari && parseInt(jQuery.browser.version) < 417 ? 37.1136 - "(?:[\\w*_-]|\\\\.)" : 37.1137 - "(?:[\\w\u0128-\uFFFF*_-]|\\\\.)", 37.1138 - quickChild = new RegExp("^>\\s*(" + chars + "+)"), 37.1139 - quickID = new RegExp("^(" + chars + "+)(#)(" + chars + "+)"), 37.1140 - quickClass = new RegExp("^([#.]?)(" + chars + "*)"); 37.1141 - 37.1142 -jQuery.extend({ 37.1143 - expr: { 37.1144 - "": "m[2]=='*'||jQuery.nodeName(a,m[2])", 37.1145 - "#": "a.getAttribute('id')==m[2]", 37.1146 - ":": { 37.1147 - // Position Checks 37.1148 - lt: "i<m[3]-0", 37.1149 - gt: "i>m[3]-0", 37.1150 - nth: "m[3]-0==i", 37.1151 - eq: "m[3]-0==i", 37.1152 - first: "i==0", 37.1153 - last: "i==r.length-1", 37.1154 - even: "i%2==0", 37.1155 - odd: "i%2", 37.1156 - 37.1157 - // Child Checks 37.1158 - "first-child": "a.parentNode.getElementsByTagName('*')[0]==a", 37.1159 - "last-child": "jQuery.nth(a.parentNode.lastChild,1,'previousSibling')==a", 37.1160 - "only-child": "!jQuery.nth(a.parentNode.lastChild,2,'previousSibling')", 37.1161 - 37.1162 - // Parent Checks 37.1163 - parent: "a.firstChild", 37.1164 - empty: "!a.firstChild", 37.1165 - 37.1166 - // Text Check 37.1167 - contains: "(a.textContent||a.innerText||jQuery(a).text()||'').indexOf(m[3])>=0", 37.1168 - 37.1169 - // Visibility 37.1170 - visible: '"hidden"!=a.type&&jQuery.css(a,"display")!="none"&&jQuery.css(a,"visibility")!="hidden"', 37.1171 - hidden: '"hidden"==a.type||jQuery.css(a,"display")=="none"||jQuery.css(a,"visibility")=="hidden"', 37.1172 - 37.1173 - // Form attributes 37.1174 - enabled: "!a.disabled", 37.1175 - disabled: "a.disabled", 37.1176 - checked: "a.checked", 37.1177 - selected: "a.selected||jQuery.attr(a,'selected')", 37.1178 - 37.1179 - // Form elements 37.1180 - text: "'text'==a.type", 37.1181 - radio: "'radio'==a.type", 37.1182 - checkbox: "'checkbox'==a.type", 37.1183 - file: "'file'==a.type", 37.1184 - password: "'password'==a.type", 37.1185 - submit: "'submit'==a.type", 37.1186 - image: "'image'==a.type", 37.1187 - reset: "'reset'==a.type", 37.1188 - button: '"button"==a.type||jQuery.nodeName(a,"button")', 37.1189 - input: "/input|select|textarea|button/i.test(a.nodeName)", 37.1190 - 37.1191 - // :has() 37.1192 - has: "jQuery.find(m[3],a).length", 37.1193 - 37.1194 - // :header 37.1195 - header: "/h\\d/i.test(a.nodeName)", 37.1196 - 37.1197 - // :animated 37.1198 - animated: "jQuery.grep(jQuery.timers,function(fn){return a==fn.elem;}).length" 37.1199 - } 37.1200 - }, 37.1201 - 37.1202 - // The regular expressions that power the parsing engine 37.1203 - parse: [ 37.1204 - // Match: [@value='test'], [@foo] 37.1205 - /^(\[) *@?([\w-]+) *([!*$^~=]*) *('?"?)(.*?)\4 *\]/, 37.1206 - 37.1207 - // Match: :contains('foo') 37.1208 - /^(:)([\w-]+)\("?'?(.*?(\(.*?\))?[^(]*?)"?'?\)/, 37.1209 - 37.1210 - // Match: :even, :last-chlid, #id, .class 37.1211 - new RegExp("^([:.#]*)(" + chars + "+)") 37.1212 - ], 37.1213 - 37.1214 - multiFilter: function( expr, elems, not ) { 37.1215 - var old, cur = []; 37.1216 - 37.1217 - while ( expr && expr != old ) { 37.1218 - old = expr; 37.1219 - var f = jQuery.filter( expr, elems, not ); 37.1220 - expr = f.t.replace(/^\s*,\s*/, "" ); 37.1221 - cur = not ? elems = f.r : jQuery.merge( cur, f.r ); 37.1222 - } 37.1223 - 37.1224 - return cur; 37.1225 - }, 37.1226 - 37.1227 - find: function( t, context ) { 37.1228 - // Quickly handle non-string expressions 37.1229 - if ( typeof t != "string" ) 37.1230 - return [ t ]; 37.1231 - 37.1232 - // Make sure that the context is a DOM Element 37.1233 - if ( context && !context.nodeType ) 37.1234 - context = null; 37.1235 - 37.1236 - // Set the correct context (if none is provided) 37.1237 - context = context || document; 37.1238 - 37.1239 - // Initialize the search 37.1240 - var ret = [context], done = [], last; 37.1241 - 37.1242 - // Continue while a selector expression exists, and while 37.1243 - // we're no longer looping upon ourselves 37.1244 - while ( t && last != t ) { 37.1245 - var r = []; 37.1246 - last = t; 37.1247 - 37.1248 - t = jQuery.trim(t); 37.1249 - 37.1250 - var foundToken = false; 37.1251 - 37.1252 - // An attempt at speeding up child selectors that 37.1253 - // point to a specific element tag 37.1254 - var re = quickChild; 37.1255 - var m = re.exec(t); 37.1256 - 37.1257 - if ( m ) { 37.1258 - var nodeName = m[1].toUpperCase(); 37.1259 - 37.1260 - // Perform our own iteration and filter 37.1261 - for ( var i = 0; ret[i]; i++ ) 37.1262 - for ( var c = ret[i].firstChild; c; c = c.nextSibling ) 37.1263 - if ( c.nodeType == 1 && (nodeName == "*" || c.nodeName.toUpperCase() == nodeName.toUpperCase()) ) 37.1264 - r.push( c ); 37.1265 - 37.1266 - ret = r; 37.1267 - t = t.replace( re, "" ); 37.1268 - if ( t.indexOf(" ") == 0 ) continue; 37.1269 - foundToken = true; 37.1270 - } else { 37.1271 - re = /^([>+~])\s*(\w*)/i; 37.1272 - 37.1273 - if ( (m = re.exec(t)) != null ) { 37.1274 - r = []; 37.1275 - 37.1276 - var nodeName = m[2], merge = {}; 37.1277 - m = m[1]; 37.1278 - 37.1279 - for ( var j = 0, rl = ret.length; j < rl; j++ ) { 37.1280 - var n = m == "~" || m == "+" ? ret[j].nextSibling : ret[j].firstChild; 37.1281 - for ( ; n; n = n.nextSibling ) 37.1282 - if ( n.nodeType == 1 ) { 37.1283 - var id = jQuery.data(n); 37.1284 - 37.1285 - if ( m == "~" && merge[id] ) break; 37.1286 - 37.1287 - if (!nodeName || n.nodeName.toUpperCase() == nodeName.toUpperCase() ) { 37.1288 - if ( m == "~" ) merge[id] = true; 37.1289 - r.push( n ); 37.1290 - } 37.1291 - 37.1292 - if ( m == "+" ) break; 37.1293 - } 37.1294 - } 37.1295 - 37.1296 - ret = r; 37.1297 - 37.1298 - // And remove the token 37.1299 - t = jQuery.trim( t.replace( re, "" ) ); 37.1300 - foundToken = true; 37.1301 - } 37.1302 - } 37.1303 - 37.1304 - // See if there's still an expression, and that we haven't already 37.1305 - // matched a token 37.1306 - if ( t && !foundToken ) { 37.1307 - // Handle multiple expressions 37.1308 - if ( !t.indexOf(",") ) { 37.1309 - // Clean the result set 37.1310 - if ( context == ret[0] ) ret.shift(); 37.1311 - 37.1312 - // Merge the result sets 37.1313 - done = jQuery.merge( done, ret ); 37.1314 - 37.1315 - // Reset the context 37.1316 - r = ret = [context]; 37.1317 - 37.1318 - // Touch up the selector string 37.1319 - t = " " + t.substr(1,t.length); 37.1320 - 37.1321 - } else { 37.1322 - // Optimize for the case nodeName#idName 37.1323 - var re2 = quickID; 37.1324 - var m = re2.exec(t); 37.1325 - 37.1326 - // Re-organize the results, so that they're consistent 37.1327 - if ( m ) { 37.1328 - m = [ 0, m[2], m[3], m[1] ]; 37.1329 - 37.1330 - } else { 37.1331 - // Otherwise, do a traditional filter check for 37.1332 - // ID, class, and element selectors 37.1333 - re2 = quickClass; 37.1334 - m = re2.exec(t); 37.1335 - } 37.1336 - 37.1337 - m[2] = m[2].replace(/\\/g, ""); 37.1338 - 37.1339 - var elem = ret[ret.length-1]; 37.1340 - 37.1341 - // Try to do a global search by ID, where we can 37.1342 - if ( m[1] == "#" && elem && elem.getElementById && !jQuery.isXMLDoc(elem) ) { 37.1343 - // Optimization for HTML document case 37.1344 - var oid = elem.getElementById(m[2]); 37.1345 - 37.1346 - // Do a quick check for the existence of the actual ID attribute 37.1347 - // to avoid selecting by the name attribute in IE 37.1348 - // also check to insure id is a string to avoid selecting an element with the name of 'id' inside a form 37.1349 - if ( (jQuery.browser.msie||jQuery.browser.opera) && oid && typeof oid.id == "string" && oid.id != m[2] ) 37.1350 - oid = jQuery('[@id="'+m[2]+'"]', elem)[0]; 37.1351 - 37.1352 - // Do a quick check for node name (where applicable) so 37.1353 - // that div#foo searches will be really fast 37.1354 - ret = r = oid && (!m[3] || jQuery.nodeName(oid, m[3])) ? [oid] : []; 37.1355 - } else { 37.1356 - // We need to find all descendant elements 37.1357 - for ( var i = 0; ret[i]; i++ ) { 37.1358 - // Grab the tag name being searched for 37.1359 - var tag = m[1] == "#" && m[3] ? m[3] : m[1] != "" || m[0] == "" ? "*" : m[2]; 37.1360 - 37.1361 - // Handle IE7 being really dumb about <object>s 37.1362 - if ( tag == "*" && ret[i].nodeName.toLowerCase() == "object" ) 37.1363 - tag = "param"; 37.1364 - 37.1365 - r = jQuery.merge( r, ret[i].getElementsByTagName( tag )); 37.1366 - } 37.1367 - 37.1368 - // It's faster to filter by class and be done with it 37.1369 - if ( m[1] == "." ) 37.1370 - r = jQuery.classFilter( r, m[2] ); 37.1371 - 37.1372 - // Same with ID filtering 37.1373 - if ( m[1] == "#" ) { 37.1374 - var tmp = []; 37.1375 - 37.1376 - // Try to find the element with the ID 37.1377 - for ( var i = 0; r[i]; i++ ) 37.1378 - if ( r[i].getAttribute("id") == m[2] ) { 37.1379 - tmp = [ r[i] ]; 37.1380 - break; 37.1381 - } 37.1382 - 37.1383 - r = tmp; 37.1384 - } 37.1385 - 37.1386 - ret = r; 37.1387 - } 37.1388 - 37.1389 - t = t.replace( re2, "" ); 37.1390 - } 37.1391 - 37.1392 - } 37.1393 - 37.1394 - // If a selector string still exists 37.1395 - if ( t ) { 37.1396 - // Attempt to filter it 37.1397 - var val = jQuery.filter(t,r); 37.1398 - ret = r = val.r; 37.1399 - t = jQuery.trim(val.t); 37.1400 - } 37.1401 - } 37.1402 - 37.1403 - // An error occurred with the selector; 37.1404 - // just return an empty set instead 37.1405 - if ( t ) 37.1406 - ret = []; 37.1407 - 37.1408 - // Remove the root context 37.1409 - if ( ret && context == ret[0] ) 37.1410 - ret.shift(); 37.1411 - 37.1412 - // And combine the results 37.1413 - done = jQuery.merge( done, ret ); 37.1414 - 37.1415 - return done; 37.1416 - }, 37.1417 - 37.1418 - classFilter: function(r,m,not){ 37.1419 - m = " " + m + " "; 37.1420 - var tmp = []; 37.1421 - for ( var i = 0; r[i]; i++ ) { 37.1422 - var pass = (" " + r[i].className + " ").indexOf( m ) >= 0; 37.1423 - if ( !not && pass || not && !pass ) 37.1424 - tmp.push( r[i] ); 37.1425 - } 37.1426 - return tmp; 37.1427 - }, 37.1428 - 37.1429 - filter: function(t,r,not) { 37.1430 - var last; 37.1431 - 37.1432 - // Look for common filter expressions 37.1433 - while ( t && t != last ) { 37.1434 - last = t; 37.1435 - 37.1436 - var p = jQuery.parse, m; 37.1437 - 37.1438 - for ( var i = 0; p[i]; i++ ) { 37.1439 - m = p[i].exec( t ); 37.1440 - 37.1441 - if ( m ) { 37.1442 - // Remove what we just matched 37.1443 - t = t.substring( m[0].length ); 37.1444 - 37.1445 - m[2] = m[2].replace(/\\/g, ""); 37.1446 - break; 37.1447 - } 37.1448 - } 37.1449 - 37.1450 - if ( !m ) 37.1451 - break; 37.1452 - 37.1453 - // :not() is a special case that can be optimized by 37.1454 - // keeping it out of the expression list 37.1455 - if ( m[1] == ":" && m[2] == "not" ) 37.1456 - r = jQuery.filter(m[3], r, true).r; 37.1457 - 37.1458 - // We can get a big speed boost by filtering by class here 37.1459 - else if ( m[1] == "." ) 37.1460 - r = jQuery.classFilter(r, m[2], not); 37.1461 - 37.1462 - else if ( m[1] == "[" ) { 37.1463 - var tmp = [], type = m[3]; 37.1464 - 37.1465 - for ( var i = 0, rl = r.length; i < rl; i++ ) { 37.1466 - var a = r[i], z = a[ jQuery.props[m[2]] || m[2] ]; 37.1467 - 37.1468 - if ( z == null || /href|src|selected/.test(m[2]) ) 37.1469 - z = jQuery.attr(a,m[2]) || ''; 37.1470 - 37.1471 - if ( (type == "" && !!z || 37.1472 - type == "=" && z == m[5] || 37.1473 - type == "!=" && z != m[5] || 37.1474 - type == "^=" && z && !z.indexOf(m[5]) || 37.1475 - type == "$=" && z.substr(z.length - m[5].length) == m[5] || 37.1476 - (type == "*=" || type == "~=") && z.indexOf(m[5]) >= 0) ^ not ) 37.1477 - tmp.push( a ); 37.1478 - } 37.1479 - 37.1480 - r = tmp; 37.1481 - 37.1482 - // We can get a speed boost by handling nth-child here 37.1483 - } else if ( m[1] == ":" && m[2] == "nth-child" ) { 37.1484 - var merge = {}, tmp = [], 37.1485 - test = /(\d*)n\+?(\d*)/.exec( 37.1486 - m[3] == "even" && "2n" || m[3] == "odd" && "2n+1" || 37.1487 - !/\D/.test(m[3]) && "n+" + m[3] || m[3]), 37.1488 - first = (test[1] || 1) - 0, last = test[2] - 0; 37.1489 - 37.1490 - for ( var i = 0, rl = r.length; i < rl; i++ ) { 37.1491 - var node = r[i], parentNode = node.parentNode, id = jQuery.data(parentNode); 37.1492 - 37.1493 - if ( !merge[id] ) { 37.1494 - var c = 1; 37.1495 - 37.1496 - for ( var n = parentNode.firstChild; n; n = n.nextSibling ) 37.1497 - if ( n.nodeType == 1 ) 37.1498 - n.nodeIndex = c++; 37.1499 - 37.1500 - merge[id] = true; 37.1501 - } 37.1502 - 37.1503 - var add = false; 37.1504 - 37.1505 - if ( first == 1 ) { 37.1506 - if ( last == 0 || node.nodeIndex == last ) 37.1507 - add = true; 37.1508 - } else if ( (node.nodeIndex + last) % first == 0 ) 37.1509 - add = true; 37.1510 - 37.1511 - if ( add ^ not ) 37.1512 - tmp.push( node ); 37.1513 - } 37.1514 - 37.1515 - r = tmp; 37.1516 - 37.1517 - // Otherwise, find the expression to execute 37.1518 - } else { 37.1519 - var f = jQuery.expr[m[1]]; 37.1520 - if ( typeof f != "string" ) 37.1521 - f = jQuery.expr[m[1]][m[2]]; 37.1522 - 37.1523 - // Build a custom macro to enclose it 37.1524 - f = eval("false||function(a,i){return " + f + "}"); 37.1525 - 37.1526 - // Execute it against the current filter 37.1527 - r = jQuery.grep( r, f, not ); 37.1528 - } 37.1529 - } 37.1530 - 37.1531 - // Return an array of filtered elements (r) 37.1532 - // and the modified expression string (t) 37.1533 - return { r: r, t: t }; 37.1534 - }, 37.1535 - 37.1536 - dir: function( elem, dir ){ 37.1537 - var matched = []; 37.1538 - var cur = elem[dir]; 37.1539 - while ( cur && cur != document ) { 37.1540 - if ( cur.nodeType == 1 ) 37.1541 - matched.push( cur ); 37.1542 - cur = cur[dir]; 37.1543 - } 37.1544 - return matched; 37.1545 - }, 37.1546 - 37.1547 - nth: function(cur,result,dir,elem){ 37.1548 - result = result || 1; 37.1549 - var num = 0; 37.1550 - 37.1551 - for ( ; cur; cur = cur[dir] ) 37.1552 - if ( cur.nodeType == 1 && ++num == result ) 37.1553 - break; 37.1554 - 37.1555 - return cur; 37.1556 - }, 37.1557 - 37.1558 - sibling: function( n, elem ) { 37.1559 - var r = []; 37.1560 - 37.1561 - for ( ; n; n = n.nextSibling ) { 37.1562 - if ( n.nodeType == 1 && (!elem || n != elem) ) 37.1563 - r.push( n ); 37.1564 - } 37.1565 - 37.1566 - return r; 37.1567 - } 37.1568 -}); 37.1569 -/* 37.1570 - * A number of helper functions used for managing events. 37.1571 - * Many of the ideas behind this code orignated from 37.1572 - * Dean Edwards' addEvent library. 37.1573 - */ 37.1574 -jQuery.event = { 37.1575 - 37.1576 - // Bind an event to an element 37.1577 - // Original by Dean Edwards 37.1578 - add: function(element, type, handler, data) { 37.1579 - // For whatever reason, IE has trouble passing the window object 37.1580 - // around, causing it to be cloned in the process 37.1581 - if ( jQuery.browser.msie && element.setInterval != undefined ) 37.1582 - element = window; 37.1583 - 37.1584 - // Make sure that the function being executed has a unique ID 37.1585 - if ( !handler.guid ) 37.1586 - handler.guid = this.guid++; 37.1587 - 37.1588 - // if data is passed, bind to handler 37.1589 - if( data != undefined ) { 37.1590 - // Create temporary function pointer to original handler 37.1591 - var fn = handler; 37.1592 - 37.1593 - // Create unique handler function, wrapped around original handler 37.1594 - handler = function() { 37.1595 - // Pass arguments and context to original handler 37.1596 - return fn.apply(this, arguments); 37.1597 - }; 37.1598 - 37.1599 - // Store data in unique handler 37.1600 - handler.data = data; 37.1601 - 37.1602 - // Set the guid of unique handler to the same of original handler, so it can be removed 37.1603 - handler.guid = fn.guid; 37.1604 - } 37.1605 - 37.1606 - // Namespaced event handlers 37.1607 - var parts = type.split("."); 37.1608 - type = parts[0]; 37.1609 - handler.type = parts[1]; 37.1610 - 37.1611 - // Init the element's event structure 37.1612 - var events = jQuery.data(element, "events") || jQuery.data(element, "events", {}); 37.1613 - 37.1614 - var handle = jQuery.data(element, "handle", function(){ 37.1615 - // returned undefined or false 37.1616 - var val; 37.1617 - 37.1618 - // Handle the second event of a trigger and when 37.1619 - // an event is called after a page has unloaded 37.1620 - if ( typeof jQuery == "undefined" || jQuery.event.triggered ) 37.1621 - return val; 37.1622 - 37.1623 - val = jQuery.event.handle.apply(element, arguments); 37.1624 - 37.1625 - return val; 37.1626 - }); 37.1627 - 37.1628 - // Get the current list of functions bound to this event 37.1629 - var handlers = events[type]; 37.1630 - 37.1631 - // Init the event handler queue 37.1632 - if (!handlers) { 37.1633 - handlers = events[type] = {}; 37.1634 - 37.1635 - // And bind the global event handler to the element 37.1636 - if (element.addEventListener) 37.1637 - element.addEventListener(type, handle, false); 37.1638 - else 37.1639 - element.attachEvent("on" + type, handle); 37.1640 - } 37.1641 - 37.1642 - // Add the function to the element's handler list 37.1643 - handlers[handler.guid] = handler; 37.1644 - 37.1645 - // Keep track of which events have been used, for global triggering 37.1646 - this.global[type] = true; 37.1647 - }, 37.1648 - 37.1649 - guid: 1, 37.1650 - global: {}, 37.1651 - 37.1652 - // Detach an event or set of events from an element 37.1653 - remove: function(element, type, handler) { 37.1654 - var events = jQuery.data(element, "events"), ret, index; 37.1655 - 37.1656 - // Namespaced event handlers 37.1657 - if ( typeof type == "string" ) { 37.1658 - var parts = type.split("."); 37.1659 - type = parts[0]; 37.1660 - } 37.1661 - 37.1662 - if ( events ) { 37.1663 - // type is actually an event object here 37.1664 - if ( type && type.type ) { 37.1665 - handler = type.handler; 37.1666 - type = type.type; 37.1667 - } 37.1668 - 37.1669 - if ( !type ) { 37.1670 - for ( type in events ) 37.1671 - this.remove( element, type ); 37.1672 - 37.1673 - } else if ( events[type] ) { 37.1674 - // remove the given handler for the given type 37.1675 - if ( handler ) 37.1676 - delete events[type][handler.guid]; 37.1677 - 37.1678 - // remove all handlers for the given type 37.1679 - else 37.1680 - for ( handler in events[type] ) 37.1681 - // Handle the removal of namespaced events 37.1682 - if ( !parts[1] || events[type][handler].type == parts[1] ) 37.1683 - delete events[type][handler]; 37.1684 - 37.1685 - // remove generic event handler if no more handlers exist 37.1686 - for ( ret in events[type] ) break; 37.1687 - if ( !ret ) { 37.1688 - if (element.removeEventListener) 37.1689 - element.removeEventListener(type, jQuery.data(element, "handle"), false); 37.1690 - else 37.1691 - element.detachEvent("on" + type, jQuery.data(element, "handle")); 37.1692 - ret = null; 37.1693 - delete events[type]; 37.1694 - } 37.1695 - } 37.1696 - 37.1697 - // Remove the expando if it's no longer used 37.1698 - for ( ret in events ) break; 37.1699 - if ( !ret ) { 37.1700 - jQuery.removeData( element, "events" ); 37.1701 - jQuery.removeData( element, "handle" ); 37.1702 - } 37.1703 - } 37.1704 - }, 37.1705 - 37.1706 - trigger: function(type, data, element, donative, extra) { 37.1707 - // Clone the incoming data, if any 37.1708 - data = jQuery.makeArray(data || []); 37.1709 - 37.1710 - // Handle a global trigger 37.1711 - if ( !element ) { 37.1712 - // Only trigger if we've ever bound an event for it 37.1713 - if ( this.global[type] ) 37.1714 - jQuery("*").add([window, document]).trigger(type, data); 37.1715 - 37.1716 - // Handle triggering a single element 37.1717 - } else { 37.1718 - var val, ret, fn = jQuery.isFunction( element[ type ] || null ), 37.1719 - // Check to see if we need to provide a fake event, or not 37.1720 - evt = !data[0] || !data[0].preventDefault; 37.1721 - 37.1722 - // Pass along a fake event 37.1723 - if ( evt ) 37.1724 - data.unshift( this.fix({ type: type, target: element }) ); 37.1725 - 37.1726 - // Enforce the right trigger type 37.1727 - data[0].type = type; 37.1728 - 37.1729 - // Trigger the event 37.1730 - if ( jQuery.isFunction( jQuery.data(element, "handle") ) ) 37.1731 - val = jQuery.data(element, "handle").apply( element, data ); 37.1732 - 37.1733 - // Handle triggering native .onfoo handlers 37.1734 - if ( !fn && element["on"+type] && element["on"+type].apply( element, data ) === false ) 37.1735 - val = false; 37.1736 - 37.1737 - // Extra functions don't get the custom event object 37.1738 - if ( evt ) 37.1739 - data.shift(); 37.1740 - 37.1741 - // Handle triggering of extra function 37.1742 - if ( extra && extra.apply( element, data ) === false ) 37.1743 - val = false; 37.1744 - 37.1745 - // Trigger the native events (except for clicks on links) 37.1746 - if ( fn && donative !== false && val !== false && !(jQuery.nodeName(element, 'a') && type == "click") ) { 37.1747 - this.triggered = true; 37.1748 - element[ type ](); 37.1749 - } 37.1750 - 37.1751 - this.triggered = false; 37.1752 - } 37.1753 - 37.1754 - return val; 37.1755 - }, 37.1756 - 37.1757 - handle: function(event) { 37.1758 - // returned undefined or false 37.1759 - var val; 37.1760 - 37.1761 - // Empty object is for triggered events with no data 37.1762 - event = jQuery.event.fix( event || window.event || {} ); 37.1763 - 37.1764 - // Namespaced event handlers 37.1765 - var parts = event.type.split("."); 37.1766 - event.type = parts[0]; 37.1767 - 37.1768 - var c = jQuery.data(this, "events") && jQuery.data(this, "events")[event.type], args = Array.prototype.slice.call( arguments, 1 ); 37.1769 - args.unshift( event ); 37.1770 - 37.1771 - for ( var j in c ) { 37.1772 - // Pass in a reference to the handler function itself 37.1773 - // So that we can later remove it 37.1774 - args[0].handler = c[j]; 37.1775 - args[0].data = c[j].data; 37.1776 - 37.1777 - // Filter the functions by class 37.1778 - if ( !parts[1] || c[j].type == parts[1] ) { 37.1779 - var tmp = c[j].apply( this, args ); 37.1780 - 37.1781 - if ( val !== false ) 37.1782 - val = tmp; 37.1783 - 37.1784 - if ( tmp === false ) { 37.1785 - event.preventDefault(); 37.1786 - event.stopPropagation(); 37.1787 - } 37.1788 - } 37.1789 - } 37.1790 - 37.1791 - // Clean up added properties in IE to prevent memory leak 37.1792 - if (jQuery.browser.msie) 37.1793 - event.target = event.preventDefault = event.stopPropagation = 37.1794 - event.handler = event.data = null; 37.1795 - 37.1796 - return val; 37.1797 - }, 37.1798 - 37.1799 - fix: function(event) { 37.1800 - // store a copy of the original event object 37.1801 - // and clone to set read-only properties 37.1802 - var originalEvent = event; 37.1803 - event = jQuery.extend({}, originalEvent); 37.1804 - 37.1805 - // add preventDefault and stopPropagation since 37.1806 - // they will not work on the clone 37.1807 - event.preventDefault = function() { 37.1808 - // if preventDefault exists run it on the original event 37.1809 - if (originalEvent.preventDefault) 37.1810 - originalEvent.preventDefault(); 37.1811 - // otherwise set the returnValue property of the original event to false (IE) 37.1812 - originalEvent.returnValue = false; 37.1813 - }; 37.1814 - event.stopPropagation = function() { 37.1815 - // if stopPropagation exists run it on the original event 37.1816 - if (originalEvent.stopPropagation) 37.1817 - originalEvent.stopPropagation(); 37.1818 - // otherwise set the cancelBubble property of the original event to true (IE) 37.1819 - originalEvent.cancelBubble = true; 37.1820 - }; 37.1821 - 37.1822 - // Fix target property, if necessary 37.1823 - if ( !event.target && event.srcElement ) 37.1824 - event.target = event.srcElement; 37.1825 - 37.1826 - // check if target is a textnode (safari) 37.1827 - if (jQuery.browser.safari && event.target.nodeType == 3) 37.1828 - event.target = originalEvent.target.parentNode; 37.1829 - 37.1830 - // Add relatedTarget, if necessary 37.1831 - if ( !event.relatedTarget && event.fromElement ) 37.1832 - event.relatedTarget = event.fromElement == event.target ? event.toElement : event.fromElement; 37.1833 - 37.1834 - // Calculate pageX/Y if missing and clientX/Y available 37.1835 - if ( event.pageX == null && event.clientX != null ) { 37.1836 - var e = document.documentElement, b = document.body; 37.1837 - event.pageX = event.clientX + (e && e.scrollLeft || b.scrollLeft || 0); 37.1838 - event.pageY = event.clientY + (e && e.scrollTop || b.scrollTop || 0); 37.1839 - } 37.1840 - 37.1841 - // Add which for key events 37.1842 - if ( !event.which && (event.charCode || event.keyCode) ) 37.1843 - event.which = event.charCode || event.keyCode; 37.1844 - 37.1845 - // Add metaKey to non-Mac browsers (use ctrl for PC's and Meta for Macs) 37.1846 - if ( !event.metaKey && event.ctrlKey ) 37.1847 - event.metaKey = event.ctrlKey; 37.1848 - 37.1849 - // Add which for click: 1 == left; 2 == middle; 3 == right 37.1850 - // Note: button is not normalized, so don't use it 37.1851 - if ( !event.which && event.button ) 37.1852 - event.which = (event.button & 1 ? 1 : ( event.button & 2 ? 3 : ( event.button & 4 ? 2 : 0 ) )); 37.1853 - 37.1854 - return event; 37.1855 - } 37.1856 -}; 37.1857 - 37.1858 -jQuery.fn.extend({ 37.1859 - bind: function( type, data, fn ) { 37.1860 - return type == "unload" ? this.one(type, data, fn) : this.each(function(){ 37.1861 - jQuery.event.add( this, type, fn || data, fn && data ); 37.1862 - }); 37.1863 - }, 37.1864 - 37.1865 - one: function( type, data, fn ) { 37.1866 - return this.each(function(){ 37.1867 - jQuery.event.add( this, type, function(event) { 37.1868 - jQuery(this).unbind(event); 37.1869 - return (fn || data).apply( this, arguments); 37.1870 - }, fn && data); 37.1871 - }); 37.1872 - }, 37.1873 - 37.1874 - unbind: function( type, fn ) { 37.1875 - return this.each(function(){ 37.1876 - jQuery.event.remove( this, type, fn ); 37.1877 - }); 37.1878 - }, 37.1879 - 37.1880 - trigger: function( type, data, fn ) { 37.1881 - return this.each(function(){ 37.1882 - jQuery.event.trigger( type, data, this, true, fn ); 37.1883 - }); 37.1884 - }, 37.1885 - 37.1886 - triggerHandler: function( type, data, fn ) { 37.1887 - if ( this[0] ) 37.1888 - return jQuery.event.trigger( type, data, this[0], false, fn ); 37.1889 - }, 37.1890 - 37.1891 - toggle: function() { 37.1892 - // Save reference to arguments for access in closure 37.1893 - var a = arguments; 37.1894 - 37.1895 - return this.click(function(e) { 37.1896 - // Figure out which function to execute 37.1897 - this.lastToggle = 0 == this.lastToggle ? 1 : 0; 37.1898 - 37.1899 - // Make sure that clicks stop 37.1900 - e.preventDefault(); 37.1901 - 37.1902 - // and execute the function 37.1903 - return a[this.lastToggle].apply( this, [e] ) || false; 37.1904 - }); 37.1905 - }, 37.1906 - 37.1907 - hover: function(f,g) { 37.1908 - 37.1909 - // A private function for handling mouse 'hovering' 37.1910 - function handleHover(e) { 37.1911 - // Check if mouse(over|out) are still within the same parent element 37.1912 - var p = e.relatedTarget; 37.1913 - 37.1914 - // Traverse up the tree 37.1915 - while ( p && p != this ) try { p = p.parentNode; } catch(e) { p = this; }; 37.1916 - 37.1917 - // If we actually just moused on to a sub-element, ignore it 37.1918 - if ( p == this ) return false; 37.1919 - 37.1920 - // Execute the right function 37.1921 - return (e.type == "mouseover" ? f : g).apply(this, [e]); 37.1922 - } 37.1923 - 37.1924 - // Bind the function to the two event listeners 37.1925 - return this.mouseover(handleHover).mouseout(handleHover); 37.1926 - }, 37.1927 - 37.1928 - ready: function(f) { 37.1929 - // Attach the listeners 37.1930 - bindReady(); 37.1931 - 37.1932 - // If the DOM is already ready 37.1933 - if ( jQuery.isReady ) 37.1934 - // Execute the function immediately 37.1935 - f.apply( document, [jQuery] ); 37.1936 - 37.1937 - // Otherwise, remember the function for later 37.1938 - else 37.1939 - // Add the function to the wait list 37.1940 - jQuery.readyList.push( function() { return f.apply(this, [jQuery]); } ); 37.1941 - 37.1942 - return this; 37.1943 - } 37.1944 -}); 37.1945 - 37.1946 -jQuery.extend({ 37.1947 - /* 37.1948 - * All the code that makes DOM Ready work nicely. 37.1949 - */ 37.1950 - isReady: false, 37.1951 - readyList: [], 37.1952 - 37.1953 - // Handle when the DOM is ready 37.1954 - ready: function() { 37.1955 - // Make sure that the DOM is not already loaded 37.1956 - if ( !jQuery.isReady ) { 37.1957 - // Remember that the DOM is ready 37.1958 - jQuery.isReady = true; 37.1959 - 37.1960 - // If there are functions bound, to execute 37.1961 - if ( jQuery.readyList ) { 37.1962 - // Execute all of them 37.1963 - jQuery.each( jQuery.readyList, function(){ 37.1964 - this.apply( document ); 37.1965 - }); 37.1966 - 37.1967 - // Reset the list of functions 37.1968 - jQuery.readyList = null; 37.1969 - } 37.1970 - // Remove event listener to avoid memory leak 37.1971 - if ( jQuery.browser.mozilla || jQuery.browser.opera ) 37.1972 - document.removeEventListener( "DOMContentLoaded", jQuery.ready, false ); 37.1973 - 37.1974 - // Remove script element used by IE hack 37.1975 - if( !window.frames.length ) // don't remove if frames are present (#1187) 37.1976 - jQuery(window).load(function(){ jQuery("#__ie_init").remove(); }); 37.1977 - } 37.1978 - } 37.1979 -}); 37.1980 - 37.1981 -jQuery.each( ("blur,focus,load,resize,scroll,unload,click,dblclick," + 37.1982 - "mousedown,mouseup,mousemove,mouseover,mouseout,change,select," + 37.1983 - "submit,keydown,keypress,keyup,error").split(","), function(i,o){ 37.1984 - 37.1985 - // Handle event binding 37.1986 - jQuery.fn[o] = function(f){ 37.1987 - return f ? this.bind(o, f) : this.trigger(o); 37.1988 - }; 37.1989 -}); 37.1990 - 37.1991 -var readyBound = false; 37.1992 - 37.1993 -function bindReady(){ 37.1994 - if ( readyBound ) return; 37.1995 - readyBound = true; 37.1996 - 37.1997 - // If Mozilla is used 37.1998 - if ( jQuery.browser.mozilla || jQuery.browser.opera ) 37.1999 - // Use the handy event callback 37.2000 - document.addEventListener( "DOMContentLoaded", jQuery.ready, false ); 37.2001 - 37.2002 - // If IE is used, use the excellent hack by Matthias Miller 37.2003 - // http://www.outofhanwell.com/blog/index.php?title=the_window_onload_problem_revisited 37.2004 - else if ( jQuery.browser.msie ) { 37.2005 - 37.2006 - // Only works if you document.write() it 37.2007 - document.write("<scr" + "ipt id=__ie_init defer=true " + 37.2008 - "src=//:><\/script>"); 37.2009 - 37.2010 - // Use the defer script hack 37.2011 - var script = document.getElementById("__ie_init"); 37.2012 - 37.2013 - // script does not exist if jQuery is loaded dynamically 37.2014 - if ( script ) 37.2015 - script.onreadystatechange = function() { 37.2016 - if ( this.readyState != "complete" ) return; 37.2017 - jQuery.ready(); 37.2018 - }; 37.2019 - 37.2020 - // Clear from memory 37.2021 - script = null; 37.2022 - 37.2023 - // If Safari is used 37.2024 - } else if ( jQuery.browser.safari ) 37.2025 - // Continually check to see if the document.readyState is valid 37.2026 - jQuery.safariTimer = setInterval(function(){ 37.2027 - // loaded and complete are both valid states 37.2028 - if ( document.readyState == "loaded" || 37.2029 - document.readyState == "complete" ) { 37.2030 - 37.2031 - // If either one are found, remove the timer 37.2032 - clearInterval( jQuery.safariTimer ); 37.2033 - jQuery.safariTimer = null; 37.2034 - 37.2035 - // and execute any waiting functions 37.2036 - jQuery.ready(); 37.2037 - } 37.2038 - }, 10); 37.2039 - 37.2040 - // A fallback to window.onload, that will always work 37.2041 - jQuery.event.add( window, "load", jQuery.ready ); 37.2042 -} 37.2043 -jQuery.fn.extend({ 37.2044 - load: function( url, params, callback ) { 37.2045 - if ( jQuery.isFunction( url ) ) 37.2046 - return this.bind("load", url); 37.2047 - 37.2048 - var off = url.indexOf(" "); 37.2049 - if ( off >= 0 ) { 37.2050 - var selector = url.slice(off, url.length); 37.2051 - url = url.slice(0, off); 37.2052 - } 37.2053 - 37.2054 - callback = callback || function(){}; 37.2055 - 37.2056 - // Default to a GET request 37.2057 - var type = "GET"; 37.2058 - 37.2059 - // If the second parameter was provided 37.2060 - if ( params ) 37.2061 - // If it's a function 37.2062 - if ( jQuery.isFunction( params ) ) { 37.2063 - // We assume that it's the callback 37.2064 - callback = params; 37.2065 - params = null; 37.2066 - 37.2067 - // Otherwise, build a param string 37.2068 - } else { 37.2069 - params = jQuery.param( params ); 37.2070 - type = "POST"; 37.2071 - } 37.2072 - 37.2073 - var self = this; 37.2074 - 37.2075 - // Request the remote document 37.2076 - jQuery.ajax({ 37.2077 - url: url, 37.2078 - type: type, 37.2079 - data: params, 37.2080 - complete: function(res, status){ 37.2081 - // If successful, inject the HTML into all the matched elements 37.2082 - if ( status == "success" || status == "notmodified" ) 37.2083 - // See if a selector was specified 37.2084 - self.html( selector ? 37.2085 - // Create a dummy div to hold the results 37.2086 - jQuery("<div/>") 37.2087 - // inject the contents of the document in, removing the scripts 37.2088 - // to avoid any 'Permission Denied' errors in IE 37.2089 - .append(res.responseText.replace(/<script(.|\s)*?\/script>/g, "")) 37.2090 - 37.2091 - // Locate the specified elements 37.2092 - .find(selector) : 37.2093 - 37.2094 - // If not, just inject the full result 37.2095 - res.responseText ); 37.2096 - 37.2097 - // Add delay to account for Safari's delay in globalEval 37.2098 - setTimeout(function(){ 37.2099 - self.each( callback, [res.responseText, status, res] ); 37.2100 - }, 13); 37.2101 - } 37.2102 - }); 37.2103 - return this; 37.2104 - }, 37.2105 - 37.2106 - serialize: function() { 37.2107 - return jQuery.param(this.serializeArray()); 37.2108 - }, 37.2109 - serializeArray: function() { 37.2110 - return this.map(function(){ 37.2111 - return jQuery.nodeName(this, "form") ? 37.2112 - jQuery.makeArray(this.elements) : this; 37.2113 - }) 37.2114 - .filter(function(){ 37.2115 - return this.name && !this.disabled && 37.2116 - (this.checked || /select|textarea/i.test(this.nodeName) || 37.2117 - /text|hidden|password/i.test(this.type)); 37.2118 - }) 37.2119 - .map(function(i, elem){ 37.2120 - var val = jQuery(this).val(); 37.2121 - return val == null ? null : 37.2122 - val.constructor == Array ? 37.2123 - jQuery.map( val, function(val, i){ 37.2124 - return {name: elem.name, value: val}; 37.2125 - }) : 37.2126 - {name: elem.name, value: val}; 37.2127 - }).get(); 37.2128 - } 37.2129 -}); 37.2130 - 37.2131 -// Attach a bunch of functions for handling common AJAX events 37.2132 -jQuery.each( "ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","), function(i,o){ 37.2133 - jQuery.fn[o] = function(f){ 37.2134 - return this.bind(o, f); 37.2135 - }; 37.2136 -}); 37.2137 - 37.2138 -var jsc = (new Date).getTime(); 37.2139 - 37.2140 -jQuery.extend({ 37.2141 - get: function( url, data, callback, type ) { 37.2142 - // shift arguments if data argument was ommited 37.2143 - if ( jQuery.isFunction( data ) ) { 37.2144 - callback = data; 37.2145 - data = null; 37.2146 - } 37.2147 - 37.2148 - return jQuery.ajax({ 37.2149 - type: "GET", 37.2150 - url: url, 37.2151 - data: data, 37.2152 - success: callback, 37.2153 - dataType: type 37.2154 - }); 37.2155 - }, 37.2156 - 37.2157 - getScript: function( url, callback ) { 37.2158 - return jQuery.get(url, null, callback, "script"); 37.2159 - }, 37.2160 - 37.2161 - getJSON: function( url, data, callback ) { 37.2162 - return jQuery.get(url, data, callback, "json"); 37.2163 - }, 37.2164 - 37.2165 - post: function( url, data, callback, type ) { 37.2166 - if ( jQuery.isFunction( data ) ) { 37.2167 - callback = data; 37.2168 - data = {}; 37.2169 - } 37.2170 - 37.2171 - return jQuery.ajax({ 37.2172 - type: "POST", 37.2173 - url: url, 37.2174 - data: data, 37.2175 - success: callback, 37.2176 - dataType: type 37.2177 - }); 37.2178 - }, 37.2179 - 37.2180 - ajaxSetup: function( settings ) { 37.2181 - jQuery.extend( jQuery.ajaxSettings, settings ); 37.2182 - }, 37.2183 - 37.2184 - ajaxSettings: { 37.2185 - global: true, 37.2186 - type: "GET", 37.2187 - timeout: 0, 37.2188 - contentType: "application/x-www-form-urlencoded", 37.2189 - processData: true, 37.2190 - async: true, 37.2191 - data: null 37.2192 - }, 37.2193 - 37.2194 - // Last-Modified header cache for next request 37.2195 - lastModified: {}, 37.2196 - 37.2197 - ajax: function( s ) { 37.2198 - var jsonp, jsre = /=(\?|%3F)/g, status, data; 37.2199 - 37.2200 - // Extend the settings, but re-extend 's' so that it can be 37.2201 - // checked again later (in the test suite, specifically) 37.2202 - s = jQuery.extend(true, s, jQuery.extend(true, {}, jQuery.ajaxSettings, s)); 37.2203 - 37.2204 - // convert data if not already a string 37.2205 - if ( s.data && s.processData && typeof s.data != "string" ) 37.2206 - s.data = jQuery.param(s.data); 37.2207 - 37.2208 - // Handle JSONP Parameter Callbacks 37.2209 - if ( s.dataType == "jsonp" ) { 37.2210 - if ( s.type.toLowerCase() == "get" ) { 37.2211 - if ( !s.url.match(jsre) ) 37.2212 - s.url += (s.url.match(/\?/) ? "&" : "?") + (s.jsonp || "callback") + "=?"; 37.2213 - } else if ( !s.data || !s.data.match(jsre) ) 37.2214 - s.data = (s.data ? s.data + "&" : "") + (s.jsonp || "callback") + "=?"; 37.2215 - s.dataType = "json"; 37.2216 - } 37.2217 - 37.2218 - // Build temporary JSONP function 37.2219 - if ( s.dataType == "json" && (s.data && s.data.match(jsre) || s.url.match(jsre)) ) { 37.2220 - jsonp = "jsonp" + jsc++; 37.2221 - 37.2222 - // Replace the =? sequence both in the query string and the data 37.2223 - if ( s.data ) 37.2224 - s.data = s.data.replace(jsre, "=" + jsonp); 37.2225 - s.url = s.url.replace(jsre, "=" + jsonp); 37.2226 - 37.2227 - // We need to make sure 37.2228 - // that a JSONP style response is executed properly 37.2229 - s.dataType = "script"; 37.2230 - 37.2231 - // Handle JSONP-style loading 37.2232 - window[ jsonp ] = function(tmp){ 37.2233 - data = tmp; 37.2234 - success(); 37.2235 - complete(); 37.2236 - // Garbage collect 37.2237 - window[ jsonp ] = undefined; 37.2238 - try{ delete window[ jsonp ]; } catch(e){} 37.2239 - }; 37.2240 - } 37.2241 - 37.2242 - if ( s.dataType == "script" && s.cache == null ) 37.2243 - s.cache = false; 37.2244 - 37.2245 - if ( s.cache === false && s.type.toLowerCase() == "get" ) 37.2246 - s.url += (s.url.match(/\?/) ? "&" : "?") + "_=" + (new Date()).getTime(); 37.2247 - 37.2248 - // If data is available, append data to url for get requests 37.2249 - if ( s.data && s.type.toLowerCase() == "get" ) { 37.2250 - s.url += (s.url.match(/\?/) ? "&" : "?") + s.data; 37.2251 - 37.2252 - // IE likes to send both get and post data, prevent this 37.2253 - s.data = null; 37.2254 - } 37.2255 - 37.2256 - // Watch for a new set of requests 37.2257 - if ( s.global && ! jQuery.active++ ) 37.2258 - jQuery.event.trigger( "ajaxStart" ); 37.2259 - 37.2260 - // If we're requesting a remote document 37.2261 - // and trying to load JSON or Script 37.2262 - if ( !s.url.indexOf("http") && s.dataType == "script" ) { 37.2263 - var head = document.getElementsByTagName("head")[0]; 37.2264 - var script = document.createElement("script"); 37.2265 - script.src = s.url; 37.2266 - 37.2267 - // Handle Script loading 37.2268 - if ( !jsonp && (s.success || s.complete) ) { 37.2269 - var done = false; 37.2270 - 37.2271 - // Attach handlers for all browsers 37.2272 - script.onload = script.onreadystatechange = function(){ 37.2273 - if ( !done && (!this.readyState || 37.2274 - this.readyState == "loaded" || this.readyState == "complete") ) { 37.2275 - done = true; 37.2276 - success(); 37.2277 - complete(); 37.2278 - head.removeChild( script ); 37.2279 - } 37.2280 - }; 37.2281 - } 37.2282 - 37.2283 - head.appendChild(script); 37.2284 - 37.2285 - // We handle everything using the script element injection 37.2286 - return; 37.2287 - } 37.2288 - 37.2289 - var requestDone = false; 37.2290 - 37.2291 - // Create the request object; Microsoft failed to properly 37.2292 - // implement the XMLHttpRequest in IE7, so we use the ActiveXObject when it is available 37.2293 - var xml = window.ActiveXObject ? new ActiveXObject("Microsoft.XMLHTTP") : new XMLHttpRequest(); 37.2294 - 37.2295 - // Open the socket 37.2296 - xml.open(s.type, s.url, s.async); 37.2297 - 37.2298 - // Set the correct header, if data is being sent 37.2299 - if ( s.data ) 37.2300 - xml.setRequestHeader("Content-Type", s.contentType); 37.2301 - 37.2302 - // Set the If-Modified-Since header, if ifModified mode. 37.2303 - if ( s.ifModified ) 37.2304 - xml.setRequestHeader("If-Modified-Since", 37.2305 - jQuery.lastModified[s.url] || "Thu, 01 Jan 1970 00:00:00 GMT" ); 37.2306 - 37.2307 - // Set header so the called script knows that it's an XMLHttpRequest 37.2308 - xml.setRequestHeader("X-Requested-With", "XMLHttpRequest"); 37.2309 - 37.2310 - // Allow custom headers/mimetypes 37.2311 - if ( s.beforeSend ) 37.2312 - s.beforeSend(xml); 37.2313 - 37.2314 - if ( s.global ) 37.2315 - jQuery.event.trigger("ajaxSend", [xml, s]); 37.2316 - 37.2317 - // Wait for a response to come back 37.2318 - var onreadystatechange = function(isTimeout){ 37.2319 - // The transfer is complete and the data is available, or the request timed out 37.2320 - if ( !requestDone && xml && (xml.readyState == 4 || isTimeout == "timeout") ) { 37.2321 - requestDone = true; 37.2322 - 37.2323 - // clear poll interval 37.2324 - if (ival) { 37.2325 - clearInterval(ival); 37.2326 - ival = null; 37.2327 - } 37.2328 - 37.2329 - status = isTimeout == "timeout" && "timeout" || 37.2330 - !jQuery.httpSuccess( xml ) && "error" || 37.2331 - s.ifModified && jQuery.httpNotModified( xml, s.url ) && "notmodified" || 37.2332 - "success"; 37.2333 - 37.2334 - if ( status == "success" ) { 37.2335 - // Watch for, and catch, XML document parse errors 37.2336 - try { 37.2337 - // process the data (runs the xml through httpData regardless of callback) 37.2338 - data = jQuery.httpData( xml, s.dataType ); 37.2339 - } catch(e) { 37.2340 - status = "parsererror"; 37.2341 - } 37.2342 - } 37.2343 - 37.2344 - // Make sure that the request was successful or notmodified 37.2345 - if ( status == "success" ) { 37.2346 - // Cache Last-Modified header, if ifModified mode. 37.2347 - var modRes; 37.2348 - try { 37.2349 - modRes = xml.getResponseHeader("Last-Modified"); 37.2350 - } catch(e) {} // swallow exception thrown by FF if header is not available 37.2351 - 37.2352 - if ( s.ifModified && modRes ) 37.2353 - jQuery.lastModified[s.url] = modRes; 37.2354 - 37.2355 - // JSONP handles its own success callback 37.2356 - if ( !jsonp ) 37.2357 - success(); 37.2358 - } else 37.2359 - jQuery.handleError(s, xml, status); 37.2360 - 37.2361 - // Fire the complete handlers 37.2362 - complete(); 37.2363 - 37.2364 - // Stop memory leaks 37.2365 - if ( s.async ) 37.2366 - xml = null; 37.2367 - } 37.2368 - }; 37.2369 - 37.2370 - if ( s.async ) { 37.2371 - // don't attach the handler to the request, just poll it instead 37.2372 - var ival = setInterval(onreadystatechange, 13); 37.2373 - 37.2374 - // Timeout checker 37.2375 - if ( s.timeout > 0 ) 37.2376 - setTimeout(function(){ 37.2377 - // Check to see if the request is still happening 37.2378 - if ( xml ) { 37.2379 - // Cancel the request 37.2380 - xml.abort(); 37.2381 - 37.2382 - if( !requestDone ) 37.2383 - onreadystatechange( "timeout" ); 37.2384 - } 37.2385 - }, s.timeout); 37.2386 - } 37.2387 - 37.2388 - // Send the data 37.2389 - try { 37.2390 - xml.send(s.data); 37.2391 - } catch(e) { 37.2392 - jQuery.handleError(s, xml, null, e); 37.2393 - } 37.2394 - 37.2395 - // firefox 1.5 doesn't fire statechange for sync requests 37.2396 - if ( !s.async ) 37.2397 - onreadystatechange(); 37.2398 - 37.2399 - // return XMLHttpRequest to allow aborting the request etc. 37.2400 - return xml; 37.2401 - 37.2402 - function success(){ 37.2403 - // If a local callback was specified, fire it and pass it the data 37.2404 - if ( s.success ) 37.2405 - s.success( data, status ); 37.2406 - 37.2407 - // Fire the global callback 37.2408 - if ( s.global ) 37.2409 - jQuery.event.trigger( "ajaxSuccess", [xml, s] ); 37.2410 - } 37.2411 - 37.2412 - function complete(){ 37.2413 - // Process result 37.2414 - if ( s.complete ) 37.2415 - s.complete(xml, status); 37.2416 - 37.2417 - // The request was completed 37.2418 - if ( s.global ) 37.2419 - jQuery.event.trigger( "ajaxComplete", [xml, s] ); 37.2420 - 37.2421 - // Handle the global AJAX counter 37.2422 - if ( s.global && ! --jQuery.active ) 37.2423 - jQuery.event.trigger( "ajaxStop" ); 37.2424 - } 37.2425 - }, 37.2426 - 37.2427 - handleError: function( s, xml, status, e ) { 37.2428 - // If a local callback was specified, fire it 37.2429 - if ( s.error ) s.error( xml, status, e ); 37.2430 - 37.2431 - // Fire the global callback 37.2432 - if ( s.global ) 37.2433 - jQuery.event.trigger( "ajaxError", [xml, s, e] ); 37.2434 - }, 37.2435 - 37.2436 - // Counter for holding the number of active queries 37.2437 - active: 0, 37.2438 - 37.2439 - // Determines if an XMLHttpRequest was successful or not 37.2440 - httpSuccess: function( r ) { 37.2441 - try { 37.2442 - return !r.status && location.protocol == "file:" || 37.2443 - ( r.status >= 200 && r.status < 300 ) || r.status == 304 || 37.2444 - jQuery.browser.safari && r.status == undefined; 37.2445 - } catch(e){} 37.2446 - return false; 37.2447 - }, 37.2448 - 37.2449 - // Determines if an XMLHttpRequest returns NotModified 37.2450 - httpNotModified: function( xml, url ) { 37.2451 - try { 37.2452 - var xmlRes = xml.getResponseHeader("Last-Modified"); 37.2453 - 37.2454 - // Firefox always returns 200. check Last-Modified date 37.2455 - return xml.status == 304 || xmlRes == jQuery.lastModified[url] || 37.2456 - jQuery.browser.safari && xml.status == undefined; 37.2457 - } catch(e){} 37.2458 - return false; 37.2459 - }, 37.2460 - 37.2461 - httpData: function( r, type ) { 37.2462 - var ct = r.getResponseHeader("content-type"); 37.2463 - var xml = type == "xml" || !type && ct && ct.indexOf("xml") >= 0; 37.2464 - var data = xml ? r.responseXML : r.responseText; 37.2465 - 37.2466 - if ( xml && data.documentElement.tagName == "parsererror" ) 37.2467 - throw "parsererror"; 37.2468 - 37.2469 - // If the type is "script", eval it in global context 37.2470 - if ( type == "script" ) 37.2471 - jQuery.globalEval( data ); 37.2472 - 37.2473 - // Get the JavaScript object, if JSON is used. 37.2474 - if ( type == "json" ) 37.2475 - data = eval("(" + data + ")"); 37.2476 - 37.2477 - return data; 37.2478 - }, 37.2479 - 37.2480 - // Serialize an array of form elements or a set of 37.2481 - // key/values into a query string 37.2482 - param: function( a ) { 37.2483 - var s = []; 37.2484 - 37.2485 - // If an array was passed in, assume that it is an array 37.2486 - // of form elements 37.2487 - if ( a.constructor == Array || a.jquery ) 37.2488 - // Serialize the form elements 37.2489 - jQuery.each( a, function(){ 37.2490 - s.push( encodeURIComponent(this.name) + "=" + encodeURIComponent( this.value ) ); 37.2491 - }); 37.2492 - 37.2493 - // Otherwise, assume that it's an object of key/value pairs 37.2494 - else 37.2495 - // Serialize the key/values 37.2496 - for ( var j in a ) 37.2497 - // If the value is an array then the key names need to be repeated 37.2498 - if ( a[j] && a[j].constructor == Array ) 37.2499 - jQuery.each( a[j], function(){ 37.2500 - s.push( encodeURIComponent(j) + "=" + encodeURIComponent( this ) ); 37.2501 - }); 37.2502 - else 37.2503 - s.push( encodeURIComponent(j) + "=" + encodeURIComponent( a[j] ) ); 37.2504 - 37.2505 - // Return the resulting serialization 37.2506 - return s.join("&").replace(/%20/g, "+"); 37.2507 - } 37.2508 - 37.2509 -}); 37.2510 -jQuery.fn.extend({ 37.2511 - show: function(speed,callback){ 37.2512 - return speed ? 37.2513 - this.animate({ 37.2514 - height: "show", width: "show", opacity: "show" 37.2515 - }, speed, callback) : 37.2516 - 37.2517 - this.filter(":hidden").each(function(){ 37.2518 - this.style.display = this.oldblock ? this.oldblock : ""; 37.2519 - if ( jQuery.css(this,"display") == "none" ) 37.2520 - this.style.display = "block"; 37.2521 - }).end(); 37.2522 - }, 37.2523 - 37.2524 - hide: function(speed,callback){ 37.2525 - return speed ? 37.2526 - this.animate({ 37.2527 - height: "hide", width: "hide", opacity: "hide" 37.2528 - }, speed, callback) : 37.2529 - 37.2530 - this.filter(":visible").each(function(){ 37.2531 - this.oldblock = this.oldblock || jQuery.css(this,"display"); 37.2532 - if ( this.oldblock == "none" ) 37.2533 - this.oldblock = "block"; 37.2534 - this.style.display = "none"; 37.2535 - }).end(); 37.2536 - }, 37.2537 - 37.2538 - // Save the old toggle function 37.2539 - _toggle: jQuery.fn.toggle, 37.2540 - 37.2541 - toggle: function( fn, fn2 ){ 37.2542 - return jQuery.isFunction(fn) && jQuery.isFunction(fn2) ? 37.2543 - this._toggle( fn, fn2 ) : 37.2544 - fn ? 37.2545 - this.animate({ 37.2546 - height: "toggle", width: "toggle", opacity: "toggle" 37.2547 - }, fn, fn2) : 37.2548 - this.each(function(){ 37.2549 - jQuery(this)[ jQuery(this).is(":hidden") ? "show" : "hide" ](); 37.2550 - }); 37.2551 - }, 37.2552 - 37.2553 - slideDown: function(speed,callback){ 37.2554 - return this.animate({height: "show"}, speed, callback); 37.2555 - }, 37.2556 - 37.2557 - slideUp: function(speed,callback){ 37.2558 - return this.animate({height: "hide"}, speed, callback); 37.2559 - }, 37.2560 - 37.2561 - slideToggle: function(speed, callback){ 37.2562 - return this.animate({height: "toggle"}, speed, callback); 37.2563 - }, 37.2564 - 37.2565 - fadeIn: function(speed, callback){ 37.2566 - return this.animate({opacity: "show"}, speed, callback); 37.2567 - }, 37.2568 - 37.2569 - fadeOut: function(speed, callback){ 37.2570 - return this.animate({opacity: "hide"}, speed, callback); 37.2571 - }, 37.2572 - 37.2573 - fadeTo: function(speed,to,callback){ 37.2574 - return this.animate({opacity: to}, speed, callback); 37.2575 - }, 37.2576 - 37.2577 - animate: function( prop, speed, easing, callback ) { 37.2578 - var opt = jQuery.speed(speed, easing, callback); 37.2579 - 37.2580 - return this[ opt.queue === false ? "each" : "queue" ](function(){ 37.2581 - opt = jQuery.extend({}, opt); 37.2582 - var hidden = jQuery(this).is(":hidden"), self = this; 37.2583 - 37.2584 - for ( var p in prop ) { 37.2585 - if ( prop[p] == "hide" && hidden || prop[p] == "show" && !hidden ) 37.2586 - return jQuery.isFunction(opt.complete) && opt.complete.apply(this); 37.2587 - 37.2588 - if ( p == "height" || p == "width" ) { 37.2589 - // Store display property 37.2590 - opt.display = jQuery.css(this, "display"); 37.2591 - 37.2592 - // Make sure that nothing sneaks out 37.2593 - opt.overflow = this.style.overflow; 37.2594 - } 37.2595 - } 37.2596 - 37.2597 - if ( opt.overflow != null ) 37.2598 - this.style.overflow = "hidden"; 37.2599 - 37.2600 - opt.curAnim = jQuery.extend({}, prop); 37.2601 - 37.2602 - jQuery.each( prop, function(name, val){ 37.2603 - var e = new jQuery.fx( self, opt, name ); 37.2604 - 37.2605 - if ( /toggle|show|hide/.test(val) ) 37.2606 - e[ val == "toggle" ? hidden ? "show" : "hide" : val ]( prop ); 37.2607 - else { 37.2608 - var parts = val.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/), 37.2609 - start = e.cur(true) || 0; 37.2610 - 37.2611 - if ( parts ) { 37.2612 - var end = parseFloat(parts[2]), 37.2613 - unit = parts[3] || "px"; 37.2614 - 37.2615 - // We need to compute starting value 37.2616 - if ( unit != "px" ) { 37.2617 - self.style[ name ] = (end || 1) + unit; 37.2618 - start = ((end || 1) / e.cur(true)) * start; 37.2619 - self.style[ name ] = start + unit; 37.2620 - } 37.2621 - 37.2622 - // If a +=/-= token was provided, we're doing a relative animation 37.2623 - if ( parts[1] ) 37.2624 - end = ((parts[1] == "-=" ? -1 : 1) * end) + start; 37.2625 - 37.2626 - e.custom( start, end, unit ); 37.2627 - } else 37.2628 - e.custom( start, val, "" ); 37.2629 - } 37.2630 - }); 37.2631 - 37.2632 - // For JS strict compliance 37.2633 - return true; 37.2634 - }); 37.2635 - }, 37.2636 - 37.2637 - queue: function(type, fn){ 37.2638 - if ( jQuery.isFunction(type) ) { 37.2639 - fn = type; 37.2640 - type = "fx"; 37.2641 - } 37.2642 - 37.2643 - if ( !type || (typeof type == "string" && !fn) ) 37.2644 - return queue( this[0], type ); 37.2645 - 37.2646 - return this.each(function(){ 37.2647 - if ( fn.constructor == Array ) 37.2648 - queue(this, type, fn); 37.2649 - else { 37.2650 - queue(this, type).push( fn ); 37.2651 - 37.2652 - if ( queue(this, type).length == 1 ) 37.2653 - fn.apply(this); 37.2654 - } 37.2655 - }); 37.2656 - }, 37.2657 - 37.2658 - stop: function(){ 37.2659 - var timers = jQuery.timers; 37.2660 - 37.2661 - return this.each(function(){ 37.2662 - for ( var i = 0; i < timers.length; i++ ) 37.2663 - if ( timers[i].elem == this ) 37.2664 - timers.splice(i--, 1); 37.2665 - }).dequeue(); 37.2666 - } 37.2667 - 37.2668 -}); 37.2669 - 37.2670 -var queue = function( elem, type, array ) { 37.2671 - if ( !elem ) 37.2672 - return; 37.2673 - 37.2674 - var q = jQuery.data( elem, type + "queue" ); 37.2675 - 37.2676 - if ( !q || array ) 37.2677 - q = jQuery.data( elem, type + "queue", 37.2678 - array ? jQuery.makeArray(array) : [] ); 37.2679 - 37.2680 - return q; 37.2681 -}; 37.2682 - 37.2683 -jQuery.fn.dequeue = function(type){ 37.2684 - type = type || "fx"; 37.2685 - 37.2686 - return this.each(function(){ 37.2687 - var q = queue(this, type); 37.2688 - 37.2689 - q.shift(); 37.2690 - 37.2691 - if ( q.length ) 37.2692 - q[0].apply( this ); 37.2693 - }); 37.2694 -}; 37.2695 - 37.2696 -jQuery.extend({ 37.2697 - 37.2698 - speed: function(speed, easing, fn) { 37.2699 - var opt = speed && speed.constructor == Object ? speed : { 37.2700 - complete: fn || !fn && easing || 37.2701 - jQuery.isFunction( speed ) && speed, 37.2702 - duration: speed, 37.2703 - easing: fn && easing || easing && easing.constructor != Function && easing 37.2704 - }; 37.2705 - 37.2706 - opt.duration = (opt.duration && opt.duration.constructor == Number ? 37.2707 - opt.duration : 37.2708 - { slow: 600, fast: 200 }[opt.duration]) || 400; 37.2709 - 37.2710 - // Queueing 37.2711 - opt.old = opt.complete; 37.2712 - opt.complete = function(){ 37.2713 - jQuery(this).dequeue(); 37.2714 - if ( jQuery.isFunction( opt.old ) ) 37.2715 - opt.old.apply( this ); 37.2716 - }; 37.2717 - 37.2718 - return opt; 37.2719 - }, 37.2720 - 37.2721 - easing: { 37.2722 - linear: function( p, n, firstNum, diff ) { 37.2723 - return firstNum + diff * p; 37.2724 - }, 37.2725 - swing: function( p, n, firstNum, diff ) { 37.2726 - return ((-Math.cos(p*Math.PI)/2) + 0.5) * diff + firstNum; 37.2727 - } 37.2728 - }, 37.2729 - 37.2730 - timers: [], 37.2731 - 37.2732 - fx: function( elem, options, prop ){ 37.2733 - this.options = options; 37.2734 - this.elem = elem; 37.2735 - this.prop = prop; 37.2736 - 37.2737 - if ( !options.orig ) 37.2738 - options.orig = {}; 37.2739 - } 37.2740 - 37.2741 -}); 37.2742 - 37.2743 -jQuery.fx.prototype = { 37.2744 - 37.2745 - // Simple function for setting a style value 37.2746 - update: function(){ 37.2747 - if ( this.options.step ) 37.2748 - this.options.step.apply( this.elem, [ this.now, this ] ); 37.2749 - 37.2750 - (jQuery.fx.step[this.prop] || jQuery.fx.step._default)( this ); 37.2751 - 37.2752 - // Set display property to block for height/width animations 37.2753 - if ( this.prop == "height" || this.prop == "width" ) 37.2754 - this.elem.style.display = "block"; 37.2755 - }, 37.2756 - 37.2757 - // Get the current size 37.2758 - cur: function(force){ 37.2759 - if ( this.elem[this.prop] != null && this.elem.style[this.prop] == null ) 37.2760 - return this.elem[ this.prop ]; 37.2761 - 37.2762 - var r = parseFloat(jQuery.curCSS(this.elem, this.prop, force)); 37.2763 - return r && r > -10000 ? r : parseFloat(jQuery.css(this.elem, this.prop)) || 0; 37.2764 - }, 37.2765 - 37.2766 - // Start an animation from one number to another 37.2767 - custom: function(from, to, unit){ 37.2768 - this.startTime = (new Date()).getTime(); 37.2769 - this.start = from; 37.2770 - this.end = to; 37.2771 - this.unit = unit || this.unit || "px"; 37.2772 - this.now = this.start; 37.2773 - this.pos = this.state = 0; 37.2774 - this.update(); 37.2775 - 37.2776 - var self = this; 37.2777 - function t(){ 37.2778 - return self.step(); 37.2779 - } 37.2780 - 37.2781 - t.elem = this.elem; 37.2782 - 37.2783 - jQuery.timers.push(t); 37.2784 - 37.2785 - if ( jQuery.timers.length == 1 ) { 37.2786 - var timer = setInterval(function(){ 37.2787 - var timers = jQuery.timers; 37.2788 - 37.2789 - for ( var i = 0; i < timers.length; i++ ) 37.2790 - if ( !timers[i]() ) 37.2791 - timers.splice(i--, 1); 37.2792 - 37.2793 - if ( !timers.length ) 37.2794 - clearInterval( timer ); 37.2795 - }, 13); 37.2796 - } 37.2797 - }, 37.2798 - 37.2799 - // Simple 'show' function 37.2800 - show: function(){ 37.2801 - // Remember where we started, so that we can go back to it later 37.2802 - this.options.orig[this.prop] = jQuery.attr( this.elem.style, this.prop ); 37.2803 - this.options.show = true; 37.2804 - 37.2805 - // Begin the animation 37.2806 - this.custom(0, this.cur()); 37.2807 - 37.2808 - // Make sure that we start at a small width/height to avoid any 37.2809 - // flash of content 37.2810 - if ( this.prop == "width" || this.prop == "height" ) 37.2811 - this.elem.style[this.prop] = "1px"; 37.2812 - 37.2813 - // Start by showing the element 37.2814 - jQuery(this.elem).show(); 37.2815 - }, 37.2816 - 37.2817 - // Simple 'hide' function 37.2818 - hide: function(){ 37.2819 - // Remember where we started, so that we can go back to it later 37.2820 - this.options.orig[this.prop] = jQuery.attr( this.elem.style, this.prop ); 37.2821 - this.options.hide = true; 37.2822 - 37.2823 - // Begin the animation 37.2824 - this.custom(this.cur(), 0); 37.2825 - }, 37.2826 - 37.2827 - // Each step of an animation 37.2828 - step: function(){ 37.2829 - var t = (new Date()).getTime(); 37.2830 - 37.2831 - if ( t > this.options.duration + this.startTime ) { 37.2832 - this.now = this.end; 37.2833 - this.pos = this.state = 1; 37.2834 - this.update(); 37.2835 - 37.2836 - this.options.curAnim[ this.prop ] = true; 37.2837 - 37.2838 - var done = true; 37.2839 - for ( var i in this.options.curAnim ) 37.2840 - if ( this.options.curAnim[i] !== true ) 37.2841 - done = false; 37.2842 - 37.2843 - if ( done ) { 37.2844 - if ( this.options.display != null ) { 37.2845 - // Reset the overflow 37.2846 - this.elem.style.overflow = this.options.overflow; 37.2847 - 37.2848 - // Reset the display 37.2849 - this.elem.style.display = this.options.display; 37.2850 - if ( jQuery.css(this.elem, "display") == "none" ) 37.2851 - this.elem.style.display = "block"; 37.2852 - } 37.2853 - 37.2854 - // Hide the element if the "hide" operation was done 37.2855 - if ( this.options.hide ) 37.2856 - this.elem.style.display = "none"; 37.2857 - 37.2858 - // Reset the properties, if the item has been hidden or shown 37.2859 - if ( this.options.hide || this.options.show ) 37.2860 - for ( var p in this.options.curAnim ) 37.2861 - jQuery.attr(this.elem.style, p, this.options.orig[p]); 37.2862 - } 37.2863 - 37.2864 - // If a callback was provided, execute it 37.2865 - if ( done && jQuery.isFunction( this.options.complete ) ) 37.2866 - // Execute the complete function 37.2867 - this.options.complete.apply( this.elem ); 37.2868 - 37.2869 - return false; 37.2870 - } else { 37.2871 - var n = t - this.startTime; 37.2872 - this.state = n / this.options.duration; 37.2873 - 37.2874 - // Perform the easing function, defaults to swing 37.2875 - this.pos = jQuery.easing[this.options.easing || (jQuery.easing.swing ? "swing" : "linear")](this.state, n, 0, 1, this.options.duration); 37.2876 - this.now = this.start + ((this.end - this.start) * this.pos); 37.2877 - 37.2878 - // Perform the next step of the animation 37.2879 - this.update(); 37.2880 - } 37.2881 - 37.2882 - return true; 37.2883 - } 37.2884 - 37.2885 -}; 37.2886 - 37.2887 -jQuery.fx.step = { 37.2888 - scrollLeft: function(fx){ 37.2889 - fx.elem.scrollLeft = fx.now; 37.2890 - }, 37.2891 - 37.2892 - scrollTop: function(fx){ 37.2893 - fx.elem.scrollTop = fx.now; 37.2894 - }, 37.2895 - 37.2896 - opacity: function(fx){ 37.2897 - jQuery.attr(fx.elem.style, "opacity", fx.now); 37.2898 - }, 37.2899 - 37.2900 - _default: function(fx){ 37.2901 - fx.elem.style[ fx.prop ] = fx.now + fx.unit; 37.2902 - } 37.2903 -}; 37.2904 -// The Offset Method 37.2905 -// Originally By Brandon Aaron, part of the Dimension Plugin 37.2906 -// http://jquery.com/plugins/project/dimensions 37.2907 -jQuery.fn.offset = function() { 37.2908 - var left = 0, top = 0, elem = this[0], results; 37.2909 - 37.2910 - if ( elem ) with ( jQuery.browser ) { 37.2911 - var absolute = jQuery.css(elem, "position") == "absolute", 37.2912 - parent = elem.parentNode, 37.2913 - offsetParent = elem.offsetParent, 37.2914 - doc = elem.ownerDocument, 37.2915 - safari2 = safari && parseInt(version) < 522; 37.2916 - 37.2917 - // Use getBoundingClientRect if available 37.2918 - if ( elem.getBoundingClientRect ) { 37.2919 - box = elem.getBoundingClientRect(); 37.2920 - 37.2921 - // Add the document scroll offsets 37.2922 - add( 37.2923 - box.left + Math.max(doc.documentElement.scrollLeft, doc.body.scrollLeft), 37.2924 - box.top + Math.max(doc.documentElement.scrollTop, doc.body.scrollTop) 37.2925 - ); 37.2926 - 37.2927 - // IE adds the HTML element's border, by default it is medium which is 2px 37.2928 - // IE 6 and IE 7 quirks mode the border width is overwritable by the following css html { border: 0; } 37.2929 - // IE 7 standards mode, the border is always 2px 37.2930 - if ( msie ) { 37.2931 - var border = jQuery("html").css("borderWidth"); 37.2932 - border = (border == "medium" || jQuery.boxModel && parseInt(version) >= 7) && 2 || border; 37.2933 - add( -border, -border ); 37.2934 - } 37.2935 - 37.2936 - // Otherwise loop through the offsetParents and parentNodes 37.2937 - } else { 37.2938 - 37.2939 - // Initial element offsets 37.2940 - add( elem.offsetLeft, elem.offsetTop ); 37.2941 - 37.2942 - // Get parent offsets 37.2943 - while ( offsetParent ) { 37.2944 - // Add offsetParent offsets 37.2945 - add( offsetParent.offsetLeft, offsetParent.offsetTop ); 37.2946 - 37.2947 - // Mozilla and Safari > 2 does not include the border on offset parents 37.2948 - // However Mozilla adds the border for table cells 37.2949 - if ( mozilla && /^t[d|h]$/i.test(parent.tagName) || !safari2 ) 37.2950 - border( offsetParent ); 37.2951 - 37.2952 - // Safari <= 2 doubles body offsets with an absolutely positioned element or parent 37.2953 - if ( safari2 && !absolute && jQuery.css(offsetParent, "position") == "absolute" ) 37.2954 - absolute = true; 37.2955 - 37.2956 - // Get next offsetParent 37.2957 - offsetParent = offsetParent.offsetParent; 37.2958 - } 37.2959 - 37.2960 - // Get parent scroll offsets 37.2961 - while ( parent.tagName && !/^body|html$/i.test(parent.tagName) ) { 37.2962 - // Work around opera inline/table scrollLeft/Top bug 37.2963 - if ( !/^inline|table-row.*$/i.test(jQuery.css(parent, "display")) ) 37.2964 - // Subtract parent scroll offsets 37.2965 - add( -parent.scrollLeft, -parent.scrollTop ); 37.2966 - 37.2967 - // Mozilla does not add the border for a parent that has overflow != visible 37.2968 - if ( mozilla && jQuery.css(parent, "overflow") != "visible" ) 37.2969 - border( parent ); 37.2970 - 37.2971 - // Get next parent 37.2972 - parent = parent.parentNode; 37.2973 - } 37.2974 - 37.2975 - // Safari doubles body offsets with an absolutely positioned element or parent 37.2976 - if ( safari2 && absolute ) 37.2977 - add( -doc.body.offsetLeft, -doc.body.offsetTop ); 37.2978 - } 37.2979 - 37.2980 - // Return an object with top and left properties 37.2981 - results = { top: top, left: left }; 37.2982 - } 37.2983 - 37.2984 - return results; 37.2985 - 37.2986 - function border(elem) { 37.2987 - add( jQuery.css(elem, "borderLeftWidth"), jQuery.css(elem, "borderTopWidth") ); 37.2988 - } 37.2989 - 37.2990 - function add(l, t) { 37.2991 - left += parseInt(l) || 0; 37.2992 - top += parseInt(t) || 0; 37.2993 - } 37.2994 -}; 37.2995 -})();
38.1 --- a/web/styles.css Sat Sep 12 20:53:56 2009 +0200 38.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 38.3 @@ -1,292 +0,0 @@ 38.4 -body { 38.5 - background: #f2f1f0; 38.6 - font-family: verdana,sans-serif; 38.7 -} 38.8 - 38.9 -.navheader, .book, .preface, .chapter, .appendix, .bibliography, .navfooter, .basetemplate { 38.10 - width: 50em; 38.11 - margin-left: auto; 38.12 - margin-right: auto; 38.13 -} 38.14 - 38.15 -a.commenttoggle:hover, a.commenttoggle:active { 38.16 - opacity: 0.7; 38.17 -} 38.18 - 38.19 -a:hover, a:active { 38.20 - border-bottom: 1px solid #aaaaaa; 38.21 -} 38.22 - 38.23 -.book, .preface, .chapter, .appendix, .bibliography, .basetemplate { 38.24 - background: white; 38.25 - padding: 2em; 38.26 -} 38.27 - 38.28 -h1 { 38.29 - margin-top: 1.5em; 38.30 -} 38.31 - 38.32 -span.beta { 38.33 - font-size: 80%; 38.34 - font-style: italic; 38.35 - opacity: 0.4; 38.36 -} 38.37 - 38.38 -h2, h3 { 38.39 - margin-top: 2em; 38.40 -} 38.41 - 38.42 -h1, h2, h3 { 38.43 - font-family: georgia,serif; 38.44 - font-weight: normal; 38.45 - margin-bottom: 0.5em; 38.46 -} 38.47 - 38.48 -h1.booktitle { 38.49 - margin-bottom: 0px; 38.50 -} 38.51 - 38.52 -h2.booktitle { 38.53 - text-align: center; 38.54 -} 38.55 - 38.56 -h2.booktitle > a { 38.57 - color: black; 38.58 -} 38.59 - 38.60 -div.authors { 38.61 - font-size: 80%; 38.62 - margin-bottom: 1em; 38.63 - padding-left: 0.25em; 38.64 -} 38.65 - 38.66 -span.authors { 38.67 - font-size: 80%; 38.68 - opacity: 0.55; 38.69 - padding-left: 0.5em; 38.70 -} 38.71 - 38.72 -div.note th, div.tip th, div.warning th { 38.73 - font-family: georgia,serif; 38.74 - font-weight: normal; 38.75 - font-size: 110%; 38.76 -} 38.77 - 38.78 -div.navheader th, div.navfooter td { 38.79 - font-family: georgia,serif; 38.80 -} 38.81 - 38.82 -div.navheader th { 38.83 - opacity: 0; 38.84 - font-size: 0; 38.85 -} 38.86 - 38.87 -pre.screen { 38.88 - background-image: url(figs/shell.png); 38.89 -} 38.90 - 38.91 -pre.programlisting { 38.92 - background-image: url(figs/source.png); 38.93 -} 38.94 - 38.95 -pre.programlisting, pre.screen, p.remark { 38.96 - border-style: solid; 38.97 - border-width: 1px; 38.98 - font-size: medium; 38.99 - padding: 1em; 38.100 - background-repeat: no-repeat; 38.101 - background-position: 10px 10px; 38.102 - padding-left: 70px; 38.103 -} 38.104 - 38.105 -strong.command, code, pre, span.type { 38.106 - font-family: monospace; 38.107 - font-weight: normal; 38.108 -} 38.109 - 38.110 -strong.userinput > code { 38.111 - font-weight: bolder; 38.112 - color: #303030; 38.113 -} 38.114 - 38.115 -div.toc > p { 38.116 - opacity: 0.35; 38.117 - font-family: georgia,serif; 38.118 - cursor: pointer; 38.119 -} 38.120 - 38.121 -div.toc b { 38.122 - font-weight: normal; 38.123 - font-size: large; 38.124 -} 38.125 - 38.126 -ul.booktoc { 38.127 - padding-left: 0px; 38.128 - list-style-type: none; 38.129 -} 38.130 - 38.131 -.booktoc > li { 38.132 - padding: 0.5em; 38.133 -} 38.134 - 38.135 -.chapinfo { 38.136 - float: right; 38.137 - color: #a0a0a0; 38.138 -} 38.139 - 38.140 -.unpublished { 38.141 - color: #a0a0a0; 38.142 -} 38.143 - 38.144 -.chapinfo img { 38.145 - vertical-align: -35%; 38.146 - border: 0px; 38.147 -} 38.148 - 38.149 -.zebra_b { 38.150 - background: #f4f4f4; 38.151 -} 38.152 - 38.153 -.book .titlepage { 38.154 - display: none; 38.155 -} 38.156 - 38.157 -.chapter div.toc > dl { 38.158 - display: none; 38.159 -} 38.160 - 38.161 -pre.programlisting, pre.screen, p.remark { 38.162 - overflow: hidden; 38.163 -} 38.164 - 38.165 -p.remark { 38.166 - background-image: url(figs/remark.png); 38.167 -} 38.168 - 38.169 -div.warning, p.remark { 38.170 - background-color: #FFEFE8; 38.171 - border-color: #e0a8a0; 38.172 -} 38.173 - 38.174 -span.remark { 38.175 - font-style: normal; 38.176 - color: #707070; 38.177 -} 38.178 - 38.179 -.screen { 38.180 - background: #e7ffc7 none repeat scroll 0% 50%; 38.181 - border-color: #94DA3A; 38.182 -} 38.183 - 38.184 -.programlisting { 38.185 - background: #F0F4FF none repeat scroll 0% 50%; 38.186 - border-color: #B4BAEA; 38.187 -} 38.188 - 38.189 -.prompt { 38.190 - color: #448844; 38.191 -} 38.192 - 38.193 -div.note, div.tip { 38.194 - background: #ffffc9; 38.195 - border-color: #B4BAEA; 38.196 -} 38.197 - 38.198 -div.note, div.warning, div.tip { 38.199 - border-style: solid; 38.200 - border-width: 1px; 38.201 - padding: 1em; 38.202 -} 38.203 - 38.204 -.note .title { 38.205 - font-size: 90%; 38.206 -} 38.207 - 38.208 -.comment { 38.209 - font-size: 80%; 38.210 -} 38.211 - 38.212 -div.comment, div.new_comment { 38.213 - padding: 0.5em; 38.214 - margin: 0.5em; 38.215 - margin-left: 2em; 38.216 - border-style: solid; 38.217 - border-width: 1px; 38.218 - border-color: #aaaaff; 38.219 -} 38.220 - 38.221 -div.comment { 38.222 - background: #eeeeff; 38.223 -} 38.224 - 38.225 -div.new_comment { 38.226 - background: #d0d0ff; 38.227 -} 38.228 - 38.229 -.commenttoggle { 38.230 - opacity: 0.35; 38.231 -} 38.232 - 38.233 -.comment_help { 38.234 - font-size: 80%; 38.235 -} 38.236 - 38.237 -.comment_header { 38.238 - opacity: 0.75; 38.239 -} 38.240 - 38.241 -.comment_id { 38.242 - float: right; 38.243 - opacity: 0.3; 38.244 - font-size: 60%; 38.245 -} 38.246 - 38.247 -.comment_name { 38.248 - font-weight: bolder; 38.249 -} 38.250 - 38.251 -.comment_reviewed { 38.252 - color: darkgreen; 38.253 - margin-left: 1em; 38.254 - font-style: italic; 38.255 -} 38.256 - 38.257 -.comment_date { 38.258 - opacity: 0.75; 38.259 -} 38.260 - 38.261 -.comment_thanks { 38.262 - color: darkblue; 38.263 - margin-left: 1em; 38.264 - font-style: italic; 38.265 - font-weight: bolder; 38.266 -} 38.267 - 38.268 -.comment_error { 38.269 - padding-left: 1em; 38.270 - font-weight: bolder; 38.271 - font-size: 80%; 38.272 - color: darkred; 38.273 -} 38.274 - 38.275 -.hgfooter { 38.276 - width: 60em; 38.277 - margin-left: auto; 38.278 - margin-right: auto; 38.279 - margin-top: 2em; 38.280 - margin-bottom: 2em; 38.281 - font-size: 80%; 38.282 - color: #727272; 38.283 -} 38.284 - 38.285 -.hgfooter a { 38.286 - color: #5555ff; 38.287 -} 38.288 - 38.289 -.hgfooter a:visited { 38.290 - opacity: 0.7; 38.291 -} 38.292 - 38.293 -.hgfooter img { 38.294 - vertical-align: -45%; 38.295 -}
39.1 Binary file web/support/icons/caution.png has changed
40.1 Binary file web/support/icons/favicon.png has changed
41.1 Binary file web/support/icons/important.png has changed
42.1 Binary file web/support/icons/note.png has changed
43.1 Binary file web/support/icons/remark.png has changed
44.1 Binary file web/support/icons/rss.png has changed
45.1 Binary file web/support/icons/shell.png has changed
46.1 Binary file web/support/icons/source.png has changed
47.1 Binary file web/support/icons/throbber.gif has changed
48.1 Binary file web/support/icons/tip.png has changed
49.1 Binary file web/support/icons/warning.png has changed
50.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 50.2 +++ b/web/support/javascript/form-min.js Mon Nov 23 10:51:14 2009 +0100 50.3 @@ -0,0 +1,1 @@ 50.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); 50.5 \ No newline at end of file
51.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 51.2 +++ b/web/support/javascript/form.js Mon Nov 23 10:51:14 2009 +0100 51.3 @@ -0,0 +1,819 @@ 51.4 +/* 51.5 + * jQuery Form Plugin 51.6 + * @requires jQuery v1.1 or later 51.7 + * 51.8 + * Examples at: http://malsup.com/jquery/form/ 51.9 + * Dual licensed under the MIT and GPL licenses: 51.10 + * http://www.opensource.org/licenses/mit-license.php 51.11 + * http://www.gnu.org/licenses/gpl.html 51.12 + * 51.13 + * Revision: $Id$ 51.14 + */ 51.15 + (function($) { 51.16 +/** 51.17 + * ajaxSubmit() provides a mechanism for submitting an HTML form using AJAX. 51.18 + * 51.19 + * ajaxSubmit accepts a single argument which can be either a success callback function 51.20 + * or an options Object. If a function is provided it will be invoked upon successful 51.21 + * completion of the submit and will be passed the response from the server. 51.22 + * If an options Object is provided, the following attributes are supported: 51.23 + * 51.24 + * target: Identifies the element(s) in the page to be updated with the server response. 51.25 + * This value may be specified as a jQuery selection string, a jQuery object, 51.26 + * or a DOM element. 51.27 + * default value: null 51.28 + * 51.29 + * url: URL to which the form data will be submitted. 51.30 + * default value: value of form's 'action' attribute 51.31 + * 51.32 + * type: The method in which the form data should be submitted, 'GET' or 'POST'. 51.33 + * default value: value of form's 'method' attribute (or 'GET' if none found) 51.34 + * 51.35 + * data: Additional data to add to the request, specified as key/value pairs (see $.ajax). 51.36 + * 51.37 + * beforeSubmit: Callback method to be invoked before the form is submitted. 51.38 + * default value: null 51.39 + * 51.40 + * success: Callback method to be invoked after the form has been successfully submitted 51.41 + * and the response has been returned from the server 51.42 + * default value: null 51.43 + * 51.44 + * dataType: Expected dataType of the response. One of: null, 'xml', 'script', or 'json' 51.45 + * default value: null 51.46 + * 51.47 + * semantic: Boolean flag indicating whether data must be submitted in semantic order (slower). 51.48 + * default value: false 51.49 + * 51.50 + * resetForm: Boolean flag indicating whether the form should be reset if the submit is successful 51.51 + * 51.52 + * clearForm: Boolean flag indicating whether the form should be cleared if the submit is successful 51.53 + * 51.54 + * 51.55 + * The 'beforeSubmit' callback can be provided as a hook for running pre-submit logic or for 51.56 + * validating the form data. If the 'beforeSubmit' callback returns false then the form will 51.57 + * not be submitted. The 'beforeSubmit' callback is invoked with three arguments: the form data 51.58 + * in array format, the jQuery object, and the options object passed into ajaxSubmit. 51.59 + * The form data array takes the following form: 51.60 + * 51.61 + * [ { name: 'username', value: 'jresig' }, { name: 'password', value: 'secret' } ] 51.62 + * 51.63 + * If a 'success' callback method is provided it is invoked after the response has been returned 51.64 + * from the server. It is passed the responseText or responseXML value (depending on dataType). 51.65 + * See jQuery.ajax for further details. 51.66 + * 51.67 + * 51.68 + * The dataType option provides a means for specifying how the server response should be handled. 51.69 + * This maps directly to the jQuery.httpData method. The following values are supported: 51.70 + * 51.71 + * 'xml': if dataType == 'xml' the server response is treated as XML and the 'success' 51.72 + * callback method, if specified, will be passed the responseXML value 51.73 + * 'json': if dataType == 'json' the server response will be evaluted and passed to 51.74 + * the 'success' callback, if specified 51.75 + * 'script': if dataType == 'script' the server response is evaluated in the global context 51.76 + * 51.77 + * 51.78 + * Note that it does not make sense to use both the 'target' and 'dataType' options. If both 51.79 + * are provided the target will be ignored. 51.80 + * 51.81 + * The semantic argument can be used to force form serialization in semantic order. 51.82 + * This is normally true anyway, unless the form contains input elements of type='image'. 51.83 + * If your form must be submitted with name/value pairs in semantic order and your form 51.84 + * contains an input of type='image" then pass true for this arg, otherwise pass false 51.85 + * (or nothing) to avoid the overhead for this logic. 51.86 + * 51.87 + * 51.88 + * When used on its own, ajaxSubmit() is typically bound to a form's submit event like this: 51.89 + * 51.90 + * $("#form-id").submit(function() { 51.91 + * $(this).ajaxSubmit(options); 51.92 + * return false; // cancel conventional submit 51.93 + * }); 51.94 + * 51.95 + * When using ajaxForm(), however, this is done for you. 51.96 + * 51.97 + * @example 51.98 + * $('#myForm').ajaxSubmit(function(data) { 51.99 + * alert('Form submit succeeded! Server returned: ' + data); 51.100 + * }); 51.101 + * @desc Submit form and alert server response 51.102 + * 51.103 + * 51.104 + * @example 51.105 + * var options = { 51.106 + * target: '#myTargetDiv' 51.107 + * }; 51.108 + * $('#myForm').ajaxSubmit(options); 51.109 + * @desc Submit form and update page element with server response 51.110 + * 51.111 + * 51.112 + * @example 51.113 + * var options = { 51.114 + * success: function(responseText) { 51.115 + * alert(responseText); 51.116 + * } 51.117 + * }; 51.118 + * $('#myForm').ajaxSubmit(options); 51.119 + * @desc Submit form and alert the server response 51.120 + * 51.121 + * 51.122 + * @example 51.123 + * var options = { 51.124 + * beforeSubmit: function(formArray, jqForm) { 51.125 + * if (formArray.length == 0) { 51.126 + * alert('Please enter data.'); 51.127 + * return false; 51.128 + * } 51.129 + * } 51.130 + * }; 51.131 + * $('#myForm').ajaxSubmit(options); 51.132 + * @desc Pre-submit validation which aborts the submit operation if form data is empty 51.133 + * 51.134 + * 51.135 + * @example 51.136 + * var options = { 51.137 + * url: myJsonUrl.php, 51.138 + * dataType: 'json', 51.139 + * success: function(data) { 51.140 + * // 'data' is an object representing the the evaluated json data 51.141 + * } 51.142 + * }; 51.143 + * $('#myForm').ajaxSubmit(options); 51.144 + * @desc json data returned and evaluated 51.145 + * 51.146 + * 51.147 + * @example 51.148 + * var options = { 51.149 + * url: myXmlUrl.php, 51.150 + * dataType: 'xml', 51.151 + * success: function(responseXML) { 51.152 + * // responseXML is XML document object 51.153 + * var data = $('myElement', responseXML).text(); 51.154 + * } 51.155 + * }; 51.156 + * $('#myForm').ajaxSubmit(options); 51.157 + * @desc XML data returned from server 51.158 + * 51.159 + * 51.160 + * @example 51.161 + * var options = { 51.162 + * resetForm: true 51.163 + * }; 51.164 + * $('#myForm').ajaxSubmit(options); 51.165 + * @desc submit form and reset it if successful 51.166 + * 51.167 + * @example 51.168 + * $('#myForm).submit(function() { 51.169 + * $(this).ajaxSubmit(); 51.170 + * return false; 51.171 + * }); 51.172 + * @desc Bind form's submit event to use ajaxSubmit 51.173 + * 51.174 + * 51.175 + * @name ajaxSubmit 51.176 + * @type jQuery 51.177 + * @param options object literal containing options which control the form submission process 51.178 + * @cat Plugins/Form 51.179 + * @return jQuery 51.180 + */ 51.181 +$.fn.ajaxSubmit = function(options) { 51.182 + if (typeof options == 'function') 51.183 + options = { success: options }; 51.184 + 51.185 + options = $.extend({ 51.186 + url: this.attr('action') || window.location, 51.187 + type: this.attr('method') || 'GET' 51.188 + }, options || {}); 51.189 + 51.190 + // hook for manipulating the form data before it is extracted; 51.191 + // convenient for use with rich editors like tinyMCE or FCKEditor 51.192 + var veto = {}; 51.193 + $.event.trigger('form.pre.serialize', [this, options, veto]); 51.194 + if (veto.veto) return this; 51.195 + 51.196 + var a = this.formToArray(options.semantic); 51.197 + if (options.data) { 51.198 + for (var n in options.data) 51.199 + a.push( { name: n, value: options.data[n] } ); 51.200 + } 51.201 + 51.202 + // give pre-submit callback an opportunity to abort the submit 51.203 + if (options.beforeSubmit && options.beforeSubmit(a, this, options) === false) return this; 51.204 + 51.205 + // fire vetoable 'validate' event 51.206 + $.event.trigger('form.submit.validate', [a, this, options, veto]); 51.207 + if (veto.veto) return this; 51.208 + 51.209 + var q = $.param(a);//.replace(/%20/g,'+'); 51.210 + 51.211 + if (options.type.toUpperCase() == 'GET') { 51.212 + options.url += (options.url.indexOf('?') >= 0 ? '&' : '?') + q; 51.213 + options.data = null; // data is null for 'get' 51.214 + } 51.215 + else 51.216 + options.data = q; // data is the query string for 'post' 51.217 + 51.218 + var $form = this, callbacks = []; 51.219 + if (options.resetForm) callbacks.push(function() { $form.resetForm(); }); 51.220 + if (options.clearForm) callbacks.push(function() { $form.clearForm(); }); 51.221 + 51.222 + // perform a load on the target only if dataType is not provided 51.223 + if (!options.dataType && options.target) { 51.224 + var oldSuccess = options.success || function(){}; 51.225 + callbacks.push(function(data) { 51.226 + if (this.evalScripts) 51.227 + $(options.target).attr("innerHTML", data).evalScripts().each(oldSuccess, arguments); 51.228 + else // jQuery v1.1.4 51.229 + $(options.target).html(data).each(oldSuccess, arguments); 51.230 + }); 51.231 + } 51.232 + else if (options.success) 51.233 + callbacks.push(options.success); 51.234 + 51.235 + options.success = function(data, status) { 51.236 + for (var i=0, max=callbacks.length; i < max; i++) 51.237 + callbacks[i](data, status, $form); 51.238 + }; 51.239 + 51.240 + // are there files to upload? 51.241 + var files = $('input:file', this).fieldValue(); 51.242 + var found = false; 51.243 + for (var j=0; j < files.length; j++) 51.244 + if (files[j]) 51.245 + found = true; 51.246 + 51.247 + if (options.iframe || found) // options.iframe allows user to force iframe mode 51.248 + fileUpload(); 51.249 + else 51.250 + $.ajax(options); 51.251 + 51.252 + // fire 'notify' event 51.253 + $.event.trigger('form.submit.notify', [this, options]); 51.254 + return this; 51.255 + 51.256 + 51.257 + // private function for handling file uploads (hat tip to YAHOO!) 51.258 + function fileUpload() { 51.259 + var form = $form[0]; 51.260 + var opts = $.extend({}, $.ajaxSettings, options); 51.261 + 51.262 + var id = 'jqFormIO' + $.fn.ajaxSubmit.counter++; 51.263 + var $io = $('<iframe id="' + id + '" name="' + id + '" />'); 51.264 + var io = $io[0]; 51.265 + var op8 = $.browser.opera && window.opera.version() < 9; 51.266 + if ($.browser.msie || op8) io.src = 'javascript:false;document.write("");'; 51.267 + $io.css({ position: 'absolute', top: '-1000px', left: '-1000px' }); 51.268 + 51.269 + var xhr = { // mock object 51.270 + responseText: null, 51.271 + responseXML: null, 51.272 + status: 0, 51.273 + statusText: 'n/a', 51.274 + getAllResponseHeaders: function() {}, 51.275 + getResponseHeader: function() {}, 51.276 + setRequestHeader: function() {} 51.277 + }; 51.278 + 51.279 + var g = opts.global; 51.280 + // trigger ajax global events so that activity/block indicators work like normal 51.281 + if (g && ! $.active++) $.event.trigger("ajaxStart"); 51.282 + if (g) $.event.trigger("ajaxSend", [xhr, opts]); 51.283 + 51.284 + var cbInvoked = 0; 51.285 + var timedOut = 0; 51.286 + 51.287 + // take a breath so that pending repaints get some cpu time before the upload starts 51.288 + setTimeout(function() { 51.289 + $io.appendTo('body'); 51.290 + // jQuery's event binding doesn't work for iframe events in IE 51.291 + io.attachEvent ? io.attachEvent('onload', cb) : io.addEventListener('load', cb, false); 51.292 + 51.293 + // make sure form attrs are set 51.294 + var encAttr = form.encoding ? 'encoding' : 'enctype'; 51.295 + var t = $form.attr('target'); 51.296 + $form.attr({ 51.297 + target: id, 51.298 + method: 'POST', 51.299 + action: opts.url 51.300 + }); 51.301 + form[encAttr] = 'multipart/form-data'; 51.302 + 51.303 + // support timout 51.304 + if (opts.timeout) 51.305 + setTimeout(function() { timedOut = true; cb(); }, opts.timeout); 51.306 + 51.307 + form.submit(); 51.308 + $form.attr('target', t); // reset target 51.309 + }, 10); 51.310 + 51.311 + function cb() { 51.312 + if (cbInvoked++) return; 51.313 + 51.314 + io.detachEvent ? io.detachEvent('onload', cb) : io.removeEventListener('load', cb, false); 51.315 + 51.316 + var ok = true; 51.317 + try { 51.318 + if (timedOut) throw 'timeout'; 51.319 + // extract the server response from the iframe 51.320 + var data, doc; 51.321 + doc = io.contentWindow ? io.contentWindow.document : io.contentDocument ? io.contentDocument : io.document; 51.322 + xhr.responseText = doc.body ? doc.body.innerHTML : null; 51.323 + xhr.responseXML = doc.XMLDocument ? doc.XMLDocument : doc; 51.324 + 51.325 + if (opts.dataType == 'json' || opts.dataType == 'script') { 51.326 + var ta = doc.getElementsByTagName('textarea')[0]; 51.327 + data = ta ? ta.value : xhr.responseText; 51.328 + if (opts.dataType == 'json') 51.329 + eval("data = " + data); 51.330 + else 51.331 + $.globalEval(data); 51.332 + } 51.333 + else if (opts.dataType == 'xml') { 51.334 + data = xhr.responseXML; 51.335 + if (!data && xhr.responseText != null) 51.336 + data = toXml(xhr.responseText); 51.337 + } 51.338 + else { 51.339 + data = xhr.responseText; 51.340 + } 51.341 + } 51.342 + catch(e){ 51.343 + ok = false; 51.344 + $.handleError(opts, xhr, 'error', e); 51.345 + } 51.346 + 51.347 + // ordering of these callbacks/triggers is odd, but that's how $.ajax does it 51.348 + if (ok) { 51.349 + opts.success(data, 'success'); 51.350 + if (g) $.event.trigger("ajaxSuccess", [xhr, opts]); 51.351 + } 51.352 + if (g) $.event.trigger("ajaxComplete", [xhr, opts]); 51.353 + if (g && ! --$.active) $.event.trigger("ajaxStop"); 51.354 + if (opts.complete) opts.complete(xhr, ok ? 'success' : 'error'); 51.355 + 51.356 + // clean up 51.357 + setTimeout(function() { 51.358 + $io.remove(); 51.359 + xhr.responseXML = null; 51.360 + }, 100); 51.361 + }; 51.362 + 51.363 + function toXml(s, doc) { 51.364 + if (window.ActiveXObject) { 51.365 + doc = new ActiveXObject('Microsoft.XMLDOM'); 51.366 + doc.async = 'false'; 51.367 + doc.loadXML(s); 51.368 + } 51.369 + else 51.370 + doc = (new DOMParser()).parseFromString(s, 'text/xml'); 51.371 + return (doc && doc.documentElement && doc.documentElement.tagName != 'parsererror') ? doc : null; 51.372 + }; 51.373 + }; 51.374 +}; 51.375 +$.fn.ajaxSubmit.counter = 0; // used to create unique iframe ids 51.376 + 51.377 +/** 51.378 + * ajaxForm() provides a mechanism for fully automating form submission. 51.379 + * 51.380 + * The advantages of using this method instead of ajaxSubmit() are: 51.381 + * 51.382 + * 1: This method will include coordinates for <input type="image" /> elements (if the element 51.383 + * is used to submit the form). 51.384 + * 2. This method will include the submit element's name/value data (for the element that was 51.385 + * used to submit the form). 51.386 + * 3. This method binds the submit() method to the form for you. 51.387 + * 51.388 + * Note that for accurate x/y coordinates of image submit elements in all browsers 51.389 + * you need to also use the "dimensions" plugin (this method will auto-detect its presence). 51.390 + * 51.391 + * The options argument for ajaxForm works exactly as it does for ajaxSubmit. ajaxForm merely 51.392 + * passes the options argument along after properly binding events for submit elements and 51.393 + * the form itself. See ajaxSubmit for a full description of the options argument. 51.394 + * 51.395 + * 51.396 + * @example 51.397 + * var options = { 51.398 + * target: '#myTargetDiv' 51.399 + * }; 51.400 + * $('#myForm').ajaxSForm(options); 51.401 + * @desc Bind form's submit event so that 'myTargetDiv' is updated with the server response 51.402 + * when the form is submitted. 51.403 + * 51.404 + * 51.405 + * @example 51.406 + * var options = { 51.407 + * success: function(responseText) { 51.408 + * alert(responseText); 51.409 + * } 51.410 + * }; 51.411 + * $('#myForm').ajaxSubmit(options); 51.412 + * @desc Bind form's submit event so that server response is alerted after the form is submitted. 51.413 + * 51.414 + * 51.415 + * @example 51.416 + * var options = { 51.417 + * beforeSubmit: function(formArray, jqForm) { 51.418 + * if (formArray.length == 0) { 51.419 + * alert('Please enter data.'); 51.420 + * return false; 51.421 + * } 51.422 + * } 51.423 + * }; 51.424 + * $('#myForm').ajaxSubmit(options); 51.425 + * @desc Bind form's submit event so that pre-submit callback is invoked before the form 51.426 + * is submitted. 51.427 + * 51.428 + * 51.429 + * @name ajaxForm 51.430 + * @param options object literal containing options which control the form submission process 51.431 + * @return jQuery 51.432 + * @cat Plugins/Form 51.433 + * @type jQuery 51.434 + */ 51.435 +$.fn.ajaxForm = function(options) { 51.436 + return this.ajaxFormUnbind().submit(submitHandler).each(function() { 51.437 + // store options in hash 51.438 + this.formPluginId = $.fn.ajaxForm.counter++; 51.439 + $.fn.ajaxForm.optionHash[this.formPluginId] = options; 51.440 + $(":submit,input:image", this).click(clickHandler); 51.441 + }); 51.442 +}; 51.443 + 51.444 +$.fn.ajaxForm.counter = 1; 51.445 +$.fn.ajaxForm.optionHash = {}; 51.446 + 51.447 +function clickHandler(e) { 51.448 + var $form = this.form; 51.449 + $form.clk = this; 51.450 + if (this.type == 'image') { 51.451 + if (e.offsetX != undefined) { 51.452 + $form.clk_x = e.offsetX; 51.453 + $form.clk_y = e.offsetY; 51.454 + } else if (typeof $.fn.offset == 'function') { // try to use dimensions plugin 51.455 + var offset = $(this).offset(); 51.456 + $form.clk_x = e.pageX - offset.left; 51.457 + $form.clk_y = e.pageY - offset.top; 51.458 + } else { 51.459 + $form.clk_x = e.pageX - this.offsetLeft; 51.460 + $form.clk_y = e.pageY - this.offsetTop; 51.461 + } 51.462 + } 51.463 + // clear form vars 51.464 + setTimeout(function() { $form.clk = $form.clk_x = $form.clk_y = null; }, 10); 51.465 +}; 51.466 + 51.467 +function submitHandler() { 51.468 + // retrieve options from hash 51.469 + var id = this.formPluginId; 51.470 + var options = $.fn.ajaxForm.optionHash[id]; 51.471 + $(this).ajaxSubmit(options); 51.472 + return false; 51.473 +}; 51.474 + 51.475 +/** 51.476 + * ajaxFormUnbind unbinds the event handlers that were bound by ajaxForm 51.477 + * 51.478 + * @name ajaxFormUnbind 51.479 + * @return jQuery 51.480 + * @cat Plugins/Form 51.481 + * @type jQuery 51.482 + */ 51.483 +$.fn.ajaxFormUnbind = function() { 51.484 + this.unbind('submit', submitHandler); 51.485 + return this.each(function() { 51.486 + $(":submit,input:image", this).unbind('click', clickHandler); 51.487 + }); 51.488 + 51.489 +}; 51.490 + 51.491 +/** 51.492 + * formToArray() gathers form element data into an array of objects that can 51.493 + * be passed to any of the following ajax functions: $.get, $.post, or load. 51.494 + * Each object in the array has both a 'name' and 'value' property. An example of 51.495 + * an array for a simple login form might be: 51.496 + * 51.497 + * [ { name: 'username', value: 'jresig' }, { name: 'password', value: 'secret' } ] 51.498 + * 51.499 + * It is this array that is passed to pre-submit callback functions provided to the 51.500 + * ajaxSubmit() and ajaxForm() methods. 51.501 + * 51.502 + * The semantic argument can be used to force form serialization in semantic order. 51.503 + * This is normally true anyway, unless the form contains input elements of type='image'. 51.504 + * If your form must be submitted with name/value pairs in semantic order and your form 51.505 + * contains an input of type='image" then pass true for this arg, otherwise pass false 51.506 + * (or nothing) to avoid the overhead for this logic. 51.507 + * 51.508 + * @example var data = $("#myForm").formToArray(); 51.509 + * $.post( "myscript.cgi", data ); 51.510 + * @desc Collect all the data from a form and submit it to the server. 51.511 + * 51.512 + * @name formToArray 51.513 + * @param semantic true if serialization must maintain strict semantic ordering of elements (slower) 51.514 + * @type Array<Object> 51.515 + * @cat Plugins/Form 51.516 + */ 51.517 +$.fn.formToArray = function(semantic) { 51.518 + var a = []; 51.519 + if (this.length == 0) return a; 51.520 + 51.521 + var form = this[0]; 51.522 + var els = semantic ? form.getElementsByTagName('*') : form.elements; 51.523 + if (!els) return a; 51.524 + for(var i=0, max=els.length; i < max; i++) { 51.525 + var el = els[i]; 51.526 + var n = el.name; 51.527 + if (!n) continue; 51.528 + 51.529 + if (semantic && form.clk && el.type == "image") { 51.530 + // handle image inputs on the fly when semantic == true 51.531 + if(!el.disabled && form.clk == el) 51.532 + a.push({name: n+'.x', value: form.clk_x}, {name: n+'.y', value: form.clk_y}); 51.533 + continue; 51.534 + } 51.535 + 51.536 + var v = $.fieldValue(el, true); 51.537 + if (v && v.constructor == Array) { 51.538 + for(var j=0, jmax=v.length; j < jmax; j++) 51.539 + a.push({name: n, value: v[j]}); 51.540 + } 51.541 + else if (v !== null && typeof v != 'undefined') 51.542 + a.push({name: n, value: v}); 51.543 + } 51.544 + 51.545 + if (!semantic && form.clk) { 51.546 + // input type=='image' are not found in elements array! handle them here 51.547 + var inputs = form.getElementsByTagName("input"); 51.548 + for(var i=0, max=inputs.length; i < max; i++) { 51.549 + var input = inputs[i]; 51.550 + var n = input.name; 51.551 + if(n && !input.disabled && input.type == "image" && form.clk == input) 51.552 + a.push({name: n+'.x', value: form.clk_x}, {name: n+'.y', value: form.clk_y}); 51.553 + } 51.554 + } 51.555 + return a; 51.556 +}; 51.557 + 51.558 + 51.559 +/** 51.560 + * Serializes form data into a 'submittable' string. This method will return a string 51.561 + * in the format: name1=value1&name2=value2 51.562 + * 51.563 + * The semantic argument can be used to force form serialization in semantic order. 51.564 + * If your form must be submitted with name/value pairs in semantic order then pass 51.565 + * true for this arg, otherwise pass false (or nothing) to avoid the overhead for 51.566 + * this logic (which can be significant for very large forms). 51.567 + * 51.568 + * @example var data = $("#myForm").formSerialize(); 51.569 + * $.ajax('POST', "myscript.cgi", data); 51.570 + * @desc Collect all the data from a form into a single string 51.571 + * 51.572 + * @name formSerialize 51.573 + * @param semantic true if serialization must maintain strict semantic ordering of elements (slower) 51.574 + * @type String 51.575 + * @cat Plugins/Form 51.576 + */ 51.577 +$.fn.formSerialize = function(semantic) { 51.578 + //hand off to jQuery.param for proper encoding 51.579 + return $.param(this.formToArray(semantic)); 51.580 +}; 51.581 + 51.582 + 51.583 +/** 51.584 + * Serializes all field elements in the jQuery object into a query string. 51.585 + * This method will return a string in the format: name1=value1&name2=value2 51.586 + * 51.587 + * The successful argument controls whether or not serialization is limited to 51.588 + * 'successful' controls (per http://www.w3.org/TR/html4/interact/forms.html#successful-controls). 51.589 + * The default value of the successful argument is true. 51.590 + * 51.591 + * @example var data = $("input").formSerialize(); 51.592 + * @desc Collect the data from all successful input elements into a query string 51.593 + * 51.594 + * @example var data = $(":radio").formSerialize(); 51.595 + * @desc Collect the data from all successful radio input elements into a query string 51.596 + * 51.597 + * @example var data = $("#myForm :checkbox").formSerialize(); 51.598 + * @desc Collect the data from all successful checkbox input elements in myForm into a query string 51.599 + * 51.600 + * @example var data = $("#myForm :checkbox").formSerialize(false); 51.601 + * @desc Collect the data from all checkbox elements in myForm (even the unchecked ones) into a query string 51.602 + * 51.603 + * @example var data = $(":input").formSerialize(); 51.604 + * @desc Collect the data from all successful input, select, textarea and button elements into a query string 51.605 + * 51.606 + * @name fieldSerialize 51.607 + * @param successful true if only successful controls should be serialized (default is true) 51.608 + * @type String 51.609 + * @cat Plugins/Form 51.610 + */ 51.611 +$.fn.fieldSerialize = function(successful) { 51.612 + var a = []; 51.613 + this.each(function() { 51.614 + var n = this.name; 51.615 + if (!n) return; 51.616 + var v = $.fieldValue(this, successful); 51.617 + if (v && v.constructor == Array) { 51.618 + for (var i=0,max=v.length; i < max; i++) 51.619 + a.push({name: n, value: v[i]}); 51.620 + } 51.621 + else if (v !== null && typeof v != 'undefined') 51.622 + a.push({name: this.name, value: v}); 51.623 + }); 51.624 + //hand off to jQuery.param for proper encoding 51.625 + return $.param(a); 51.626 +}; 51.627 + 51.628 + 51.629 +/** 51.630 + * Returns the value(s) of the element in the matched set. For example, consider the following form: 51.631 + * 51.632 + * <form><fieldset> 51.633 + * <input name="A" type="text" /> 51.634 + * <input name="A" type="text" /> 51.635 + * <input name="B" type="checkbox" value="B1" /> 51.636 + * <input name="B" type="checkbox" value="B2"/> 51.637 + * <input name="C" type="radio" value="C1" /> 51.638 + * <input name="C" type="radio" value="C2" /> 51.639 + * </fieldset></form> 51.640 + * 51.641 + * var v = $(':text').fieldValue(); 51.642 + * // if no values are entered into the text inputs 51.643 + * v == ['',''] 51.644 + * // if values entered into the text inputs are 'foo' and 'bar' 51.645 + * v == ['foo','bar'] 51.646 + * 51.647 + * var v = $(':checkbox').fieldValue(); 51.648 + * // if neither checkbox is checked 51.649 + * v === undefined 51.650 + * // if both checkboxes are checked 51.651 + * v == ['B1', 'B2'] 51.652 + * 51.653 + * var v = $(':radio').fieldValue(); 51.654 + * // if neither radio is checked 51.655 + * v === undefined 51.656 + * // if first radio is checked 51.657 + * v == ['C1'] 51.658 + * 51.659 + * The successful argument controls whether or not the field element must be 'successful' 51.660 + * (per http://www.w3.org/TR/html4/interact/forms.html#successful-controls). 51.661 + * The default value of the successful argument is true. If this value is false the value(s) 51.662 + * for each element is returned. 51.663 + * 51.664 + * Note: This method *always* returns an array. If no valid value can be determined the 51.665 + * array will be empty, otherwise it will contain one or more values. 51.666 + * 51.667 + * @example var data = $("#myPasswordElement").fieldValue(); 51.668 + * alert(data[0]); 51.669 + * @desc Alerts the current value of the myPasswordElement element 51.670 + * 51.671 + * @example var data = $("#myForm :input").fieldValue(); 51.672 + * @desc Get the value(s) of the form elements in myForm 51.673 + * 51.674 + * @example var data = $("#myForm :checkbox").fieldValue(); 51.675 + * @desc Get the value(s) for the successful checkbox element(s) in the jQuery object. 51.676 + * 51.677 + * @example var data = $("#mySingleSelect").fieldValue(); 51.678 + * @desc Get the value(s) of the select control 51.679 + * 51.680 + * @example var data = $(':text').fieldValue(); 51.681 + * @desc Get the value(s) of the text input or textarea elements 51.682 + * 51.683 + * @example var data = $("#myMultiSelect").fieldValue(); 51.684 + * @desc Get the values for the select-multiple control 51.685 + * 51.686 + * @name fieldValue 51.687 + * @param Boolean successful true if only the values for successful controls should be returned (default is true) 51.688 + * @type Array<String> 51.689 + * @cat Plugins/Form 51.690 + */ 51.691 +$.fn.fieldValue = function(successful) { 51.692 + for (var val=[], i=0, max=this.length; i < max; i++) { 51.693 + var el = this[i]; 51.694 + var v = $.fieldValue(el, successful); 51.695 + if (v === null || typeof v == 'undefined' || (v.constructor == Array && !v.length)) 51.696 + continue; 51.697 + v.constructor == Array ? $.merge(val, v) : val.push(v); 51.698 + } 51.699 + return val; 51.700 +}; 51.701 + 51.702 +/** 51.703 + * Returns the value of the field element. 51.704 + * 51.705 + * The successful argument controls whether or not the field element must be 'successful' 51.706 + * (per http://www.w3.org/TR/html4/interact/forms.html#successful-controls). 51.707 + * The default value of the successful argument is true. If the given element is not 51.708 + * successful and the successful arg is not false then the returned value will be null. 51.709 + * 51.710 + * Note: If the successful flag is true (default) but the element is not successful, the return will be null 51.711 + * Note: The value returned for a successful select-multiple element will always be an array. 51.712 + * Note: If the element has no value the return value will be undefined. 51.713 + * 51.714 + * @example var data = jQuery.fieldValue($("#myPasswordElement")[0]); 51.715 + * @desc Gets the current value of the myPasswordElement element 51.716 + * 51.717 + * @name fieldValue 51.718 + * @param Element el The DOM element for which the value will be returned 51.719 + * @param Boolean successful true if value returned must be for a successful controls (default is true) 51.720 + * @type String or Array<String> or null or undefined 51.721 + * @cat Plugins/Form 51.722 + */ 51.723 +$.fieldValue = function(el, successful) { 51.724 + var n = el.name, t = el.type, tag = el.tagName.toLowerCase(); 51.725 + if (typeof successful == 'undefined') successful = true; 51.726 + 51.727 + if (successful && (!n || el.disabled || t == 'reset' || t == 'button' || 51.728 + (t == 'checkbox' || t == 'radio') && !el.checked || 51.729 + (t == 'submit' || t == 'image') && el.form && el.form.clk != el || 51.730 + tag == 'select' && el.selectedIndex == -1)) 51.731 + return null; 51.732 + 51.733 + if (tag == 'select') { 51.734 + var index = el.selectedIndex; 51.735 + if (index < 0) return null; 51.736 + var a = [], ops = el.options; 51.737 + var one = (t == 'select-one'); 51.738 + var max = (one ? index+1 : ops.length); 51.739 + for(var i=(one ? index : 0); i < max; i++) { 51.740 + var op = ops[i]; 51.741 + if (op.selected) { 51.742 + // extra pain for IE... 51.743 + var v = $.browser.msie && !(op.attributes['value'].specified) ? op.text : op.value; 51.744 + if (one) return v; 51.745 + a.push(v); 51.746 + } 51.747 + } 51.748 + return a; 51.749 + } 51.750 + return el.value; 51.751 +}; 51.752 + 51.753 + 51.754 +/** 51.755 + * Clears the form data. Takes the following actions on the form's input fields: 51.756 + * - input text fields will have their 'value' property set to the empty string 51.757 + * - select elements will have their 'selectedIndex' property set to -1 51.758 + * - checkbox and radio inputs will have their 'checked' property set to false 51.759 + * - inputs of type submit, button, reset, and hidden will *not* be effected 51.760 + * - button elements will *not* be effected 51.761 + * 51.762 + * @example $('form').clearForm(); 51.763 + * @desc Clears all forms on the page. 51.764 + * 51.765 + * @name clearForm 51.766 + * @type jQuery 51.767 + * @cat Plugins/Form 51.768 + */ 51.769 +$.fn.clearForm = function() { 51.770 + return this.each(function() { 51.771 + $('input,select,textarea', this).clearFields(); 51.772 + }); 51.773 +}; 51.774 + 51.775 +/** 51.776 + * Clears the selected form elements. Takes the following actions on the matched elements: 51.777 + * - input text fields will have their 'value' property set to the empty string 51.778 + * - select elements will have their 'selectedIndex' property set to -1 51.779 + * - checkbox and radio inputs will have their 'checked' property set to false 51.780 + * - inputs of type submit, button, reset, and hidden will *not* be effected 51.781 + * - button elements will *not* be effected 51.782 + * 51.783 + * @example $('.myInputs').clearFields(); 51.784 + * @desc Clears all inputs with class myInputs 51.785 + * 51.786 + * @name clearFields 51.787 + * @type jQuery 51.788 + * @cat Plugins/Form 51.789 + */ 51.790 +$.fn.clearFields = $.fn.clearInputs = function() { 51.791 + return this.each(function() { 51.792 + var t = this.type, tag = this.tagName.toLowerCase(); 51.793 + if (t == 'text' || t == 'password' || tag == 'textarea') 51.794 + this.value = ''; 51.795 + else if (t == 'checkbox' || t == 'radio') 51.796 + this.checked = false; 51.797 + else if (tag == 'select') 51.798 + this.selectedIndex = -1; 51.799 + }); 51.800 +}; 51.801 + 51.802 + 51.803 +/** 51.804 + * Resets the form data. Causes all form elements to be reset to their original value. 51.805 + * 51.806 + * @example $('form').resetForm(); 51.807 + * @desc Resets all forms on the page. 51.808 + * 51.809 + * @name resetForm 51.810 + * @type jQuery 51.811 + * @cat Plugins/Form 51.812 + */ 51.813 +$.fn.resetForm = function() { 51.814 + return this.each(function() { 51.815 + // guard against an input with the name of 'reset' 51.816 + // note that IE reports the reset function as an 'object' 51.817 + if (typeof this.reset == 'function' || (typeof this.reset == 'object' && !this.reset.nodeType)) 51.818 + this.reset(); 51.819 + }); 51.820 +}; 51.821 + 51.822 +})(jQuery);
52.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 52.2 +++ b/web/support/javascript/hsbook.js Mon Nov 23 10:51:14 2009 +0100 52.3 @@ -0,0 +1,95 @@ 52.4 +function qid(id) { 52.5 + return id.replace(/([.:])/g, "\\$1"); 52.6 +} 52.7 + 52.8 +function beforeComment(formData, jqForm, options) { 52.9 + var form = jqForm[0]; 52.10 + if (!form.comment.value) { 52.11 + $(options.target + " span.comment_error").empty().append( 52.12 + "<span class=\"comment_error\">Your comment is empty</span>"); 52.13 + return false; 52.14 + } 52.15 + if (!form.name.value) { 52.16 + $(options.target + " span.comment_error").empty().append( 52.17 + "<span class=\"comment_error\">Please provide a name</span>"); 52.18 + return false; 52.19 + } 52.20 + $(options.target + " span.comment_error").empty().after( 52.21 + "<img src=\"/support/icons/throbber.gif\" style=\"vertical-align: middle\"/>"); 52.22 + $(options.target + " input[@name=submit]").attr("disabled", true); 52.23 +} 52.24 + 52.25 +function ajaxifyForm(id) { 52.26 + var q = qid(id); 52.27 + 52.28 + $("#form_" + q).ajaxForm({ beforeSubmit: beforeComment, 52.29 + success: function() { ajaxifyForm(id); }, 52.30 + target: "#comments_" + q }); 52.31 +} 52.32 + 52.33 +function toggleComment(id) { 52.34 + $("#toggle_" + qid(id)).nextAll().toggle(); 52.35 + return false; 52.36 +} 52.37 + 52.38 +function loadComments(id) { 52.39 + $("#comments_" + qid(id)).load(location.protocol + "//" + location.host + 52.40 + "/comments/single/" + id + "/", function() { 52.41 + ajaxifyForm(id); 52.42 + }); 52.43 + return false; 52.44 +} 52.45 + 52.46 +function loadAllComments() { 52.47 + $("a.commenttoggle").each(function() { 52.48 + var id = $(this).attr("pid"); 52.49 + if (id) { 52.50 + loadComments(id); 52.51 + } 52.52 + }); 52.53 +} 52.54 + 52.55 +$(document).ready(function() { 52.56 + function loading(id) { 52.57 + return " <span id=\"comments_" + id + "\" class=\"comment\">" + 52.58 + "<span pid=\"" + id + "\" class=\"commenttoggle\">Loading..." + 52.59 + "</span></span>"; 52.60 + } 52.61 + $("div.toc>p") 52.62 + .after("<p style='display: none;'><a onclick='return loadAllComments()'>" + 52.63 + "Load all comments (<b>slow</b>)</a></p>") 52.64 + .toggle(function() { $(this).nextAll().show("normal"); }, 52.65 + function() { $(this).nextAll().hide("normal"); }) 52.66 + .hover(function() { $(this).fadeTo("normal", 0.8); }, 52.67 + function() { $(this).fadeTo("normal", 0.35); }); 52.68 + $(".chapter p[@id]").each(function() { 52.69 + $(this).append(loading($(this).attr("id"))); 52.70 + }); 52.71 + $(".chapter table[@id].equation").each(function() { 52.72 + id = $(this).attr("id"); 52.73 + $("#" + id + " tr").after('<tr><td colspan="4">' + loading($(this).attr("id")) + '</td></tr>'); 52.74 + }); 52.75 + $(".chapter pre[@id]").each(function() { 52.76 + $(this).after(loading($(this).attr("id"))); 52.77 + }); 52.78 + var chapid = $("div.preface, div.chapter, div.appendix, div.bibliography").attr("id"); 52.79 + $("#chapterfeed").attr("href", 52.80 + $("#chapterfeed").attr("href") + chapid + "/"); 52.81 + $.getJSON(location.protocol + "//" + location.host + "/comments/chapter/" + 52.82 + chapid + "/count/", function(data) { 52.83 + $.each(data, function(id, item) { 52.84 + var s = item == 1 ? "" : "s"; 52.85 + $("#comments_" + qid(id) + " span.commenttoggle").replaceWith( 52.86 + "<a class='commenttoggle' id='toggle_" + id + "' " + 52.87 + "pid='" + id + "' " + 52.88 + "onclick='return loadComments(\"" + id + "\")' " + 52.89 + "href='comments: show / hide'>" + item + " comment" + s + "</a>"); 52.90 + }); 52.91 + $("span.commenttoggle").each(function() { 52.92 + var id = $(this).attr("pid"); 52.93 + $(this).replaceWith("<a class='commenttoggle' id='toggle_" + id + "' " + 52.94 + "onclick='return loadComments(\"" + id + "\")' " + 52.95 + "href='comment: add'>No comments</a>"); 52.96 + }); 52.97 + }); 52.98 +});
53.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 53.2 +++ b/web/support/javascript/jquery-min.js Mon Nov 23 10:51:14 2009 +0100 53.3 @@ -0,0 +1,31 @@ 53.4 +/* 53.5 + * jQuery 1.2.1 - New Wave Javascript 53.6 + * 53.7 + * Copyright (c) 2007 John Resig (jquery.com) 53.8 + * Dual licensed under the MIT (MIT-LICENSE.txt) 53.9 + * and GPL (GPL-LICENSE.txt) licenses. 53.10 + * 53.11 + * $Date: 2007-09-16 23:42:06 -0400 (Sun, 16 Sep 2007) $ 53.12 + * $Rev: 3353 $ 53.13 + */ 53.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 53.15 +selector=[];}}else 53.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 53.17 +return this[0].value.replace(/\r/g,"");}}else 53.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 53.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 53.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 53.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 53.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 53.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 53.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 53.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 53.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 53.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 53.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 53.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 53.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 53.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 53.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 53.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 53.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;}};})(); 53.35 \ No newline at end of file
54.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 54.2 +++ b/web/support/javascript/jquery.js Mon Nov 23 10:51:14 2009 +0100 54.3 @@ -0,0 +1,2992 @@ 54.4 +(function(){ 54.5 +/* 54.6 + * jQuery 1.2.1 - New Wave Javascript 54.7 + * 54.8 + * Copyright (c) 2007 John Resig (jquery.com) 54.9 + * Dual licensed under the MIT (MIT-LICENSE.txt) 54.10 + * and GPL (GPL-LICENSE.txt) licenses. 54.11 + * 54.12 + * $Date: 2007-09-16 23:42:06 -0400 (Sun, 16 Sep 2007) $ 54.13 + * $Rev: 3353 $ 54.14 + */ 54.15 + 54.16 +// Map over jQuery in case of overwrite 54.17 +if ( typeof jQuery != "undefined" ) 54.18 + var _jQuery = jQuery; 54.19 + 54.20 +var jQuery = window.jQuery = function(selector, context) { 54.21 + // If the context is a namespace object, return a new object 54.22 + return this instanceof jQuery ? 54.23 + this.init(selector, context) : 54.24 + new jQuery(selector, context); 54.25 +}; 54.26 + 54.27 +// Map over the $ in case of overwrite 54.28 +if ( typeof $ != "undefined" ) 54.29 + var _$ = $; 54.30 + 54.31 +// Map the jQuery namespace to the '$' one 54.32 +window.$ = jQuery; 54.33 + 54.34 +var quickExpr = /^[^<]*(<(.|\s)+>)[^>]*$|^#(\w+)$/; 54.35 + 54.36 +jQuery.fn = jQuery.prototype = { 54.37 + init: function(selector, context) { 54.38 + // Make sure that a selection was provided 54.39 + selector = selector || document; 54.40 + 54.41 + // Handle HTML strings 54.42 + if ( typeof selector == "string" ) { 54.43 + var m = quickExpr.exec(selector); 54.44 + if ( m && (m[1] || !context) ) { 54.45 + // HANDLE: $(html) -> $(array) 54.46 + if ( m[1] ) 54.47 + selector = jQuery.clean( [ m[1] ], context ); 54.48 + 54.49 + // HANDLE: $("#id") 54.50 + else { 54.51 + var tmp = document.getElementById( m[3] ); 54.52 + if ( tmp ) 54.53 + // Handle the case where IE and Opera return items 54.54 + // by name instead of ID 54.55 + if ( tmp.id != m[3] ) 54.56 + return jQuery().find( selector ); 54.57 + else { 54.58 + this[0] = tmp; 54.59 + this.length = 1; 54.60 + return this; 54.61 + } 54.62 + else 54.63 + selector = []; 54.64 + } 54.65 + 54.66 + // HANDLE: $(expr) 54.67 + } else 54.68 + return new jQuery( context ).find( selector ); 54.69 + 54.70 + // HANDLE: $(function) 54.71 + // Shortcut for document ready 54.72 + } else if ( jQuery.isFunction(selector) ) 54.73 + return new jQuery(document)[ jQuery.fn.ready ? "ready" : "load" ]( selector ); 54.74 + 54.75 + return this.setArray( 54.76 + // HANDLE: $(array) 54.77 + selector.constructor == Array && selector || 54.78 + 54.79 + // HANDLE: $(arraylike) 54.80 + // Watch for when an array-like object is passed as the selector 54.81 + (selector.jquery || selector.length && selector != window && !selector.nodeType && selector[0] != undefined && selector[0].nodeType) && jQuery.makeArray( selector ) || 54.82 + 54.83 + // HANDLE: $(*) 54.84 + [ selector ] ); 54.85 + }, 54.86 + 54.87 + jquery: "1.2.1", 54.88 + 54.89 + size: function() { 54.90 + return this.length; 54.91 + }, 54.92 + 54.93 + length: 0, 54.94 + 54.95 + get: function( num ) { 54.96 + return num == undefined ? 54.97 + 54.98 + // Return a 'clean' array 54.99 + jQuery.makeArray( this ) : 54.100 + 54.101 + // Return just the object 54.102 + this[num]; 54.103 + }, 54.104 + 54.105 + pushStack: function( a ) { 54.106 + var ret = jQuery(a); 54.107 + ret.prevObject = this; 54.108 + return ret; 54.109 + }, 54.110 + 54.111 + setArray: function( a ) { 54.112 + this.length = 0; 54.113 + Array.prototype.push.apply( this, a ); 54.114 + return this; 54.115 + }, 54.116 + 54.117 + each: function( fn, args ) { 54.118 + return jQuery.each( this, fn, args ); 54.119 + }, 54.120 + 54.121 + index: function( obj ) { 54.122 + var pos = -1; 54.123 + this.each(function(i){ 54.124 + if ( this == obj ) pos = i; 54.125 + }); 54.126 + return pos; 54.127 + }, 54.128 + 54.129 + attr: function( key, value, type ) { 54.130 + var obj = key; 54.131 + 54.132 + // Look for the case where we're accessing a style value 54.133 + if ( key.constructor == String ) 54.134 + if ( value == undefined ) 54.135 + return this.length && jQuery[ type || "attr" ]( this[0], key ) || undefined; 54.136 + else { 54.137 + obj = {}; 54.138 + obj[ key ] = value; 54.139 + } 54.140 + 54.141 + // Check to see if we're setting style values 54.142 + return this.each(function(index){ 54.143 + // Set all the styles 54.144 + for ( var prop in obj ) 54.145 + jQuery.attr( 54.146 + type ? this.style : this, 54.147 + prop, jQuery.prop(this, obj[prop], type, index, prop) 54.148 + ); 54.149 + }); 54.150 + }, 54.151 + 54.152 + css: function( key, value ) { 54.153 + return this.attr( key, value, "curCSS" ); 54.154 + }, 54.155 + 54.156 + text: function(e) { 54.157 + if ( typeof e != "object" && e != null ) 54.158 + return this.empty().append( document.createTextNode( e ) ); 54.159 + 54.160 + var t = ""; 54.161 + jQuery.each( e || this, function(){ 54.162 + jQuery.each( this.childNodes, function(){ 54.163 + if ( this.nodeType != 8 ) 54.164 + t += this.nodeType != 1 ? 54.165 + this.nodeValue : jQuery.fn.text([ this ]); 54.166 + }); 54.167 + }); 54.168 + return t; 54.169 + }, 54.170 + 54.171 + wrapAll: function(html) { 54.172 + if ( this[0] ) 54.173 + // The elements to wrap the target around 54.174 + jQuery(html, this[0].ownerDocument) 54.175 + .clone() 54.176 + .insertBefore(this[0]) 54.177 + .map(function(){ 54.178 + var elem = this; 54.179 + while ( elem.firstChild ) 54.180 + elem = elem.firstChild; 54.181 + return elem; 54.182 + }) 54.183 + .append(this); 54.184 + 54.185 + return this; 54.186 + }, 54.187 + 54.188 + wrapInner: function(html) { 54.189 + return this.each(function(){ 54.190 + jQuery(this).contents().wrapAll(html); 54.191 + }); 54.192 + }, 54.193 + 54.194 + wrap: function(html) { 54.195 + return this.each(function(){ 54.196 + jQuery(this).wrapAll(html); 54.197 + }); 54.198 + }, 54.199 + 54.200 + append: function() { 54.201 + return this.domManip(arguments, true, 1, function(a){ 54.202 + this.appendChild( a ); 54.203 + }); 54.204 + }, 54.205 + 54.206 + prepend: function() { 54.207 + return this.domManip(arguments, true, -1, function(a){ 54.208 + this.insertBefore( a, this.firstChild ); 54.209 + }); 54.210 + }, 54.211 + 54.212 + before: function() { 54.213 + return this.domManip(arguments, false, 1, function(a){ 54.214 + this.parentNode.insertBefore( a, this ); 54.215 + }); 54.216 + }, 54.217 + 54.218 + after: function() { 54.219 + return this.domManip(arguments, false, -1, function(a){ 54.220 + this.parentNode.insertBefore( a, this.nextSibling ); 54.221 + }); 54.222 + }, 54.223 + 54.224 + end: function() { 54.225 + return this.prevObject || jQuery([]); 54.226 + }, 54.227 + 54.228 + find: function(t) { 54.229 + var data = jQuery.map(this, function(a){ return jQuery.find(t,a); }); 54.230 + return this.pushStack( /[^+>] [^+>]/.test( t ) || t.indexOf("..") > -1 ? 54.231 + jQuery.unique( data ) : data ); 54.232 + }, 54.233 + 54.234 + clone: function(events) { 54.235 + // Do the clone 54.236 + var ret = this.map(function(){ 54.237 + return this.outerHTML ? jQuery(this.outerHTML)[0] : this.cloneNode(true); 54.238 + }); 54.239 + 54.240 + // Need to set the expando to null on the cloned set if it exists 54.241 + // removeData doesn't work here, IE removes it from the original as well 54.242 + // this is primarily for IE but the data expando shouldn't be copied over in any browser 54.243 + var clone = ret.find("*").andSelf().each(function(){ 54.244 + if ( this[ expando ] != undefined ) 54.245 + this[ expando ] = null; 54.246 + }); 54.247 + 54.248 + // Copy the events from the original to the clone 54.249 + if (events === true) 54.250 + this.find("*").andSelf().each(function(i) { 54.251 + var events = jQuery.data(this, "events"); 54.252 + for ( var type in events ) 54.253 + for ( var handler in events[type] ) 54.254 + jQuery.event.add(clone[i], type, events[type][handler], events[type][handler].data); 54.255 + }); 54.256 + 54.257 + // Return the cloned set 54.258 + return ret; 54.259 + }, 54.260 + 54.261 + filter: function(t) { 54.262 + return this.pushStack( 54.263 + jQuery.isFunction( t ) && 54.264 + jQuery.grep(this, function(el, index){ 54.265 + return t.apply(el, [index]); 54.266 + }) || 54.267 + 54.268 + jQuery.multiFilter(t,this) ); 54.269 + }, 54.270 + 54.271 + not: function(t) { 54.272 + return this.pushStack( 54.273 + t.constructor == String && 54.274 + jQuery.multiFilter(t, this, true) || 54.275 + 54.276 + jQuery.grep(this, function(a) { 54.277 + return ( t.constructor == Array || t.jquery ) 54.278 + ? jQuery.inArray( a, t ) < 0 54.279 + : a != t; 54.280 + }) 54.281 + ); 54.282 + }, 54.283 + 54.284 + add: function(t) { 54.285 + return this.pushStack( jQuery.merge( 54.286 + this.get(), 54.287 + t.constructor == String ? 54.288 + jQuery(t).get() : 54.289 + t.length != undefined && (!t.nodeName || jQuery.nodeName(t, "form")) ? 54.290 + t : [t] ) 54.291 + ); 54.292 + }, 54.293 + 54.294 + is: function(expr) { 54.295 + return expr ? jQuery.multiFilter(expr,this).length > 0 : false; 54.296 + }, 54.297 + 54.298 + hasClass: function(expr) { 54.299 + return this.is("." + expr); 54.300 + }, 54.301 + 54.302 + val: function( val ) { 54.303 + if ( val == undefined ) { 54.304 + if ( this.length ) { 54.305 + var elem = this[0]; 54.306 + 54.307 + // We need to handle select boxes special 54.308 + if ( jQuery.nodeName(elem, "select") ) { 54.309 + var index = elem.selectedIndex, 54.310 + a = [], 54.311 + options = elem.options, 54.312 + one = elem.type == "select-one"; 54.313 + 54.314 + // Nothing was selected 54.315 + if ( index < 0 ) 54.316 + return null; 54.317 + 54.318 + // Loop through all the selected options 54.319 + for ( var i = one ? index : 0, max = one ? index + 1 : options.length; i < max; i++ ) { 54.320 + var option = options[i]; 54.321 + if ( option.selected ) { 54.322 + // Get the specifc value for the option 54.323 + var val = jQuery.browser.msie && !option.attributes["value"].specified ? option.text : option.value; 54.324 + 54.325 + // We don't need an array for one selects 54.326 + if ( one ) 54.327 + return val; 54.328 + 54.329 + // Multi-Selects return an array 54.330 + a.push(val); 54.331 + } 54.332 + } 54.333 + 54.334 + return a; 54.335 + 54.336 + // Everything else, we just grab the value 54.337 + } else 54.338 + return this[0].value.replace(/\r/g, ""); 54.339 + } 54.340 + } else 54.341 + return this.each(function(){ 54.342 + if ( val.constructor == Array && /radio|checkbox/.test(this.type) ) 54.343 + this.checked = (jQuery.inArray(this.value, val) >= 0 || 54.344 + jQuery.inArray(this.name, val) >= 0); 54.345 + else if ( jQuery.nodeName(this, "select") ) { 54.346 + var tmp = val.constructor == Array ? val : [val]; 54.347 + 54.348 + jQuery("option", this).each(function(){ 54.349 + this.selected = (jQuery.inArray(this.value, tmp) >= 0 || 54.350 + jQuery.inArray(this.text, tmp) >= 0); 54.351 + }); 54.352 + 54.353 + if ( !tmp.length ) 54.354 + this.selectedIndex = -1; 54.355 + } else 54.356 + this.value = val; 54.357 + }); 54.358 + }, 54.359 + 54.360 + html: function( val ) { 54.361 + return val == undefined ? 54.362 + ( this.length ? this[0].innerHTML : null ) : 54.363 + this.empty().append( val ); 54.364 + }, 54.365 + 54.366 + replaceWith: function( val ) { 54.367 + return this.after( val ).remove(); 54.368 + }, 54.369 + 54.370 + eq: function(i){ 54.371 + return this.slice(i, i+1); 54.372 + }, 54.373 + 54.374 + slice: function() { 54.375 + return this.pushStack( Array.prototype.slice.apply( this, arguments ) ); 54.376 + }, 54.377 + 54.378 + map: function(fn) { 54.379 + return this.pushStack(jQuery.map( this, function(elem,i){ 54.380 + return fn.call( elem, i, elem ); 54.381 + })); 54.382 + }, 54.383 + 54.384 + andSelf: function() { 54.385 + return this.add( this.prevObject ); 54.386 + }, 54.387 + 54.388 + domManip: function(args, table, dir, fn) { 54.389 + var clone = this.length > 1, a; 54.390 + 54.391 + return this.each(function(){ 54.392 + if ( !a ) { 54.393 + a = jQuery.clean(args, this.ownerDocument); 54.394 + if ( dir < 0 ) 54.395 + a.reverse(); 54.396 + } 54.397 + 54.398 + var obj = this; 54.399 + 54.400 + if ( table && jQuery.nodeName(this, "table") && jQuery.nodeName(a[0], "tr") ) 54.401 + obj = this.getElementsByTagName("tbody")[0] || this.appendChild(document.createElement("tbody")); 54.402 + 54.403 + jQuery.each( a, function(){ 54.404 + var elem = clone ? this.cloneNode(true) : this; 54.405 + if ( !evalScript(0, elem) ) 54.406 + fn.call( obj, elem ); 54.407 + }); 54.408 + }); 54.409 + } 54.410 +}; 54.411 + 54.412 +function evalScript(i, elem){ 54.413 + var script = jQuery.nodeName(elem, "script"); 54.414 + 54.415 + if ( script ) { 54.416 + if ( elem.src ) 54.417 + jQuery.ajax({ url: elem.src, async: false, dataType: "script" }); 54.418 + else 54.419 + jQuery.globalEval( elem.text || elem.textContent || elem.innerHTML || "" ); 54.420 + 54.421 + if ( elem.parentNode ) 54.422 + elem.parentNode.removeChild(elem); 54.423 + 54.424 + } else if ( elem.nodeType == 1 ) 54.425 + jQuery("script", elem).each(evalScript); 54.426 + 54.427 + return script; 54.428 +} 54.429 + 54.430 +jQuery.extend = jQuery.fn.extend = function() { 54.431 + // copy reference to target object 54.432 + var target = arguments[0] || {}, a = 1, al = arguments.length, deep = false; 54.433 + 54.434 + // Handle a deep copy situation 54.435 + if ( target.constructor == Boolean ) { 54.436 + deep = target; 54.437 + target = arguments[1] || {}; 54.438 + } 54.439 + 54.440 + // extend jQuery itself if only one argument is passed 54.441 + if ( al == 1 ) { 54.442 + target = this; 54.443 + a = 0; 54.444 + } 54.445 + 54.446 + var prop; 54.447 + 54.448 + for ( ; a < al; a++ ) 54.449 + // Only deal with non-null/undefined values 54.450 + if ( (prop = arguments[a]) != null ) 54.451 + // Extend the base object 54.452 + for ( var i in prop ) { 54.453 + // Prevent never-ending loop 54.454 + if ( target == prop[i] ) 54.455 + continue; 54.456 + 54.457 + // Recurse if we're merging object values 54.458 + if ( deep && typeof prop[i] == 'object' && target[i] ) 54.459 + jQuery.extend( target[i], prop[i] ); 54.460 + 54.461 + // Don't bring in undefined values 54.462 + else if ( prop[i] != undefined ) 54.463 + target[i] = prop[i]; 54.464 + } 54.465 + 54.466 + // Return the modified object 54.467 + return target; 54.468 +}; 54.469 + 54.470 +var expando = "jQuery" + (new Date()).getTime(), uuid = 0, win = {}; 54.471 + 54.472 +jQuery.extend({ 54.473 + noConflict: function(deep) { 54.474 + window.$ = _$; 54.475 + if ( deep ) 54.476 + window.jQuery = _jQuery; 54.477 + return jQuery; 54.478 + }, 54.479 + 54.480 + // This may seem like some crazy code, but trust me when I say that this 54.481 + // is the only cross-browser way to do this. --John 54.482 + isFunction: function( fn ) { 54.483 + return !!fn && typeof fn != "string" && !fn.nodeName && 54.484 + fn.constructor != Array && /function/i.test( fn + "" ); 54.485 + }, 54.486 + 54.487 + // check if an element is in a XML document 54.488 + isXMLDoc: function(elem) { 54.489 + return elem.documentElement && !elem.body || 54.490 + elem.tagName && elem.ownerDocument && !elem.ownerDocument.body; 54.491 + }, 54.492 + 54.493 + // Evalulates a script in a global context 54.494 + // Evaluates Async. in Safari 2 :-( 54.495 + globalEval: function( data ) { 54.496 + data = jQuery.trim( data ); 54.497 + if ( data ) { 54.498 + if ( window.execScript ) 54.499 + window.execScript( data ); 54.500 + else if ( jQuery.browser.safari ) 54.501 + // safari doesn't provide a synchronous global eval 54.502 + window.setTimeout( data, 0 ); 54.503 + else 54.504 + eval.call( window, data ); 54.505 + } 54.506 + }, 54.507 + 54.508 + nodeName: function( elem, name ) { 54.509 + return elem.nodeName && elem.nodeName.toUpperCase() == name.toUpperCase(); 54.510 + }, 54.511 + 54.512 + cache: {}, 54.513 + 54.514 + data: function( elem, name, data ) { 54.515 + elem = elem == window ? win : elem; 54.516 + 54.517 + var id = elem[ expando ]; 54.518 + 54.519 + // Compute a unique ID for the element 54.520 + if ( !id ) 54.521 + id = elem[ expando ] = ++uuid; 54.522 + 54.523 + // Only generate the data cache if we're 54.524 + // trying to access or manipulate it 54.525 + if ( name && !jQuery.cache[ id ] ) 54.526 + jQuery.cache[ id ] = {}; 54.527 + 54.528 + // Prevent overriding the named cache with undefined values 54.529 + if ( data != undefined ) 54.530 + jQuery.cache[ id ][ name ] = data; 54.531 + 54.532 + // Return the named cache data, or the ID for the element 54.533 + return name ? jQuery.cache[ id ][ name ] : id; 54.534 + }, 54.535 + 54.536 + removeData: function( elem, name ) { 54.537 + elem = elem == window ? win : elem; 54.538 + 54.539 + var id = elem[ expando ]; 54.540 + 54.541 + // If we want to remove a specific section of the element's data 54.542 + if ( name ) { 54.543 + if ( jQuery.cache[ id ] ) { 54.544 + // Remove the section of cache data 54.545 + delete jQuery.cache[ id ][ name ]; 54.546 + 54.547 + // If we've removed all the data, remove the element's cache 54.548 + name = ""; 54.549 + for ( name in jQuery.cache[ id ] ) break; 54.550 + if ( !name ) 54.551 + jQuery.removeData( elem ); 54.552 + } 54.553 + 54.554 + // Otherwise, we want to remove all of the element's data 54.555 + } else { 54.556 + // Clean up the element expando 54.557 + try { 54.558 + delete elem[ expando ]; 54.559 + } catch(e){ 54.560 + // IE has trouble directly removing the expando 54.561 + // but it's ok with using removeAttribute 54.562 + if ( elem.removeAttribute ) 54.563 + elem.removeAttribute( expando ); 54.564 + } 54.565 + 54.566 + // Completely remove the data cache 54.567 + delete jQuery.cache[ id ]; 54.568 + } 54.569 + }, 54.570 + 54.571 + // args is for internal usage only 54.572 + each: function( obj, fn, args ) { 54.573 + if ( args ) { 54.574 + if ( obj.length == undefined ) 54.575 + for ( var i in obj ) 54.576 + fn.apply( obj[i], args ); 54.577 + else 54.578 + for ( var i = 0, ol = obj.length; i < ol; i++ ) 54.579 + if ( fn.apply( obj[i], args ) === false ) break; 54.580 + 54.581 + // A special, fast, case for the most common use of each 54.582 + } else { 54.583 + if ( obj.length == undefined ) 54.584 + for ( var i in obj ) 54.585 + fn.call( obj[i], i, obj[i] ); 54.586 + else 54.587 + for ( var i = 0, ol = obj.length, val = obj[0]; 54.588 + i < ol && fn.call(val,i,val) !== false; val = obj[++i] ){} 54.589 + } 54.590 + 54.591 + return obj; 54.592 + }, 54.593 + 54.594 + prop: function(elem, value, type, index, prop){ 54.595 + // Handle executable functions 54.596 + if ( jQuery.isFunction( value ) ) 54.597 + value = value.call( elem, [index] ); 54.598 + 54.599 + // exclude the following css properties to add px 54.600 + var exclude = /z-?index|font-?weight|opacity|zoom|line-?height/i; 54.601 + 54.602 + // Handle passing in a number to a CSS property 54.603 + return value && value.constructor == Number && type == "curCSS" && !exclude.test(prop) ? 54.604 + value + "px" : 54.605 + value; 54.606 + }, 54.607 + 54.608 + className: { 54.609 + // internal only, use addClass("class") 54.610 + add: function( elem, c ){ 54.611 + jQuery.each( (c || "").split(/\s+/), function(i, cur){ 54.612 + if ( !jQuery.className.has( elem.className, cur ) ) 54.613 + elem.className += ( elem.className ? " " : "" ) + cur; 54.614 + }); 54.615 + }, 54.616 + 54.617 + // internal only, use removeClass("class") 54.618 + remove: function( elem, c ){ 54.619 + elem.className = c != undefined ? 54.620 + jQuery.grep( elem.className.split(/\s+/), function(cur){ 54.621 + return !jQuery.className.has( c, cur ); 54.622 + }).join(" ") : ""; 54.623 + }, 54.624 + 54.625 + // internal only, use is(".class") 54.626 + has: function( t, c ) { 54.627 + return jQuery.inArray( c, (t.className || t).toString().split(/\s+/) ) > -1; 54.628 + } 54.629 + }, 54.630 + 54.631 + swap: function(e,o,f) { 54.632 + for ( var i in o ) { 54.633 + e.style["old"+i] = e.style[i]; 54.634 + e.style[i] = o[i]; 54.635 + } 54.636 + f.apply( e, [] ); 54.637 + for ( var i in o ) 54.638 + e.style[i] = e.style["old"+i]; 54.639 + }, 54.640 + 54.641 + css: function(e,p) { 54.642 + if ( p == "height" || p == "width" ) { 54.643 + var old = {}, oHeight, oWidth, d = ["Top","Bottom","Right","Left"]; 54.644 + 54.645 + jQuery.each( d, function(){ 54.646 + old["padding" + this] = 0; 54.647 + old["border" + this + "Width"] = 0; 54.648 + }); 54.649 + 54.650 + jQuery.swap( e, old, function() { 54.651 + if ( jQuery(e).is(':visible') ) { 54.652 + oHeight = e.offsetHeight; 54.653 + oWidth = e.offsetWidth; 54.654 + } else { 54.655 + e = jQuery(e.cloneNode(true)) 54.656 + .find(":radio").removeAttr("checked").end() 54.657 + .css({ 54.658 + visibility: "hidden", position: "absolute", display: "block", right: "0", left: "0" 54.659 + }).appendTo(e.parentNode)[0]; 54.660 + 54.661 + var parPos = jQuery.css(e.parentNode,"position") || "static"; 54.662 + if ( parPos == "static" ) 54.663 + e.parentNode.style.position = "relative"; 54.664 + 54.665 + oHeight = e.clientHeight; 54.666 + oWidth = e.clientWidth; 54.667 + 54.668 + if ( parPos == "static" ) 54.669 + e.parentNode.style.position = "static"; 54.670 + 54.671 + e.parentNode.removeChild(e); 54.672 + } 54.673 + }); 54.674 + 54.675 + return p == "height" ? oHeight : oWidth; 54.676 + } 54.677 + 54.678 + return jQuery.curCSS( e, p ); 54.679 + }, 54.680 + 54.681 + curCSS: function(elem, prop, force) { 54.682 + var ret, stack = [], swap = []; 54.683 + 54.684 + // A helper method for determining if an element's values are broken 54.685 + function color(a){ 54.686 + if ( !jQuery.browser.safari ) 54.687 + return false; 54.688 + 54.689 + var ret = document.defaultView.getComputedStyle(a,null); 54.690 + return !ret || ret.getPropertyValue("color") == ""; 54.691 + } 54.692 + 54.693 + if (prop == "opacity" && jQuery.browser.msie) { 54.694 + ret = jQuery.attr(elem.style, "opacity"); 54.695 + return ret == "" ? "1" : ret; 54.696 + } 54.697 + 54.698 + if (prop.match(/float/i)) 54.699 + prop = styleFloat; 54.700 + 54.701 + if (!force && elem.style[prop]) 54.702 + ret = elem.style[prop]; 54.703 + 54.704 + else if (document.defaultView && document.defaultView.getComputedStyle) { 54.705 + 54.706 + if (prop.match(/float/i)) 54.707 + prop = "float"; 54.708 + 54.709 + prop = prop.replace(/([A-Z])/g,"-$1").toLowerCase(); 54.710 + var cur = document.defaultView.getComputedStyle(elem, null); 54.711 + 54.712 + if ( cur && !color(elem) ) 54.713 + ret = cur.getPropertyValue(prop); 54.714 + 54.715 + // If the element isn't reporting its values properly in Safari 54.716 + // then some display: none elements are involved 54.717 + else { 54.718 + // Locate all of the parent display: none elements 54.719 + for ( var a = elem; a && color(a); a = a.parentNode ) 54.720 + stack.unshift(a); 54.721 + 54.722 + // Go through and make them visible, but in reverse 54.723 + // (It would be better if we knew the exact display type that they had) 54.724 + for ( a = 0; a < stack.length; a++ ) 54.725 + if ( color(stack[a]) ) { 54.726 + swap[a] = stack[a].style.display; 54.727 + stack[a].style.display = "block"; 54.728 + } 54.729 + 54.730 + // Since we flip the display style, we have to handle that 54.731 + // one special, otherwise get the value 54.732 + ret = prop == "display" && swap[stack.length-1] != null ? 54.733 + "none" : 54.734 + document.defaultView.getComputedStyle(elem,null).getPropertyValue(prop) || ""; 54.735 + 54.736 + // Finally, revert the display styles back 54.737 + for ( a = 0; a < swap.length; a++ ) 54.738 + if ( swap[a] != null ) 54.739 + stack[a].style.display = swap[a]; 54.740 + } 54.741 + 54.742 + if ( prop == "opacity" && ret == "" ) 54.743 + ret = "1"; 54.744 + 54.745 + } else if (elem.currentStyle) { 54.746 + var newProp = prop.replace(/\-(\w)/g,function(m,c){return c.toUpperCase();}); 54.747 + ret = elem.currentStyle[prop] || elem.currentStyle[newProp]; 54.748 + 54.749 + // From the awesome hack by Dean Edwards 54.750 + // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291 54.751 + 54.752 + // If we're not dealing with a regular pixel number 54.753 + // but a number that has a weird ending, we need to convert it to pixels 54.754 + if ( !/^\d+(px)?$/i.test(ret) && /^\d/.test(ret) ) { 54.755 + var style = elem.style.left; 54.756 + var runtimeStyle = elem.runtimeStyle.left; 54.757 + elem.runtimeStyle.left = elem.currentStyle.left; 54.758 + elem.style.left = ret || 0; 54.759 + ret = elem.style.pixelLeft + "px"; 54.760 + elem.style.left = style; 54.761 + elem.runtimeStyle.left = runtimeStyle; 54.762 + } 54.763 + } 54.764 + 54.765 + return ret; 54.766 + }, 54.767 + 54.768 + clean: function(a, doc) { 54.769 + var r = []; 54.770 + doc = doc || document; 54.771 + 54.772 + jQuery.each( a, function(i,arg){ 54.773 + if ( !arg ) return; 54.774 + 54.775 + if ( arg.constructor == Number ) 54.776 + arg = arg.toString(); 54.777 + 54.778 + // Convert html string into DOM nodes 54.779 + if ( typeof arg == "string" ) { 54.780 + // Fix "XHTML"-style tags in all browsers 54.781 + arg = arg.replace(/(<(\w+)[^>]*?)\/>/g, function(m, all, tag){ 54.782 + return tag.match(/^(abbr|br|col|img|input|link|meta|param|hr|area)$/i)? m : all+"></"+tag+">"; 54.783 + }); 54.784 + 54.785 + // Trim whitespace, otherwise indexOf won't work as expected 54.786 + var s = jQuery.trim(arg).toLowerCase(), div = doc.createElement("div"), tb = []; 54.787 + 54.788 + var wrap = 54.789 + // option or optgroup 54.790 + !s.indexOf("<opt") && 54.791 + [1, "<select>", "</select>"] || 54.792 + 54.793 + !s.indexOf("<leg") && 54.794 + [1, "<fieldset>", "</fieldset>"] || 54.795 + 54.796 + s.match(/^<(thead|tbody|tfoot|colg|cap)/) && 54.797 + [1, "<table>", "</table>"] || 54.798 + 54.799 + !s.indexOf("<tr") && 54.800 + [2, "<table><tbody>", "</tbody></table>"] || 54.801 + 54.802 + // <thead> matched above 54.803 + (!s.indexOf("<td") || !s.indexOf("<th")) && 54.804 + [3, "<table><tbody><tr>", "</tr></tbody></table>"] || 54.805 + 54.806 + !s.indexOf("<col") && 54.807 + [2, "<table><tbody></tbody><colgroup>", "</colgroup></table>"] || 54.808 + 54.809 + // IE can't serialize <link> and <script> tags normally 54.810 + jQuery.browser.msie && 54.811 + [1, "div<div>", "</div>"] || 54.812 + 54.813 + [0,"",""]; 54.814 + 54.815 + // Go to html and back, then peel off extra wrappers 54.816 + div.innerHTML = wrap[1] + arg + wrap[2]; 54.817 + 54.818 + // Move to the right depth 54.819 + while ( wrap[0]-- ) 54.820 + div = div.lastChild; 54.821 + 54.822 + // Remove IE's autoinserted <tbody> from table fragments 54.823 + if ( jQuery.browser.msie ) { 54.824 + 54.825 + // String was a <table>, *may* have spurious <tbody> 54.826 + if ( !s.indexOf("<table") && s.indexOf("<tbody") < 0 ) 54.827 + tb = div.firstChild && div.firstChild.childNodes; 54.828 + 54.829 + // String was a bare <thead> or <tfoot> 54.830 + else if ( wrap[1] == "<table>" && s.indexOf("<tbody") < 0 ) 54.831 + tb = div.childNodes; 54.832 + 54.833 + for ( var n = tb.length-1; n >= 0 ; --n ) 54.834 + if ( jQuery.nodeName(tb[n], "tbody") && !tb[n].childNodes.length ) 54.835 + tb[n].parentNode.removeChild(tb[n]); 54.836 + 54.837 + // IE completely kills leading whitespace when innerHTML is used 54.838 + if ( /^\s/.test(arg) ) 54.839 + div.insertBefore( doc.createTextNode( arg.match(/^\s*/)[0] ), div.firstChild ); 54.840 + 54.841 + } 54.842 + 54.843 + arg = jQuery.makeArray( div.childNodes ); 54.844 + } 54.845 + 54.846 + if ( 0 === arg.length && (!jQuery.nodeName(arg, "form") && !jQuery.nodeName(arg, "select")) ) 54.847 + return; 54.848 + 54.849 + if ( arg[0] == undefined || jQuery.nodeName(arg, "form") || arg.options ) 54.850 + r.push( arg ); 54.851 + else 54.852 + r = jQuery.merge( r, arg ); 54.853 + 54.854 + }); 54.855 + 54.856 + return r; 54.857 + }, 54.858 + 54.859 + attr: function(elem, name, value){ 54.860 + var fix = jQuery.isXMLDoc(elem) ? {} : jQuery.props; 54.861 + 54.862 + // Safari mis-reports the default selected property of a hidden option 54.863 + // Accessing the parent's selectedIndex property fixes it 54.864 + if ( name == "selected" && jQuery.browser.safari ) 54.865 + elem.parentNode.selectedIndex; 54.866 + 54.867 + // Certain attributes only work when accessed via the old DOM 0 way 54.868 + if ( fix[name] ) { 54.869 + if ( value != undefined ) elem[fix[name]] = value; 54.870 + return elem[fix[name]]; 54.871 + } else if ( jQuery.browser.msie && name == "style" ) 54.872 + return jQuery.attr( elem.style, "cssText", value ); 54.873 + 54.874 + else if ( value == undefined && jQuery.browser.msie && jQuery.nodeName(elem, "form") && (name == "action" || name == "method") ) 54.875 + return elem.getAttributeNode(name).nodeValue; 54.876 + 54.877 + // IE elem.getAttribute passes even for style 54.878 + else if ( elem.tagName ) { 54.879 + 54.880 + if ( value != undefined ) { 54.881 + if ( name == "type" && jQuery.nodeName(elem,"input") && elem.parentNode ) 54.882 + throw "type property can't be changed"; 54.883 + elem.setAttribute( name, value ); 54.884 + } 54.885 + 54.886 + if ( jQuery.browser.msie && /href|src/.test(name) && !jQuery.isXMLDoc(elem) ) 54.887 + return elem.getAttribute( name, 2 ); 54.888 + 54.889 + return elem.getAttribute( name ); 54.890 + 54.891 + // elem is actually elem.style ... set the style 54.892 + } else { 54.893 + // IE actually uses filters for opacity 54.894 + if ( name == "opacity" && jQuery.browser.msie ) { 54.895 + if ( value != undefined ) { 54.896 + // IE has trouble with opacity if it does not have layout 54.897 + // Force it by setting the zoom level 54.898 + elem.zoom = 1; 54.899 + 54.900 + // Set the alpha filter to set the opacity 54.901 + elem.filter = (elem.filter || "").replace(/alpha\([^)]*\)/,"") + 54.902 + (parseFloat(value).toString() == "NaN" ? "" : "alpha(opacity=" + value * 100 + ")"); 54.903 + } 54.904 + 54.905 + return elem.filter ? 54.906 + (parseFloat( elem.filter.match(/opacity=([^)]*)/)[1] ) / 100).toString() : ""; 54.907 + } 54.908 + name = name.replace(/-([a-z])/ig,function(z,b){return b.toUpperCase();}); 54.909 + if ( value != undefined ) elem[name] = value; 54.910 + return elem[name]; 54.911 + } 54.912 + }, 54.913 + 54.914 + trim: function(t){ 54.915 + return (t||"").replace(/^\s+|\s+$/g, ""); 54.916 + }, 54.917 + 54.918 + makeArray: function( a ) { 54.919 + var r = []; 54.920 + 54.921 + // Need to use typeof to fight Safari childNodes crashes 54.922 + if ( typeof a != "array" ) 54.923 + for ( var i = 0, al = a.length; i < al; i++ ) 54.924 + r.push( a[i] ); 54.925 + else 54.926 + r = a.slice( 0 ); 54.927 + 54.928 + return r; 54.929 + }, 54.930 + 54.931 + inArray: function( b, a ) { 54.932 + for ( var i = 0, al = a.length; i < al; i++ ) 54.933 + if ( a[i] == b ) 54.934 + return i; 54.935 + return -1; 54.936 + }, 54.937 + 54.938 + merge: function(first, second) { 54.939 + // We have to loop this way because IE & Opera overwrite the length 54.940 + // expando of getElementsByTagName 54.941 + 54.942 + // Also, we need to make sure that the correct elements are being returned 54.943 + // (IE returns comment nodes in a '*' query) 54.944 + if ( jQuery.browser.msie ) { 54.945 + for ( var i = 0; second[i]; i++ ) 54.946 + if ( second[i].nodeType != 8 ) 54.947 + first.push(second[i]); 54.948 + } else 54.949 + for ( var i = 0; second[i]; i++ ) 54.950 + first.push(second[i]); 54.951 + 54.952 + return first; 54.953 + }, 54.954 + 54.955 + unique: function(first) { 54.956 + var r = [], done = {}; 54.957 + 54.958 + try { 54.959 + for ( var i = 0, fl = first.length; i < fl; i++ ) { 54.960 + var id = jQuery.data(first[i]); 54.961 + if ( !done[id] ) { 54.962 + done[id] = true; 54.963 + r.push(first[i]); 54.964 + } 54.965 + } 54.966 + } catch(e) { 54.967 + r = first; 54.968 + } 54.969 + 54.970 + return r; 54.971 + }, 54.972 + 54.973 + grep: function(elems, fn, inv) { 54.974 + // If a string is passed in for the function, make a function 54.975 + // for it (a handy shortcut) 54.976 + if ( typeof fn == "string" ) 54.977 + fn = eval("false||function(a,i){return " + fn + "}"); 54.978 + 54.979 + var result = []; 54.980 + 54.981 + // Go through the array, only saving the items 54.982 + // that pass the validator function 54.983 + for ( var i = 0, el = elems.length; i < el; i++ ) 54.984 + if ( !inv && fn(elems[i],i) || inv && !fn(elems[i],i) ) 54.985 + result.push( elems[i] ); 54.986 + 54.987 + return result; 54.988 + }, 54.989 + 54.990 + map: function(elems, fn) { 54.991 + // If a string is passed in for the function, make a function 54.992 + // for it (a handy shortcut) 54.993 + if ( typeof fn == "string" ) 54.994 + fn = eval("false||function(a){return " + fn + "}"); 54.995 + 54.996 + var result = []; 54.997 + 54.998 + // Go through the array, translating each of the items to their 54.999 + // new value (or values). 54.1000 + for ( var i = 0, el = elems.length; i < el; i++ ) { 54.1001 + var val = fn(elems[i],i); 54.1002 + 54.1003 + if ( val !== null && val != undefined ) { 54.1004 + if ( val.constructor != Array ) val = [val]; 54.1005 + result = result.concat( val ); 54.1006 + } 54.1007 + } 54.1008 + 54.1009 + return result; 54.1010 + } 54.1011 +}); 54.1012 + 54.1013 +var userAgent = navigator.userAgent.toLowerCase(); 54.1014 + 54.1015 +// Figure out what browser is being used 54.1016 +jQuery.browser = { 54.1017 + version: (userAgent.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/) || [])[1], 54.1018 + safari: /webkit/.test(userAgent), 54.1019 + opera: /opera/.test(userAgent), 54.1020 + msie: /msie/.test(userAgent) && !/opera/.test(userAgent), 54.1021 + mozilla: /mozilla/.test(userAgent) && !/(compatible|webkit)/.test(userAgent) 54.1022 +}; 54.1023 + 54.1024 +var styleFloat = jQuery.browser.msie ? "styleFloat" : "cssFloat"; 54.1025 + 54.1026 +jQuery.extend({ 54.1027 + // Check to see if the W3C box model is being used 54.1028 + boxModel: !jQuery.browser.msie || document.compatMode == "CSS1Compat", 54.1029 + 54.1030 + styleFloat: jQuery.browser.msie ? "styleFloat" : "cssFloat", 54.1031 + 54.1032 + props: { 54.1033 + "for": "htmlFor", 54.1034 + "class": "className", 54.1035 + "float": styleFloat, 54.1036 + cssFloat: styleFloat, 54.1037 + styleFloat: styleFloat, 54.1038 + innerHTML: "innerHTML", 54.1039 + className: "className", 54.1040 + value: "value", 54.1041 + disabled: "disabled", 54.1042 + checked: "checked", 54.1043 + readonly: "readOnly", 54.1044 + selected: "selected", 54.1045 + maxlength: "maxLength" 54.1046 + } 54.1047 +}); 54.1048 + 54.1049 +jQuery.each({ 54.1050 + parent: "a.parentNode", 54.1051 + parents: "jQuery.dir(a,'parentNode')", 54.1052 + next: "jQuery.nth(a,2,'nextSibling')", 54.1053 + prev: "jQuery.nth(a,2,'previousSibling')", 54.1054 + nextAll: "jQuery.dir(a,'nextSibling')", 54.1055 + prevAll: "jQuery.dir(a,'previousSibling')", 54.1056 + siblings: "jQuery.sibling(a.parentNode.firstChild,a)", 54.1057 + children: "jQuery.sibling(a.firstChild)", 54.1058 + contents: "jQuery.nodeName(a,'iframe')?a.contentDocument||a.contentWindow.document:jQuery.makeArray(a.childNodes)" 54.1059 +}, function(i,n){ 54.1060 + jQuery.fn[ i ] = function(a) { 54.1061 + var ret = jQuery.map(this,n); 54.1062 + if ( a && typeof a == "string" ) 54.1063 + ret = jQuery.multiFilter(a,ret); 54.1064 + return this.pushStack( jQuery.unique(ret) ); 54.1065 + }; 54.1066 +}); 54.1067 + 54.1068 +jQuery.each({ 54.1069 + appendTo: "append", 54.1070 + prependTo: "prepend", 54.1071 + insertBefore: "before", 54.1072 + insertAfter: "after", 54.1073 + replaceAll: "replaceWith" 54.1074 +}, function(i,n){ 54.1075 + jQuery.fn[ i ] = function(){ 54.1076 + var a = arguments; 54.1077 + return this.each(function(){ 54.1078 + for ( var j = 0, al = a.length; j < al; j++ ) 54.1079 + jQuery(a[j])[n]( this ); 54.1080 + }); 54.1081 + }; 54.1082 +}); 54.1083 + 54.1084 +jQuery.each( { 54.1085 + removeAttr: function( key ) { 54.1086 + jQuery.attr( this, key, "" ); 54.1087 + this.removeAttribute( key ); 54.1088 + }, 54.1089 + addClass: function(c){ 54.1090 + jQuery.className.add(this,c); 54.1091 + }, 54.1092 + removeClass: function(c){ 54.1093 + jQuery.className.remove(this,c); 54.1094 + }, 54.1095 + toggleClass: function( c ){ 54.1096 + jQuery.className[ jQuery.className.has(this,c) ? "remove" : "add" ](this, c); 54.1097 + }, 54.1098 + remove: function(a){ 54.1099 + if ( !a || jQuery.filter( a, [this] ).r.length ) { 54.1100 + jQuery.removeData( this ); 54.1101 + this.parentNode.removeChild( this ); 54.1102 + } 54.1103 + }, 54.1104 + empty: function() { 54.1105 + // Clean up the cache 54.1106 + jQuery("*", this).each(function(){ jQuery.removeData(this); }); 54.1107 + 54.1108 + while ( this.firstChild ) 54.1109 + this.removeChild( this.firstChild ); 54.1110 + } 54.1111 +}, function(i,n){ 54.1112 + jQuery.fn[ i ] = function() { 54.1113 + return this.each( n, arguments ); 54.1114 + }; 54.1115 +}); 54.1116 + 54.1117 +jQuery.each( [ "Height", "Width" ], function(i,name){ 54.1118 + var n = name.toLowerCase(); 54.1119 + 54.1120 + jQuery.fn[ n ] = function(h) { 54.1121 + return this[0] == window ? 54.1122 + jQuery.browser.safari && self["inner" + name] || 54.1123 + jQuery.boxModel && Math.max(document.documentElement["client" + name], document.body["client" + name]) || 54.1124 + document.body["client" + name] : 54.1125 + 54.1126 + this[0] == document ? 54.1127 + Math.max( document.body["scroll" + name], document.body["offset" + name] ) : 54.1128 + 54.1129 + h == undefined ? 54.1130 + ( this.length ? jQuery.css( this[0], n ) : null ) : 54.1131 + this.css( n, h.constructor == String ? h : h + "px" ); 54.1132 + }; 54.1133 +}); 54.1134 + 54.1135 +var chars = jQuery.browser.safari && parseInt(jQuery.browser.version) < 417 ? 54.1136 + "(?:[\\w*_-]|\\\\.)" : 54.1137 + "(?:[\\w\u0128-\uFFFF*_-]|\\\\.)", 54.1138 + quickChild = new RegExp("^>\\s*(" + chars + "+)"), 54.1139 + quickID = new RegExp("^(" + chars + "+)(#)(" + chars + "+)"), 54.1140 + quickClass = new RegExp("^([#.]?)(" + chars + "*)"); 54.1141 + 54.1142 +jQuery.extend({ 54.1143 + expr: { 54.1144 + "": "m[2]=='*'||jQuery.nodeName(a,m[2])", 54.1145 + "#": "a.getAttribute('id')==m[2]", 54.1146 + ":": { 54.1147 + // Position Checks 54.1148 + lt: "i<m[3]-0", 54.1149 + gt: "i>m[3]-0", 54.1150 + nth: "m[3]-0==i", 54.1151 + eq: "m[3]-0==i", 54.1152 + first: "i==0", 54.1153 + last: "i==r.length-1", 54.1154 + even: "i%2==0", 54.1155 + odd: "i%2", 54.1156 + 54.1157 + // Child Checks 54.1158 + "first-child": "a.parentNode.getElementsByTagName('*')[0]==a", 54.1159 + "last-child": "jQuery.nth(a.parentNode.lastChild,1,'previousSibling')==a", 54.1160 + "only-child": "!jQuery.nth(a.parentNode.lastChild,2,'previousSibling')", 54.1161 + 54.1162 + // Parent Checks 54.1163 + parent: "a.firstChild", 54.1164 + empty: "!a.firstChild", 54.1165 + 54.1166 + // Text Check 54.1167 + contains: "(a.textContent||a.innerText||jQuery(a).text()||'').indexOf(m[3])>=0", 54.1168 + 54.1169 + // Visibility 54.1170 + visible: '"hidden"!=a.type&&jQuery.css(a,"display")!="none"&&jQuery.css(a,"visibility")!="hidden"', 54.1171 + hidden: '"hidden"==a.type||jQuery.css(a,"display")=="none"||jQuery.css(a,"visibility")=="hidden"', 54.1172 + 54.1173 + // Form attributes 54.1174 + enabled: "!a.disabled", 54.1175 + disabled: "a.disabled", 54.1176 + checked: "a.checked", 54.1177 + selected: "a.selected||jQuery.attr(a,'selected')", 54.1178 + 54.1179 + // Form elements 54.1180 + text: "'text'==a.type", 54.1181 + radio: "'radio'==a.type", 54.1182 + checkbox: "'checkbox'==a.type", 54.1183 + file: "'file'==a.type", 54.1184 + password: "'password'==a.type", 54.1185 + submit: "'submit'==a.type", 54.1186 + image: "'image'==a.type", 54.1187 + reset: "'reset'==a.type", 54.1188 + button: '"button"==a.type||jQuery.nodeName(a,"button")', 54.1189 + input: "/input|select|textarea|button/i.test(a.nodeName)", 54.1190 + 54.1191 + // :has() 54.1192 + has: "jQuery.find(m[3],a).length", 54.1193 + 54.1194 + // :header 54.1195 + header: "/h\\d/i.test(a.nodeName)", 54.1196 + 54.1197 + // :animated 54.1198 + animated: "jQuery.grep(jQuery.timers,function(fn){return a==fn.elem;}).length" 54.1199 + } 54.1200 + }, 54.1201 + 54.1202 + // The regular expressions that power the parsing engine 54.1203 + parse: [ 54.1204 + // Match: [@value='test'], [@foo] 54.1205 + /^(\[) *@?([\w-]+) *([!*$^~=]*) *('?"?)(.*?)\4 *\]/, 54.1206 + 54.1207 + // Match: :contains('foo') 54.1208 + /^(:)([\w-]+)\("?'?(.*?(\(.*?\))?[^(]*?)"?'?\)/, 54.1209 + 54.1210 + // Match: :even, :last-chlid, #id, .class 54.1211 + new RegExp("^([:.#]*)(" + chars + "+)") 54.1212 + ], 54.1213 + 54.1214 + multiFilter: function( expr, elems, not ) { 54.1215 + var old, cur = []; 54.1216 + 54.1217 + while ( expr && expr != old ) { 54.1218 + old = expr; 54.1219 + var f = jQuery.filter( expr, elems, not ); 54.1220 + expr = f.t.replace(/^\s*,\s*/, "" ); 54.1221 + cur = not ? elems = f.r : jQuery.merge( cur, f.r ); 54.1222 + } 54.1223 + 54.1224 + return cur; 54.1225 + }, 54.1226 + 54.1227 + find: function( t, context ) { 54.1228 + // Quickly handle non-string expressions 54.1229 + if ( typeof t != "string" ) 54.1230 + return [ t ]; 54.1231 + 54.1232 + // Make sure that the context is a DOM Element 54.1233 + if ( context && !context.nodeType ) 54.1234 + context = null; 54.1235 + 54.1236 + // Set the correct context (if none is provided) 54.1237 + context = context || document; 54.1238 + 54.1239 + // Initialize the search 54.1240 + var ret = [context], done = [], last; 54.1241 + 54.1242 + // Continue while a selector expression exists, and while 54.1243 + // we're no longer looping upon ourselves 54.1244 + while ( t && last != t ) { 54.1245 + var r = []; 54.1246 + last = t; 54.1247 + 54.1248 + t = jQuery.trim(t); 54.1249 + 54.1250 + var foundToken = false; 54.1251 + 54.1252 + // An attempt at speeding up child selectors that 54.1253 + // point to a specific element tag 54.1254 + var re = quickChild; 54.1255 + var m = re.exec(t); 54.1256 + 54.1257 + if ( m ) { 54.1258 + var nodeName = m[1].toUpperCase(); 54.1259 + 54.1260 + // Perform our own iteration and filter 54.1261 + for ( var i = 0; ret[i]; i++ ) 54.1262 + for ( var c = ret[i].firstChild; c; c = c.nextSibling ) 54.1263 + if ( c.nodeType == 1 && (nodeName == "*" || c.nodeName.toUpperCase() == nodeName.toUpperCase()) ) 54.1264 + r.push( c ); 54.1265 + 54.1266 + ret = r; 54.1267 + t = t.replace( re, "" ); 54.1268 + if ( t.indexOf(" ") == 0 ) continue; 54.1269 + foundToken = true; 54.1270 + } else { 54.1271 + re = /^([>+~])\s*(\w*)/i; 54.1272 + 54.1273 + if ( (m = re.exec(t)) != null ) { 54.1274 + r = []; 54.1275 + 54.1276 + var nodeName = m[2], merge = {}; 54.1277 + m = m[1]; 54.1278 + 54.1279 + for ( var j = 0, rl = ret.length; j < rl; j++ ) { 54.1280 + var n = m == "~" || m == "+" ? ret[j].nextSibling : ret[j].firstChild; 54.1281 + for ( ; n; n = n.nextSibling ) 54.1282 + if ( n.nodeType == 1 ) { 54.1283 + var id = jQuery.data(n); 54.1284 + 54.1285 + if ( m == "~" && merge[id] ) break; 54.1286 + 54.1287 + if (!nodeName || n.nodeName.toUpperCase() == nodeName.toUpperCase() ) { 54.1288 + if ( m == "~" ) merge[id] = true; 54.1289 + r.push( n ); 54.1290 + } 54.1291 + 54.1292 + if ( m == "+" ) break; 54.1293 + } 54.1294 + } 54.1295 + 54.1296 + ret = r; 54.1297 + 54.1298 + // And remove the token 54.1299 + t = jQuery.trim( t.replace( re, "" ) ); 54.1300 + foundToken = true; 54.1301 + } 54.1302 + } 54.1303 + 54.1304 + // See if there's still an expression, and that we haven't already 54.1305 + // matched a token 54.1306 + if ( t && !foundToken ) { 54.1307 + // Handle multiple expressions 54.1308 + if ( !t.indexOf(",") ) { 54.1309 + // Clean the result set 54.1310 + if ( context == ret[0] ) ret.shift(); 54.1311 + 54.1312 + // Merge the result sets 54.1313 + done = jQuery.merge( done, ret ); 54.1314 + 54.1315 + // Reset the context 54.1316 + r = ret = [context]; 54.1317 + 54.1318 + // Touch up the selector string 54.1319 + t = " " + t.substr(1,t.length); 54.1320 + 54.1321 + } else { 54.1322 + // Optimize for the case nodeName#idName 54.1323 + var re2 = quickID; 54.1324 + var m = re2.exec(t); 54.1325 + 54.1326 + // Re-organize the results, so that they're consistent 54.1327 + if ( m ) { 54.1328 + m = [ 0, m[2], m[3], m[1] ]; 54.1329 + 54.1330 + } else { 54.1331 + // Otherwise, do a traditional filter check for 54.1332 + // ID, class, and element selectors 54.1333 + re2 = quickClass; 54.1334 + m = re2.exec(t); 54.1335 + } 54.1336 + 54.1337 + m[2] = m[2].replace(/\\/g, ""); 54.1338 + 54.1339 + var elem = ret[ret.length-1]; 54.1340 + 54.1341 + // Try to do a global search by ID, where we can 54.1342 + if ( m[1] == "#" && elem && elem.getElementById && !jQuery.isXMLDoc(elem) ) { 54.1343 + // Optimization for HTML document case 54.1344 + var oid = elem.getElementById(m[2]); 54.1345 + 54.1346 + // Do a quick check for the existence of the actual ID attribute 54.1347 + // to avoid selecting by the name attribute in IE 54.1348 + // also check to insure id is a string to avoid selecting an element with the name of 'id' inside a form 54.1349 + if ( (jQuery.browser.msie||jQuery.browser.opera) && oid && typeof oid.id == "string" && oid.id != m[2] ) 54.1350 + oid = jQuery('[@id="'+m[2]+'"]', elem)[0]; 54.1351 + 54.1352 + // Do a quick check for node name (where applicable) so 54.1353 + // that div#foo searches will be really fast 54.1354 + ret = r = oid && (!m[3] || jQuery.nodeName(oid, m[3])) ? [oid] : []; 54.1355 + } else { 54.1356 + // We need to find all descendant elements 54.1357 + for ( var i = 0; ret[i]; i++ ) { 54.1358 + // Grab the tag name being searched for 54.1359 + var tag = m[1] == "#" && m[3] ? m[3] : m[1] != "" || m[0] == "" ? "*" : m[2]; 54.1360 + 54.1361 + // Handle IE7 being really dumb about <object>s 54.1362 + if ( tag == "*" && ret[i].nodeName.toLowerCase() == "object" ) 54.1363 + tag = "param"; 54.1364 + 54.1365 + r = jQuery.merge( r, ret[i].getElementsByTagName( tag )); 54.1366 + } 54.1367 + 54.1368 + // It's faster to filter by class and be done with it 54.1369 + if ( m[1] == "." ) 54.1370 + r = jQuery.classFilter( r, m[2] ); 54.1371 + 54.1372 + // Same with ID filtering 54.1373 + if ( m[1] == "#" ) { 54.1374 + var tmp = []; 54.1375 + 54.1376 + // Try to find the element with the ID 54.1377 + for ( var i = 0; r[i]; i++ ) 54.1378 + if ( r[i].getAttribute("id") == m[2] ) { 54.1379 + tmp = [ r[i] ]; 54.1380 + break; 54.1381 + } 54.1382 + 54.1383 + r = tmp; 54.1384 + } 54.1385 + 54.1386 + ret = r; 54.1387 + } 54.1388 + 54.1389 + t = t.replace( re2, "" ); 54.1390 + } 54.1391 + 54.1392 + } 54.1393 + 54.1394 + // If a selector string still exists 54.1395 + if ( t ) { 54.1396 + // Attempt to filter it 54.1397 + var val = jQuery.filter(t,r); 54.1398 + ret = r = val.r; 54.1399 + t = jQuery.trim(val.t); 54.1400 + } 54.1401 + } 54.1402 + 54.1403 + // An error occurred with the selector; 54.1404 + // just return an empty set instead 54.1405 + if ( t ) 54.1406 + ret = []; 54.1407 + 54.1408 + // Remove the root context 54.1409 + if ( ret && context == ret[0] ) 54.1410 + ret.shift(); 54.1411 + 54.1412 + // And combine the results 54.1413 + done = jQuery.merge( done, ret ); 54.1414 + 54.1415 + return done; 54.1416 + }, 54.1417 + 54.1418 + classFilter: function(r,m,not){ 54.1419 + m = " " + m + " "; 54.1420 + var tmp = []; 54.1421 + for ( var i = 0; r[i]; i++ ) { 54.1422 + var pass = (" " + r[i].className + " ").indexOf( m ) >= 0; 54.1423 + if ( !not && pass || not && !pass ) 54.1424 + tmp.push( r[i] ); 54.1425 + } 54.1426 + return tmp; 54.1427 + }, 54.1428 + 54.1429 + filter: function(t,r,not) { 54.1430 + var last; 54.1431 + 54.1432 + // Look for common filter expressions 54.1433 + while ( t && t != last ) { 54.1434 + last = t; 54.1435 + 54.1436 + var p = jQuery.parse, m; 54.1437 + 54.1438 + for ( var i = 0; p[i]; i++ ) { 54.1439 + m = p[i].exec( t ); 54.1440 + 54.1441 + if ( m ) { 54.1442 + // Remove what we just matched 54.1443 + t = t.substring( m[0].length ); 54.1444 + 54.1445 + m[2] = m[2].replace(/\\/g, ""); 54.1446 + break; 54.1447 + } 54.1448 + } 54.1449 + 54.1450 + if ( !m ) 54.1451 + break; 54.1452 + 54.1453 + // :not() is a special case that can be optimized by 54.1454 + // keeping it out of the expression list 54.1455 + if ( m[1] == ":" && m[2] == "not" ) 54.1456 + r = jQuery.filter(m[3], r, true).r; 54.1457 + 54.1458 + // We can get a big speed boost by filtering by class here 54.1459 + else if ( m[1] == "." ) 54.1460 + r = jQuery.classFilter(r, m[2], not); 54.1461 + 54.1462 + else if ( m[1] == "[" ) { 54.1463 + var tmp = [], type = m[3]; 54.1464 + 54.1465 + for ( var i = 0, rl = r.length; i < rl; i++ ) { 54.1466 + var a = r[i], z = a[ jQuery.props[m[2]] || m[2] ]; 54.1467 + 54.1468 + if ( z == null || /href|src|selected/.test(m[2]) ) 54.1469 + z = jQuery.attr(a,m[2]) || ''; 54.1470 + 54.1471 + if ( (type == "" && !!z || 54.1472 + type == "=" && z == m[5] || 54.1473 + type == "!=" && z != m[5] || 54.1474 + type == "^=" && z && !z.indexOf(m[5]) || 54.1475 + type == "$=" && z.substr(z.length - m[5].length) == m[5] || 54.1476 + (type == "*=" || type == "~=") && z.indexOf(m[5]) >= 0) ^ not ) 54.1477 + tmp.push( a ); 54.1478 + } 54.1479 + 54.1480 + r = tmp; 54.1481 + 54.1482 + // We can get a speed boost by handling nth-child here 54.1483 + } else if ( m[1] == ":" && m[2] == "nth-child" ) { 54.1484 + var merge = {}, tmp = [], 54.1485 + test = /(\d*)n\+?(\d*)/.exec( 54.1486 + m[3] == "even" && "2n" || m[3] == "odd" && "2n+1" || 54.1487 + !/\D/.test(m[3]) && "n+" + m[3] || m[3]), 54.1488 + first = (test[1] || 1) - 0, last = test[2] - 0; 54.1489 + 54.1490 + for ( var i = 0, rl = r.length; i < rl; i++ ) { 54.1491 + var node = r[i], parentNode = node.parentNode, id = jQuery.data(parentNode); 54.1492 + 54.1493 + if ( !merge[id] ) { 54.1494 + var c = 1; 54.1495 + 54.1496 + for ( var n = parentNode.firstChild; n; n = n.nextSibling ) 54.1497 + if ( n.nodeType == 1 ) 54.1498 + n.nodeIndex = c++; 54.1499 + 54.1500 + merge[id] = true; 54.1501 + } 54.1502 + 54.1503 + var add = false; 54.1504 + 54.1505 + if ( first == 1 ) { 54.1506 + if ( last == 0 || node.nodeIndex == last ) 54.1507 + add = true; 54.1508 + } else if ( (node.nodeIndex + last) % first == 0 ) 54.1509 + add = true; 54.1510 + 54.1511 + if ( add ^ not ) 54.1512 + tmp.push( node ); 54.1513 + } 54.1514 + 54.1515 + r = tmp; 54.1516 + 54.1517 + // Otherwise, find the expression to execute 54.1518 + } else { 54.1519 + var f = jQuery.expr[m[1]]; 54.1520 + if ( typeof f != "string" ) 54.1521 + f = jQuery.expr[m[1]][m[2]]; 54.1522 + 54.1523 + // Build a custom macro to enclose it 54.1524 + f = eval("false||function(a,i){return " + f + "}"); 54.1525 + 54.1526 + // Execute it against the current filter 54.1527 + r = jQuery.grep( r, f, not ); 54.1528 + } 54.1529 + } 54.1530 + 54.1531 + // Return an array of filtered elements (r) 54.1532 + // and the modified expression string (t) 54.1533 + return { r: r, t: t }; 54.1534 + }, 54.1535 + 54.1536 + dir: function( elem, dir ){ 54.1537 + var matched = []; 54.1538 + var cur = elem[dir]; 54.1539 + while ( cur && cur != document ) { 54.1540 + if ( cur.nodeType == 1 ) 54.1541 + matched.push( cur ); 54.1542 + cur = cur[dir]; 54.1543 + } 54.1544 + return matched; 54.1545 + }, 54.1546 + 54.1547 + nth: function(cur,result,dir,elem){ 54.1548 + result = result || 1; 54.1549 + var num = 0; 54.1550 + 54.1551 + for ( ; cur; cur = cur[dir] ) 54.1552 + if ( cur.nodeType == 1 && ++num == result ) 54.1553 + break; 54.1554 + 54.1555 + return cur; 54.1556 + }, 54.1557 + 54.1558 + sibling: function( n, elem ) { 54.1559 + var r = []; 54.1560 + 54.1561 + for ( ; n; n = n.nextSibling ) { 54.1562 + if ( n.nodeType == 1 && (!elem || n != elem) ) 54.1563 + r.push( n ); 54.1564 + } 54.1565 + 54.1566 + return r; 54.1567 + } 54.1568 +}); 54.1569 +/* 54.1570 + * A number of helper functions used for managing events. 54.1571 + * Many of the ideas behind this code orignated from 54.1572 + * Dean Edwards' addEvent library. 54.1573 + */ 54.1574 +jQuery.event = { 54.1575 + 54.1576 + // Bind an event to an element 54.1577 + // Original by Dean Edwards 54.1578 + add: function(element, type, handler, data) { 54.1579 + // For whatever reason, IE has trouble passing the window object 54.1580 + // around, causing it to be cloned in the process 54.1581 + if ( jQuery.browser.msie && element.setInterval != undefined ) 54.1582 + element = window; 54.1583 + 54.1584 + // Make sure that the function being executed has a unique ID 54.1585 + if ( !handler.guid ) 54.1586 + handler.guid = this.guid++; 54.1587 + 54.1588 + // if data is passed, bind to handler 54.1589 + if( data != undefined ) { 54.1590 + // Create temporary function pointer to original handler 54.1591 + var fn = handler; 54.1592 + 54.1593 + // Create unique handler function, wrapped around original handler 54.1594 + handler = function() { 54.1595 + // Pass arguments and context to original handler 54.1596 + return fn.apply(this, arguments); 54.1597 + }; 54.1598 + 54.1599 + // Store data in unique handler 54.1600 + handler.data = data; 54.1601 + 54.1602 + // Set the guid of unique handler to the same of original handler, so it can be removed 54.1603 + handler.guid = fn.guid; 54.1604 + } 54.1605 + 54.1606 + // Namespaced event handlers 54.1607 + var parts = type.split("."); 54.1608 + type = parts[0]; 54.1609 + handler.type = parts[1]; 54.1610 + 54.1611 + // Init the element's event structure 54.1612 + var events = jQuery.data(element, "events") || jQuery.data(element, "events", {}); 54.1613 + 54.1614 + var handle = jQuery.data(element, "handle", function(){ 54.1615 + // returned undefined or false 54.1616 + var val; 54.1617 + 54.1618 + // Handle the second event of a trigger and when 54.1619 + // an event is called after a page has unloaded 54.1620 + if ( typeof jQuery == "undefined" || jQuery.event.triggered ) 54.1621 + return val; 54.1622 + 54.1623 + val = jQuery.event.handle.apply(element, arguments); 54.1624 + 54.1625 + return val; 54.1626 + }); 54.1627 + 54.1628 + // Get the current list of functions bound to this event 54.1629 + var handlers = events[type]; 54.1630 + 54.1631 + // Init the event handler queue 54.1632 + if (!handlers) { 54.1633 + handlers = events[type] = {}; 54.1634 + 54.1635 + // And bind the global event handler to the element 54.1636 + if (element.addEventListener) 54.1637 + element.addEventListener(type, handle, false); 54.1638 + else 54.1639 + element.attachEvent("on" + type, handle); 54.1640 + } 54.1641 + 54.1642 + // Add the function to the element's handler list 54.1643 + handlers[handler.guid] = handler; 54.1644 + 54.1645 + // Keep track of which events have been used, for global triggering 54.1646 + this.global[type] = true; 54.1647 + }, 54.1648 + 54.1649 + guid: 1, 54.1650 + global: {}, 54.1651 + 54.1652 + // Detach an event or set of events from an element 54.1653 + remove: function(element, type, handler) { 54.1654 + var events = jQuery.data(element, "events"), ret, index; 54.1655 + 54.1656 + // Namespaced event handlers 54.1657 + if ( typeof type == "string" ) { 54.1658 + var parts = type.split("."); 54.1659 + type = parts[0]; 54.1660 + } 54.1661 + 54.1662 + if ( events ) { 54.1663 + // type is actually an event object here 54.1664 + if ( type && type.type ) { 54.1665 + handler = type.handler; 54.1666 + type = type.type; 54.1667 + } 54.1668 + 54.1669 + if ( !type ) { 54.1670 + for ( type in events ) 54.1671 + this.remove( element, type ); 54.1672 + 54.1673 + } else if ( events[type] ) { 54.1674 + // remove the given handler for the given type 54.1675 + if ( handler ) 54.1676 + delete events[type][handler.guid]; 54.1677 + 54.1678 + // remove all handlers for the given type 54.1679 + else 54.1680 + for ( handler in events[type] ) 54.1681 + // Handle the removal of namespaced events 54.1682 + if ( !parts[1] || events[type][handler].type == parts[1] ) 54.1683 + delete events[type][handler]; 54.1684 + 54.1685 + // remove generic event handler if no more handlers exist 54.1686 + for ( ret in events[type] ) break; 54.1687 + if ( !ret ) { 54.1688 + if (element.removeEventListener) 54.1689 + element.removeEventListener(type, jQuery.data(element, "handle"), false); 54.1690 + else 54.1691 + element.detachEvent("on" + type, jQuery.data(element, "handle")); 54.1692 + ret = null; 54.1693 + delete events[type]; 54.1694 + } 54.1695 + } 54.1696 + 54.1697 + // Remove the expando if it's no longer used 54.1698 + for ( ret in events ) break; 54.1699 + if ( !ret ) { 54.1700 + jQuery.removeData( element, "events" ); 54.1701 + jQuery.removeData( element, "handle" ); 54.1702 + } 54.1703 + } 54.1704 + }, 54.1705 + 54.1706 + trigger: function(type, data, element, donative, extra) { 54.1707 + // Clone the incoming data, if any 54.1708 + data = jQuery.makeArray(data || []); 54.1709 + 54.1710 + // Handle a global trigger 54.1711 + if ( !element ) { 54.1712 + // Only trigger if we've ever bound an event for it 54.1713 + if ( this.global[type] ) 54.1714 + jQuery("*").add([window, document]).trigger(type, data); 54.1715 + 54.1716 + // Handle triggering a single element 54.1717 + } else { 54.1718 + var val, ret, fn = jQuery.isFunction( element[ type ] || null ), 54.1719 + // Check to see if we need to provide a fake event, or not 54.1720 + evt = !data[0] || !data[0].preventDefault; 54.1721 + 54.1722 + // Pass along a fake event 54.1723 + if ( evt ) 54.1724 + data.unshift( this.fix({ type: type, target: element }) ); 54.1725 + 54.1726 + // Enforce the right trigger type 54.1727 + data[0].type = type; 54.1728 + 54.1729 + // Trigger the event 54.1730 + if ( jQuery.isFunction( jQuery.data(element, "handle") ) ) 54.1731 + val = jQuery.data(element, "handle").apply( element, data ); 54.1732 + 54.1733 + // Handle triggering native .onfoo handlers 54.1734 + if ( !fn && element["on"+type] && element["on"+type].apply( element, data ) === false ) 54.1735 + val = false; 54.1736 + 54.1737 + // Extra functions don't get the custom event object 54.1738 + if ( evt ) 54.1739 + data.shift(); 54.1740 + 54.1741 + // Handle triggering of extra function 54.1742 + if ( extra && extra.apply( element, data ) === false ) 54.1743 + val = false; 54.1744 + 54.1745 + // Trigger the native events (except for clicks on links) 54.1746 + if ( fn && donative !== false && val !== false && !(jQuery.nodeName(element, 'a') && type == "click") ) { 54.1747 + this.triggered = true; 54.1748 + element[ type ](); 54.1749 + } 54.1750 + 54.1751 + this.triggered = false; 54.1752 + } 54.1753 + 54.1754 + return val; 54.1755 + }, 54.1756 + 54.1757 + handle: function(event) { 54.1758 + // returned undefined or false 54.1759 + var val; 54.1760 + 54.1761 + // Empty object is for triggered events with no data 54.1762 + event = jQuery.event.fix( event || window.event || {} ); 54.1763 + 54.1764 + // Namespaced event handlers 54.1765 + var parts = event.type.split("."); 54.1766 + event.type = parts[0]; 54.1767 + 54.1768 + var c = jQuery.data(this, "events") && jQuery.data(this, "events")[event.type], args = Array.prototype.slice.call( arguments, 1 ); 54.1769 + args.unshift( event ); 54.1770 + 54.1771 + for ( var j in c ) { 54.1772 + // Pass in a reference to the handler function itself 54.1773 + // So that we can later remove it 54.1774 + args[0].handler = c[j]; 54.1775 + args[0].data = c[j].data; 54.1776 + 54.1777 + // Filter the functions by class 54.1778 + if ( !parts[1] || c[j].type == parts[1] ) { 54.1779 + var tmp = c[j].apply( this, args ); 54.1780 + 54.1781 + if ( val !== false ) 54.1782 + val = tmp; 54.1783 + 54.1784 + if ( tmp === false ) { 54.1785 + event.preventDefault(); 54.1786 + event.stopPropagation(); 54.1787 + } 54.1788 + } 54.1789 + } 54.1790 + 54.1791 + // Clean up added properties in IE to prevent memory leak 54.1792 + if (jQuery.browser.msie) 54.1793 + event.target = event.preventDefault = event.stopPropagation = 54.1794 + event.handler = event.data = null; 54.1795 + 54.1796 + return val; 54.1797 + }, 54.1798 + 54.1799 + fix: function(event) { 54.1800 + // store a copy of the original event object 54.1801 + // and clone to set read-only properties 54.1802 + var originalEvent = event; 54.1803 + event = jQuery.extend({}, originalEvent); 54.1804 + 54.1805 + // add preventDefault and stopPropagation since 54.1806 + // they will not work on the clone 54.1807 + event.preventDefault = function() { 54.1808 + // if preventDefault exists run it on the original event 54.1809 + if (originalEvent.preventDefault) 54.1810 + originalEvent.preventDefault(); 54.1811 + // otherwise set the returnValue property of the original event to false (IE) 54.1812 + originalEvent.returnValue = false; 54.1813 + }; 54.1814 + event.stopPropagation = function() { 54.1815 + // if stopPropagation exists run it on the original event 54.1816 + if (originalEvent.stopPropagation) 54.1817 + originalEvent.stopPropagation(); 54.1818 + // otherwise set the cancelBubble property of the original event to true (IE) 54.1819 + originalEvent.cancelBubble = true; 54.1820 + }; 54.1821 + 54.1822 + // Fix target property, if necessary 54.1823 + if ( !event.target && event.srcElement ) 54.1824 + event.target = event.srcElement; 54.1825 + 54.1826 + // check if target is a textnode (safari) 54.1827 + if (jQuery.browser.safari && event.target.nodeType == 3) 54.1828 + event.target = originalEvent.target.parentNode; 54.1829 + 54.1830 + // Add relatedTarget, if necessary 54.1831 + if ( !event.relatedTarget && event.fromElement ) 54.1832 + event.relatedTarget = event.fromElement == event.target ? event.toElement : event.fromElement; 54.1833 + 54.1834 + // Calculate pageX/Y if missing and clientX/Y available 54.1835 + if ( event.pageX == null && event.clientX != null ) { 54.1836 + var e = document.documentElement, b = document.body; 54.1837 + event.pageX = event.clientX + (e && e.scrollLeft || b.scrollLeft || 0); 54.1838 + event.pageY = event.clientY + (e && e.scrollTop || b.scrollTop || 0); 54.1839 + } 54.1840 + 54.1841 + // Add which for key events 54.1842 + if ( !event.which && (event.charCode || event.keyCode) ) 54.1843 + event.which = event.charCode || event.keyCode; 54.1844 + 54.1845 + // Add metaKey to non-Mac browsers (use ctrl for PC's and Meta for Macs) 54.1846 + if ( !event.metaKey && event.ctrlKey ) 54.1847 + event.metaKey = event.ctrlKey; 54.1848 + 54.1849 + // Add which for click: 1 == left; 2 == middle; 3 == right 54.1850 + // Note: button is not normalized, so don't use it 54.1851 + if ( !event.which && event.button ) 54.1852 + event.which = (event.button & 1 ? 1 : ( event.button & 2 ? 3 : ( event.button & 4 ? 2 : 0 ) )); 54.1853 + 54.1854 + return event; 54.1855 + } 54.1856 +}; 54.1857 + 54.1858 +jQuery.fn.extend({ 54.1859 + bind: function( type, data, fn ) { 54.1860 + return type == "unload" ? this.one(type, data, fn) : this.each(function(){ 54.1861 + jQuery.event.add( this, type, fn || data, fn && data ); 54.1862 + }); 54.1863 + }, 54.1864 + 54.1865 + one: function( type, data, fn ) { 54.1866 + return this.each(function(){ 54.1867 + jQuery.event.add( this, type, function(event) { 54.1868 + jQuery(this).unbind(event); 54.1869 + return (fn || data).apply( this, arguments); 54.1870 + }, fn && data); 54.1871 + }); 54.1872 + }, 54.1873 + 54.1874 + unbind: function( type, fn ) { 54.1875 + return this.each(function(){ 54.1876 + jQuery.event.remove( this, type, fn ); 54.1877 + }); 54.1878 + }, 54.1879 + 54.1880 + trigger: function( type, data, fn ) { 54.1881 + return this.each(function(){ 54.1882 + jQuery.event.trigger( type, data, this, true, fn ); 54.1883 + }); 54.1884 + }, 54.1885 + 54.1886 + triggerHandler: function( type, data, fn ) { 54.1887 + if ( this[0] ) 54.1888 + return jQuery.event.trigger( type, data, this[0], false, fn ); 54.1889 + }, 54.1890 + 54.1891 + toggle: function() { 54.1892 + // Save reference to arguments for access in closure 54.1893 + var a = arguments; 54.1894 + 54.1895 + return this.click(function(e) { 54.1896 + // Figure out which function to execute 54.1897 + this.lastToggle = 0 == this.lastToggle ? 1 : 0; 54.1898 + 54.1899 + // Make sure that clicks stop 54.1900 + e.preventDefault(); 54.1901 + 54.1902 + // and execute the function 54.1903 + return a[this.lastToggle].apply( this, [e] ) || false; 54.1904 + }); 54.1905 + }, 54.1906 + 54.1907 + hover: function(f,g) { 54.1908 + 54.1909 + // A private function for handling mouse 'hovering' 54.1910 + function handleHover(e) { 54.1911 + // Check if mouse(over|out) are still within the same parent element 54.1912 + var p = e.relatedTarget; 54.1913 + 54.1914 + // Traverse up the tree 54.1915 + while ( p && p != this ) try { p = p.parentNode; } catch(e) { p = this; }; 54.1916 + 54.1917 + // If we actually just moused on to a sub-element, ignore it 54.1918 + if ( p == this ) return false; 54.1919 + 54.1920 + // Execute the right function 54.1921 + return (e.type == "mouseover" ? f : g).apply(this, [e]); 54.1922 + } 54.1923 + 54.1924 + // Bind the function to the two event listeners 54.1925 + return this.mouseover(handleHover).mouseout(handleHover); 54.1926 + }, 54.1927 + 54.1928 + ready: function(f) { 54.1929 + // Attach the listeners 54.1930 + bindReady(); 54.1931 + 54.1932 + // If the DOM is already ready 54.1933 + if ( jQuery.isReady ) 54.1934 + // Execute the function immediately 54.1935 + f.apply( document, [jQuery] ); 54.1936 + 54.1937 + // Otherwise, remember the function for later 54.1938 + else 54.1939 + // Add the function to the wait list 54.1940 + jQuery.readyList.push( function() { return f.apply(this, [jQuery]); } ); 54.1941 + 54.1942 + return this; 54.1943 + } 54.1944 +}); 54.1945 + 54.1946 +jQuery.extend({ 54.1947 + /* 54.1948 + * All the code that makes DOM Ready work nicely. 54.1949 + */ 54.1950 + isReady: false, 54.1951 + readyList: [], 54.1952 + 54.1953 + // Handle when the DOM is ready 54.1954 + ready: function() { 54.1955 + // Make sure that the DOM is not already loaded 54.1956 + if ( !jQuery.isReady ) { 54.1957 + // Remember that the DOM is ready 54.1958 + jQuery.isReady = true; 54.1959 + 54.1960 + // If there are functions bound, to execute 54.1961 + if ( jQuery.readyList ) { 54.1962 + // Execute all of them 54.1963 + jQuery.each( jQuery.readyList, function(){ 54.1964 + this.apply( document ); 54.1965 + }); 54.1966 + 54.1967 + // Reset the list of functions 54.1968 + jQuery.readyList = null; 54.1969 + } 54.1970 + // Remove event listener to avoid memory leak 54.1971 + if ( jQuery.browser.mozilla || jQuery.browser.opera ) 54.1972 + document.removeEventListener( "DOMContentLoaded", jQuery.ready, false ); 54.1973 + 54.1974 + // Remove script element used by IE hack 54.1975 + if( !window.frames.length ) // don't remove if frames are present (#1187) 54.1976 + jQuery(window).load(function(){ jQuery("#__ie_init").remove(); }); 54.1977 + } 54.1978 + } 54.1979 +}); 54.1980 + 54.1981 +jQuery.each( ("blur,focus,load,resize,scroll,unload,click,dblclick," + 54.1982 + "mousedown,mouseup,mousemove,mouseover,mouseout,change,select," + 54.1983 + "submit,keydown,keypress,keyup,error").split(","), function(i,o){ 54.1984 + 54.1985 + // Handle event binding 54.1986 + jQuery.fn[o] = function(f){ 54.1987 + return f ? this.bind(o, f) : this.trigger(o); 54.1988 + }; 54.1989 +}); 54.1990 + 54.1991 +var readyBound = false; 54.1992 + 54.1993 +function bindReady(){ 54.1994 + if ( readyBound ) return; 54.1995 + readyBound = true; 54.1996 + 54.1997 + // If Mozilla is used 54.1998 + if ( jQuery.browser.mozilla || jQuery.browser.opera ) 54.1999 + // Use the handy event callback 54.2000 + document.addEventListener( "DOMContentLoaded", jQuery.ready, false ); 54.2001 + 54.2002 + // If IE is used, use the excellent hack by Matthias Miller 54.2003 + // http://www.outofhanwell.com/blog/index.php?title=the_window_onload_problem_revisited 54.2004 + else if ( jQuery.browser.msie ) { 54.2005 + 54.2006 + // Only works if you document.write() it 54.2007 + document.write("<scr" + "ipt id=__ie_init defer=true " + 54.2008 + "src=//:><\/script>"); 54.2009 + 54.2010 + // Use the defer script hack 54.2011 + var script = document.getElementById("__ie_init"); 54.2012 + 54.2013 + // script does not exist if jQuery is loaded dynamically 54.2014 + if ( script ) 54.2015 + script.onreadystatechange = function() { 54.2016 + if ( this.readyState != "complete" ) return; 54.2017 + jQuery.ready(); 54.2018 + }; 54.2019 + 54.2020 + // Clear from memory 54.2021 + script = null; 54.2022 + 54.2023 + // If Safari is used 54.2024 + } else if ( jQuery.browser.safari ) 54.2025 + // Continually check to see if the document.readyState is valid 54.2026 + jQuery.safariTimer = setInterval(function(){ 54.2027 + // loaded and complete are both valid states 54.2028 + if ( document.readyState == "loaded" || 54.2029 + document.readyState == "complete" ) { 54.2030 + 54.2031 + // If either one are found, remove the timer 54.2032 + clearInterval( jQuery.safariTimer ); 54.2033 + jQuery.safariTimer = null; 54.2034 + 54.2035 + // and execute any waiting functions 54.2036 + jQuery.ready(); 54.2037 + } 54.2038 + }, 10); 54.2039 + 54.2040 + // A fallback to window.onload, that will always work 54.2041 + jQuery.event.add( window, "load", jQuery.ready ); 54.2042 +} 54.2043 +jQuery.fn.extend({ 54.2044 + load: function( url, params, callback ) { 54.2045 + if ( jQuery.isFunction( url ) ) 54.2046 + return this.bind("load", url); 54.2047 + 54.2048 + var off = url.indexOf(" "); 54.2049 + if ( off >= 0 ) { 54.2050 + var selector = url.slice(off, url.length); 54.2051 + url = url.slice(0, off); 54.2052 + } 54.2053 + 54.2054 + callback = callback || function(){}; 54.2055 + 54.2056 + // Default to a GET request 54.2057 + var type = "GET"; 54.2058 + 54.2059 + // If the second parameter was provided 54.2060 + if ( params ) 54.2061 + // If it's a function 54.2062 + if ( jQuery.isFunction( params ) ) { 54.2063 + // We assume that it's the callback 54.2064 + callback = params; 54.2065 + params = null; 54.2066 + 54.2067 + // Otherwise, build a param string 54.2068 + } else { 54.2069 + params = jQuery.param( params ); 54.2070 + type = "POST"; 54.2071 + } 54.2072 + 54.2073 + var self = this; 54.2074 + 54.2075 + // Request the remote document 54.2076 + jQuery.ajax({ 54.2077 + url: url, 54.2078 + type: type, 54.2079 + data: params, 54.2080 + complete: function(res, status){ 54.2081 + // If successful, inject the HTML into all the matched elements 54.2082 + if ( status == "success" || status == "notmodified" ) 54.2083 + // See if a selector was specified 54.2084 + self.html( selector ? 54.2085 + // Create a dummy div to hold the results 54.2086 + jQuery("<div/>") 54.2087 + // inject the contents of the document in, removing the scripts 54.2088 + // to avoid any 'Permission Denied' errors in IE 54.2089 + .append(res.responseText.replace(/<script(.|\s)*?\/script>/g, "")) 54.2090 + 54.2091 + // Locate the specified elements 54.2092 + .find(selector) : 54.2093 + 54.2094 + // If not, just inject the full result 54.2095 + res.responseText ); 54.2096 + 54.2097 + // Add delay to account for Safari's delay in globalEval 54.2098 + setTimeout(function(){ 54.2099 + self.each( callback, [res.responseText, status, res] ); 54.2100 + }, 13); 54.2101 + } 54.2102 + }); 54.2103 + return this; 54.2104 + }, 54.2105 + 54.2106 + serialize: function() { 54.2107 + return jQuery.param(this.serializeArray()); 54.2108 + }, 54.2109 + serializeArray: function() { 54.2110 + return this.map(function(){ 54.2111 + return jQuery.nodeName(this, "form") ? 54.2112 + jQuery.makeArray(this.elements) : this; 54.2113 + }) 54.2114 + .filter(function(){ 54.2115 + return this.name && !this.disabled && 54.2116 + (this.checked || /select|textarea/i.test(this.nodeName) || 54.2117 + /text|hidden|password/i.test(this.type)); 54.2118 + }) 54.2119 + .map(function(i, elem){ 54.2120 + var val = jQuery(this).val(); 54.2121 + return val == null ? null : 54.2122 + val.constructor == Array ? 54.2123 + jQuery.map( val, function(val, i){ 54.2124 + return {name: elem.name, value: val}; 54.2125 + }) : 54.2126 + {name: elem.name, value: val}; 54.2127 + }).get(); 54.2128 + } 54.2129 +}); 54.2130 + 54.2131 +// Attach a bunch of functions for handling common AJAX events 54.2132 +jQuery.each( "ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","), function(i,o){ 54.2133 + jQuery.fn[o] = function(f){ 54.2134 + return this.bind(o, f); 54.2135 + }; 54.2136 +}); 54.2137 + 54.2138 +var jsc = (new Date).getTime(); 54.2139 + 54.2140 +jQuery.extend({ 54.2141 + get: function( url, data, callback, type ) { 54.2142 + // shift arguments if data argument was ommited 54.2143 + if ( jQuery.isFunction( data ) ) { 54.2144 + callback = data; 54.2145 + data = null; 54.2146 + } 54.2147 + 54.2148 + return jQuery.ajax({ 54.2149 + type: "GET", 54.2150 + url: url, 54.2151 + data: data, 54.2152 + success: callback, 54.2153 + dataType: type 54.2154 + }); 54.2155 + }, 54.2156 + 54.2157 + getScript: function( url, callback ) { 54.2158 + return jQuery.get(url, null, callback, "script"); 54.2159 + }, 54.2160 + 54.2161 + getJSON: function( url, data, callback ) { 54.2162 + return jQuery.get(url, data, callback, "json"); 54.2163 + }, 54.2164 + 54.2165 + post: function( url, data, callback, type ) { 54.2166 + if ( jQuery.isFunction( data ) ) { 54.2167 + callback = data; 54.2168 + data = {}; 54.2169 + } 54.2170 + 54.2171 + return jQuery.ajax({ 54.2172 + type: "POST", 54.2173 + url: url, 54.2174 + data: data, 54.2175 + success: callback, 54.2176 + dataType: type 54.2177 + }); 54.2178 + }, 54.2179 + 54.2180 + ajaxSetup: function( settings ) { 54.2181 + jQuery.extend( jQuery.ajaxSettings, settings ); 54.2182 + }, 54.2183 + 54.2184 + ajaxSettings: { 54.2185 + global: true, 54.2186 + type: "GET", 54.2187 + timeout: 0, 54.2188 + contentType: "application/x-www-form-urlencoded", 54.2189 + processData: true, 54.2190 + async: true, 54.2191 + data: null 54.2192 + }, 54.2193 + 54.2194 + // Last-Modified header cache for next request 54.2195 + lastModified: {}, 54.2196 + 54.2197 + ajax: function( s ) { 54.2198 + var jsonp, jsre = /=(\?|%3F)/g, status, data; 54.2199 + 54.2200 + // Extend the settings, but re-extend 's' so that it can be 54.2201 + // checked again later (in the test suite, specifically) 54.2202 + s = jQuery.extend(true, s, jQuery.extend(true, {}, jQuery.ajaxSettings, s)); 54.2203 + 54.2204 + // convert data if not already a string 54.2205 + if ( s.data && s.processData && typeof s.data != "string" ) 54.2206 + s.data = jQuery.param(s.data); 54.2207 + 54.2208 + // Handle JSONP Parameter Callbacks 54.2209 + if ( s.dataType == "jsonp" ) { 54.2210 + if ( s.type.toLowerCase() == "get" ) { 54.2211 + if ( !s.url.match(jsre) ) 54.2212 + s.url += (s.url.match(/\?/) ? "&" : "?") + (s.jsonp || "callback") + "=?"; 54.2213 + } else if ( !s.data || !s.data.match(jsre) ) 54.2214 + s.data = (s.data ? s.data + "&" : "") + (s.jsonp || "callback") + "=?"; 54.2215 + s.dataType = "json"; 54.2216 + } 54.2217 + 54.2218 + // Build temporary JSONP function 54.2219 + if ( s.dataType == "json" && (s.data && s.data.match(jsre) || s.url.match(jsre)) ) { 54.2220 + jsonp = "jsonp" + jsc++; 54.2221 + 54.2222 + // Replace the =? sequence both in the query string and the data 54.2223 + if ( s.data ) 54.2224 + s.data = s.data.replace(jsre, "=" + jsonp); 54.2225 + s.url = s.url.replace(jsre, "=" + jsonp); 54.2226 + 54.2227 + // We need to make sure 54.2228 + // that a JSONP style response is executed properly 54.2229 + s.dataType = "script"; 54.2230 + 54.2231 + // Handle JSONP-style loading 54.2232 + window[ jsonp ] = function(tmp){ 54.2233 + data = tmp; 54.2234 + success(); 54.2235 + complete(); 54.2236 + // Garbage collect 54.2237 + window[ jsonp ] = undefined; 54.2238 + try{ delete window[ jsonp ]; } catch(e){} 54.2239 + }; 54.2240 + } 54.2241 + 54.2242 + if ( s.dataType == "script" && s.cache == null ) 54.2243 + s.cache = false; 54.2244 + 54.2245 + if ( s.cache === false && s.type.toLowerCase() == "get" ) 54.2246 + s.url += (s.url.match(/\?/) ? "&" : "?") + "_=" + (new Date()).getTime(); 54.2247 + 54.2248 + // If data is available, append data to url for get requests 54.2249 + if ( s.data && s.type.toLowerCase() == "get" ) { 54.2250 + s.url += (s.url.match(/\?/) ? "&" : "?") + s.data; 54.2251 + 54.2252 + // IE likes to send both get and post data, prevent this 54.2253 + s.data = null; 54.2254 + } 54.2255 + 54.2256 + // Watch for a new set of requests 54.2257 + if ( s.global && ! jQuery.active++ ) 54.2258 + jQuery.event.trigger( "ajaxStart" ); 54.2259 + 54.2260 + // If we're requesting a remote document 54.2261 + // and trying to load JSON or Script 54.2262 + if ( !s.url.indexOf("http") && s.dataType == "script" ) { 54.2263 + var head = document.getElementsByTagName("head")[0]; 54.2264 + var script = document.createElement("script"); 54.2265 + script.src = s.url; 54.2266 + 54.2267 + // Handle Script loading 54.2268 + if ( !jsonp && (s.success || s.complete) ) { 54.2269 + var done = false; 54.2270 + 54.2271 + // Attach handlers for all browsers 54.2272 + script.onload = script.onreadystatechange = function(){ 54.2273 + if ( !done && (!this.readyState || 54.2274 + this.readyState == "loaded" || this.readyState == "complete") ) { 54.2275 + done = true; 54.2276 + success(); 54.2277 + complete(); 54.2278 + head.removeChild( script ); 54.2279 + } 54.2280 + }; 54.2281 + } 54.2282 + 54.2283 + head.appendChild(script); 54.2284 + 54.2285 + // We handle everything using the script element injection 54.2286 + return; 54.2287 + } 54.2288 + 54.2289 + var requestDone = false; 54.2290 + 54.2291 + // Create the request object; Microsoft failed to properly 54.2292 + // implement the XMLHttpRequest in IE7, so we use the ActiveXObject when it is available 54.2293 + var xml = window.ActiveXObject ? new ActiveXObject("Microsoft.XMLHTTP") : new XMLHttpRequest(); 54.2294 + 54.2295 + // Open the socket 54.2296 + xml.open(s.type, s.url, s.async); 54.2297 + 54.2298 + // Set the correct header, if data is being sent 54.2299 + if ( s.data ) 54.2300 + xml.setRequestHeader("Content-Type", s.contentType); 54.2301 + 54.2302 + // Set the If-Modified-Since header, if ifModified mode. 54.2303 + if ( s.ifModified ) 54.2304 + xml.setRequestHeader("If-Modified-Since", 54.2305 + jQuery.lastModified[s.url] || "Thu, 01 Jan 1970 00:00:00 GMT" ); 54.2306 + 54.2307 + // Set header so the called script knows that it's an XMLHttpRequest 54.2308 + xml.setRequestHeader("X-Requested-With", "XMLHttpRequest"); 54.2309 + 54.2310 + // Allow custom headers/mimetypes 54.2311 + if ( s.beforeSend ) 54.2312 + s.beforeSend(xml); 54.2313 + 54.2314 + if ( s.global ) 54.2315 + jQuery.event.trigger("ajaxSend", [xml, s]); 54.2316 + 54.2317 + // Wait for a response to come back 54.2318 + var onreadystatechange = function(isTimeout){ 54.2319 + // The transfer is complete and the data is available, or the request timed out 54.2320 + if ( !requestDone && xml && (xml.readyState == 4 || isTimeout == "timeout") ) { 54.2321 + requestDone = true; 54.2322 + 54.2323 + // clear poll interval 54.2324 + if (ival) { 54.2325 + clearInterval(ival); 54.2326 + ival = null; 54.2327 + } 54.2328 + 54.2329 + status = isTimeout == "timeout" && "timeout" || 54.2330 + !jQuery.httpSuccess( xml ) && "error" || 54.2331 + s.ifModified && jQuery.httpNotModified( xml, s.url ) && "notmodified" || 54.2332 + "success"; 54.2333 + 54.2334 + if ( status == "success" ) { 54.2335 + // Watch for, and catch, XML document parse errors 54.2336 + try { 54.2337 + // process the data (runs the xml through httpData regardless of callback) 54.2338 + data = jQuery.httpData( xml, s.dataType ); 54.2339 + } catch(e) { 54.2340 + status = "parsererror"; 54.2341 + } 54.2342 + } 54.2343 + 54.2344 + // Make sure that the request was successful or notmodified 54.2345 + if ( status == "success" ) { 54.2346 + // Cache Last-Modified header, if ifModified mode. 54.2347 + var modRes; 54.2348 + try { 54.2349 + modRes = xml.getResponseHeader("Last-Modified"); 54.2350 + } catch(e) {} // swallow exception thrown by FF if header is not available 54.2351 + 54.2352 + if ( s.ifModified && modRes ) 54.2353 + jQuery.lastModified[s.url] = modRes; 54.2354 + 54.2355 + // JSONP handles its own success callback 54.2356 + if ( !jsonp ) 54.2357 + success(); 54.2358 + } else 54.2359 + jQuery.handleError(s, xml, status); 54.2360 + 54.2361 + // Fire the complete handlers 54.2362 + complete(); 54.2363 + 54.2364 + // Stop memory leaks 54.2365 + if ( s.async ) 54.2366 + xml = null; 54.2367 + } 54.2368 + }; 54.2369 + 54.2370 + if ( s.async ) { 54.2371 + // don't attach the handler to the request, just poll it instead 54.2372 + var ival = setInterval(onreadystatechange, 13); 54.2373 + 54.2374 + // Timeout checker 54.2375 + if ( s.timeout > 0 ) 54.2376 + setTimeout(function(){ 54.2377 + // Check to see if the request is still happening 54.2378 + if ( xml ) { 54.2379 + // Cancel the request 54.2380 + xml.abort(); 54.2381 + 54.2382 + if( !requestDone ) 54.2383 + onreadystatechange( "timeout" ); 54.2384 + } 54.2385 + }, s.timeout); 54.2386 + } 54.2387 + 54.2388 + // Send the data 54.2389 + try { 54.2390 + xml.send(s.data); 54.2391 + } catch(e) { 54.2392 + jQuery.handleError(s, xml, null, e); 54.2393 + } 54.2394 + 54.2395 + // firefox 1.5 doesn't fire statechange for sync requests 54.2396 + if ( !s.async ) 54.2397 + onreadystatechange(); 54.2398 + 54.2399 + // return XMLHttpRequest to allow aborting the request etc. 54.2400 + return xml; 54.2401 + 54.2402 + function success(){ 54.2403 + // If a local callback was specified, fire it and pass it the data 54.2404 + if ( s.success ) 54.2405 + s.success( data, status ); 54.2406 + 54.2407 + // Fire the global callback 54.2408 + if ( s.global ) 54.2409 + jQuery.event.trigger( "ajaxSuccess", [xml, s] ); 54.2410 + } 54.2411 + 54.2412 + function complete(){ 54.2413 + // Process result 54.2414 + if ( s.complete ) 54.2415 + s.complete(xml, status); 54.2416 + 54.2417 + // The request was completed 54.2418 + if ( s.global ) 54.2419 + jQuery.event.trigger( "ajaxComplete", [xml, s] ); 54.2420 + 54.2421 + // Handle the global AJAX counter 54.2422 + if ( s.global && ! --jQuery.active ) 54.2423 + jQuery.event.trigger( "ajaxStop" ); 54.2424 + } 54.2425 + }, 54.2426 + 54.2427 + handleError: function( s, xml, status, e ) { 54.2428 + // If a local callback was specified, fire it 54.2429 + if ( s.error ) s.error( xml, status, e ); 54.2430 + 54.2431 + // Fire the global callback 54.2432 + if ( s.global ) 54.2433 + jQuery.event.trigger( "ajaxError", [xml, s, e] ); 54.2434 + }, 54.2435 + 54.2436 + // Counter for holding the number of active queries 54.2437 + active: 0, 54.2438 + 54.2439 + // Determines if an XMLHttpRequest was successful or not 54.2440 + httpSuccess: function( r ) { 54.2441 + try { 54.2442 + return !r.status && location.protocol == "file:" || 54.2443 + ( r.status >= 200 && r.status < 300 ) || r.status == 304 || 54.2444 + jQuery.browser.safari && r.status == undefined; 54.2445 + } catch(e){} 54.2446 + return false; 54.2447 + }, 54.2448 + 54.2449 + // Determines if an XMLHttpRequest returns NotModified 54.2450 + httpNotModified: function( xml, url ) { 54.2451 + try { 54.2452 + var xmlRes = xml.getResponseHeader("Last-Modified"); 54.2453 + 54.2454 + // Firefox always returns 200. check Last-Modified date 54.2455 + return xml.status == 304 || xmlRes == jQuery.lastModified[url] || 54.2456 + jQuery.browser.safari && xml.status == undefined; 54.2457 + } catch(e){} 54.2458 + return false; 54.2459 + }, 54.2460 + 54.2461 + httpData: function( r, type ) { 54.2462 + var ct = r.getResponseHeader("content-type"); 54.2463 + var xml = type == "xml" || !type && ct && ct.indexOf("xml") >= 0; 54.2464 + var data = xml ? r.responseXML : r.responseText; 54.2465 + 54.2466 + if ( xml && data.documentElement.tagName == "parsererror" ) 54.2467 + throw "parsererror"; 54.2468 + 54.2469 + // If the type is "script", eval it in global context 54.2470 + if ( type == "script" ) 54.2471 + jQuery.globalEval( data ); 54.2472 + 54.2473 + // Get the JavaScript object, if JSON is used. 54.2474 + if ( type == "json" ) 54.2475 + data = eval("(" + data + ")"); 54.2476 + 54.2477 + return data; 54.2478 + }, 54.2479 + 54.2480 + // Serialize an array of form elements or a set of 54.2481 + // key/values into a query string 54.2482 + param: function( a ) { 54.2483 + var s = []; 54.2484 + 54.2485 + // If an array was passed in, assume that it is an array 54.2486 + // of form elements 54.2487 + if ( a.constructor == Array || a.jquery ) 54.2488 + // Serialize the form elements 54.2489 + jQuery.each( a, function(){ 54.2490 + s.push( encodeURIComponent(this.name) + "=" + encodeURIComponent( this.value ) ); 54.2491 + }); 54.2492 + 54.2493 + // Otherwise, assume that it's an object of key/value pairs 54.2494 + else 54.2495 + // Serialize the key/values 54.2496 + for ( var j in a ) 54.2497 + // If the value is an array then the key names need to be repeated 54.2498 + if ( a[j] && a[j].constructor == Array ) 54.2499 + jQuery.each( a[j], function(){ 54.2500 + s.push( encodeURIComponent(j) + "=" + encodeURIComponent( this ) ); 54.2501 + }); 54.2502 + else 54.2503 + s.push( encodeURIComponent(j) + "=" + encodeURIComponent( a[j] ) ); 54.2504 + 54.2505 + // Return the resulting serialization 54.2506 + return s.join("&").replace(/%20/g, "+"); 54.2507 + } 54.2508 + 54.2509 +}); 54.2510 +jQuery.fn.extend({ 54.2511 + show: function(speed,callback){ 54.2512 + return speed ? 54.2513 + this.animate({ 54.2514 + height: "show", width: "show", opacity: "show" 54.2515 + }, speed, callback) : 54.2516 + 54.2517 + this.filter(":hidden").each(function(){ 54.2518 + this.style.display = this.oldblock ? this.oldblock : ""; 54.2519 + if ( jQuery.css(this,"display") == "none" ) 54.2520 + this.style.display = "block"; 54.2521 + }).end(); 54.2522 + }, 54.2523 + 54.2524 + hide: function(speed,callback){ 54.2525 + return speed ? 54.2526 + this.animate({ 54.2527 + height: "hide", width: "hide", opacity: "hide" 54.2528 + }, speed, callback) : 54.2529 + 54.2530 + this.filter(":visible").each(function(){ 54.2531 + this.oldblock = this.oldblock || jQuery.css(this,"display"); 54.2532 + if ( this.oldblock == "none" ) 54.2533 + this.oldblock = "block"; 54.2534 + this.style.display = "none"; 54.2535 + }).end(); 54.2536 + }, 54.2537 + 54.2538 + // Save the old toggle function 54.2539 + _toggle: jQuery.fn.toggle, 54.2540 + 54.2541 + toggle: function( fn, fn2 ){ 54.2542 + return jQuery.isFunction(fn) && jQuery.isFunction(fn2) ? 54.2543 + this._toggle( fn, fn2 ) : 54.2544 + fn ? 54.2545 + this.animate({ 54.2546 + height: "toggle", width: "toggle", opacity: "toggle" 54.2547 + }, fn, fn2) : 54.2548 + this.each(function(){ 54.2549 + jQuery(this)[ jQuery(this).is(":hidden") ? "show" : "hide" ](); 54.2550 + }); 54.2551 + }, 54.2552 + 54.2553 + slideDown: function(speed,callback){ 54.2554 + return this.animate({height: "show"}, speed, callback); 54.2555 + }, 54.2556 + 54.2557 + slideUp: function(speed,callback){ 54.2558 + return this.animate({height: "hide"}, speed, callback); 54.2559 + }, 54.2560 + 54.2561 + slideToggle: function(speed, callback){ 54.2562 + return this.animate({height: "toggle"}, speed, callback); 54.2563 + }, 54.2564 + 54.2565 + fadeIn: function(speed, callback){ 54.2566 + return this.animate({opacity: "show"}, speed, callback); 54.2567 + }, 54.2568 + 54.2569 + fadeOut: function(speed, callback){ 54.2570 + return this.animate({opacity: "hide"}, speed, callback); 54.2571 + }, 54.2572 + 54.2573 + fadeTo: function(speed,to,callback){ 54.2574 + return this.animate({opacity: to}, speed, callback); 54.2575 + }, 54.2576 + 54.2577 + animate: function( prop, speed, easing, callback ) { 54.2578 + var opt = jQuery.speed(speed, easing, callback); 54.2579 + 54.2580 + return this[ opt.queue === false ? "each" : "queue" ](function(){ 54.2581 + opt = jQuery.extend({}, opt); 54.2582 + var hidden = jQuery(this).is(":hidden"), self = this; 54.2583 + 54.2584 + for ( var p in prop ) { 54.2585 + if ( prop[p] == "hide" && hidden || prop[p] == "show" && !hidden ) 54.2586 + return jQuery.isFunction(opt.complete) && opt.complete.apply(this); 54.2587 + 54.2588 + if ( p == "height" || p == "width" ) { 54.2589 + // Store display property 54.2590 + opt.display = jQuery.css(this, "display"); 54.2591 + 54.2592 + // Make sure that nothing sneaks out 54.2593 + opt.overflow = this.style.overflow; 54.2594 + } 54.2595 + } 54.2596 + 54.2597 + if ( opt.overflow != null ) 54.2598 + this.style.overflow = "hidden"; 54.2599 + 54.2600 + opt.curAnim = jQuery.extend({}, prop); 54.2601 + 54.2602 + jQuery.each( prop, function(name, val){ 54.2603 + var e = new jQuery.fx( self, opt, name ); 54.2604 + 54.2605 + if ( /toggle|show|hide/.test(val) ) 54.2606 + e[ val == "toggle" ? hidden ? "show" : "hide" : val ]( prop ); 54.2607 + else { 54.2608 + var parts = val.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/), 54.2609 + start = e.cur(true) || 0; 54.2610 + 54.2611 + if ( parts ) { 54.2612 + var end = parseFloat(parts[2]), 54.2613 + unit = parts[3] || "px"; 54.2614 + 54.2615 + // We need to compute starting value 54.2616 + if ( unit != "px" ) { 54.2617 + self.style[ name ] = (end || 1) + unit; 54.2618 + start = ((end || 1) / e.cur(true)) * start; 54.2619 + self.style[ name ] = start + unit; 54.2620 + } 54.2621 + 54.2622 + // If a +=/-= token was provided, we're doing a relative animation 54.2623 + if ( parts[1] ) 54.2624 + end = ((parts[1] == "-=" ? -1 : 1) * end) + start; 54.2625 + 54.2626 + e.custom( start, end, unit ); 54.2627 + } else 54.2628 + e.custom( start, val, "" ); 54.2629 + } 54.2630 + }); 54.2631 + 54.2632 + // For JS strict compliance 54.2633 + return true; 54.2634 + }); 54.2635 + }, 54.2636 + 54.2637 + queue: function(type, fn){ 54.2638 + if ( jQuery.isFunction(type) ) { 54.2639 + fn = type; 54.2640 + type = "fx"; 54.2641 + } 54.2642 + 54.2643 + if ( !type || (typeof type == "string" && !fn) ) 54.2644 + return queue( this[0], type ); 54.2645 + 54.2646 + return this.each(function(){ 54.2647 + if ( fn.constructor == Array ) 54.2648 + queue(this, type, fn); 54.2649 + else { 54.2650 + queue(this, type).push( fn ); 54.2651 + 54.2652 + if ( queue(this, type).length == 1 ) 54.2653 + fn.apply(this); 54.2654 + } 54.2655 + }); 54.2656 + }, 54.2657 + 54.2658 + stop: function(){ 54.2659 + var timers = jQuery.timers; 54.2660 + 54.2661 + return this.each(function(){ 54.2662 + for ( var i = 0; i < timers.length; i++ ) 54.2663 + if ( timers[i].elem == this ) 54.2664 + timers.splice(i--, 1); 54.2665 + }).dequeue(); 54.2666 + } 54.2667 + 54.2668 +}); 54.2669 + 54.2670 +var queue = function( elem, type, array ) { 54.2671 + if ( !elem ) 54.2672 + return; 54.2673 + 54.2674 + var q = jQuery.data( elem, type + "queue" ); 54.2675 + 54.2676 + if ( !q || array ) 54.2677 + q = jQuery.data( elem, type + "queue", 54.2678 + array ? jQuery.makeArray(array) : [] ); 54.2679 + 54.2680 + return q; 54.2681 +}; 54.2682 + 54.2683 +jQuery.fn.dequeue = function(type){ 54.2684 + type = type || "fx"; 54.2685 + 54.2686 + return this.each(function(){ 54.2687 + var q = queue(this, type); 54.2688 + 54.2689 + q.shift(); 54.2690 + 54.2691 + if ( q.length ) 54.2692 + q[0].apply( this ); 54.2693 + }); 54.2694 +}; 54.2695 + 54.2696 +jQuery.extend({ 54.2697 + 54.2698 + speed: function(speed, easing, fn) { 54.2699 + var opt = speed && speed.constructor == Object ? speed : { 54.2700 + complete: fn || !fn && easing || 54.2701 + jQuery.isFunction( speed ) && speed, 54.2702 + duration: speed, 54.2703 + easing: fn && easing || easing && easing.constructor != Function && easing 54.2704 + }; 54.2705 + 54.2706 + opt.duration = (opt.duration && opt.duration.constructor == Number ? 54.2707 + opt.duration : 54.2708 + { slow: 600, fast: 200 }[opt.duration]) || 400; 54.2709 + 54.2710 + // Queueing 54.2711 + opt.old = opt.complete; 54.2712 + opt.complete = function(){ 54.2713 + jQuery(this).dequeue(); 54.2714 + if ( jQuery.isFunction( opt.old ) ) 54.2715 + opt.old.apply( this ); 54.2716 + }; 54.2717 + 54.2718 + return opt; 54.2719 + }, 54.2720 + 54.2721 + easing: { 54.2722 + linear: function( p, n, firstNum, diff ) { 54.2723 + return firstNum + diff * p; 54.2724 + }, 54.2725 + swing: function( p, n, firstNum, diff ) { 54.2726 + return ((-Math.cos(p*Math.PI)/2) + 0.5) * diff + firstNum; 54.2727 + } 54.2728 + }, 54.2729 + 54.2730 + timers: [], 54.2731 + 54.2732 + fx: function( elem, options, prop ){ 54.2733 + this.options = options; 54.2734 + this.elem = elem; 54.2735 + this.prop = prop; 54.2736 + 54.2737 + if ( !options.orig ) 54.2738 + options.orig = {}; 54.2739 + } 54.2740 + 54.2741 +}); 54.2742 + 54.2743 +jQuery.fx.prototype = { 54.2744 + 54.2745 + // Simple function for setting a style value 54.2746 + update: function(){ 54.2747 + if ( this.options.step ) 54.2748 + this.options.step.apply( this.elem, [ this.now, this ] ); 54.2749 + 54.2750 + (jQuery.fx.step[this.prop] || jQuery.fx.step._default)( this ); 54.2751 + 54.2752 + // Set display property to block for height/width animations 54.2753 + if ( this.prop == "height" || this.prop == "width" ) 54.2754 + this.elem.style.display = "block"; 54.2755 + }, 54.2756 + 54.2757 + // Get the current size 54.2758 + cur: function(force){ 54.2759 + if ( this.elem[this.prop] != null && this.elem.style[this.prop] == null ) 54.2760 + return this.elem[ this.prop ]; 54.2761 + 54.2762 + var r = parseFloat(jQuery.curCSS(this.elem, this.prop, force)); 54.2763 + return r && r > -10000 ? r : parseFloat(jQuery.css(this.elem, this.prop)) || 0; 54.2764 + }, 54.2765 + 54.2766 + // Start an animation from one number to another 54.2767 + custom: function(from, to, unit){ 54.2768 + this.startTime = (new Date()).getTime(); 54.2769 + this.start = from; 54.2770 + this.end = to; 54.2771 + this.unit = unit || this.unit || "px"; 54.2772 + this.now = this.start; 54.2773 + this.pos = this.state = 0; 54.2774 + this.update(); 54.2775 + 54.2776 + var self = this; 54.2777 + function t(){ 54.2778 + return self.step(); 54.2779 + } 54.2780 + 54.2781 + t.elem = this.elem; 54.2782 + 54.2783 + jQuery.timers.push(t); 54.2784 + 54.2785 + if ( jQuery.timers.length == 1 ) { 54.2786 + var timer = setInterval(function(){ 54.2787 + var timers = jQuery.timers; 54.2788 + 54.2789 + for ( var i = 0; i < timers.length; i++ ) 54.2790 + if ( !timers[i]() ) 54.2791 + timers.splice(i--, 1); 54.2792 + 54.2793 + if ( !timers.length ) 54.2794 + clearInterval( timer ); 54.2795 + }, 13); 54.2796 + } 54.2797 + }, 54.2798 + 54.2799 + // Simple 'show' function 54.2800 + show: function(){ 54.2801 + // Remember where we started, so that we can go back to it later 54.2802 + this.options.orig[this.prop] = jQuery.attr( this.elem.style, this.prop ); 54.2803 + this.options.show = true; 54.2804 + 54.2805 + // Begin the animation 54.2806 + this.custom(0, this.cur()); 54.2807 + 54.2808 + // Make sure that we start at a small width/height to avoid any 54.2809 + // flash of content 54.2810 + if ( this.prop == "width" || this.prop == "height" ) 54.2811 + this.elem.style[this.prop] = "1px"; 54.2812 + 54.2813 + // Start by showing the element 54.2814 + jQuery(this.elem).show(); 54.2815 + }, 54.2816 + 54.2817 + // Simple 'hide' function 54.2818 + hide: function(){ 54.2819 + // Remember where we started, so that we can go back to it later 54.2820 + this.options.orig[this.prop] = jQuery.attr( this.elem.style, this.prop ); 54.2821 + this.options.hide = true; 54.2822 + 54.2823 + // Begin the animation 54.2824 + this.custom(this.cur(), 0); 54.2825 + }, 54.2826 + 54.2827 + // Each step of an animation 54.2828 + step: function(){ 54.2829 + var t = (new Date()).getTime(); 54.2830 + 54.2831 + if ( t > this.options.duration + this.startTime ) { 54.2832 + this.now = this.end; 54.2833 + this.pos = this.state = 1; 54.2834 + this.update(); 54.2835 + 54.2836 + this.options.curAnim[ this.prop ] = true; 54.2837 + 54.2838 + var done = true; 54.2839 + for ( var i in this.options.curAnim ) 54.2840 + if ( this.options.curAnim[i] !== true ) 54.2841 + done = false; 54.2842 + 54.2843 + if ( done ) { 54.2844 + if ( this.options.display != null ) { 54.2845 + // Reset the overflow 54.2846 + this.elem.style.overflow = this.options.overflow; 54.2847 + 54.2848 + // Reset the display 54.2849 + this.elem.style.display = this.options.display; 54.2850 + if ( jQuery.css(this.elem, "display") == "none" ) 54.2851 + this.elem.style.display = "block"; 54.2852 + } 54.2853 + 54.2854 + // Hide the element if the "hide" operation was done 54.2855 + if ( this.options.hide ) 54.2856 + this.elem.style.display = "none"; 54.2857 + 54.2858 + // Reset the properties, if the item has been hidden or shown 54.2859 + if ( this.options.hide || this.options.show ) 54.2860 + for ( var p in this.options.curAnim ) 54.2861 + jQuery.attr(this.elem.style, p, this.options.orig[p]); 54.2862 + } 54.2863 + 54.2864 + // If a callback was provided, execute it 54.2865 + if ( done && jQuery.isFunction( this.options.complete ) ) 54.2866 + // Execute the complete function 54.2867 + this.options.complete.apply( this.elem ); 54.2868 + 54.2869 + return false; 54.2870 + } else { 54.2871 + var n = t - this.startTime; 54.2872 + this.state = n / this.options.duration; 54.2873 + 54.2874 + // Perform the easing function, defaults to swing 54.2875 + this.pos = jQuery.easing[this.options.easing || (jQuery.easing.swing ? "swing" : "linear")](this.state, n, 0, 1, this.options.duration); 54.2876 + this.now = this.start + ((this.end - this.start) * this.pos); 54.2877 + 54.2878 + // Perform the next step of the animation 54.2879 + this.update(); 54.2880 + } 54.2881 + 54.2882 + return true; 54.2883 + } 54.2884 + 54.2885 +}; 54.2886 + 54.2887 +jQuery.fx.step = { 54.2888 + scrollLeft: function(fx){ 54.2889 + fx.elem.scrollLeft = fx.now; 54.2890 + }, 54.2891 + 54.2892 + scrollTop: function(fx){ 54.2893 + fx.elem.scrollTop = fx.now; 54.2894 + }, 54.2895 + 54.2896 + opacity: function(fx){ 54.2897 + jQuery.attr(fx.elem.style, "opacity", fx.now); 54.2898 + }, 54.2899 + 54.2900 + _default: function(fx){ 54.2901 + fx.elem.style[ fx.prop ] = fx.now + fx.unit; 54.2902 + } 54.2903 +}; 54.2904 +// The Offset Method 54.2905 +// Originally By Brandon Aaron, part of the Dimension Plugin 54.2906 +// http://jquery.com/plugins/project/dimensions 54.2907 +jQuery.fn.offset = function() { 54.2908 + var left = 0, top = 0, elem = this[0], results; 54.2909 + 54.2910 + if ( elem ) with ( jQuery.browser ) { 54.2911 + var absolute = jQuery.css(elem, "position") == "absolute", 54.2912 + parent = elem.parentNode, 54.2913 + offsetParent = elem.offsetParent, 54.2914 + doc = elem.ownerDocument, 54.2915 + safari2 = safari && parseInt(version) < 522; 54.2916 + 54.2917 + // Use getBoundingClientRect if available 54.2918 + if ( elem.getBoundingClientRect ) { 54.2919 + box = elem.getBoundingClientRect(); 54.2920 + 54.2921 + // Add the document scroll offsets 54.2922 + add( 54.2923 + box.left + Math.max(doc.documentElement.scrollLeft, doc.body.scrollLeft), 54.2924 + box.top + Math.max(doc.documentElement.scrollTop, doc.body.scrollTop) 54.2925 + ); 54.2926 + 54.2927 + // IE adds the HTML element's border, by default it is medium which is 2px 54.2928 + // IE 6 and IE 7 quirks mode the border width is overwritable by the following css html { border: 0; } 54.2929 + // IE 7 standards mode, the border is always 2px 54.2930 + if ( msie ) { 54.2931 + var border = jQuery("html").css("borderWidth"); 54.2932 + border = (border == "medium" || jQuery.boxModel && parseInt(version) >= 7) && 2 || border; 54.2933 + add( -border, -border ); 54.2934 + } 54.2935 + 54.2936 + // Otherwise loop through the offsetParents and parentNodes 54.2937 + } else { 54.2938 + 54.2939 + // Initial element offsets 54.2940 + add( elem.offsetLeft, elem.offsetTop ); 54.2941 + 54.2942 + // Get parent offsets 54.2943 + while ( offsetParent ) { 54.2944 + // Add offsetParent offsets 54.2945 + add( offsetParent.offsetLeft, offsetParent.offsetTop ); 54.2946 + 54.2947 + // Mozilla and Safari > 2 does not include the border on offset parents 54.2948 + // However Mozilla adds the border for table cells 54.2949 + if ( mozilla && /^t[d|h]$/i.test(parent.tagName) || !safari2 ) 54.2950 + border( offsetParent ); 54.2951 + 54.2952 + // Safari <= 2 doubles body offsets with an absolutely positioned element or parent 54.2953 + if ( safari2 && !absolute && jQuery.css(offsetParent, "position") == "absolute" ) 54.2954 + absolute = true; 54.2955 + 54.2956 + // Get next offsetParent 54.2957 + offsetParent = offsetParent.offsetParent; 54.2958 + } 54.2959 + 54.2960 + // Get parent scroll offsets 54.2961 + while ( parent.tagName && !/^body|html$/i.test(parent.tagName) ) { 54.2962 + // Work around opera inline/table scrollLeft/Top bug 54.2963 + if ( !/^inline|table-row.*$/i.test(jQuery.css(parent, "display")) ) 54.2964 + // Subtract parent scroll offsets 54.2965 + add( -parent.scrollLeft, -parent.scrollTop ); 54.2966 + 54.2967 + // Mozilla does not add the border for a parent that has overflow != visible 54.2968 + if ( mozilla && jQuery.css(parent, "overflow") != "visible" ) 54.2969 + border( parent ); 54.2970 + 54.2971 + // Get next parent 54.2972 + parent = parent.parentNode; 54.2973 + } 54.2974 + 54.2975 + // Safari doubles body offsets with an absolutely positioned element or parent 54.2976 + if ( safari2 && absolute ) 54.2977 + add( -doc.body.offsetLeft, -doc.body.offsetTop ); 54.2978 + } 54.2979 + 54.2980 + // Return an object with top and left properties 54.2981 + results = { top: top, left: left }; 54.2982 + } 54.2983 + 54.2984 + return results; 54.2985 + 54.2986 + function border(elem) { 54.2987 + add( jQuery.css(elem, "borderLeftWidth"), jQuery.css(elem, "borderTopWidth") ); 54.2988 + } 54.2989 + 54.2990 + function add(l, t) { 54.2991 + left += parseInt(l) || 0; 54.2992 + top += parseInt(t) || 0; 54.2993 + } 54.2994 +}; 54.2995 +})();
55.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 55.2 +++ b/web/support/styles/styles.css Mon Nov 23 10:51:14 2009 +0100 55.3 @@ -0,0 +1,293 @@ 55.4 +body { 55.5 + background: #F2F1F0; 55.6 + font-family: verdana,sans-serif; 55.7 +} 55.8 + 55.9 +.navheader, .book, .preface, .chapter, .appendix, .bibliography, .navfooter, .basetemplate { 55.10 + width: 50em; 55.11 + margin-left: auto; 55.12 + margin-right: auto; 55.13 +} 55.14 + 55.15 +a.commenttoggle:hover, a.commenttoggle:active { 55.16 + opacity: 0.7; 55.17 +} 55.18 + 55.19 +.book, .preface, .chapter, .appendix, .bibliography, .basetemplate { 55.20 + background: white; 55.21 + padding: 2em; 55.22 +} 55.23 + 55.24 +h1 { 55.25 + margin-top: 1.5em; 55.26 +} 55.27 + 55.28 +span.beta { 55.29 + font-size: 80%; 55.30 + font-style: italic; 55.31 + opacity: 0.4; 55.32 +} 55.33 + 55.34 +h2, h3 { 55.35 + margin-top: 2em; 55.36 +} 55.37 + 55.38 +h1, h2, h3 { 55.39 + font-family: georgia,serif; 55.40 + font-weight: normal; 55.41 + margin-bottom: 0.5em; 55.42 +} 55.43 + 55.44 +h1.booktitle { 55.45 + margin-bottom: 0px; 55.46 +} 55.47 + 55.48 +h2.booktitle { 55.49 + text-align: center; 55.50 +} 55.51 + 55.52 +h2.booktitle > a { 55.53 + color: black; 55.54 +} 55.55 + 55.56 +.authors { 55.57 + font-size: 80%; 55.58 + opacity: 0.55; 55.59 + padding-left: 0.5em; 55.60 +} 55.61 + 55.62 +div.note th, div.tip th, div.warning th { 55.63 + font-family: georgia,serif; 55.64 + font-weight: normal; 55.65 + font-size: 110%; 55.66 +} 55.67 + 55.68 +div.navheader th, div.navfooter td { 55.69 + font-family: georgia,serif; 55.70 +} 55.71 + 55.72 +div.navheader th { 55.73 + opacity: 0; 55.74 + font-size: 0; 55.75 +} 55.76 + 55.77 +pre.screen { 55.78 + background-image: url(/support/icons/shell.png); 55.79 +} 55.80 + 55.81 +pre.programlisting { 55.82 + background-image: url(/support/icons/source.png); 55.83 +} 55.84 + 55.85 +pre.programlisting, pre.screen, p.remark { 55.86 + border-style: solid; 55.87 + border-width: 1px; 55.88 + font-size: medium; 55.89 + padding: 1em; 55.90 + background-repeat: no-repeat; 55.91 + background-position: 10px 10px; 55.92 + padding-left: 70px; 55.93 +} 55.94 + 55.95 +strong.command, code, pre, span.type { 55.96 + font-family: monospace; 55.97 + font-weight: normal; 55.98 +} 55.99 + 55.100 +strong.userinput > code { 55.101 + font-weight: bolder; 55.102 + color: #303030; 55.103 +} 55.104 + 55.105 +div.toc > p { 55.106 + opacity: 0.35; 55.107 + font-family: georgia,serif; 55.108 + cursor: pointer; 55.109 +} 55.110 + 55.111 +div.toc b { 55.112 + font-weight: normal; 55.113 + font-size: large; 55.114 +} 55.115 + 55.116 +ul.booktoc { 55.117 + padding-left: 0px; 55.118 + list-style-type: none; 55.119 +} 55.120 + 55.121 +.booktoc > li { 55.122 + padding: 0.5em; 55.123 +} 55.124 + 55.125 +.chapinfo { 55.126 + float: right; 55.127 + color: #a0a0a0; 55.128 +} 55.129 + 55.130 +.unpublished { 55.131 + color: #a0a0a0; 55.132 +} 55.133 + 55.134 +.chapinfo img { 55.135 + vertical-align: -35%; 55.136 + border: 0px; 55.137 +} 55.138 + 55.139 +.zebra_b { 55.140 + background: #f4f4f4; 55.141 +} 55.142 + 55.143 +.book .titlepage { 55.144 + display: none; 55.145 +} 55.146 + 55.147 +.chapter div.toc > dl { 55.148 + display: none; 55.149 +} 55.150 + 55.151 +pre.programlisting, pre.screen, p.remark { 55.152 + overflow: hidden; 55.153 +} 55.154 + 55.155 +p.remark { 55.156 + background-image: url(/support/icons/remark.png); 55.157 +} 55.158 + 55.159 +div.warning, p.remark { 55.160 + background-color: #FFEFE8; 55.161 + border-color: #e0a8a0; 55.162 +} 55.163 + 55.164 +span.remark { 55.165 + font-style: normal; 55.166 + color: #707070; 55.167 +} 55.168 + 55.169 +.screen { 55.170 + background: #e7ffc7 none repeat scroll 0% 50%; 55.171 + border-color: #94DA3A; 55.172 +} 55.173 + 55.174 +.programlisting { 55.175 + background: #F0F4FF none repeat scroll 0% 50%; 55.176 + border-color: #B4BAEA; 55.177 +} 55.178 + 55.179 +.prompt { 55.180 + color: #448844; 55.181 +} 55.182 + 55.183 +div.note, div.tip { 55.184 + background: #ffffc9; 55.185 + border-color: #B4BAEA; 55.186 +} 55.187 + 55.188 +div.note, div.warning, div.tip { 55.189 + border-style: solid; 55.190 + border-width: 1px; 55.191 + padding: 1em; 55.192 +} 55.193 + 55.194 +.note .title { 55.195 + font-size: 90%; 55.196 +} 55.197 + 55.198 +.comment { 55.199 + font-size: 80%; 55.200 +} 55.201 + 55.202 +div.comment, div.new_comment { 55.203 + padding: 0.5em; 55.204 + margin: 0.5em; 55.205 + margin-left: 2em; 55.206 + border-style: solid; 55.207 + border-width: 1px; 55.208 + border-color: #aaaaff; 55.209 +} 55.210 + 55.211 +div.comment { 55.212 + background: #eeeeff; 55.213 +} 55.214 + 55.215 +div.new_comment { 55.216 + background: #d0d0ff; 55.217 +} 55.218 + 55.219 +.commenttoggle { 55.220 + opacity: 0.35; 55.221 +} 55.222 + 55.223 +.comment_help { 55.224 + font-size: 80%; 55.225 +} 55.226 + 55.227 +.comment_header { 55.228 + opacity: 0.75; 55.229 +} 55.230 + 55.231 +.comment_id { 55.232 + float: right; 55.233 + opacity: 0.3; 55.234 + font-size: 60%; 55.235 +} 55.236 + 55.237 +.comment_name { 55.238 + font-weight: bolder; 55.239 +} 55.240 + 55.241 +.comment_reviewed { 55.242 + color: darkgreen; 55.243 + margin-left: 1em; 55.244 + font-style: italic; 55.245 +} 55.246 + 55.247 +.comment_date { 55.248 + opacity: 0.75; 55.249 +} 55.250 + 55.251 +.comment_thanks { 55.252 + color: darkblue; 55.253 + margin-left: 1em; 55.254 + font-style: italic; 55.255 + font-weight: bolder; 55.256 +} 55.257 + 55.258 +.comment_error { 55.259 + padding-left: 1em; 55.260 + font-weight: bolder; 55.261 + font-size: 80%; 55.262 + color: darkred; 55.263 +} 55.264 + 55.265 +.hgbookfooter { 55.266 + width: 60em; 55.267 + margin-left: auto; 55.268 + margin-right: auto; 55.269 + margin-top: 2em; 55.270 + padding: 2em; 55.271 + margin-bottom: 2em; 55.272 + font-size: 80%; 55.273 + color: #727272; 55.274 + border-top: 1px solid grey; 55.275 +} 55.276 + 55.277 +.hgbookfooter a { 55.278 + color: #5555ff; 55.279 +} 55.280 + 55.281 +.hgbookfooter a:visited { 55.282 + opacity: 0.7; 55.283 +} 55.284 + 55.285 +.hgbookfooter img { 55.286 + vertical-align: -45%; 55.287 +} 55.288 + 55.289 +table.equation a.commenttoggle { 55.290 + text-align: right; 55.291 + display: block; 55.292 +} 55.293 + 55.294 +div.comment, div.new_comment, form.comment { 55.295 + text-align: left; 55.296 +}