LOGCXX-500: I wasn't sure about the conflict merging before after merging "master" and simply did it again.

# Conflicts:
#	pom.xml
#	src/main/cpp/appenderskeleton.cpp
#	src/main/cpp/asyncappender.cpp
#	src/main/cpp/fileappender.cpp
#	src/main/cpp/gzcompressaction.cpp
#	src/main/cpp/locationinfo.cpp
#	src/main/cpp/logger.cpp
#	src/main/cpp/loggingevent.cpp
#	src/main/cpp/mutex.cpp
#	src/main/cpp/objectoutputstream.cpp
#	src/main/cpp/odbcappender.cpp
#	src/main/cpp/rollingfileappender.cpp
#	src/main/cpp/smtpappender.cpp
#	src/main/cpp/socket.cpp
#	src/main/cpp/socketappender.cpp
#	src/main/cpp/socketappenderskeleton.cpp
#	src/main/cpp/threadcxx.cpp
#	src/main/cpp/writerappender.cpp
#	src/main/cpp/zipcompressaction.cpp
#	src/main/include/log4cxx/appenderskeleton.h
#	src/main/include/log4cxx/asyncappender.h
#	src/main/include/log4cxx/helpers/messagebuffer.h
#	src/main/include/log4cxx/helpers/objectoutputstream.h
#	src/main/include/log4cxx/helpers/objectptr.h
#	src/main/include/log4cxx/helpers/thread.h
#	src/main/include/log4cxx/net/socketappender.h
#	src/main/include/log4cxx/net/telnetappender.h
#	src/main/include/log4cxx/rolling/timebasedrollingpolicy.h
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..6b1565d
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,29 @@
+.deps
+.dirstamp
+*.lo
+*.m4
+*.o
+*.swp
+
+ar-lib
+config**
+depcomp
+install-sh
+liblog4cxx.pc
+libtool
+ltmain.sh
+Makefile
+Makefile.in
+missing
+pom.xml.releaseBackup
+release.properties
+
+autom4te.cache/
+src/main/cpp/.libs/
+src/main/cpp/liblog4cxx.la
+src/main/include/log4cxx/log4cxx.h
+src/main/include/log4cxx/private/log4cxx_private.h
+src/site/doxy/Doxyfile
+src/site/doxy/manual/
+src/test/resources/output/
+target/
diff --git a/INSTALL b/INSTALL
index 6f568a8..89baa3e 100644
--- a/INSTALL
+++ b/INSTALL
@@ -36,122 +36,3 @@
 Apple Xcode:
 site/building/xcode.html
 src/site/apt/building/xcode.apt
-
-
-
-
-Introduction
-============
-Apache log4cxx is a C++ transliteration of Apache log4j.
-
-
-
-Maven 2:
-==================
-
-Maven 2  used to prepare site documentation and will be used to package the release.
-TODO: add more documentation.
-
-
-Ant + cpptasks build:
-==================
-
-The Ant build script is the definitive build script for log4cxx and
-is able to build log4cxx with (at least) gcc, Microsoft Visual C++ 6, 7, 7.1
-and Borland C++ 5.5 and produce IDE project files for Microsoft Visual Studio
-6, Borland CBuilderX  and Apple Xcode to assist in debugging.
-
-Prerequisites:
-
-Apache Ant 1.6.1 or later
-   http://ant.apache.org
-
-cpptasks.jar and ant-contrib.jar on CLASSPATH
-   (March 2005 or later releases or CVS HEAD)
-   http://ant-contrib.sourceforge.net
-
-JDK 1.4 or later.  Earlier versions might work but
-have not been tested.
-
-GNU patch on command path.
-
-GNU sed, gzip and zip on command path (required for tests)
-
-Connection to internet
-
-   - or -
-
-The following files placed in the lib directory:
-    apr-1.2.2.tar.gz
-    apr-util-1.2.2.tar.gz
- 
-    http://apr.apache.org
- 
-
-
-Building:
-
-Unix gcc:
-
-$> export CLASSPATH=path_to_cpptasks/cpptasks.jar:path_to_antcontrib/ant-contrib.jar
-
-- or -
-
-$> setenv CLASSPATH path_to_cpptasks/cpptasks.jar:path_to_antcontrib/ant-contrib.jar
-
-
-$> ant
-
-
-Microsoft Visual C++:
-
-$> set CLASSPATH=path_to_cpptasks/cpptasks.jar;path_to_antcontrib/ant-contrib.jar
-$> path_to_vc\bin\vcvars32
-$> ant
-
-
-Borland C++:
-
-$> set CLASSPATH=path_to_cpptasks/cpptasks.jar;path_to_antcontrib/ant-contrib.jar
-$> ant -Dcompiler=bcc
-
-
-
-Build options:
-
-     -Dcompiler= see list from http://ant-contrib.sourceforge.net/cc.html
-     -Ddebug=[true | false]
-     -Dlib.type=[shared | static | dylib]
-     -Drtti=[false | true]
-     -Dapache.mirror=URL
-     -Dapr.lib.type=[static | shared]
-     -Daprutil.lib.type=[static | shared]
-     -Dapriconv.lib.type=[static | shared]
-     -Dhas.wchar_t=[1 | 0]
-     -Dlogchar=[wchar_t utf8]
-     -Dos.family=cygwin
-
-Build targets:
-
- build                      Build log4cxx library
- build-all                  Builds all artifacts
- build-examples             Builds example programs
- build-projects-cbx         Builds project files for Borland CBuilderX
- build-projects-vc6         Builds project files for Microsoft Visual C++ 6
- build-projects-xcode       Builds project files for Apple Xcode
- build-shortsocketserver    builds a socket server used by unit tests
- build-standalone-unittest  Builds a unit tests + log4cxx executable
- build-unittest             Builds unit test app
- check                      Runs all diagnostic tests
- clean                      Removes built files
- dist                       Builds a source distribution
- fixcrlf                    repair end-of-line sequences
- header-check               Checks headers against Effective C++ guidelines
- run-standalone-unittest    Runs standalone unit test
- run-unittest               Runs unit test
- usage                      Describes usage of the build script
-
-
-
-
-
diff --git a/KEYS b/KEYS
index 0f0c3c0..d29b58e 100644
--- a/KEYS
+++ b/KEYS
@@ -3,7 +3,7 @@
 purpose is code signing.
 
 Apache users: pgp < KEYS
-Apache developers: 
+Apache developers:
         (pgpk -ll <your name> && pgpk -xa <your name>) >> this file.
       or
         (gpg --fingerprint --list-sigs <your name>
@@ -50,3 +50,150 @@
 4QtL3W5Id3nKxPFiI+c=
 =9ut1
 -----END PGP PUBLIC KEY BLOCK-----
+
+pub   4096R/70C9C3D0 2010-02-17 [expires: 2012-02-17]
+      Key fingerprint = 28F5 F554 39C7 1A8F 2B1E  58C4 D3EC 4990 70C9 C3D0
+uid                  carnold@apache.org (CODE SIGNING KEY) <carnold@apache.org>
+sig 3        70C9C3D0 2010-02-17  carnold@apache.org (CODE SIGNING KEY) <carnold@apache.org>
+sig          2E114322 2010-02-17  Curt Arnold <carnold@apache.org>
+sub   4096R/0E434FF3 2010-02-17 [expires: 2012-02-17]
+sig          70C9C3D0 2010-02-17  carnold@apache.org (CODE SIGNING KEY) <carnold@apache.org>
+
+-----BEGIN PGP PUBLIC KEY BLOCK-----
+Version: GnuPG/MacGPG2 v2.0.14 (Darwin)
+
+mQGiBEKrSNQRBAC4J7udOBoC5+gVxBaPAbjXfnq12l5Pau1WD+UothePNGjI2hOp
++Rnzikk3ISgyrjiX3A8ScZYbu3iXvMpF4zknkGLdmerpf4Gz9xGeushwun+UFaFL
+MX5u7LWJo9wDKzbcJJit1j/qGEg/HRp5fnVYCh0/l4dLansL60NhxtYdxwCguu2e
+wZMZFroaiIXqnce7+cGDRq8D/2HgKGtEJHY3z8OtUqncWbW+RAQqdcT0Z+bMB8o6
+0UCHxUoJrFS1lA62qU3kcZ8ACPoh9xDW4X47EgNPELX81alymTI5FdqiDK7RIwzE
+JlOH/8JJgC6eSwiUXJ0cOJwpMonitcpMLouxuURuPSpfE5b1mQ1gFzN5MBL8xlZQ
+8IO6A/9qWwyWyQBoJud0RDIsVRosdoSBZtw9PHsURgsqfNsS2NXTWK4HjxExw1KO
+AXmRlALfrH8yAShy/AyiUrwlKHG2WPTe6Etygjlr4dIxqTiCOoi+qv+H8SXW4Qy3
+SnyozJ2RlKoYG0oDTbVMsPhOFdytHjConDLL9vS14j4kN9zWB7QgQ3VydCBBcm5v
+bGQgPGNhcm5vbGRAYXBhY2hlLm9yZz6IZwQTEQIAJwIbAwUJCWYBgAIeAQIXgAUC
+S3t0VgULCQgHAwUVCgkICwUWAgMBAAAKCRC+FsldLhFDIrS6AJ92lpskwBHNNWLw
+XsHLaFSGh9n9tACfT0dOv3wec7oM+lt2x81S0uqcbZq5Ag0EQqtJBRAIAN8maiGI
+O44Sdc9Ep3CAm0aXDeR8IQ/F253WcMQtkFBjeHEDd6/+EFT52vswMI6ZJDVV/A7p
+e4VMXAdNutFmUG2gy9OJOu8gMuO3jTCLxUXyQYNF/RasOAQJgc7q1N5QgKtXVH2I
+nQ21vHvlHM1fVe4rYDPr4JL2lZHe0P8kTzeQ7jI5pQnfYRJmS8I5AMQYFOiM48Pd
+7SbsWu/rym7ikcmKUe6ZE59hSioneVP31CDMNRxCAQJVS1mZxTozsAEoh+cvmRjO
+D1Es0iXvu6Sfe8+sLRL+7CNUZgixE1UFbdnNxuZGlG9qs0LGP7hDWijT1/Y4SHz4
+ovXxk0oocmFtiLcAAwcIAMbY7K99hLAFVaU2ukxCSp1TNPcD+IB3gtpRieKaZvBn
+/LGeCO+fNAogkw537lmpLk4nI+JiP/xWohyJ9lyEpW7yD4c9AHKNjqvEWD5Bhpnw
+4qKJohQSVQwEeJRsftY4D0jCP9xbgPiq5woBzHWNok3BVaHqLK0fd0/+KygnT+k6
+cR22Mus9RsEisXk9Oj5lvC0miDOWof4vk2Ll8/H3xt4CXAr13n5Yj2632HolOHrF
+UQXTgwc9v5CNIihOQMEiXFxHh743qbsUZktjxeYH7r8wSCV93/QQ4qELiWoUzndp
+kCRTlEKenucAv6f5qqZqG7pVW8S48T99HwzwqgFX5VOITwQYEQIADwUCQqtJBQIb
+DAUJCWYBgAAKCRC+FsldLhFDIjnoAJ9ECOIrTH3adnVLOkHZnewyp2ssxwCgtLjl
+wZ7/4QtL3W5Id3nKxPFiI+eZAg0ES3tyxgEQAMiGGFkj5EOkQv6EYFtWvd65Y6yn
+dpNIbOb/o9SszVu4kO1OHdemWg4OwXERb1+Ozl9NamOvW0ypH8qzFu4rhpoiUev0
+DV93afBkhW6Mvd8D459okgnlfb/K7c3H72gHmuJKZkyNmLgyzX63BjgIbpjR83/N
+RC578BjoJbYCe0bKR9bCE+MxxCQzUO+tcUrk8o00zEhqycmw1B7gFLWL5MAf50h8
+37/gbCcv9Q902kYfqsd5I7wPj4SRPnowN8vPlNtiwqMDqCl5rUmCrulfvSoNaJ/1
+bEu7L9+/ptontfnr3kMJksGsoPo+Cf8xkGZL1D+80TxrBRf4CILQRF8dm+K8+4ms
+VMsPccCINw/AZh+GkIjJ+SfQpIE4Rx6OMd6JSmCuMnom4O8ZbJ9QYcuS1uf4r32M
+C6MQZrENvEFj1MaSZoRPXNdI/vwCKE5Hc1enB7bEHD6yayE3SgIGYVC+YPJkh0Ch
+fAANRSlw7arrL13UB6xwzAnzhIK7BzADsbGDMAMmIh+rvb6Xxb6iQCh/q7iGPpRz
+AXkmusLsbk6hMP4d8W5puJQTdy7a4t2DIX//9LYpl+DeYCww9DbXTwIays/WLnpo
+Jxj8R1G75gfUIC+kvFl+OiIOR7579yw5Ar35DmqG8RIwxW9cv+at3u63WhYwdhqB
+4Dm5hujWYluYoAZvABEBAAG0OmNhcm5vbGRAYXBhY2hlLm9yZyAoQ09ERSBTSUdO
+SU5HIEtFWSkgPGNhcm5vbGRAYXBhY2hlLm9yZz6JAjwEEwEKACYFAkt7csYCGwMF
+CQPCZwAFCwkIBwMFFQoJCAsEFgIBAAIeAQIXgAAKCRDT7EmQcMnD0FNcD/oDWhmZ
+sikg42VV4SnaaIGUgjHoNT5NKWHhgeEXWAu44Y1r9X0+a6/xvtr69MfbExn9CJWJ
+6vuyY9bpLcNNB49NLxhKD/IEpAUdGYcGGn1+AkkX/Sa7Y2SE5F9snJ2aSn+BctdP
+JNHgEQxWGXGHAFPEdw73RudqsDUvcIat+uU8H/ZdrXX1F2NiUp7rjHqYvizXgy5p
+Es99n00gCiz3eKg2l816v1ClDRAufFDj/JHghL4Yx+wUJN0cFBOAZHzDZgtcSUuv
+Jb2B2f31vjqJ5cGzSQ1KhRIqoIwUm+LYOtuCAbboW9P9GPbib6oavRXRbz/SAoIX
+BbYGWnA4aYQGT1r/FrLHZOmY6kw2izOPryXXxu1qAblFDc1C6XNHtNWx3uuTE/TL
+haePHai9N0rJLuJCwHSveY5Lc8LF6cE2sV+kFsyMUwzaxLHg4G2XpnVIx5mEM+Fr
+Hb89t8rThdE2n+qwUgCzlYgNEjAb1wf/xqUwXL7r/3rwKYkamq7Y7ljY9BTRX6VY
+XsDEiCPs2XSNQtZfTajkei/WN0/SJDQZfIbK9wPqQXTA4DxZ5qJaTa5hS/ueksYH
+tCK6pH3L8ov92ZbDcfxwq3u9wGl3GT1abFIfyfX53FXaoCXSi+g7F+a3hv6nmy0E
+1zT26YXh3xRIPJ2x8gGCATHsGHabfnrRespQeYhGBBARCgAGBQJLe3TDAAoJEL4W
+yV0uEUMianUAn1+KjhbSeXIcMrxWK6WaCHojo0StAJ9GiDT+6t4AnRXCIJtob6uZ
+tN17tLkCDQRLe3LGARAAq9WmSZRtHLuOG8gmYesNeyfPqTdOgak+dgT4nnMIMnlN
+Y23k3oMIgSBeiYyFMDoTXPYsxVZW24mrMhi9D1XhsDygn534iD94ptrLpnDG+56z
+0aHdGjS8eUhEK636uNLT47ZEm8997fWCiqQQzX7UP9ttP9DKLkseiZ97jtN5To+7
+n5Kmog082k0208p2jJqVw9aqoeXh4520nRaqiD2QQg2onQLCAz7UH7RllVzhqH9Z
+G3HcI0RXw3q6FP33XlGNQuxhV9IPna9/43TXHaOsstwtJjvOaPfzGDS7BAmIKZx6
+rbL7VYcIheZ+qXuVoRrwb0facxJfkTcLUy8aRQappDxk9FpWByEK2hEsWiw+CkI6
+maFoyCvC/io5L3ZwWL3C+7wMZ1Qi8DvT93NbLboxhW5XRZk9gb1vlJSalTMbGNUV
+tOiV+SbwfkMQX1xOMFbDx2u5orcJ0h9/Ox1LJEuoTHx68nXLB1e9ioLfQPATM+70
+JhXGAHmjp8rkY6Jdua0MbamQtUXfJAZv/pJrukWNWmT5UFYY0DNNcypfaqm0l4g9
+ZFwwUaraWrMkcsrvmmZ+6JASSwA1a6RwXYLtsMLX0boaUKEvDPqnIbeF3jJnztLN
+MDWsGeW2NXYfuIaHMTUM7oVGgpDP+TG1IlOQU0lrSbw4Sm3AlA25tOF3jgGZtaMA
+EQEAAYkCJQQYAQoADwUCS3tyxgIbDAUJA8JnAAAKCRDT7EmQcMnD0MzLEACRQ6Em
+nkRbNupza9airUj2vrXj4I5ZN9jvgnvZcBVSmbKDEZR0akHFXaEes4d9AVh95y91
+HuOHiiJ1hUZ0TGlk52ML5FEE68dDxvORUven9DiUdTAgLBJ5rUvfzj3tf6R4BNmM
+rzyEA0UCAthqTd1nCdjhwIT6z4BiEVGsBHVAN7mYl+blHqssvuRgNAWrdPFRGYJP
+cXI7wQc051WCHWXzi6b4h7oiIwlfsx7818S7ITHGM1AxTFl5rIqs9K4oHFTbcg1g
+sLbJFM0NJ4l1yQZG/9Vldo0RmDdMSc5KgwPa48nf8LHsL3qtcQuvy/b1CIhf8UqZ
+OWabhVa25xQFTRPmN5ND6wAsvx/zYr0/NF7RfJ3gTn8jCif8LZLVtYYP8zj4TgIL
+ZhP46YwxaLkyibh+7/R+obszGVt06yqefNYuzfAXpX+2/pDUVQ532AAVD5g4enX7
+eAxMda//UAC+WxfCqE6c3CWhXlGaborCsP5auhBg0rbi3/dgPySwMugBfVksa16X
+X6y36kjw1MRZuhJi4WQGRLX4yjd6sGnWDoY5c/4G89JZKzjWsuNrSJIZRWrzgn84
+NLAXpK81RMPkWukePN4ZQ1WEi0IH6AbBBbmQhIRR1bnGR48ZXH+/piJTNi9yKOPi
+wlp15dJcNo0puq0ZbuZjPboQjg8PQaGtlMVN6A==
+=EKia
+-----END PGP PUBLIC KEY BLOCK-----
+
+pub   4096R/778C3033 2017-07-06
+  Schl.-Fingerabdruck = A468 E054 E594 9AC5 8FA7  5A0E F649 2CB4 778C 3033
+uid       [ uneing.] Thorsten Schöning <tschoening@apache.org>
+sig 3        778C3033 2017-07-06  Thorsten Schöning <tschoening@apache.org>
+sub   4096R/BF561FB0 2017-07-06
+sig          778C3033 2017-07-06  Thorsten Schöning <tschoening@apache.org>
+
+-----BEGIN PGP PUBLIC KEY BLOCK-----
+Version: GnuPG v2
+
+mQINBFleTPEBEAC6rmakh64dyRHRmim5X424UuT96wcubwatZrk0yaIrjhAd90Jo
+rxp5B63B9sw2bEhjafYF4Kcb4mV5AP6nEdu8dWQCj0c7Hb0DXQedRnQI/ALW21Gm
+nh/C/BGd2zGZE8LCNfLwyxfI1EUCPPC2bfNhoiIMbHoaDBR7HcgE1Zxtl7TuZ9hU
+GztU3ClKSlEhwK4pCUcSLF3dsvpyuddkG7+DCPqjARCCKkRDYPF2JdL1M2oFHNIM
+ihnhsT6klZgqtltXPL9/XMhpUyfQ+OhJzqUYrfXq7LSxGKSeb3QvBPgfqK4F/GLQ
+GblKV5Y4d7LFxPymGq2KCXDLDTkawsjAYFYcBHlYMq9Eg0e26edU7dqj6Am8ZzxO
+E7FomsWXOjV26I7m0XQRMw9HsJjG+xlt+j8z1HoDK5yWopgj8DyBpnVrTZS0VCto
+vmLaJSWojwnqO0sRXvZcKBJQ02FJpZWROSrFdPbiHa22pCdhM7dR4tYcSWwU6R5G
+Azyd8ssojLqKO84jqoUCJ5pOl1/wTJrLbtRNzKaBcU3zTCwhWOwemq0XWe9QuJ/Z
+2+GCz4wR19zt5u8Ri6dG2eAdF9XFW9n9JZJ8nd5x8mmyQu3shHCvO3B/HM5AePcp
+eu5TQZmGlc3Ns+ckP3FNe/WiJ9N70bhSXCdRxNqxcS0BZxaAuWmlBz0+PwARAQAB
+tCpUaG9yc3RlbiBTY2jDtm5pbmcgPHRzY2hvZW5pbmdAYXBhY2hlLm9yZz6JAjcE
+EwEKACEFAlleTPECGwMFCwkIBwMFFQoJCAsFFgIDAQACHgECF4AACgkQ9kkstHeM
+MDM7xw/+NzJnf+pEkM2xhMpRI3byykPuzQB4MfQguwMuHAK2qL28L6jAfQL99ecQ
+UE87cGjbvYP4x3Z1XwWmg4VvTOYsq9nV3xYrfPOacXMzzSpoVuSpXljEnXsdwPXX
+ryAgu09vdJtkbVxyx0ypvB2bAoNJrtW8F9vc24XOQREgWp2hbmaGtT7FlCrGab1M
+CKFMujOS83tFwFpD7oAStbyWZX8AgHktM4HzjeJcqqRtX2EdTTq/3X4tiyI+vpgD
+rBkjZ9amDG75dMBgcNbdUPGoQdd7/jU2DfcxGSl0i673Kgo6tSt2ecVrGBo99SRa
+heU6sOcpMucsWCjnj3VndVytBOwu3Q+jHKCadDyVW+0MyA38ltAX1Pt6LUS/s0vC
+HSf7SMFDqO9f7vmi/SQsSbqokcq9QfVXGvC7C8FYN0g9tg2ljQk/uS62nDrFfRkF
+pqV1r/vhljFhXNpCq0fx2EJWB9r8h1L3I7Bu77wk9uuwHkYnao2Om4vWNApt/WBO
+DsIFEGcDBIkXqUqomOm3b9kh39nKs+mwkrP+U+sUgHNAv6Idi/AHocTul2IU807s
+8PUnYHzr6EYc2zX02bA/c7hNwV59PUdalYilS1flbyY+7enyWjcfpZH4asa6iw+O
+wq+gPhdqh5fK51oNH3elolf2y/1S5HDjNJ63aPQTFpJkbGToT3W5Ag0EWV5M8QEQ
+AN8MjLx959At1Kw5z+Us4taIBEUta3ROg42PEnboVZE+D1pTP77Y/1MXiJsU07Iw
+ovcnRKiL8clcjWyOhFkjzGjaNbhR9ERolw9mDBHOf3fRrH9tmep7zy4exB7/R1N6
+STIE+wbJNcFckwHJr1Xi5duas5sMPIvxdcMF6jgXkto7i5348KhzASVUOoWxsB27
+FqZfbzv6YZldkri8D0wHXVrxZ5ZbSSFrTHprmrHdom7uuaen57eJickhLNn9mGhb
+4pMWTQGfQrRLDZm8tcHpNgjmOp0/vkJOOLkRlKJIg2SECtb758dS1U2O9SIWoVet
+oaQquWu19tIyvOZe3fLHNHxp8eJFMpRfV3mLaVBQ2eCmkUohglYzcSzjtifhmf03
+AE+tSDdDOc2y0De7SpGJCUu2cGbvWU9I4LnEoeVrW8nYstuMCGSfO3QH6Qsdcteo
+qD739K4G0xdAc/uNeCF4osauYJD24FFrKpeD6dHe6aoUewA/M4bizqMgYVdzkR9y
+AxKZn7ReNh97LxDX2g6mEjX83JGIqaRkK7KwwhNrOjwM7SFU0mHAYylTiu0y9rOc
+UU/db9tpuGBHnZieDJtRkGT2FDV4rM+xpjrVLW25In0YmoqmdLJt+1auqrDd8qkb
+2ksKPQEs7snkw57GQ0gHpb2MxURlz2B14NYk1lbjb9lzABEBAAGJAh8EGAEKAAkF
+AlleTPECGwwACgkQ9kkstHeMMDPeEhAAsPPGS0doKqdSpMgn8wh58bT/zJt5g4e2
+pA2KoRmwCtStgITp6SXC/6Udop5sp0mkc70iotWbM6m/EMJVRvHDYuVGG/d75+vm
+klb8oAfoK6INJwhHoeu8CRP2qZcQXReNE5sox6mK0wrAKQ8QWydgLs8e+t7QP3r1
+HsRPBtQnPQz1SPlA4H10TIIu7SnKAw8vsdRe+5PTnxDRPNz71azflUKXe/b+XN6d
+Os52APfmPiq0DRUPavMRDgzniTp4CM6uli9JkgnBWr6l1vzYuREV+61r9Nr3ukGM
+32v1z6Vee22zQBs8u/PxtzwdcmcuYQ3bOb+D6LO5CXPOdEVN9Cjymy1MNiaAW/ce
+CCjnyvO7h6VgZZ6BmpDtCBWsFBessKClfXHXhxc7BNvP7rllFBUFAwj1pKA8OKzU
+z5CFR3men8l45kk+SHkhI1QYl8TNAAQpsI34LDILMzgnx9ROYbapnXxH803qcXrH
+BMrLvB1F+lyE0N7OJCsWX73PJ2fdXqzCoAT65QEKqVD96UIXjz61fyte825Yhneh
+x8/KNYEHOYv16HdqMS+fnYuykdHZkSlzWNEAAKIWjAWCeQDwaYYD2iMJH/rdK06J
+2x7AKEiEO867ckfVXUhO3h31FOQmLP2IWpoMaK4/aUt8p9gt2k2yM5N6EtWsqbvq
+XuHxrEdQviQ=
+=bmEc
+-----END PGP PUBLIC KEY BLOCK-----
diff --git a/Makefile.am b/Makefile.am
index ae48ca9..181d0f6 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -13,11 +13,19 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #
-
 AUTOMAKE_OPTIONS = foreign
+ACLOCAL_AMFLAGS  = -I src/m4
 
 SUBDIRS = src
-EXTRA_DIST = autogen.sh aclocal.m4 find_apr.m4 find_apu.m4 build.xml pom.xml NOTICE LICENSE INSTALL pom.xml KEYS
+EXTRA_DIST = \
+    aclocal.m4 \
+    autogen.sh \
+    build.xml \
+    INSTALL \
+    KEYS \
+    LICENSE \
+    NOTICE \
+    pom.xml
 
 pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = liblog4cxx.pc
diff --git a/autogen.sh b/autogen.sh
index 1511583..8a9b561 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -1,4 +1,4 @@
-#! /bin/sh
+#! /bin/sh -e
 # Licensed to the Apache Software Foundation (ASF) under one or more
 # contributor license agreements.  See the NOTICE file distributed with
 # this work for additional information regarding copyright ownership.
@@ -24,6 +24,6 @@
 
 rm -f config.cache
 rm -f config.log
-aclocal -I .
+aclocal -I src/m4
 autoconf
 automake -a --copy
diff --git a/build.xml b/build.xml
index 2d318fa..f0ffe82 100644
--- a/build.xml
+++ b/build.xml
@@ -18,18 +18,48 @@
 -->
 <!DOCTYPE project [
 <!ENTITY libsets '
-        <libset libs="${apr-util.lib.prefix}${apr-util.lib.name}${apr-util.lib.suffix}" dir="${apr-util.lib.dir}" if="apr-util.lib.dir"/>
-        <libset libs="${apr-util.lib.prefix}${apr-util.lib.name}${apr-util.lib.suffix}" unless="apr-util.lib.dir"/>
-        <libset libs="${apr.lib.prefix}${apr.lib.name}${apr.lib.suffix}" dir="${apr.lib.dir}" if="apr.lib.dir"/>
-        <libset libs="${apr.lib.prefix}${apr.lib.name}${apr.lib.suffix}" unless="apr.lib.dir"/>
-        <libset libs="esmtp" dir="${esmtp.lib.dir}" if="esmtp.lib.dir"/>
-        <libset libs="esmtp" if="has-libesmtp" unless="esmtp.lib.dir"/>
-      <libset libs="${odbc.lib}" if="odbc.lib"/>
-      <libset libs="${apr-util.dependencies}" if="apr-util.dependencies" unless="apr-util-includes-dependencies"/>
-        <libset libs="pthread" if="is-unix"/>
-        <syslibset libs="advapi32 mswsock ws2_32 shell32" if="is-windows"/>
-        <syslibset libs="stdc++" if="is-gcc"/>
-        <syslibset libs="cw32mt" if="is-bcc"/>
+	<libset	libs="${apr-util.lib.prefix}${apr-util.lib.name}${apr-util.lib.suffix}"
+			dir="${apr-util.lib.dir}"
+			if="apr-util.lib.dir"
+	/>
+	<libset	libs="${apr-util.lib.prefix}${apr-util.lib.name}${apr-util.lib.suffix}"
+			unless="apr-util.lib.dir"
+	/>
+	<libset	libs="${apr.lib.prefix}${apr.lib.name}${apr.lib.suffix}"
+			dir="${apr.lib.dir}"
+			if="apr.lib.dir"
+	/>
+	<libset	libs="${apr.lib.prefix}${apr.lib.name}${apr.lib.suffix}"
+			unless="apr.lib.dir"
+	/>
+	<libset	libs="esmtp"
+			dir="${esmtp.lib.dir}"
+			if="esmtp.lib.dir"
+	/>
+	<libset	libs="esmtp"
+			if="has-libesmtp"
+			unless="esmtp.lib.dir"
+	/>
+	<libset	libs="${odbc.lib}"
+			if="odbc.lib"
+	/>
+	<libset	libs="${apr-util.dependencies}"
+			if="apr-util.dependencies"
+			unless="apr-util-includes-dependencies"
+	/>
+	<libset	libs="pthread"
+			if="is-unix"
+	/>
+
+	<syslibset	libs="advapi32 mswsock shell32 ws2_32"
+				if="is-windows"
+	/>
+	<syslibset	libs="stdc++"
+				if="is-gcc"
+	/>
+	<syslibset	libs="cw32mt"
+				if="is-bcc"
+	/>
 '>
 <!ENTITY license '
  Licensed to the Apache Software Foundation (ASF) under one or more
@@ -54,1198 +84,2109 @@
 ]>
 
 <!--
-This file builds log4cxx using Apache Ant (http://ant.apache.org)
-and the C++ compilation tasks from http://ant-contrib.sourceforge.net.
-
-
+	This file builds log4cxx using Apache Ant (http://ant.apache.org)
+	and the C++ compilation tasks from http://ant-contrib.sourceforge.net.
 -->
 <project name="log4cxx" default="check">
 
-&common;
-&find-apr;
-&find-apr-util;
-&find-libesmtp;
+	&common;
+	&find-apr;
+	&find-apr-util;
+	&find-libesmtp;
 
-<property name="base.dir" location="."/>
-<property name="src.dir" location="${base.dir}/src/main/cpp"/>
-<property name="resources.dir" location="${base.dir}/src/main/resources"/>
-<property name="include.dir" location="${base.dir}/src/main/include"/>
-<property name="target.dir" location="${base.dir}/target"/>
-<property name="lib.dir" location="${target.dir}/lib"/>
-<property name="examples.dir" location="${base.dir}/src/examples/cpp"/>
-<property name="tests.dir" location="${base.dir}/src/test"/>
-<property name="tests.cpp.dir" location="${tests.dir}/cpp"/>
-<property name="tests.resources.dir" location="${tests.dir}/resources"/>
-<property name="tests.output.dir" location="${tests.resources.dir}/output"/>
-<property name="m2_repo" location="${user.home}/.m2/repository"/>
-<property name="log4j.version" value="1.2.14"/>
-<available property="log4j.jar"
-           value="/usr/share/java/log4j-1.2.jar"
-           file="/usr/share/java/log4j-1.2.jar"/>
-<property name="log4j.jar" 
-       location="${m2_repo}/log4j/log4j/${log4j.version}/log4j-${log4j.version}.jar"/>
+	<property	name="base.dir"
+				location="."
+	/>
+	<property	name="src.dir"
+				location="${base.dir}/src/main/cpp"
+	/>
+	<property	name="resources.dir"
+				location="${base.dir}/src/main/resources"
+	/>
+	<property	name="include.dir"
+				location="${base.dir}/src/main/include"
+	/>
+	<property	name="target.dir"
+				location="${base.dir}/target"
+	/>
+	<property	name="lib.dir"
+				location="${target.dir}/lib"
+	/>
+	<property	name="examples.dir"
+				location="${base.dir}/src/examples/cpp"
+	/>
+	<property	name="tests.dir"
+				location="${base.dir}/src/test"
+	/>
+	<property	name="tests.cpp.dir"
+				location="${tests.dir}/cpp"
+	/>
+	<property	name="tests.resources.dir"
+				location="${tests.dir}/resources"
+	/>
+	<property	name="tests.output.dir"
+				location="${tests.resources.dir}/output"
+	/>
+	<property	name="m2_repo"
+				location="${user.home}/.m2/repository"
+	/>
+	<property	name="log4j.version"
+				value="1.2.14"
+	/>
+	<available	property="log4j.jar"
+				value="/usr/share/java/log4j-1.2.jar"
+				file="/usr/share/java/log4j-1.2.jar"
+	/>
+	<property	name="log4j.jar"
+				location="${m2_repo}/log4j/log4j/${log4j.version}/log4j-${log4j.version}.jar"
+	/>
+	<property	name="doxygen.exe"
+				value="doxygen"
+	/>
+	<property	name="lib.name"
+				value="${project.groupId}"
+	/>
+	<property	name="lib.prefix"
+				value=""
+	/>
+	<property	name="enable-char"
+				value="1"
+	/>
+	<property	name="enable-wchar_t"
+				value="1"
+	/>
+	<property	name="enable-unichar"
+				value="0"
+	/>
+	<property	name="enable-cfstring"
+				value="0"
+	/>
+	<property	name="with-charset"
+				value="auto"
+	/>
+	<property	name="with-SMTP"
+				value="no"
+	/>
+	<property	name="with-ODBC"
+				value="auto"
+	/>
 
+	<propertyregex	property="version.major"
+					input="${project.version}"
+					regexp="^(\d+)"
+					select="\1"
+	/>
+	<propertyregex	property="version.minor"
+					input="${project.version}"
+					regexp="\.(\d+)\."
+					select="\1"
+	/>
+	<propertyregex	property="version.rev"
+					input="${project.version}"
+					regexp="(\d+)(?:-.+)?$"
+					select="\1"
+	/>
+	<propertyregex	property="version.hasSuffix"
+					input="${project.version}"
+					regexp="\d+-.+$"
+					select="\0"
+	/>
 
-<property name="doxygen.exe" value="doxygen"/>
+	<property	name="site.svnRepoUrl"
+				value="https://svn.apache.org/repos/infra/websites/production/logging/content/log4cxx"
+	/>
+	<property	name="site.deployDir"
+				value="target/site-deploy"
+	/>
+	<property	name="site.deployDir.curVersion"
+				value="${site.deployDir}/${project.version}"
+	/>
+	<property	name="site.deployDir.curVersionWoSuffix"
+				value="${site.deployDir}/${version.major}.${version.minor}.${version.rev}"
+	/>
 
-<property name="lib.name" value="log4cxx"/>
-<property name="lib.prefix" value=""/>
-<property name="version" value="0.10.0"/>
-<property name="enable-char" value="1"/>
-<property name="enable-wchar_t" value="1"/>
-<property name="enable-unichar" value="0"/>
-<property name="enable-cfstring" value="0"/>
-<property name="with-charset" value="auto"/>
-<property name="with-SMTP" value="no"/>
-<property name="with-ODBC" value="no"/>
+	<target	name="usage"
+			description="Describes usage of the build script">
+		<echo>
+			Ant build file for log4cxx
 
+			Common invocations:
 
-<property name="svnsite.url" value="https://svn.apache.org/repos/asf/logging/site/trunk/docs/log4cxx"/>
+			> ant
 
+			will attempt to locate APR and APR-util in /usr, /usr/local/apr and ..
 
+			Builds and tests log4cxx.
 
-<target name="usage" description="Describes usage of the build script">
-        <echo>
-Ant build file for log4cxx
+			> ant -Dwith-apr=APRPATH -Dwith-apr-util=APUPATH
 
-Common invocations:
+			Builds and tests log4cxx using APR and APR-Util at specified location
 
-> ant
+			> ant -p
 
-will attempt to locate APR and APR-util in /usr, /usr/local/apr and ..
+			Displays available targets
 
-Builds and tests log4cxx.
+			> ant build-projects-vc6
 
-> ant -Dwith-apr=APRPATH -Dwith-apr-util=APUPATH
+			Builds Microsoft Visual Studio 6 projects.
+			-vc7, -vc8, -vc9 and -xcode for Visual Studio .NET, 2005, 2008 and Apple Xcode 2 and later.
+			respectively.
 
-Builds and tests log4cxx using APR and APR-Util at specified location
+			Command line options:
 
-> ant -p
+			-Ddebug=[true|false]
+			-Doptimize=[speed|size|none]
+			-Dversion=n.n.n
+			-Dlib.type=[shared|static] (Library type to create, default=shared)
+			-Denable-char=[0, 1] (expose char* API, default=1)
+			-Denable-wchar_t=[0, 1] (expose wchar_t* API, default=1)
+			-Denable-unichar=[0, 1] (expose UniChar API, default=0)
+			-Denable-cfstring[0, 1] (expose CFString API, default=0)
+			-Dwith-charset=[auto|utf-8|iso-8859-1|usascii|ebcdic] (default=auto)
+			-Dwith-logchar=[utf-8|wchar_t|unichar] (default=utf-8 on Unix, wchar_t on Windows)
+			-Dwith-apr=APRPATH
+			-Dwith-apr-util=PATH
+			-Dwith-SMTP=[libesmtp, no] (default no)
+			-Dwith-ODBC=[auto, unixODBC, iODBC, Microsoft, no] (default=auto resulting in no on Unix, Microsoft on Windows)
+		</echo>
+	</target>
 
-Displays available targets
+	<target	name="init"
+			depends="common-init">
+		<property	name="log4cxx.lib.dir"
+					value="${executable.dir}"
+		/>
+		<mkdir dir="${log4cxx.lib.dir}" />
 
-> ant build-projects-vc6
+		<condition	property="with-logchar"
+					value="wchar_t">
+			<isset property="is-windows" />
+		</condition>
+		<property	name="with-logchar"
+					value="utf-8"
+		/>
 
-Builds Microsoft Visual Studio 6 projects.
--vc7, -vc8, -vc9 and -xcode for Visual Studio .NET, 2005, 2008 and Apple Xcode 2 and later.
-respectively.
+		<condition	property="has-libesmtp"
+					value="1">
+			<equals	arg1="${with-SMTP}"
+					arg2="libesmtp"
+			/>
+		</condition>
 
-Command line options:
+		<condition	property="odbc.lib"
+					value="iodbc">
+			<equals	arg1="${with-ODBC}"
+					arg2="iODBC"
+			/>
+		</condition>
 
--Ddebug=[true|false]
--Doptimize=[speed|size|none]
--Dversion=n.n.n
--Denable-shared=[yes|no] (default yes)
--Denable-static=[yes|no] (default yes)
--Denable-char=[0, 1] (expose char* API, default 1)
--Denable-wchar_t=[0, 1] (expose wchar_t* API, default 1)
--Denable-unichar=[0, 1] (expose UniChar API, default 0)
--Denable-cfstring[0, 1] (expose CFString API, default 0)
--Dwith-charset=[auto|utf-8|iso-8859-1|usascii|ebcdic] (default auto)
--Dwith-logchar=[utf-8|wchar_t|unichar] (default=utf-8 on Unix, wchar_t on Windows)
--Dwith-apr=APRPATH
--Dwith-apr-util=PATH
--Dwith-SMTP=[libesmtp, no] (default no)
--Dwith-ODBC=[unixODBC, iODBC, Microsoft, no] (default no)
+		<condition	property="odbc.lib"
+					value="unixodbc">
+			<equals	arg1="${with-ODBC}"
+					arg2="unixODBC"
+			/>
+		</condition>
 
-</echo>
-</target>
+		<condition	property="odbc.lib"
+					value="odbc32">
+			<and>
+				<not>
+					<equals	arg1="${with-ODBC}"
+							arg2="no"
+					/>
+				</not>
+				<isset property="is-windows" />
+			</and>
+		</condition>
 
+		<condition	property="has-ODBC"
+					value="1">
+			<isset property="odbc.lib" />
+		</condition>
+		<property	name="has-ODBC"
+					value="0"
+		/>
 
-<target name="init" depends="common-init">
+		<condition	property="force-ant"
+					value="1">
+			<equals	arg1="${find}"
+					arg2="false"
+			/>
+		</condition>
+		<echo>force-ant: ${force-ant}</echo>
+	</target>
 
-        <property name="log4cxx.lib.dir" value="${executable.dir}"/>
-        <mkdir dir="${log4cxx.lib.dir}"/>
+	<target	name="clean"
+			depends="init"
+			description="Removes built files">
+		<delete dir="${target.dir}" />
+		<delete>
+			<fileset	dir="${include.dir}/log4cxx"
+						includes="**/log4cxx.h"
+			/>
+		</delete>
+	</target>
 
-        <condition property="with-logchar" value="wchar_t">
-            <isset property="is-windows"/>
-        </condition>
-        <property name="with-logchar" value="utf-8"/>
-        
-        <condition property="has-libesmtp" value="1">
-            <equals arg1="${with-SMTP}" arg2="libesmtp"/>
-        </condition>
+	<target	name="unix-configure"
+			if="is-unix">
+		<copy	tofile="${include.dir}/log4cxx/log4cxx.tmp"
+				file="${include.dir}/log4cxx/log4cxx.h.in"
+				overwrite="true"
+		/>
+		<copy	tofile="${include.dir}/log4cxx/private/log4cxx_private.tmp"
+				file="${include.dir}/log4cxx/private/log4cxx_private.h.in"
+				overwrite="true"
+		/>
+	</target>
 
-      <condition property="odbc.lib" value="iodbc">
-          <equals arg1="${with-ODBC}" arg2="iODBC"/>
-      </condition>
+	<target	name="win-configure"
+			if="is-windows">
+		<copy	tofile="${include.dir}/log4cxx/log4cxx.tmp"
+				file="${include.dir}/log4cxx/log4cxx.hw"
+				overwrite="true"
+		/>
+		<copy	tofile="${include.dir}/log4cxx/private/log4cxx_private.tmp"
+				file="${include.dir}/log4cxx/private/log4cxx_private.hw"
+				overwrite="true"
+		/>
+	</target>
 
-      <condition property="odbc.lib" value="unixodbc">
-          <equals arg1="${with-ODBC}" arg2="unixODBC"/>
-      </condition>
+	<target	name="configure"
+			depends="init, unix-configure, win-configure">
+		<echo message="Configuring with-logchar=${with-logchar}" />
+		<echo message="Configuring with-charset=${with-charset}" />
+		<echo message="Configuring with-SMTP=${with-SMTP}" />
+		<echo message="Configuring with-ODBC=${with-ODBC}" />
+		<echo message="Configuring enable-char=${enable-char}" />
+		<echo message="Configuring enable-wchar_t=${enable-wchar_t}" />
+		<echo message="Configuring enable-unichar=${enable-unichar}" />
+		<echo message="Configuring enable-cfstring=${enable-cfstring}" />
 
-      <condition property="odbc.lib" value="odbc32">
-          <equals arg1="${with-ODBC}" arg2="Microsoft"/>
-      </condition>
+		<condition	property="logchar_is_utf8"
+					value="1">
+			<equals	arg1="${with-logchar}"
+					arg2="utf-8"
+			/>
+		</condition>
+		<property	name="logchar_is_utf8"
+					value="0"
+		/>
 
-      <condition property="has-ODBC" value="1">
-          <isset property="odbc.lib"/>
-      </condition>
-      <property name="has-ODBC" value="0"/>
-        
-        <condition property="force-ant" value="1">
-            <equals arg1="${find}" arg2="false"/>
-        </condition>
-        <echo>force-ant: ${force-ant}</echo>
+		<condition	property="logchar_is_unichar"
+					value="1">
+			<equals	arg1="${with-logchar}"
+					arg2="unichar"
+			/>
+		</condition>
+		<property	name="logchar_is_unichar"
+					value="0"
+		/>
 
-</target>
+		<condition	property="logchar_is_wchar"
+					value="1">
+			<equals	arg1="${with-logchar}"
+					arg2="wchar_t"
+			/>
+		</condition>
+		<property	name="logchar_is_wchar"
+					value="0"
+		/>
 
-<target name="clean" depends="init" description="Removes built files">
-        <delete dir="${target.dir}"/>
-        <delete>
-            <fileset dir="${include.dir}/log4cxx" includes="**/log4cxx.h"/>
-        </delete>
-        
-</target>
+		<replaceregexp	file="${include.dir}/log4cxx/log4cxx.tmp"
+						match="@LOGCHAR_IS_UNICHAR@"
+						replace="${logchar_is_unichar}"
+		/>
 
-<target name="unix-configure" if="is-unix">
-        <copy tofile="${include.dir}/log4cxx/log4cxx.tmp"
-              file="${include.dir}/log4cxx/log4cxx.h.in" overwrite="true"/>
-        <copy tofile="${include.dir}/log4cxx/private/log4cxx_private.tmp"
-              file="${include.dir}/log4cxx/private/log4cxx_private.h.in" overwrite="true"/>
-</target>
+		<replaceregexp	file="${include.dir}/log4cxx/log4cxx.tmp"
+						match="@LOGCHAR_IS_UTF8@"
+						replace="${logchar_is_utf8}"
+		/>
 
-<target name="win-configure" if="is-windows">
-        <copy tofile="${include.dir}/log4cxx/log4cxx.tmp"
-              file="${include.dir}/log4cxx/log4cxx.hw" overwrite="true"/>
-        <copy tofile="${include.dir}/log4cxx/private/log4cxx_private.tmp"
-              file="${include.dir}/log4cxx/private/log4cxx_private.hw" overwrite="true"/>
-      <property name="odbc.lib" value="odbc32"/>
-</target>
+		<replaceregexp	file="${include.dir}/log4cxx/log4cxx.tmp"
+						match="@LOGCHAR_IS_WCHAR@"
+						replace="${logchar_is_wchar}"
+		/>
 
+		<condition	property="charset_is_utf8"
+					value="1">
+			<equals	arg1="${with-charset}"
+					arg2="utf-8"
+			/>
+		</condition>
+		<property	name="charset_is_utf8"
+					value="0"
+		/>
 
-<target name="configure" depends="init,
-                                  unix-configure,
-                                  win-configure">
-    <echo message="Configuring with-logchar=${with-logchar}" />
-    <echo message="Configuring with-charset=${with-charset}" />
-    <echo message="Configuring with-SMTP=${with-SMTP}" />
-    <echo message="Configuring with-ODBC=${with-ODBC}" />
-    <echo message="Configuring enable-char=${enable-char}"/>
-    <echo message="Configuring enable-wchar_t=${enable-wchar_t}"/>
-    <echo message="Configuring enable-unichar=${enable-unichar}"/>
-    <echo message="Configuring enable-cfstring=${enable-cfstring}"/>
+		<condition	property="charset_is_iso-8859-1"
+					value="1">
+			<equals	arg1="${with-charset}"
+					arg2="iso-8859-1"
+			/>
+		</condition>
+		<property	name="charset_is_iso-8859-1"
+					value="0"
+		/>
 
-    <condition property="logchar_is_utf8" value="1">
-       <equals arg1="${with-logchar}" arg2="utf-8"/>
-    </condition>
-    <property name="logchar_is_utf8" value="0"/>
+		<condition	property="charset_is_usascii"
+					value="1">
+			<equals	arg1="${with-charset}"
+					arg2="usascii"
+			/>
+		</condition>
+		<property	name="charset_is_usascii"
+					value="0"
+		/>
 
-    <condition property="logchar_is_unichar" value="1">
-       <equals arg1="${with-logchar}" arg2="unichar"/>
-    </condition>
-    <property name="logchar_is_unichar" value="0"/>
+		<condition	property="charset_is_ebcdic"
+					value="1">
+			<equals	arg1="${with-charset}"
+					arg2="ebcdic"
+			/>
+		</condition>
+		<property	name="charset_is_ebcdic"
+					value="0"
+		/>
 
-    <condition property="logchar_is_wchar" value="1">
-       <equals arg1="${with-logchar}" arg2="wchar_t"/>
-    </condition>
-    <property name="logchar_is_wchar" value="0"/>
+		<replaceregexp	file="${include.dir}/log4cxx/private/log4cxx_private.tmp"
+						match="@CHARSET_UTF8@"
+						replace="${charset_is_utf8}"
+		/>
 
-    <replaceregexp file="${include.dir}/log4cxx/log4cxx.tmp"
-       match="@LOGCHAR_IS_UNICHAR@"
-       replace="${logchar_is_unichar}"/>
+		<replaceregexp	file="${include.dir}/log4cxx/private/log4cxx_private.tmp"
+						match="@CHARSET_ISO88591@"
+						replace="${charset_is_iso-8859-1}"
+		/>
+		<replaceregexp	file="${include.dir}/log4cxx/private/log4cxx_private.tmp"
+						match="@CHARSET_USASCII@"
+						replace="${charset_is_usascii}"
+		/>
+		<replaceregexp	file="${include.dir}/log4cxx/private/log4cxx_private.tmp"
+						match="@CHARSET_EBCDIC@"
+						replace="${charset_is_ebcdic}"
+		/>
 
-    <replaceregexp file="${include.dir}/log4cxx/log4cxx.tmp"
-       match="@LOGCHAR_IS_UTF8@"
-       replace="${logchar_is_utf8}"/>
+		<replaceregexp	file="${include.dir}/log4cxx/log4cxx.tmp"
+						match="@CHAR_API@"
+						replace="${enable-char}"
+		/>
 
-    <replaceregexp file="${include.dir}/log4cxx/log4cxx.tmp"
-       match="@LOGCHAR_IS_WCHAR@"
-       replace="${logchar_is_wchar}"/>
+		<replaceregexp	file="${include.dir}/log4cxx/log4cxx.tmp"
+						match="@WCHAR_T_API@"
+						replace="${enable-wchar_t}"
+		/>
 
-    <condition property="charset_is_utf8" value="1">
-       <equals arg1="${with-charset}" arg2="utf-8"/>
-    </condition>
-    <property name="charset_is_utf8" value="0"/>
+		<replaceregexp	file="${include.dir}/log4cxx/log4cxx.tmp"
+						match="@UNICHAR_API@"
+						replace="${enable-unichar}"
+		/>
 
-    <condition property="charset_is_iso-8859-1" value="1">
-       <equals arg1="${with-charset}" arg2="iso-8859-1"/>
-    </condition>
-    <property name="charset_is_iso-8859-1" value="0"/>
+		<replaceregexp	file="${include.dir}/log4cxx/log4cxx.tmp"
+						match="@CFSTRING_API@"
+						replace="${enable-cfstring}"
+		/>
 
-    <condition property="charset_is_usascii" value="1">
-       <equals arg1="${with-charset}" arg2="usascii"/>
-    </condition>
-    <property name="charset_is_usascii" value="0"/>
+		<replaceregexp	file="${include.dir}/log4cxx/private/log4cxx_private.tmp"
+						match="@HAS_SYSLOG@"
+						replace="1"
+		/>
+		<replaceregexp	file="${include.dir}/log4cxx/private/log4cxx_private.tmp"
+						match="@HAS_STD_LOCALE@"
+						replace="1"
+		/>
+		<replaceregexp	file="${include.dir}/log4cxx/private/log4cxx_private.tmp"
+						match="@HAS_MBSRTOWCS@"
+						replace="1"
+		/>
+		<replaceregexp	file="${include.dir}/log4cxx/private/log4cxx_private.tmp"
+						match="@HAS_WCSTOMBS@"
+						replace="1"
+		/>
+		<condition property="has-fwide" value="0">
+			<isset property="is-cygwin" />
+		</condition>
+		<property	name="has-fwide"
+					value="1"
+		/>
+		<replaceregexp	file="${include.dir}/log4cxx/private/log4cxx_private.tmp"
+						match="@HAS_FWIDE@"
+						replace="${has-fwide}"
+		/>
 
-    <condition property="charset_is_ebcdic" value="1">
-       <equals arg1="${with-charset}" arg2="ebcdic"/>
-    </condition>
-    <property name="charset_is_ebcdic" value="0"/>
+		<condition property="has-libesmtp-value" value="1">
+			<isset property="has-libesmtp" />
+		</condition>
+		<property	name="has-libesmtp-value"
+					value="0"
+		/>
+		<replaceregexp	file="${include.dir}/log4cxx/private/log4cxx_private.tmp"
+						match="LOG4CXX_HAVE_LIBESMTP 0"
+						replace="LOG4CXX_HAVE_LIBESMTP ${has-libesmtp-value}"
+		/>
+		<replaceregexp	file="${include.dir}/log4cxx/private/log4cxx_private.tmp"
+						match="@HAS_LIBESMTP@"
+						replace="${has-libesmtp-value}"
+		/>
 
-    <replaceregexp file="${include.dir}/log4cxx/private/log4cxx_private.tmp"
-       match="@CHARSET_UTF8@"
-       replace="${charset_is_utf8}"/>
+		<replaceregexp	file="${include.dir}/log4cxx/private/log4cxx_private.tmp"
+						match="@HAS_ODBC@"
+						replace="${has-ODBC}"
+		/>
 
-    <replaceregexp file="${include.dir}/log4cxx/private/log4cxx_private.tmp"
-       match="@CHARSET_ISO88591@"
-       replace="${charset_is_iso-8859-1}"/>
-    <replaceregexp file="${include.dir}/log4cxx/private/log4cxx_private.tmp"
-       match="@CHARSET_USASCII@"
-       replace="${charset_is_usascii}"/>
-    <replaceregexp file="${include.dir}/log4cxx/private/log4cxx_private.tmp"
-       match="@CHARSET_EBCDIC@"
-       replace="${charset_is_ebcdic}"/>
+		<antcall target="copy-if-changed">
+			<param	name="tofile"
+					value="${include.dir}/log4cxx/log4cxx.h"
+			/>
+			<param	name="file"
+					value="${include.dir}/log4cxx/log4cxx.tmp"
+			/>
+		</antcall>
+		<delete file="${include.dir}/log4cxx/log4cxx.tmp" />
+		<antcall target="copy-if-changed">
+			<param	name="tofile"
+					value="${include.dir}/log4cxx/private/log4cxx_private.h"
+			/>
+			<param	name="file"
+					value="${include.dir}/log4cxx/private/log4cxx_private.tmp"
+			/>
+		</antcall>
+		<delete file="${include.dir}/log4cxx/private/log4cxx_private.tmp" />
+	</target>
 
-    <replaceregexp file="${include.dir}/log4cxx/log4cxx.tmp"
-       match="@CHAR_API@"
-       replace="${enable-char}"/>
+	<target	name="build-apr"
+			depends="find-apr"
+			unless="apr.lib.file">
+		<fail unless="apr.src.dir">Could not locate apr library or source.</fail>
 
-    <replaceregexp file="${include.dir}/log4cxx/log4cxx.tmp"
-       match="@WCHAR_T_API@"
-       replace="${enable-wchar_t}"/>
+		<property	name="apr.lib.type"
+					value="static"
+		/>
+		<property	name="apr.lib.prefix"
+					value=""
+		/>
+		<property	name="apr.lib.suffix"
+					value=""
+		/>
+		<property	name="project.type"
+					value="msvc6"
+		/>
 
-    <replaceregexp file="${include.dir}/log4cxx/log4cxx.tmp"
-       match="@UNICHAR_API@"
-       replace="${enable-unichar}"/>
+		<ant	antfile="src/ant/apr-build.xml"
+				target="build"
+				inheritAll="false">
+			<property	name="basedir"
+						value="${apr.src.dir}"
+			/>
+			<property	name="target.dir"
+						value="${target.dir}"
+			/>
+			<property	name="debug"
+						value="${debug}"
+			/>
+			<property	name="lib.prefix"
+						value="${apr.lib.prefix}"
+			/>
+			<property	name="lib.suffix"
+						value="${apr.lib.suffix}"
+			/>
+			<property	name="compiler"
+						value="${compiler}"
+			/>
+			<property	name="runtime"
+						value="${runtime}"
+			/>
+			<property	name="lib.type"
+						value="${apr.lib.type}"
+			/>
+			<property	name="project.type"
+						value="${project.type}"
+			/>
+			<property	name="projects.dir"
+						value="${projects.dir}"
+			/>
+			<property	name="project.if.value"
+						value="${project.if}"
+			/>
+			<property	name="use-pic"
+						value="${use-pic}"
+			/>
+			<property	name="os.family"
+						value="${os.family}"
+			/>
+		</ant>
 
-    <replaceregexp file="${include.dir}/log4cxx/log4cxx.tmp"
-       match="@CFSTRING_API@"
-       replace="${enable-cfstring}"/>
+		<condition	property="apr.lib.dir"
+					value="${target.dir}/${debug.release}/shared">
+			<equals	arg1="${apr.lib.type}"
+					arg2="shared"
+			/>
+		</condition>
 
+		<property	name="apr.lib.dir"
+					location="${target.dir}/${debug.release}/static"
+		/>
+		<property	name="apr.project.file"
+					location="${projects.dir}/apr"
+		/>
+	</target>
 
-    <replaceregexp file="${include.dir}/log4cxx/private/log4cxx_private.tmp"
-       match="@HAS_SYSLOG@"
-       replace="1"/>
-    <replaceregexp file="${include.dir}/log4cxx/private/log4cxx_private.tmp"
-       match="@HAS_STD_LOCALE@"
-       replace="1"/>
-    <replaceregexp file="${include.dir}/log4cxx/private/log4cxx_private.tmp"
-       match="@HAS_MBSRTOWCS@"
-       replace="1"/>
-    <replaceregexp file="${include.dir}/log4cxx/private/log4cxx_private.tmp"
-       match="@HAS_WCSTOMBS@"
-       replace="1"/>
-    <condition property="has-fwide" value="0">
-        <isset property="is-cygwin"/>
-    </condition>
-    <property name="has-fwide" value="1"/>
-    <replaceregexp file="${include.dir}/log4cxx/private/log4cxx_private.tmp"
-       match="@HAS_FWIDE@"
-       replace="${has-fwide}"/>
+	<target	name="build-apr-util"
+			depends="build-apr, find-apr-util"
+			unless="apr-util.lib.file">
+		<fail unless="apr-util.src.dir">Could not locate apr-util library or source.</fail>
 
-    <condition property="has-libesmtp-value" value="1">
-        <isset property="has-libesmtp"/>
-    </condition>
-    <property name="has-libesmtp-value" value="0"/>
-    <replaceregexp file="${include.dir}/log4cxx/private/log4cxx_private.tmp"
-       match="LOG4CXX_HAVE_LIBESMTP 0"
-       replace="LOG4CXX_HAVE_LIBESMTP ${has-libesmtp-value}"/>
-    <replaceregexp file="${include.dir}/log4cxx/private/log4cxx_private.tmp"
-       match="@HAS_LIBESMTP@"
-       replace="${has-libesmtp-value}"/>
+		<property	name="apr-util.lib.type"
+					value="${apr.lib.type}"
+		/>
+		<property	name="apr-util.lib.prefix"
+					value=""
+		/>
+		<property	name="apr-util.lib.suffix"
+					value=""
+		/>
+		<property	name="project.type"
+					value="msvc6"
+		/>
+		<!--  built this way, apr-util will include expat and doesn't need an external reference  -->
+		<property	name="apr-util-includes-dependencies"
+					value="1"
+		/>
 
-    <replaceregexp file="${include.dir}/log4cxx/private/log4cxx_private.tmp"
-       match="@HAS_ODBC@"
-       replace="${has-ODBC}"/>
-       
-    <antcall target="copy-if-changed">
-        <param name="tofile" value="${include.dir}/log4cxx/log4cxx.h"/>
-        <param name="file" value="${include.dir}/log4cxx/log4cxx.tmp"/>
-    </antcall>
-    <delete file="${include.dir}/log4cxx/log4cxx.tmp"/>
-    <antcall target="copy-if-changed">
-        <param name="tofile" value="${include.dir}/log4cxx/private/log4cxx_private.h"/>
-        <param name="file" value="${include.dir}/log4cxx/private/log4cxx_private.tmp"/>
-    </antcall>
-    <delete file="${include.dir}/log4cxx/private/log4cxx_private.tmp"/>
-    
-</target>
+		<ant	antfile="src/ant/apr-util-build.xml"
+				target="build"
+				inheritAll="false">
+			<property	name="target.dir"
+						value="${target.dir}"
+			/>
+			<property	name="basedir"
+						value="${apr-util.src.dir}"
+			/>
+			<property	name="debug"
+						value="${debug}"
+			/>
+			<property	name="lib.prefix"
+						value="${apr-util.lib.prefix}"
+			/>
+			<property	name="lib.suffix"
+						value="${apr-util.lib.suffix}"
+			/>
+			<property	name="compiler"
+						value="${compiler}"
+			/>
+			<property	name="runtime"
+						value="${runtime}"
+			/>
+			<property	name="apr.include.dir"
+						value="${apr.include.dir}"
+			/>
+			<property	name="apr.lib.dir"
+						value="${apr.lib.dir}"
+			/>
+			<property	name="apr.lib.type"
+						value="${apr.lib.type}"
+			/>
+			<property	name="lib.type"
+						value="${apr-util.lib.type}"
+			/>
+			<property	name="project.type"
+						value="${project.type}"
+			/>
+			<property	name="projects.dir"
+						value="${projects.dir}"
+			/>
+			<property	name="project.if.value"
+						value="${project.if}"
+			/>
+			<property	name="use-pic"
+						value="${use-pic}"
+			/>
+			<property	name="os.family"
+						value="${os.family}"
+			/>
+		</ant>
 
+		<condition	property="apr-util.lib.dir"
+					value="${target.dir}/${debug.release}/shared">
+			<equals	arg1="${apr-util.lib.type}"
+					arg2="shared"
+			/>
+		</condition>
+		<property	name="apr-util.lib.dir"
+					location="${target.dir}/${debug.release}/static"
+		/>
+		<property	name="apr-util.project.file"
+					location="${projects.dir}/apr-util"
+		/>
+	</target>
 
-<target name="build-apr" depends="find-apr" unless="apr.lib.file">
-    <fail unless="apr.src.dir">Could not locate apr library or source.</fail>
-    <property name="apr.lib.type" value="static"/>
-   <property name="apr.lib.prefix" value=""/>
-   <property name="apr.lib.suffix" value=""/>
-   <property name="project.type" value="msvc6"/>
-    <ant antfile="src/ant/apr-build.xml" target="build" inheritAll="false">
-        <property name="basedir" value="${apr.src.dir}"/>
-        <property name="target.dir" value="${target.dir}"/>
-        <property name="debug" value="${debug}"/>
-        <property name="lib.prefix" value="${apr.lib.prefix}"/>
-        <property name="lib.suffix" value="${apr.lib.suffix}"/>
-        <property name="compiler" value="${compiler}"/>
-        <property name="runtime" value="${runtime}"/>
-        <property name="lib.type" value="${apr.lib.type}"/>
-        <property name="project.type" value="${project.type}"/>
-        <property name="projects.dir" value="${projects.dir}"/>
-        <property name="project.if.value" value="${project.if}"/>
-        <property name="use-pic" value="${use-pic}"/>
-        <property name="os.family" value="${os.family}"/>
-    </ant>
-    <condition property="apr.lib.dir" value="${target.dir}/${debug.release}/shared">
-        <equals arg1="${apr.lib.type}" arg2="shared"/>
-    </condition>
-    <property name="apr.lib.dir" location="${target.dir}/${debug.release}/static"/>
-    <property name="apr.project.file" location="${projects.dir}/apr"/>
-</target>
+	<target	name="build-libesmtp"
+			depends="find-esmtp"
+			if="has-libesmtp"
+			unless="esmtp.lib.file">
+		<fail unless="esmtp.src.dir">Could not locate libesmtp library or source.</fail>
 
+		<property	name="esmtp.lib.type"
+					value="static"
+		/>
+		<property	name="esmtp.lib.prefix"
+					value=""
+		/>
+		<property	name="esmtp.lib.suffix"
+					value=""
+		/>
+		<property	name="project.type"
+					value="msvc6"
+		/>
+		<condition	property="esmtp.compiler"
+					value="gcc">
+			<equals	arg1="${compiler}"
+					arg2="g++"
+			/>
+		</condition>
+		<property	name="esmtp.compiler"
+					value="${compiler}"
+		/>
 
-<target name="build-apr-util" depends="build-apr, find-apr-util" unless="apr-util.lib.file">
-    <fail unless="apr-util.src.dir">Could not locate apr-util library or source.</fail>
-    <property name="apr-util.lib.type" value="${apr.lib.type}"/>
-   <property name="apr-util.lib.prefix" value=""/>
-   <property name="apr-util.lib.suffix" value=""/>
-   <property name="project.type" value="msvc6"/>
-   <!--  built this way, apr-util will include expat and doesn't need an external reference  -->
-   <property name="apr-util-includes-dependencies" value="1"/>
+		<ant	antfile="src/ant/esmtp-build.xml"
+				target="build"
+				inheritAll="false">
+			<property	name="target.dir"
+						value="${target.dir}"
+			/>
+			<property	name="basedir"
+						value="${esmtp.src.dir}"
+			/>
+			<property	name="debug"
+						value="${debug}"
+			/>
+			<property	name="lib.prefix"
+						value="${esmtp.lib.prefix}"
+			/>
+			<property	name="lib.suffix"
+						value="${esmtp.lib.suffix}"
+			/>
+			<property	name="compiler"
+						value="${esmtp.compiler}"
+			/>
+			<property	name="runtime"
+						value="${runtime}"
+			/>
+			<property	name="lib.type"
+						value="${esmtp.lib.type}"
+			/>
+			<property	name="project.type"
+						value="${project.type}"
+			/>
+			<property	name="projects.dir"
+						value="${projects.dir}"
+			/>
+			<property	name="project.if.value"
+						value="${project.if}"
+			/>
+			<property	name="use-pic"
+						value="${use-pic}"
+			/>
+			<property	name="os.family"
+						value="${os.family}"
+			/>
+		</ant>
 
-    <ant antfile="src/ant/apr-util-build.xml" target="build" inheritAll="false">
-        <property name="target.dir" value="${target.dir}"/>
-        <property name="basedir" value="${apr-util.src.dir}"/>
-        <property name="debug" value="${debug}"/>
-        <property name="lib.prefix" value="${apr-util.lib.prefix}"/>
-        <property name="lib.suffix" value="${apr-util.lib.suffix}"/>
-        <property name="compiler" value="${compiler}"/>
-        <property name="runtime" value="${runtime}"/>
-        <property name="apr.include.dir" value="${apr.include.dir}"/>
-        <property name="apr.lib.dir" value="${apr.lib.dir}"/>
-        <property name="apr.lib.type" value="${apr.lib.type}"/>
-        <property name="lib.type" value="${apr-util.lib.type}"/>
-        <property name="project.type" value="${project.type}"/>
-        <property name="projects.dir" value="${projects.dir}"/>
-        <property name="project.if.value" value="${project.if}"/>
-        <property name="use-pic" value="${use-pic}"/>
-        <property name="os.family" value="${os.family}"/>
-    </ant>
+		<condition	property="esmtp.lib.dir"
+					value="${target.dir}/${debug.release}/shared">
+			<equals	arg1="${esmtp.lib.type}"
+					arg2="shared"
+			/>
+		</condition>
+		<property	name="esmtp.lib.dir"
+					location="${target.dir}/${debug.release}/static"
+		/>
+		<property	name="esmtp.project.file"
+					location="${projects.dir}/libesmtp"
+		/>
+	</target>
 
-    <condition property="apr-util.lib.dir" value="${target.dir}/${debug.release}/shared">
-        <equals arg1="${apr-util.lib.type}" arg2="shared"/>
-    </condition>
-    <property name="apr-util.lib.dir" location="${target.dir}/${debug.release}/static"/>
-    <property name="apr-util.project.file" location="${projects.dir}/apr-util"/>
-</target>
+	<target	name="make-header-check">
+		<echo	file="${header}.cpp"
+				append="false">
+			#include "${header}"
+			#include "${header}"
+		</echo>
+	</target>
 
-<target name="build-libesmtp" depends="find-esmtp" if="has-libesmtp" unless="esmtp.lib.file">
-    <fail unless="esmtp.src.dir">Could not locate libesmtp library or source.</fail>
-    <property name="esmtp.lib.type" value="static"/>
-    <property name="esmtp.lib.prefix" value=""/>
-    <property name="esmtp.lib.suffix" value=""/>
-    <property name="project.type" value="msvc6"/>
-    <condition property="esmtp.compiler" value="gcc">
-        <equals arg1="${compiler}" arg2="g++"/>
-    </condition>
-    <property name="esmtp.compiler" value="${compiler}"/>
+	<target	name="header-check"
+			depends="build-apr-util, configure"
+			description="Checks headers against Effective C++ guidelines">
+		<fail unless="is-gcc">Requires GCC compiler</fail>
 
-    <ant antfile="src/ant/esmtp-build.xml" target="build" inheritAll="false">
-        <property name="target.dir" value="${target.dir}"/>
-        <property name="basedir" value="${esmtp.src.dir}"/>
-        <property name="debug" value="${debug}"/>
-        <property name="lib.prefix" value="${esmtp.lib.prefix}"/>
-        <property name="lib.suffix" value="${esmtp.lib.suffix}"/>
-        <property name="compiler" value="${esmtp.compiler}"/>
-        <property name="runtime" value="${runtime}"/>
-        <property name="lib.type" value="${esmtp.lib.type}"/>
-        <property name="project.type" value="${project.type}"/>
-        <property name="projects.dir" value="${projects.dir}"/>
-        <property name="project.if.value" value="${project.if}"/>
-        <property name="use-pic" value="${use-pic}"/>
-        <property name="os.family" value="${os.family}"/>
-    </ant>
+		<taskdef resource="net/sf/antcontrib/antcontrib.properties" />
+		<delete dir="${target.dir}/header-check" />
+		<mkdir dir="${target.dir}/header-check" />
+		<copy	todir="${target.dir}/header-check"
+				overwrite="true">
+			<fileset	dir="${include.dir}"
+						includes="**/*.h">
+				<!-- obsolete header with #error directive to eliminate its use -->
+				<exclude name="**/tchar.h" />
+				<!--  excluded due to conflict between log4cxx/rfa.h and log4cxx/rolling/rfa.h  -->
+				<exclude name="log4cxx/rollingfileappender.h" />
+			</fileset>
+		</copy>
+		<foreach	target="make-header-check"
+					param="header">
+			<path>
+				<fileset	dir="${target.dir}/header-check"
+							includes="**/*.h"
+				/>
+			</path>
+		</foreach>
+		<property	name="project.type"
+					value="msvc6"
+		/>
+		<cc	objdir="${target.dir}/header-check"
+			name="gcc"
+			exceptions="true"
+			subsystem="gui"
+			optimize="${optimize}"
+			multithreaded="true"
+			relentless="true"
+			debug="${debug}"
+			projectsOnly="${projectsOnly}">
 
-    <condition property="esmtp.lib.dir" value="${target.dir}/${debug.release}/shared">
-        <equals arg1="${esmtp.lib.type}" arg2="shared"/>
-    </condition>
-    <property name="esmtp.lib.dir" location="${target.dir}/${debug.release}/static"/>
-    <property name="esmtp.project.file" location="${projects.dir}/libesmtp"/>
-</target>
+			<compilerarg	value="-Weffc++"
+			/>
+			<compilerarg	value="-Wall"
+			/>
+			<compilerarg	value="${pic-option}"
+							if="pic-option"
+			/>
+			<fileset	dir="${target.dir}/header-check"
+						includes="**/*.cpp"
+						excludes="log4cxx/private/*.cpp **/aprinitializer.h.cpp"
+			/>
+			<includepath path="${include.dir}" />
+			<project	outfile="${projects.dir}/projects/header-check"
+						type="${project.type}"
+						if="project.if"
+			/>
+		</cc>
+	</target>
 
+	<target	name="update-rc-files-version-info"
+			description="Provides current version information for Windows resource files."
+			if="is-windows"
+			unless="is-bcc">
+		<replaceregexp	file="${resources.dir}/log4cxx.rc"
+						match="FILEVERSION \d+, \d+, \d+, \d+"
+						replace="FILEVERSION ${version.major}, ${version.minor}, 0, ${version.rev}"
+		/>
+		<replaceregexp	file="${resources.dir}/log4cxx.rc"
+						match="PRODUCTVERSION \d+, \d+, \d+, \d+"
+						replace="PRODUCTVERSION ${version.major}, ${version.minor}, 0, ${version.rev}"
+		/>
+		<replaceregexp	file="${resources.dir}/log4cxx.rc"
+						match="&quot;FileVersion&quot;, &quot;\d+, \d+, \d+, \d+&quot;"
+						replace="&quot;FileVersion&quot;, &quot;${version.major}, ${version.minor}, 0, ${version.rev}&quot;"
+		/>
+		<replaceregexp	file="${resources.dir}/log4cxx.rc"
+						match="&quot;ProductVersion&quot;, &quot;\d+, \d+, \d+, \d+&quot;"
+						replace="&quot;ProductVersion&quot;, &quot;${version.major}, ${version.minor}, 0, ${version.rev}&quot;"
+		/>
+	</target>
 
-<target name="make-header-check">
-   <echo file="${header}.cpp" append="false">
-#include "${header}"
-#include "${header}"
-</echo>
-</target>
+	<target	name="restore-rc-files-version-info"
+			description="Restores version information for Windows resource files to their default values."
+			if="is-windows"
+			unless="is-bcc">
+		<replaceregexp	file="${resources.dir}/log4cxx.rc"
+						match="FILEVERSION \d+, \d+, \d+, \d+"
+						replace="FILEVERSION 0, 0, 0, 0"
+		/>
+		<replaceregexp	file="${resources.dir}/log4cxx.rc"
+						match="PRODUCTVERSION \d+, \d+, \d+, \d+"
+						replace="PRODUCTVERSION 0, 0, 0, 0"
+		/>
+		<replaceregexp	file="${resources.dir}/log4cxx.rc"
+						match="&quot;FileVersion&quot;, &quot;\d+, \d+, \d+, \d+&quot;"
+						replace="&quot;FileVersion&quot;, &quot;0, 0, 0, 0&quot;"
+		/>
+		<replaceregexp	file="${resources.dir}/log4cxx.rc"
+						match="&quot;ProductVersion&quot;, &quot;\d+, \d+, \d+, \d+&quot;"
+						replace="&quot;ProductVersion&quot;, &quot;0, 0, 0, 0&quot;"
+		/>
+	</target>
+
+	<target	name="build-lib"
+			depends="build-apr-util, build-libesmtp, configure"
+			description="Build log4cxx library">
+		<mkdir dir="${log4cxx.lib.dir}/log4cxx_obj" />
+
+		<condition	property="apr-static"
+					value="1">
+			<equals	arg1="${apr.lib.type}"
+					arg2="static"
+			/>
+		</condition>
+
+		<condition	property="apr-util-static"
+					value="1">
+			<equals	arg1="${apr-util.lib.type}"
+					arg2="static"
+			/>
+		</condition>
+
+		<condition	property="apr-libs-match"
+					value="1">
+			<equals	arg1="${apr.lib.type}"
+					arg2="${apr-util.lib.type}"
+			/>
+		</condition>
+
+		<fail unless="apr-libs-match">
+			apr is ${apr.lib.type} and apr-util is ${apr-util.lib.type}, must be same type.
+		</fail>
+		<property	name="lib.name"
+					value="log4cxx"
+		/>
+		<property	name="lib.prefix"
+					value=""
+		/>
+		<property	name="lib.suffix"
+					value=""
+		/>
+
+		<condition	property="apr-util.dependencies"
+					value="expat iconv">
+			<equals	arg1="${apr-util.lib.type}"
+					arg2="static"
+			/>
+		</condition>
+
+		<property	name="project.compiler"
+					value="${compiler}"
+		/>
+		<property	name="project.type"
+					value="msvc6"
+		/>
+
+		<condition	property="resource.compiler"
+					value="windres">
+			<isset property="is-gcc" />
+		</condition>
+		<condition	property="resource.compiler"
+					value="brc">
+			<isset property="is-bcc" />
+		</condition>
+		<property	name="resource.compiler"
+					value="msrc"
+		/>
+
+		<antcall target="update-rc-files-version-info" />
+
+		<cc	name="${project.compiler}"
+			exceptions="true"
+			outfile="${log4cxx.lib.dir}/${lib.prefix}${lib.name}${lib.suffix}"
+			outputfileproperty="log4cxx.lib.file"
+			subsystem="console"
+			multithreaded="true"
+			runtime="${runtime}"
+			outtype="${lib.type}"
+			objdir="${log4cxx.lib.dir}/log4cxx_obj"
+			debug="${debug}"
+			projectsOnly="${projectsOnly}"
+			failonerror="true">
+
+			<!-- brc aborts with an access violation. -->
+			<compiler	name="${resource.compiler}"
+						if="is-windows"
+						unless="is-bcc">
+				<includepath path="${resources.dir}" />
+				<fileset	dir="${resources.dir}"
+							includes="*.rc"
+				/>
+			</compiler>
+
+			<fileset	dir="${src.dir}"
+						includes="*.cpp"
+			/>
+			<fileset	dir="${include.dir}"
+						includes="**/*.h"
+			/>
+
+			<includepath	path="${include.dir}"
+			/>
+			<includepath	path="${apr.include.dir}"
+							if="apr.include.dir"
+			/>
+			<includepath	path="${apr-util.include.dir}"
+							if="apr-util.include.dir"
+			/>
+			<includepath	path="${esmtp.include.dir}"
+							if="esmtp.include.dir"
+			/>
+
+			<defineset	define="LOG4CXX"
+			/>
+			<defineset	define="LOG4CXX_STATIC"
+						if="is-static"
+			/>
+			<defineset	define="APR_DECLARE_STATIC"
+						if="apr-static"
+			/>
+			<defineset	define="APU_DECLARE_STATIC"
+						if="apr-util-static"
+			/>
+			<defineset	define="WIN32 _USRDLL DLL_EXPORTS"
+						if="is-windows"
+			/>
+
+			<compilerarg	value="${pic-option}"
+							if="pic-option"
+			/>
+
+			&libsets;
+
+			<project	type="${project.type}"
+						outfile="${projects.dir}/projects/${lib.name}"
+						if="project.if">
+				<comment>&license;</comment>
+				<dependency file="${projects.dir}/apr" />
+				<dependency file="${projects.dir}/xml" />
+				<dependency file="${projects.dir}/aprutil" depends="apr,xml" />
+				<dependency name="${projects.dir}/libesmtp" />
+			</project>
+		</cc>
+
+		<antcall target="restore-rc-files-version-info" />
+
+		<!-- copy liblog4cxx.so to log4cxx.dll for MinGW and Cygwin -->
+		<condition	property="copy.log4cxx"
+					value="${log4cxx.lib.dir}/${lib.prefix}${lib.name}${lib.suffix}.dll">
+			<and>
+				<os family="windows" />
+				<isset property="is-gcc" />
+				<equals arg1="${lib.type}" arg2="shared" />
+				<isset property="log4cxx.lib.file" />
+			</and>
+		</condition>
+	</target>
+
+	<target	name="build"
+			depends="build-lib"
+			if="copy.log4cxx">
+		<copy	file="${log4cxx.lib.file}"
+				tofile="${copy.log4cxx}"
+				overwrite="true"
+				preservelastmodified="true"
+		/>
+	</target>
+
+	<target	name="build-example">
+		<mkdir dir="${log4cxx.lib.dir}/${example.name}_obj" />
+
+		<property	name="project.compiler"
+					value="${compiler}"
+		/>
+		<property	name="project.type"
+					value="msvc6"
+		/>
+		<property	name="example.include.dir"
+					value="${example.src.dir}"
+		/>
+
+		<cc	name="${project.compiler}"
+			exceptions="true"
+			outfile="${log4cxx.lib.dir}/${example.name}"
+			subsystem="console"
+			multithreaded="true"
+			runtime="${runtime}"
+			outtype="executable"
+			objdir="${log4cxx.lib.dir}/${example.name}_obj"
+			debug="${debug}"
+			projectsOnly="${projectsOnly}">
+
+			<fileset	dir="${example.src.dir}"
+						includes="${example.includes}"
+			/>
+
+			<includepath path="${include.dir}" />
+			<includepath path="${example.include.dir}" />
+			<includepath path="${apr.include.dir}" if="apr.include.dir" />
+
+			<defineset	define="WIN32"
+						if="is-windows"
+			/>
+			<defineset	define="LOG4CXX_STATIC"
+						if="is-static"
+			/>
+			<defineset	define="APR_DECLARE_STATIC"
+						if="apr-static"
+			/>
+
+			<compilerarg value="${pic-option}" if="pic-option" />
+
+			<libset	libs="${lib.prefix}${lib.name}${lib.suffix}"
+					dir="${log4cxx.lib.dir}"
+			/>
+			&libsets;
+
+			<project	outfile="${projects.dir}/projects/${example.name}"
+						type="${project.type}"
+						if="project.if">
+				<comment>&license;</comment>
+				<dependency file="${projects.dir}/apr" />
+				<dependency file="${projects.dir}/xml" />
+				<dependency name="${projects.dir}/aprutil" depends="apr,xml" />
+				<dependency name="${projects.dir}/libesmtp" />
+				<dependency file="${projects.dir}/log4cxx" depends="apr,aprutil,xml" />
+			</project>
+		</cc>
+	</target>
+
+	<target	name="run-example">
+		<!--  remove any stray configuration files  -->
+		<delete>
+			<fileset	dir="${log4cxx.lib.dir}"
+						includes="log4*.properties log4*.xml"
+			/>
+		</delete>
+		<exec	executable="${log4cxx.lib.dir}/${example.name}"
+				dir="${log4cxx.lib.dir}"
+				failonerror="true">
+			<env	key="DYLD_LIBRARY_PATH"
+					 value="${log4cxx.lib.dir}:${apr.lib.dir}:${apr-util.lib.dir}:${env.DYLD_LIBRARY_PATH}"
+			/>
+			<env	key="LD_LIBRARY_PATH"
+					value="${log4cxx.lib.dir}:${apr.lib.dir}:${apr-util.lib.dir}:${env.LD_LIBRARY_PATH}"
+			/>
+			<env	key="Path"
+					value="${env.Path}"
+			/>
+		</exec>
+	</target>
+
+	<target	name="build-delayedloop"
+			depends="build">
+		<antcall target="build-example">
+			<param	name="example.src.dir"
+					value="${examples.dir}"
+			/>
+			<param	name="example.name"
+					value="delayedloop"
+			/>
+			<param	name="example.includes"
+					value="delayedloop.cpp"
+			/>
+		</antcall>
+	</target>
+
+	<target	name="build-trivial"
+			depends="build">
+		<antcall target="build-example">
+			<param	name="example.src.dir"
+					value="${examples.dir}"
+			/>
+			<param	name="example.name"
+					value="trivial"
+			/>
+			<param	name="example.includes"
+					value="trivial.cpp"
+			/>
+		</antcall>
+	</target>
+
+	<target	name="build-console"
+			depends="build">
+		<antcall target="build-example">
+			<param	name="example.src.dir"
+					value="${examples.dir}"
+			/>
+			<param	name="example.name"
+					value="console"
+			/>
+			<param	name="example.includes"
+					value="console.cpp"
+			/>
+		</antcall>
+	</target>
+
+	<target	name="build-stream"
+			depends="build">
+		<antcall target="build-example">
+			<param	name="example.src.dir"
+					value="${examples.dir}"
+			/>
+			<param	name="example.name"
+					value="stream"
+			/>
+			<param	name="example.includes"
+					value="stream.cpp"
+			/>
+		</antcall>
+	</target>
+
+	<target	name="build-examples"
+			depends="build-delayedloop, build-trivial, build-stream, build-console"
+			description="Builds example programs"
+	/>
+
+	<target	name="build-unittest"
+			depends="build"
+			description="Builds unit test app">
+		<mkdir dir="${log4cxx.lib.dir}/testsuite_obj" />
+
+		<property	name="project.compiler"
+					value="${compiler}"
+		/>
+		<property	name="project.type"
+					value="msvc6"
+		/>
+
+		<cc	name="${project.compiler}"
+			exceptions="true"
+			outfile="${log4cxx.lib.dir}/testsuite"
+			subsystem="console"
+			multithreaded="true"
+			runtime="${runtime}"
+			outputfileproperty="testsuite.exe"
+			outtype="executable"
+			objdir="${log4cxx.lib.dir}/testsuite_obj"
+			debug="${debug}"
+			projectsOnly="${projectsOnly}"
+			failonerror="true">
+
+			<fileset	dir="${tests.cpp.dir}"
+						includes="**/*.cpp **/*.c **/*.h"
+			/>
+
+			<includepath	path="${include.dir}"
+			/>
+			<includepath	path="${apr.include.dir}"
+							if="apr.include.dir"
+			/>
+			<includepath	path="${apr-util.include.dir}"
+							if="apr-util.include.dir"
+			/>
+
+			<defineset	define="LOG4CXX_STATIC"
+						if="is-static"
+			/>
+			<defineset	define="APR_DECLARE_STATIC"
+						if="apr-static"
+			/>
+			<defineset	define="APU_DECLARE_STATIC"
+						if="apr-util-static"
+			/>
+			<defineset	define="WIN32"
+						if="is-windows"
+			/>
+
+			<compilerarg	value="${pic-option}"
+							if="pic-option"
+			/>
+
+			<libset	libs="${lib.prefix}${lib.name}${lib.suffix}"
+					dir="${log4cxx.lib.dir}"
+			/>
+			&libsets;
+
+			<project	outfile="${projects.dir}/projects/testsuite"
+						type="${project.type}"
+						if="project.if">
+				<comment>&license;</comment>
+
+				<dependency file="${projects.dir}/apr" />
+				<dependency file="${projects.dir}/xml" />
+				<dependency file="${projects.dir}/aprutil" depends="apr,xml" />
+				<dependency name="${projects.dir}/libesmtp" />
+				<dependency file="${projects.dir}/log4cxx" depends="apr,aprutil,libesmtp" />
+			</project>
+		</cc>
+	</target>
+
+	<target	name="build-standalone-unittest"
+			description="Builds a unit tests + log4cxx executable"
+			depends="build-apr-util, build-libesmtp, configure">
+		<mkdir dir="${executable.dir}/static/testsuite-standalone_obj" />
+
+		<property	name="project.compiler"
+					value="${compiler}"
+		/>
+		<property	name="project.type"
+					value="msvc6"
+		/>
+		<condition	property="resource.compiler"
+					value="windres">
+			<isset property="is-gcc" />
+		</condition>
+		<property	name="resource.compiler"
+					value="msrc"
+		/>
 
+		<cc	name="${project.compiler}"
+			exceptions="true"
+			outfile="${executable.dir}/static/testsuite-standalone"
+			subsystem="console"
+			multithreaded="true"
+			runtime="${runtime}"
+			outputfileproperty="testsuite-standalone.exe"
+			outtype="executable"
+			objdir="${executable.dir}/static/testsuite-standalone_obj"
+			debug="${debug}"
+			projectsOnly="${projectsOnly}">
 
-<target name="header-check" depends="build-apr-util, configure"
-    description="Checks headers against Effective C++ guidelines">
-        <fail unless="is-gcc">Requires GCC compiler</fail>
-        <taskdef resource="net/sf/antcontrib/antcontrib.properties"/>
-        <delete dir="${target.dir}/header-check"/>
-        <mkdir dir="${target.dir}/header-check"/>
-        <copy todir="${target.dir}/header-check" overwrite="true">
-             <fileset dir="${include.dir}" includes="**/*.h">
-                    <!-- obsolete header with #error directive to eliminate its use -->
-                    <exclude name="**/tchar.h"/>
-                    <!--  excluded due to conflict between log4cxx/rfa.h and log4cxx/rolling/rfa.h  -->
-                    <exclude name="log4cxx/rollingfileappender.h"/>
-             </fileset>
-        </copy>
-        <foreach target="make-header-check" param="header">
-                <path><fileset dir="${target.dir}/header-check" includes="**/*.h"/></path>
-        </foreach>
-       <property name="project.type" value="msvc6"/>
-        <cc objdir="${target.dir}/header-check"
-                name="gcc"
-                exceptions="true"
-                subsystem="gui"
-                optimize="none"
-                multithreaded="true"
-                relentless="true"
-                debug="${debug}"
-                projectsOnly="${projectsOnly}">
-                <compilerarg value="-Weffc++"/>
-                <compilerarg value="-Wall"/>
-                <compilerarg value="${pic-option}" if="pic-option"/>
-                <fileset dir="${target.dir}/header-check"
-                     includes="**/*.cpp"
-                     excludes="log4cxx/private/*.cpp **/aprinitializer.h.cpp"/>
-                <includepath path="${include.dir}"/>
-                <project outfile="${projects.dir}/header-check"
-                    type="${project.type}" if="project.if"/>
-         </cc>
-</target>
+			<compiler	name="${resource.compiler}"
+						if="is-windows">
+				<includepath path="${resources.dir}" />
+				<fileset	dir="${resources.dir}"
+							includes="*.rc"
+				/>
+			</compiler>
 
-<target name="build-lib" depends="build-apr-util, build-libesmtp, configure" description="Build log4cxx library">
-    <mkdir dir="${log4cxx.lib.dir}/log4cxx_obj"/>
+			<fileset	dir="${src.dir}"
+						includes="*.cpp"
+						excludes="**/iconv_module.cpp"
+			/>
+			<fileset	dir="${include.dir}"
+						includes="**/*.h"
+			/>
+			<fileset	dir="${tests.cpp.dir}"
+						includes="**/*.cpp **/*.c **/*.h"
+			/>
 
-   <condition property="apr-static" value="1">
-      <equals arg1="${apr.lib.type}" arg2="static"/>
-   </condition>
-      
-   <condition property="apr-util-static" value="1">
-      <equals arg1="${apr-util.lib.type}" arg2="static"/>
-   </condition>
+			<includepath path="${include.dir}" />
+				<includepath	path="${apr.include.dir}"
+								if="apr.include.dir"
+				/>
+			<includepath	path="${apr-util.include.dir}"
+							if="apr-util.include.dir"
+			/>
+			<includepath	path="${esmtp.include.dir}"
+							if="esmtp.include.dir"
+			/>
 
-   <condition property="apr-libs-match" value="1">
-      <equals arg1="${apr.lib.type}" arg2="${apr-util.lib.type}"/>
-   </condition>
+			<defineset	define="LOG4CXX"
+			/>
+			<defineset	define="APR_DECLARE_STATIC"
+						if="apr-static"
+			/>
+			<defineset	define="APU_DECLARE_STATIC"
+						if="apr-util-static"
+			/>
+			<defineset	define="WIN32"
+						if="is-windows"
+			/>
 
-   <fail unless="apr-libs-match">apr is ${apr.lib.type} and apr-util is ${apr-util.lib.type}, must be same type.</fail>
-   <property name="lib.name" value="log4cxx"/>
-   <property name="lib.prefix" value=""/>
-   <property name="lib.suffix" value=""/>
+			<compilerarg	value="${pic-option}"
+							if="pic-option"
+			/>
+			&libsets;
 
-   <condition property="apr-util.dependencies" value="expat iconv">
-      <equals arg1="${apr-util.lib.type}" arg2="static"/>
-   </condition>
+			<includepath path="${include.dir}" />
+			<includepath path="${apr.include.dir}" />
 
+			<defineset define="LOG4CXX" />
 
-    <property name="project.compiler" value="${compiler}"/>
-   <property name="project.type" value="msvc6"/>
+			<libset libs="cw32mt" if="is-bcc" />
 
-  <condition property="resource.compiler" value="windres">
-    <isset property="is-gcc"/>
-  </condition>
-  <condition property="resource.compiler" value="brc">
-    <isset property="is-bcc"/>
-  </condition>
-  <property name="resource.compiler" value="msrc"/>
-    
-    <cc name="${project.compiler}"
-                exceptions="true"
-                outfile="${log4cxx.lib.dir}/${lib.prefix}${lib.name}${lib.suffix}"
-                outputfileproperty="log4cxx.lib.file"
-                subsystem="console"
-                multithreaded="true"
-                runtime="${runtime}"
-                outtype="${lib.type}"
-                objdir="${log4cxx.lib.dir}/log4cxx_obj"
-                debug="${debug}"
-                projectsOnly="${projectsOnly}">
-        <compiler name="${resource.compiler}" if="is-windows">
-          <includepath path="${resources.dir}"/>
-          <fileset dir="${resources.dir}" includes="*.rc"/>
-        </compiler>
-        <fileset dir="${src.dir}" includes="*.cpp"/>
-        <fileset dir="${include.dir}" includes="**/*.h"/>
-        <includepath path="${include.dir}"/>
-        <includepath path="${apr.include.dir}" if="apr.include.dir"/>
-        <includepath path="${apr-util.include.dir}" if="apr-util.include.dir"/>
-        <includepath path="${esmtp.include.dir}" if="esmtp.include.dir"/>
-        <defineset define="_USRDLL DLL_EXPORTS" if="is-windows"/>
-        <defineset define="LOG4CXX"/>
-        <defineset define="LOG4CXX_STATIC" if="is-static"/>
-        <defineset define="APR_DECLARE_STATIC" if="apr-static"/>
-        <defineset define="APU_DECLARE_STATIC" if="apr-util-static"/>
-        <defineset define="WIN32" if="is-windows"/>
-        <compilerarg value="${pic-option}" if="pic-option"/>
-        &libsets;
-        <project type="${project.type}" outfile="${projects.dir}/${lib.name}" if="project.if">
-         <comment>&license;</comment>
-            <dependency file="${projects.dir}/apr"/>
-            <dependency file="${projects.dir}/xml"/>
-            <dependency file="${projects.dir}/aprutil" depends="apr,xml"/>
-            <dependency name="${projects.dir}/libesmtp"/>
-        </project>
-    </cc>
+			<project	outfile="${projects.dir}/projects/testsuite-standalone"
+						type="${project.type}"
+						if="project.if">
+				<comment>&license;</comment>
 
-    <!-- copy liblog4cxx.so to log4cxx.dll for MinGW and Cygwin -->
-    <condition property="copy.log4cxx" value="${log4cxx.lib.dir}/${lib.prefix}${lib.name}${lib.suffix}.dll">
-        <and>
-            <os family="windows"/>
-            <isset property="is-gcc"/>
-            <equals arg1="${lib.type}" arg2="shared"/>
-            <isset property="log4cxx.lib.file"/>
-         </and>
-    </condition>
-</target>
+				<dependency file="${projects.dir}/apr" />
+				<dependency file="${projects.dir}/xml" />
+				<dependency file="${projects.dir}/aprutil" depends="apr,xml" />
+				<dependency name="${projects.dir}/libesmtp" />
+			</project>
+		</cc>
+	</target>
 
-<target name="build" depends="build-lib" if="copy.log4cxx">
-    <copy file="${log4cxx.lib.file}" tofile="${copy.log4cxx}" 
-       overwrite="true" preservelastmodified="true"/>
-</target>
+	<target	name="build-all"
+			depends="build-examples, build-unittest"
+			description="Builds all artifacts"
+	/>
 
-<target name="build-example">
-    <mkdir dir="${log4cxx.lib.dir}/${example.name}_obj"/>
-    <property name="project.compiler" value="${compiler}"/>
-   <property name="project.type" value="msvc6"/>
-    <property name="example.include.dir" value="${example.src.dir}"/>
-    <cc name="${project.compiler}"
-                exceptions="true"
-                outfile="${log4cxx.lib.dir}/${example.name}"
-                subsystem="console"
-                multithreaded="true"
-                runtime="${runtime}"
-                outtype="executable"
-                objdir="${log4cxx.lib.dir}/${example.name}_obj"
-                debug="${debug}"
-                projectsOnly="${projectsOnly}">
-        <fileset dir="${example.src.dir}" includes="${example.includes}"/>
-        <includepath path="${include.dir}"/>
-        <includepath path="${example.include.dir}"/>
-        <includepath path="${apr.include.dir}" if="apr.include.dir"/>
+	<target	name="clean-output"
+			depends="init">
+		<delete>
+			<fileset	dir="${tests.dir}"
+						includes="output/*"
+			/>
+		</delete>
+	</target>
 
-        <defineset define="WIN32" if="is-windows"/>
-        <defineset define="LOG4CXX_STATIC" if="is-static"/>
-        <defineset define="APR_DECLARE_STATIC" if="apr-static"/>
+	<target	name="run-defaultinit-unittest"
+			depends="build-unittest">
+		<antcall target="run-defaultinit-log4X">
+			<param	name="config"
+					value="log4j"
+			/>
+		</antcall>
+		<antcall target="run-defaultinit-log4X">
+			<param	name="config"
+					value="log4cxx"
+			/>
+		</antcall>
+	</target>
 
-        <compilerarg value="${pic-option}" if="pic-option"/>
+	<target	name="run-defaultinit-log4X">
+		<mkdir dir="${tests.output.dir}" />
 
-        <libset libs="${lib.prefix}${lib.name}${lib.suffix}" dir="${log4cxx.lib.dir}"/>
-        &libsets;
+		<!--  test of log4j.properties -->
+		<delete>
+			<fileset	dir="${log4cxx.lib.dir}"
+						includes="*.properties *.xml"
+			/>
+		</delete>
+		<exec	executable="${testsuite.exe}"
+				dir="${log4cxx.lib.dir}"
+				failonerror="true">
+			<arg value="-v" />
+			<arg value="testcase1" />
 
-        <project outfile="${projects.dir}/${example.name}" type="${project.type}" if="project.if">
-         <comment>&license;</comment>
-            <dependency file="${projects.dir}/apr"/>
-            <dependency file="${projects.dir}/xml"/>
-            <dependency name="${projects.dir}/aprutil" depends="apr,xml"/>
-            <dependency name="${projects.dir}/libesmtp"/>
-            <dependency file="${projects.dir}/log4cxx" depends="apr,aprutil,xml"/>
-        </project>
-        
-    </cc>
-</target>
+			<env	key="DYLD_LIBRARY_PATH"
+					value="${log4cxx.lib.dir}:${apr.lib.dir}:${apr-util.lib.dir}:${env.DYLD_LIBRARY_PATH}"
+			/>
+			<env	key="LD_LIBRARY_PATH"
+					value="${log4cxx.lib.dir}:${apr.lib.dir}:${apr-util.lib.dir}:${env.LD_LIBRARY_PATH}"
+			/>
+		</exec>
 
-<target name="run-example">
-    <!--  remove any stray configuration files  -->
-    <delete>
-        <fileset dir="${log4cxx.lib.dir}" includes="log4*.properties log4*.xml"/>
-    </delete>
-    <exec executable="${log4cxx.lib.dir}/${example.name}"
-          dir="${log4cxx.lib.dir}"
-          failonerror="true">
-          <env key="DYLD_LIBRARY_PATH"
-                   value="${log4cxx.lib.dir}:${apr.lib.dir}:${apr-util.lib.dir}:${env.DYLD_LIBRARY_PATH}"/>
-            <env key="LD_LIBRARY_PATH"
-                   value="${log4cxx.lib.dir}:${apr.lib.dir}:${apr-util.lib.dir}:${env.LD_LIBRARY_PATH}"/>
-            <env key="Path" value="${env.Path}"/>
-    </exec>
-</target>
+		<copy	tofile="${log4cxx.lib.dir}/${config}.xml"
+				file="${tests.resources.dir}/input/xml/defaultInit.xml"
+				overwrite="true"
+		/>
+		<exec	executable="${testsuite.exe}"
+				dir="${log4cxx.lib.dir}"
+				failonerror="true">
+			<arg value="-v" />
+			<arg value="testcase2" />
 
+			<env	key="DYLD_LIBRARY_PATH"
+					value="${log4cxx.lib.dir}:${apr.lib.dir}:${apr-util.lib.dir}:${env.DYLD_LIBRARY_PATH}"
+			/>
+			<env	key="LD_LIBRARY_PATH"
+					value="${log4cxx.lib.dir}:${apr.lib.dir}:${apr-util.lib.dir}:${env.LD_LIBRARY_PATH}"
+			/>
+		</exec>
+		<delete>
+			<fileset	dir="${log4cxx.lib.dir}"
+						includes="*.properties *.xml"
+			/>
+		</delete>
 
-<target name="build-delayedloop" depends="build">
-    <antcall target="build-example">
-       <param name="example.src.dir" value="${examples.dir}"/>
-       <param name="example.name" value="delayedloop"/>
-       <param name="example.includes" value="delayedloop.cpp"/>
-    </antcall>
-</target>
+		<copy	tofile="${log4cxx.lib.dir}/${config}.properties"
+				file="${tests.resources.dir}/input/defaultInit3.properties"
+				overwrite="true"
+		/>
+		<exec	executable="${testsuite.exe}"
+				dir="${log4cxx.lib.dir}"
+				failonerror="true">
+			<arg value="-v" />
+			<arg value="testcase3" />
 
-<target name="build-trivial" depends="build">
-    <antcall target="build-example">
-       <param name="example.src.dir" value="${examples.dir}"/>
-       <param name="example.name" value="trivial"/>
-       <param name="example.includes" value="trivial.cpp"/>
-    </antcall>
-</target>
+			<env	key="DYLD_LIBRARY_PATH"
+					value="${log4cxx.lib.dir}:${apr.lib.dir}:${apr-util.lib.dir}:${env.DYLD_LIBRARY_PATH}"
+			/>
+			<env	key="LD_LIBRARY_PATH"
+					value="${log4cxx.lib.dir}:${apr.lib.dir}:${apr-util.lib.dir}:${env.LD_LIBRARY_PATH}"
+			/>
+		</exec>
+		<delete>
+			<fileset	dir="${log4cxx.lib.dir}"
+						includes="*.properties *.xml"
+			/>
+		</delete>
 
-<target name="build-console" depends="build">
-    <antcall target="build-example">
-       <param name="example.src.dir" value="${examples.dir}"/>
-       <param name="example.name" value="console"/>
-       <param name="example.includes" value="console.cpp"/>
-    </antcall>
-</target>
+		<copy	file="${tests.resources.dir}/input/xml/defaultInit.xml"
+				tofile="${log4cxx.lib.dir}/${config}.xml"
+		/>
+		<copy	file="${tests.resources.dir}/input/defaultInit3.properties"
+				tofile="${log4cxx.lib.dir}/${config}.properties"
+		/>
+		<exec	executable="${testsuite.exe}"
+				dir="${log4cxx.lib.dir}"
+				failonerror="true">
+			<arg value="-v" />
+			<arg value="testcase4" />
 
-<target name="build-stream" depends="build">
-    <antcall target="build-example">
-       <param name="example.src.dir" value="${examples.dir}"/>
-       <param name="example.name" value="stream"/>
-       <param name="example.includes" value="stream.cpp"/>
-    </antcall>
-</target>
+			<env	key="LD_LIBRARY_PATH"
+					value="${log4cxx.lib.dir}:${apr.lib.dir}:${apr-util.lib.dir}:${env.LD_LIBRARY_PATH}"
+			/>
+			<env	key="DYLD_LIBRARY_PATH"
+					value="${log4cxx.lib.dir}:${apr.lib.dir}:${apr-util.lib.dir}:${env.DYLD_LIBRARY_PATH}"
+			/>
+		</exec>
+		<delete>
+			<fileset	dir="${log4cxx.lib.dir}"
+						includes="*.properties *.xml"
+			/>
+		</delete>
+	</target>
 
-<target name="build-examples"
-    depends="build-delayedloop, build-trivial, build-stream, build-console"
-    description="Builds example programs"/>
+	<target	name="run-unittest"
+			depends="build-unittest, run-defaultinit-unittest, clean-output"
+			description="Runs unit test">
+		<property environment="env" />
+		<mkdir dir="${tests.output.dir}" />
+		<delete>
+			<fileset	dir="${tests.output.dir}"
+						includes="*"
+			/>
+		</delete>
 
+		<exec	executable="${testsuite.exe}"
+				dir="${tests.resources.dir}"
+				failonerror="true">
+			<arg value="-v" />
 
+			<env	key="TOTO"
+					value="wonderful"
+			/>
+			<env	key="key1"
+					value="value1"
+			/>
+			<env	key="key2"
+					value="value2"
+			/>
+			<env	key="LD_LIBRARY_PATH"
+					value="${log4cxx.lib.dir}:${apr.lib.dir}:${apr-util.lib.dir}:${env.LD_LIBRARY_PATH}"
+			/>
+			<env	key="DYLD_LIBRARY_PATH"
+					value="${log4cxx.lib.dir}:${apr.lib.dir}:${apr-util.lib.dir}:${env.DYLD_LIBRARY_PATH}"
+			/>
+			<env	key="Path"
+					value="${log4cxx.lib.dir};${env.Path}"
+			/>
+		</exec>
 
-<target name="build-unittest" depends="build"
-    description="Builds unit test app">
-    <mkdir dir="${log4cxx.lib.dir}/testsuite_obj"/>
+		<available	property="dom3-status"
+					value=""
+					file="src/test/resources/output/dom&#xB3;"
+		/>
+		<available	property="dom4-status"
+					value=""
+					file="src/test/resources/output/dom&#x3195;"
+		/>
 
-    <property name="project.compiler" value="${compiler}"/>
-   <property name="project.type" value="msvc6"/>
-    <cc name="${project.compiler}"
-                exceptions="true"
-                outfile="${log4cxx.lib.dir}/testsuite"
-                subsystem="console"
-                multithreaded="true"
-                runtime="${runtime}"
-                outputfileproperty="testsuite.exe"
-                outtype="executable"
-                objdir="${log4cxx.lib.dir}/testsuite_obj"
-                debug="${debug}"
-                projectsOnly="${projectsOnly}">
-        <fileset dir="${tests.cpp.dir}" includes="**/*.cpp **/*.c **/*.h"/>
-        <includepath path="${include.dir}"/>
-        <includepath path="${apr.include.dir}" if="apr.include.dir"/>
-        <includepath path="${apr-util.include.dir}" if="apr-util.include.dir"/>
-        <defineset define="LOG4CXX_STATIC" if="is-static"/>
-        <defineset define="APR_DECLARE_STATIC" if="apr-static"/>
-        <defineset define="APU_DECLARE_STATIC" if="apr-util-static"/>
-        <defineset define="WIN32" if="is-windows"/>
-        <compilerarg value="${pic-option}" if="pic-option"/>
+		<property	name="dom3-status"
+					value="NOT"
+		/>
+		<property	name="dom4-status"
+					value="NOT"
+		/>
 
-        <libset libs="${lib.prefix}${lib.name}${lib.suffix}" dir="${log4cxx.lib.dir}"/>
-        &libsets;
+		<echo>output/dom&#xB3; was ${dom3-status} created in DOMTestCase::test3</echo>
+		<echo>output/dom&#x3195; was ${dom4-status} created in DOMTestCase::test4</echo>
+	</target>
 
-        <project outfile="${projects.dir}/testsuite" type="${project.type}" if="project.if">
-         <comment>&license;</comment>
-            <dependency file="${projects.dir}/apr"/>
-            <dependency file="${projects.dir}/xml"/>
-            <dependency file="${projects.dir}/aprutil" depends="apr,xml"/>
-            <dependency name="${projects.dir}/libesmtp"/>
-            <dependency file="${projects.dir}/log4cxx" depends="apr,aprutil,libesmtp"/>
-        </project>
-    </cc>
-</target>
+	<target	name="run-standalone-unittest"
+			depends="build-standalone-unittest, clean-output"
+			description="Runs standalone unit test">
+		<property environment="env" />
+		<mkdir dir="${tests.output.dir}" />
+		<delete>
+			<fileset	dir="${tests.output.dir}"
+						includes="*"
+			/>
+		</delete>
 
+		<exec	executable="${log4cxx-standalone-test.exe}"
+				dir="${tests.resources.dir}"
+				failonerror="true">
+			<arg value="-v" />
 
+			<env	key="TOTO"
+					value="wonderful"
+			/>
+			<env	key="key1"
+					value="value1"
+			/>
+			<env	key="key2"
+					value="value2"
+			/>
+			<env	key="DYLD_LIBRARY_PATH"
+					value="${log4cxx.lib.dir}:${apr.lib.dir}:${apr-util.lib.dir}:${env.DYLD_LIBRARY_PATH}"
+			/>
+			<env	key="LD_LIBRARY_PATH"
+					value="${log4cxx.lib.dir}:${apr.lib.dir}:${apr-util.lib.dir}:${env.LD_LIBRARY_PATH}"
+			/>
+			<env	key="Path"
+					value="${log4cxx.lib.dir};${env.Path}"
+			/>
+		</exec>
 
+		<available	property="dom3-status"
+					value=""
+					file="src/test/resources/output/dom&#xB3;"
+		/>
+		<available	property="dom4-status"
+					value=""
+					file="src/test/resources/output/dom&#x3195;"
+		/>
 
-<target name="build-standalone-unittest"
-    description="Builds a unit tests + log4cxx executable"
-    depends="build-apr-util, build-libesmtp, configure">
-    <mkdir dir="${executable.dir}/static/testsuite-standalone_obj"/>
-    <property name="project.compiler" value="${compiler}"/>
-   <property name="project.type" value="msvc6"/>
-  <condition property="resource.compiler" value="windres">
-    <isset property="is-gcc"/>
-  </condition>
-  <property name="resource.compiler" value="msrc"/>
+		<property	name="dom3-status"
+					value="NOT"
+		/>
+		<property	name="dom4-status"
+					value="NOT"
+		/>
 
-  <cc name="${project.compiler}"
-                exceptions="true"
-                outfile="${executable.dir}/static/testsuite-standalone"
-                subsystem="console"
-                multithreaded="true"
-                runtime="${runtime}"
-                outputfileproperty="testsuite-standalone.exe"
-                outtype="executable"
-                objdir="${executable.dir}/static/testsuite-standalone_obj"
-                debug="${debug}"
-                projectsOnly="${projectsOnly}">
-        <compiler name="${resource.compiler}" if="is-windows">
-          <includepath path="${resources.dir}"/>
-          <fileset dir="${resources.dir}" includes="*.rc"/>
-        </compiler>
-        <fileset dir="${src.dir}" includes="*.cpp" excludes="**/iconv_module.cpp"/>
-        <fileset dir="${include.dir}" includes="**/*.h"/>
-        <fileset dir="${tests.cpp.dir}" includes="**/*.cpp **/*.c **/*.h"/>
-        <includepath path="${include.dir}"/>
-         <includepath path="${apr.include.dir}" if="apr.include.dir"/>
-        <includepath path="${apr-util.include.dir}" if="apr-util.include.dir"/>
-        <includepath path="${esmtp.include.dir}" if="esmtp.include.dir"/>
-        <defineset define="LOG4CXX"/>
-        <defineset define="APR_DECLARE_STATIC" if="apr-static"/>
-        <defineset define="APU_DECLARE_STATIC" if="apr-util-static"/>
-        <defineset define="WIN32" if="is-windows"/>
-        <compilerarg value="${pic-option}" if="pic-option"/>
+		<echo>output/dom&#xB3; was ${dom3-status} created in DOMTestCase::test3</echo>
+		<echo>output/dom&#x3195; was ${dom4-status} created in DOMTestCase::test4</echo>
+	</target>
 
-        &libsets;
+	<target	name="run-socketserver"
+			depends="build-unittest, clean-output"
+			description="Runs SocketServer test">
+		<property environment="env" />
+		<mkdir dir="${tests.output.dir}" />
+		<delete>
+			<fileset	dir="${tests.output.dir}"
+						includes="*"
+			/>
+		</delete>
+		<mkdir dir="target/test-classes" />
+		<javac	srcdir="src/test/java"
+				includes="org/apache/log4j/net/ShortSocketServer.java"
+				destdir="target/test-classes"
+				classpath="${log4j.jar}"
+		/>
+		<parallel>
+			<java	classname="org.apache.log4j.net.ShortSocketServer"
+					fork="yes" dir="src/test/resources"
+					classpath="target/test-classes:${log4j.jar}">
+				<arg value="8" />
+				<arg value="input/socketServer" />
+			</java>
+			<sequential>
+				<sleep seconds="2" />
+				<exec	executable="${testsuite.exe}"
+						dir="${tests.resources.dir}"
+						failonerror="true">
+					<arg value="-v" />
+					<arg value="socketservertestcase" />
 
-        <includepath path="${include.dir}"/>
-        <includepath path="${apr.include.dir}"/>
-        <defineset define="LOG4CXX"/>
-        <libset libs="cw32mt" if="is-bcc"/>
+					<env	key="LD_LIBRARY_PATH"
+							value="${log4cxx.lib.dir}:${apr.lib.dir}:${apr-util.lib.dir}:${env.LD_LIBRARY_PATH}"
+					/>
+					<env	key="DYLD_LIBRARY_PATH"
+							value="${log4cxx.lib.dir}:${apr.lib.dir}:${apr-util.lib.dir}:${env.DYLD_LIBRARY_PATH}"
+					/>
+					<env	key="Path"
+							value="${log4cxx.lib.dir};${env.Path}"
+					/>
+				</exec>
+			</sequential>
+		</parallel>
+	</target>
 
+	<target	name="build-projects">
+		<mkdir dir="${projects.dir}/projects" />
+		<property	name="project.type"
+					value="msvc6"
+		/>
 
-        <project outfile="${projects.dir}/testsuite-standalone"
-                 type="${project.type}"
-                 if="project.if">
-         <comment>&license;</comment>
-            <dependency file="${projects.dir}/apr"/>
-            <dependency file="${projects.dir}/xml"/>
-            <dependency file="${projects.dir}/aprutil" depends="apr,xml"/>
-            <dependency name="${projects.dir}/libesmtp"/>
-        </project>
-    </cc>
-</target>
+		<antcall target="build-unittest">
+			<param	name="project.if"
+					value="true"
+			/>
+			<param	name="project.type"
+					value="${project.type}"
+			/>
+			<param	name="project.compiler"
+					value="${project.compiler}"
+			/>
+			<param	name="debug"
+					value="${debug}"
+			/>
+			<param	name="projectsOnly"
+					value="true"
+			/>
+			<param	name="os.family"
+					value="${os.family}"
+			/>
+			<param	name="find"
+					value="${find}"
+			/>
+		</antcall>
 
-<target name="build-all" depends="build-examples, build-unittest"
-     description="Builds all artifacts"/>
+		<antcall target="build-standalone-unittest">
+			<param	name="project.if"
+					value="true"
+			/>
+			<param	name="project.type"
+					value="${project.type}"
+			/>
+			<param	name="project.compiler"
+					value="${project.compiler}"
+			/>
+			<param	name="debug"
+					value="${debug}"
+			/>
+			<param	name="projectsOnly"
+					value="true"
+			/>
+			<param	name="os.family"
+					value="${os.family}"
+			/>
+			<param	name="find"
+					value="${find}"
+			/>
+		</antcall>
 
-<target name="clean-output" depends="init">
-     <delete>
-         <fileset dir="${tests.dir}" includes="output/*"/>
-     </delete>
-</target>
+		<antcall target="build-examples">
+			<param	name="project.if"
+					value="true"
+			/>
+			<param	name="project.type"
+					value="${project.type}"
+			/>
+			<param	name="project.compiler"
+					value="${project.compiler}"
+			/>
+			<param	name="debug"
+					value="${debug}"
+			/>
+			<param	name="projectsOnly"
+					value="true"
+			/>
+			<param	name="os.family"
+					value="${os.family}"
+			/>
+			<param	name="find"
+					value="${find}"
+			/>
+		</antcall>
+	</target>
 
-<target name="run-defaultinit-unittest" depends="build-unittest">
-    <antcall target="run-defaultinit-log4X">
-        <param name="config" value="log4j"/>
-    </antcall>
-    <antcall target="run-defaultinit-log4X">
-        <param name="config" value="log4cxx"/>
-    </antcall>
-</target>
+	<target	name="build-projects-vc6"
+			depends="init"
+			description="Builds project files for Microsoft Visual C++ 6">
+		<antcall target="build-projects">
+			<param	name="project.type"
+					value="msvc6"
+			/>
+			<param	name="project.compiler"
+					value="msvc"
+			/>
+			<param	name="os.family"
+					value="windows"
+			/>
+			<param	name="debug"
+					value="${debug}"
+			/>
+			<param	name="find"
+					value="${find}"
+			/>
+		</antcall>
+	</target>
 
-<target name="run-defaultinit-log4X">
-    <mkdir dir="${tests.output.dir}"/>
+	<target	name="build-projects-vc7"
+			depends="init"
+			description="Builds project files for Microsoft Visual Studio .NET">
+		<antcall target="build-projects">
+			<param	name="project.type"
+					value="msvc7"
+			/>
+			<param	name="project.compiler"
+					value="msvc"
+			/>
+			<param	name="os.family"
+					value="windows"
+			/>
+			<param	name="debug"
+					value="${debug}"
+			/>
+			<param	name="find"
+					value="${find}"
+			/>
+		</antcall>
+	</target>
 
+	<target	name="build-projects-vc8"
+			depends="init"
+			description="Builds project files for Microsoft Visual C++ 2005">
+		<antcall target="build-projects">
+			<param	name="project.type"
+					value="msvc8"
+			/>
+			<param	name="project.compiler"
+					value="msvc"
+			/>
+			<param	name="os.family"
+					value="windows"
+			/>
+			<param	name="debug"
+					value="${debug}"
+			/>
+			<param	name="find"
+					value="${find}"
+			/>
+		</antcall>
+	</target>
 
-    <!--  test of log4j.properties -->
-    <delete>
-        <fileset dir="${log4cxx.lib.dir}" includes="*.properties *.xml"/>
-    </delete>
-    <exec executable="${testsuite.exe}" dir="${log4cxx.lib.dir}"
-              failonerror="true">
-            <arg value="-v"/>
-            <arg value="testcase1"/>
-            <env key="DYLD_LIBRARY_PATH"
-                   value="${log4cxx.lib.dir}:${apr.lib.dir}:${apr-util.lib.dir}:${env.DYLD_LIBRARY_PATH}"/>
-            <env key="LD_LIBRARY_PATH"
-                   value="${log4cxx.lib.dir}:${apr.lib.dir}:${apr-util.lib.dir}:${env.LD_LIBRARY_PATH}"/>
-    </exec>
 
-    <copy tofile="${log4cxx.lib.dir}/${config}.xml"
-       file="${tests.resources.dir}/input/xml/defaultInit.xml" overwrite="true"/>
-    <exec executable="${testsuite.exe}" dir="${log4cxx.lib.dir}"
-              failonerror="true">
-            <arg value="-v"/>
-            <arg value="testcase2"/>
-            <env key="DYLD_LIBRARY_PATH"
-                   value="${log4cxx.lib.dir}:${apr.lib.dir}:${apr-util.lib.dir}:${env.DYLD_LIBRARY_PATH}"/>
-            <env key="LD_LIBRARY_PATH"
-                   value="${log4cxx.lib.dir}:${apr.lib.dir}:${apr-util.lib.dir}:${env.LD_LIBRARY_PATH}"/>
-    </exec>
-    <delete>
-        <fileset dir="${log4cxx.lib.dir}" includes="*.properties *.xml"/>
-    </delete>
+	<target	name="build-projects-vc9"
+			depends="init"
+			 description="Builds project files for Microsoft Visual C++ 2008">
+		<antcall target="build-projects">
+			<param	name="project.type"
+					value="msvc9"
+			/>
+			<param	name="project.compiler"
+					value="msvc"
+			/>
+			<param	name="os.family"
+					value="windows"
+			/>
+			<param	name="debug"
+					value="${debug}"
+			/>
+			<param	name="find"
+					value="${find}"
+			/>
+		</antcall>
+	</target>
 
+	<target	name="build-projects-xcode"
+			depends="init"
+			description="Builds project files for Apple Xcode">
+		<antcall target="build-projects">
+			<param	name="project.type"
+					value="xcode"
+			/>
+			<param	name="project.compiler"
+					value="gcc"
+			/>
+			<param	name="os.family"
+					value="mac"
+			/>
+			<param	name="debug"
+					value="${debug}"
+			/>
+			<param	name="find"
+					value="${find}"
+			/>
+		</antcall>
+	</target>
 
-    <copy tofile="${log4cxx.lib.dir}/${config}.properties"
-       file="${tests.resources.dir}/input/defaultInit3.properties" overwrite="true"/>
-    <exec executable="${testsuite.exe}" dir="${log4cxx.lib.dir}"
-              failonerror="true">
-            <arg value="-v"/>
-            <arg value="testcase3"/>
-            <env key="DYLD_LIBRARY_PATH"
-                   value="${log4cxx.lib.dir}:${apr.lib.dir}:${apr-util.lib.dir}:${env.DYLD_LIBRARY_PATH}"/>
-            <env key="LD_LIBRARY_PATH"
-                   value="${log4cxx.lib.dir}:${apr.lib.dir}:${apr-util.lib.dir}:${env.LD_LIBRARY_PATH}"/>
-    </exec>
-    <delete>
-        <fileset dir="${log4cxx.lib.dir}" includes="*.properties *.xml"/>
-    </delete>
+	<target	name="test-compile"
+			depends="build-unittest, build-examples"
+	/>
 
+	<target	name="check"
+			depends="run-unittest, build-examples"
+		description="Runs all diagnostic tests">
+		<antcall target="run-example">
+			<param	name="example.name"
+					value="trivial"
+			/>
+		</antcall>
 
-    <copy file="${tests.resources.dir}/input/xml/defaultInit.xml" tofile="${log4cxx.lib.dir}/${config}.xml"/>
-    <copy file="${tests.resources.dir}/input/defaultInit3.properties" tofile="${log4cxx.lib.dir}/${config}.properties"/>
-    <exec executable="${testsuite.exe}" dir="${log4cxx.lib.dir}"
-              failonerror="true">
-            <arg value="-v"/>
-            <arg value="testcase4"/>
-            <env key="LD_LIBRARY_PATH"
-                   value="${log4cxx.lib.dir}:${apr.lib.dir}:${apr-util.lib.dir}:${env.LD_LIBRARY_PATH}"/>
-            <env key="DYLD_LIBRARY_PATH"
-                   value="${log4cxx.lib.dir}:${apr.lib.dir}:${apr-util.lib.dir}:${env.DYLD_LIBRARY_PATH}"/>
-    </exec>
-    <delete>
-        <fileset dir="${log4cxx.lib.dir}" includes="*.properties *.xml"/>
-    </delete>
+		<antcall target="run-example">
+			<param	name="example.name"
+					value="stream"
+			/>
+		</antcall>
+	</target>
 
+	<target	name="apidocs"
+			description="Build log4cxx manual">
+		<copy	file="${base.dir}/src/site/doxy/Doxyfile.in"
+				tofile="${target.dir}/Doxyfile"
+				overwrite="true"
+		/>
+		<replace file="${target.dir}/Doxyfile">
+			<replacefilter	token="@version@"
+							value="${project.version}"
+			/>
+			<replacefilter	token="@base_dir@"
+							value="${base.dir}"
+			/>
+			<replacefilter	token="@manual_dest@"
+							value="${target.dir}/site/apidocs"
+			/>
+		</replace>
 
-</target>
+		<!--
+			Copying project site index data to apidocs index
 
-<target name="run-unittest" depends="build-unittest, run-defaultinit-unittest, clean-output"
-    description="Runs unit test">
-    <property environment="env"/>
-    <mkdir dir="${tests.output.dir}"/>
-    <delete>
-         <fileset dir="${tests.output.dir}" includes="*"/>
-    </delete>
-    <exec executable="${testsuite.exe}" dir="${tests.resources.dir}"
-              failonerror="true">
-            <arg value="-v"/>
-            <env key="TOTO" value="wonderful"/>
-            <env key="key1" value="value1"/>
-            <env key="key2" value="value2"/>
-            <env key="LD_LIBRARY_PATH"
-                   value="${log4cxx.lib.dir}:${apr.lib.dir}:${apr-util.lib.dir}:${env.LD_LIBRARY_PATH}"/>
-            <env key="DYLD_LIBRARY_PATH"
-                   value="${log4cxx.lib.dir}:${apr.lib.dir}:${apr-util.lib.dir}:${env.DYLD_LIBRARY_PATH}"/>
-            <env key="Path"
-                   value="${log4cxx.lib.dir};${env.Path}"/>
-    </exec>
-    <available property="dom3-status" value="" file="src/test/resources/output/dom&#xB3;"/>
-    <available property="dom4-status" value="" file="src/test/resources/output/dom&#x3195;"/>
-    <property name="dom3-status" value="NOT"/>
-    <property name="dom4-status" value="NOT"/>
-    <echo>output/dom&#xB3; was ${dom3-status} created in DOMTestCase::test3</echo>
-    <echo>output/dom&#x3195; was ${dom4-status} created in DOMTestCase::test4</echo>
-</target>
+			We need some Apache boilerplate and intro in the apidocs index page and the easiest
+			solution seems to be to simply copy some of the contents of the project site index.
+		 -->
+		<xslt	in="${target.dir}/site/index.html"
+				out="${target.dir}/mainpage.dox"
+				style="${base.dir}/src/site/doxy/mainpage.dox.xsl"
+				force="true">
+			<xmlcatalog>
+				<dtd	publicId="-//W3C//DTD XHTML 1.0 Transitional//EN"
+						location="${base.dir}/src/site/doxy/DTDs/xhtml1-transitional.dtd"
+				/>
+				<dtd	publicId="-//W3C//ENTITIES Latin 1 for XHTML//EN"
+						location="${base.dir}/src/site/doxy/DTDs/xhtml-lat1.ent"
+				/>
+				<dtd	publicId="-//W3C//ENTITIES Symbols for XHTML//EN"
+						location="${base.dir}/src/site/doxy/DTDs/xhtml-symbol.ent"
+				/>
+				<dtd	publicId="-//W3C//ENTITIES Special for XHTML//EN"
+						location="${base.dir}/src/site/doxy/DTDs/xhtml-special.ent"
+				/>
+			</xmlcatalog>
+		</xslt>
 
-<target name="run-standalone-unittest"
-   depends="build-standalone-unittest, clean-output"
-   description="Runs standalone unit test">
-    <property environment="env"/>
-    <mkdir dir="${tests.output.dir}"/>
-    <delete>
-         <fileset dir="${tests.output.dir}" includes="*"/>
-    </delete>
-    <exec executable="${log4cxx-standalone-test.exe}" dir="${tests.resources.dir}"
-              failonerror="true">
-            <arg value="-v"/>
-            <env key="TOTO" value="wonderful"/>
-            <env key="key1" value="value1"/>
-            <env key="key2" value="value2"/>
-            <env key="DYLD_LIBRARY_PATH"
-                   value="${log4cxx.lib.dir}:${apr.lib.dir}:${apr-util.lib.dir}:${env.DYLD_LIBRARY_PATH}"/>
-            <env key="LD_LIBRARY_PATH"
-                   value="${log4cxx.lib.dir}:${apr.lib.dir}:${apr-util.lib.dir}:${env.LD_LIBRARY_PATH}"/>
-            <env key="Path"
-                   value="${log4cxx.lib.dir};${env.Path}"/>
-    </exec>
-    <available property="dom3-status" value="" file="src/test/resources/output/dom&#xB3;"/>
-    <available property="dom4-status" value="" file="src/test/resources/output/dom&#x3195;"/>
-    <property name="dom3-status" value="NOT"/>
-    <property name="dom4-status" value="NOT"/>
-    <echo>output/dom&#xB3; was ${dom3-status} created in DOMTestCase::test3</echo>
-    <echo>output/dom&#x3195; was ${dom4-status} created in DOMTestCase::test4</echo>
-</target>
+		<mkdir	dir="${target.dir}/site/apidocs" />
+		<exec	executable="${doxygen.exe}"
+				dir="${target.dir}"
+		/>
 
-<target name="run-socketserver" depends="build-unittest, clean-output"
-    description="Runs SocketServer test">
-    <property environment="env"/>
-    <mkdir dir="${tests.output.dir}"/>
-    <delete>
-         <fileset dir="${tests.output.dir}" includes="*"/>
-    </delete>
-    <mkdir dir="target/test-classes"/>
-    <javac srcdir="src/test/java"
-           includes="org/apache/log4j/net/ShortSocketServer.java" 
-           destdir="target/test-classes" 
-           classpath="${log4j.jar}"/>
-    <parallel>
-       <java classname="org.apache.log4j.net.ShortSocketServer" 
-          fork="yes" dir="src/test/resources" classpath="target/test-classes:${log4j.jar}">
-            <arg value="8"/> 
-            <arg value="input/socketServer"/> 
-       </java>
-       <sequential>
-          <sleep seconds="2"/>
-            <exec executable="${testsuite.exe}" dir="${tests.resources.dir}"
-              failonerror="true">
-                <arg value="-v"/>
-                <arg value="socketservertestcase"/>
-                <env key="LD_LIBRARY_PATH"
-                   value="${log4cxx.lib.dir}:${apr.lib.dir}:${apr-util.lib.dir}:${env.LD_LIBRARY_PATH}"/>
-                <env key="DYLD_LIBRARY_PATH"
-                   value="${log4cxx.lib.dir}:${apr.lib.dir}:${apr-util.lib.dir}:${env.DYLD_LIBRARY_PATH}"/>
-                <env key="Path"
-                   value="${log4cxx.lib.dir};${env.Path}"/>
-            </exec>
-        </sequential>
-    </parallel>
+		<!--
+			Links to the main project site
 
-</target>
+			We want links to the main project site and adding them after doxygen seems to be the
+			only and easiest way.
+		 -->
+		<replaceregexp	match="(&lt;div (?:id=&quot;projectname&quot;|class=&quot;title&quot;)&gt;)(Apache log4cxx)"
+						replace="\1&lt;a href=&quot;http://logging.apache.org/log4cxx&quot;&gt;\2&lt;/a&gt;"
+						flags="img">
+			<fileset dir="${target.dir}/site/apidocs">
+				<include name="*.html" />
+			</fileset>
+		</replaceregexp>
+	</target>
 
-<target name="build-projects">
-        <mkdir dir="${projects.dir}"/>
-       <property name="project.type" value="msvc6"/>
-        <antcall target="build-unittest">
-                <param name="project.if" value="true"/>
-                <param name="project.type" value="${project.type}"/>
-                <param name="project.compiler" value="${project.compiler}"/>
-                <param name="debug" value="${debug}"/>
-                <param name="projectsOnly" value="true"/>
-                <param name="os.family" value="${os.family}"/>
-                <param name="find" value="${find}"/>
-        </antcall>
-        <antcall target="build-standalone-unittest">
-                <param name="project.if" value="true"/>
-                <param name="project.type" value="${project.type}"/>
-                <param name="project.compiler" value="${project.compiler}"/>
-                <param name="debug" value="${debug}"/>
-                <param name="projectsOnly" value="true"/>
-                <param name="os.family" value="${os.family}"/>
-                <param name="find" value="${find}"/>
-        </antcall>
-        <antcall target="build-examples">
-                <param name="project.if" value="true"/>
-                <param name="project.type" value="${project.type}"/>
-                <param name="project.compiler" value="${project.compiler}"/>
-                <param name="debug" value="${debug}"/>
-                <param name="projectsOnly" value="true"/>
-                <param name="os.family" value="${os.family}"/>
-                <param name="find" value="${find}"/>
-        </antcall>
-</target>
+	<target	name="gen-release-projects">
+		<antcall target="build-projects-vc6">
+			<param name="find" value="false" />
+		</antcall>
 
-<target name="build-projects-vc6" depends="init" 
-          description="Builds project files for Microsoft Visual C++ 6">
-    <antcall target="build-projects">
-        <param name="project.type" value="msvc6"/>
-        <param name="project.compiler" value="msvc"/>
-        <param name="os.family" value="windows"/>
-        <param name="debug" value="${debug}"/>
-        <param name="find" value="${find}"/>
-    </antcall>
-</target>
+		<antcall target="build-projects-xcode">
+		</antcall>
 
-<target name="build-projects-vc7" depends="init" 
-          description="Builds project files for Microsoft Visual Studio .NET">
-    <antcall target="build-projects">
-        <param name="project.type" value="msvc7"/>
-        <param name="project.compiler" value="msvc"/>
-        <param name="os.family" value="windows"/>
-        <param name="debug" value="${debug}"/>
-        <param name="find" value="${find}"/>
-    </antcall>
-</target>
+		<replaceregexp	flags="ig"
+						match="ADD LINK32 .*/NOLOGO"
+						replace="ADD LINK32 ADVAPI32.LIB WS2_32.LIB MSWSOCK.LIB SHELL32.LIB ODBC32.LIB /NOLOGO">
+			<fileset	dir="${target.dir}"
+						includes="**/*.dsp"
+			/>
+		</replaceregexp>
 
-<target name="build-projects-vc8" depends="init"
-         description="Builds project files for Microsoft Visual C++ 2005">
-    <antcall target="build-projects">
-      <param name="project.type" value="msvc8"/>
-      <param name="project.compiler" value="msvc"/>
-      <param name="os.family" value="windows"/>
-      <param name="debug" value="${debug}"/>
-      <param name="find" value="${find}"/>
-    </antcall>
-</target>
+		<replaceregexp	flags="g"
+						match=".\\apr.dsp"
+						replace="..\\\\..\\\\apr\\\\apr.dsp">
+			<fileset	dir="${target.dir}"
+						includes="**/*.dsw"
+			/>
+		</replaceregexp>
 
+		<replaceregexp	flags="g"
+						match=".\\aprutil.dsp"
+						replace="..\\\\..\\\\apr-util\\\\aprutil.dsp">
+			<fileset	dir="${target.dir}"
+						includes="**/*.dsw"
+			/>
+		</replaceregexp>
 
-<target name="build-projects-vc9" depends="init"
-           description="Builds project files for Microsoft Visual C++ 2008">
-    <antcall target="build-projects">
-      <param name="project.type" value="msvc9"/>
-      <param name="project.compiler" value="msvc"/>
-      <param name="os.family" value="windows"/>
-      <param name="debug" value="${debug}"/>
-      <param name="find" value="${find}"/>
-    </antcall>
-</target>
+		<replaceregexp	flags="g"
+						match=".\\xml.dsp"
+						replace="..\\\\..\\\\apr-util\\\\xml\\\\expat\\\\lib\\\\xml.dsp">
+			<fileset	dir="${target.dir}"
+						includes="**/*.dsw"
+			/>
+		</replaceregexp>
 
-  <target name="build-projects-xcode" depends="init" 
-          description="Builds project files for Apple Xcode">
-    <antcall target="build-projects">
-        <param name="project.type" value="xcode"/>
-        <param name="project.compiler" value="gcc"/>
-        <param name="os.family" value="mac"/>
-        <param name="debug" value="${debug}"/>
-        <param name="find" value="${find}"/>
-    </antcall>
-</target>
+		<!-- drop library search path -->
+		<replaceregexp	flags="g"
+						match="&lt;string&gt;[\./]*/usr/lib&lt;/string&gt;"
+						replace="">
+			<fileset	dir="${target.dir}"
+						includes="**/*.pbxproj"
+			/>
+		</replaceregexp>
 
+		<replace	dir="${target.dir}"
+					includes="**/*.pbxproj"
+					token="/usr/include/apr-1.0"
+					value="/usr/include/apr-1"
+		/>
+		<replace	dir="${target.dir}" includes="**/*.pbxproj"
+					token="MacOSX10.4u.sdk"
+					value="MacOSX10.5.sdk"
+		/>
+	</target>
 
-<target name="test-compile" depends="build-unittest, build-examples"/>
+	<target	name="site-text-file-cleanup">
+		<fixcrlf	srcDir="${base.dir}/${subDir}"
+					tab="asis"
+					tablength="4"
+					fixlast="false"
+					eof="asis"
+					eol="unix"
+					includes="**/*.css **/*.html"
+		/>
 
+		<replaceregexp	flags="mg"
+						match="(?: |\t)+$"
+						replace="">
+			<fileset	dir="${base.dir}/${subDir}"
+						includes="**/*.css, **/*.html"
+			/>
+		</replaceregexp>
+	</target>
 
-<target name="check" depends="run-unittest, build-examples"
-     description="Runs all diagnostic tests">
-    <antcall target="run-example">
-        <param name="example.name" value="trivial"/>
-    </antcall>
-    <antcall target="run-example">
-        <param name="example.name" value="stream"/>
-    </antcall>
-</target>
+	<target	name="site"
+			depends="apidocs">
+		<antcall target="site-text-file-cleanup">
+			<param	name="subDir"
+					value="target/site"
+			/>
+		</antcall>
+	</target>
 
+	<target	name="gump"
+			depends="check, header-check"
+	/>
 
+	<target	name="prepare-changes"
+			description="Prepares changes.xml from a JIRA issues list">
+		<xslt	style="src/changes/changes.xslt"
+				in="issues.xml"
+				out="src/changes/changes.xml"
+		/>
+	</target>
 
-<target name="apidocs" depends="init" description="Build log4cxx manual">
-  <copy file="src/site/doxy/Doxyfile.in" tofile="${target.dir}/Doxyfile" 
-     overwrite="true"/>
-  <replace file="${target.dir}/Doxyfile">
-    <replacefilter token="@VERSION@" value="${version}"/>
-    <replacefilter token="@base_dir@" value="${base.dir}"/>
-    <replacefilter token="@manual_dest@" value="${base.dir}/target/site/apidocs"/>
-  </replace>
-  <mkdir dir="target/site/apidocs"/>
-  <exec executable="${doxygen.exe}" dir="${target.dir}"/>
+	<target	name="checkout-site">
+		<exec	executable="svn"
+				failonerror="true">
+			<arg value="co"					/>
+			<arg value="${site.svnRepoUrl}"	/>
+			<arg value="${site.deployDir}"	/>
+		</exec>
+	</target>
 
-    <!--  doxygen.css is GPL'd, looks better with it, but not intolerable without it -->
-    <echo file="${target.dir}/site/apidocs/doxygen.css">
-/*
-&license;
-*/
-/*  Minimal replacement for GPL'd doxygen.css  */
-</echo>
-    <echo file="${target.dir}/site/apidocs/tabs.css">
-/*
-&license;
-*/
-/*  Minimal replacement for GPL'd tabs.css  */
-DIV.tabs {
-    display : none ;
-}
-</echo>
-     <!--   fix for issue http://jira.codehaus.org/browse/MSKINS-2  -->
-     <replace file="${target.dir}/site/css/maven-theme.css"
-           token="font-size: normal;"
-           value="font-size: medium;"/>
+	<target	name="update-site">
+		<exec	executable="svn"
+				dir="${site.deployDir}"
+				failonerror="true">
+			<arg value="update" />
+		</exec>
+	</target>
 
-</target>
+	<target	name="post-site"
+			depends="checkout-site, update-site"
+	/>
 
+	<target	name="svn-mime=css">
+		<exec executable="svn">
+			<arg value="propset"		/>
+			<arg value="svn:mime-type"	/>
+			<arg value="text/css"		/>
+			<arg value="${src.css}"		/>
+		</exec>
+	</target>
 
-<target name="site" depends="apidocs">
-    <!-- generate Visual Studio and XCode project files -->
-    <antcall target="build-projects-vc6">
-        <param name="find" value="false"/>
-    </antcall>
-    <antcall target="build-projects-xcode">
-    </antcall>
-    
-    <replaceregexp flags="ig"
-        match="ADD LINK32 .*/NOLOGO"
-        replace="ADD LINK32 ADVAPI32.LIB WS2_32.LIB MSWSOCK.LIB SHELL32.LIB ODBC32.LIB /NOLOGO">
-        <fileset dir="${target.dir}" includes="**/*.dsp"/>        
-    </replaceregexp>
-    <replaceregexp flags="g"
-        match=".\\apr.dsp"
-        replace="..\\\\..\\\\apr\\\\apr.dsp">
-        <fileset dir="${target.dir}" includes="**/*.dsw"/>        
-    </replaceregexp>
-    <replaceregexp flags="g"
-        match=".\\aprutil.dsp"
-        replace="..\\\\..\\\\apr-util\\\\aprutil.dsp">
-        <fileset dir="${target.dir}" includes="**/*.dsw"/>        
-    </replaceregexp>
-    <replaceregexp flags="g"
-        match=".\\xml.dsp"
-        replace="..\\\\..\\\\apr-util\\\\xml\\\\expat\\\\lib\\\\xml.dsp">
-        <fileset dir="${target.dir}" includes="**/*.dsw"/>        
-    </replaceregexp>
-    <!-- drop library search path -->
-    <replaceregexp flags="g"
-        match="&lt;string&gt;[\./]*/usr/lib&lt;/string&gt;"
-        replace="">
-        <fileset dir="${target.dir}" includes="**/*.pbxproj"/>
-    </replaceregexp>
-    <replace dir="${target.dir}" includes="**/*.pbxproj"
-        token="/usr/include/apr-1.0"
-        value="/usr/include/apr-1"/>
-    <replace dir="${target.dir}" includes="**/*.pbxproj"
-        token="MacOSX10.4u.sdk"
-        value="MacOSX10.5.sdk"/>
-    <replace dir="${target.dir}/site" includes="**/*.html">
-        <replacetoken>&lt;html</replacetoken>
-        <replacevalue>&lt;!--
-&license;
---&gt;&lt;html</replacevalue>
-    </replace>
-    <replace dir="${target.dir}/site/css" includes="maven*.css">
-        <replacetoken>body {</replacetoken>
-        <replacevalue>/*
-&license;
-*/
-body {</replacevalue>
-    </replace>
-    <replace dir="${target.dir}/site/css" includes="print.css">
-        <replacetoken>#banner</replacetoken>
-        <replacevalue>/*
-&license;
-*/
-#banner</replacevalue>
-    </replace>
-    
-</target>
+	<target	name="svn-mime=html">
+		<exec executable="svn">
+			<arg value="propset"		/>
+			<arg value="svn:mime-type"	/>
+			<arg value="text/html"		/>
+			<arg value="${src.html}"	/>
+		</exec>
+	</target>
 
-<target name="gump" depends="check, header-check"/>
+	<!--
+		Was unable to get a version w/o any suffix in pom.xml/distributionManagement, guess it's a
+		limitation of the property interpolation used. All suggestions found in the net seem to only
+		work outside that section, e.g. I was able to make a shorter version available in some
+		phases calling ANT targets. Doesn't get me anything... So I'm dealing with the long vs.
+		short name here by simply renaming the folder with the long name created by maven.
 
-<target name="fixcrlf" depends="init" description="repair end-of-line sequences">
-   <fixcrlf srcDir="${base.dir}" tab="remove" tablength="3"
-       eof="remove" fixlast="true" eol="unix" includes="*.xml **/*.cpp **/*.h" excludes="lib/**/*"/>
-</target>
+		This only works for SVN clients using only one ".svn" folder per working copy!
 
-        <target name="prepare-changes" description="Prepares changes.xml from a JIRA issues list">
-            <xslt style="src/changes/changes.xslt" 
-                  in="issues.xml" 
-                  out="src/changes/changes.xml"/>
-        </target>
+		https://cwiki.apache.org/confluence/display/MAVENOLD/POM+Interpolation+Refactor
+		https://stackoverflow.com/a/12002359/2055163
+		https://gist.github.com/tux2323/970877#file-pom-xml-L24
+	 -->
+	<target	name="svn-shorten-dir-name"
+			if="version.hasSuffix">
+		<delete	dir="${site.deployDir.curVersionWoSuffix}"
+		/>
+		<move	file="${site.deployDir.curVersion}"
+				tofile="${site.deployDir.curVersionWoSuffix}"
+		/>
+	</target>
 
-   <target name="checkout-site" unless="svn-available">
-      <exec executable="svn">
-         <arg value="co"/>
-         <arg value="${svnsite.url}"/>
-         <arg value="target/site-deploy"/>
-      </exec>
-   </target>
+	<target	name="site-deploy">
+		<antcall	target="svn-shorten-dir-name"				/>
+		<delete		file="${site.deployDir}/svn-commit.tmp~"	/>
 
-   <target name="update-site" if="svn-available">
-      <exec executable="svn" dir="target/site-deploy" failonerror="true">
-         <arg value="update"/>
-      </exec>
-   </target>
+		<exec	executable="svn"
+				failonerror="true">
+			<arg value="add"									/>
+			<arg value="--force"								/>
+			<arg value="--depth=infinity"						/>
+			<arg value="${site.deployDir.curVersionWoSuffix}"	/>
+		</exec>
 
-   <target name="post-site" depends="checkout-site, update-site"/>
-   
+		<taskdef	name="foreach"
+					classname="net.sf.antcontrib.logic.ForEach"
+		/>
+		<foreach	target="svn-mime=css"
+					param="src.css">
+			<path>
+				<fileset	dir="${site.deployDir.curVersionWoSuffix}"
+							includes="**/*.css"
+				/>
+			</path>
+		</foreach>
+		<foreach	target="svn-mime=html"
+					param="src.html">
+			<path>
+				<fileset	dir="${site.deployDir.curVersionWoSuffix}"
+							includes="**/*.html"
+				/>
+			</path>
+		</foreach>
 
-        <target name="mime=html">
-            <exec executable="svn">
-      <arg value="propset"/>
-                <arg value="svn:mime-type"/>
-                <arg value="text/html"/>
-                <arg value="${src.html}"/>
-            </exec>
-        </target>
+		<antcall target="site-text-file-cleanup">
+			<param	name="subDir"
+					value="${site.deployDir.curVersionWoSuffix}"
+			/>
+		</antcall>
 
-        <target name="mime=css">
-            <exec executable="svn">
-      <arg value="propset"/>
-                <arg value="svn:mime-type"/>
-                <arg value="text/css"/>
-                <arg value="${src.css}"/>
-            </exec>
-        </target>
-   
+		<!--
+			Is allowed to fail in case of no files to delete:
 
-   <target name="site-deploy">
-      <!-- Add any new files (and generate innocuous warnings for the existing content)  -->
-                <delete file="target/site-deploy/svn-commit.tmp~"/>
-      <exec executable="bash" dir="target/site-deploy" failonerror="true">
-         <arg line='-c "svn add --force *"'/>
-      </exec>
-                <taskdef name="foreach" classname="net.sf.antcontrib.logic.ForEach" />
-                <foreach target="mime=html" param="src.html">
-                        <path>
-                                <fileset dir="target/site-deploy" includes="**/*.html"/>
-                        </path>
-                </foreach>
-                <foreach target="mime=css" param="src.css">
-                        <path>
-                                <fileset dir="target/site-deploy" includes="**/*.css"/>
-                        </path>
-                </foreach>
-      <!--  requires that SVN_EDITOR, VISUAL or EDITOR being set to edit commit description -->
-      <exec executable="svn" dir="target/site-deploy" failonerror="true">
-          <arg value="commit"/>
-      </exec>
-   </target>
+			[exec] svn: E205001: Try 'svn help delete' for more information
+     		[exec] svn: E205001: Not enough arguments provided
+		 -->
+		<exec	executable="sh"
+				failonerror="false">
+			<arg value="-c" />
+			<arg value="svn st &quot;${site.deployDir.curVersionWoSuffix}&quot; | grep ! | cut -d! -f2 | sed 's/^ *//' | sed 's/^/\&quot;/g' | sed 's/$/\&quot;/g' | xargs svn rm" />
+		</exec>
 
-   <target name="autogen" depends="init" if="is-unix">
-	<exec executable="sh">
-		<arg value="autogen.sh"/>
-	</exec>
-   </target>
+		<!-- Requires that SVN_EDITOR, VISUAL or EDITOR being set to edit commit description. -->
+		<exec	executable="sh"
+				failonerror="true">
+			<arg value="-c" />
+			<arg value="svn ci &quot;${site.deployDir.curVersionWoSuffix}&quot; &lt; /dev/tty &gt; /dev/tty 2&gt; /dev/tty" />
+		</exec>
+	</target>
 
+	<target	name="autogen"
+			depends="init"
+			if="is-unix">
+		<exec executable="sh">
+			<arg value="autogen.sh" />
+		</exec>
 
+		<!--
+			This was coupled with "site" originally, but made building "site" itself on Windows unneccessary
+			hard and the projects are not even used on the website, but only in releases instead. This target
+			is called in that case and some part of project files generation is unix centered already, too.
+		 -->
+		<antcall target="gen-release-projects">
+		</antcall>
+	</target>
 </project>
+
diff --git a/configure.in b/configure.ac
similarity index 96%
rename from configure.in
rename to configure.ac
index d873c25..d8ad3d4 100644
--- a/configure.in
+++ b/configure.ac
@@ -1,5 +1,3 @@
-AC_INIT(src/main/cpp/logger.cpp)
-
 # Licensed to the Apache Software Foundation (ASF) under one or more
 # contributor license agreements.  See the NOTICE file distributed with
 # this work for additional information regarding copyright ownership.
@@ -14,7 +12,11 @@
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
+
+AC_INIT([log4cxx], [0.11.0])
+AC_CONFIG_MACRO_DIR([src/m4])
+AC_CONFIG_SRCDIR(src/main/cpp/logger.cpp)
+
 # autoconf 2.50 or higher to rebuild aclocal.m4, because the
 # AC_CREATE_PREFIX_CONFIG_H macro needs the AS_DIRNAME macro.
 AC_PREREQ(2.50)
@@ -37,13 +39,15 @@
 [/* no explicit exports */
 #define LOG4CXX_EXPORT])
 
-AM_INIT_AUTOMAKE(log4cxx, 0.10.0)
+AM_INIT_AUTOMAKE([foreign subdir-objects -Wall])
 
 # Checks for programs
 # ----------------------------------------------------------------------------
 
+AM_PROG_AR
 AM_PROG_LIBTOOL
 AC_PROG_INSTALL
+AC_PROG_LN_S
 AC_PROG_MAKE_SET
 
 AC_PROG_CXX([g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC QCC])
@@ -182,9 +186,9 @@
 fi
 
 AC_MSG_CHECKING([for wchar_t])
-AC_COMPILE_IFELSE(AC_LANG_SOURCE([[
+AC_COMPILE_IFELSE([AC_LANG_SOURCE([
                    #include <string>
-                   std::wstring w;]]), [have_wchar_t=yes], [have_wchar_t=no])
+                   std::wstring w;])], [have_wchar_t=yes], [have_wchar_t=no])
 AC_MSG_RESULT($have_wchar_t)
 if test "$have_wchar_t" = "yes"
 then
@@ -205,9 +209,6 @@
 # Checks for libraries
 # ----------------------------------------------------------------------------
 
-AC_PROG_RANLIB
-
-
 #for ODBCAppender
 AC_MSG_CHECKING(for ODBC support)
 AC_ARG_WITH(ODBC,
@@ -335,9 +336,9 @@
 if test "x$enable_cfstring" = xyes; then
         AC_MSG_CHECKING([for cfstring])
         CPPFLAGS="$CPPFLAGS -framework CoreFoundation"
-        AC_COMPILE_IFELSE(AC_LANG_SOURCE([[
+        AC_COMPILE_IFELSE([AC_LANG_SOURCE([
                    #include <CoreFoundation/CFString.h>
-                   CFStringRef x = CFSTR("Hello");]]), [have_cfstring_api=yes], [have_cfstring_api=no])
+                   CFStringRef x = CFSTR("Hello");])], [have_cfstring_api=yes], [have_cfstring_api=no])
         AC_MSG_RESULT($have_cfstring_api)
 else
         have_cfstring_api=no
@@ -471,6 +472,7 @@
 src/main/include/log4cxx/rolling/Makefile
 src/main/include/log4cxx/pattern/Makefile
 src/main/include/log4cxx/filter/Makefile
+src/m4/Makefile
 src/site/Makefile
 src/site/doxy/Makefile
 src/site/doxy/Doxyfile
diff --git a/doap_log4cxx.rdf b/doap_log4cxx.rdf
index 7dc9a3b..d984c53 100644
--- a/doap_log4cxx.rdf
+++ b/doap_log4cxx.rdf
@@ -1,10 +1,10 @@
 <?xml version="1.0"?>
 <?xml-stylesheet type="text/xsl"?>
-<rdf:RDF xml:lang="en"
-         xmlns="http://usefulinc.com/ns/doap#" 
-         xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" 
-         xmlns:asfext="http://projects.apache.org/ns/asfext#"
-         xmlns:foaf="http://xmlns.com/foaf/0.1/">
+<rdf:RDF	xml:lang="en"
+			xmlns="http://usefulinc.com/ns/doap#"
+			xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+			xmlns:asfext="http://projects.apache.org/ns/asfext#"
+			xmlns:foaf="http://xmlns.com/foaf/0.1/">
 <!--
  Licensed to the Apache Software Foundation (ASF) under one or more
  contributor license agreements.  See the NOTICE file distributed with
@@ -22,23 +22,25 @@
  limitations under the License.
 
 -->
-  <Project rdf:about="http://logging.apache.org/log4cxx">
-    <created>2007-02-09</created>
-    <license rdf:resource="http://usefulinc.com/doap/licenses/asl20" />
-    <name>Apache log4cxx</name>
-    <homepage rdf:resource="http://logging.apache.org/log4cxx" />
-    <asfext:pmc rdf:resource="http://logging.apache.org" />
-    <shortdesc>Apache log4cxx provides logging services for C++.</shortdesc>
-    <bug-database rdf:resource="http://issues.apache.org/jira/browse/LOGCXX" />
-    <mailing-list rdf:resource="http://logging.apache.org/log4cxx/mail-lists.html" />
-    <download-page rdf:resource="http://logging.apache.org/log4cxx/download.html" />
-    <programming-language>C</programming-language>
-    <category rdf:resource="http://projects.apache.org/category/library" />
-    <repository>
-      <SVNRepository>
-        <location rdf:resource="http://svn.apache.org/repos/asf/logging/log4cxx/trunk/"/>
-        <browse rdf:resource="http://svn.apache.org/viewvc/logging/log4cxx/trunk/"/>
-      </SVNRepository>
-    </repository>
-  </Project>
+	<Project rdf:about="http://logging.apache.org/log4cxx">
+		<name>Apache log4cxx</name>
+		<shortdesc>Apache log4cxx provides logging services for C++.</shortdesc>
+		<created>2007-02-09</created>
+
+		<programming-language>C</programming-language>
+		<license	rdf:resource="http://usefulinc.com/doap/licenses/asl20"		/>
+		<homepage	rdf:resource="http://logging.apache.org/log4cxx"			/>
+		<category	rdf:resource="http://projects.apache.org/category/library"	/>
+		<asfext:pmc	rdf:resource="http://logging.apache.org"					/>
+
+		<bug-database	rdf:resource="http://issues.apache.org/jira/browse/LOGCXX"			/>
+		<mailing-list	rdf:resource="http://logging.apache.org/log4cxx/mail-lists.html"	/>
+		<download-page	rdf:resource="http://logging.apache.org/log4cxx/download.html"		/>
+		<repository>
+			<Repository>
+				<location	rdf:resource="git:https://git-wip-us.apache.org/repos/asf/logging-log4cxx.git"			/>
+				<browse		rdf:resource="https://git-wip-us.apache.org/repos/asf?p=logging-log4cxx.git;a=summary"	/>
+			</Repository>
+		</repository>
+	</Project>
 </rdf:RDF>
diff --git a/liblog4cxx.pc.in b/liblog4cxx.pc.in
index 3800462..e29239e 100644
--- a/liblog4cxx.pc.in
+++ b/liblog4cxx.pc.in
@@ -22,4 +22,5 @@
 Version: @VERSION@
 Libs: -L${libdir} -llog4cxx
 Cflags: -I${includedir}
+Requires.private: apr-1 apr-util-1
 
diff --git a/pom.xml b/pom.xml
index a80875f..5697b54 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1,247 +1,397 @@
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-  <modelVersion>4.0.0</modelVersion>
-  <groupId>log4cxx</groupId>
-  <artifactId>apache-log4cxx</artifactId>
-  <packaging>pom</packaging>
-  <version>0.10.0</version>
-  <name>Apache log4cxx</name>
-  <description>Logging framework for C++.</description>
-  <url>http://logging.apache.org:80/log4cxx</url>
-  <issueManagement>
-    <system>JIRA</system>
-    <url>http://issues.apache.org/jira/</url>
-  </issueManagement>
-<mailingLists>
-   <mailingList>
-      <name>log4cxx-user : log4cxx usage</name>
-      <subscribe>log4cxx-user-subscribe@logging.apache.org</subscribe>
-      <unsubscribe>log4cxx-user-unsubscribe@logging.apache.org</unsubscribe>
-      <post>log4cxx-user@logging.apache.org</post>
-      <archive>http://mail-archives.apache.org/mod_mbox/logging-log4cxx-user/</archive>
-      <otherArchives>
-          <otherArchive>http://markmail.org/search/list:org.apache.logging.log4cxx-user</otherArchive>
-          <otherArchive>http://marc.info/?l=log4cxx-user</otherArchive>
-          <otherArchive>http://dir.gmane.org/gmane.comp.apache.logging.log4cxx.user</otherArchive>
-      </otherArchives>
-   </mailingList>
-   <mailingList>
-      <name>log4cxx-dev : log4cxx development</name>
-      <subscribe>log4cxx-dev-subscribe@logging.apache.org</subscribe>
-      <unsubscribe>log4cxx-dev-unsubscribe@logging.apache.org</unsubscribe>
-      <post>log4cxx-dev@logging.apache.org</post>
-      <archive>http://mail-archives.apache.org/mod_mbox/logging-log4cxx-dev/</archive>
-      <otherArchives>
-          <otherArchive>http://markmail.org/search/list:org.apache.logging.log4cxx-dev</otherArchive>
-          <otherArchive>http://marc.info/?l=log4cxx-dev</otherArchive>
-          <otherArchive>http://dir.gmane.org/gmane.comp.jakarta.log4j.devel</otherArchive>
-      </otherArchives>
-   </mailingList>
-</mailingLists>
-<licenses>
-        <license>
-                <name>Apache License, Version 2.0</name>
-                <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
-                <distribution>repo</distribution>
-        </license>
-</licenses>
-<scm>
-        <connection>scm:svn:http://svn.apache.org/repos/asf/logging/log4cxx/tags/v0_10_0-rc8</connection>
-        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/logging/log4cxx/tags/v0_10_0-rc8</developerConnection>
-        <url>http://svn.apache.org/viewcvs.cgi/logging/log4cxx/tags/v0_10_0-rc8</url>
-</scm>
-<organization>
-    <name>Apache Software Foundation</name>
-    <url>http://www.apache.org</url>
-</organization>
-<build>
-    <plugins>
-      <plugin>
-        <artifactId>maven-antrun-plugin</artifactId>
-        <executions>
-          <execution>
-            <phase>compile</phase>
-            <id>compile</id>
-            <configuration>
-                <tasks>
-                   <ant target="build" />
-                </tasks>
-            </configuration>
-            <goals>
-              <goal>run</goal>
-            </goals>
-          </execution>
-          <execution>
-            <phase>test-compile</phase>
-            <id>test-compile</id>
-            <configuration>
-                <tasks>
-                   <ant target="test-compile" />
-                </tasks>
-            </configuration>
-            <goals>
-              <goal>run</goal>
-            </goals>
-          </execution>
-          <execution>
-            <phase>test</phase>
-            <id>test</id>
-            <configuration>
-                <tasks>
-                    <ant target="check" />
-                </tasks>
-            </configuration>
-            <goals>
-              <goal>run</goal>
-            </goals>
-          </execution>
-          <execution>
-            <phase>package</phase>
-            <id>autogen</id>
-            <configuration>
-                <tasks>
-                   <ant target="autogen" />
-                </tasks>
-            </configuration>
-            <goals>
-              <goal>run</goal>
-            </goals>
-          </execution>
-                  <execution>
-            <phase>site</phase>
-            <id>site</id>
-            <configuration>
-                <tasks>
-                    <ant target="site" />
-                    <taskdef name="replaceregexp" classname="org.apache.tools.ant.taskdefs.optional.ReplaceRegExp" />                
-                   <replaceregexp file="target/site/source-repository.html" match="/tags/[^ &quot;'&lt;]*" replace="/trunk" flags="g" />
-                <replaceregexp match="Generated on .* for " replace="Generated for " flags="g">
-                    <fileset dir="target/site/apidocs" includes="**/*.html" />
-      </replaceregexp>
-                </tasks>
-            </configuration>
-            <goals>
-              <goal>run</goal>
-            </goals>
-          </execution>
-          <execution>
-            <phase>post-site</phase>
-            <id>post-site</id>
-            <configuration>
-                <tasks>
-                   <ant target="post-site" />
-                </tasks>
-            </configuration>
-            <goals>
-              <goal>run</goal>
-            </goals>
-          </execution>
-          <execution>
-            <phase>site-deploy</phase>
-            <id>site-deploy</id>
-            <configuration>
-                <tasks>
-                   <ant target="site-deploy" />
-                </tasks>
-            </configuration>
-            <goals>
-              <goal>run</goal>
-            </goals>
-          </execution>
-        </executions>
-       <dependencies>
-          <dependency>
-            <groupId>ant</groupId>
-            <artifactId>ant-nodeps</artifactId>
-            <version>1.6.5</version>
-          </dependency>
-          <dependency>
-            <groupId>ant-contrib</groupId>
-            <artifactId>ant-contrib</artifactId>
-            <version>1.0b2</version>
-          </dependency>
-          <dependency>
-            <groupId>ant-contrib</groupId>
-            <artifactId>cpptasks</artifactId>
-            <version>1.0b5</version>
-          </dependency>
-        </dependencies>
-      </plugin>  
-          <plugin>
-         <artifactId>maven-assembly-plugin</artifactId>
-         <configuration>
-           <descriptors>
-              <descriptor>src/assembly/source.xml</descriptor>
-           </descriptors>
-           <appendAssemblyId>false</appendAssemblyId>
-        </configuration>
-        <executions>
-            <execution>
-                <goals>
-                    <goal>assembly</goal>
-                </goals>
-            </execution>
-        </executions>
-         </plugin>
-      <plugin>
-        <groupId>org.codehaus.mojo</groupId>
-        <artifactId>rat-maven-plugin</artifactId>
-      </plugin>             
-    </plugins>
-</build>
-  <dependencies>
-      <dependency>
-        <groupId>log4j</groupId>
-        <artifactId>log4j</artifactId>
-        <version>1.2.14</version>
-        <scope>test</scope>
-      </dependency>      
-  </dependencies>
-  <reporting>
-    <excludeDefaults>true</excludeDefaults>  
-    <plugins>
-      <plugin>
-        <artifactId>maven-project-info-reports-plugin</artifactId>
-        <reportSets>
-          <reportSet>
-            <reports>
-              <report>scm</report>
-              <report>dependencies</report>
-              <report>issue-tracking</report>
-              <report>mailing-list</report>
-              <report>license</report>
-            </reports>
-          </reportSet>
-        </reportSets>
-      </plugin>
-      <plugin>
-          <artifactId>maven-release-plugin</artifactId>
-          <configuration>
-              <goals>site-deploy assembly:assembly</goals>
-          </configuration>
-      </plugin>
-      <plugin>
-        <artifactId>maven-changes-plugin</artifactId>
-        <reportSets>
-          <reportSet>
-            <reports>
-              <report>changes-report</report>
-            </reports>
-          </reportSet>
-        </reportSets>
-        <configuration>
-                <issueLinkTemplate>%URL%/browse/%ISSUE%</issueLinkTemplate>
-        </configuration>
-      </plugin>      
-    </plugins>
-  </reporting>
- <distributionManagement>
-    <repository>
-	<id>tmp.repo</id>
-	<url>file:///tmp</url>
-    </repository>
-    <site>
-      <id>logging.site</id>
-      <url>file:///${user.dir}/target/site-deploy</url>
-    </site>
-  </distributionManagement> 
+	<modelVersion>4.0.0</modelVersion>
+	<groupId>log4cxx</groupId>
+	<artifactId>apache-log4cxx</artifactId>
+	<packaging>pom</packaging>
+	<version>0.11.0-SNAPSHOT</version>
+	<name>Apache log4cxx</name>
+	<description>Logging framework for C++.</description>
+	<url>http://logging.apache.org/log4cxx</url>
+	<inceptionYear>2003</inceptionYear>
+
+	<issueManagement>
+		<system>JIRA</system>
+		<url>https://issues.apache.org/jira/browse/LOGCXX</url>
+	</issueManagement>
+
+	<mailingLists>
+		<mailingList>
+			<name>log4cxx usage</name>
+			<subscribe>log4cxx-user-subscribe@logging.apache.org</subscribe>
+			<unsubscribe>log4cxx-user-unsubscribe@logging.apache.org</unsubscribe>
+			<post>log4cxx-user@logging.apache.org</post>
+			<archive>http://mail-archives.apache.org/mod_mbox/logging-log4cxx-user/</archive>
+			<otherArchives>
+				<otherArchive>http://markmail.org/search/list:org.apache.logging.log4cxx-user</otherArchive>
+				<otherArchive>http://marc.info/?l=log4cxx-user</otherArchive>
+				<otherArchive>http://dir.gmane.org/gmane.comp.apache.logging.log4cxx.user</otherArchive>
+			</otherArchives>
+		</mailingList>
+		<mailingList>
+			<name>log4cxx development</name>
+			<subscribe>dev-subscribe@logging.apache.org</subscribe>
+			<unsubscribe>dev-unsubscribe@logging.apache.org</unsubscribe>
+			<post>dev@logging.apache.org</post>
+			<archive>http://mail-archives.apache.org/mod_mbox/logging-dev/</archive>
+			<otherArchives>
+				<otherArchive>http://markmail.org/search/list:org.apache.logging.dev</otherArchive>
+				<otherArchive>http://marc.info/?l=dev</otherArchive>
+				<otherArchive>http://dir.gmane.org/gmane.comp.apache.logging.devel</otherArchive>
+			</otherArchives>
+		</mailingList>
+		<mailingList>
+			<name>Old log4cxx development (NOT USED ANYMORE!)</name>
+			<subscribe>log4cxx-dev-subscribe@logging.apache.org</subscribe>
+			<unsubscribe>log4cxx-dev-unsubscribe@logging.apache.org</unsubscribe>
+			<post>log4cxx-dev@logging.apache.org</post>
+			<archive>http://mail-archives.apache.org/mod_mbox/logging-log4cxx-dev/</archive>
+			<otherArchives>
+				<otherArchive>http://markmail.org/search/list:org.apache.logging.log4cxx-dev</otherArchive>
+				<otherArchive>http://marc.info/?l=log4cxx-dev</otherArchive>
+				<otherArchive>http://dir.gmane.org/gmane.comp.apache.logging.log4cxx.devel</otherArchive>
+			</otherArchives>
+		</mailingList>
+	</mailingLists>
+
+	<licenses>
+		<license>
+			<name>Apache License, Version 2.0</name>
+			<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+			<distribution>repo</distribution>
+		</license>
+	</licenses>
+
+	<scm>
+		<connection>scm:git:http://git-wip-us.apache.org/repos/asf/logging-log4cxx.git</connection>
+		<developerConnection>scm:git:https://git-wip-us.apache.org/repos/asf/logging-log4cxx.git</developerConnection>
+		<url>https://git-wip-us.apache.org/repos/asf?p=logging-log4cxx.git</url>
+		<tag>v0.11.0-RC1</tag>
+	</scm>
+
+	<properties>
+		<!-- Note that any properties you want available in velocity templates must not use periods! -->
+		<releaseArtifactId>${project.artifactId}</releaseArtifactId>
+		<releaseVersion>${project.version}</releaseVersion>
+		<releaseManager>Thorsten Schöning</releaseManager>
+		<releaseKey>778C3033</releaseKey>
+	</properties>
+
+	<organization>
+		<name>Apache Software Foundation</name>
+		<url>http://www.apache.org</url>
+	</organization>
+
+	<!-- Developers listed by PMC, Committers, alphabetical by id-->
+	<developers>
+		<!--Begin PMC-->
+		<!--End PMC, Begin Committers-->
+		<developer>
+			<id>alexz</id>
+			<name>Alex Zbarcea</name>
+			<email>alexz@apache.org</email>
+			<timezone>America/New York</timezone>
+			<roles>
+				<role>Committer</role>
+			</roles>
+		</developer>
+		<developer>
+			<id>chand</id>
+			<name>Chand Priyankara</name>
+			<email>chand@apache.org</email>
+			<timezone>Sri Lanka/Kadawathe</timezone>
+			<roles>
+				<role>Committer</role>
+			</roles>
+		</developer>
+		<developer>
+			<id>fseydoux</id>
+			<name>Florian Seydoux</name>
+			<email>fseydoux@apache.org</email>
+			<timezone>Europe/Zurich</timezone>
+			<roles>
+				<role>Committer</role>
+			</roles>
+		</developer>
+		<developer>
+			<id>joseph</id>
+			<name>Joseph Southwell</name>
+			<email>joseph@apache.org</email>
+			<timezone>America/Chicago</timezone>
+			<roles>
+				<role>Committer</role>
+			</roles>
+		</developer>
+		<developer>
+			<id>rhys</id>
+			<name>Rhys Ulerich</name>
+			<email>rhys@apache.org</email>
+			<timezone>America/Chicago</timezone>
+			<roles>
+				<role>Committer</role>
+			</roles>
+		</developer>
+		<developer>
+			<id>tschoening</id>
+			<name>Thorsten Schöning</name>
+			<email>tschoening@apache.org</email>
+			<timezone>Europe/Berlin</timezone>
+			<roles>
+				<role>Committer</role>
+			</roles>
+		</developer>
+		<!--End Committers, Begin Emeritus-->
+		<developer>
+			<id>afester</id>
+			<name>Andreas Fester</name>
+			<roles>
+				<role>Emeritus</role>
+			</roles>
+		</developer>
+		<developer>
+			<id>carnold</id>
+			<name>Curtis Arnold</name>
+			<roles>
+				<role>Emeritus</role>
+			</roles>
+		</developer>
+		<developer>
+			<id>cdevienne</id>
+			<name>Christophe de Vienne</name>
+			<roles>
+				<role>Emeritus</role>
+			</roles>
+		</developer>
+		<developer>
+			<id>mcatan</id>
+			<name>Michael Catanzariti</name>
+			<roles>
+				<role>Emeritus</role>
+			</roles>
+		</developer>
+		<!--End Emeritus-->
+	</developers>
+
+	<contributors>
+		<contributor>
+			<name>Andrew Lazarus</name>
+		</contributor>
+	</contributors>
+
+	<build>
+		<plugins>
+			<plugin>
+				<artifactId>maven-antrun-plugin</artifactId>
+				<version>1.7</version>
+				<executions>
+					<execution>
+						<phase>compile</phase>
+						<id>compile</id>
+						<configuration>
+							<target>
+								<ant target="build" />
+							</target>
+						</configuration>
+						<goals>
+							<goal>run</goal>
+						</goals>
+					</execution>
+
+					<execution>
+						<phase>test-compile</phase>
+						<id>test-compile</id>
+						<configuration>
+							<target unless="${maven.test.skip}">
+								<ant target="test-compile" />
+							</target>
+						</configuration>
+						<goals>
+							<goal>run</goal>
+						</goals>
+					</execution>
+
+					<execution>
+						<phase>test</phase>
+						<id>test</id>
+						<configuration>
+							<target unless="${maven.test.skip}">
+								<ant target="check" />
+							</target>
+						</configuration>
+						<goals>
+							<goal>run</goal>
+						</goals>
+					</execution>
+
+					<execution>
+						<phase>package</phase>
+						<id>autogen</id>
+						<configuration>
+							<target>
+								<ant target="autogen" />
+							</target>
+						</configuration>
+						<goals>
+							<goal>run</goal>
+						</goals>
+					</execution>
+
+					<execution>
+						<phase>site</phase>
+						<id>site</id>
+						<configuration>
+							<target>
+								<ant target="site" />
+							</target>
+						</configuration>
+						<goals>
+							<goal>run</goal>
+						</goals>
+					</execution>
+
+					<execution>
+						<phase>post-site</phase>
+						<id>post-site</id>
+						<configuration>
+							<target>
+								<ant target="post-site" />
+							</target>
+						</configuration>
+						<goals>
+							<goal>run</goal>
+						</goals>
+					</execution>
+
+					<execution>
+						<phase>site-deploy</phase>
+						<id>site-deploy</id>
+						<configuration>
+							<target>
+								<ant target="site-deploy" />
+							</target>
+						</configuration>
+						<goals>
+							<goal>run</goal>
+						</goals>
+					</execution>
+				</executions>
+
+				<dependencies>
+					<dependency>
+						<groupId>org.apache.ant</groupId>
+						<artifactId>ant</artifactId>
+						<version>1.9.3</version>
+					</dependency>
+
+					<dependency>
+						<groupId>ant-contrib</groupId>
+						<artifactId>ant-contrib</artifactId>
+						<version>1.0b2</version>
+					</dependency>
+
+					<dependency>
+						<groupId>ant-contrib</groupId>
+						<artifactId>cpptasks</artifactId>
+						<version>1.0b5</version>
+					</dependency>
+				</dependencies>
+			</plugin>
+
+			<plugin>
+				<artifactId>maven-assembly-plugin</artifactId>
+				<version>2.3</version>
+				<configuration>
+					<descriptors>
+						<descriptor>src/assembly/source.xml</descriptor>
+					</descriptors>
+					<appendAssemblyId>false</appendAssemblyId>
+					<tarLongFileMode>gnu</tarLongFileMode>
+				</configuration>
+				<executions>
+					<execution>
+						<goals>
+							<goal>assembly</goal>
+						</goals>
+					</execution>
+				</executions>
+			</plugin>
+
+			<plugin>
+				<groupId>org.codehaus.mojo</groupId>
+				<artifactId>rat-maven-plugin</artifactId>
+				<version>1.0-alpha-3</version>
+			</plugin>
+
+			<plugin>
+				<artifactId>maven-site-plugin</artifactId>
+				<version>3.3</version>
+				<configuration>
+					<templateFile>${basedir}/src/site/site.vm</templateFile>
+				</configuration>
+			</plugin>
+
+			<plugin>
+				<artifactId>maven-release-plugin</artifactId>
+				<version>2.3</version>
+				<configuration>
+					<tagNameFormat>v@{project.version}-RCx</tagNameFormat>
+					<goals>site-deploy assembly:assembly</goals>
+				</configuration>
+			</plugin>
+		</plugins>
+	</build>
+
+	<dependencies>
+		<dependency>
+			<groupId>log4j</groupId>
+			<artifactId>log4j</artifactId>
+			<version>1.2.14</version>
+			<scope>test</scope>
+		</dependency>
+	</dependencies>
+
+	<reporting>
+		<excludeDefaults>true</excludeDefaults>
+		<plugins>
+			<plugin>
+				<artifactId>maven-project-info-reports-plugin</artifactId>
+				<version>2.7</version>
+				<reportSets>
+					<reportSet>
+						<reports>
+							<report>scm</report>
+							<report>dependencies</report>
+							<report>mailing-list</report>
+							<report>license</report>
+						</reports>
+					</reportSet>
+				</reportSets>
+			</plugin>
+
+			<plugin>
+				<artifactId>maven-changes-plugin</artifactId>
+				<version>2.9</version>
+				<reportSets>
+					<reportSet>
+						<reports>
+							<report>changes-report</report>
+						</reports>
+					</reportSet>
+				</reportSets>
+				<configuration>
+					<issueLinkTemplate>%URL%/browse/%ISSUE%</issueLinkTemplate>
+				</configuration>
+			</plugin>
+		</plugins>
+	</reporting>
+
+	<distributionManagement>
+		<repository>
+			<id>tmp.repo</id>
+			<url>file:///tmp</url>
+		</repository>
+		<site>
+			<id>logging.site</id>
+			<url>file:///${user.dir}/target/site-deploy/${project.version}</url>
+		</site>
+	</distributionManagement>
 </project>
diff --git a/release_perform.sh b/release_perform.sh
new file mode 100755
index 0000000..7a3df1b
--- /dev/null
+++ b/release_perform.sh
@@ -0,0 +1,97 @@
+#! /bin/bash -e
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+##
+# Perform a release.
+#
+# Performing a release involves Maven currently to build and test things and we ran into problems
+# with the default dir structure maven assumes. This script works around those and we need to sign
+# the release archives anyway, which can be easily automated as well to not need to follow manual
+# instructions always.
+#
+# It's important to note that this script is expected to be executed in the branch "next_stable",
+# most likely prepared by the preparing counterpart.
+#
+
+function main
+{
+  # log4cxx is able to build using private copies of apr and apr-util, which are expected in some
+  # special relative dir structure. That doesn't work with the default working dir "perform" uses,
+  # which is "target/checkout". So we either need to make apr and apr-util available in "target" or
+  # change the working dir. Making available seems easy using symlinks, but "mvn clean" deletes the
+  # contents(!) of the linked dirs then. And always copying things around seems a bit unnecessary as
+  # well, so I'm using a relocation of the folder for now. The downside is that "mvn clean" ignores
+  # that dir by default...
+  WD_RELEASE="$( pwd)/../log4cxx-next_stable"
+  WD_DIST_DEV="$(pwd)/../log4cxx-dist-dev"
+
+  perform_release
+  prepare_dist_dev
+  sign_and_copy
+  publish_for_vote
+}
+
+function perform_release
+{
+  rm -rf "${WD_RELEASE}"
+  mvn release:perform "-DworkingDirectory=${WD_RELEASE}"
+}
+
+# Prepare dist/dev to get the release candidate published for a vote.
+function prepare_dist_dev
+{
+  mkdir -p "${WD_DIST_DEV}"
+  pushd    "${WD_DIST_DEV}" > /dev/null
+  if [ ! -d ".svn" ]
+  then
+    svn co "https://dist.apache.org/repos/dist/dev/logging/log4cxx" .
+  fi
+  svn up
+}
+
+function sign_and_copy
+{
+  # Might be a good idea to have another look at the GPG plugin for Maven in the future:
+  #
+  # http://blog.sonatype.com/2010/01/how-to-generate-pgp-signatures-with-maven/
+  # http://maven.apache.org/plugins/maven-gpg-plugin/
+  pushd "${WD_RELEASE}/target" > /dev/null
+  for file in *.tar.gz *.zip
+  do
+    echo "Processing ${file}:"
+
+    gpg -ab --yes "${file}" > "${file}.asc"
+    md5sum        "${file}" > "${file}.md5"
+    sha512sum     "${file}" > "${file}.sha"
+
+    # No symlinks because those would be treated as is, no hardlinks because it should be safer for
+    # commits.
+    cp  --force   "${file}"     "${WD_DIST_DEV}"
+    cp  --force   "${file}.asc" "${WD_DIST_DEV}"
+    cp  --force   "${file}.md5" "${WD_DIST_DEV}"
+    cp  --force   "${file}.sha" "${WD_DIST_DEV}"
+  done
+}
+
+function publish_for_vote
+{
+  pushd "${WD_DIST_DEV}" > /dev/null
+  svn add --force *.*
+  svn ci  -m "Publishing artifacts for new release to vote on."
+}
+
+main
diff --git a/release_prepare.sh b/release_prepare.sh
new file mode 100755
index 0000000..faaeded
--- /dev/null
+++ b/release_prepare.sh
@@ -0,0 +1,242 @@
+#! /bin/bash
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+##
+# Prepare a release.
+#
+# We need to update dates and version numbers at various places during releases and things can go
+# wrong, so another RC might need to be released. Am not sure if/how those things are properly
+# handled using the Maven release plugin, because that moves versions of the current branch forward
+# and doesn't seem to provide a way to say that a new release is just another RC for some former
+# release. Additionally, after the current branch has been moved forward, it might have been used to
+# merge new changes already. So how to tell Maven to do another release with a former version?
+#
+# So the current approach of this script is to always create a new branch "next_stable" which acts
+# as the base for releases only. One needs to manually merge changes to the code into that branch
+# as needed for making a release work, but keep all other changes to "master" etc. outside. We try
+# to handle setting release dates, current number of release candidate etc. here automatically as
+# much as possible. Some of that info is even merged back into some source branch, e.g. "master",
+# because release dates in files like "src/changes/changes.xml" need to be updated with additional
+# candidates or later releases.
+#
+# This script can be invoked with "next_stable" being the current branch already or with some other
+# and "next_stable" is checked out automatically. If it's invoked with some other branch, release
+# dates, new development version etc. are merged to the branch the script was invoked with. Without
+# another branch those changes need to be done/merged manually to wherever they need to be in the
+# end, most likely "master". If only "master" should be supported in the future, merging back into
+# that might be hard coded, currently it isn't to support arbitrary source branches from which a
+# release gets initiated. If "next_stable" is the starting branch, it's assumed to only create
+# another release based on a former release, without merging things back to anywhere.
+#
+
+function main
+{
+  #exit_on_changes
+
+  branch_starting=$(      git branch | grep "\*" | cut -d " " -f 2)
+  branch_starting_is_ns=$(git branch | grep "\* next_stable")
+
+  co_next_stable
+  set_release_date_if
+  update_scm_tag_name_format
+
+  exec_mvn
+  exit_on_started_with_ns
+
+  exit_on_no_new_release_cycle
+  proc_new_release_cycle
+}
+
+function exit_on_changes
+{
+  if [[ -n $(git status --short) || -n $(git diff-index HEAD) ]]
+  then
+    echo Maven release process requires committed changes!
+    exit 1
+  fi
+}
+
+function co_next_stable
+{
+  if [ -z "${branch_starting_is_ns}" ]
+  then
+    # If we didn't start with "next_stable", don't merge the starting branch, because it contains
+    # changes regarding new development iteration etc. we don't want to have. People need to merge
+    # relevant changes manually.
+    git checkout "next_stable" || git checkout -b "next_stable"
+  fi
+}
+
+function git_commit_if
+{
+  if ! git diff-index --quiet HEAD
+  then
+    git commit -m "${1}"
+  fi
+}
+
+function set_release_date_if
+{
+  local today=$(date "+%Y-%m-%d")
+  sed -i -r "1,/date=\".+?\"/ s/date=\".+?\"/date=\"${today}\"/" "src/changes/changes.xml"
+  git add "src/changes/changes.xml"
+
+  if ! git diff-index --quiet HEAD
+  then
+    git commit -m "Set release date to today."
+    if [ -z "${branch_starting_is_ns}" ]
+    then
+      local commit_changes=$(git log --max-count=1 | grep "commit" | cut -d " " -f 2)
+      git checkout "${branch_starting}"
+      git merge    "${commit_changes}"
+      git checkout "next_stable"
+    fi
+  fi
+}
+
+function update_scm_tag_name_format
+{
+  local scm_tag_name_format=$(grep "<tagNameFormat>" "pom.xml")
+  local scm_tag_name_format_needs_one=$(echo "${scm_tag_name_format}" | grep -E -e "-RCx")
+  local scm_tag_name_format_needs_inc=$(echo "${scm_tag_name_format}" | grep -E -e "-RC[0-9]+" | sed -r "s/.+?-RC([0-9]+).+?/\1/")
+
+  if [ -n "${scm_tag_name_format_needs_one}" ]
+  then
+    sed -i -r "s/(<tagNameFormat>.+?-RC)x/\11/" "pom.xml"
+  fi
+  if [ -n "${scm_tag_name_format_needs_inc}" ]
+  then
+    local inced_nr=$((${scm_tag_name_format_needs_inc} + 1))
+    sed -i -r "s/(<tagNameFormat>.+?-RC)[0-9]+/\1${inced_nr}/" "pom.xml"
+  fi
+
+  git add "pom.xml"
+  git commit -m "scm.tagNameFormat reconfigured to new RC number."
+}
+
+function get_pom_curr_ver
+{
+  # \t doesn't seem to work for grep for some reason.
+  echo "$(grep -E -e "^\s<version>" "pom.xml" | sed -r "s/^\t<.+>(.+)<.+>/\1/")"
+}
+
+function get_mvn_prepare_new_dev_ver
+{
+  if [ -n "${branch_starting_is_ns}" ]
+  then
+    echo "$(get_pom_curr_ver)"
+    return 0
+  fi
+
+  # Maven is able to calculate a useful new version itself, even if it warns about not being able to
+  # parse an empty version.
+  echo ""
+}
+
+##
+# Revert new version in "pom.xml" assigned by Maven.
+#
+# During release preparation Maven always assigns some new development version to the "pom.xml",
+# which is either a new calculated one or one we specified on our own already to be the same like
+# before. The first case is needed to get a new version into "release.properties", from where it
+# might be merged into a starting branch. In any case, within "next_stable" we want to keep the
+# one known version and therefore need to always revert any changes made by maven. So if a specific
+# new version is provided, always keep that, while without use the formerly available version of the
+# file. The caller most likely already has both values and additionally we are called AFTER Maven
+# already changed "pom.xml", so can't get the old value on our own easily anway.
+#
+# @param[in] Original version from "pom.xml".
+# @param[in] Specific version to be used by Maven.
+#
+function revert_mvn_prepare_new_dev_ver
+{
+  local pom_orig_ver="${1}"
+  local new_dev_ver="${2}"
+  local pom_new_ver="${new_dev_ver:-${pom_orig_ver}}"
+
+  sed -i -r "s/^(\t<version>).+(<)/\1${pom_new_ver}\2/" "pom.xml"
+  git add "pom.xml"
+  git_commit_if "Revert to ${pom_new_ver}."
+}
+
+function exec_mvn
+{
+  local pom_orig_ver="$(get_pom_curr_ver)"
+  local new_dev_ver="$( get_mvn_prepare_new_dev_ver)"
+  local prepare_args="-Dresume=false"
+
+  # Avoid a warning about not being able to parse an empty version:
+  if [ -n "${new_dev_ver}" ]
+  then
+    prepare_args="${prepare_args} -DdevelopmentVersion=${new_dev_ver}"
+  fi
+
+  mvn clean                           || exit 1
+  mvn release:prepare ${prepare_args} || exit 1
+  revert_mvn_prepare_new_dev_ver "${pom_orig_ver}" "${new_dev_ver}"
+}
+
+function exit_on_started_with_ns
+{
+  if [ -n "${branch_starting_is_ns}" ]
+  then
+    exit 0
+  fi
+}
+
+function exit_on_no_new_release_cycle
+{
+  git checkout "${branch_starting}"
+  local new_release_cycle=$(grep 'date="XXXX-XX-XX"' "src/changes/changes.xml")
+
+  if [ -n "${new_release_cycle}" ]
+  then
+    git checkout "next_stable"
+    exit 0
+  fi
+}
+
+function proc_new_release_cycle
+{
+  git checkout "${branch_starting}"
+
+  local commit_mvn_next_dev_iter=${1}
+  local new_dev_ver=$(      grep -E "^project.dev.log4cxx" "release.properties" | cut -d "=" -f 2)
+  local new_dev_ver_short=$(grep -E "^project.dev.log4cxx" "release.properties" | cut -d "=" -f 2 | cut -d "-" -f 1)
+  local new_release=$(cat <<-"END"
+	<body>\n\
+		<release	version="VER_NEEDED"\n\
+					date="XXXX-XX-XX"\n\
+					description="Maintenance release.">\n\
+		<\/release>\n
+END
+)
+  local new_release="${new_release/VER_NEEDED/${new_dev_ver_short}}"
+
+  sed -i -r "s/AC_INIT\(\[log4cxx\], \[.+?\]\)/AC_INIT([log4cxx], [${new_dev_ver_short}])/" "configure.ac"
+  sed -i -r "s/^(\t<version>).+(<)/\1${new_dev_ver}\2/"                                     "pom.xml"
+  sed -i -r "s/<body>/${new_release}/"                                                      "src/changes/changes.xml"
+
+  git add "configure.ac"
+  git add "pom.xml"
+  git add "src/changes/changes.xml"
+
+  git_commit_if "Prepare for next development iteration: ${new_dev_ver_short}"
+  git checkout  "next_stable"
+}
+
+main
diff --git a/release_purge.sh b/release_purge.sh
new file mode 100755
index 0000000..1abfcc8
--- /dev/null
+++ b/release_purge.sh
@@ -0,0 +1,79 @@
+#! /bin/bash
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+##
+# Purge (some) releases during development of release scripts.
+#
+# This script is mainly used during development of the release scripts itself and simply deletes
+# branches and tags created during tests of the release process. Be very careful with execution!
+#
+
+function main
+{
+  purge_branch_and_tag
+  revert_pom
+  revert_changes
+  commit_reverts
+}
+
+function purge_branch_and_tag
+{
+  git checkout  "release_scripts"
+
+  git branch -D "next_stable"
+  git push --delete "origin" "next_stable"
+
+  for tag in $(git tag -l | grep "v0.11.0-RC")
+  do
+    git tag  --delete          "${tag}"
+    git push --delete "origin" "${tag}"
+  done
+}
+
+function revert_pom
+{
+  sed -i -r "s/^(\t<version>).+(<)/\10.11.0-SNAPSHOT\2/" "pom.xml"
+}
+
+function revert_changes
+{
+  if [ -n "$(grep "version=\"0.11.1\"" "src/changes/changes.xml")" ]
+  then
+    # Remove not needed "release" node.
+    sed -i -r "1,/.+<release.+/ s/.+<release.+//"         "src/changes/changes.xml"
+    sed -i -r "1,/.+date=.+/ s/.+date=.+//"               "src/changes/changes.xml"
+    sed -i -r "1,/.+description=.+/ s/.+description=.+//" "src/changes/changes.xml"
+    sed -i -r "1,/.+<\/release.+/ s/.+<\/release.+//"     "src/changes/changes.xml"
+
+    # Don't know how to remove the left newlines easier...
+    local changes=$(cat "src/changes/changes.xml")
+    echo "${changes/$'\n\n\n\n\n'/}" > "src/changes/changes.xml"
+  fi
+
+  # Last release date needs to be "unknown":
+  sed -i -r "1,/.+date=.+/ s/date=\".+\"/date=\"XXXX-XX-XX\"/" "src/changes/changes.xml"
+}
+
+function commit_reverts
+{
+  git add "pom.xml"
+  git add "src/changes/changes.xml"
+
+  git commit -m "No 0.11.1 yet."
+}
+
+main
diff --git a/src/Makefile.am b/src/Makefile.am
index 4a68a45..4c94395 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -13,4 +13,5 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #
-SUBDIRS = main examples site test
+SUBDIRS      = main examples site test
+DIST_SUBDIRS = ${SUBDIRS} m4
diff --git a/src/ant/apr-build.xml b/src/ant/apr-build.xml
old mode 100755
new mode 100644
index 6614a0e..9812ae0
--- a/src/ant/apr-build.xml
+++ b/src/ant/apr-build.xml
@@ -7,7 +7,7 @@
  (the "License"); you may not use this file except in compliance with
  the License.  You may obtain a copy of the License at
 
-      http://www.apache.org/licenses/LICENSE-2.0
+	  http://www.apache.org/licenses/LICENSE-2.0
 
  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
@@ -26,7 +26,7 @@
  (the "License"); you may not use this file except in compliance with
  the License.  You may obtain a copy of the License at
 
-      http://www.apache.org/licenses/LICENSE-2.0
+	  http://www.apache.org/licenses/LICENSE-2.0
 
  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
@@ -36,463 +36,816 @@
 '>
 ]>
 <!--
-
-This file builds APR using Apache Ant (http://ant.apache.org)
-and the C++ compilation tasks from http://ant-contrib.sourceforge.net.
-
-
+	This file builds APR using Apache Ant (http://ant.apache.org)
+	and the C++ compilation tasks from http://ant-contrib.sourceforge.net.
 -->
 <project name="apr" default="check">
 
 &common;
 
-<property name="src.dir" location="${basedir}"/>
-<property name="include.dir" location="${src.dir}/include"/>
-<property name="test.dir" location="${src.dir}/test"/>
-<property name="target.dir" location="${basedir}/target"/>
-<property name="lib.name" value="apr-1"/>
-<property name="lib.prefix" value=""/>
+<property	name="src.dir"
+			location="${basedir}"
+/>
+<property	name="include.dir"
+			location="${src.dir}/include"
+/>
+<property	name="test.dir"
+			location="${src.dir}/test"
+/>
+<property	name="target.dir"
+			location="${basedir}/target"
+/>
+<property	name="lib.name"
+			value="apr-1"
+/>
+<property	name="lib.prefix"
+			value=""
+/>
+<property	environment="env"
+/>
 
-<target name="usage" description="Displays usage notes on build">
-        <echo>
-        </echo>
+<target	name="usage"
+		description="Displays usage notes on build">
+	<echo></echo>
 </target>
 
-<target name="clean" description="Removes build product files">
-        <delete dir="${target.dir}"/>
+<target	name="clean"
+		description="Removes build product files">
+	<delete dir="${target.dir}" />
 </target>
 
-<target name="win-configure" if="is-windows">
-    <copy file="${include.dir}/apr.hw" tofile="${include.dir}/apr.tmp" overwrite="true"/>
-    <replaceregexp file="${include.dir}/apr.tmp"
-         match="typedef *int *uid_t;" replace="/* typedef int uid_t */"/>  
-    <replaceregexp file="${include.dir}/apr.tmp"
-         match="typedef *int *gid_t;" replace="/* typedef int gid_t */"/>  
-    <antcall target="copy-if-changed">
-        <param name="file" value="${include.dir}/apr.tmp"/>
-        <param name="tofile" value="${include.dir}/apr.h"/>
-    </antcall>
+<target	name="win-configure"
+		if="is-windows">
+	<copy	file="${include.dir}/apr.hw"
+			tofile="${include.dir}/apr.tmp"
+			overwrite="true"
+	/>
+	<replaceregexp	file="${include.dir}/apr.tmp"
+					match="typedef *int *uid_t;"
+					replace="/* typedef int uid_t */"
+	/>
+	<replaceregexp	file="${include.dir}/apr.tmp"
+					match="typedef *int *gid_t;"
+					replace="/* typedef int gid_t */"
+	/>
+	<antcall target="copy-if-changed">
+		<param	name="file"
+				value="${include.dir}/apr.tmp"
+		/>
+		<param	name="tofile"
+				value="${include.dir}/apr.h"
+		/>
+	</antcall>
 </target>
 
-
-<target name="check-configure" if="is-unix">
-    <condition property="force-configure" value="1">
-        <not><available file="${include.dir}/apr.h"/></not>
-    </condition>
+<target	name="check-configure"
+		if="is-unix">
+	<condition	property="force-configure"
+				value="1">
+		<not>
+			<available file="${include.dir}/apr.h" />
+		</not>
+	</condition>
 </target>
 
-<target name="unix-configure" depends="check-configure" if="force-configure">
-         <!--  shelling to configure allows cygwin to work  -->
-        <exec executable="sh" dir="${src.dir}">
-            <arg value="./configure"/>
-        </exec>
+<target	name="unix-configure"
+		depends="check-configure"
+		if="force-configure">
+	<!-- Shelling to configure allows cygwin to work -->
+	<exec executable="sh" dir="${src.dir}">
+		<arg value="./configure" />
+	</exec>
 </target>
 
-
-<target name="init" depends="common-init">
-    <condition property="arch" value="win32">
-        <isset property="is-windows"/>
-    </condition>
-    <property name="arch" value="unix"/>
+<target	name="init"
+		depends="common-init">
+	<condition	property="arch"
+				value="win32">
+		<isset property="is-windows" />
+	</condition>
+	<property	name="arch"
+				value="unix"
+	/>
 </target>
 
-<target name="configure" depends="init, unix-configure, win-configure"/>
+<target	name="configure"
+		depends="init, unix-configure, win-configure"
+/>
 
+<target	name="build"
+		depends="configure"
+		description="Build library">
+	<mkdir dir="${executable.dir}/apr-ofiles" />
+	<property	name="project.compiler"
+				value="${compiler}"
+	/>
+	<property	name="project.type"
+				value="msvc6"
+	/>
 
+	<cc	name="${project.compiler}"
+		outfile="${executable.dir}/${lib.prefix}${lib.name}${lib.suffix}"
+		subsystem="console"
+		multithreaded="true"
+		runtime="${runtime}"
+		outtype="${lib.type}"
+		objdir="${executable.dir}/apr-ofiles"
+		outputfileproperty="apr-1.dll"
+		debug="${debug}"
+		projectsOnly="${projectsOnly}">
+		<!-- Suppressing misc/win32/rand.c since it needs to include rpc.h -->
+		<fileset	dir="${src.dir}"
+					includes="**/${arch}/*.c"
+					excludes="**/apr_app.c misc/win32/rand.c"
+		/>
+		<fileset	dir="${src.dir}"
+					includes="**/${arch}/apr_app.c"
+					if="is-static"
+		/>
+		<fileset	dir="${src.dir}/file_io/unix"
+					includes="copy.c fileacc.c filepath_util.c fullrw.c mktemp.c tempdir.c"
+		/>
+		<fileset	dir="${src.dir}/memory/unix"
+					includes="*.c"
+		/>
+		<fileset	dir="${src.dir}/misc/unix"
+					includes="errorcodes.c getopt.c otherchild.c version.c"
+		/>
+		<fileset	dir="${src.dir}/mmap/unix"
+					includes="common.c"
+		/>
+		<fileset	dir="${src.dir}/network_io/unix"
+					includes="inet_ntop.c inet_pton.c sockaddr.c"
+		/>
+		<fileset	dir="${src.dir}/poll/unix"
+					includes="*.c"
+		/>
+		<fileset	dir="${src.dir}/random/unix"
+					includes="*.c"
+		/>
+		<fileset	dir="${src.dir}/strings"
+					includes="*.c"
+		/>
+		<fileset	dir="${src.dir}/tables"
+					includes="*.c"
+		/>
+		<fileset	dir="${include.dir}"
+					includes="*.h"
+		/>
+		<fileset	dir="${include.dir}/arch"
+					includes="*.h"
+		/>
+		<fileset	dir="${include.dir}/arch/${arch}"
+					includes="*.h"
+		/>
+		<fileset	dir="${include.dir}/arch/unix"
+					includes="*.h"
+		/>
+		<fileset	dir="${src.dir}/support/unix"
+					includes="waitio.c"
+		/>
 
-<target name="build" depends="configure" description="Build library">
-    <mkdir dir="${executable.dir}/apr-ofiles"/>
-    <property name="project.compiler" value="${compiler}"/>
-	<property name="project.type" value="msvc6"/>
-    
-    <cc name="${project.compiler}"
-        outfile="${executable.dir}/${lib.prefix}${lib.name}${lib.suffix}"
-        subsystem="console"
-        multithreaded="true"
-        runtime="${runtime}"
-        outtype="${lib.type}"
-        objdir="${executable.dir}/apr-ofiles"
-        outputfileproperty="apr-1.dll"
-        debug="${debug}"
-        projectsOnly="${projectsOnly}">
-        <!--  suppressing misc/win32/rand.c since it needs to include rpc.h  -->
-        <fileset dir="${src.dir}" includes="**/${arch}/*.c" excludes="**/apr_app.c misc/win32/rand.c"/>
-        <fileset dir="${src.dir}" includes="**/${arch}/apr_app.c" if="is-static"/>
-        <fileset dir="${src.dir}/file_io/unix"
-            includes="copy.c fileacc.c filepath_util.c fullrw.c mktemp.c tempdir.c"/>
-        <fileset dir="${src.dir}/memory/unix" includes="*.c"/>
-        <fileset dir="${src.dir}/misc/unix"
-            includes="errorcodes.c getopt.c otherchild.c version.c"/>
-        <fileset dir="${src.dir}/mmap/unix" includes="common.c"/>
-        <fileset dir="${src.dir}/network_io/unix"
-            includes="inet_ntop.c inet_pton.c sockaddr.c"/>
-        <fileset dir="${src.dir}/poll/unix" includes="select.c"/>
-        <fileset dir="${src.dir}/random/unix" includes="*.c"/>
-        <fileset dir="${src.dir}/strings" includes="*.c"/>
-        <fileset dir="${src.dir}/tables" includes="*.c"/>
-        <fileset dir="${include.dir}" includes="*.h"/>
-        <fileset dir="${include.dir}/arch" includes="*.h"/>
-        <fileset dir="${include.dir}/arch/${arch}" includes="*.h"/>
-        <fileset dir="${include.dir}/arch/unix" includes="*.h"/>
-        <fileset dir="${src.dir}/support/unix" includes="waitio.c"/>
-        <includepath path="${include.dir}"/>
-        <includepath path="${include.dir}/arch"/>
-        <includepath path="${include.dir}/arch/${arch}"/>
-        <includepath path="${include.dir}/arch/unix"/>
-        <defineset define="APR_DECLARE_EXPORT" if="is-shared"/>
-        <defineset define="APR_DECLARE_STATIC" unless="is-shared"/>
-        <defineset if="is-windows">
-            <define name="WIN32" value="1"/>
-        </defineset>
-        <defineset define="_HAVE_CONFIG_H _REENTRANT _GNU_SOURCE" if="is-gcc"/>
-        <defineset define="HAVE_CONFIG_H DARWIN SIGPROCMASK_SETS_THREAD_MASK" if="is-mac"/>
-        <compilerarg value="${pic-option}" if="pic-option"/>
-        <libset libs="advapi32 ws2_32 mswsock rpcrt4" if="is-windows"/>
-        <libset libs="pthread dl" if="is-unix"/>
-        <libset libs="cw32mt" if="is-bcc"/>
-        <project type="${project.type}" outfile="${projects.dir}/apr" if="project.if">
+		<includepath path="${include.dir}"				/>
+		<includepath path="${include.dir}/arch"			/>
+		<includepath path="${include.dir}/arch/${arch}"	/>
+		<includepath path="${include.dir}/arch/unix"	/>
+
+		<defineset	define="APR_DECLARE_EXPORT"
+					if="is-shared"
+		/>
+		<defineset	define="APR_DECLARE_STATIC"
+					unless="is-shared"
+		/>
+		<defineset if="is-windows">
+			<define name="WIN32" value="1" />
+		</defineset>
+		<defineset	define="_HAVE_CONFIG_H _REENTRANT _GNU_SOURCE"
+					if="is-gcc"
+		/>
+		<defineset	define="HAVE_CONFIG_H DARWIN SIGPROCMASK_SETS_THREAD_MASK"
+					if="is-mac"
+		/>
+		<defineset if="is-bcc">
+			<define	name="_dup2"
+					value="dup2"
+			/>
+			<define	name="_isatty"
+					value="isatty"
+			/>
+			<define	name="_setmode"
+					value="setmode"
+			/>
+		</defineset>
+		<!--
+			apr_atomic.c is not linkable in VS2013 x86 and the only somewhat easy workaround was
+			to claim we are not VS2013, which only works because what we use to claim this is not
+			used elsewhere and doesn't seem to introduce any other problems for now.
+
+			https://groups.google.com/forum/#!topic/aprdev/bc1ILvUe-fk
+			https://groups.google.com/forum/#!topic/unimrcp/Iybpn51UYnI
+		 -->
+		<defineset	define="__MINGW32__"
+					if="env.VS120COMNTOOLS"
+		/>
+
+		<compilerarg	value="${pic-option}"
+						if="pic-option"
+		/>
+
+		<libset	libs="advapi32 mswsock rpcrt4 ws2_32"
+				if="is-windows"
+		/>
+		<libset	libs="pthread dl"
+				if="is-unix"
+		/>
+		<libset	libs="cw32mt"
+				if="is-bcc"
+		/>
+
+		<project	type="${project.type}"
+					outfile="${projects.dir}/projects/apr"
+					if="project.if">
 			<comment>&license;</comment>
 		</project>
+	</cc>
 
-    </cc>
-    <property name="apr.lib.dir" location="${executable.dir}"/>
+	<property	name="apr.lib.dir"
+				location="${executable.dir}"
+	/>
 </target>
 
-<target name="build-test">
-    <mkdir dir="${executable.dir}/apr-test-ofiles"/>
-    <property name="project.compiler" value="${compiler}"/>
-	<property name="project.type" value="msvc6"/>
-    <cc name="${project.compiler}"
-        outfile="${executable.dir}/${test}"
-        subsystem="console"
-        multithreaded="true"
-        runtime="${runtime}"
-        outtype="executable"
-        objdir="${executable.dir}/apr-test-ofiles"
-        debug="${debug}"
-        projectsOnly="${projectsOnly}">
-        <fileset dir="${test.dir}" includes="${testfiles}"/>
-        <includepath path="${include.dir}"/>
-        <defineset if="is-windows">
-            <define name="WIN32" value="1"/>
-        </defineset>
-        <defineset define="_HAVE_CONFIG_H _REENTRANT _GNU_SOURCE" if="is-gcc"/>
-        <defineset define="APR_DECLARE_STATIC" unless="is-shared"/>
-        <defineset define="HAVE_CONFIG_H DARWIN SIGPROCMASK_SETS_THREAD_MASK" if="is-mac"/>
-        <compilerarg value="${pic-option}" if="pic-option"/>
-        <libset dir="${apr.lib.dir}" libs="${lib.prefix}${lib.name}${lib.suffix}"/>
-        <libset libs="cw32mt" if="is-bcc"/>
-        <libset libs="pthread dl" if="is-unix"/>
-        <libset libs="advapi32 ws2_32 mswsock rpcrt4" if="is-windows"/>
-        <project type="${project.type}" outfile="${projects.dir}/${test}" if="project.if">
+<target	name="build-test">
+	<mkdir dir="${executable.dir}/apr-test-ofiles" />
+	<property	name="project.compiler"
+				value="${compiler}"
+	/>
+	<property	name="project.type"
+				value="msvc6"
+	/>
+
+	<cc	name="${project.compiler}"
+		outfile="${executable.dir}/${test}"
+		subsystem="console"
+		multithreaded="true"
+		runtime="${runtime}"
+		outtype="executable"
+		objdir="${executable.dir}/apr-test-ofiles"
+		debug="${debug}"
+		projectsOnly="${projectsOnly}">
+		<fileset	dir="${test.dir}"
+					includes="${testfiles}"
+		/>
+
+		<includepath path="${include.dir}" />
+
+		<defineset if="is-windows">
+			<define name="WIN32" value="1" />
+		</defineset>
+		<defineset	define="_HAVE_CONFIG_H _REENTRANT _GNU_SOURCE"
+					if="is-gcc"
+		/>
+		<defineset	define="APR_DECLARE_STATIC"
+					unless="is-shared"
+		/>
+		<defineset	define="HAVE_CONFIG_H DARWIN SIGPROCMASK_SETS_THREAD_MASK"
+					if="is-mac"
+		/>
+		<compilerarg value="${pic-option}" if="pic-option"
+		/>
+
+		<libset	dir="${apr.lib.dir}"
+				libs="${lib.prefix}${lib.name}${lib.suffix}"
+		/>
+		<libset	libs="cw32mt"
+				if="is-bcc"
+		/>
+		<libset	libs="pthread dl"
+				if="is-unix"
+		/>
+		<libset	libs="advapi32 ws2_32 mswsock rpcrt4"
+				if="is-windows"
+		/>
+
+		<project	type="${project.type}"
+					outfile="${projects.dir}/projects/${test}"
+					if="project.if">
 			<comment>&license;</comment>
-			<dependency file="${projects.dir}/apr"/>
+			<dependency file="${projects.dir}/apr" />
 		</project>
-    </cc>
+	</cc>
 </target>
 
-<target name="run-test">
-    <exec executable="${apr.lib.dir}/${test}"
-          dir="${apr.lib.dir}"
-          failonerror="true">
-        <env key="DYLD_LIBRARY_PATH"
-           value="${apr.lib.dir}:${env.DYLD_LIBRARY_PATH}"/>
-        <env key="LD_LIBRARY_PATH"
-           value="${apr.lib.dir}:${env.LD_LIBRARY_PATH}"/>
-    </exec>
+<target	name="run-test">
+	<exec	executable="${apr.lib.dir}/${test}"
+			dir="${apr.lib.dir}"
+			failonerror="true">
+		<env	key="DYLD_LIBRARY_PATH"
+				value="${apr.lib.dir}:${env.DYLD_LIBRARY_PATH}"
+		/>
+		<env	key="LD_LIBRARY_PATH"
+				value="${apr.lib.dir}:${env.LD_LIBRARY_PATH}"
+		/>
+	</exec>
+</target>
+
+<target	name="build-testlockperf"
+		depends="build">
+	<antcall target="build-test">
+		<param	name="test"
+				value="testlockperf"
+		/>
+		<param	name="testfiles"
+				value="testlockperf.c"
+		/>
+	</antcall>
+</target>
+
+<target	name="run-testlockperf"
+		depends="build-testlockperf">
+	<antcall target="run-test">
+		<param	name="test"
+				value="testlockperf"
+		/>
+	</antcall>
+</target>
+
+<target	name="build-testshmproducer"
+		depends="build">
+	<antcall target="build-test">
+		<param	name="test"
+				value="testshmproducer"
+		/>
+		<param	name="testfiles"
+				value="testshmproducer.c"
+		/>
+	</antcall>
+</target>
+
+<target	name="build-testshmconsumer"
+		depends="build">
+	<antcall target="build-test">
+		<param	name="test"
+				value="testshmconsumer"
+		/>
+		<param	name="testfiles"
+				value="testshmconsumer.c"
+		/>
+	</antcall>
 </target>
 
 
-<target name="build-testlockperf" depends="build">
-    <antcall target="build-test">
-        <param name="test" value="testlockperf"/>
-        <param name="testfiles" value="testlockperf.c"/>
-    </antcall>
+<target	name="build-testmutexscope"
+		depends="build">
+	<antcall target="build-test">
+		<param	name="test"
+				value="testmutexscope"
+		/>
+		<param	name="testfiles"
+				value="testmutexscope.c"
+		/>
+	</antcall>
 </target>
 
-<target name="run-testlockperf" depends="build-testlockperf">
-    <antcall target="run-test">
-        <param name="test" value="testlockperf"/>
-    </antcall>
+<target	name="run-testmutexscope"
+		depends="build-testmutexscope">
+	<antcall target="run-test">
+		<param	name="test"
+				value="testmutexscope"
+		/>
+	</antcall>
 </target>
 
-<target name="build-testshmproducer" depends="build">
-    <antcall target="build-test">
-        <param name="test" value="testshmproducer"/>
-        <param name="testfiles" value="testshmproducer.c"/>
-    </antcall>
+<target	name="build-occhild"
+		depends="build">
+	<antcall target="build-test">
+		<param	name="test"
+				value="occhild"
+		/>
+		<param	name="testfiles"
+				value="occhild.c"
+		/>
+	</antcall>
 </target>
 
-<target name="build-testshmconsumer" depends="build">
-    <antcall target="build-test">
-        <param name="test" value="testshmconsumer"/>
-        <param name="testfiles" value="testshmconsumer.c"/>
-    </antcall>
+<target	name="build-sockchild"
+		depends="build">
+	<antcall target="build-test">
+		<param	name="test"
+				value="sockchild"
+		/>
+		<param	name="testfiles"
+				value="sockchild.c"
+		/>
+	</antcall>
 </target>
 
-
-<target name="build-testmutexscope" depends="build">
-    <antcall target="build-test">
-        <param name="test" value="testmutexscope"/>
-        <param name="testfiles" value="testmutexscope.c"/>
-    </antcall>
+<target	name="build-readchild"
+		depends="build">
+	<antcall target="build-test">
+		<param	name="test"
+				value="readchild"
+		/>
+		<param	name="testfiles"
+				value="readchild.c"
+		/>
+	</antcall>
 </target>
 
-<target name="run-testmutexscope" depends="build-testmutexscope">
-    <antcall target="run-test">
-        <param name="test" value="testmutexscope"/>
-    </antcall>
+<target	name="build-globalmutexchild"
+		depends="build">
+	<antcall target="build-test">
+		<param	name="test"
+				value="globalmutexchild"
+		/>
+		<param	name="testfiles"
+				value="globalmutexchild.c"
+		/>
+	</antcall>
 </target>
 
-<target name="build-occhild" depends="build">
-    <antcall target="build-test">
-        <param name="test" value="occhild"/>
-        <param name="testfiles" value="occhild.c"/>
-    </antcall>
+<target	name="build-tryread"
+		depends="build">
+	<antcall target="build-test">
+		<param	name="test"
+				value="tryread"
+		/>
+		<param	name="testfiles"
+				value="tryread.c"
+		/>
+	</antcall>
 </target>
 
-<target name="build-sockchild" depends="build">
-    <antcall target="build-test">
-        <param name="test" value="sockchild"/>
-        <param name="testfiles" value="sockchild.c"/>
-    </antcall>
+<target	name="build-proc_child"
+		depends="build">
+	<antcall target="build-test">
+		<param	name="test"
+				value="proc_child"
+		/>
+		<param	name="testfiles"
+				value="proc_child.c"
+		/>
+	</antcall>
 </target>
 
-
-<target name="build-readchild" depends="build">
-    <antcall target="build-test">
-        <param name="test" value="readchild"/>
-        <param name="testfiles" value="readchild.c"/>
-    </antcall>
+<target	name="build-sendfile"
+		depends="build">
+	<antcall target="build-test">
+		<param	name="test"
+				value="sendfile"
+		/>
+		<param	name="testfiles"
+				value="sendfile.c"
+		/>
+	</antcall>
 </target>
 
+<target	name="build-mod_test"
+		depends="build">
+	<mkdir dir="${executable.dir}/test-ofiles"	/>
+	<mkdir dir="${executable.dir}/.libs"		/>
 
-<target name="build-globalmutexchild" depends="build">
-    <antcall target="build-test">
-        <param name="test" value="globalmutexchild"/>
-        <param name="testfiles" value="globalmutexchild.c"/>
-    </antcall>
-</target>
+	<property	name="project.compiler"
+				value="${compiler}"
+	/>
+	<property	name="project.type"
+				value="msvc6"
+	/>
 
-<target name="build-tryread" depends="build">
-    <antcall target="build-test">
-        <param name="test" value="tryread"/>
-        <param name="testfiles" value="tryread.c"/>
-    </antcall>
-</target>
+	<cc	name="${project.compiler}"
+		outfile="${executable.dir}/.libs/mod_test"
+		subsystem="console"
+		multithreaded="true"
+		runtime="${runtime}"
+		outtype="shared"
+		objdir="${executable.dir}/test-ofiles"
+		outputfileproperty="libmod_test.so"
+		debug="${debug}"
+		projectsOnly="${projectsOnly}">
+		<fileset	dir="${test.dir}"
+					includes="mod_test.c"
+		/>
 
-<target name="build-proc_child" depends="build">
-    <antcall target="build-test">
-        <param name="test" value="proc_child"/>
-        <param name="testfiles" value="proc_child.c"/>
-    </antcall>
-</target>
+		<includepath path="${include.dir}" />
 
+		<defineset if="is-windows">
+			<define name="WIN32" value="1" />
+		</defineset>
+		<defineset	define="_HAVE_CONFIG_H _REENTRANT _GNU_SOURCE"
+					if="is-gcc"
+		/>
+		<defineset	define="APR_DECLARE_STATIC"
+					unless="is-shared"
+		/>
+		<defineset	define="HAVE_CONFIG_H DARWIN SIGPROCMASK_SETS_THREAD_MASK"
+					if="is-mac"
+		/>
+		<compilerarg	value="${pic-option}"
+						if="pic-option"
+		/>
 
-<target name="build-sendfile" depends="build">
-    <antcall target="build-test">
-        <param name="test" value="sendfile"/>
-        <param name="testfiles" value="sendfile.c"/>
-    </antcall>
-</target>
+		<libset	dir="${apr.lib.dir}"
+				libs="${lib.prefix}${lib.name}${lib.suffix}"
+		/>
+		<libset	libs="cw32mt"
+				if="is-bcc"
+		/>
+		<libset	libs="advapi32 ws2_32 mswsock rpcrt4"
+				if="is-windows"
+		/>
 
-
-<target name="build-mod_test" depends="build">
-    <mkdir dir="${executable.dir}/test-ofiles"/>
-    <mkdir dir="${executable.dir}/.libs"/>
-    <property name="project.compiler" value="${compiler}"/>
-	<property name="project.type" value="msvc6"/>
-    <cc name="${project.compiler}"
-        outfile="${executable.dir}/.libs/mod_test"
-        subsystem="console"
-        multithreaded="true"
-        runtime="${runtime}"
-        outtype="shared"
-        objdir="${executable.dir}/test-ofiles"
-        outputfileproperty="libmod_test.so"
-        debug="${debug}"
-        projectsOnly="${projectsOnly}">
-        <fileset dir="${test.dir}" includes="mod_test.c"/>
-        <includepath path="${include.dir}"/>
-        <defineset if="is-windows">
-            <define name="WIN32" value="1"/>
-        </defineset>
-        <defineset define="_HAVE_CONFIG_H _REENTRANT _GNU_SOURCE" if="is-gcc"/>
-        <defineset define="APR_DECLARE_STATIC" unless="is-shared"/>
-        <defineset define="HAVE_CONFIG_H DARWIN SIGPROCMASK_SETS_THREAD_MASK" if="is-mac"/>
-        <compilerarg value="${pic-option}" if="pic-option"/>
-        <libset dir="${apr.lib.dir}" libs="${lib.prefix}${lib.name}${lib.suffix}"/>
-        <libset libs="cw32mt" if="is-bcc"/>
-        <libset libs="advapi32 ws2_32 mswsock rpcrt4" if="is-windows"/>
-        <project type="${project.type}" outfile="${projects.dir}/mod_test" if="project.if">
+		<project	type="${project.type}"
+					outfile="${projects.dir}/projects/mod_test"
+					if="project.if">
 			<comment>&license;</comment>
-			<dependency file="${projects.dir}/apr-1"/>
+			<dependency file="${projects.dir}/apr-1" />
 		</project>
+	</cc>
 
-    </cc>
-    <copy file="${libmod_test.so}" tofile="${executable.dir}/.libs/mod_test.so"/>
+	<copy	file="${libmod_test.so}"
+			tofile="${executable.dir}/.libs/mod_test.so"
+	/>
 </target>
 
+<target	name="build-testall"
+		depends="build">
+	<mkdir dir="${executable.dir}/test-ofiles" />
+	<property	name="project.compiler"
+				value="${compiler}"
+	/>
+	<property	name="project.type"
+				value="msvc6"
+	/>
 
-<target name="build-testall" depends="build">
-    <mkdir dir="${executable.dir}/test-ofiles"/>
-    <property name="project.compiler" value="${compiler}"/>
-	<property name="project.type" value="msvc6"/>
-    <cc name="${project.compiler}"
-        outfile="${executable.dir}/testall"
-        subsystem="console"
-        multithreaded="true"
-        runtime="${runtime}"        
-        outtype="executable"
-        objdir="${executable.dir}/test-ofiles"
-        debug="${debug}"
-        projectsOnly="${projectsOnly}">
-        <fileset dir="${test.dir}" includes="*.c">
-            <exclude name="nw_misc.c"/>
-            <exclude name="testlockperf.c"/>
-            <exclude name="occhild.c"/>
-            <exclude name="sockchild.c"/>
-            <exclude name="sockperf.c"/>
-            <exclude name="echod.c"/>
-            <exclude name="mockchild.c"/>
-            <exclude name="readchild.c"/>
-            <exclude name="globalmutexchild.c"/>
-            <exclude name="tryread.c"/>
-            <exclude name="proc_child.c"/>
-            <exclude name="sendfile.c"/>
-            <exclude name="testshmproducer.c"/>
-            <exclude name="testshmconsumer.c"/>
-            <exclude name="testmutexscope.c"/>
-            <exclude name="testapp.c"/>
-        </fileset>
-        <includepath path="${include.dir}"/>
-        <defineset if="is-windows">
-            <define name="WIN32" value="1"/>
-        </defineset>
-        <defineset define="_HAVE_CONFIG_H _REENTRANT _GNU_SOURCE" if="is-gcc"/>
-        <defineset define="APR_DECLARE_STATIC" unless="is-shared"/>
-        <defineset define="HAVE_CONFIG_H DARWIN SIGPROCMASK_SETS_THREAD_MASK" if="is-mac"/>
-        <compilerarg value="${pic-option}" if="pic-option"/>
-        <libset dir="${apr.lib.dir}" libs="${lib.prefix}${lib.name}${lib.suffix}"/>
-        <libset libs="cw32mt" if="is-bcc"/>
-        <libset libs="pthread dl" if="is-unix"/>
-        <libset libs="advapi32 ws2_32 mswsock rpcrt4" if="is-windows"/>
-        <project type="${project.type}" outfile="${projects.dir}/testall" if="project.if">
+	<cc	name="${project.compiler}"
+		outfile="${executable.dir}/testall"
+		subsystem="console"
+		multithreaded="true"
+		runtime="${runtime}"
+		outtype="executable"
+		objdir="${executable.dir}/test-ofiles"
+		debug="${debug}"
+		projectsOnly="${projectsOnly}">
+		<fileset	dir="${test.dir}"
+					includes="*.c">
+					<exclude name="nw_misc.c"			/>
+					<exclude name="testlockperf.c"		/>
+					<exclude name="occhild.c"			/>
+					<exclude name="sockchild.c"			/>
+					<exclude name="sockperf.c"			/>
+					<exclude name="echod.c"				/>
+					<exclude name="mockchild.c"			/>
+					<exclude name="readchild.c"			/>
+					<exclude name="globalmutexchild.c"	/>
+					<exclude name="tryread.c"			/>
+					<exclude name="proc_child.c"		/>
+					<exclude name="sendfile.c"			/>
+					<exclude name="testshmproducer.c"	/>
+					<exclude name="testshmconsumer.c"	/>
+					<exclude name="testmutexscope.c"	/>
+					<exclude name="testapp.c" />
+		</fileset>
+
+		<includepath path="${include.dir}" />
+
+		<defineset if="is-windows">
+			<define name="WIN32" value="1" />
+		</defineset>
+		<defineset	define="_HAVE_CONFIG_H _REENTRANT _GNU_SOURCE"
+					if="is-gcc"
+		/>
+		<defineset	define="APR_DECLARE_STATIC"
+					unless="is-shared"
+		/>
+		<defineset	define="HAVE_CONFIG_H DARWIN SIGPROCMASK_SETS_THREAD_MASK"
+					if="is-mac"
+		/>
+		<compilerarg	value="${pic-option}"
+						if="pic-option"
+		/>
+
+		<libset	dir="${apr.lib.dir}"
+				libs="${lib.prefix}${lib.name}${lib.suffix}"
+		/>
+		<libset	libs="cw32mt"
+				if="is-bcc"
+		/>
+		<libset	libs="pthread dl"
+				if="is-unix"
+		/>
+		<libset	libs="advapi32 ws2_32 mswsock rpcrt4"
+				if="is-windows"
+		/>
+
+		<project	type="${project.type}"
+					outfile="${projects.dir}/projects/testall"
+					if="project.if">
 			<comment>&license;</comment>
-			<dependency file="${projects.dir}/apr-1"/>
+			<dependency file="${projects.dir}/apr-1" />
 		</project>
-    </cc>
+	</cc>
 </target>
 
-<target name="run-testall" depends="build-testall, build-mod_test, build-tryread, build-readchild, build-globalmutexchild, build-occhild, build-proc_child, build-testshmconsumer, build-testshmproducer, build-sockchild">
-    <mkdir dir="${executable.dir}/data"/>
-    <copy todir="${executable.dir}/data">
-        <fileset dir="${test.dir}/data" includes="*"/>
-    </copy>
-    <exec executable="${executable.dir}/testall"
-          dir="${executable.dir}"
-          failonerror="true">
-        <env key="DYLD_LIBRARY_PATH"
-           value="${apr.lib.dir}:${executable.dir}/.libs:${env.DYLD_LIBRARY_PATH}"/>
-        <env key="LD_LIBRARY_PATH"
-           value="${apr.lib.dir}:${executable.dir}/.libs:${env.LD_LIBRARY_PATH}"/>
-    </exec>
+<target	name="run-testall"
+		depends="build-testall,
+					build-mod_test,
+					build-tryread,
+					build-readchild,
+					build-globalmutexchild,
+					build-occhild,
+					build-proc_child,
+					build-testshmconsumer,
+					build-testshmproducer,
+					build-sockchild">
+	<mkdir dir="${executable.dir}/data" />
+	<copy todir="${executable.dir}/data">
+		<fileset	dir="${test.dir}/data"
+					includes="*"
+		/>
+	</copy>
+	<exec	executable="${executable.dir}/testall"
+			dir="${executable.dir}"
+			failonerror="true">
+		<env	key="DYLD_LIBRARY_PATH"
+				value="${apr.lib.dir}:${executable.dir}/.libs:${env.DYLD_LIBRARY_PATH}"
+		/>
+		<env	key="LD_LIBRARY_PATH"
+				value="${apr.lib.dir}:${executable.dir}/.libs:${env.LD_LIBRARY_PATH}"
+		/>
+	</exec>
 </target>
 
+<target	name="build-check"
+		depends="build-testlockperf,
+					build-testshmproducer,
+					build-testshmconsumer,
+					build-testmutexscope,
+					build-testall"
+		description="Builds all test applications"
+/>
 
-
-<target name="build-check"
-     depends="build-testlockperf,
-              build-testshmproducer,
-              build-testshmconsumer,
-              build-testmutexscope,
-              build-testall"
-     description="Builds all test applications"/>
-
-<target name="check"
-      depends="run-testlockperf,
-               run-testall"
-      description="Runs all test applications">
+<target	name="check"
+		depends="run-testlockperf, run-testall"
+		description="Runs all test applications">
 </target>
 
-<target name="build-projects">
-        <mkdir dir="${projects.dir}"/>
-        <antcall target="build">
-                <param name="project.if" value="true"/>
-                <param name="project.type" value="${project.type}"/>
-                <param name="project.compiler" value="${project.compiler}"/>
-                <param name="projects.dir" value="${projects.dir}"/>
-                <param name="debug" value="${debug}"/>
-                <param name="projectsOnly" value="true"/>
-                <param name="arch" value="${arch}"/>
-        </antcall>
-        <antcall target="build-check">
-                <param name="project.if" value="true"/>
-                <param name="project.type" value="${project.type}"/>
-                <param name="project.compiler" value="${project.compiler}"/>
-                <param name="projects.dir" value="${projects.dir}"/>
-                <param name="debug" value="${debug}"/>
-                <param name="projectsOnly" value="true"/>
-                <param name="arch" value="${arch}"/>
-        </antcall>
+<target	name="build-projects">
+		<mkdir dir="${projects.dir}" />
+		<antcall	target="build">
+			<param	name="project.if"
+					value="true"
+			/>
+			<param	name="project.type"
+					value="${project.type}"
+			/>
+			<param	name="project.compiler"
+					value="${project.compiler}"
+			/>
+			<param	name="projects.dir"
+					value="${projects.dir}"
+			/>
+			<param	name="debug"
+					value="${debug}"
+			/>
+			<param	name="projectsOnly"
+					value="true"
+			/>
+			<param	name="arch"
+					value="${arch}"
+			/>
+		</antcall>
+		<antcall target="build-check">
+			<param	name="project.if"
+					value="true"
+			/>
+			<param	name="project.type"
+					value="${project.type}"
+			/>
+			<param	name="project.compiler"
+					value="${project.compiler}"
+			/>
+			<param	name="projects.dir"
+					value="${projects.dir}"
+			/>
+			<param	name="debug"
+					value="${debug}"
+			/>
+			<param	name="projectsOnly"
+					value="true"
+			/>
+			<param	name="arch"
+					value="${arch}"
+			/>
+		</antcall>
 </target>
 
-<target name="build-projects-vc6" depends="init"
-     description="Builds project files for Microsoft Visual C++ 6">
-    <antcall target="build-projects">
-        <param name="project.type" value="msvc6"/>
-        <param name="project.compiler" value="msvc"/>
-        <param name="os.family" value="windows"/>
-        <param name="debug" value="${debug}"/>
-        <param name="projects.dir" value="${projects.dir}"/>        
-    </antcall>
+<target	name="build-projects-vc6"
+		depends="init"
+		description="Builds project files for Microsoft Visual C++ 6">
+	<antcall target="build-projects">
+		<param	name="project.type"
+				value="msvc6"
+		/>
+		<param	name="project.compiler"
+				value="msvc"
+		/>
+		<param	name="os.family"
+				value="windows"
+		/>
+		<param	name="debug"
+				value="${debug}"
+		/>
+		<param	name="projects.dir"
+				value="${projects.dir}"
+		/>
+	</antcall>
 </target>
 
-
-<target name="build-projects-vc7" depends="init"
-     description="Builds project files for Microsoft Visual Studio .NET">
-    <antcall target="build-projects">
-        <param name="project.type" value="msvc7"/>
-        <param name="project.compiler" value="msvc"/>
-        <param name="os.family" value="windows"/>
-        <param name="debug" value="${debug}"/>
-        <param name="projects.dir" value="${projects.dir}"/>        
-    </antcall>
+<target	name="build-projects-vc7"
+		depends="init"
+		description="Builds project files for Microsoft Visual Studio .NET">
+	<antcall target="build-projects">
+		<param	name="project.type"
+				value="msvc7"
+		/>
+		<param	name="project.compiler"
+				value="msvc"
+		/>
+		<param	name="os.family"
+				value="windows"
+		/>
+		<param	name="debug"
+				value="${debug}"
+		/>
+		<param	name="projects.dir"
+				value="${projects.dir}"
+		/>
+	</antcall>
 </target>
 
-<target name="build-projects-vc8" depends="init"
-     description="Builds project files for Microsoft Visual C++ 2005">
-  <antcall target="build-projects">
-        <param name="project.type" value="msvc8"/>
-        <param name="project.compiler" value="msvc"/>
-        <param name="os.family" value="windows"/>
-        <param name="debug" value="${debug}"/>
-        <param name="projects.dir" value="${projects.dir}"/>        
-  </antcall>
+<target	name="build-projects-vc8"
+		depends="init"
+		description="Builds project files for Microsoft Visual C++ 2005">
+	<antcall target="build-projects">
+		<param	name="project.type"
+				value="msvc8"
+		/>
+		<param	name="project.compiler"
+				value="msvc"
+		/>
+		<param	name="os.family"
+				value="windows"
+		/>
+		<param	name="debug"
+				value="${debug}"
+		/>
+		<param	name="projects.dir"
+				value="${projects.dir}"
+		/>
+	</antcall>
 </target>
 
-  <target name="build-projects-vc9" depends="init"
-       description="Builds project files for Microsoft Visual C++ 2008">
-    <antcall target="build-projects">
-      <param name="project.type" value="msvc9"/>
-      <param name="project.compiler" value="msvc"/>
-      <param name="os.family" value="windows"/>
-      <param name="debug" value="${debug}"/>
-      <param name="projects.dir" value="${projects.dir}"/>
-    </antcall>
-  </target>
-
-  <target name="build-projects-xcode" depends="init" 
-      description="Builds project files for Apple Xcode">
-    <antcall target="build-projects">
-        <param name="project.type" value="xcode"/>
-        <param name="project.compiler" value="${compiler}"/>
-        <param name="os.family" value="mac"/>
-        <param name="debug" value="${debug}"/>
-        <param name="projects.dir" value="${projects.dir}"/>
-    </antcall>
+<target	name="build-projects-vc9"
+		depends="init"
+		description="Builds project files for Microsoft Visual C++ 2008">
+	<antcall target="build-projects">
+		<param	name="project.type"
+				value="msvc9"
+		/>
+		<param	name="project.compiler"
+				value="msvc"
+		/>
+		<param	name="os.family"
+				value="windows"
+		/>
+		<param	name="debug"
+				value="${debug}"
+		/>
+		<param	name="projects.dir"
+				value="${projects.dir}"
+		/>
+	</antcall>
 </target>
 
-
+<target	name="build-projects-xcode"
+		depends="init"
+		description="Builds project files for Apple Xcode">
+	<antcall target="build-projects">
+		<param	name="project.type"
+				value="xcode"
+		/>
+		<param	name="project.compiler"
+				value="${compiler}"
+		/>
+		<param	name="os.family"
+				value="mac"
+		/>
+		<param	name="debug"
+				value="${debug}"
+		/>
+		<param	name="projects.dir"
+				value="${projects.dir}"
+		/>
+	</antcall>
+</target>
 
 </project>
diff --git a/src/ant/apr-util-build.xml b/src/ant/apr-util-build.xml
old mode 100755
new mode 100644
index 1a27fa1..70ba3b2
--- a/src/ant/apr-util-build.xml
+++ b/src/ant/apr-util-build.xml
@@ -7,7 +7,7 @@
  (the "License"); you may not use this file except in compliance with
  the License.  You may obtain a copy of the License at
 
-      http://www.apache.org/licenses/LICENSE-2.0
+	  http://www.apache.org/licenses/LICENSE-2.0
 
  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
@@ -27,7 +27,7 @@
  (the "License"); you may not use this file except in compliance with
  the License.  You may obtain a copy of the License at
 
-      http://www.apache.org/licenses/LICENSE-2.0
+	  http://www.apache.org/licenses/LICENSE-2.0
 
  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
@@ -38,391 +38,685 @@
 ]>
 
 <!--
-
-This file builds APR using Apache Ant (http://ant.apache.org)
-and the C++ compilation tasks from http://ant-contrib.sourceforge.net.
-
-
+	This file builds APR using Apache Ant (http://ant.apache.org)
+	and the C++ compilation tasks from http://ant-contrib.sourceforge.net.
 -->
 <project name="aprutil" default="check" basedir=".">
 
 &common;
 &find-apr;
 
-<property name="src.dir" location="${basedir}"/>
-<property name="include.dir" location="${src.dir}/include"/>
-<property name="target.dir" location="${basedir}/target"/>
+<property	name="src.dir"
+			location="${basedir}"
+/>
+<property	name="include.dir"
+			location="${src.dir}/include"
+/>
+<property	name="target.dir"
+			location="${basedir}/target"
+/>
 
-
-<target name="usage" description="Displays usage notes">
-        <echo>
-        </echo>
+<target	name="usage"
+		description="Displays usage notes">
+	<echo></echo>
 </target>
 
-<target name="init" depends="common-init">
-    <condition property="arch" value="win32">
-        <isset property="is-windows"/>
-    </condition>
-    <property name="arch" value="unix"/>
+<target	name="init"
+		depends="common-init">
+	<condition	property="arch"
+				value="win32">
+		<isset property="is-windows" />
+	</condition>
+	<property	name="arch"
+				value="unix"
+	/>
 </target>
 
-<target name="clean" description="Deletes build products">
-        <delete dir="${target.dir}"/>
+<target	name="clean"
+		description="Deletes build products">
+	<delete dir="${target.dir}" />
 </target>
 
-
-<target name="configure-check" depends="init">
-        <condition property="aprutil-config-available" value="true">
-              <and>
-                    <available file="${include.dir}/apu.h"/>
-                    <available file="${include.dir}/apu_want.h"/>
-                    <available file="${include.dir}/private/apu_config.h"/>
-                    <available file="${include.dir}/private/apu_select_dbm.h"/>
-                    <available file="${src.dir}/xml/expat/lib/expat.h"/>
-                    <available file="${src.dir}/xml/expat/config.h"/>
-               </and>
-        </condition>
+<target	name="configure-check"
+		depends="init">
+	<condition	property="aprutil-config-available"
+				value="true">
+		<and>
+			<available file="${include.dir}/apu.h"						/>
+			<available file="${include.dir}/apu_want.h"					/>
+			<available file="${include.dir}/private/apu_config.h"		/>
+			<available file="${include.dir}/private/apu_select_dbm.h"	/>
+			<available file="${src.dir}/xml/expat/lib/expat.h"			/>
+			<available file="${src.dir}/xml/expat/config.h"				/>
+		</and>
+	</condition>
 </target>
 
+<target	name="win-configure"
+		depends="configure-check"
+		if="is-windows"
+		unless="aprutil-config-available">
+	<copy	tofile="${include.dir}/apu.h"
+			file="${include.dir}/apu.hw"
+	/>
+	<replaceregexp	file="${include.dir}/apu.h"
+					match="#define *APU_HAVE_APR_ICONV.*"
+					replace="#define APU_HAVE_APR_ICONV 0"
+	/>
+	<copy	tofile="${include.dir}/apu_want.h"
+			file="${include.dir}/apu_want.hw"
+	/>
+	<copy	tofile="${include.dir}/apr_ldap.h"
+			file="${include.dir}/apr_ldap.hw"
+	/>
+	<replaceregexp	file="${include.dir}/apr_ldap.h"
+					match="#define APR_HAS_LDAP.*"
+					replace="#define APR_HAS_LDAP 0"
+	/>
+	<copy	tofile="${include.dir}/private/apu_config.h"
+			file="${include.dir}/private/apu_config.hw"
+	/>
+	<copy	tofile="${include.dir}/private/apu_select_dbm.h"
+			file="${include.dir}/private/apu_select_dbm.hw"
+	/>
+	<copy	tofile="${src.dir}/xml/expat/lib/config.h"
+			file="${src.dir}/xml/expat/lib/winconfig.h"
+	/>
 
-<target name="win-configure" depends="configure-check" if="is-windows" unless="aprutil-config-available">
-    <copy tofile="${include.dir}/apu.h" file="${include.dir}/apu.hw"/>
-    <replaceregexp file="${include.dir}/apu.h" match="#define *APU_HAVE_APR_ICONV.*" replace="#define APU_HAVE_APR_ICONV 0"/>
-    <copy tofile="${include.dir}/apu_want.h" file="${include.dir}/apu_want.hw"/>
-    <copy tofile="${include.dir}/apr_ldap.h" file="${include.dir}/apr_ldap.hw"/>
-    <replaceregexp file="${include.dir}/apr_ldap.h" match="#define APR_HAS_LDAP.*" replace="#define APR_HAS_LDAP 0"/>
-    <copy tofile="${include.dir}/private/apu_config.h" file="${include.dir}/private/apu_config.hw"/>
-    <copy tofile="${include.dir}/private/apu_select_dbm.h" file="${include.dir}/private/apu_select_dbm.hw"/>
-    <copy tofile="${src.dir}/xml/expat/lib/expat.h" file="${src.dir}/xml/expat/lib/expat.h.in"/>
-    <copy tofile="${src.dir}/xml/expat/lib/config.h" file="${src.dir}/xml/expat/lib/winconfig.h"/>
+	<!--
+		apr_dbd_odbc.c needs stdint.h, but at least on BCC it doesn't seem to be included
+		automatically. It's easier to change that using a file we already create than changing core
+		code files.
+	 -->
+	<condition	property="bcc-needs-stdint"
+				value="1"
+				else="0">
+		<and>
+			<equals arg1="${compiler}" arg2="bcc" />
+			<not>
+				<isfileselected file="${include.dir}/private/apu_config.h">
+					<contains	text="#include &lt;stdint.h&gt;"
+								ignorewhitespace="true"
+					/>
+				</isfileselected>
+			</not>
+		</and>
+	</condition>
+	<if>
+		<equals	arg1="${bcc-needs-stdint}"
+				arg2="1"
+		/>
+		<then>
+			<replace	file="${include.dir}/private/apu_config.h"
+						token="#define APU_CONFIG_H">
+				<replacevalue>#define APU_CONFIG_H
+
+#include &lt;stdint.h&gt;
+				</replacevalue>
+			</replace>
+		</then>
+	</if>
 </target>
 
-<target name="unix-configure" depends="configure-check, find-apr" if="is-unix" unless="aprutil-config-available">
-        <exec executable="sh" dir="${src.dir}">
-           <arg value="./configure"/>
-           <arg value="--with-apr=${apr.dir}"/>
-        </exec>
-        <exec executable="sh" dir="${src.dir}/xml/expat">
-            <arg value="./configure"/>
-        </exec>
+<target	name="unix-configure"
+		depends="configure-check, find-apr"
+		if="is-unix"
+		unless="aprutil-config-available">
+	<exec executable="sh" dir="${src.dir}">
+		<arg value="./configure" />
+		<arg value="--with-apr=${apr.dir}" />
+	</exec>
+	<exec executable="sh" dir="${src.dir}/xml/expat">
+		<arg value="./configure" />
+	</exec>
 </target>
 
-
-<target name="configure" depends="unix-configure, win-configure">
-    <condition property="has-iconv" value="1">
-        <isfileselected file="${include.dir}/apu.h">
-            <contains text="#define APR_HAVE_ICONV 1" ignorewhitespace="true"/>
-        </isfileselected>
-    </condition>
-    <condition property="has-iconv" value="1">
-        <isfileselected file="${include.dir}/apu.h">
-            <contains text="#define APU_HAVE_ICONV 1" ignorewhitespace="true"/>
-        </isfileselected>
-    </condition>
-    <condition property="has-sqlite3" value="1">
-        <isfileselected file="${include.dir}/apu.h">
-            <contains text="#define APU_HAVE_SQLITE3 1" ignorewhitespace="true"/>
-        </isfileselected>
-    </condition>
+<target	name="configure"
+		depends="unix-configure, win-configure">
+	<condition	property="has-iconv"
+				value="1">
+		<isfileselected file="${include.dir}/apu.h">
+			<contains	text="#define APR_HAVE_ICONV 1"
+						ignorewhitespace="true"
+			/>
+		</isfileselected>
+	</condition>
+	<condition	property="has-iconv"
+				value="1">
+		<isfileselected file="${include.dir}/apu.h">
+			<contains	text="#define APU_HAVE_ICONV 1"
+						ignorewhitespace="true"
+			/>
+		</isfileselected>
+	</condition>
+	<condition	property="has-sqlite3"
+				value="1">
+		<isfileselected file="${include.dir}/apu.h">
+			<contains	text="#define APU_HAVE_SQLITE3 1"
+						ignorewhitespace="true"
+			/>
+		</isfileselected>
+	</condition>
 </target>
 
+<target	name="build-xml"
+		depends="configure"
+		description="Builds Expat">
+	<mkdir dir="${executable.dir}/apr-util-ofiles" />
+	<property	name="project.compiler"
+				value="${compiler}"
+	/>
+	<property	name="project.type"
+				value="msvc6"
+	/>
 
-<target name="build-xml" depends="configure" description="Builds Expat">
-    <!--   uses replace instead of preprocessor since
-              the quotes on VERSION cause problems with cpptasks  -->
-    <replace file="${src.dir}/xml/expat/lib/xmlparse.c">
-       <replacefilter token="XML_MAJOR_VERSION" value="1"/>
-       <replacefilter token="XML_MINOR_VERSION" value="95"/>
-       <replacefilter token="XML_MICRO_VERSION" value="1"/>
-       <replacefilter token="VERSION" value='"expat_1.95.1"'/>
-    </replace>
+	<!--
+		This only generate a project file necessary to mimic this visual studio project provided
+		with APR.
+	 -->
+	<cc	name="${project.compiler}"
+		outfile="${executable.dir}/expat"
+		subsystem="console"
+		multithreaded="true"
+		runtime="${runtime}"
+		outtype="static"
+		objdir="${executable.dir}/apr-util-ofiles"
+		warnings="none"
+		debug="${debug}"
+		projectsOnly="true">
+		<fileset	dir="${src.dir}/xml/expat/lib"
+					includes="xmlparse.c xmlrole.c xmltok.c"
+		/>
+		<fileset	dir="${src.dir}/xml/expat/lib"
+					includes="*.h"
+		/>
+		<fileset	dir="${src.dir}/xml/expat"
+					includes="*.h"
+		/>
 
-    <mkdir dir="${executable.dir}/apr-util-ofiles"/>
-    <property name="project.compiler" value="${compiler}"/>
-	<property name="project.type" value="msvc6"/>
-    
-    <!--   this only generate a project file necessary to mimic
-              this visual studio project provided with APR -->
-    <cc name="${project.compiler}"
-        outfile="${executable.dir}/expat"
-        subsystem="console"
-        multithreaded="true"
-        runtime="${runtime}"        
-        outtype="static"
-        objdir="${executable.dir}/apr-util-ofiles"
-        warnings="none"
-        debug="${debug}"
-        projectsOnly="true">
-        <fileset dir="${src.dir}/xml/expat/lib"
-            includes="xmlparse.c xmlrole.c xmltok.c"/>
-        <fileset dir="${src.dir}/xml/expat/lib" includes="*.h"/>
-        <fileset dir="${src.dir}/xml/expat" includes="*.h"/>
-        <includepath path="${src.dir}/xml/expat/lib"/>
-        <includepath path="${src.dir}/xml/expat"/>
-        <defineset>
-            <define name="XMLPARSEAPI" value=" "/>
-        </defineset>
-        <defineset define="WIN32" if="is-windows"/>
-        <defineset define="_HAVE_CONFIG_H _REENTRANT _GNU_SOURCE" if="is-gcc"/>
-        <compilerarg value="${pic-option}" if="pic-option"/>
+		<includepath path="${src.dir}/xml/expat/lib"	/>
+		<includepath path="${src.dir}/xml/expat"		/>
 
-        <libset libs="cw32mt" if="is-bcc"/>
-        <project type="${project.type}" outfile="${projects.dir}/xml" if="project.if">
+		<defineset>
+			<define name="XMLPARSEAPI" value=" " />
+		</defineset>
+		<defineset	define="WIN32 COMPILED_FROM_DSP"
+					if="is-windows"
+		/>
+		<defineset	define="_HAVE_CONFIG_H _REENTRANT _GNU_SOURCE"
+					if="is-gcc"
+		/>
+		<compilerarg	value="${pic-option}"
+						if="pic-option"
+		/>
+
+		<libset libs="cw32mt" if="is-bcc" />
+		<project	type="${project.type}"
+					outfile="${projects.dir}/projects/xml"
+					if="project.if">
 			<comment>&license;</comment>
-        </project>
-    </cc>
-
+		</project>
+	</cc>
 </target>
 
-<target name="build" depends="build-xml, find-apr" description="Build library">
-	<property name="apr.lib.prefix" value=""/>
-	<property name="apr.lib.name" value="apr-1"/>
-	<property name="apr.lib.suffix" value=""/>
-    <cc name="${project.compiler}"
-        outfile="${executable.dir}/aprutil-1${lib-suffix}"
-        subsystem="console"
-        multithreaded="true"
-        runtime="${runtime}"
-        outtype="${lib.type}"
-        objdir="${executable.dir}/apr-util-ofiles"
-        warnings="none"
-        debug="${debug}"
-        projectsOnly="${projectsOnly}">
-        <fileset dir="${src.dir}" includes="**/*.c"
-            excludes="test/*.c *.c ldap/*.c xml/expat/lib/*"/>
-        <fileset dir="${src.dir}/xml/expat/lib"
-            includes="xmlparse.c xmlrole.c xmltok.c"/>
-        <fileset dir="${src.dir}/xml/expat/lib" includes="*.h"/>
-        <fileset dir="${src.dir}/xml/expat" includes="*.h"/>
-        <fileset dir="${include.dir}" includes="*.h"/>
-        <fileset dir="${include.dir}/private" includes="*.h"/>
-        <includepath path="${apr.include.dir}"/>
-        <includepath path="${include.dir}"/>
-        <includepath path="${include.dir}/private"/>
-        <includepath path="${src.dir}/xml/expat/lib"/>
-        <includepath path="${src.dir}/xml/expat"/>
-        <defineset define="APU_DECLARE_EXPORT" if="is-shared"/>
-        <defineset define="APU_DECLARE_STATIC" unless="is-shared"/>
-        <defineset define="APR_DECLARE_STATIC" unless="is-apr-shared"/>
-        <defineset>
-            <define name="XMLPARSEAPI" value=" "/>
-        </defineset>
-        <defineset define="WIN32" if="is-windows"/>
-        <defineset define="_HAVE_CONFIG_H _REENTRANT _GNU_SOURCE" if="is-gcc"/>
-        <compilerarg value="${pic-option}" if="pic-option"/>
+<target	name="build"
+		depends="build-xml, find-apr"
+		description="Build library">
+	<property	name="apr.lib.prefix"
+				value=""
+	/>
+	<property	name="apr.lib.name"
+				value="apr-1"
+	/>
+	<property	name="apr.lib.suffix"
+				value=""
+	/>
 
-        <libset dir="${executable.dir}" libs="xml ${apr.lib.prefix}${apr.lib.name}${apr.lib.suffix}"/>
-        <libset libs="cw32mt" if="is-bcc"/>
-        <libset libs="pthread dl" if="is-unix"/>
-        <libset libs="iconv" if="has-iconv"/>
-        <libset libs="sqlite3" if="has-sqlite3"/>
-        <defineset if="is-bcc">
-            <define name="EILSEQ" value="50"/>
-        </defineset>
-        <project type="${project.type}" outfile="${projects.dir}/aprutil" if="project.if">
+	<cc	name="${project.compiler}"
+		outfile="${executable.dir}/aprutil-1${lib-suffix}"
+		subsystem="console"
+		multithreaded="true"
+		runtime="${runtime}"
+		outtype="${lib.type}"
+		objdir="${executable.dir}/apr-util-ofiles"
+		warnings="none"
+		debug="${debug}"
+		projectsOnly="${projectsOnly}">
+		<fileset	dir="${src.dir}" includes="**/*.c"
+					excludes="test/*.c *.c ldap/*.c xml/expat/lib/*"
+		/>
+		<fileset	dir="${src.dir}/xml/expat/lib"
+					includes="xmlparse.c xmlrole.c xmltok.c"
+		/>
+		<fileset	dir="${src.dir}/xml/expat/lib"
+					includes="*.h"
+		/>
+		<fileset	dir="${src.dir}/xml/expat"
+					includes="*.h"
+		/>
+		<fileset	dir="${include.dir}"
+					includes="*.h"
+		/>
+		<fileset	dir="${include.dir}/private"
+					includes="*.h"
+		/>
+
+		<includepath path="${apr.include.dir}"			/>
+		<includepath path="${include.dir}"				/>
+		<includepath path="${include.dir}/private"		/>
+		<includepath path="${src.dir}/xml/expat/lib"	/>
+		<includepath path="${src.dir}/xml/expat"		/>
+
+		<defineset	define="APU_DECLARE_EXPORT"
+					if="is-shared"
+		/>
+		<defineset	define="APU_DECLARE_STATIC"
+					unless="is-shared"
+		/>
+		<defineset	define="APR_DECLARE_STATIC"
+					unless="is-apr-shared"
+		/>
+		<defineset	define="XML_STATIC"
+					unless="is-shared"
+		/>
+		<defineset>
+			<define name="XMLPARSEAPI" value=" " />
+		</defineset>
+		<defineset	define="WIN32 COMPILED_FROM_DSP HAVE_SQL_H"
+					if="is-windows"
+		/>
+		<defineset if="is-bcc">
+			<define	name="EILSEQ"
+					value="50"
+			/>
+		</defineset>
+		<defineset	define="_HAVE_CONFIG_H _REENTRANT _GNU_SOURCE"
+					if="is-gcc"
+		/>
+		<compilerarg	value="${pic-option}"
+						if="pic-option"
+		/>
+
+		<libset	dir="${executable.dir}"
+				libs="xml ${apr.lib.prefix}${apr.lib.name}${apr.lib.suffix}"
+		/>
+		<libset	libs="cw32mt"
+				if="is-bcc"
+		/>
+		<libset	libs="pthread dl"
+				if="is-unix"
+		/>
+		<libset	libs="iconv"
+				if="has-iconv"
+		/>
+		<libset	libs="sqlite3"
+				if="has-sqlite3"
+		/>
+
+		<project	type="${project.type}"
+					outfile="${projects.dir}/projects/aprutil"
+					if="project.if">
 			<comment>&license;</comment>
-            <dependency file="${projects.dir}/apr"/>
-        </project>
-    </cc>
-    <property name="apr.lib.dir" location="${executable.dir}"/>
+			<dependency file="${projects.dir}/apr" />
+		</project>
+	</cc>
+
+	<property	name="apr.lib.dir"
+				location="${executable.dir}"
+	/>
 </target>
 
 <target name="build-test">
-    <mkdir dir="${executable.dir}/apr-util-test-ofiles"/>
-    <property name="project.compiler" value="${compiler}"/>
-	<property name="project.type" value="msvc6"/>
-    <cc name="${project.compiler}"
-        outfile="${executable.dir}/${test}"
-        subsystem="console"
-        multithreaded="true"
-        runtime="${runtime}"
-        outtype="executable"
-        objdir="${executable.dir}/apr-util-test-ofiles"
-        debug="${debug}"
-        projectsOnly="${projectsOnly}">
-        <fileset dir="${src.dir}/test" includes="${include.files}" excludes="${exclude.files}"/>
-        <includepath path="${include.dir}"/>
-        <includepath path="${apr.include.dir}"/>
-        <defineset define="APU_DECLARE_STATIC" unless="is-shared"/>
-        <defineset define="APR_DECLARE_STATIC" unless="is-apr-shared"/>
-        <defineset if="is-windows">
-            <define name="WIN32" value="1"/>
-        </defineset>
-        <defineset define="_HAVE_CONFIG_H _REENTRANT _GNU_SOURCE" if="is-gcc"/>
-        <compilerarg value="${pic-option}" if="pic-option"/>
-        <libset dir="${apr.lib.dir}" libs="apr-1${lib-suffix}" if="apr.lib.dir"/>
-        <libset libs="apr-1${lib-suffix}" unless="apr.lib.dir"/>
-        <libset dir="${executable.dir}" libs="aprutil-1${lib-suffix}"/>
-        <libset libs="cw32mt" if="is-bcc"/>
-        <libset libs="pthread dl" if="is-unix"/>
-        <libset libs="iconv" if="has-iconv"/>
-        <libset libs="sqlite3" if="has-sqlite3"/>
-        <project type="${project.type}" outfile="${projects.dir}/${test}" if="project.if">
+	<mkdir dir="${executable.dir}/apr-util-test-ofiles" />
+	<property	name="project.compiler"
+				value="${compiler}"
+	/>
+	<property	name="project.type"
+				value="msvc6"
+	/>
+
+	<cc	name="${project.compiler}"
+		outfile="${executable.dir}/${test}"
+		subsystem="console"
+		multithreaded="true"
+		runtime="${runtime}"
+		outtype="executable"
+		objdir="${executable.dir}/apr-util-test-ofiles"
+		debug="${debug}"
+		projectsOnly="${projectsOnly}">
+		<fileset	dir="${src.dir}/test"
+					includes="${include.files}"
+					excludes="${exclude.files}"
+		/>
+
+		<includepath path="${include.dir}"		/>
+		<includepath path="${apr.include.dir}"	/>
+
+		<defineset	define="APU_DECLARE_STATIC"
+					unless="is-shared"
+		/>
+		<defineset	define="APR_DECLARE_STATIC"
+					unless="is-apr-shared"
+		/>
+		<defineset if="is-windows">
+			<define name="WIN32" value="1" />
+		</defineset>
+		<defineset	define="_HAVE_CONFIG_H _REENTRANT _GNU_SOURCE"
+					if="is-gcc"
+		/>
+		<compilerarg	value="${pic-option}"
+						if="pic-option"
+		/>
+
+		<libset	dir="${apr.lib.dir}"
+				libs="apr-1${lib-suffix}"
+				if="apr.lib.dir"
+		/>
+		<libset	libs="apr-1${lib-suffix}"
+				unless="apr.lib.dir"
+		/>
+		<libset	dir="${executable.dir}"
+				libs="aprutil-1${lib-suffix}"
+		/>
+		<libset	libs="cw32mt"
+				if="is-bcc"
+		/>
+		<libset	libs="pthread dl"
+				if="is-unix"
+		/>
+		<libset	libs="iconv"
+				if="has-iconv"
+		/>
+		<libset	libs="sqlite3"
+				if="has-sqlite3"
+		/>
+
+		<project	type="${project.type}"
+					outfile="${projects.dir}/projects/${test}"
+					if="project.if">
 			<comment>&license;</comment>
-            <dependency file="${projects.dir}/apr"/>
-            <dependency file="${projects.dir}/aprutil" depends="apr"/>
-        </project>
-    </cc>
+			<dependency file="${projects.dir}/apr"						/>
+			<dependency file="${projects.dir}/aprutil" depends="apr"	/>
+		</project>
+	</cc>
 </target>
 
-<target name="copy-apr" if="is-windows">
-    <copy todir="${executable.dir}" overwrite="true">
-        <fileset dir="${apr.lib.dir}" includes="apr-1${lib-suffix}.dll"/>
-    </copy>
+<target	name="copy-apr"
+		if="is-windows">
+	<copy	todir="${executable.dir}"
+			overwrite="true">
+		<fileset	dir="${apr.lib.dir}"
+					includes="apr-1${lib-suffix}.dll"
+		/>
+	</copy>
 </target>
 
-<target name="run-test" depends="copy-apr">
-    <exec executable="${executable.dir}/${test}"
-          dir="${executable.dir}"
-          failonerror="true">
-        <env key="DYLD_LIBRARY_PATH"
-           value="${apr.lib.dir}:${aprutil.lib.dir}:${env.DYLD_LIBRARY_PATH}"/>
-        <env key="LD_LIBRARY_PATH"
-           value="${apr.lib.dir}:${aprutil.lib.dir}:${env.LD_LIBRARY_PATH}"/>
-        <env key="Path"
-           value="${apr.lib.dir}:${aprutil.lib.dir}:${env.Path}"/>
-    </exec>
+<target	name="run-test"
+		depends="copy-apr">
+	<exec	executable="${executable.dir}/${test}"
+			dir="${executable.dir}"
+			failonerror="true">
+		<env	key="DYLD_LIBRARY_PATH"
+				value="${apr.lib.dir}:${aprutil.lib.dir}:${env.DYLD_LIBRARY_PATH}"
+		/>
+		<env	key="LD_LIBRARY_PATH"
+				value="${apr.lib.dir}:${aprutil.lib.dir}:${env.LD_LIBRARY_PATH}"
+		/>
+		<env	key="Path"
+				value="${apr.lib.dir}:${aprutil.lib.dir}:${env.Path}"
+		/>
+	</exec>
 </target>
 
-
-<target name="build-testall" depends="build">
-    <antcall target="build-test">
-        <param name="test" value="testall"/>
-        <param name="include.files" value="**/*.c"/>
-        <param name="exclude.files" value="dbd.c testssl.c echod.c sockperf.c nw*.c"/>
-    </antcall>
+<target	name="build-testall"
+		depends="build">
+	<antcall target="build-test">
+		<param	name="test"
+				value="testall"
+		/>
+		<param	name="include.files"
+				value="**/*.c"
+		/>
+		<param	name="exclude.files"
+				value="dbd.c testssl.c echod.c sockperf.c nw*.c"
+		/>
+	</antcall>
 </target>
 
-<target name="run-testall" depends="build-testall">
-    <antcall target="run-test">
-        <param name="test" value="testall"/>
-    </antcall>
+<target	name="run-testall"
+		depends="build-testall">
+	<antcall target="run-test">
+		<param	name="test"
+				value="testall"
+		/>
+	</antcall>
 </target>
 
-<target name="build-dbd" depends="build">
-    <antcall target="build-test">
-        <param name="test" value="dbd"/>
-        <param name="include.files" value="dbd.c"/>
-        <param name="exclude.files" value="*.y"/>
-    </antcall>
+<target	name="build-dbd"
+		depends="build">
+	<antcall target="build-test">
+		<param	name="test"
+				value="dbd"
+		/>
+		<param	name="include.files"
+				value="dbd.c"
+		/>
+		<param	name="exclude.files"
+				value="*.y"
+		/>
+	</antcall>
 </target>
 
-<target name="run-dbd" depends="build-dbd">
-    <antcall target="run-test">
-        <param name="test" value="dbd"/>
-    </antcall>
+<target	name="run-dbd"
+		depends="build-dbd">
+	<antcall target="run-test">
+		<param	name="test"
+				value="dbd"
+		/>
+	</antcall>
 </target>
 
-<target name="build-testssl" depends="build">
-    <antcall target="build-test">
-        <param name="test" value="testssl"/>
-        <param name="include.files" value="testssl.c"/>
-    </antcall>
+<target	name="build-testssl"
+		depends="build">
+	<antcall target="build-test">
+		<param	name="test"
+				value="testssl"
+		/>
+		<param	name="include.files"
+				value="testssl.c"
+		/>
+	</antcall>
 </target>
 
-<target name="run-testssl" depends="build-testssl">
-    <antcall target="run-test">
-        <param name="test" value="testssl"/>
-    </antcall>
+<target	name="run-testssl"
+		depends="build-testssl">
+	<antcall target="run-test">
+		<param	name="test"
+				value="testssl"
+		/>
+	</antcall>
 </target>
 
 <target name="build-echod" depends="build">
-    <antcall target="build-test">
-        <param name="test" value="echod"/>
-        <param name="include.files" value="echod.c"/>
-    </antcall>
+	<antcall target="build-test">
+		<param	name="test"
+				value="echod"
+		/>
+		<param	name="include.files"
+				value="echod.c"
+		/>
+	</antcall>
 </target>
 
-<target name="build-sockperf" depends="build">
-    <antcall target="build-test">
-        <param name="test" value="sockperf"/>
-        <param name="include.files" value="sockperf.c"/>
-    </antcall>
+<target	name="build-sockperf"
+		depends="build">
+	<antcall target="build-test">
+		<param	name="test"
+				value="sockperf"
+		/>
+		<param	name="include.files"
+				value="sockperf.c"
+		/>
+	</antcall>
 </target>
 
+<target	name="build-check"
+		depends="build-testall, build-dbd, build-testssl, build-echod"
+		description="Builds all tests"
+/>
 
+<target	name="check"
+		depends="build-check"
+		description="Runs all tests"
+/>
 
-<target name="build-check"
-    depends="build-testall, build-dbd, build-testssl, build-echod"
-    description="Builds all tests"/>
+<target name="build-projects">
+	<mkdir dir="${projects.dir}" />
+	<antcall target="build">
+		<param	name="project.if"
+				value="true"
+		/>
+		<param	name="project.type"
+				value="${project.type}"
+		/>
+		<param	name="project.compiler"
+				value="${project.compiler}"
+		/>
+		<param	name="projects.dir"
+				value="${projects.dir}"
+		/>
+		<param	name="debug"
+				value="${debug}"
+		/>
+		<param	name="projectsOnly"
+				value="true"
+		/>
+	</antcall>
+</target>
 
-<target name="check"
-    depends="build-check"
-     description="Runs all tests"/>
+<target	name="build-projects-vc6"
+		depends="init"
+		description="Builds project files for Microsoft Visual C++ 6">
+	<antcall target="build-projects">
+		<param	name="projects.dir"
+				value="${projects.dir}"
+		/>
+		<param	name="project.type"
+				value="msvc6"
+		/>
+		<param	name="project.compiler"
+				value="msvc"
+		/>
+		<param	name="os.family"
+				value="windows"
+		/>
+		<param	name="projects.dir"
+				value="${projects.dir}"
+		/>
+		<param	name="debug"
+				value="${debug}"
+		/>
+	</antcall>
+</target>
 
+<target	name="build-projects-vc7"
+		depends="init"
+		description="Builds project files for Microsoft Visual Studio .NET">
+	<antcall target="build-projects">
+		<param	name="projects.dir"
+				value="${projects.dir}"
+		/>
+		<param	name="project.type"
+				value="msvc7"
+		/>
+		<param	name="project.compiler"
+				value="msvc"
+		/>
+		<param	name="os.family"
+				value="windows"
+		/>
+		<param	name="projects.dir"
+				value="${projects.dir}"
+		/>
+		<param	name="debug"
+				value="${debug}"
+		/>
+	</antcall>
+</target>
 
-    <target name="build-projects">
-            <mkdir dir="${projects.dir}"/>
-            <antcall target="build">
-                    <param name="project.if" value="true"/>
-                    <param name="project.type" value="${project.type}"/>
-                    <param name="project.compiler" value="${project.compiler}"/>
-                    <param name="projects.dir" value="${projects.dir}"/>
-                    <param name="debug" value="${debug}"/>
-                    <param name="projectsOnly" value="true"/>
-            </antcall>
-    </target>
+<target	name="build-projects-vc8"
+		depends="init"
+		description="Builds project files for Microsoft Visual C++ 2005">
+	<antcall target="build-projects">
+		<param	name="projects.dir"
+				value="${projects.dir}"
+		/>
+		<param	name="project.type"
+				value="msvc8"
+		/>
+		<param	name="project.compiler"
+				value="msvc"
+		/>
+		<param	name="os.family"
+				value="windows"
+		/>
+		<param	name="projects.dir"
+				value="${projects.dir}"
+		/>
+		<param	name="debug"
+				value="${debug}"
+		/>
+	</antcall>
+</target>
 
-    <target name="build-projects-vc6" depends="init"
-        description="Builds project files for Microsoft Visual C++ 6">
-        <antcall target="build-projects">
-            <param name="projects.dir" value="${projects.dir}"/>
-            <param name="project.type" value="msvc6"/>
-            <param name="project.compiler" value="msvc"/>
-            <param name="os.family" value="windows"/>
-            <param name="projects.dir" value="${projects.dir}"/>
-            <param name="debug" value="${debug}"/>
-        </antcall>
-    </target>
+<target	name="build-projects-vc9"
+		depends="init"
+		description="Builds project files for Microsoft Visual C++ 2008">
+	<antcall target="build-projects">
+		<param	name="projects.dir"
+				value="${projects.dir}"
+		/>
+		<param	name="project.type"
+				value="msvc9"
+		/>
+		<param	name="project.compiler"
+				value="msvc"
+		/>
+		<param	name="os.family"
+				value="windows"
+		/>
+		<param	name="projects.dir"
+				value="${projects.dir}"
+		/>
+		<param	name="debug"
+				value="${debug}"
+		/>
+	</antcall>
+</target>
 
-    <target name="build-projects-vc7" depends="init"
-          description="Builds project files for Microsoft Visual Studio .NET">
-      <antcall target="build-projects">
-        <param name="projects.dir" value="${projects.dir}"/>
-        <param name="project.type" value="msvc7"/>
-        <param name="project.compiler" value="msvc"/>
-        <param name="os.family" value="windows"/>
-        <param name="projects.dir" value="${projects.dir}"/>
-        <param name="debug" value="${debug}"/>
-      </antcall>
-    </target>
-
-    <target name="build-projects-vc8" depends="init"
-          description="Builds project files for Microsoft Visual C++ 2005">
-      <antcall target="build-projects">
-        <param name="projects.dir" value="${projects.dir}"/>
-        <param name="project.type" value="msvc8"/>
-        <param name="project.compiler" value="msvc"/>
-        <param name="os.family" value="windows"/>
-        <param name="projects.dir" value="${projects.dir}"/>
-        <param name="debug" value="${debug}"/>
-      </antcall>
-    </target>
-
-  <target name="build-projects-vc9" depends="init"
-       description="Builds project files for Microsoft Visual C++ 2008">
-    <antcall target="build-projects">
-      <param name="projects.dir" value="${projects.dir}"/>
-      <param name="project.type" value="msvc9"/>
-      <param name="project.compiler" value="msvc"/>
-      <param name="os.family" value="windows"/>
-      <param name="projects.dir" value="${projects.dir}"/>
-      <param name="debug" value="${debug}"/>
-    </antcall>
-  </target>
-
-  <target name="build-projects-xcode" depends="init"
-         description="Builds project files for Apple Xcode">
-        <antcall target="build-projects">
-            <param name="projects.dir" value="${projects.dir}"/>
-            <param name="project.type" value="xcode"/>
-            <param name="project.compiler" value="${compiler}"/>
-            <param name="os.family" value="mac"/>
-            <param name="projects.dir" value="${projects.dir}"/>
-            <param name="debug" value="${debug}"/>
-        </antcall>
-    </target>
-
-
+<target	name="build-projects-xcode"
+		depends="init"
+		description="Builds project files for Apple Xcode">
+	<antcall target="build-projects">
+		<param	name="projects.dir"
+				value="${projects.dir}"
+		/>
+		<param	name="project.type"
+				value="xcode"
+		/>
+		<param	name="project.compiler"
+				value="${compiler}"
+		/>
+		<param	name="os.family"
+				value="mac"
+		/>
+		<param	name="projects.dir"
+				value="${projects.dir}"
+		/>
+		<param	name="debug"
+				value="${debug}"
+		/>
+	</antcall>
+</target>
 
 </project>
diff --git a/src/ant/common.xml b/src/ant/common.xml
index 7d9ae8e..3343b3d 100644
--- a/src/ant/common.xml
+++ b/src/ant/common.xml
@@ -15,170 +15,241 @@
  limitations under the License.
 
 -->
+

+<property	file="build.properties"
+/>
+<property	name="debug"
+			value="true"
+/>
+<property	name="rtti"
+			value="false"
+/>
+<property	name="optimize"
+			value="none"
+/>
+<property	name="lib.type"

+			value="shared"

+/>

+<property	name="runtime"
+			value="dynamic"
+/>

 
-<property file="build.properties"/>
-<property name="debug" value="true"/>
-<property name="rtti" value="false"/>
-<property name="optimize" value="none"/>
-<property name="lib.type" value="shared"/>

-<property name="runtime" value="dynamic"/>
-
-<taskdef resource="cpptasks.tasks"/>
-<typedef resource="cpptasks.types"/>
+<taskdef resource="cpptasks.tasks" />
+<typedef resource="cpptasks.types" />
+<taskdef resource="net/sf/antcontrib/antcontrib.properties" />
 
 <target name="os-detect">
-        <condition property="os.family" value="mac">
-            <os family="mac"/>
-        </condition>
-        <condition property="os.family" value="windows">
-            <os family="windows"/>
-        </condition>
-        <property name="os.family" value="unix"/>
-        <condition property="is-mac" value="1">
-            <equals arg1="${os.family}" arg2="mac"/>
-        </condition>
-        <condition property="is-windows" value="1">
-            <equals arg1="${os.family}" arg2="windows"/>
-        </condition>
-        <condition property="is-unix" value="1">
-            <or>
-                <equals arg1="${os.family}" arg2="unix"/>
-                <equals arg1="${os.family}" arg2="mac"/>
-                <equals arg1="${os.family}" arg2="cygwin"/>
-            </or>
-        </condition>
+	<condition	property="os.family"
+				value="mac">
+		<os family="mac" />
+	</condition>
+	<condition	property="os.family"
+				value="windows">
+		<os family="windows" />
+	</condition>
+	<property	name="os.family"
+				value="unix"
+	/>
+

+	<condition	property="is-mac"
+				value="1">
+		<equals arg1="${os.family}" arg2="mac" />
+	</condition>
+	<condition	property="is-windows"
+				value="1">
+		<equals arg1="${os.family}" arg2="windows" />
+	</condition>
+	<condition	property="is-unix" value="1">
+		<or>
+			<equals arg1="${os.family}" arg2="unix"		/>
+			<equals arg1="${os.family}" arg2="mac"		/>
+			<equals arg1="${os.family}" arg2="cygwin"	/>
+		</or>
+	</condition>
 </target>
 
+<target	name="win-init"
+		depends="os-detect"
+		if="is-windows">
+	<property	name="compiler"
+				value="msvc"
+	/>
 
-<target name="win-init" depends="os-detect" if="is-windows">
-    <property name="compiler" value="msvc"/>
+	<condition	property="is-bcc"
+				value="true">
+		<or>
+			<equals arg1="${compiler}" arg2="bcc" />
+		</or>
+	</condition>
 
-    <condition property="is-bcc" value="true">
-        <or>
-           <equals arg1="${compiler}" arg2="bcc"/>
-        </or>
-    </condition>
+	<condition	property="is-msvc"
+				value="true">
+		<or>
+			<equals arg1="${compiler}" arg2="msvc" />
+		</or>
+	</condition>
 
-    <condition property="is-msvc" value="true">
-        <or>
-           <equals arg1="${compiler}" arg2="msvc"/>
-        </or>
-    </condition>
-
-    <condition property="is-mingw" value="true">
-        <or>
-            <equals arg1="${compiler}" arg2="gcc"/>
-            <equals arg1="${compiler}" arg2="g++"/>
-        </or>
-    </condition>
+	<condition	property="is-mingw"
+				value="true">
+		<or>
+			<equals arg1="${compiler}" arg2="gcc" />
+			<equals arg1="${compiler}" arg2="g++" />
+		</or>
+	</condition>

 </target>
 
-<target name="mac-init" depends="os-detect" if="is-mac">
-    <property name="project.type" value="xcode"/>
+<target	name="mac-init"
+		depends="os-detect"
+		if="is-mac">
+	<property	name="project.type"
+				value="xcode"
+	/>
 </target>
 
+<target	name="unix-init"
+		depends="mac-init" if="is-unix">
+	<property	name="compiler"
+				value="gcc"
+	/>
 
-<target name="unix-init" depends="mac-init" if="is-unix">
-
-    <property name="compiler" value="gcc"/>
-
-    <condition property="has-expat" value="true">
-         <not><isset property="is-mac"/></not>
-    </condition>
-    <condition property="is-cygwin" value="true">
-        <os family="windows"/>
-    </condition>
+	<condition	property="has-expat"
+				value="true">
+		<not><isset property="is-mac" /></not>
+	</condition>
+	<condition	property="is-cygwin"
+				value="true">
+		<os family="windows" />
+	</condition>
 </target>
 
-
-<target name="common-init" depends="win-init, unix-init">
-        <available classname="net.sf.antcontrib.cpptasks.CCTask" property="cctask-available"/>
-        <fail unless="cctask-available">cpptasks required
+<target	name="common-init"
+		depends="win-init, unix-init">
+	<available	classname="net.sf.antcontrib.cpptasks.CCTask"
+				property="cctask-available" />
+	<fail unless="cctask-available">cpptasks required
 
 Use cpptasks 1.0b5 or later from
 http://ant-contrib.sourceforge.net.
-</fail>
+	</fail>
 
-        <available classname="net.sf.antcontrib.cpptasks.ide.ProjectDef"
-            property="cctask-project-available"/>
-        <!-- fail unless="cctask-project-available">later version of cpptasks required
+	<available	classname="net.sf.antcontrib.cpptasks.ide.ProjectDef"
+				property="cctask-project-available" />
+		<!-- fail unless="cctask-project-available">later version of cpptasks required
 
-Required features not present in cpptasks releases prior to Feb 2005</fail -->
+Required features not present in cpptasks releases prior to Feb 2005
+		</fail -->
 
-        <mkdir dir="${target.dir}"/>
-        <property name="projects.dir" value="${target.dir}"/>
-        <mkdir dir="${projects.dir}"/>
+	<mkdir dir="${target.dir}" />
+	<property	name="projects.dir"
+				value="${target.dir}"
+	/>
+	<mkdir dir="${projects.dir}" />
 
-        <condition property="is-gcc" value="true">
-            <or>
-               <equals arg1="${compiler}" arg2="gcc"/>
-               <equals arg1="${compiler}" arg2="g++"/>
-            </or>
-        </condition>
+	<condition	property="is-gcc"
+				value="true">
+		<or>
+			<equals arg1="${compiler}" arg2="gcc" />
+			<equals arg1="${compiler}" arg2="g++" />
+		</or>
+	</condition>
 
-         <condition property="pic-option" value="-fPIC">
-            <and>
-                     <isset property="is-gcc"/>
-                     <istrue value="${use-pic}"/>
-            </and>
-         </condition>
+	<condition	property="pic-option"
+				value="-fPIC">
+		<and>
+			<isset	property="is-gcc"	/>
+			<istrue	value="${use-pic}"	/>
+		</and>
+	</condition>
 
 
-        <condition property="is-debug" value="true">
-                <istrue value="${debug}"/>
-        </condition>
+	<condition	property="is-debug"
+				value="true">
+		<istrue value="${debug}" />
+	</condition>
 
-        <condition property="debug.release" value="debug">
-            <isset property="is-debug"/>
-        </condition>
-        <property name="debug.release" value="release"/>
+	<condition	property="debug.release"
+				value="debug">
+		<isset property="is-debug" />
+	</condition>
+	<property	name="debug.release"
+				value="release"
+	/>
 
+	<condition	property="D.debug"
+				value="d">
+		<isset property="is-debug" />
+	</condition>
+	<property	name="D.debug"
+				value=""
+	/>
 
-        <condition property="D.debug" value="d">
-            <isset property="is-debug"/>
-        </condition>
-        <property name="D.debug" value=""/>
+	<condition	property="D.R"
+				value="d">
+		<isset property="is-debug" />
+	</condition>
+	<property	name="D.R"
+				value="r"
+	/>
 
-        <condition property="D.R" value="d">
-            <isset property="is-debug"/>
-        </condition>
-        <property name="D.R" value="r"/>
+	<property	name="lib-suffix"
+				value=""
+	/>
 
+	<condition	property="is-static"
+				value="1">
+		<equals arg1="${lib.type}" arg2="static" />
+	</condition>
+	<condition	property="is-shared"
+				value="1">
+		<equals arg1="${lib.type}" arg2="shared" />
+	</condition>
 
-		<property name="lib-suffix" value=""/>
+	<property	name="executable.dir"
+				value="${target.dir}/${debug.release}/${lib.type}"
+	/>
 
-        <condition property="is-static" value="1">
-              <equals arg1="${lib.type}" arg2="static"/>
-        </condition>
-        <condition property="is-shared" value="1">
-              <equals arg1="${lib.type}" arg2="shared"/>
-        </condition>
+	<property	name="projectsOnly"
+				value="false"
+	/>
 
-        <property name="executable.dir" value="${target.dir}/${debug.release}/${lib.type}"/>
-
-        <property name="projectsOnly" value="false"/>
-        
-        <property name="apr.lib.name" value="apr-1"/>
-		<property name="apr.sample.h" value="apr_pools.h"/>
-		<property name="apr.sample.c" value="file_io/unix/dir.c"/>
-        <property name="apr-util.lib.name" value="aprutil-1"/>
-		<property name="apr-util.sample.h" value="apr_xml.h"/>
-		<property name="apr-util.sample.c" value="xml/apr_xml.c"/>
-        <property name="esmtp.lib.name" value="esmtp"/>
-		<property name="esmtp.sample.h" value="libesmtp.h"/>
-		<property name="esmtp.sample.c" value="smtp-api.c"/>
+	<property	name="apr.lib.name"
+				value="apr-1"
+	/>
+	<property	name="apr.sample.h"
+				value="apr_pools.h"
+	/>
+	<property	name="apr.sample.c" value="file_io/unix/dir.c"
+	/>
+	<property	name="apr-util.lib.name" value="aprutil-1"
+	/>
+	<property	name="apr-util.sample.h" value="apr_xml.h"
+	/>
+	<property	name="apr-util.sample.c" value="xml/apr_xml.c"
+	/>
+	<property	name="esmtp.lib.name" value="esmtp"
+	/>
+	<property	name="esmtp.sample.h" value="libesmtp.h"
+	/>
+	<property	name="esmtp.sample.c" value="smtp-api.c"
+	/>
 </target>
 
-
-<target name="copy-if-changed-compare" unless="force-copy">
-    <condition property="force-copy" value="2">
-         <not><filesmatch file1="${tofile}" file2="${file}"/></not>
-    </condition>
+<target	name="copy-if-changed-compare"
+		unless="force-copy">
+	<condition	property="force-copy"
+				value="2">
+		<not>
+			<filesmatch	file1="${tofile}"
+						file2="${file}"
+			/>
+		</not>
+	</condition>
 </target>
 
-<target name="copy-if-changed" depends="copy-if-changed-compare" if="force-copy">
-    <copy tofile="${tofile}" file="${file}" overwrite="true"/>
-</target>
-
-
-
+<target	name="copy-if-changed"
+		depends="copy-if-changed-compare" if="force-copy">
+	<copy	tofile="${tofile}"
+			file="${file}"
+			overwrite="true"
+	/>
+</target>
\ No newline at end of file
diff --git a/src/ant/esmtp-build.xml b/src/ant/esmtp-build.xml
old mode 100755
new mode 100644
index 2a93d72..3e7e63a
--- a/src/ant/esmtp-build.xml
+++ b/src/ant/esmtp-build.xml
@@ -20,127 +20,188 @@
 
 -->
 
-
 <!--
-
-This file builds libesmtp using Apache Ant (http://ant.apache.org)
-and the C++ compilation tasks from http://ant-contrib.sourceforge.net.
-
-
+	This file builds libesmtp using Apache Ant (http://ant.apache.org)
+	and the C++ compilation tasks from http://ant-contrib.sourceforge.net.
 -->
 <project name="esmtp" default="build">
 
 &common;
 
-<property name="src.dir" location="${basedir}"/>
-<property name="include.dir" location="${src.dir}"/>
-<property name="test.dir" location="${src.dir}/test"/>
-<property name="target.dir" location="${basedir}/target"/>
-<property name="lib.type" value="shared"/>
-<property name="projects.dir" location="${target.dir}"/>
+<property	name="src.dir"
+			location="${basedir}"
+/>
+<property	name="include.dir"
+			location="${src.dir}"
+/>
+<property	name="test.dir"
+			location="${src.dir}/test"
+/>
+<property	name="target.dir"
+			location="${basedir}/target"
+/>
+<property	name="lib.type"
+			value="shared"
+/>
+<property	name="projects.dir"
+			location="${target.dir}"
+/>
 
-<target name="usage" description="Displays usage notes on build">
-        <echo>
-        </echo>
+<target	name="usage"
+		description="Displays usage notes on build">
+	<echo></echo>
 </target>
 
-
-<target name="init" depends="common-init">
+<target	name="init"
+		depends="common-init">
 </target>
 
-<target name="clean" description="Removes build product files">
-        <delete dir="${target.dir}"/>
+<target	name="clean"
+		description="Removes build product files">
+	<delete dir="${target.dir}" />
 </target>
 
-
-<target name="configure-check" depends="init">
-        <condition property="esmtp-configure-available" value="true">
-              <available file="${include.dir}/config.h"/>
-        </condition>
+<target	name="configure-check"
+		depends="init">
+	<condition	property="esmtp-configure-available"
+				value="true">
+		<available file="${include.dir}/config.h" />
+	</condition>
 </target>
 
-
-<target name="win-configure" depends="configure-check" if="is-windows">
-    <antcall target="copy-if-changed">
-        <param name="file" value="${include.dir}/config.h.in"/>
-        <param name="tofile" value="${include.dir}/config.h"/>
-    </antcall>
+<target	name="win-configure"
+		depends="configure-check"
+		if="is-windows">
+	<antcall target="copy-if-changed">
+		<param	name="file"
+				value="${include.dir}/config.h.in"
+		/>
+		<param	name="tofile"
+				value="${include.dir}/config.h"
+		/>
+	</antcall>
 </target>
 
-<target name="unix-configure" depends="configure-check" if="is-unix" unless="esmtp-configure-available">
-         <!--  shelling to configure allows cygwin to work  -->
-        <exec executable="sh" dir="${src.dir}">
-            <arg value="./configure"/>
-        </exec>
+<target	name="unix-configure"
+		depends="configure-check"
+		if="is-unix"
+		unless="esmtp-configure-available">
+	<!-- Shelling to configure allows cygwin to work -->
+	<exec	executable="sh"
+			dir="${src.dir}">
+		<arg value="./configure" />
+	</exec>
 </target>
 
+<target	name="configure"
+		depends="unix-configure, win-configure"
+/>
 
-<target name="configure" depends="unix-configure, win-configure"/>
+<target	name="build"
+		depends="configure"
+		description="Build library">
+	<mkdir dir="${executable.dir}/libesmtp-ofiles" />
+	<property	name="project.compiler"
+				value="${compiler}"
+	/>
 
+	<cc	name="${project.compiler}"
+		outfile="${executable.dir}/esmtp${lib-suffix}"
+		subsystem="console"
+		multithreaded="true"
+		outtype="${lib.type}"
+		objdir="${executable.dir}/libesmtp-ofiles"
+		outputfileproperty="esmtp.dll"
+		debug="${debug}"
+		projectsOnly="${projectsOnly}">
+		<fileset dir="${src.dir}">
+			<include name="*.c" />
+			<exclude name="getaddrinfo.c" />
+			<exclude name="gethostbyname.c" if="is-windows" />
+			<exclude name="strdup.c" if="is-windows" />
+			<exclude name="snprintf.c" if="is-windows" />
+			<exclude name="auth-client.c" if="is-windows" />
+			<!-- exclude name="siobuf.c" if="is-windows"/ -->
+		</fileset>
 
-<target name="build" depends="configure" description="Build library">
-    <mkdir dir="${executable.dir}/libesmtp-ofiles"/>
-    <property name="project.compiler" value="${compiler}"/>
-    <cc name="${project.compiler}"
-        outfile="${executable.dir}/esmtp${lib-suffix}"
-        subsystem="console"
-        multithreaded="true"
-        outtype="${lib.type}"
-        objdir="${executable.dir}/libesmtp-ofiles"
-        outputfileproperty="esmtp.dll"
-        debug="${debug}"
-        projectsOnly="${projectsOnly}">
-        <fileset dir="${src.dir}">
-            <include name="*.c"/>
-            <exclude name="getaddrinfo.c"/>
-            <exclude name="gethostbyname.c" if="is-windows"/>
-            <exclude name="strdup.c" if="is-windows"/>
-            <exclude name="snprintf.c" if="is-windows"/>
-            <exclude name="auth-client.c" if="is-windows"/>
-            <!-- exclude name="siobuf.c" if="is-windows"/ -->
-        </fileset>
-        <includepath path="${include.dir}"/>
-        <defineset define="HAVE_CONFIG_H"/>
-        <compilerarg value="${pic-option}" if="pic-option"/>
-        <libset libs="advapi32 ws2_32 mswsock rpcrt4" if="is-windows"/>
-        <libset libs="ssl crypto" if="is-unix"/>
-        <libset libs="cw32mt" if="is-bcc"/>
-        <project type="${project.type}" outfile="${projects.dir}/libesmtp" if="project.if"/>
-    </cc>
+		<includepath	path="${include.dir}"	/>
+		<defineset		define="HAVE_CONFIG_H"	/>
+		<compilerarg	value="${pic-option}"
+						if="pic-option"
+		/>
+
+		<libset	libs="advapi32 ws2_32 mswsock rpcrt4"
+				if="is-windows"
+		/>
+		<libset	libs="ssl crypto"
+				if="is-unix"
+		/>
+		<libset	libs="cw32mt"
+				if="is-bcc"
+		/>
+
+		<project	type="${project.type}"
+					outfile="${projects.dir}/projects/libesmtp"
+					if="project.if"
+		/>
+	</cc>
 </target>
 
-
-<target name="build-projects">
-        <mkdir dir="${projects.dir}"/>
-        <antcall target="build">
-                <param name="project.if" value="true"/>
-                <param name="project.type" value="${project.type}"/>
-                <param name="project.compiler" value="${project.compiler}"/>
-                <param name="projects.dir" value="${projects.dir}"/>
-                <param name="projectsOnly" value="true"/>
-        </antcall>
+<target	name="build-projects">
+	<mkdir dir="${projects.dir}" />
+	<antcall target="build">
+		<param	name="project.if"
+				value="true"
+		/>
+		<param	name="project.type"
+				value="${project.type}"
+		/>
+		<param	name="project.compiler"
+				value="${project.compiler}"
+		/>
+		<param	name="projects.dir"
+				value="${projects.dir}"
+		/>
+		<param	name="projectsOnly"
+				value="true"
+		/>
+	</antcall>
 </target>
 
-<target name="build-projects-vc6" description="Builds project files for Microsoft Visual C++ 6">
-    <antcall target="build-projects">
-        <param name="project.type" value="msvc6"/>
-        <param name="project.compiler" value="msvc"/>
-    </antcall>
+<target	name="build-projects-vc6"
+		description="Builds project files for Microsoft Visual C++ 6">
+	<antcall target="build-projects">
+		<param	name="project.type"
+				value="msvc6"
+		/>
+		<param	name="project.compiler"
+				value="msvc"
+		/>
+	</antcall>
 </target>
 
-<target name="build-projects-vc8" description="Builds project files for Microsoft Visual C++ 2005">
-  <antcall target="build-projects">
-    <param name="project.type" value="msvc8"/>
-    <param name="project.compiler" value="msvc"/>
-  </antcall>
+<target	name="build-projects-vc8"
+		description="Builds project files for Microsoft Visual C++ 2005">
+	<antcall target="build-projects">
+		<param	name="project.type"
+				value="msvc8"
+		/>
+		<param	name="project.compiler"
+				value="msvc"
+		/>
+	</antcall>
 </target>
 
-<target name="build-projects-xcode" description="Builds project files for Apple Xcode">
-    <antcall target="build-projects">
-        <param name="project.type" value="xcode"/>
-        <param name="project.compiler" value="g++"/>
-    </antcall>
+<target	name="build-projects-xcode"
+		description="Builds project files for Apple Xcode">
+	<antcall target="build-projects">
+		<param	name="project.type"
+				value="xcode"
+		/>
+		<param	name="project.compiler"
+				value="g++"
+		/>
+	</antcall>
 </target>
 
-
 </project>
diff --git a/src/ant/find-apr-util.xml b/src/ant/find-apr-util.xml
index 646a8a4..10908ed 100644
--- a/src/ant/find-apr-util.xml
+++ b/src/ant/find-apr-util.xml
@@ -16,288 +16,344 @@
 

 -->

 

-<target name="find-apr-util-src" depends="init">

-    <condition property="apr-util.dir" value="${with-apr-util}">

-        <available file="${with-apr-util}"/>

-    </condition>

-	<condition property="apr-util.src.dir" value="${apr-util.dir}">

-		<available file="${apr-util.dir}/${apr-util.sample.c}"/>

+<target	name="find-apr-util-src"

+		depends="init">

+	<condition	property="apr-util.dir"

+				value="${with-apr-util}">

+		<available file="${with-apr-util}" />

 	</condition>

-	<condition property="apr-util.src.dir" value="../apr-util">

-		<available file="../apr-util/${apr-util.sample.c}"/>

+	<condition	property="apr-util.src.dir"

+				value="${apr-util.dir}">

+		<available file="${apr-util.dir}/${apr-util.sample.c}" />

+	</condition>

+	<condition	property="apr-util.src.dir"

+				value="../apr-util">

+		<available file="../apr-util/${apr-util.sample.c}" />

 	</condition>

 </target>

 

-

-<target name="find-apr-util-lib" depends="find-apr-util-src" unless="force-ant">

-	<condition property="apr-util.lib.file"

-	     value="${apr-util.dir}/lib${apr-util.lib.name}.la">

-	     <available file="${apr-util.dir}/lib${apr-util.lib.name}.la"/></condition>

-	<condition property="apr-util.lib.file"

-	     value="${apr-util.dir}/lib${apr-util.lib.name}.dylib">

-	     <available file="${apr-util.dir}/lib${apr-util.lib.name}.dylib"/></condition>

-	<condition property="apr-util.lib.file"

-	     value="${apr-util.dir}/lib${apr-util.lib.name}.so">

-	     <available file="${apr-util.dir}/lib${apr-util.lib.name}.so"/></condition>

-	<condition property="apr-util.lib.file"

-	     value="${apr-util.dir}/lib${apr-util.lib.name}.a">

-	     <available file="${apr-util.dir}/lib${apr-util.lib.name}.a"/></condition>

-	<condition property="apr-util.lib.file"

-	     value="${apr-util.dir}/${apr-util.lib.name}.lib">

-	     <available file="${apr-util.dir}/${apr-util.lib.name}.lib"/></condition>

-	<condition property="apr-util.lib.file.dir" value="${apr-util.dir}">

-		<isset property="apr-util.lib.file"/>

+<target	name="find-apr-util-lib"

+		depends="find-apr-util-src"

+		unless="force-ant">

+	<condition	property="apr-util.lib.file"

+				value="${apr-util.dir}/lib${apr-util.lib.name}.la">

+		<available file="${apr-util.dir}/lib${apr-util.lib.name}.la" />

+	</condition>

+	<condition	property="apr-util.lib.file"

+				value="${apr-util.dir}/lib${apr-util.lib.name}.dylib">

+		<available file="${apr-util.dir}/lib${apr-util.lib.name}.dylib" />

+	</condition>

+	<condition	property="apr-util.lib.file"

+				value="${apr-util.dir}/lib${apr-util.lib.name}.so">

+		<available file="${apr-util.dir}/lib${apr-util.lib.name}.so" />

+	</condition>

+	<condition	property="apr-util.lib.file"

+				value="${apr-util.dir}/lib${apr-util.lib.name}.a">

+		<available file="${apr-util.dir}/lib${apr-util.lib.name}.a" />

+	</condition>

+	<condition	property="apr-util.lib.file"

+				value="${apr-util.dir}/${apr-util.lib.name}.lib">

+		<available file="${apr-util.dir}/${apr-util.lib.name}.lib" />

+	</condition>

+	<condition	property="apr-util.lib.file.dir"

+				value="${apr-util.dir}">

+		<isset property="apr-util.lib.file" />

 	</condition>

 

-	<condition property="apr-util.lib.file"

-	     value="${apr-util.dir}/.libs/lib${apr-util.lib.name}.la">

-	     <available file="${apr-util.dir}/.libs/lib${apr-util.lib.name}.la"/></condition>

-	<condition property="apr-util.lib.file"

-	     value="${apr-util.dir}/.libs/lib${apr-util.lib.name}.dylib">

-	     <available file="${apr-util.dir}/.libs/lib${apr-util.lib.name}.dylib"/></condition>

-	<condition property="apr-util.lib.file"

-	     value="${apr-util.dir}/.libs/lib${apr-util.lib.name}.so">

-	     <available file="${apr-util.dir}/.libs/lib${apr-util.lib.name}.so"/></condition>

-	<condition property="apr-util.lib.file"

-	     value="${apr-util.dir}/.libs/lib${apr-util.lib.name}.a">

-	     <available file="${apr-util.dir}/.libs/lib${apr-util.lib.name}.a"/></condition>

-	<condition property="apr-util.lib.file"

-	     value="${apr-util.dir}/.libs/${apr-util.lib.name}.lib">

-	     <available file="${apr-util.dir}/.libs/${apr-util.lib.name}.lib"/></condition>

-	<condition property="apr-util.lib.file.dir" value="${apr-util.dir}/.libs">

-		<isset property="apr-util.lib.file"/>

+	<condition	property="apr-util.lib.file"

+				value="${apr-util.dir}/.libs/lib${apr-util.lib.name}.la">

+		<available file="${apr-util.dir}/.libs/lib${apr-util.lib.name}.la" />

+	</condition>

+	<condition	property="apr-util.lib.file"

+				value="${apr-util.dir}/.libs/lib${apr-util.lib.name}.dylib">

+		<available file="${apr-util.dir}/.libs/lib${apr-util.lib.name}.dylib" />

+	</condition>

+	<condition	property="apr-util.lib.file"

+				value="${apr-util.dir}/.libs/lib${apr-util.lib.name}.so">

+		<available file="${apr-util.dir}/.libs/lib${apr-util.lib.name}.so" />

+	</condition>

+	<condition	property="apr-util.lib.file"

+				value="${apr-util.dir}/.libs/lib${apr-util.lib.name}.a">

+		<available file="${apr-util.dir}/.libs/lib${apr-util.lib.name}.a" />

+	</condition>

+	<condition	property="apr-util.lib.file"

+				value="${apr-util.dir}/.libs/${apr-util.lib.name}.lib">

+		<available file="${apr-util.dir}/.libs/${apr-util.lib.name}.lib" />

+	</condition>

+	<condition	property="apr-util.lib.file.dir"

+				value="${apr-util.dir}/.libs">

+		<isset property="apr-util.lib.file" />

 	</condition>

 

-	<!--  start looking at candidates  in /usr -->

-	<condition property="apr-util.lib.file"

-	     value="/usr/lib/lib${apr-util.lib.name}.la">

-	     <available file="/usr/lib/lib${apr-util.lib.name}.la"/></condition>

-	<condition property="apr-util.lib.file"

-	     value="/usr/lib/lib${apr-util.lib.name}.dylib">

-	     <available file="/usr/lib/lib${apr-util.lib.name}.dylib"/></condition>

-	<condition property="apr-util.lib.file"

-	     value="/usr/lib/lib${apr-util.lib.name}.so">

-	     <available file="/usr/lib/lib${apr-util.lib.name}.so"/></condition>

-	<condition property="apr-util.lib.file"

-	     value="/usr/lib/lib${apr-util.lib.name}.a">

-	     <available file="/usr/lib/lib${apr-util.lib.name}.a"/></condition>

-	<condition property="apr-util.dir" value="/usr">

-		<isset property="apr-util.lib.file"/>

+	<!-- Start looking at candidates in /usr -->

+	<condition	property="apr-util.lib.file"

+				value="/usr/lib/lib${apr-util.lib.name}.la">

+		<available file="/usr/lib/lib${apr-util.lib.name}.la" />

 	</condition>

-	<condition property="apr-util.lib.file.dir" value="/usr/lib">

-		<isset property="apr-util.lib.file"/>

+	<condition	property="apr-util.lib.file"

+				value="/usr/lib/lib${apr-util.lib.name}.dylib">

+		<available file="/usr/lib/lib${apr-util.lib.name}.dylib" />

+	</condition>

+	<condition	property="apr-util.lib.file"

+				value="/usr/lib/lib${apr-util.lib.name}.so">

+		<available file="/usr/lib/lib${apr-util.lib.name}.so" />

+	</condition>

+	<condition	property="apr-util.lib.file"

+				value="/usr/lib/lib${apr-util.lib.name}.a">

+		<available file="/usr/lib/lib${apr-util.lib.name}.a" />

+	</condition>

+	<condition	property="apr-util.dir" value="/usr">

+		<isset property="apr-util.lib.file" />

+	</condition>

+	<condition	property="apr-util.lib.file.dir" value="/usr/lib">

+		<isset property="apr-util.lib.file" />

 	</condition>

 

-	<!--  start looking at candidates  in /usr/local -->

-	<condition property="apr-util.lib.file"

-	     value="/usr/local/lib/lib${apr-util.lib.name}.la">

-	     <available file="/usr/local/lib/lib${apr-util.lib.name}.la"/></condition>

-	<condition property="apr-util.lib.file"

-	     value="/usr/local/lib/lib${apr-util.lib.name}.dylib">

-	     <available file="/usr/local/lib/lib${apr-util.lib.name}.dylib"/></condition>

-	<condition property="apr-util.lib.file"

-	     value="/usr/local/lib/lib${apr-util.lib.name}.so">

-	     <available file="/usr/local/lib/lib${apr-util.lib.name}.so"/></condition>

-	<condition property="apr-util.lib.file"

-	     value="/usr/local/lib/lib${apr-util.lib.name}.a">

-	     <available file="/usr/local/lib/lib${apr-util.lib.name}.a"/></condition>

-	<condition property="apr-util.dir" value="/usr/local">

-		<isset property="apr-util.lib.file"/>

+	<!-- start looking at candidates in /usr/local -->

+	<condition	property="apr-util.lib.file"

+				value="/usr/local/lib/lib${apr-util.lib.name}.la">

+		<available file="/usr/local/lib/lib${apr-util.lib.name}.la" />

 	</condition>

-	<condition property="apr-util.lib.file.dir" value="/usr/local/lib">

-		<isset property="apr-util.lib.file"/>

+	<condition	property="apr-util.lib.file"

+				value="/usr/local/lib/lib${apr-util.lib.name}.dylib">

+		<available file="/usr/local/lib/lib${apr-util.lib.name}.dylib" />

+	</condition>

+	<condition	property="apr-util.lib.file"

+				value="/usr/local/lib/lib${apr-util.lib.name}.so">

+		<available file="/usr/local/lib/lib${apr-util.lib.name}.so" />

+	</condition>

+	<condition	property="apr-util.lib.file"

+				value="/usr/local/lib/lib${apr-util.lib.name}.a">

+		<available file="/usr/local/lib/lib${apr-util.lib.name}.a" />

+	</condition>

+	<condition	property="apr-util.dir" value="/usr/local">

+		<isset property="apr-util.lib.file" />

+	</condition>

+	<condition	property="apr-util.lib.file.dir" value="/usr/local/lib">

+		<isset property="apr-util.lib.file" />

 	</condition>

 

-

-    <property name="relative-apr-util" location="../apr-util"/>

-    <condition property="apr-util.dir" value="${relative-apr-util}">

-        <available file="${relative-apr-util}"/>

-    </condition>

-	<condition property="apr-util.lib.file"

-	     value="${apr-util.dir}/lib${apr-util.lib.name}.la">

-	     <available file="${apr-util.dir}/lib${apr-util.lib.name}.la"/></condition>

-	<condition property="apr-util.lib.file"

-	     value="${apr-util.dir}/lib${apr-util.lib.name}.dylib">

-	     <available file="${apr-util.dir}/lib${apr-util.lib.name}.dylib"/></condition>

-	<condition property="apr-util.lib.file"

-	     value="${apr-util.dir}/lib${apr-util.lib.name}.so">

-	     <available file="${apr-util.dir}/lib${apr-util.lib.name}.so"/></condition>

-	<condition property="apr-util.lib.file"

-	     value="${apr-util.dir}/lib${apr-util.lib.name}.a">

-	     <available file="${apr-util.dir}/lib${apr-util.lib.name}.a"/></condition>

-	<condition property="apr-util.lib.file"

-	     value="${apr-util.dir}/${apr-util.lib.name}.lib">

-	     <available file="${apr-util.dir}/${apr-util.lib.name}.lib"/></condition>

-	<condition property="apr-util.lib.file.dir" value="${apr-util.dir}">

-		<isset property="apr-util.lib.file"/>

+	<property	name="relative-apr-util"

+				location="../apr-util"

+	/>

+	<condition	property="apr-util.dir"

+				value="${relative-apr-util}">

+		<available file="${relative-apr-util}" />

+	</condition>

+	<condition	property="apr-util.lib.file"

+				value="${apr-util.dir}/lib${apr-util.lib.name}.la">

+		<available file="${apr-util.dir}/lib${apr-util.lib.name}.la" />

+	</condition>

+	<condition	property="apr-util.lib.file"

+				value="${apr-util.dir}/lib${apr-util.lib.name}.dylib">

+		<available file="${apr-util.dir}/lib${apr-util.lib.name}.dylib" />

+	</condition>

+	<condition	property="apr-util.lib.file"

+				value="${apr-util.dir}/lib${apr-util.lib.name}.so">

+		<available file="${apr-util.dir}/lib${apr-util.lib.name}.so" />

+	</condition>

+	<condition	property="apr-util.lib.file"

+				value="${apr-util.dir}/lib${apr-util.lib.name}.a">

+		<available file="${apr-util.dir}/lib${apr-util.lib.name}.a" />

+	</condition>

+	<condition	property="apr-util.lib.file"

+				value="${apr-util.dir}/${apr-util.lib.name}.lib">

+		<available file="${apr-util.dir}/${apr-util.lib.name}.lib" />

+	</condition>

+	<condition	property="apr-util.lib.file.dir"

+				value="${apr-util.dir}">

+		<isset property="apr-util.lib.file" />

 	</condition>

 

-	<condition property="apr-util.lib.file"

-	     value="${apr-util.dir}/.libs/lib${apr-util.lib.name}.la">

-	     <available file="${apr-util.dir}/.libs/lib${apr-util.lib.name}.la"/></condition>

-	<condition property="apr-util.lib.file"

-	     value="${apr-util.dir}/.libs/lib${apr-util.lib.name}.dylib">

-	     <available file="${apr-util.dir}/.libs/lib${apr-util.lib.name}.dylib"/></condition>

-	<condition property="apr-util.lib.file"

-	     value="${apr-util.dir}/.libs/lib${apr-util.lib.name}.so">

-	     <available file="${apr-util.dir}/.libs/lib${apr-util.lib.name}.so"/></condition>

-	<condition property="apr-util.lib.file"

-	     value="${apr-util.dir}/.libs/lib${apr-util.lib.name}.a">

-	     <available file="${apr-util.dir}/.libs/lib${apr-util.lib.name}.a"/></condition>

-	<condition property="apr-util.lib.file.dir" value="${apr-util.dir}/.libs">

-		<isset property="apr-util.lib.file"/>

+	<condition	property="apr-util.lib.file"

+				value="${apr-util.dir}/.libs/lib${apr-util.lib.name}.la">

+		<available file="${apr-util.dir}/.libs/lib${apr-util.lib.name}.la" />

 	</condition>

-    <fail unless="apr-util.dir">Unable to locate apr-util base directory.</fail>

-    

+	<condition	property="apr-util.lib.file"

+				value="${apr-util.dir}/.libs/lib${apr-util.lib.name}.dylib">

+		<available file="${apr-util.dir}/.libs/lib${apr-util.lib.name}.dylib" />

+	</condition>

+	<condition	property="apr-util.lib.file"

+				value="${apr-util.dir}/.libs/lib${apr-util.lib.name}.so">

+		<available file="${apr-util.dir}/.libs/lib${apr-util.lib.name}.so" />

+	</condition>

+	<condition	property="apr-util.lib.file"

+				value="${apr-util.dir}/.libs/lib${apr-util.lib.name}.a">

+		<available file="${apr-util.dir}/.libs/lib${apr-util.lib.name}.a" />

+	</condition>

+	<condition	property="apr-util.lib.file.dir"

+				value="${apr-util.dir}/.libs">

+		<isset property="apr-util.lib.file" />

+	</condition>

+	<fail unless="apr-util.dir">Unable to locate apr-util base directory.</fail>

 

-

-

-	<!--   Static debug libraries in APR's VC6 projects typical location (ignored unless debug build)   -->

-	<condition property="apr-util.lib.file"

+	<!-- Static debug libraries in APR's VC6 projects typical location (ignored unless debug build) -->

+	<condition	property="apr-util.lib.file"

 		value="${apr-util.dir}/LibD/${apr-util.lib.name}.lib">

 		<and>

-			<isset property="is-debug"/>

-			<available file="${apr-util.dir}/LibD/${apr-util.lib.name}.lib"/>

+			<isset property="is-debug" />

+			<available file="${apr-util.dir}/LibD/${apr-util.lib.name}.lib" />

 		</and>

 	</condition>

-	<condition property="apr-util.lib.file.dir"

-		value="${apr-util.dir}/LibD">

-			<isset property="apr-util.lib.file"/>

+	<condition	property="apr-util.lib.file.dir"

+				value="${apr-util.dir}/LibD">

+		<isset property="apr-util.lib.file" />

 	</condition>

 

-

-

-

-	<!--   Shared debug libraries in APR's VC6 projects typical location (ignored unless debug build)   -->

-	<condition property="apr-util.lib.file"

-		value="${apr-util.dir}/Debug/lib${apr-util.lib.name}.lib">

+	<!-- Shared debug libraries in APR's VC6 projects typical location (ignored unless debug build) -->

+	<condition	property="apr-util.lib.file"

+				value="${apr-util.dir}/Debug/lib${apr-util.lib.name}.lib">

 		<and>

-			<isset property="is-debug"/>

-			<available file="${apr-util.dir}/Debug/lib${apr-util.lib.name}.lib"/>

+			<isset property="is-debug" />

+			<available file="${apr-util.dir}/Debug/lib${apr-util.lib.name}.lib" />

 		</and>

 	</condition>

-	<condition property="apr-util.lib.file.dir"

-		value="${apr-util.dir}/Debug">

-			<isset property="apr-util.lib.file"/>

+	<condition	property="apr-util.lib.file.dir"

+				value="${apr-util.dir}/Debug">

+		<isset property="apr-util.lib.file" />

 	</condition>

 

-

-

-	<!--   Static release libraries in APR's VC6 projects typical location (ignored unless debug build)   -->

-	<condition property="apr-util.lib.file"

-		value="${apr-util.dir}/LibR/${apr-util.lib.name}.lib">

-			<available file="${apr-util.dir}/LibR/${apr-util.lib.name}.lib"/>

+	<!-- Static release libraries in APR's VC6 projects typical location (ignored unless debug build) -->

+	<condition	property="apr-util.lib.file"

+				value="${apr-util.dir}/LibR/${apr-util.lib.name}.lib">

+		<available file="${apr-util.dir}/LibR/${apr-util.lib.name}.lib" />

 	</condition>

-	<condition property="apr-util.lib.file.dir"

-		value="${apr-util.dir}/LibR">

-			<isset property="apr-util.lib.file"/>

+	<condition	property="apr-util.lib.file.dir"

+				value="${apr-util.dir}/LibR">

+		<isset property="apr-util.lib.file" />

 	</condition>

 

-

-

-

-	<!--   Shared release libraries in APR's VC6 projects typical location   -->

-	<condition property="apr-util.lib.file"

-		value="${apr-util.dir}/Release/lib${apr-util.lib.name}.lib">

-			<available file="${apr-util.dir}/Release/lib${apr-util.lib.name}.lib"/>

+	<!-- Shared release libraries in APR's VC6 projects typical location -->

+	<condition	property="apr-util.lib.file"

+				value="${apr-util.dir}/Release/lib${apr-util.lib.name}.lib">

+		<available file="${apr-util.dir}/Release/lib${apr-util.lib.name}.lib" />

 	</condition>

-	<condition property="apr-util.lib.file.dir"

-		value="${apr-util.dir}/Release">

-			<isset property="apr-util.lib.file"/>

+	<condition	property="apr-util.lib.file.dir"

+				value="${apr-util.dir}/Release">

+		<isset property="apr-util.lib.file" />

 	</condition>

 

-

-

-	<condition property="apr-util.lib.dir" value="${apr-util.lib.file.dir}">

+	<condition	property="apr-util.lib.dir"

+				value="${apr-util.lib.file.dir}">

 		<and>

-			<isset property="apr-util.lib.file.dir"/>

+			<isset property="apr-util.lib.file.dir" />

 			<not>

 				<or>

 					<!--  default search path -->

-					<equals arg1="${apr-util.lib.file.dir}" arg2="/usr"/>

+					<equals arg1="${apr-util.lib.file.dir}" arg2="/usr" />

 				</or>

 			</not>

 		</and>

 	</condition>

 

-	<condition property="apr-util.lib.suffix" value="d">

+	<condition	property="apr-util.lib.suffix"

+				value="d">

 		<or>

-			<contains string="${apr-util.lib.file}" substring="/lib${apr-util.lib.name}d."/>

-			<contains string="${apr-util.lib.file}" substring="/${apr-util.lib.name}d."/>

+			<contains	string="${apr-util.lib.file}"

+						substring="/lib${apr-util.lib.name}d."

+			/>

+			<contains	string="${apr-util.lib.file}"

+						substring="/${apr-util.lib.name}d."

+			/>

 		</or>

 	</condition>

-	<condition property="apr-util.lib.suffix" value="D">

+	<condition	property="apr-util.lib.suffix"

+				value="D">

 		<or>

-			<contains string="${apr-util.lib.file}" substring="/lib${apr-util.lib.name}D."/>

-			<contains string="${apr-util.lib.file}" substring="/${apr-util.lib.name}D."/>

+			<contains	string="${apr-util.lib.file}"

+						substring="/lib${apr-util.lib.name}D."

+			/>

+			<contains	string="${apr-util.lib.file}"

+						substring="/${apr-util.lib.name}D."

+			/>

 		</or>

 	</condition>

-	<condition property="apr-util.lib.suffix" value="">

-		<isset property="apr-util.lib.file"/>

+	<condition	property="apr-util.lib.suffix"

+				value="">

+		<isset property="apr-util.lib.file" />

 	</condition>

 

-	<condition property="apr-util.lib.prefix" value="lib">

+	<condition	property="apr-util.lib.prefix"

+				value="lib">

 		<or>

-			<contains string="[${apr-util.lib.file}]" substring="/lib${apr-util.lib.name}.lib]"/>

+			<contains	string="[${apr-util.lib.file}]"

+						substring="/lib${apr-util.lib.name}.lib]"

+			/>

 		</or>

 	</condition>

-	<condition property="apr-util.lib.prefix" value="">

-		<isset property="apr-util.lib.file"/>

+	<condition	property="apr-util.lib.prefix"

+				value="">

+		<isset property="apr-util.lib.file" />

 	</condition>

 

-	<condition property="apr-util.lib.type" value="shared">

+	<condition	property="apr-util.lib.type"

+				value="shared">

 		<or>

-			<contains string="${apr-util.lib.file}]" 

-				substring=".dylib]" 

-				casesensitive="no"/>

-			<contains string="${apr-util.lib.file}]" 

-				substring=".so]" 

-				casesensitive="no"/>

-			<contains string="${apr-util.lib.file}]" 

-				substring=".la]" 

-				casesensitive="no"/>

+			<contains	string="${apr-util.lib.file}]"

+						substring=".dylib]"

+						casesensitive="no"

+			/>

+			<contains	string="${apr-util.lib.file}]"

+						substring=".so]"

+						casesensitive="no"

+			/>

+			<contains	string="${apr-util.lib.file}]"

+						substring=".la]"

+						casesensitive="no"

+			/>

 			<and>

-				<!--   if we have just a .lib, guess based on file size.

-				      Import libs should be much smaller.  -->

-				<contains string="${apr-util.lib.file}]" 

-					substring=".lib]" 

-					casesensitive="no"/>

+				<!--

+					If we have just a .lib, guess based on file size. Import libs should be much

+					smaller.

+				 -->

+				<contains	string="${apr-util.lib.file}]"

+							substring=".lib]"

+							casesensitive="no"

+				/>

 				<isfileselected file="${apr-util.lib.file}">

-					<size value="250000" when="less"/>

+					<size value="250000" when="less" />

 				</isfileselected>

 			</and>

 		</or>

 	</condition>

 

-

-	<condition property="apr-util.lib.type" value="static">

-		<isset property="apr-util.lib.file"/>

+	<condition	property="apr-util.lib.type"

+				value="static">

+		<isset property="apr-util.lib.file" />

 	</condition>

 </target>

 

-<target name="find-apr-util" depends="find-apr-util-lib">

-	<!--   use character ref to prevent directory name from

-	          being changed on global search and replacements -->

-    <condition property="apr-util.include.dir" value="${apr-util.dir}/include/ap&#x72;-1.0">

-        <available file="${apr-util.dir}/include/ap&#x72;-1.0/${apr-util.sample.h}"/>

-    </condition>

-    <condition property="apr-util.include.dir" value="${apr-util.dir}/include/ap&#x72;-1">

-        <available file="${apr-util.dir}/include/ap&#x72;-1/${apr-util.sample.h}"/>

-    </condition>

-    <condition property="apr-util.include.dir" value="${apr-util.dir}/include">

-        <available file="${apr-util.dir}/include/${apr-util.sample.h}"/>

-    </condition>

-    <condition property="apr-util.include.dir" value="${apr-util.dir}/../usr/include/ap&#x72;-1">

-        <available file="${apr-util.dir}/../usr/include/ap&#x72;-1/${apr-util.sample.h}"/>

-    </condition>

-    <condition property="apr-util.include.dir" value="${apr-util.src.dir}/include">

-        <available file="${apr-util.src.dir}/include/${apr-util.sample.h}"/>

-    </condition>

-

-	<condition property="apr-util.dir" value="${apr-util.src.dir}">

-		<isset property="apr-util.src.dir"/>

+<target	name="find-apr-util"

+		depends="find-apr-util-lib">

+	<!--

+		Use character ref to prevent directory name from being changed on global search and

+		replacements.

+	 -->

+	<condition	property="apr-util.include.dir"

+				value="${apr-util.dir}/include/ap&#x72;-1.0">

+		<available file="${apr-util.dir}/include/ap&#x72;-1.0/${apr-util.sample.h}" />

+	</condition>

+	<condition	property="apr-util.include.dir"

+				value="${apr-util.dir}/include/ap&#x72;-1">

+		<available file="${apr-util.dir}/include/ap&#x72;-1/${apr-util.sample.h}" />

+	</condition>

+	<condition	property="apr-util.include.dir"

+				value="${apr-util.dir}/include">

+		<available file="${apr-util.dir}/include/${apr-util.sample.h}" />

+	</condition>

+	<condition	property="apr-util.include.dir"

+				value="${apr-util.dir}/../usr/include/ap&#x72;-1">

+		<available file="${apr-util.dir}/../usr/include/ap&#x72;-1/${apr-util.sample.h}" />

+	</condition>

+	<condition	property="apr-util.include.dir"

+				value="${apr-util.src.dir}/include">

+		<available file="${apr-util.src.dir}/include/${apr-util.sample.h}" />

 	</condition>

 

+	<condition	property="apr-util.dir"

+				value="${apr-util.src.dir}">

+		<isset property="apr-util.src.dir" />

+	</condition>

 

 	<echo>apr-util-find:

 apr-util.dir=${apr-util.dir}

@@ -309,5 +365,5 @@
 apr-util.lib.prefix=${apr-util.lib.prefix}

 apr-util.lib.suffix=${apr-util.lib.suffix}

 apr-util.lib.type=${apr-util.lib.type}

-</echo>

+	</echo>

 </target>

diff --git a/src/ant/find-apr.xml b/src/ant/find-apr.xml
index 4561c69..d29d7aa 100644
--- a/src/ant/find-apr.xml
+++ b/src/ant/find-apr.xml
@@ -16,288 +16,345 @@
 

 -->

 

-<target name="find-apr-src" depends="init">

-    <condition property="apr.dir" value="${with-apr}">

-        <available file="${with-apr}"/>

-    </condition>

-	<condition property="apr.src.dir" value="${apr.dir}">

-		<available file="${apr.dir}/${apr.sample.c}"/>

+<target	name="find-apr-src"

+		depends="init">

+	<condition	property="apr.dir"

+				value="${with-apr}">

+		<available file="${with-apr}" />

 	</condition>

-	<condition property="apr.src.dir" value="../apr">

-		<available file="../apr/${apr.sample.c}"/>

+	<condition	property="apr.src.dir"

+				value="${apr.dir}">

+		<available file="${apr.dir}/${apr.sample.c}" />

+	</condition>

+	<condition	property="apr.src.dir"

+				value="../apr">

+		<available file="../apr/${apr.sample.c}" />

 	</condition>

 </target>

 

-

-<target name="find-apr-lib" depends="find-apr-src" unless="force-ant">

-	<condition property="apr.lib.file"

-	     value="${apr.dir}/lib${apr.lib.name}.la">

-	     <available file="${apr.dir}/lib${apr.lib.name}.la"/></condition>

-	<condition property="apr.lib.file"

-	     value="${apr.dir}/lib${apr.lib.name}.dylib">

-	     <available file="${apr.dir}/lib${apr.lib.name}.dylib"/></condition>

-	<condition property="apr.lib.file"

-	     value="${apr.dir}/lib${apr.lib.name}.so">

-	     <available file="${apr.dir}/lib${apr.lib.name}.so"/></condition>

-	<condition property="apr.lib.file"

-	     value="${apr.dir}/lib${apr.lib.name}.a">

-	     <available file="${apr.dir}/lib${apr.lib.name}.a"/></condition>

-	<condition property="apr.lib.file"

-	     value="${apr.dir}/${apr.lib.name}.lib">

-	     <available file="${apr.dir}/${apr.lib.name}.lib"/></condition>

-	<condition property="apr.lib.file.dir" value="${apr.dir}">

-		<isset property="apr.lib.file"/>

+<target	name="find-apr-lib"

+		depends="find-apr-src"

+		unless="force-ant">

+	<condition	property="apr.lib.file"

+				value="${apr.dir}/lib${apr.lib.name}.la">

+		<available file="${apr.dir}/lib${apr.lib.name}.la" />

+	</condition>

+	<condition	property="apr.lib.file"

+				value="${apr.dir}/lib${apr.lib.name}.dylib">

+		<available file="${apr.dir}/lib${apr.lib.name}.dylib" />

+	</condition>

+	<condition	property="apr.lib.file"

+				value="${apr.dir}/lib${apr.lib.name}.so">

+		<available file="${apr.dir}/lib${apr.lib.name}.so" />

+	</condition>

+	<condition	property="apr.lib.file"

+				value="${apr.dir}/lib${apr.lib.name}.a">

+		<available file="${apr.dir}/lib${apr.lib.name}.a" />

+	</condition>

+	<condition	property="apr.lib.file"

+				value="${apr.dir}/${apr.lib.name}.lib">

+		<available file="${apr.dir}/${apr.lib.name}.lib" />

+	</condition>

+	<condition	property="apr.lib.file.dir"

+				value="${apr.dir}">

+		<isset property="apr.lib.file" />

 	</condition>

 

-	<condition property="apr.lib.file"

-	     value="${apr.dir}/.libs/lib${apr.lib.name}.la">

-	     <available file="${apr.dir}/.libs/lib${apr.lib.name}.la"/></condition>

-	<condition property="apr.lib.file"

-	     value="${apr.dir}/.libs/lib${apr.lib.name}.dylib">

-	     <available file="${apr.dir}/.libs/lib${apr.lib.name}.dylib"/></condition>

-	<condition property="apr.lib.file"

-	     value="${apr.dir}/.libs/lib${apr.lib.name}.so">

-	     <available file="${apr.dir}/.libs/lib${apr.lib.name}.so"/></condition>

-	<condition property="apr.lib.file"

-	     value="${apr.dir}/.libs/lib${apr.lib.name}.a">

-	     <available file="${apr.dir}/.libs/lib${apr.lib.name}.a"/></condition>

-	<condition property="apr.lib.file"

-	     value="${apr.dir}/.libs/${apr.lib.name}.lib">

-	     <available file="${apr.dir}/.libs/${apr.lib.name}.lib"/></condition>

-	<condition property="apr.lib.file.dir" value="${apr.dir}/.libs">

-		<isset property="apr.lib.file"/>

+	<condition	property="apr.lib.file"

+				value="${apr.dir}/.libs/lib${apr.lib.name}.la">

+		<available file="${apr.dir}/.libs/lib${apr.lib.name}.la" />

+	</condition>

+	<condition	property="apr.lib.file"

+				value="${apr.dir}/.libs/lib${apr.lib.name}.dylib">

+		<available file="${apr.dir}/.libs/lib${apr.lib.name}.dylib" />

+	</condition>

+	<condition	property="apr.lib.file"

+				value="${apr.dir}/.libs/lib${apr.lib.name}.so">

+		<available file="${apr.dir}/.libs/lib${apr.lib.name}.so" />

+	</condition>

+	<condition	property="apr.lib.file"

+				value="${apr.dir}/.libs/lib${apr.lib.name}.a">

+		<available file="${apr.dir}/.libs/lib${apr.lib.name}.a" />

+	</condition>

+	<condition	property="apr.lib.file"

+				value="${apr.dir}/.libs/${apr.lib.name}.lib">

+		<available file="${apr.dir}/.libs/${apr.lib.name}.lib" />

+	</condition>

+	<condition	property="apr.lib.file.dir"

+				value="${apr.dir}/.libs">

+		<isset property="apr.lib.file" />

 	</condition>

 

-	<!--  start looking at candidates  in /usr -->

-	<condition property="apr.lib.file"

-	     value="/usr/lib/lib${apr.lib.name}.la">

-	     <available file="/usr/lib/lib${apr.lib.name}.la"/></condition>

-	<condition property="apr.lib.file"

-	     value="/usr/lib/lib${apr.lib.name}.dylib">

-	     <available file="/usr/lib/lib${apr.lib.name}.dylib"/></condition>

-	<condition property="apr.lib.file"

-	     value="/usr/lib/lib${apr.lib.name}.so">

-	     <available file="/usr/lib/lib${apr.lib.name}.so"/></condition>

-	<condition property="apr.lib.file"

-	     value="/usr/lib/lib${apr.lib.name}.a">

-	     <available file="/usr/lib/lib${apr.lib.name}.a"/></condition>

-	<condition property="apr.dir" value="/usr">

-		<isset property="apr.lib.file"/>

+	<!-- Start looking at candidates in /usr -->

+	<condition	property="apr.lib.file"

+				value="/usr/lib/lib${apr.lib.name}.la">

+		<available file="/usr/lib/lib${apr.lib.name}.la" />

 	</condition>

-	<condition property="apr.lib.file.dir" value="/usr/lib">

-		<isset property="apr.lib.file"/>

+	<condition	property="apr.lib.file"

+				value="/usr/lib/lib${apr.lib.name}.dylib">

+		<available file="/usr/lib/lib${apr.lib.name}.dylib" />

+	</condition>

+	<condition	property="apr.lib.file"

+				value="/usr/lib/lib${apr.lib.name}.so">

+		<available file="/usr/lib/lib${apr.lib.name}.so" />

+	</condition>

+	<condition	property="apr.lib.file"

+				value="/usr/lib/lib${apr.lib.name}.a">

+		<available file="/usr/lib/lib${apr.lib.name}.a" />

+	</condition>

+	<condition	property="apr.dir" value="/usr">

+		<isset property="apr.lib.file" />

+	</condition>

+	<condition	property="apr.lib.file.dir"

+				value="/usr/lib">

+		<isset property="apr.lib.file" />

 	</condition>

 

 	<!--  start looking at candidates  in /usr/local -->

-	<condition property="apr.lib.file"

-	     value="/usr/local/lib/lib${apr.lib.name}.la">

-	     <available file="/usr/local/lib/lib${apr.lib.name}.la"/></condition>

-	<condition property="apr.lib.file"

-	     value="/usr/local/lib/lib${apr.lib.name}.dylib">

-	     <available file="/usr/local/lib/lib${apr.lib.name}.dylib"/></condition>

-	<condition property="apr.lib.file"

-	     value="/usr/local/lib/lib${apr.lib.name}.so">

-	     <available file="/usr/local/lib/lib${apr.lib.name}.so"/></condition>

-	<condition property="apr.lib.file"

-	     value="/usr/local/lib/lib${apr.lib.name}.a">

-	     <available file="/usr/local/lib/lib${apr.lib.name}.a"/></condition>

-	<condition property="apr.dir" value="/usr/local">

-		<isset property="apr.lib.file"/>

+	<condition	property="apr.lib.file"

+				value="/usr/local/lib/lib${apr.lib.name}.la">

+		<available file="/usr/local/lib/lib${apr.lib.name}.la" />

 	</condition>

-	<condition property="apr.lib.file.dir" value="/usr/local/lib">

-		<isset property="apr.lib.file"/>

+	<condition	property="apr.lib.file"

+				value="/usr/local/lib/lib${apr.lib.name}.dylib">

+		<available file="/usr/local/lib/lib${apr.lib.name}.dylib" />

+	</condition>

+	<condition	property="apr.lib.file"

+				value="/usr/local/lib/lib${apr.lib.name}.so">

+		<available file="/usr/local/lib/lib${apr.lib.name}.so" />

+	</condition>

+	<condition	property="apr.lib.file"

+				value="/usr/local/lib/lib${apr.lib.name}.a">

+		<available file="/usr/local/lib/lib${apr.lib.name}.a" />

+	</condition>

+	<condition	property="apr.dir"

+				value="/usr/local">

+		<isset property="apr.lib.file" />

+	</condition>

+	<condition	property="apr.lib.file.dir"

+				value="/usr/local/lib">

+		<isset property="apr.lib.file" />

 	</condition>

 

-

-    <property name="relative-apr" location="../apr"/>

-    <condition property="apr.dir" value="${relative-apr}">

-        <available file="${relative-apr}"/>

-    </condition>

-	<condition property="apr.lib.file"

-	     value="${apr.dir}/lib${apr.lib.name}.la">

-	     <available file="${apr.dir}/lib${apr.lib.name}.la"/></condition>

-	<condition property="apr.lib.file"

-	     value="${apr.dir}/lib${apr.lib.name}.dylib">

-	     <available file="${apr.dir}/lib${apr.lib.name}.dylib"/></condition>

-	<condition property="apr.lib.file"

-	     value="${apr.dir}/lib${apr.lib.name}.so">

-	     <available file="${apr.dir}/lib${apr.lib.name}.so"/></condition>

-	<condition property="apr.lib.file"

-	     value="${apr.dir}/lib${apr.lib.name}.a">

-	     <available file="${apr.dir}/lib${apr.lib.name}.a"/></condition>

-	<condition property="apr.lib.file"

-	     value="${apr.dir}/${apr.lib.name}.lib">

-	     <available file="${apr.dir}/${apr.lib.name}.lib"/></condition>

-	<condition property="apr.lib.file.dir" value="${apr.dir}">

-		<isset property="apr.lib.file"/>

+	<property	name="relative-apr"

+				location="../apr"

+	/>

+	<condition	property="apr.dir"

+				value="${relative-apr}">

+		<available file="${relative-apr}" />

+	</condition>

+	<condition	property="apr.lib.file"

+				value="${apr.dir}/lib${apr.lib.name}.la">

+		<available file="${apr.dir}/lib${apr.lib.name}.la" />

+	</condition>

+	<condition	property="apr.lib.file"

+				value="${apr.dir}/lib${apr.lib.name}.dylib">

+		<available file="${apr.dir}/lib${apr.lib.name}.dylib" />

+	</condition>

+	<condition	property="apr.lib.file"

+				value="${apr.dir}/lib${apr.lib.name}.so">

+		<available file="${apr.dir}/lib${apr.lib.name}.so" />

+	</condition>

+	<condition	property="apr.lib.file"

+				value="${apr.dir}/lib${apr.lib.name}.a">

+		<available file="${apr.dir}/lib${apr.lib.name}.a" />

+	</condition>

+	<condition	property="apr.lib.file"

+				value="${apr.dir}/${apr.lib.name}.lib">

+		<available file="${apr.dir}/${apr.lib.name}.lib" />

+	</condition>

+	<condition	property="apr.lib.file.dir" value="${apr.dir}">

+		<isset property="apr.lib.file" />

 	</condition>

 

-	<condition property="apr.lib.file"

-	     value="${apr.dir}/.libs/lib${apr.lib.name}.la">

-	     <available file="${apr.dir}/.libs/lib${apr.lib.name}.la"/></condition>

-	<condition property="apr.lib.file"

-	     value="${apr.dir}/.libs/lib${apr.lib.name}.dylib">

-	     <available file="${apr.dir}/.libs/lib${apr.lib.name}.dylib"/></condition>

-	<condition property="apr.lib.file"

-	     value="${apr.dir}/.libs/lib${apr.lib.name}.so">

-	     <available file="${apr.dir}/.libs/lib${apr.lib.name}.so"/></condition>

-	<condition property="apr.lib.file"

-	     value="${apr.dir}/.libs/lib${apr.lib.name}.a">

-	     <available file="${apr.dir}/.libs/lib${apr.lib.name}.a"/></condition>

-	<condition property="apr.lib.file.dir" value="${apr.dir}/.libs">

-		<isset property="apr.lib.file"/>

+	<condition	property="apr.lib.file"

+				value="${apr.dir}/.libs/lib${apr.lib.name}.la">

+		<available file="${apr.dir}/.libs/lib${apr.lib.name}.la" />

 	</condition>

-    <fail unless="apr.dir">Unable to locate apr base directory.</fail>

-    

+	<condition	property="apr.lib.file"

+				value="${apr.dir}/.libs/lib${apr.lib.name}.dylib">

+		<available file="${apr.dir}/.libs/lib${apr.lib.name}.dylib" />

+	</condition>

+	<condition	property="apr.lib.file"

+				value="${apr.dir}/.libs/lib${apr.lib.name}.so">

+		<available file="${apr.dir}/.libs/lib${apr.lib.name}.so" />

+	</condition>

+	<condition	property="apr.lib.file"

+				value="${apr.dir}/.libs/lib${apr.lib.name}.a">

+		<available file="${apr.dir}/.libs/lib${apr.lib.name}.a" />

+	</condition>

+	<condition	property="apr.lib.file.dir" value="${apr.dir}/.libs">

+		<isset property="apr.lib.file" />

+	</condition>

+	<fail unless="apr.dir">Unable to locate apr base directory.</fail>

 

-

-

-	<!--   Static debug libraries in APR's VC6 projects typical location (ignored unless debug build)   -->

-	<condition property="apr.lib.file"

-		value="${apr.dir}/LibD/${apr.lib.name}.lib">

+	<!-- Static debug libraries in APR's VC6 projects typical location (ignored unless debug build) -->

+	<condition	property="apr.lib.file"

+				value="${apr.dir}/LibD/${apr.lib.name}.lib">

 		<and>

-			<isset property="is-debug"/>

-			<available file="${apr.dir}/LibD/${apr.lib.name}.lib"/>

+			<isset property="is-debug" />

+			<available file="${apr.dir}/LibD/${apr.lib.name}.lib" />

 		</and>

 	</condition>

-	<condition property="apr.lib.file.dir"

-		value="${apr.dir}/LibD">

-			<isset property="apr.lib.file"/>

+	<condition	property="apr.lib.file.dir"

+				value="${apr.dir}/LibD">

+		<isset property="apr.lib.file" />

 	</condition>

 

-

-

-

-	<!--   Shared debug libraries in APR's VC6 projects typical location (ignored unless debug build)   -->

-	<condition property="apr.lib.file"

-		value="${apr.dir}/Debug/lib${apr.lib.name}.lib">

+	<!-- Shared debug libraries in APR's VC6 projects typical location (ignored unless debug build) -->

+	<condition	property="apr.lib.file"

+				value="${apr.dir}/Debug/lib${apr.lib.name}.lib">

 		<and>

-			<isset property="is-debug"/>

-			<available file="${apr.dir}/Debug/lib${apr.lib.name}.lib"/>

+			<isset property="is-debug" />

+			<available file="${apr.dir}/Debug/lib${apr.lib.name}.lib" />

 		</and>

 	</condition>

-	<condition property="apr.lib.file.dir"

-		value="${apr.dir}/Debug">

-			<isset property="apr.lib.file"/>

+	<condition	property="apr.lib.file.dir"

+				value="${apr.dir}/Debug">

+		<isset property="apr.lib.file" />

 	</condition>

 

-

-

-	<!--   Static release libraries in APR's VC6 projects typical location (ignored unless debug build)   -->

-	<condition property="apr.lib.file"

-		value="${apr.dir}/LibR/${apr.lib.name}.lib">

-			<available file="${apr.dir}/LibR/${apr.lib.name}.lib"/>

+	<!-- Static release libraries in APR's VC6 projects typical location (ignored unless debug build) -->

+	<condition	property="apr.lib.file"

+				value="${apr.dir}/LibR/${apr.lib.name}.lib">

+		<available file="${apr.dir}/LibR/${apr.lib.name}.lib" />

 	</condition>

-	<condition property="apr.lib.file.dir"

-		value="${apr.dir}/LibR">

-			<isset property="apr.lib.file"/>

+	<condition	property="apr.lib.file.dir"

+				value="${apr.dir}/LibR">

+		<isset property="apr.lib.file" />

 	</condition>

 

-

-

-

-	<!--   Shared release libraries in APR's VC6 projects typical location   -->

-	<condition property="apr.lib.file"

-		value="${apr.dir}/Release/lib${apr.lib.name}.lib">

-			<available file="${apr.dir}/Release/lib${apr.lib.name}.lib"/>

+	<!-- Shared release libraries in APR's VC6 projects typical location -->

+	<condition	property="apr.lib.file"

+				value="${apr.dir}/Release/lib${apr.lib.name}.lib">

+		<available file="${apr.dir}/Release/lib${apr.lib.name}.lib" />

 	</condition>

-	<condition property="apr.lib.file.dir"

-		value="${apr.dir}/Release">

-			<isset property="apr.lib.file"/>

+	<condition	property="apr.lib.file.dir"

+				value="${apr.dir}/Release">

+		<isset property="apr.lib.file" />

 	</condition>

 

-

-

-	<condition property="apr.lib.dir" value="${apr.lib.file.dir}">

+	<condition	property="apr.lib.dir"

+				value="${apr.lib.file.dir}">

 		<and>

-			<isset property="apr.lib.file.dir"/>

+			<isset property="apr.lib.file.dir" />

 			<not>

 				<or>

 					<!--  default search path -->

-					<equals arg1="${apr.lib.file.dir}" arg2="/usr"/>

+					<equals arg1="${apr.lib.file.dir}" arg2="/usr" />

 				</or>

 			</not>

 		</and>

 	</condition>

 

-	<condition property="apr.lib.suffix" value="d">

+	<condition	property="apr.lib.suffix"

+				value="d">

 		<or>

-			<contains string="${apr.lib.file}" substring="/lib${apr.lib.name}d."/>

-			<contains string="${apr.lib.file}" substring="/${apr.lib.name}d."/>

+			<contains	string="${apr.lib.file}"

+						substring="/lib${apr.lib.name}d."

+			/>

+			<contains	string="${apr.lib.file}"

+						substring="/${apr.lib.name}d."

+			/>

 		</or>

 	</condition>

-	<condition property="apr.lib.suffix" value="D">

+	<condition	property="apr.lib.suffix"

+				value="D">

 		<or>

-			<contains string="${apr.lib.file}" substring="/lib${apr.lib.name}D."/>

-			<contains string="${apr.lib.file}" substring="/${apr.lib.name}D."/>

+			<contains	string="${apr.lib.file}"

+						substring="/lib${apr.lib.name}D."

+			/>

+			<contains	string="${apr.lib.file}"

+						substring="/${apr.lib.name}D."

+			/>

 		</or>

 	</condition>

-	<condition property="apr.lib.suffix" value="">

-		<isset property="apr.lib.file"/>

+	<condition	property="apr.lib.suffix"

+				value="">

+		<isset property="apr.lib.file" />

 	</condition>

 

-	<condition property="apr.lib.prefix" value="lib">

+	<condition	property="apr.lib.prefix"

+				value="lib">

 		<or>

-			<contains string="[${apr.lib.file}]" substring="/lib${apr.lib.name}.lib]"/>

+			<contains	string="[${apr.lib.file}]"

+						substring="/lib${apr.lib.name}.lib]"

+			/>

 		</or>

 	</condition>

-	<condition property="apr.lib.prefix" value="">

-		<isset property="apr.lib.file"/>

+	<condition	property="apr.lib.prefix"

+				value="">

+		<isset property="apr.lib.file" />

 	</condition>

 

-	<condition property="apr.lib.type" value="shared">

+	<condition	property="apr.lib.type"

+				value="shared">

 		<or>

-			<contains string="${apr.lib.file}]" 

-				substring=".dylib]" 

-				casesensitive="no"/>

-			<contains string="${apr.lib.file}]" 

-				substring=".so]" 

-				casesensitive="no"/>

-			<contains string="${apr.lib.file}]" 

-				substring=".la]" 

-				casesensitive="no"/>

+			<contains	string="${apr.lib.file}]"

+						substring=".dylib]"

+						casesensitive="no"

+			/>

+			<contains	string="${apr.lib.file}]"

+						substring=".so]"

+						casesensitive="no"

+			/>

+			<contains	string="${apr.lib.file}]"

+						substring=".la]"

+						casesensitive="no"

+			/>

 			<and>

-				<!--   if we have just a .lib, guess based on file size.

-				      Import libs should be much smaller.  -->

-				<contains string="${apr.lib.file}]" 

-					substring=".lib]" 

-					casesensitive="no"/>

+				<!--

+					If we have just a .lib, guess based on file size. Import libs should be much

+					smaller.

+				 -->

+				<contains	string="${apr.lib.file}]"

+							substring=".lib]"

+							casesensitive="no"

+				/>

 				<isfileselected file="${apr.lib.file}">

-					<size value="250000" when="less"/>

+					<size value="250000" when="less" />

 				</isfileselected>

 			</and>

 		</or>

 	</condition>

 

-

-	<condition property="apr.lib.type" value="static">

-		<isset property="apr.lib.file"/>

+	<condition	property="apr.lib.type"

+				value="static">

+		<isset property="apr.lib.file" />

 	</condition>

 </target>

 

-<target name="find-apr" depends="find-apr-lib">

-	<!--   use character ref to prevent directory name from

-	          being changed on global search and replacements -->

-    <condition property="apr.include.dir" value="${apr.dir}/include/ap&#x72;-1.0">

-        <available file="${apr.dir}/include/ap&#x72;-1.0/${apr.sample.h}"/>

-    </condition>

-    <condition property="apr.include.dir" value="${apr.dir}/include/ap&#x72;-1">

-        <available file="${apr.dir}/include/ap&#x72;-1/${apr.sample.h}"/>

-    </condition>

-    <condition property="apr.include.dir" value="${apr.dir}/include">

-        <available file="${apr.dir}/include/${apr.sample.h}"/>

-    </condition>

-    <condition property="apr.include.dir" value="${apr.dir}/../usr/include/ap&#x72;-1">

-        <available file="${apr.dir}/../usr/include/ap&#x72;-1/${apr.sample.h}"/>

-    </condition>

-    <condition property="apr.include.dir" value="${apr.src.dir}/include">

-        <available file="${apr.src.dir}/include/${apr.sample.h}"/>

-    </condition>

-

-	<condition property="apr.dir" value="${apr.src.dir}">

-		<isset property="apr.src.dir"/>

+<target	name="find-apr"

+		depends="find-apr-lib">

+	<!--

+		Use character ref to prevent directory name from being changed on global search and

+		replacements.

+	 -->

+	<condition	property="apr.include.dir"

+				value="${apr.dir}/include/ap&#x72;-1.0">

+		<available file="${apr.dir}/include/ap&#x72;-1.0/${apr.sample.h}" />

+	</condition>

+	<condition	property="apr.include.dir"

+				value="${apr.dir}/include/ap&#x72;-1">

+		<available file="${apr.dir}/include/ap&#x72;-1/${apr.sample.h}" />

+	</condition>

+	<condition	property="apr.include.dir"

+				value="${apr.dir}/include">

+		<available file="${apr.dir}/include/${apr.sample.h}" />

+	</condition>

+	<condition	property="apr.include.dir"

+				value="${apr.dir}/../usr/include/ap&#x72;-1">

+		<available file="${apr.dir}/../usr/include/ap&#x72;-1/${apr.sample.h}" />

+	</condition>

+	<condition	property="apr.include.dir"

+				value="${apr.src.dir}/include">

+		<available file="${apr.src.dir}/include/${apr.sample.h}" />

 	</condition>

 

+	<condition	property="apr.dir"

+				value="${apr.src.dir}">

+		<isset property="apr.src.dir" />

+	</condition>

 

 	<echo>apr-find:

 apr.dir=${apr.dir}

@@ -309,5 +366,5 @@
 apr.lib.prefix=${apr.lib.prefix}

 apr.lib.suffix=${apr.lib.suffix}

 apr.lib.type=${apr.lib.type}

-</echo>

+	</echo>

 </target>

diff --git a/src/ant/find-libesmtp.xml b/src/ant/find-libesmtp.xml
index 2c516e2..2767658 100644
--- a/src/ant/find-libesmtp.xml
+++ b/src/ant/find-libesmtp.xml
@@ -16,288 +16,338 @@
 

 -->

 

-<target name="find-esmtp-src" depends="init">

-    <condition property="esmtp.dir" value="${with-libesmtp}">

-        <available file="${with-libesmtp}"/>

-    </condition>

-	<condition property="esmtp.src.dir" value="${esmtp.dir}">

-		<available file="${esmtp.dir}/${esmtp.sample.c}"/>

+<target	name="find-esmtp-src"

+		depends="init">

+	<condition	property="esmtp.dir" value="${with-libesmtp}">

+		<available file="${with-libesmtp}" />

 	</condition>

-	<condition property="esmtp.src.dir" value="../libesmtp">

-		<available file="../libesmtp/${esmtp.sample.c}"/>

+	<condition	property="esmtp.src.dir" value="${esmtp.dir}">

+		<available file="${esmtp.dir}/${esmtp.sample.c}" />

+	</condition>

+	<condition	property="esmtp.src.dir" value="../libesmtp">

+		<available file="../libesmtp/${esmtp.sample.c}" />

 	</condition>

 </target>

 

-

-<target name="find-esmtp-lib" depends="find-esmtp-src" if="has-libesmtp" unless="force-ant">

-	<condition property="esmtp.lib.file" 

-	     value="${esmtp.dir}/lib${esmtp.lib.name}.la">

-	     <available file="${esmtp.dir}/lib${esmtp.lib.name}.la"/></condition>

-	<condition property="esmtp.lib.file" 

-	     value="${esmtp.dir}/lib${esmtp.lib.name}.dylib">

-	     <available file="${esmtp.dir}/lib${esmtp.lib.name}.dylib"/></condition>

-	<condition property="esmtp.lib.file" 

-	     value="${esmtp.dir}/lib${esmtp.lib.name}.so">

-	     <available file="${esmtp.dir}/lib${esmtp.lib.name}.so"/></condition>

-	<condition property="esmtp.lib.file" 

-	     value="${esmtp.dir}/lib${esmtp.lib.name}.a">

-	     <available file="${esmtp.dir}/lib${esmtp.lib.name}.a"/></condition>

-	<condition property="esmtp.lib.file" 

-	     value="${esmtp.dir}/${esmtp.lib.name}.lib">

-	     <available file="${esmtp.dir}/${esmtp.lib.name}.lib"/></condition>

-	<condition property="esmtp.lib.file.dir" value="${esmtp.dir}">

-		<isset property="esmtp.lib.file"/>

+<target	name="find-esmtp-lib"

+		depends="find-esmtp-src"

+		if="has-libesmtp"

+		unless="force-ant">

+	<condition	property="esmtp.lib.file"

+				value="${esmtp.dir}/lib${esmtp.lib.name}.la">

+		<available file="${esmtp.dir}/lib${esmtp.lib.name}.la" />

+	</condition>

+	<condition	property="esmtp.lib.file"

+				value="${esmtp.dir}/lib${esmtp.lib.name}.dylib">

+		<available file="${esmtp.dir}/lib${esmtp.lib.name}.dylib" />

+	</condition>

+	<condition	property="esmtp.lib.file"

+				value="${esmtp.dir}/lib${esmtp.lib.name}.so">

+		<available file="${esmtp.dir}/lib${esmtp.lib.name}.so" />

+	</condition>

+	<condition	property="esmtp.lib.file"

+				value="${esmtp.dir}/lib${esmtp.lib.name}.a">

+		<available file="${esmtp.dir}/lib${esmtp.lib.name}.a" />

+	</condition>

+	<condition	property="esmtp.lib.file"

+				value="${esmtp.dir}/${esmtp.lib.name}.lib">

+		<available file="${esmtp.dir}/${esmtp.lib.name}.lib" />

+	</condition>

+	<condition	property="esmtp.lib.file.dir"

+				value="${esmtp.dir}">

+		<isset property="esmtp.lib.file" />

 	</condition>

 

-	<condition property="esmtp.lib.file" 

-	     value="${esmtp.dir}/.libs/lib${esmtp.lib.name}.la">

-	     <available file="${esmtp.dir}/.libs/lib${esmtp.lib.name}.la"/></condition>

-	<condition property="esmtp.lib.file" 

-	     value="${esmtp.dir}/.libs/lib${esmtp.lib.name}.dylib">

-	     <available file="${esmtp.dir}/.libs/lib${esmtp.lib.name}.dylib"/></condition>

-	<condition property="esmtp.lib.file" 

-	     value="${esmtp.dir}/.libs/lib${esmtp.lib.name}.so">

-	     <available file="${esmtp.dir}/.libs/lib${esmtp.lib.name}.so"/></condition>

-	<condition property="esmtp.lib.file" 

-	     value="${esmtp.dir}/.libs/lib${esmtp.lib.name}.a">

-	     <available file="${esmtp.dir}/.libs/lib${esmtp.lib.name}.a"/></condition>

-	<condition property="esmtp.lib.file" 

-	     value="${esmtp.dir}/.libs/${esmtp.lib.name}.lib">

-	     <available file="${esmtp.dir}/.libs/${esmtp.lib.name}.lib"/></condition>

-	<condition property="esmtp.lib.file.dir" value="${esmtp.dir}/.libs">

-		<isset property="esmtp.lib.file"/>

+	<condition	property="esmtp.lib.file"

+				value="${esmtp.dir}/.libs/lib${esmtp.lib.name}.la">

+		<available file="${esmtp.dir}/.libs/lib${esmtp.lib.name}.la" />

+	</condition>

+	<condition	property="esmtp.lib.file"

+				value="${esmtp.dir}/.libs/lib${esmtp.lib.name}.dylib">

+		<available file="${esmtp.dir}/.libs/lib${esmtp.lib.name}.dylib" />

+	</condition>

+	<condition	property="esmtp.lib.file"

+				value="${esmtp.dir}/.libs/lib${esmtp.lib.name}.so">

+		<available file="${esmtp.dir}/.libs/lib${esmtp.lib.name}.so" />

+	</condition>

+	<condition	property="esmtp.lib.file"

+				value="${esmtp.dir}/.libs/lib${esmtp.lib.name}.a">

+		<available file="${esmtp.dir}/.libs/lib${esmtp.lib.name}.a" />

+	</condition>

+	<condition	property="esmtp.lib.file"

+				value="${esmtp.dir}/.libs/${esmtp.lib.name}.lib">

+		<available file="${esmtp.dir}/.libs/${esmtp.lib.name}.lib" />

+	</condition>

+	<condition	property="esmtp.lib.file.dir" value="${esmtp.dir}/.libs">

+		<isset property="esmtp.lib.file" />

 	</condition>

 

-	<!--  start looking at candidates  in /usr -->

-	<condition property="esmtp.lib.file" 

-	     value="/usr/lib/lib${esmtp.lib.name}.la">

-	     <available file="/usr/lib/lib${esmtp.lib.name}.la"/></condition>

-	<condition property="esmtp.lib.file" 

-	     value="/usr/lib/lib${esmtp.lib.name}.dylib">

-	     <available file="/usr/lib/lib${esmtp.lib.name}.dylib"/></condition>

-	<condition property="esmtp.lib.file" 

-	     value="/usr/lib/lib${esmtp.lib.name}.so">

-	     <available file="/usr/lib/lib${esmtp.lib.name}.so"/></condition>

-	<condition property="esmtp.lib.file" 

-	     value="/usr/lib/lib${esmtp.lib.name}.a">

-	     <available file="/usr/lib/lib${esmtp.lib.name}.a"/></condition>

-	<condition property="esmtp.dir" value="/usr">

-		<isset property="esmtp.lib.file"/>

+	<!-- Start looking at candidates in /usr -->

+	<condition	property="esmtp.lib.file"

+				value="/usr/lib/lib${esmtp.lib.name}.la">

+		<available file="/usr/lib/lib${esmtp.lib.name}.la" />

 	</condition>

-	<condition property="esmtp.lib.file.dir" value="/usr/lib">

-		<isset property="esmtp.lib.file"/>

+	<condition	property="esmtp.lib.file"

+				value="/usr/lib/lib${esmtp.lib.name}.dylib">

+		<available file="/usr/lib/lib${esmtp.lib.name}.dylib" />

+	</condition>

+	<condition	property="esmtp.lib.file"

+				value="/usr/lib/lib${esmtp.lib.name}.so">

+		<available file="/usr/lib/lib${esmtp.lib.name}.so" />

+	</condition>

+	<condition	property="esmtp.lib.file"

+				value="/usr/lib/lib${esmtp.lib.name}.a">

+		<available file="/usr/lib/lib${esmtp.lib.name}.a" />

+	</condition>

+	<condition	property="esmtp.dir" value="/usr">

+		<isset property="esmtp.lib.file" />

+	</condition>

+	<condition	property="esmtp.lib.file.dir" value="/usr/lib">

+		<isset property="esmtp.lib.file" />

 	</condition>

 

-	<!--  start looking at candidates  in /usr/local -->

-	<condition property="esmtp.lib.file" 

-	     value="/usr/local/lib/lib${esmtp.lib.name}.la">

-	     <available file="/usr/local/lib/lib${esmtp.lib.name}.la"/></condition>

-	<condition property="esmtp.lib.file" 

-	     value="/usr/local/lib/lib${esmtp.lib.name}.dylib">

-	     <available file="/usr/local/lib/lib${esmtp.lib.name}.dylib"/></condition>

-	<condition property="esmtp.lib.file" 

-	     value="/usr/local/lib/lib${esmtp.lib.name}.so">

-	     <available file="/usr/local/lib/lib${esmtp.lib.name}.so"/></condition>

-	<condition property="esmtp.lib.file" 

-	     value="/usr/local/lib/lib${esmtp.lib.name}.a">

-	     <available file="/usr/local/lib/lib${esmtp.lib.name}.a"/></condition>

-	<condition property="esmtp.dir" value="/usr/local">

-		<isset property="esmtp.lib.file"/>

+	<!-- Start looking at candidates in /usr/local -->

+	<condition	property="esmtp.lib.file"

+				value="/usr/local/lib/lib${esmtp.lib.name}.la">

+		<available file="/usr/local/lib/lib${esmtp.lib.name}.la" />

 	</condition>

-	<condition property="esmtp.lib.file.dir" value="/usr/local/lib">

-		<isset property="esmtp.lib.file"/>

+	<condition	property="esmtp.lib.file"

+				value="/usr/local/lib/lib${esmtp.lib.name}.dylib">

+		<available file="/usr/local/lib/lib${esmtp.lib.name}.dylib" />

+	</condition>

+	<condition	property="esmtp.lib.file"

+				value="/usr/local/lib/lib${esmtp.lib.name}.so">

+		<available file="/usr/local/lib/lib${esmtp.lib.name}.so" />

+	</condition>

+	<condition	property="esmtp.lib.file"

+				value="/usr/local/lib/lib${esmtp.lib.name}.a">

+		<available file="/usr/local/lib/lib${esmtp.lib.name}.a" />

+	</condition>

+	<condition	property="esmtp.dir" value="/usr/local">

+		<isset property="esmtp.lib.file" />

+	</condition>

+	<condition	property="esmtp.lib.file.dir" value="/usr/local/lib">

+		<isset property="esmtp.lib.file" />

 	</condition>

 

-

-    <property name="relative-esmtp" location="../libesmtp"/>

-    <condition property="esmtp.dir" value="${relative-esmtp}">

-        <available file="${relative-esmtp}"/>

-    </condition>

-	<condition property="esmtp.lib.file" 

-	     value="${esmtp.dir}/lib${esmtp.lib.name}.la">

-	     <available file="${esmtp.dir}/lib${esmtp.lib.name}.la"/></condition>

-	<condition property="esmtp.lib.file" 

-	     value="${esmtp.dir}/lib${esmtp.lib.name}.dylib">

-	     <available file="${esmtp.dir}/lib${esmtp.lib.name}.dylib"/></condition>

-	<condition property="esmtp.lib.file" 

-	     value="${esmtp.dir}/lib${esmtp.lib.name}.so">

-	     <available file="${esmtp.dir}/lib${esmtp.lib.name}.so"/></condition>

-	<condition property="esmtp.lib.file" 

-	     value="${esmtp.dir}/lib${esmtp.lib.name}.a">

-	     <available file="${esmtp.dir}/lib${esmtp.lib.name}.a"/></condition>

-	<condition property="esmtp.lib.file" 

-	     value="${esmtp.dir}/${esmtp.lib.name}.lib">

-	     <available file="${esmtp.dir}/${esmtp.lib.name}.lib"/></condition>

-	<condition property="esmtp.lib.file.dir" value="${esmtp.dir}">

-		<isset property="esmtp.lib.file"/>

+	<property	name="relative-esmtp"

+				location="../libesmtp"

+	/>

+	<condition	property="esmtp.dir" value="${relative-esmtp}">

+		<available file="${relative-esmtp}" />

+	</condition>

+	<condition	property="esmtp.lib.file"

+				value="${esmtp.dir}/lib${esmtp.lib.name}.la">

+		<available file="${esmtp.dir}/lib${esmtp.lib.name}.la" />

+	</condition>

+	<condition	property="esmtp.lib.file"

+				value="${esmtp.dir}/lib${esmtp.lib.name}.dylib">

+		<available file="${esmtp.dir}/lib${esmtp.lib.name}.dylib" />

+	</condition>

+	<condition	property="esmtp.lib.file"

+				value="${esmtp.dir}/lib${esmtp.lib.name}.so">

+		<available file="${esmtp.dir}/lib${esmtp.lib.name}.so" />

+	</condition>

+	<condition	property="esmtp.lib.file"

+				value="${esmtp.dir}/lib${esmtp.lib.name}.a">

+		<available file="${esmtp.dir}/lib${esmtp.lib.name}.a" />

+	</condition>

+	<condition	property="esmtp.lib.file"

+				value="${esmtp.dir}/${esmtp.lib.name}.lib">

+		<available file="${esmtp.dir}/${esmtp.lib.name}.lib" />

+	</condition>

+	<condition	property="esmtp.lib.file.dir" value="${esmtp.dir}">

+		<isset property="esmtp.lib.file" />

 	</condition>

 

-	<condition property="esmtp.lib.file" 

-	     value="${esmtp.dir}/.libs/lib${esmtp.lib.name}.la">

-	     <available file="${esmtp.dir}/.libs/lib${esmtp.lib.name}.la"/></condition>

-	<condition property="esmtp.lib.file" 

-	     value="${esmtp.dir}/.libs/lib${esmtp.lib.name}.dylib">

-	     <available file="${esmtp.dir}/.libs/lib${esmtp.lib.name}.dylib"/></condition>

-	<condition property="esmtp.lib.file" 

-	     value="${esmtp.dir}/.libs/lib${esmtp.lib.name}.so">

-	     <available file="${esmtp.dir}/.libs/lib${esmtp.lib.name}.so"/></condition>

-	<condition property="esmtp.lib.file" 

-	     value="${esmtp.dir}/.libs/lib${esmtp.lib.name}.a">

-	     <available file="${esmtp.dir}/.libs/lib${esmtp.lib.name}.a"/></condition>

-	<condition property="esmtp.lib.file.dir" value="${esmtp.dir}/.libs">

-		<isset property="esmtp.lib.file"/>

+	<condition	property="esmtp.lib.file"

+				value="${esmtp.dir}/.libs/lib${esmtp.lib.name}.la">

+		<available file="${esmtp.dir}/.libs/lib${esmtp.lib.name}.la" />

 	</condition>

-    <fail unless="esmtp.dir">Unable to locate esmtp base directory.</fail>

-    

+	<condition	property="esmtp.lib.file"

+				value="${esmtp.dir}/.libs/lib${esmtp.lib.name}.dylib">

+		<available file="${esmtp.dir}/.libs/lib${esmtp.lib.name}.dylib" />

+	</condition>

+	<condition	property="esmtp.lib.file"

+				value="${esmtp.dir}/.libs/lib${esmtp.lib.name}.so">

+		<available file="${esmtp.dir}/.libs/lib${esmtp.lib.name}.so" />

+	</condition>

+	<condition	property="esmtp.lib.file"

+				value="${esmtp.dir}/.libs/lib${esmtp.lib.name}.a">

+		<available file="${esmtp.dir}/.libs/lib${esmtp.lib.name}.a" />

+	</condition>

+	<condition	property="esmtp.lib.file.dir" value="${esmtp.dir}/.libs">

+		<isset property="esmtp.lib.file" />

+	</condition>

+	<fail unless="esmtp.dir">Unable to locate esmtp base directory.</fail>

 

-

-

-	<!--   Static debug libraries in APR's VC6 projects typical location (ignored unless debug build)   -->

-	<condition property="esmtp.lib.file"

-		value="${esmtp.dir}/LibD/${esmtp.lib.name}.lib">

+	<!-- Static debug libraries in APR's VC6 projects typical location (ignored unless debug build) -->

+	<condition	property="esmtp.lib.file"

+				value="${esmtp.dir}/LibD/${esmtp.lib.name}.lib">

 		<and>

-			<isset property="is-debug"/>

-			<available file="${esmtp.dir}/LibD/${esmtp.lib.name}.lib"/>

+			<isset property="is-debug" />

+			<available file="${esmtp.dir}/LibD/${esmtp.lib.name}.lib" />

 		</and>

 	</condition>

-	<condition property="esmtp.lib.file.dir"

-		value="${esmtp.dir}/LibD">

-			<isset property="esmtp.lib.file"/>

+	<condition	property="esmtp.lib.file.dir"

+				value="${esmtp.dir}/LibD">

+		<isset property="esmtp.lib.file" />

 	</condition>

 

-

-

-

-	<!--   Shared debug libraries in APR's VC6 projects typical location (ignored unless debug build)   -->

-	<condition property="esmtp.lib.file"

-		value="${esmtp.dir}/Debug/lib${esmtp.lib.name}.lib">

+	<!-- Shared debug libraries in APR's VC6 projects typical location (ignored unless debug build) -->

+	<condition	property="esmtp.lib.file"

+				value="${esmtp.dir}/Debug/lib${esmtp.lib.name}.lib">

 		<and>

-			<isset property="is-debug"/>

-			<available file="${esmtp.dir}/Debug/lib${esmtp.lib.name}.lib"/>

+			<isset property="is-debug" />

+			<available file="${esmtp.dir}/Debug/lib${esmtp.lib.name}.lib" />

 		</and>

 	</condition>

-	<condition property="esmtp.lib.file.dir"

-		value="${esmtp.dir}/Debug">

-			<isset property="esmtp.lib.file"/>

+	<condition	property="esmtp.lib.file.dir"

+				value="${esmtp.dir}/Debug">

+		<isset property="esmtp.lib.file" />

 	</condition>

 

-

-

-	<!--   Static release libraries in APR's VC6 projects typical location (ignored unless debug build)   -->

-	<condition property="esmtp.lib.file"

-		value="${esmtp.dir}/LibR/${esmtp.lib.name}.lib">

-			<available file="${esmtp.dir}/LibR/${esmtp.lib.name}.lib"/>

+	<!-- Static release libraries in APR's VC6 projects typical location (ignored unless debug build) -->

+	<condition	property="esmtp.lib.file"

+				value="${esmtp.dir}/LibR/${esmtp.lib.name}.lib">

+		<available file="${esmtp.dir}/LibR/${esmtp.lib.name}.lib" />

 	</condition>

-	<condition property="esmtp.lib.file.dir"

-		value="${esmtp.dir}/LibR">

-			<isset property="esmtp.lib.file"/>

+	<condition	property="esmtp.lib.file.dir"

+				value="${esmtp.dir}/LibR">

+		<isset property="esmtp.lib.file" />

 	</condition>

 

-

-

-

-	<!--   Shared release libraries in APR's VC6 projects typical location   -->

-	<condition property="esmtp.lib.file"

-		value="${esmtp.dir}/Release/lib${esmtp.lib.name}.lib">

-			<available file="${esmtp.dir}/Release/lib${esmtp.lib.name}.lib"/>

+	<!-- Shared release libraries in APR's VC6 projects typical location -->

+	<condition	property="esmtp.lib.file"

+				value="${esmtp.dir}/Release/lib${esmtp.lib.name}.lib">

+		<available file="${esmtp.dir}/Release/lib${esmtp.lib.name}.lib" />

 	</condition>

-	<condition property="esmtp.lib.file.dir"

-		value="${esmtp.dir}/Release">

-			<isset property="esmtp.lib.file"/>

+	<condition	property="esmtp.lib.file.dir"

+				value="${esmtp.dir}/Release">

+		<isset property="esmtp.lib.file" />

 	</condition>

 

-

-

-	<condition property="esmtp.lib.dir" value="${esmtp.lib.file.dir}">

+	<condition	property="esmtp.lib.dir"

+				value="${esmtp.lib.file.dir}">

 		<and>

-			<isset property="esmtp.lib.file.dir"/>

+			<isset property="esmtp.lib.file.dir" />

 			<not>

 				<or>

 					<!--  default search path -->

-					<equals arg1="${esmtp.lib.file.dir}" arg2="/usr"/>

+					<equals arg1="${esmtp.lib.file.dir}" arg2="/usr" />

 				</or>

 			</not>

 		</and>

 	</condition>

 

-	<condition property="esmtp.lib.suffix" value="d">

+	<condition	property="esmtp.lib.suffix"

+				value="d">

 		<or>

-			<contains string="${esmtp.lib.file}" substring="/lib${esmtp.lib.name}d."/>

-			<contains string="${esmtp.lib.file}" substring="/${esmtp.lib.name}d."/>

+			<contains	string="${esmtp.lib.file}"

+						substring="/lib${esmtp.lib.name}d."

+			/>

+			<contains	string="${esmtp.lib.file}"

+						substring="/${esmtp.lib.name}d."

+			/>

 		</or>

 	</condition>

-	<condition property="esmtp.lib.suffix" value="D">

+	<condition	property="esmtp.lib.suffix"

+				value="D">

 		<or>

-			<contains string="${esmtp.lib.file}" substring="/lib${esmtp.lib.name}D."/>

-			<contains string="${esmtp.lib.file}" substring="/${esmtp.lib.name}D."/>

+			<contains	string="${esmtp.lib.file}"

+						substring="/lib${esmtp.lib.name}D."

+			/>

+			<contains	string="${esmtp.lib.file}"

+						substring="/${esmtp.lib.name}D."

+			/>

 		</or>

 	</condition>

-	<condition property="esmtp.lib.suffix" value="">

-		<isset property="esmtp.lib.file"/>

+	<condition	property="esmtp.lib.suffix"

+				value="">

+		<isset property="esmtp.lib.file" />

 	</condition>

 

-	<condition property="esmtp.lib.prefix" value="lib">

+	<condition	property="esmtp.lib.prefix"

+				value="lib">

 		<or>

-			<contains string="[${esmtp.lib.file}]" substring="/lib${esmtp.lib.name}.lib]"/>

+			<contains	string="[${esmtp.lib.file}]"

+						substring="/lib${esmtp.lib.name}.lib]"

+			/>

 		</or>

 	</condition>

-	<condition property="esmtp.lib.prefix" value="">

-		<isset property="esmtp.lib.file"/>

+	<condition	property="esmtp.lib.prefix"

+				value="">

+		<isset property="esmtp.lib.file" />

 	</condition>

 

-	<condition property="esmtp.lib.type" value="shared">

+	<condition	property="esmtp.lib.type"

+				value="shared">

 		<or>

-			<contains string="${esmtp.lib.file}]" 

-				substring=".dylib]" 

-				casesensitive="no"/>

-			<contains string="${esmtp.lib.file}]" 

-				substring=".so]" 

-				casesensitive="no"/>

-			<contains string="${esmtp.lib.file}]" 

-				substring=".la]" 

-				casesensitive="no"/>

+			<contains	string="${esmtp.lib.file}]"

+						substring=".dylib]"

+						casesensitive="no"

+			/>

+			<contains	string="${esmtp.lib.file}]"

+						substring=".so]"

+						casesensitive="no"

+			/>

+			<contains	string="${esmtp.lib.file}]"

+						substring=".la]"

+						casesensitive="no"

+			/>

 			<and>

-				<!--   if we have just a .lib, guess based on file size.

-				      Import libs should be much smaller.  -->

-				<contains string="${esmtp.lib.file}]" 

-					substring=".lib]" 

-					casesensitive="no"/>

+				<!--

+					If we have just a .lib, guess based on file size. Import libs should be much

+					smaller.

+				 -->

+				<contains	string="${esmtp.lib.file}]"

+							substring=".lib]"

+							casesensitive="no"

+				/>

 				<isfileselected file="${esmtp.lib.file}">

-					<size value="250000" when="less"/>

+					<size value="250000" when="less" />

 				</isfileselected>

 			</and>

 		</or>

 	</condition>

 

-

-	<condition property="esmtp.lib.type" value="static">

-		<isset property="esmtp.lib.file"/>

+	<condition	property="esmtp.lib.type"

+				value="static">

+		<isset property="esmtp.lib.file" />

 	</condition>

 </target>

 

-<target name="find-esmtp" depends="find-esmtp-lib">

-	<!--   use character ref to prevent directory name from

-	          being changed on global search and replacements -->

-    <condition property="esmtp.include.dir" value="${esmtp.dir}/include">

-        <available file="${esmtp.dir}/include/${esmtp.sample.h}"/>

-    </condition>

-    <condition property="esmtp.include.dir" value="${esmtp.dir}">

-        <available file="${esmtp.dir}/${esmtp.sample.h}"/>

-    </condition>

-    <condition property="esmtp.include.dir" value="${esmtp.dir}/../usr/include">

-        <available file="${esmtp.dir}/../usr/include/${esmtp.sample.h}"/>

-    </condition>

-    <condition property="esmtp.include.dir" value="${esmtp.src.dir}/include">

-        <available file="${esmtp.src.dir}/include/${esmtp.sample.h}"/>

-    </condition>

-    <condition property="esmtp.include.dir" value="${esmtp.src.dir}">

-        <available file="${esmtp.src.dir}/include/${esmtp.sample.h}"/>

-    </condition>

-

-	<condition property="esmtp.dir" value="${esmtp.src.dir}">

-		<isset property="esmtp.src.dir"/>

+<target	name="find-esmtp"

+		depends="find-esmtp-lib">

+	<!--

+		Use character ref to prevent directory name from being changed on global search and

+		replacements.

+	 -->

+	<condition	property="esmtp.include.dir"

+				value="${esmtp.dir}/include">

+		<available file="${esmtp.dir}/include/${esmtp.sample.h}" />

+	</condition>

+	<condition	property="esmtp.include.dir"

+				value="${esmtp.dir}">

+		<available file="${esmtp.dir}/${esmtp.sample.h}" />

+	</condition>

+	<condition	property="esmtp.include.dir"

+				value="${esmtp.dir}/../usr/include">

+		<available file="${esmtp.dir}/../usr/include/${esmtp.sample.h}" />

+	</condition>

+	<condition	property="esmtp.include.dir"

+				value="${esmtp.src.dir}/include">

+		<available file="${esmtp.src.dir}/include/${esmtp.sample.h}" />

+	</condition>

+	<condition	property="esmtp.include.dir"

+				value="${esmtp.src.dir}">

+		<available file="${esmtp.src.dir}/include/${esmtp.sample.h}" />

 	</condition>

 

+	<condition	property="esmtp.dir"

+				value="${esmtp.src.dir}">

+		<isset property="esmtp.src.dir" />

+	</condition>

 

 	<echo>esmtp-find:

 esmtp.dir=${esmtp.dir}

@@ -309,5 +359,5 @@
 esmtp.lib.prefix=${esmtp.lib.prefix}

 esmtp.lib.suffix=${esmtp.lib.suffix}

 esmtp.lib.type=${esmtp.lib.type}

-</echo>

+	</echo>

 </target>
\ No newline at end of file
diff --git a/src/assembly/source.xml b/src/assembly/source.xml
index 8c551ad..063d336 100644
--- a/src/assembly/source.xml
+++ b/src/assembly/source.xml
@@ -18,82 +18,134 @@
 <assembly>
 	<id>source</id>
 	<formats>
-		<format>zip</format>
 		<format>tar.gz</format>
+		<format>zip</format>
 	</formats>
-	<baseDirectory>apache-log4cxx-${project.version}</baseDirectory>
-	<includeSiteDirectory>true</includeSiteDirectory>
+	<baseDirectory>${project.artifactId}-${project.version}</baseDirectory>
+
 	<fileSets>
-        <!-- autogen.sh is executable -->
+		<!-- Some files need to be executable. -->
 		<fileSet>
 			<includes>
-               <include>autogen.sh</include>
-               <include>configure.bat</include>
-               <include>configure-aprutil.bat</include>
-               <include>configure</include>
-	       <include>install-sh</include>
-               <include>missing</include>
-               <include>ltmain.sh</include>
-	       <include>depcomp</include>
-           </includes>
-            <fileMode>0755</fileMode>
-        </fileSet>
+				<include>ar-lib</include>
+				<include>autogen.sh</include>
+				<include>configure.bat</include>
+				<include>configure-aprutil.bat</include>
+				<include>configure</include>
+				<include>depcomp</include>
+				<include>install-sh</include>
+				<include>ltmain.sh</include>
+				<include>missing</include>
+			</includes>
+
+			<fileMode>0755</fileMode>
+		</fileSet>
+
 		<fileSet>
 			<includes>
+				<include>aclocal.m4</include>
+				<include>build.xml</include>
+				<include>configure.ac</include>
+				<include>config.guess</include>
+				<include>config.sub</include>
 				<include>INSTALL</include>
 				<include>KEYS</include>
+				<include>liblog4cxx.pc.in</include>
 				<include>LICENSE</include>
-               <include>Makefile.am</include>
-				<include>NOTICE</include>
- 				<include>build.xml</include>
-               <include>configure.in</include>
-               <include>find_apr.m4</include>
-               <include>find_apu.m4</include>
-               <include>liblog4cxx.pc.in</include>
-				<include>pom.xml</include>
+				<include>Makefile.am</include>
 				<include>Makefile.in</include>
-                                <include>config.sub</include>
-                                <include>config.guess</include>
-                                <include>aclocal.m4</include>
-                <include>src/**</include>
-            </includes>
-            <excludes>
-                <exclude>src/main/include/log4cxx/log4cxx.h</exclude>
-                <exclude>src/main/include/log4cxx/private/log4cxx_private.h</exclude>
-                <exclude>src/test/cpp/testsuite</exclude>
-                <exclude>src/examples/cpp/console</exclude>
-                <exclude>src/examples/cpp/delayedloop</exclude>
-                <exclude>src/examples/cpp/stream</exclude>
-                <exclude>src/examples/cpp/trivial</exclude>
-                <exclude>**/Makefile</exclude>
-                <exclude>**/*.o</exclude>
-                <exclude>**/*.Po</exclude>
-                <exclude>**/*.lo</exclude>
-                <exclude>**/*.a</exclude>
-                <exclude>**/*.la</exclude>
-                <exclude>**/*.so</exclude>
-                <exclude>**/*.dylib</exclude>
-                <exclude>**/*.dll</exclude>
-                <exclude>**/Doxyfile</exclude>
-                 <exclude>src/test/resources/output/**</exclude>
-                 <exclude>**/.libs/**</exclude>
-                 <exclude>**/.deps/**</exclude>
-                 <exclude>**/.svn</exclude>
+				<include>NOTICE</include>
+				<include>pom.xml</include>
+				<include>src/**</include>
+			</includes>
+
+			<excludes>
+				<exclude>src/examples/cpp/console</exclude>
+				<exclude>src/examples/cpp/delayedloop</exclude>
+				<exclude>src/examples/cpp/stream</exclude>
+				<exclude>src/examples/cpp/trivial</exclude>
+				<exclude>src/m4/libtool.m4</exclude>
+				<exclude>src/m4/ltoptions.m4</exclude>
+				<exclude>src/m4/ltsugar.m4</exclude>
+				<exclude>src/m4/ltversion.m4</exclude>
+				<exclude>src/m4/lt~obsolete.m4</exclude>
+				<exclude>src/main/include/log4cxx/log4cxx.h</exclude>
+				<exclude>src/main/include/log4cxx/private/log4cxx_private.h</exclude>
+				<exclude>src/test/cpp/testsuite</exclude>
+				<exclude>src/test/resources/output/**</exclude>
+				<exclude>**/.libs/**</exclude>
+				<exclude>**/.deps/**</exclude>
+				<exclude>**/*.a</exclude>
+				<exclude>**/*.dll</exclude>
+				<exclude>**/*.dylib</exclude>
+				<exclude>**/*.la</exclude>
+				<exclude>**/*.lo</exclude>
+				<exclude>**/*.o</exclude>
+				<exclude>**/*.Po</exclude>
+				<exclude>**/*.so</exclude>
+				<exclude>**/Doxyfile</exclude>
+				<exclude>**/Makefile</exclude>
 			</excludes>
+
+			<fileMode>0644</fileMode>
+			<directoryMode>0755</directoryMode>
 		</fileSet>
-        <fileSet>
-            <directory>target</directory>
-            <lineEnding>keep</lineEnding>
-            <outputDirectory>projects</outputDirectory>
-            <includes>
-                <include>*.dsw</include>
-                <include>*.dsp</include>
-                <include>*.xcodeproj/project.pbxproj</include>
-            </includes>
-            <excludes>
-                <exclude>apr*.ds*</exclude>
-                <exclude>xml.ds*</exclude>
-            </excludes>
-        </fileSet>
+
+		<!-- "includeSiteDirectory" seems to add files with wrong permissions. -->
+		<fileSet>
+			<directory>target</directory>
+			<lineEnding>keep</lineEnding>
+			<outputDirectory>.</outputDirectory>
+
+			<includes>
+				<include>site/**</include>
+			</includes>
+
+			<fileMode>0644</fileMode>
+			<directoryMode>0755</directoryMode>
+		</fileSet>
+
+		<!--
+			Special handling for project files.
+
+			Project files are generated in the target directory and contain relative paths out of that dir
+			into the project's src dir and that of apr. Those relative paths stay valid only if those files
+			are placed in the same hierarchy level in the release archive. If the files are generated in a
+			different level, the placement in the release archive needs to be adopted and vice versa. That's
+			why the release archive structure is not replicated in the target directory, we need to stay
+			with two levels, but that allows us to keep the target dir somewhat clean and provide a logical
+			structure in the release archive.
+		 -->
+		<fileSet>
+			<directory>target/projects</directory>
+			<lineEnding>keep</lineEnding>
+			<outputDirectory>projects/vc6</outputDirectory>
+
+			<includes>
+				<include>*.dsp</include>
+				<include>*.dsw</include>
+			</includes>
+
+			<excludes>
+				<exclude>apr*.ds*</exclude>
+				<exclude>xml.ds*</exclude>
+			</excludes>
+
+			<fileMode>0644</fileMode>
+		</fileSet>
+
+		<fileSet>
+			<directory>target/projects</directory>
+			<lineEnding>keep</lineEnding>
+			<outputDirectory>projects/xcode</outputDirectory>
+
+			<includes>
+				<include>*.xcodeproj/project.pbxproj</include>
+			</includes>
+
+			<fileMode>0644</fileMode>
+			<directoryMode>0755</directoryMode>
+		</fileSet>
 	</fileSets>
 </assembly>
+
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index 7faa62b..3f8591b 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -16,379 +16,435 @@
  See the License for the specific language governing permissions and
  limitations under the License.
 
-  -->
+-->
 <document>
-<properties>
-<title>Apache log4cxx</title>
-</properties>
-<body>
-<release version="0.10.0" date="2008-04-03" description="First Apache release">
-<action issue="LOGCXX-2">logger.h includes config.h</action>
-<action issue="LOGCXX-3">Missing #else</action>
-<action issue="LOGCXX-4">initialization not working on many OS's</action>
-<action issue="LOGCXX-5">Preprocessor macro WIN32 used instead of _WIN32</action>
-<action issue="LOGCXX-6">Win32 OutputDebugString</action>
-<action issue="LOGCXX-7">SocketAppender binary format not compatible with Chainsaw</action>
-<action issue="LOGCXX-8">Compilation problems using VC5 or VC6 with later Platform SDKs</action>
-<action issue="LOGCXX-10">Conflicting definitions of tchar.h/simulatenous Unicode+MBCS</action>
-<action issue="LOGCXX-11">Timezone may have side-effects</action>
-<action issue="LOGCXX-12">the threshold  of ApenderSkeleton can not be set by calling setOption.</action>
-<action issue="LOGCXX-13">Add branch optimization hint to LOG4CXX_DEBUG macro</action>
-<action issue="LOGCXX-14">add -Wall to compile log4cxx will get many warning</action>
-<action issue="LOGCXX-15">PatternLayout don't use locale time zone,it's use GMT tome zone</action>
-<action issue="LOGCXX-16">Misleading statements in Introduction to log4cxx</action>
-<action issue="LOGCXX-17">Use of non reentrant time functions</action>
-<action issue="LOGCXX-18">LoggerStream Feature</action>
-<action issue="LOGCXX-19">Add .cvsignore's to ignore generated files</action>
-<action issue="LOGCXX-21">Add check that libxml2 not libxml has been included</action>
-<action issue="LOGCXX-22">Backslashes in filenames in XML config of FileAppender broken</action>
-<action issue="LOGCXX-23">Unit tests have become stale</action>
-<action issue="LOGCXX-24">Class and module name not available in LogEvent</action>
-<action issue="LOGCXX-25">Add Ant+cpptasks build file</action>
-<action issue="LOGCXX-26">Default initialization is broken</action>
-<action issue="LOGCXX-27">Appender threshold cannot be set in configuration files</action>
-<action issue="LOGCXX-28">Appender threshold cannot be set in configuration files</action>
-<action issue="LOGCXX-29">Appender attributes are not passed passed to setOption correctly.</action>
-<action issue="LOGCXX-30">StringTokenizer uses evil strtok and wcstok functions</action>
-<action issue="LOGCXX-31">Missing const qualifiers, Exception::getMessage() in particular.</action>
-<action issue="LOGCXX-32">Missing copy constructors and assignment operators</action>
-<action issue="LOGCXX-33">log4cxx::Exception is not derived from std::exception</action>
-<action issue="LOGCXX-34">Visual Studio 6 CVS build broken</action>
-<action issue="LOGCXX-35">Avoid use of MSXML</action>
-<action issue="LOGCXX-36">Migrate to Apache Portable Runtime threads</action>
-<action issue="LOGCXX-37">Unable to build log4cxx under Borland C++</action>
-<action issue="LOGCXX-39">Remove DailyRollingFileAppender</action>
-<action issue="LOGCXX-40">PatternLayout does not support Java date format specifiers</action>
-<action issue="LOGCXX-41">Layout timestamp doesn't seem to adjust for daylight saving</action>
-<action issue="LOGCXX-43">configure/make help needed</action>
-<action issue="LOGCXX-44">GUMP integation</action>
-<action issue="LOGCXX-45">_T causes error : 1048576 cannot be used as a function</action>
-<action issue="LOGCXX-46">Extra semicolon after namespace closing paren</action>
-<action issue="LOGCXX-47">Check headers for missing declarations and Effective C++ violations</action>
-<action issue="LOGCXX-48">Use hex representation for thread identifier</action>
-<action issue="LOGCXX-49">Move timezone specification into pattern, remove locale specification</action>
-<action issue="LOGCXX-50">variable name clash in macro</action>
-<action issue="LOGCXX-52">Migrate log4j 1.3 RollingFileAppender</action>
-<action issue="LOGCXX-53">Problems compiling with MsDev 6.0 (space in paths)</action>
-<action issue="LOGCXX-54">Eliminate use of boost-regex in unit tests</action>
-<action issue="LOGCXX-55">DailyRolling File Appender</action>
-<action issue="LOGCXX-56">BasicConfiguration is unreliable</action>
-<action issue="LOGCXX-57">Port log4j performance test</action>
-<action issue="LOGCXX-58">ImmediateFlush'd FileAppenders extremely slow on Windows</action>
-<action issue="LOGCXX-59">Implement encoding support for Writer appender</action>
-<action issue="LOGCXX-60">XML layout can be mismatched with document encoding</action>
-<action issue="LOGCXX-62">log4cxx 0.10.0 release</action>
-<action issue="LOGCXX-63">Platform appropriate line-feed convention</action>
-<action issue="LOGCXX-64">Migrate to APR network IO</action>
-<action issue="LOGCXX-66">SyslogAppender append method currently stubbed out</action>
-<action issue="LOGCXX-67">NTEventLogAppender always uses RPC method for logging and has inadequate error handling.</action>
-<action issue="LOGCXX-70">Logic flaws in StringHelper::startsWith and StringHelper::endsWith</action>
-<action issue="LOGCXX-71">Update performance page on web site</action>
-<action issue="LOGCXX-72">INSTALL out of date</action>
-<action issue="LOGCXX-73">Not loading configuration from log4cxx.properties or log4cxx.xml</action>
-<action issue="LOGCXX-74">MinGW build</action>
-<action issue="LOGCXX-75">Cygwin build</action>
-<action issue="LOGCXX-76">user.home, user.dir, java.io.tmpdir available within configuration files</action>
-<action issue="LOGCXX-77">Static builds broken</action>
-<action issue="LOGCXX-79">configure check for apr-util</action>
-<action issue="LOGCXX-80">Migrated network appenders to APR network IO</action>
-<action issue="LOGCXX-81">SimpleDateFormat does not compile on Solaris 2.95.2 gcc</action>
-<action issue="LOGCXX-82">Compiling with stream.h in multiple object files errors</action>
-<action issue="LOGCXX-83">log4cxx::Level::ERROR fails to compile when GDI enabled</action>
-<action issue="LOGCXX-84">Problems with stream logging in UTF8, no WCHAR_T build</action>
-<action issue="LOGCXX-85">Mac OS/X fixes and enhancements</action>
-<action issue="LOGCXX-86">Add TRACE level</action>
-<action issue="LOGCXX-87">Remove remaining uses of Category and Priority</action>
-<action issue="LOGCXX-88">Explore use of security-enhanced CRT methods</action>
-<action issue="LOGCXX-94">simplesocketserver.cpp should use LOG4CXX_STR("...") not L"..."</action>
-<action issue="LOGCXX-98">Gump build fails for log4cxx-ant-no-wchar-t target</action>
-<action issue="LOGCXX-100">Fixes for ODBCAppender</action>
-<action issue="LOGCXX-103">Much of CVS HEAD seems #if 0 out, especially ResourceBundle stuff</action>
-<action issue="LOGCXX-104">ODBCAppender::close does not check if appender is already closed</action>
-<action issue="LOGCXX-105">Infinite loop in string replacing</action>
-<action issue="LOGCXX-106">maxFileSize has bad type in SizeBasedTriggeringPolicy file</action>
-<action issue="LOGCXX-107">Can't compile log4cxx in ascii on Windows</action>
-<action issue="LOGCXX-110">try fix 64bit log4cxx_intptr_t</action>
-<action issue="LOGCXX-111">make Logger cache a LoggerRepositoryPtr instead of a "blind" pointer</action>
-<action issue="LOGCXX-112">change "static" to "auto" for Transcoder::decode() decoder and CharsetDecoder::getDefaultDecoder() decoder</action>
-<action issue="LOGCXX-113">separate apr detection m4 codes from aclocal.m4</action>
-<action issue="LOGCXX-114">Upgrade APR to 1.2.2 from 1.1.0</action>
-<action issue="LOGCXX-115">SVN head does not compile with Borland C++ compiler</action>
-<action issue="LOGCXX-116">SVN head does not compiler with MinGW compiler</action>
-<action issue="LOGCXX-117">Memory leak with ThreadSpecificData on Win32</action>
-<action issue="LOGCXX-118">Hierarchy corrupts with PropertyConfigurator</action>
-<action issue="LOGCXX-119">ndctestcase not working</action>
-<action issue="LOGCXX-120">Wrong parameter description in Patternlayout</action>
-<action issue="LOGCXX-123">UTF-8 build fails on Linux</action>
-<action issue="LOGCXX-124">wchar_t constructor missing in class NDC</action>
-<action issue="LOGCXX-125">L7dTestCase is stubbed out</action>
-<action issue="LOGCXX-126">std::cout stops working if log4cxx is first to output</action>
-<action issue="LOGCXX-127">Main build.xml not referencing "env" properly.</action>
-<action issue="LOGCXX-129">Asyncappender is full of race conditions (improper use of condition variables)</action>
-<action issue="LOGCXX-130">Compile fails on gcc4.1</action>
-<action issue="LOGCXX-131">TimeBasedRollingPolicy is declared "abstract"</action>
-<action issue="LOGCXX-132">various segmentation faults in multithreaded application</action>
-<action issue="LOGCXX-133">Missing parenthesis in LOG4CXX_ASSERT</action>
-<action issue="LOGCXX-134">FileAppender could create missing directories</action>
-<action issue="LOGCXX-135">Use std::string with logstream</action>
-<action issue="LOGCXX-136">DailyRollingFileAppender not using Property options</action>
-<action issue="LOGCXX-138">XMLLayoutTestCase output and filtered output gets overwritten</action>
-<action issue="LOGCXX-139">XMLLayoutTestCase uses inadequate filters for 64 bit platforms</action>
-<action issue="LOGCXX-140">Handle leak with LoggingEvent::getCurrentThreadName</action>
-<action issue="LOGCXX-141">Upgrade to APR 1.2.7 or later</action>
-<action issue="LOGCXX-142">socketservertestcase.cpp does not compile with Sun Studio 11 on Solaris</action>
-<action issue="LOGCXX-143">-xarch=v8plus should be removed from Makefile.in</action>
-<action issue="LOGCXX-146">DailyRollingFileAppender::~DailyRollingFileAppender must call finalize</action>
-<action issue="LOGCXX-149">make dist does not work</action>
-<action issue="LOGCXX-150">logstream's operator&lt;&lt; declared in the wrong namespace</action>
-<action issue="LOGCXX-151">Umlauts as literal in patternlayout won't be logged correct</action>
-<action issue="LOGCXX-152">gcc warning about cast from `const void*' to `log4cxx::helpers::Object*' discards qualifiers from pointer target typ</action>
-<action issue="LOGCXX-153">Automate log4cxx site and doxygen generation and deployment</action>
-<action issue="LOGCXX-155">Update source headers per new ASF header policy</action>
-<action issue="LOGCXX-156">immediate flush in console appender</action>
-<action issue="LOGCXX-157">make install fails since @manual_dest@ replacement is missing in Makefiles</action>
-<action issue="LOGCXX-158">tolower not defined in stringhelper.cpp</action>
-<action issue="LOGCXX-159">Initialization of local static objects out of order on Linux</action>
-<action issue="LOGCXX-160">helpers/object.h: DECLARE_LOG4CXX_OBJECT macro definition is missing virtual destructor declaration</action>
-<action issue="LOGCXX-161">Using RollingFileAppender increases the working set with each rollover</action>
-<action issue="LOGCXX-162">Problem printing string with embedded NULL character</action>
-<action issue="LOGCXX-163">liblog4cxx (svn 480882) does not link on Mac OS X 10.4</action>
-<action issue="LOGCXX-164">XMLSocketAppender is disabled</action>
-<action issue="LOGCXX-165">XMLSocketAppender may generate erroneous output due to mismatched encoding</action>
-<action issue="LOGCXX-167">system locale charmap is not determined properly on Fedora Core 6</action>
-<action issue="LOGCXX-168">log4j.dtd does not contain rollingPolicy and other o.a.l.r.RFA elements</action>
-<action issue="LOGCXX-169">XMLLayoutTestCase fails on compilers that do not provide location info</action>
-<action issue="LOGCXX-171">Add project description file for projects.apache.org</action>
-<action issue="LOGCXX-172">configure fail with ".infig.status: error: cannot find input file:"</action>
-<action issue="LOGCXX-175">APRCharsetEncoder is not thread safe</action>
-<action issue="LOGCXX-177">SocketImpl::accept uses private APR function: apr_wait_for_io_or_timeout</action>
-<action issue="LOGCXX-178">Link failure if wchar_t cannot be determined as UTF-16 or UTF-32</action>
-<action issue="LOGCXX-179">example applications do SIGABRT on aix 5.2</action>
-<action issue="LOGCXX-180">Build fails at domconfigurator.h</action>
-<action issue="LOGCXX-181">Level::DEBUG and other non-local statics cause crash on app shutdown on AIX</action>
-<action issue="LOGCXX-182">missing man page for simplesocketserver</action>
-<action issue="LOGCXX-183">Compiler warning: dereferencing type-punned pointer will break strict-aliasing rules</action>
-<action issue="LOGCXX-184">Crash when log level set to 'inherited'</action>
-<action issue="LOGCXX-186">Garbage characters in log files when log requests from multiple threads with hyperthreading enabled</action>
-<action issue="LOGCXX-187">LogLog::emit() could potentially interleave messages</action>
-<action issue="LOGCXX-188">Upgrade to apr 1.2.9 and apr-util 1.2.8</action>
-<action issue="LOGCXX-189">Migrate to Maven 2.0 for documentation and packaging</action>
-<action issue="LOGCXX-190">The 'logger.h' header includes itself.</action>
-<action issue="LOGCXX-191">Application cores when syslog appender is given an unreachable host/ip.</action>
-<action issue="LOGCXX-192">Suggested improvements to log4cxx webpages</action>
-<action issue="LOGCXX-193">Please rename or remove new local variable "buf" in Logger.h macros</action>
-<action issue="LOGCXX-194">Garbage in log files when appenders are defined in multiple levels of the logger hierarchy</action>
-<action issue="LOGCXX-195">Syslog appender adds characters to output.</action>
-<action issue="LOGCXX-196">Syslog appender destructor can cause core</action>
-<action issue="LOGCXX-197">ant can't generate vc6 project</action>
-<action issue="LOGCXX-200">Implement compression for RollingFileAppender</action>
-<action issue="LOGCXX-201">Visual Studio 6 build</action>
-<action issue="LOGCXX-202">ObjectPtrT has inconsistent const-ness on accessors</action>
-<action issue="LOGCXX-204">PatternParserTestCase and FileNamePatternTestCase fail only with VC6</action>
-<action issue="LOGCXX-208">isTraceEnabled implemenation missing in logger.cpp (Revision: 592627)</action>
-<action issue="LOGCXX-209">A  message of type wchar_t* is not beeing written correctly to the internal message buffer (Revision: 592627)</action>
-<action issue="LOGCXX-210">HTMLLayout NDC null check</action>
-<action issue="LOGCXX-211">Crash(Segmentation Fault) in DailyRollingFileAppender when file change</action>
-<action issue="LOGCXX-212">unittest failed</action>
-<action issue="LOGCXX-213">trace method implementation is missing</action>
-<action issue="LOGCXX-214">Possible memory leak due to fault in build process (via make)</action>
-<action issue="LOGCXX-215">Eliminate sqlext.h from odbcappender.h</action>
-<action issue="LOGCXX-216">crash on program exit</action>
-<action issue="LOGCXX-217">Not initialized LoggerPtr segfault program.</action>
-<action issue="LOGCXX-218">Visual Studio 8 build</action>
-<action issue="LOGCXX-219">suspicious warnings</action>
-<action issue="LOGCXX-220">Memory leaks when using MFC</action>
-<action issue="LOGCXX-221">ThreadID layout does not match debugger</action>
-<action issue="LOGCXX-222">trunk compile error.</action>
-<action issue="LOGCXX-225">Migrate unit tests from LGPL'd CPPUNIT to an ASL'd testing framework</action>
-<action issue="LOGCXX-226">Default configurator uses *.properties in preference to *.xml</action>
-<action issue="LOGCXX-227">Remove @since tags</action>
-<action issue="LOGCXX-228">Remove @author tags</action>
-<action issue="LOGCXX-230">Align ant build options with automake</action>
-<action issue="LOGCXX-231">Deadlock in AsyncAppender</action>
-<action issue="LOGCXX-232">Drop src/performance</action>
-<action issue="LOGCXX-233">Unnecessary casts in ObjectPtrT</action>
-<action issue="LOGCXX-234">Assignment operator removes const qualifier</action>
-<action issue="LOGCXX-235">Add ObjectPtrT::exchange</action>
-<action issue="LOGCXX-236">Re-order constructor initialiser lists to match declaration order</action>
-<action issue="LOGCXX-237">Include missing headers</action>
-<action issue="LOGCXX-239">Inconsistent const qualification on logging methods.</action>
-<action issue="LOGCXX-241">Non-ascii named files have names mangled</action>
-<action issue="LOGCXX-242">Eliminate log4cxx proxies for APR types</action>
-<action issue="LOGCXX-243">Problem Compile in Doxy</action>
-<action issue="LOGCXX-246">Config refresh hangs a client application that uses TelnetAppender</action>
-<action issue="LOGCXX-247">MSVC project has wrong additional include directories</action>
-<action issue="LOGCXX-248">ODBCAppender has unicode issues</action>
-<action issue="LOGCXX-251">NDC::cloneStack and NDC::inherit missing in 0.10.0 RC2</action>
-<action issue="LOGCXX-252">Add documentation for use of operator&lt;&lt; in logging requests</action>
-<action issue="LOGCXX-253">Transcoder compilation error with utf-8 charset</action>
-<action issue="LOGCXX-254">Add build option for static C RTL</action>
-<action issue="LOGCXX-256">SocketHubAppender fails after accepting connection</action>
-<action issue="LOGCXX-257">ServerSocket::accept hangs on Unix</action>
-<action issue="LOGCXX-258">unable to build from make dist package due to missing doxygen file</action>
-<action issue="LOGCXX-259">Several appenders fail to compile in Visual Studio 2008</action>
-</release>
-<release version="0.9.7" date="2004-05-10">
-<action type="fix">Fixed examples source code in the "Short introduction to log4cxx".</action>
-<action type="fix">Fixed, in the renaming algorithm of RollingFileAppender and
-  DailyRollingFileAppender, a problem specific to Unicode.</action>
-<action type="fix">Fixed conflict with Windows macros "min" and "max", by renaming
-  StrictMath::min and StrictMath::max to StrictMath::minimum and
-  StrictMath::maximum.</action>
-<action type="add">Port to HPUX 11.0.</action>
-<action type="fix">Fixed segmentation fault in PropertyConfigurator.</action>
-<action type="add">Port to Solaris.</action>
-<action type="fix">Fixed MutexException thrown while destroying RollingFileAppender.</action>
-<action type="fix">Logging macros can be used without explicity declaring the use of log4cxx namespace.</action>
-<action type="fix">Fixed static library unresolved externals for msvc 6 and 7.1</action>
-</release>
-<release version="0.9.6" date="2004-04-11">
-<action>Timezone management has been optimized through the class TimeZone</action>
-<action>Inter-thread synchronization and reference counting has been optimized</action>
-<action>Reference counting now uses gcc atomic functions (bug 929078)</action>
-<action>Use of StringBuffer has been optimized.</action>
-<action>Support of localisation throug resourceBundles</action>
-<action>SyslogAppender now uses the system function 'syslog' to log on the local host.
- (only for POSIX systems)</action>
-<action>Added TimeZone configuration to PatternLayout (bug 912563)</action>
-<action>Support of the DailyRollingFileAppender (feature request 842765)</action>
-</release>
-<release version="0.9.5" date="2004-02-04">
-<action>Port of log4j Jnuit tests with Cppunit and Boost Regex.</action>
-<action>Added explicit exports for MSDEV 6 and MSDEV 7 (no further need of .def files)</action>
-<action>Custom levels can be configured through the DOMConfigurator and
-  PropertyConfigurator classes (Level inherites from Object)</action>
-<action>Added a reference counter to LoggingEvent to avoid useless copies
-  (LoggingEvent inherites from Object)</action>
-<action>The file log4j.xml as well as the file log4j.properties are now search
-  for, in log4cxx initialization.</action>
-<action>The root logger can be assigned the "OFF" level.</action>
-<action>Added MSVC6 project missing files mutext.cpp and condition.cpp (bug 847397)</action>
-<action>condition.cpp now compiles with MSVC6 (bug 847417)</action>
-<action>fixed pure virtual function call in PropertyConfigurator::configureAndWatch
-  (bug 848521)</action>
-<action>XMLAppender now displays correct timestamp with MSVC 6 (bug 852836)</action>
-<action>SRLPORT 4.6 support.</action>
-<action>Fixed an infinite loop in class Properties.</action>
-<action>Fixed compilations problems with unicode.</action>
-<action>Fixed SocketAppender bug concerning MDC and NDC.</action>
-</release>
-<release version="0.9.4" date="2003-10-25">
-<action>StringBuffer has been optimized.</action>
-<action>Fixed miscellaneous threading problems.</action>
-<action>Added TimeZone support in PatternLayout (bug 796894)</action>
-<action>Fixed threading configuration problems (bug 809125)</action>
-<action>Fixed miscellaneous MSVC and cygwin compilation problems.</action>
-</release>
-<release version="0.9.3" date="2003-09-19">
-<action>Changed tstring to log4cxx::String and tostringstream to
-  log4cxx::StringBuffer.
-</action>
-<action>Fixed MSVC 2003 compilation erros and warnings.
-</action>
-<action>Added helpers for NDC and MDC.
-</action>
-<action>Added TimeZone support in TTCCLayout.
-</action>
-<action>Fixed compilation problems with logger macros (LOG4CXX_...)
-</action>
-<action>Fixed milliseconds formatting problem with MSVC 6.0 and 2003
-</action>
-<action>Fixed AsyncAppender crash
-</action>
-<action>Added new tests
-</action>
-<action>Added benchmarks
-</action>
-</release>
-<release version="0.9.2" date="2003-08-10">
-<action>Fixed FreeBSD compilation problem with pthread mutex (class CriticalSection).
-</action>
-<action>Fixed milliseconds formatting problem (class DateFormat).
-</action>
-<action>Long events (&gt; 1024 chars) are now supported in the class XMLSocketAppender.
-</action>
-<action>Carriage returns have been normalized in the class XMLLayout.
-</action>
-</release>
-<release version="0.9.1" date="2003-08-06">
-<action>Fixed deadlock problems in classes Logger and AsyncAppender.
-</action>
-<action>Fixed MSVC 6.0 compilation problems.
-</action>
-<action>Added MSVC 6.0 static libraty project.
-</action>
-<action>Default configuration for the SMTP options is "no".
-</action>
-</release>
-<release version="0.9.0" date="2003-08-06">
-<action>Added ODBCAppender (matching log4j JDBCAppender)
-</action>
-<action>Added SyslogAppender
-</action>
-<action>Added SMTPAppender (only for Linux/FreeBSD)
-</action>
-<action>Added BasicConfigurator
-</action>
-<action>Added a FileWatchDog in PropertyConfigurator and DOMConfigurator
-</action>
-<action>Possibility to load a custom LoggerFactory through the DOMConfigurator
-</action>
-<action>Changed time precision from seconds to milliseconds
-</action>
-<action>Added MSVC 6.0 'Unicode Debug' and 'Unicode Release' targets
-</action>
-<action>Added Java like System class.
-</action>
-</release>
-<release version="0.1.1" date="2003-07-09">
-<action>Fixed MSVC 6.0 compilation problems concerning the 'Release' target
-</action>
-<action>Added MSVC 6.0 tests projects
-</action>
-</release>
-<release version="0.1.0" date="2003-07-08">
-<action>FreeBSD Autotools/Compilation support
-</action>
-<action>Fixed TelnetAppender crash when a socket bind exception occured.
-</action>
-<action>Added log4j DTD support to XMLLayout and DOMConfigurator
-</action>
-<action>Can now send events in XML format over TCP (class XMLSocketAppender) for the
-  log4j Chainsaw UI
-</action>
-<action>Now compiles with 'configure --enable-unicode' (UTF16 Unicode support)
-</action>
-<action>Added Java like Properties class. It's a helper for the PropertyConfigurator
-</action>
-<action>Added Java like objects with dynamic cast and instanciation. Custom objects
-  can be configured through the DOMConfigurator and PropertyConfigurator classes
-</action>
-<action>Port of the PropertyConfigurator class
-</action>
-<action>Port of the "Map Diagnostic Context" (MDC) class
-</action>
-<action>Added 13 tests (try make check)
-</action>
-</release>
-<release version="0.0.1" date="2003-05-31">
-<action type="add">Loggers, Hierarchy, Filters, Appenders, Layouts, NDC
-</action>
-<action type="add">Appenders:
-  AsyncAppender, ConsoleAppender, FileAppender, NTEventLogAppender,
-  RollingFileAppender, SocketAppender, SocketHubAappender,
-  TelnetAppender
-</action>
-<action type="add">Layouts:
-  HTMLLayout, PatternLayout, SimpleLayout, TTCCLayout, XMLLayout
-</action>
-<action type="add">Filters:
-  DenyAllFilter, LevelMatchFilter, LevelRangeFilter, StringMatchFilter
+	<properties>
+		<title>Changes</title>
+	</properties>
 
-</action>
-<action type="add">Configurators:
-  DOMConfigurator
-</action>
-</release>
-</body>
+	<body>
+		<release	version="0.11.0"
+					date="XXXX-XX-XX"
+					description="Maintenance release">
+			<action issue="LOGCXX-493" type="fix">Wrong usage of milli- vs. micro- and non- vs. milliseconds in some docs.</action>
+			<action issue="LOGCXX-488" type="fix">Space after log level hides messages</action>
+			<action issue="LOGCXX-484" type="fix">Spelling error s/excute/execute</action>
+			<action issue="LOGCXX-482" type="fix">Build failure with GCC-6</action>
+			<action issue="LOGCXX-464" type="fix">TimeBasedRollingPolicy should append as configured on rollover</action>
+			<action issue="LOGCXX-446" type="fix">make install fails, trying to overwrite header files</action>
+			<action issue="LOGCXX-443" type="fix">Return by const reference in Logger::getName()</action>
+			<action issue="LOGCXX-433" type="fix">Autoconf 2.69 needs 'ACLOCAL_AMFLAGS= -I .'</action>
+			<action issue="LOGCXX-428" type="fix">Wildcards in Makefile.am break either VPATH or non-VPATH installs</action>
+			<action issue="LOGCXX-425" type="fix">exceptions in CachedDateFormatTestCase after LOGCXX-420</action>
+			<action issue="LOGCXX-424" type="fix">liblog4cxx.pc.in should reflect dependency on apr-1, apr-1-util</action>
+			<action issue="LOGCXX-423" type="fix">Repair autogen script warnings</action>
+			<action issue="LOGCXX-422" type="fix">Regression of LOGCXX-420</action>
+			<action issue="LOGCXX-420" type="fix">Possible out_of_range exception for millisecond formats in CachedDateFormat</action>
+			<action issue="LOGCXX-417" type="fix">atoi undefined on Mac OS 10.9 compiling stringhelper.cpp</action>
+			<action issue="LOGCXX-416" type="fix">Configure and watch could crash on app exit with static linking</action>
+			<action issue="LOGCXX-415" type="fix">Empty XML configuration file causes crash</action>
+			<action issue="LOGCXX-414" type="fix">possibly wrong use of autotools docdir (due to Alex Zbarcea)</action>
+			<action issue="LOGCXX-413" type="fix">log4cxx doesn't compile on openembedded (due to Alex Zbarcea)</action>
+			<action issue="LOGCXX-412" type="fix">Log4cxx doesn't roll normally when working under multiple processes environment</action>
+			<action issue="LOGCXX-411" type="fix">Crash when logging on multiple threads.</action>
+			<action issue="LOGCXX-400" type="fix">C++11 does not allow char literals with highest bit set unless cast</action>
+			<action issue="LOGCXX-399" type="fix">Non-ascii character output wrong.</action>
+			<action issue="LOGCXX-394" type="fix">Levels are not thread safe</action>
+			<action issue="LOGCXX-388" type="fix">Hierarchy::updateParents loops forever on illegal logger-name like '.logger1'</action>
+			<action issue="LOGCXX-382" type="fix">Mingw build type conversion error</action>
+			<action issue="LOGCXX-381" type="fix">Pkgconfig can't find dependencies properly if log4cxx built statically</action>
+			<action issue="LOGCXX-369" type="fix">Load Properties File Fails When There Are multibyte Characters in the Path</action>
+			<action issue="LOGCXX-368" type="fix">method and class name functions not properly implemented</action>
+			<action issue="LOGCXX-367" type="fix">Build fails on Linux with g++ 4.4</action>
+			<action issue="LOGCXX-366" type="fix">Errors when compile log4cxx 0.10.0 under Win7 x64 with Visual Studio 2010 (due to Christian Boos and Feng Nan)</action>
+			<action issue="LOGCXX-365" type="fix">Unit tests fail on system dates later than 2009-12-31.</action>
+			<action issue="LOGCXX-358" type="fix">SMTPAppender generating Emails with an empty body</action>
+			<action issue="LOGCXX-356" type="fix">apache-log4cxx-0.10.0\src\main\include\log4cxx\spi\configurator.h(57) : warning C4231: nonstandard extension used : 'extern' before template explicit instantiation</action>
+			<action issue="LOGCXX-353" type="fix">When a client disconnects the SocketHubAppender crashes on the next log message</action>
+			<action issue="LOGCXX-351" type="fix">Download page does not have link to KEYS file</action>
+			<action issue="LOGCXX-340" type="fix">Transcoder::encodeCharsetName bungles encoding</action>
+			<action issue="LOGCXX-339" type="update">Child thread does not inherit a copy of the mapped diagnostic context of its parent</action>
+			<action issue="LOGCXX-337" type="fix">Suggested fix for socketappender not reconnecting multiple times</action>
+			<action issue="LOGCXX-336" type="fix">Test compilation fails: Overloading ambiguity</action>
+			<action issue="LOGCXX-331" type="fix">DailyRollingFileAppender should roll if program doesn't run at rolling time</action>
+			<action issue="LOGCXX-320" type="fix">TLS memory of APR is not freed in destructor of APRInitializer</action>
+			<action issue="LOGCXX-319" type="fix">Please make sure that the LOG4CXX_* macro's can be used as ordinary statements.</action>
+			<action issue="LOGCXX-317" type="fix">Log4cxx triggers locking inversion which can result in a deadlock.</action>
+			<action issue="LOGCXX-313" type="fix">Build process fails in case of absence of iconv support in apr-util</action>
+			<action issue="LOGCXX-305" type="fix">Property/DOMConfigurator::configureAndWatch can continue to run after APR termination</action>
+			<action issue="LOGCXX-304" type="fix">BasicConfigurator::configure results in writer not set warning.</action>
+			<action issue="LOGCXX-303" type="fix">DOMConfigurator does not set ErrorHandler.</action>
+			<action issue="LOGCXX-300" type="fix">ODBCAppender connection settings broken (or just have changed).</action>
+			<action issue="LOGCXX-299" type="fix">odbcappender.cpp does not compile with unixODBC on linux.</action>
+			<action issue="LOGCXX-298" type="fix">SMTPAppender does not build properly with autotools.</action>
+			<action issue="LOGCXX-293" type="fix">Escape sequences not recognized in property files.</action>
+			<action issue="LOGCXX-292" type="fix">Value continuation does not properly handle CRLF in property files.</action>
+			<action issue="LOGCXX-291" type="fix">Tab characters are not recognized in property files.</action>
+			<action issue="LOGCXX-288" type="fix">Unnecessary trailing semi-colons after LOG4CXX_INFO et al in docs, examples and tests.</action>
+			<action issue="LOGCXX-286" type="fix">gcc 4.3 requires #include &lt;cstring&gt; when using memcpy and related.</action>
+			<action issue="LOGCXX-285" type="fix">LevelRangeFilter has default value for acceptOnMatch that is different from log4j</action>
+			<action issue="LOGCXX-284" type="fix">Unit tests fail to compile with xlc_r on AIX</action>
+			<action issue="LOGCXX-283" type="fix">Suspicious, but harmless, reuse of LOCAL1 in SyslogAppender</action>
+			<action issue="LOGCXX-282" type="fix">Thread::sleep not affected by Thread::interrupt.</action>
+			<action issue="LOGCXX-281" type="fix">Sun Studio 11 reports function hides base virtual function warning</action>
+			<action issue="LOGCXX-280" type="fix">tests and sample code unnecessarily compiled during default make target</action>
+			<action issue="LOGCXX-278" type="fix">Threads for reconnecting sockets do not end cleanly when program exits</action>
+			<action issue="LOGCXX-277" type="fix">Reconnection not working for sockets</action>
+			<action issue="LOGCXX-276" type="fix">AndFilter and others defined but not implemented</action>
+			<action issue="LOGCXX-275" type="fix">Headers cannot be included with very strict warning settings</action>
+			<action issue="LOGCXX-272" type="update">Apache log4cxx 0.11.0 release</action>
+			<action issue="LOGCXX-271" type="fix">MDC::put will not overwrite existing key value pair</action>
+			<action issue="LOGCXX-270" type="fix">Add ability to compile out logging by logging level.</action>
+			<action issue="LOGCXX-267" type="fix">Local variables hide member variables</action>
+			<action issue="LOGCXX-266" type="fix">Eliminate Extra ";" ignored warnings</action>
+			<action issue="LOGCXX-265" type="fix">Eliminate anachronism warnings</action>
+			<action issue="LOGCXX-263" type="fix">Bad link to log4cxx-dev archive</action>
+			<action issue="LOGCXX-262" type="fix">socketappendertestcase and xmlsocketappendertestcase not run</action>
+			<action issue="LOGCXX-249" type="fix">Console appender crashes if layout is not set</action>
+
+			<action type="update">Behavior of StringHelper::startsWith and endsWith synced</action>
+			<action type="update">Documented C (class) and M (method) log format keywords.</action>
+			<action type="add">Locationinfo for Borland C++ Builder and successors improved</action>
+		</release>
+
+		<release	version="0.10.0"
+					date="2008-04-03"
+					description="First Apache release">
+			<action issue="LOGCXX-259" type="fix">Several appenders fail to compile in Visual Studio 2008</action>
+			<action issue="LOGCXX-258" type="fix">unable to build from make dist package due to missing doxygen file</action>
+			<action issue="LOGCXX-257" type="fix">ServerSocket::accept hangs on Unix</action>
+			<action issue="LOGCXX-256" type="fix">SocketHubAppender fails after accepting connection</action>
+			<action issue="LOGCXX-254" type="add">Add build option for static C RTL</action>
+			<action issue="LOGCXX-253" type="fix">Transcoder compilation error with utf-8 charset</action>
+			<action issue="LOGCXX-252" type="add">Add documentation for use of operator&lt;&lt; in logging requests</action>
+			<action issue="LOGCXX-251" type="fix">NDC::cloneStack and NDC::inherit missing in 0.10.0 RC2</action>
+			<action issue="LOGCXX-248" type="fix">ODBCAppender has unicode issues</action>
+			<action issue="LOGCXX-247" type="fix">MSVC project has wrong additional include directories</action>
+			<action issue="LOGCXX-246" type="fix">Config refresh hangs a client application that uses TelnetAppender</action>
+			<action issue="LOGCXX-243" type="fix">Problem Compile in Doxy</action>
+			<action issue="LOGCXX-242" type="update">Eliminate log4cxx proxies for APR types</action>
+			<action issue="LOGCXX-241" type="fix">Non-ascii named files have names mangled</action>
+			<action issue="LOGCXX-239" type="update">Inconsistent const qualification on logging methods.</action>
+			<action issue="LOGCXX-237" type="fix">Include missing headers</action>
+			<action issue="LOGCXX-236" type="fix">Re-order constructor initialiser lists to match declaration order</action>
+			<action issue="LOGCXX-235" type="add">Add ObjectPtrT::exchange</action>
+			<action issue="LOGCXX-234" type="fix">Assignment operator removes const qualifier</action>
+			<action issue="LOGCXX-233" type="update">Unnecessary casts in ObjectPtrT</action>
+			<action issue="LOGCXX-232" type="update">Drop src/performance</action>
+			<action issue="LOGCXX-231" type="fix">Deadlock in AsyncAppender</action>
+			<action issue="LOGCXX-230" type="update">Align ant build options with automake</action>
+			<action issue="LOGCXX-228" type="update">Remove @author tags</action>
+			<action issue="LOGCXX-227" type="update">Remove @since tags</action>
+			<action issue="LOGCXX-226" type="update">Default configurator uses *.properties in preference to *.xml</action>
+			<action issue="LOGCXX-225" type="update">Migrate unit tests from LGPL'd CPPUNIT to an ASL'd testing framework</action>
+			<action issue="LOGCXX-222" type="fix">trunk compile error.</action>
+			<action issue="LOGCXX-221" type="fix">ThreadID layout does not match debugger</action>
+			<action issue="LOGCXX-220" type="fix">Memory leaks when using MFC</action>
+			<action issue="LOGCXX-219" type="fix">suspicious warnings</action>
+			<action issue="LOGCXX-218" type="add">Visual Studio 8 build</action>
+			<action issue="LOGCXX-217" type="fix">Not initialized LoggerPtr segfault program.</action>
+			<action issue="LOGCXX-216" type="fix">crash on program exit</action>
+			<action issue="LOGCXX-215" type="update">Eliminate sqlext.h from odbcappender.h</action>
+			<action issue="LOGCXX-214" type="fix">Possible memory leak due to fault in build process (via make)</action>
+			<action issue="LOGCXX-213" type="fix">trace method implementation is missing</action>
+			<action issue="LOGCXX-212" type="fix">unittest failed</action>
+			<action issue="LOGCXX-211" type="fix">Crash(Segmentation Fault) in DailyRollingFileAppender when file change</action>
+			<action issue="LOGCXX-210" type="fix">HTMLLayout NDC null check</action>
+			<action issue="LOGCXX-209" type="fix">A message of type wchar_t* is not beeing written correctly to the internal message buffer (Revision: 592627)</action>
+			<action issue="LOGCXX-208" type="fix">isTraceEnabled implemenation missing in logger.cpp (Revision: 592627)</action>
+			<action issue="LOGCXX-204" type="fix">PatternParserTestCase and FileNamePatternTestCase fail only with VC6</action>
+			<action issue="LOGCXX-202" type="fix">ObjectPtrT has inconsistent const-ness on accessors</action>
+			<action issue="LOGCXX-201" type="add">Visual Studio 6 build</action>
+			<action issue="LOGCXX-200" type="add">Implement compression for RollingFileAppender</action>
+			<action issue="LOGCXX-197" type="fix">ant can't generate vc6 project</action>
+			<action issue="LOGCXX-196" type="fix">Syslog appender destructor can cause core</action>
+			<action issue="LOGCXX-195" type="fix">Syslog appender adds characters to output.</action>
+			<action issue="LOGCXX-194" type="fix">Garbage in log files when appenders are defined in multiple levels of the logger hierarchy</action>
+			<action issue="LOGCXX-193" type="update">Please rename or remove new local variable "buf" in Logger.h macros</action>
+			<action issue="LOGCXX-192" type="update">Suggested improvements to log4cxx webpages</action>
+			<action issue="LOGCXX-191" type="fix">Application cores when syslog appender is given an unreachable host/ip.</action>
+			<action issue="LOGCXX-190" type="fix">The 'logger.h' header includes itself.</action>
+			<action issue="LOGCXX-189" type="update">Migrate to Maven 2.0 for documentation and packaging</action>
+			<action issue="LOGCXX-188" type="update">Upgrade to apr 1.2.9 and apr-util 1.2.8</action>
+			<action issue="LOGCXX-187" type="fix">LogLog::emit() could potentially interleave messages</action>
+			<action issue="LOGCXX-186" type="fix">Garbage characters in log files when log requests from multiple threads with hyperthreading enabled</action>
+			<action issue="LOGCXX-184" type="fix">Crash when log level set to 'inherited'</action>
+			<action issue="LOGCXX-183" type="fix">Compiler warning: dereferencing type-punned pointer will break strict-aliasing rules</action>
+			<action issue="LOGCXX-182" type="fix">missing man page for simplesocketserver</action>
+			<action issue="LOGCXX-181" type="fix">Level::DEBUG and other non-local statics cause crash on app shutdown on AIX</action>
+			<action issue="LOGCXX-180" type="fix">Build fails at domconfigurator.h</action>
+			<action issue="LOGCXX-179" type="add">example applications do SIGABRT on aix 5.2</action>
+			<action issue="LOGCXX-178" type="fix">Link failure if wchar_t cannot be determined as UTF-16 or UTF-32</action>
+			<action issue="LOGCXX-177" type="fix">SocketImpl::accept uses private APR function: apr_wait_for_io_or_timeout</action>
+			<action issue="LOGCXX-175" type="fix">APRCharsetEncoder is not thread safe</action>
+			<action issue="LOGCXX-172" type="fix">configure fail with ".infig.status: error: cannot find input file:"</action>
+			<action issue="LOGCXX-171" type="add">Add project description file for projects.apache.org</action>
+			<action issue="LOGCXX-169" type="fix">XMLLayoutTestCase fails on compilers that do not provide location info</action>
+			<action issue="LOGCXX-168" type="fix">log4j.dtd does not contain rollingPolicy and other o.a.l.r.RFA elements</action>
+			<action issue="LOGCXX-167" type="fix">system locale charmap is not determined properly on Fedora Core 6</action>
+			<action issue="LOGCXX-165" type="fix">XMLSocketAppender may generate erroneous output due to mismatched encoding</action>
+			<action issue="LOGCXX-164" type="fix">XMLSocketAppender is disabled</action>
+			<action issue="LOGCXX-163" type="fix">liblog4cxx (svn 480882) does not link on Mac OS X 10.4</action>
+			<action issue="LOGCXX-162" type="fix">Problem printing string with embedded NULL character</action>
+			<action issue="LOGCXX-161" type="fix">Using RollingFileAppender increases the working set with each rollover</action>
+			<action issue="LOGCXX-160" type="fix">helpers/object.h: DECLARE_LOG4CXX_OBJECT macro definition is missing virtual destructor declaration</action>
+			<action issue="LOGCXX-159" type="fix">Initialization of local static objects out of order on Linux</action>
+			<action issue="LOGCXX-158" type="fix">tolower not defined in stringhelper.cpp</action>
+			<action issue="LOGCXX-157" type="fix">make install fails since @manual_dest@ replacement is missing in Makefiles</action>
+			<action issue="LOGCXX-156" type="update">immediate flush in console appender</action>
+			<action issue="LOGCXX-155" type="update">Update source headers per new ASF header policy</action>
+			<action issue="LOGCXX-153" type="add">Automate log4cxx site and doxygen generation and deployment</action>
+			<action issue="LOGCXX-152" type="fix">gcc warning about cast from `const void*' to `log4cxx::helpers::Object*' discards qualifiers from pointer target typ</action>
+			<action issue="LOGCXX-151" type="fix">Umlauts as literal in patternlayout won't be logged correct</action>
+			<action issue="LOGCXX-150" type="fix">logstream's operator&lt;&lt; declared in the wrong namespace</action>
+			<action issue="LOGCXX-149" type="fix">make dist does not work</action>
+			<action issue="LOGCXX-146" type="fix">DailyRollingFileAppender::~DailyRollingFileAppender must call finalize</action>
+			<action issue="LOGCXX-143" type="fix">-xarch=v8plus should be removed from Makefile.in</action>
+			<action issue="LOGCXX-142" type="fix">socketservertestcase.cpp does not compile with Sun Studio 11 on Solaris</action>
+			<action issue="LOGCXX-141" type="update">Upgrade to APR 1.2.7 or later</action>
+			<action issue="LOGCXX-140" type="fix">Handle leak with LoggingEvent::getCurrentThreadName</action>
+			<action issue="LOGCXX-139" type="fix">XMLLayoutTestCase uses inadequate filters for 64 bit platforms</action>
+			<action issue="LOGCXX-138" type="fix">XMLLayoutTestCase output and filtered output gets overwritten</action>
+			<action issue="LOGCXX-136" type="fix">DailyRollingFileAppender not using Property options</action>
+			<action issue="LOGCXX-135" type="update">Use std::string with logstream</action>
+			<action issue="LOGCXX-134" type="fix">FileAppender could create missing directories</action>
+			<action issue="LOGCXX-133" type="fix">Missing parenthesis in LOG4CXX_ASSERT</action>
+			<action issue="LOGCXX-132" type="fix">various segmentation faults in multithreaded application</action>
+			<action issue="LOGCXX-131" type="fix">TimeBasedRollingPolicy is declared "abstract"</action>
+			<action issue="LOGCXX-130" type="fix">Compile fails on gcc4.1</action>
+			<action issue="LOGCXX-129" type="fix">Asyncappender is full of race conditions (improper use of condition variables)</action>
+			<action issue="LOGCXX-127" type="fix">Main build.xml not referencing "env" properly.</action>
+			<action issue="LOGCXX-126" type="fix">std::cout stops working if log4cxx is first to output</action>
+			<action issue="LOGCXX-125" type="update">L7dTestCase is stubbed out</action>
+			<action issue="LOGCXX-124" type="fix">wchar_t constructor missing in class NDC</action>
+			<action issue="LOGCXX-123" type="fix">UTF-8 build fails on Linux</action>
+			<action issue="LOGCXX-120" type="fix">Wrong parameter description in Patternlayout</action>
+			<action issue="LOGCXX-119" type="fix">ndctestcase not working</action>
+			<action issue="LOGCXX-118" type="fix">Hierarchy corrupts with PropertyConfigurator</action>
+			<action issue="LOGCXX-117" type="fix">Memory leak with ThreadSpecificData on Win32</action>
+			<action issue="LOGCXX-116" type="fix">SVN head does not compiler with MinGW compiler</action>
+			<action issue="LOGCXX-115" type="fix">SVN head does not compile with Borland C++ compiler</action>
+			<action issue="LOGCXX-114" type="update">Upgrade APR to 1.2.2 from 1.1.0</action>
+			<action issue="LOGCXX-113" type="update">separate apr detection m4 codes from aclocal.m4</action>
+			<action issue="LOGCXX-112" type="update">change "static" to "auto" for Transcoder::decode() decoder and CharsetDecoder::getDefaultDecoder() decoder</action>
+			<action issue="LOGCXX-111" type="update">make Logger cache a LoggerRepositoryPtr instead of a "blind" pointer</action>
+			<action issue="LOGCXX-110" type="fix">try fix 64bit log4cxx_intptr_t</action>
+			<action issue="LOGCXX-107" type="fix">Can't compile log4cxx in ascii on Windows</action>
+			<action issue="LOGCXX-106" type="fix">maxFileSize has bad type in SizeBasedTriggeringPolicy file</action>
+			<action issue="LOGCXX-105" type="fix">Infinite loop in string replacing</action>
+			<action issue="LOGCXX-104" type="fix">ODBCAppender::close does not check if appender is already closed</action>
+			<action issue="LOGCXX-103" type="update">Much of CVS HEAD seems #if 0 out, especially ResourceBundle stuff</action>
+			<action issue="LOGCXX-100" type="fix">Fixes for ODBCAppender</action>
+			<action issue="LOGCXX-98" type="fix">Gump build fails for log4cxx-ant-no-wchar-t target</action>
+			<action issue="LOGCXX-94" type="update">simplesocketserver.cpp should use LOG4CXX_STR("...") not L"..."</action>
+			<action issue="LOGCXX-88" type="update">Explore use of security-enhanced CRT methods</action>
+			<action issue="LOGCXX-87" type="update">Remove remaining uses of Category and Priority</action>
+			<action issue="LOGCXX-86" type="add">Add TRACE level</action>
+			<action issue="LOGCXX-85" type="update">Mac OS/X fixes and enhancements</action>
+			<action issue="LOGCXX-84" type="fix">Problems with stream logging in UTF8, no WCHAR_T build</action>
+			<action issue="LOGCXX-83" type="fix">log4cxx::Level::ERROR fails to compile when GDI enabled</action>
+			<action issue="LOGCXX-82" type="fix">Compiling with stream.h in multiple object files errors</action>
+			<action issue="LOGCXX-81" type="fix">SimpleDateFormat does not compile on Solaris 2.95.2 gcc</action>
+			<action issue="LOGCXX-80" type="update">Migrated network appenders to APR network IO</action>
+			<action issue="LOGCXX-79" type="update">configure check for apr-util</action>
+			<action issue="LOGCXX-77" type="fix">Static builds broken</action>
+			<action issue="LOGCXX-76" type="add">user.home, user.dir, java.io.tmpdir available within configuration files</action>
+			<action issue="LOGCXX-75" type="add">Cygwin build</action>
+			<action issue="LOGCXX-74" type="add">MinGW build</action>
+			<action issue="LOGCXX-73" type="fix">Not loading configuration from log4cxx.properties or log4cxx.xml</action>
+			<action issue="LOGCXX-72" type="update">INSTALL out of date</action>
+			<action issue="LOGCXX-71" type="update">Update performance page on web site</action>
+			<action issue="LOGCXX-70" type="fix">Logic flaws in StringHelper::startsWith and StringHelper::endsWith</action>
+			<action issue="LOGCXX-67" type="fix">NTEventLogAppender always uses RPC method for logging and has inadequate error handling.</action>
+			<action issue="LOGCXX-66" type="fix">SyslogAppender append method currently stubbed out</action>
+			<action issue="LOGCXX-64" type="update">Migrate to APR network IO</action>
+			<action issue="LOGCXX-63" type="update">Platform appropriate line-feed convention</action>
+			<action issue="LOGCXX-62" type="update">log4cxx 0.10.0 release</action>
+			<action issue="LOGCXX-60" type="fix">XML layout can be mismatched with document encoding</action>
+			<action issue="LOGCXX-59" type="update">Implement encoding support for Writer appender</action>
+			<action issue="LOGCXX-58" type="fix">ImmediateFlush'd FileAppenders extremely slow on Windows</action>
+			<action issue="LOGCXX-57" type="add">Port log4j performance test</action>
+			<action issue="LOGCXX-56" type="fix">BasicConfiguration is unreliable</action>
+			<action issue="LOGCXX-55" type="add">DailyRolling File Appender</action>
+			<action issue="LOGCXX-54" type="fix">Eliminate use of boost-regex in unit tests</action>
+			<action issue="LOGCXX-53" type="fix">Problems compiling with MsDev 6.0 (space in paths)</action>
+			<action issue="LOGCXX-52" type="add">Migrate log4j 1.3 RollingFileAppender</action>
+			<action issue="LOGCXX-50" type="fix">variable name clash in macro</action>
+			<action issue="LOGCXX-49" type="add">Move timezone specification into pattern, remove locale specification</action>
+			<action issue="LOGCXX-48" type="add">Use hex representation for thread identifier</action>
+			<action issue="LOGCXX-47" type="fix">Check headers for missing declarations and Effective C++ violations</action>
+			<action issue="LOGCXX-46" type="fix">Extra semicolon after namespace closing paren</action>
+			<action issue="LOGCXX-45" type="fix">_T causes error : 1048576 cannot be used as a function</action>
+			<action issue="LOGCXX-44" type="add">GUMP integation</action>
+			<action issue="LOGCXX-43" type="add">configure/make help needed</action>
+			<action issue="LOGCXX-41" type="fix">Layout timestamp doesn't seem to adjust for daylight saving</action>
+			<action issue="LOGCXX-40" type="fix">PatternLayout does not support Java date format specifiers</action>
+			<action issue="LOGCXX-39" type="remove">Remove DailyRollingFileAppender</action>
+			<action issue="LOGCXX-37" type="fix">Unable to build log4cxx under Borland C++</action>
+			<action issue="LOGCXX-36" type="add">Migrate to Apache Portable Runtime threads</action>
+			<action issue="LOGCXX-35" type="remove">Avoid use of MSXML</action>
+			<action issue="LOGCXX-34" type="fix">Visual Studio 6 CVS build broken</action>
+			<action issue="LOGCXX-33" type="fix">log4cxx::Exception is not derived from std::exception</action>
+			<action issue="LOGCXX-32" type="fix">Missing copy constructors and assignment operators</action>
+			<action issue="LOGCXX-31" type="fix">Missing const qualifiers, Exception::getMessage() in particular.</action>
+			<action issue="LOGCXX-30" type="fix">StringTokenizer uses evil strtok and wcstok functions</action>
+			<action issue="LOGCXX-29" type="fix">Appender attributes are not passed passed to setOption correctly.</action>
+			<action issue="LOGCXX-28" type="fix">Appender threshold cannot be set in configuration files</action>
+			<action issue="LOGCXX-27" type="fix">Appender threshold cannot be set in configuration files</action>
+			<action issue="LOGCXX-26" type="fix">Default initialization is broken</action>
+			<action issue="LOGCXX-25" type="add">Add Ant+cpptasks build file</action>
+			<action issue="LOGCXX-24" type="fix">Class and module name not available in LogEvent</action>
+			<action issue="LOGCXX-23" type="fix">Unit tests have become stale</action>
+			<action issue="LOGCXX-22" type="fix">Backslashes in filenames in XML config of FileAppender broken</action>
+			<action issue="LOGCXX-21" type="add">Add check that libxml2 not libxml has been included</action>
+			<action issue="LOGCXX-19" type="add">Add .cvsignore's to ignore generated files</action>
+			<action issue="LOGCXX-18" type="add">LoggerStream Feature</action>
+			<action issue="LOGCXX-17" type="update">Use of non reentrant time functions</action>
+			<action issue="LOGCXX-16" type="fix">Misleading statements in Introduction to log4cxx</action>
+			<action issue="LOGCXX-15" type="fix">PatternLayout don't use locale time zone,it's use GMT tome zone</action>
+			<action issue="LOGCXX-14" type="add">add -Wall to compile log4cxx will get many warning</action>
+			<action issue="LOGCXX-13" type="add">Add branch optimization hint to LOG4CXX_DEBUG macro</action>
+			<action issue="LOGCXX-12" type="fix">the threshold of ApenderSkeleton can not be set by calling setOption.</action>
+			<action issue="LOGCXX-11" type="fix">Timezone may have side-effects</action>
+			<action issue="LOGCXX-10" type="fix">Conflicting definitions of tchar.h/simulatenous Unicode+MBCS</action>
+			<action issue="LOGCXX-8" type="fix">Compilation problems using VC5 or VC6 with later Platform SDKs</action>
+			<action issue="LOGCXX-7" type="fix">SocketAppender binary format not compatible with Chainsaw</action>
+			<action issue="LOGCXX-6" type="add">Win32 OutputDebugString</action>
+			<action issue="LOGCXX-5" type="fix">Preprocessor macro WIN32 used instead of _WIN32</action>
+			<action issue="LOGCXX-4" type="fix">initialization not working on many OS's</action>
+			<action issue="LOGCXX-3" type="fix">Missing #else</action>
+			<action issue="LOGCXX-2" type="fix">logger.h includes config.h</action>
+		</release>
+
+		<release	version="0.9.7"
+					date="2004-05-10">
+			<action type="fix">Fixed examples source code in the "Short introduction to log4cxx".</action>
+			<action type="fix">Fixed, in the renaming algorithm of RollingFileAppender and DailyRollingFileAppender, a problem specific to Unicode.</action>
+			<action type="fix">Fixed conflict with Windows macros "min" and "max", by renaming StrictMath::min and StrictMath::max to StrictMath::minimum and StrictMath::maximum.</action>
+			<action type="add">Port to HPUX 11.0.</action>
+			<action type="fix">Fixed segmentation fault in PropertyConfigurator.</action>
+			<action type="add">Port to Solaris.</action>
+			<action type="fix">Fixed MutexException thrown while destroying RollingFileAppender.</action>
+			<action type="fix">Logging macros can be used without explicity declaring the use of log4cxx namespace.</action>
+			<action type="fix">Fixed static library unresolved externals for msvc 6 and 7.1</action>
+		</release>
+
+		<release	version="0.9.6"
+					date="2004-04-11">
+			<action type="update">Timezone management has been optimized through the class TimeZone</action>
+			<action type="update">Inter-thread synchronization and reference counting has been optimized</action>
+			<action type="update">Reference counting now uses gcc atomic functions (bug 929078)</action>
+			<action type="update">Use of StringBuffer has been optimized.</action>
+			<action type="add">Support of localisation throug resourceBundles</action>
+			<action type="update">SyslogAppender now uses the system function 'syslog' to log on the local host. (only for POSIX systems)</action>
+			<action type="add">Added TimeZone configuration to PatternLayout (bug 912563)</action>
+			<action type="add">Support of the DailyRollingFileAppender (feature request 842765)</action>
+		</release>
+
+		<release	version="0.9.5"
+					date="2004-02-04">
+			<action type="add">Port of log4j Jnuit tests with Cppunit and Boost Regex.</action>
+			<action type="add">Added explicit exports for MSDEV 6 and MSDEV 7 (no further need of .def files)</action>
+			<action type="add">Custom levels can be configured through the DOMConfigurator and PropertyConfigurator classes (Level inherites from Object)</action>
+			<action type="add">Added a reference counter to LoggingEvent to avoid useless copies (LoggingEvent inherites from Object)</action>
+			<action type="add">The file log4j.xml as well as the file log4j.properties are now search for, in log4cxx initialization.</action>
+			<action type="add">The root logger can be assigned the "OFF" level.</action>
+			<action type="add">Added MSVC6 project missing files mutext.cpp and condition.cpp (bug 847397)</action>
+			<action type="fix">condition.cpp now compiles with MSVC6 (bug 847417)</action>
+			<action type="fix">fixed pure virtual function call in PropertyConfigurator::configureAndWatch (bug 848521)</action>
+			<action type="fix">XMLAppender now displays correct timestamp with MSVC 6 (bug 852836)</action>
+			<action type="add">SRLPORT 4.6 support.</action>
+			<action type="fix">Fixed an infinite loop in class Properties.</action>
+			<action type="fix">Fixed compilations problems with unicode.</action>
+			<action type="fix">Fixed SocketAppender bug concerning MDC and NDC.</action>
+		</release>
+
+		<release	version="0.9.4"
+					date="2003-10-25">
+			<action type="update">StringBuffer has been optimized.</action>
+			<action type="fix">Fixed miscellaneous threading problems.</action>
+			<action type="add">Added TimeZone support in PatternLayout (bug 796894)</action>
+			<action type="fix">Fixed threading configuration problems (bug 809125)</action>
+			<action type="fix">Fixed miscellaneous MSVC and cygwin compilation problems.</action>
+		</release>
+
+		<release	version="0.9.3"
+					date="2003-09-19">
+			<action type="update">Changed tstring to log4cxx::String and tostringstream to log4cxx::StringBuffer.</action>
+			<action type="fix">Fixed MSVC 2003 compilation erros and warnings.</action>
+			<action type="add">Added helpers for NDC and MDC.</action>
+			<action type="add">Added TimeZone support in TTCCLayout.</action>
+			<action type="fix">Fixed compilation problems with logger macros (LOG4CXX_...)</action>
+			<action type="fix">Fixed milliseconds formatting problem with MSVC 6.0 and 2003</action>
+			<action type="fix">Fixed AsyncAppender crash</action>
+			<action type="add">Added new tests	</action>
+			<action type="add">Added benchmarks</action>
+		</release>
+
+		<release	version="0.9.2"
+					date="2003-08-10">
+			<action type="fix">Fixed FreeBSD compilation problem with pthread mutex (class CriticalSection).</action>
+			<action type="fix">Fixed milliseconds formatting problem (class DateFormat).</action>
+			<action type="add">Long events (&gt; 1024 chars) are now supported in the class XMLSocketAppender.</action>
+			<action type="update">Carriage returns have been normalized in the class XMLLayout.</action>
+		</release>
+
+		<release	version="0.9.1"
+					date="2003-08-06">
+			<action type="fix">Fixed deadlock problems in classes Logger and AsyncAppender.</action>
+			<action type="fix">Fixed MSVC 6.0 compilation problems.</action>
+			<action type="add">Added MSVC 6.0 static libraty project.</action>
+			<action type="update">Default configuration for the SMTP options is "no".</action>
+		</release>
+
+		<release	version="0.9.0"
+					date="2003-08-06">
+			<action type="add">Added ODBCAppender (matching log4j JDBCAppender)</action>
+			<action type="add">Added SyslogAppender</action>
+			<action type="add">Added SMTPAppender (only for Linux/FreeBSD)</action>
+			<action type="add">Added BasicConfigurator</action>
+			<action type="add">Added a FileWatchDog in PropertyConfigurator and DOMConfigurator</action>
+			<action type="add">Possibility to load a custom LoggerFactory through the DOMConfigurator</action>
+			<action type="add">Changed time precision from seconds to milliseconds</action>
+			<action type="add">Added MSVC 6.0 'Unicode Debug' and 'Unicode Release' targets</action>
+			<action type="add">Added Java like System class.</action>
+		</release>
+
+		<release	version="0.1.1"
+					date="2003-07-09">
+			<action type="fix">Fixed MSVC 6.0 compilation problems concerning the 'Release' target</action>
+			<action type="add">Added MSVC 6.0 tests projects</action>
+		</release>
+
+		<release	version="0.1.0"
+					date="2003-07-08">
+			<action type="add">FreeBSD Autotools/Compilation support</action>
+			<action type="fix">Fixed TelnetAppender crash when a socket bind exception occured.</action>
+			<action type="add">Added log4j DTD support to XMLLayout and DOMConfigurator</action>
+			<action type="add">Can now send events in XML format over TCP (class XMLSocketAppender) for the log4j Chainsaw UI</action>
+			<action type="add">Now compiles with 'configure --enable-unicode' (UTF16 Unicode support)</action>
+			<action type="add">Added Java like Properties class. It's a helper for the PropertyConfigurator</action>
+			<action type="add">Added Java like objects with dynamic cast and instanciation. Custom objects can be configured through the DOMConfigurator and PropertyConfigurator classes</action>
+			<action type="add">Port of the PropertyConfigurator class</action>
+			<action type="add">Port of the "Map Diagnostic Context" (MDC) class</action>
+			<action type="add">Added 13 tests (try make check)</action>
+		</release>
+
+		<release	version="0.0.1"
+					date="2003-05-31">
+			<action type="add">Loggers, Hierarchy, Filters, Appenders, Layouts, NDC</action>
+			<action type="add">Appenders:
+			  AsyncAppender, ConsoleAppender, FileAppender, NTEventLogAppender,
+			  RollingFileAppender, SocketAppender, SocketHubAappender,
+			  TelnetAppender
+			</action>
+			<action type="add">Layouts:
+			  HTMLLayout, PatternLayout, SimpleLayout, TTCCLayout, XMLLayout
+			</action>
+			<action type="add">Filters:
+			  DenyAllFilter, LevelMatchFilter, LevelRangeFilter, StringMatchFilter
+			</action>
+			<action type="add">Configurators: DOMConfigurator</action>
+		</release>
+	</body>
 </document>
diff --git a/src/changes/changes.xslt b/src/changes/changes.xslt
deleted file mode 100644
index 1108ea7..0000000
--- a/src/changes/changes.xslt
+++ /dev/null
@@ -1,225 +0,0 @@
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements.  See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License.  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
--->
-<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xsl:version="1.0">
-
-   <xsl:output method="xml" indent="yes"/>
-
-   <xsl:apply-templates select="/"/>
-
-   <xsl:template match="/">
-  <xsl:comment>
-
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements.  See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License.  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-  </xsl:comment>
-  <document>
-  <properties>
-    <title>Apache log4cxx</title>
-  </properties>
-  <body>
-  
-    <release version="0.10.0" date="2008-02-29" description="First Apache release">
-       <xsl:apply-templates select='/rss/channel/item'>
-           <xsl:sort select="substring-after(key, '-')" data-type="number"/>
-       </xsl:apply-templates>
-     </release>
-
-<release version="0.9.7" date="2004-05-10">
-<action type="fix">Fixed examples source code in the "Short introduction to log4cxx".</action>
-<action type="fix">Fixed, in the renaming algorithm of RollingFileAppender and
-  DailyRollingFileAppender, a problem specific to Unicode.</action>
-<action type="fix">Fixed conflict with Windows macros "min" and "max", by renaming
-  StrictMath::min and StrictMath::max to StrictMath::minimum and
-  StrictMath::maximum.</action>
-<action type="add">Port to HPUX 11.0.</action>
-<action type="fix">Fixed segmentation fault in PropertyConfigurator.</action>
-<action type="add">Port to Solaris.</action>
-<action type="fix">Fixed MutexException thrown while destroying RollingFileAppender.</action>
-<action type="fix">Logging macros can be used without explicity declaring the use of log4cxx namespace.</action>
-<action type="fix">Fixed static library unresolved externals for msvc 6 and 7.1</action>
-</release>
-<release version="0.9.6" date="2004-04-11">
-<action>Timezone management has been optimized through the class TimeZone</action>
-<action>Inter-thread synchronization and reference counting has been optimized</action>
-<action>Reference counting now uses gcc atomic functions (bug 929078)</action>
-<action>Use of StringBuffer has been optimized.</action>
-<action>Support of localisation throug resourceBundles</action>
-<action>SyslogAppender now uses the system function 'syslog' to log on the local host.
- (only for POSIX systems)</action>
-<action>Added TimeZone configuration to PatternLayout (bug 912563)</action>
-<action>Support of the DailyRollingFileAppender (feature request 842765)</action>
-</release>
-<release version="0.9.5" date="2004-02-04">
-<action>Port of log4j Jnuit tests with Cppunit and Boost Regex.</action>
-<action>Added explicit exports for MSDEV 6 and MSDEV 7 (no further need of .def files)</action>
-<action>Custom levels can be configured through the DOMConfigurator and
-  PropertyConfigurator classes (Level inherites from Object)</action>
-<action>Added a reference counter to LoggingEvent to avoid useless copies
-  (LoggingEvent inherites from Object)</action>
-<action>The file log4j.xml as well as the file log4j.properties are now search
-  for, in log4cxx initialization.</action>
-<action>The root logger can be assigned the "OFF" level.</action>
-<action>Added MSVC6 project missing files mutext.cpp and condition.cpp (bug 847397)</action>
-<action>condition.cpp now compiles with MSVC6 (bug 847417)</action>
-<action>fixed pure virtual function call in PropertyConfigurator::configureAndWatch
-  (bug 848521)</action>
-<action>XMLAppender now displays correct timestamp with MSVC 6 (bug 852836)</action>
-<action>SRLPORT 4.6 support.</action>
-<action>Fixed an infinite loop in class Properties.</action>
-<action>Fixed compilations problems with unicode.</action>
-<action>Fixed SocketAppender bug concerning MDC and NDC.</action>
-</release>
-<release version="0.9.4" date="2003-10-25">
-<action>StringBuffer has been optimized.</action>
-<action>Fixed miscellaneous threading problems.</action>
-<action>Added TimeZone support in PatternLayout (bug 796894)</action>
-<action>Fixed threading configuration problems (bug 809125)</action>
-<action>Fixed miscellaneous MSVC and cygwin compilation problems.</action>
-</release>
-<release version="0.9.3" date="2003-09-19">
-<action>Changed tstring to log4cxx::String and tostringstream to
-  log4cxx::StringBuffer.
-</action>
-<action>Fixed MSVC 2003 compilation erros and warnings.
-</action>
-<action>Added helpers for NDC and MDC.
-</action>
-<action>Added TimeZone support in TTCCLayout.
-</action>
-<action>Fixed compilation problems with logger macros (LOG4CXX_...)
-</action>
-<action>Fixed milliseconds formatting problem with MSVC 6.0 and 2003
-</action>
-<action>Fixed AsyncAppender crash
-</action>
-<action>Added new tests
-</action>
-<action>Added benchmarks
-</action>
-</release>
-<release version="0.9.2" date="2003-08-10">
-<action>Fixed FreeBSD compilation problem with pthread mutex (class CriticalSection).
-</action>
-<action>Fixed milliseconds formatting problem (class DateFormat).
-</action>
-<action>Long events (&gt; 1024 chars) are now supported in the class XMLSocketAppender.
-</action>
-<action>Carriage returns have been normalized in the class XMLLayout.
-</action>
-</release>
-<release version="0.9.1" date="2003-08-06">
-<action>Fixed deadlock problems in classes Logger and AsyncAppender.
-</action>
-<action>Fixed MSVC 6.0 compilation problems.
-</action>
-<action>Added MSVC 6.0 static libraty project.
-</action>
-<action>Default configuration for the SMTP options is "no".
-</action>
-</release>
-<release version="0.9.0" date="2003-08-06">
-<action>Added ODBCAppender (matching log4j JDBCAppender)
-</action>
-<action>Added SyslogAppender
-</action>
-<action>Added SMTPAppender (only for Linux/FreeBSD)
-</action>
-<action>Added BasicConfigurator
-</action>
-<action>Added a FileWatchDog in PropertyConfigurator and DOMConfigurator
-</action>
-<action>Possibility to load a custom LoggerFactory through the DOMConfigurator
-</action>
-<action>Changed time precision from seconds to milliseconds
-</action>
-<action>Added MSVC 6.0 'Unicode Debug' and 'Unicode Release' targets
-</action>
-<action>Added Java like System class.
-</action>
-</release>
-<release version="0.1.1" date="2003-07-09">
-<action>Fixed MSVC 6.0 compilation problems concerning the 'Release' target
-</action>
-<action>Added MSVC 6.0 tests projects
-</action>
-</release>
-<release version="0.1.0" date="2003-07-08">
-<action>FreeBSD Autotools/Compilation support
-</action>
-<action>Fixed TelnetAppender crash when a socket bind exception occured.
-</action>
-<action>Added log4j DTD support to XMLLayout and DOMConfigurator
-</action>
-<action>Can now send events in XML format over TCP (class XMLSocketAppender) for the
-  log4j Chainsaw UI
-</action>
-<action>Now compiles with 'configure --enable-unicode' (UTF16 Unicode support)
-</action>
-<action>Added Java like Properties class. It's a helper for the PropertyConfigurator
-</action>
-<action>Added Java like objects with dynamic cast and instanciation. Custom objects
-  can be configured through the DOMConfigurator and PropertyConfigurator classes
-</action>
-<action>Port of the PropertyConfigurator class
-</action>
-<action>Port of the "Map Diagnostic Context" (MDC) class
-</action>
-<action>Added 13 tests (try make check)
-</action>
-</release>
-<release version="0.0.1" date="2003-05-31">
-<action type="add">Loggers, Hierarchy, Filters, Appenders, Layouts, NDC
-</action>
-<action type="add">Appenders:
-  AsyncAppender, ConsoleAppender, FileAppender, NTEventLogAppender,
-  RollingFileAppender, SocketAppender, SocketHubAappender,
-  TelnetAppender
-</action>
-<action type="add">Layouts:
-  HTMLLayout, PatternLayout, SimpleLayout, TTCCLayout, XMLLayout
-</action>
-<action type="add">Filters:
-  DenyAllFilter, LevelMatchFilter, LevelRangeFilter, StringMatchFilter
-
-</action>
-<action type="add">Configurators:
-  DOMConfigurator
-</action>
-</release>
-  </body>
-</document>
-</xsl:template>
-
-<xsl:template match="item">
-      <action issue="{key}"><xsl:value-of select="summary"/></action>
-</xsl:template>
-
-</xsl:transform>
diff --git a/src/examples/cpp/Makefile.am b/src/examples/cpp/Makefile.am
index ff5d7d9..8f2489d 100644
--- a/src/examples/cpp/Makefile.am
+++ b/src/examples/cpp/Makefile.am
@@ -13,9 +13,9 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #
-noinst_PROGRAMS = trivial delayedloop stream console
+check_PROGRAMS = trivial delayedloop stream console
 
-INCLUDES = -I$(top_srcdir)/src/main/include -I$(top_builddir)/src/main/include
+AM_CPPFLAGS = -I$(top_srcdir)/src/main/include -I$(top_builddir)/src/main/include
 
 trivial_SOURCES = trivial.cpp
 trivial_LDADD = $(top_builddir)/src/main/cpp/liblog4cxx.la
@@ -28,4 +28,3 @@
 
 console_SOURCES = console.cpp
 console_LDADD = $(top_builddir)/src/main/cpp/liblog4cxx.la
-
diff --git a/src/examples/cpp/console.cpp b/src/examples/cpp/console.cpp
old mode 100755
new mode 100644
index 6a01d8a..3c8d133
--- a/src/examples/cpp/console.cpp
+++ b/src/examples/cpp/console.cpp
@@ -16,12 +16,19 @@
  */
 
 #include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
 #include <log4cxx/logger.h>
 #include <log4cxx/consoleappender.h>
 #include <log4cxx/simplelayout.h>
 #include <log4cxx/logmanager.h>
 #include <iostream>
 #include <locale.h>
+#include <cstring>
+#include <cstdio>
+#ifndef WIN32
+#include <stdint.h>
+#endif
 
 using namespace log4cxx;
 using namespace log4cxx::helpers;
diff --git a/src/m4/Makefile.am b/src/m4/Makefile.am
new file mode 100644
index 0000000..b678c61
--- /dev/null
+++ b/src/m4/Makefile.am
@@ -0,0 +1,23 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+#DISTCLEANFILES = libtool.m4 ltoptions.m4 ltsugar.m4 ltversion.m4 lt~obsolete.m4
+
+dist-hook:
+	-rm -f	"$(distdir)/libtool.m4"		\
+		"$(distdir)/ltoptions.m4"	\
+		"$(distdir)/ltsugar.m4"		\
+		"$(distdir)/ltversion.m4"	\
+		"$(distdir)/lt~obsolete.m4"
diff --git a/find_apr.m4 b/src/m4/find_apr.m4
similarity index 100%
rename from find_apr.m4
rename to src/m4/find_apr.m4
diff --git a/find_apu.m4 b/src/m4/find_apu.m4
similarity index 100%
rename from find_apu.m4
rename to src/m4/find_apu.m4
diff --git a/src/main/cpp/Makefile.am b/src/main/cpp/Makefile.am
index e809c95..8c1e007 100644
--- a/src/main/cpp/Makefile.am
+++ b/src/main/cpp/Makefile.am
@@ -15,11 +15,11 @@
 #
 lib_LTLIBRARIES = liblog4cxx.la
 
-INCLUDES = -I$(top_srcdir)/src/main/include -I$(top_builddir)/src/main/include
-
+AM_CPPFLAGS = -I$(top_srcdir)/src/main/include -I$(top_builddir)/src/main/include
 
 liblog4cxx_la_SOURCES = \
         action.cpp \
+        andfilter.cpp \
         appenderattachableimpl.cpp \
         appenderskeleton.cpp \
         aprinitializer.cpp \
@@ -81,6 +81,7 @@
         linelocationpatternconverter.cpp \
         lineseparatorpatternconverter.cpp \
         literalpatternconverter.cpp \
+        loggermatchfilter.cpp \
         loggerpatternconverter.cpp \
         loggingeventpatternconverter.cpp \
         loader.cpp\
@@ -168,6 +169,5 @@
         xmlsocketappender.cpp \
         zipcompressaction.cpp
 
-AM_CPPFLAGS = @CPPFLAGS_ODBC@
+AM_CPPFLAGS += @CPPFLAGS_ODBC@
 liblog4cxx_la_LDFLAGS = -version-info @LT_VERSION@ @LIBS_ODBC@ -@APR_LIBS@
-
diff --git a/src/main/cpp/andfilter.cpp b/src/main/cpp/andfilter.cpp
new file mode 100644
index 0000000..9a728a2
--- /dev/null
+++ b/src/main/cpp/andfilter.cpp
@@ -0,0 +1,67 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <log4cxx/filter/andfilter.h>
+#include <log4cxx/spi/loggingevent.h>
+#include <log4cxx/helpers/stringhelper.h>
+#include <log4cxx/helpers/optionconverter.h>
+
+using namespace log4cxx;
+using namespace log4cxx::filter;
+using namespace log4cxx::spi;
+using namespace log4cxx::helpers;
+
+IMPLEMENT_LOG4CXX_OBJECT(AndFilter)
+
+
+AndFilter::AndFilter()
+: headFilter(), tailFilter(), acceptOnMatch(true)
+{
+}
+
+void AndFilter::addFilter(const FilterPtr& filter) {
+    if (headFilter == NULL) {
+      headFilter = filter;
+      tailFilter = filter;
+    } else {
+      tailFilter->setNext(filter);
+    }
+}
+
+
+void AndFilter::setAcceptOnMatch(bool newValue) {
+    acceptOnMatch = newValue;
+}
+
+Filter::FilterDecision AndFilter::decide(
+   const spi::LoggingEventPtr& event) const
+{
+    bool accepted = true;
+    FilterPtr f(headFilter);
+    while (f != NULL) {
+      accepted = accepted && (Filter::ACCEPT == f->decide(event));
+      f = f->getNext();
+    }
+    if (accepted) {
+      if(acceptOnMatch) {
+        return Filter::ACCEPT;
+      }
+       return Filter::DENY;
+    }
+    return Filter::NEUTRAL;
+}
+
diff --git a/src/main/cpp/aprinitializer.cpp b/src/main/cpp/aprinitializer.cpp
index 67c9b2f..1a90a96 100644
--- a/src/main/cpp/aprinitializer.cpp
+++ b/src/main/cpp/aprinitializer.cpp
@@ -21,16 +21,26 @@
 #include <log4cxx/helpers/aprinitializer.h>
 #include <apr_pools.h>
 #include <apr_atomic.h>
-#include <apr_time.h>
 #include <assert.h>
 #include <log4cxx/helpers/threadspecificdata.h>
+#include <apr_thread_mutex.h>
+#include <apr_thread_proc.h>
+#include <log4cxx/helpers/synchronized.h>
+#include <log4cxx/helpers/filewatchdog.h>
 
 using namespace log4cxx::helpers;
 using namespace log4cxx;
 
 bool APRInitializer::isDestructed = false;
 
-APRInitializer::APRInitializer() {
+
+namespace {
+ 	extern "C" void tlsDestruct(void* ptr) {
+  		delete ((ThreadSpecificData*) ptr);
+	}
+}
+
+APRInitializer::APRInitializer() : p(0), mutex(0), startTime(0), tlsKey(0) {
     apr_initialize();
     apr_pool_create(&p, NULL);
     apr_atomic_init(p);
@@ -38,11 +48,28 @@
 #if APR_HAS_THREADS
     apr_status_t stat = apr_threadkey_private_create(&tlsKey, tlsDestruct, p);
     assert(stat == APR_SUCCESS);
+    stat = apr_thread_mutex_create(&mutex, APR_THREAD_MUTEX_NESTED, p);
+    assert(stat == APR_SUCCESS);
 #endif
 }
 
 APRInitializer::~APRInitializer() {
-    apr_terminate();
+    {
+#if APR_HAS_THREADS
+        synchronized sync(mutex);
+        apr_threadkey_private_delete(tlsKey);
+#endif
+        for(std::list<FileWatchdog*>::iterator iter = watchdogs.begin();
+            iter != watchdogs.end();
+            iter++) {
+            delete *iter;
+        }
+    }
+
+// TODO LOGCXX-322
+#ifndef APR_HAS_THREADS
+	apr_terminate();
+#endif
     isDestructed = true;
 }
 
@@ -64,6 +91,27 @@
    return getInstance().tlsKey;
 }
 
-void APRInitializer::tlsDestruct(void* ptr) {
-  delete ((ThreadSpecificData*) ptr);
+void APRInitializer::registerCleanup(FileWatchdog* watchdog) {
+    APRInitializer& instance(getInstance());
+#if APR_HAS_THREADS
+    synchronized sync(instance.mutex);
+#endif
+    instance.watchdogs.push_back(watchdog);
 }
+
+void APRInitializer::unregisterCleanup(FileWatchdog* watchdog) {
+    APRInitializer& instance(getInstance());
+#if APR_HAS_THREADS
+    synchronized sync(instance.mutex);
+#endif
+    for(std::list<FileWatchdog*>::iterator iter = instance.watchdogs.begin();
+        iter != instance.watchdogs.end();
+        iter++) {
+		if(*iter == watchdog)
+		{
+			instance.watchdogs.erase(iter);
+			return;
+		}
+    }
+}
+
diff --git a/src/main/cpp/asyncappender.cpp b/src/main/cpp/asyncappender.cpp
index 9fdb69c..b7a4292 100644
--- a/src/main/cpp/asyncappender.cpp
+++ b/src/main/cpp/asyncappender.cpp
@@ -214,10 +214,10 @@
         return appenders->getAllAppenders();
 }
 
-AppenderPtr AsyncAppender::getAppender(const LogString& name) const
+AppenderPtr AsyncAppender::getAppender(const LogString& n) const
 {
         synchronized sync(appenders->getMutex());
-        return appenders->getAppender(name);
+        return appenders->getAppender(n);
 }
 
 bool AsyncAppender::isAttached(const AppenderPtr& appender) const
@@ -242,10 +242,10 @@
     appenders->removeAppender(appender);
 }
 
-void AsyncAppender::removeAppender(const LogString& name)
+void AsyncAppender::removeAppender(const LogString& n)
 {
     synchronized sync(appenders->getMutex());
-    appenders->removeAppender(name);
+    appenders->removeAppender(n);
 }
 
 bool AsyncAppender::getLocationInfo() const {
@@ -337,7 +337,7 @@
 }
 
 #if APR_HAS_THREADS
-void* LOG4CXX_THREAD_FUNC AsyncAppender::dispatch(apr_thread_t* thread, void* data) {
+void* LOG4CXX_THREAD_FUNC AsyncAppender::dispatch(apr_thread_t* /*thread*/, void* data) {
     AsyncAppender* pThis = (AsyncAppender*) data;
     try {
         while (!pThis->closed) {
diff --git a/src/main/cpp/bytearrayinputstream.cpp b/src/main/cpp/bytearrayinputstream.cpp
old mode 100755
new mode 100644
diff --git a/src/main/cpp/cacheddateformat.cpp b/src/main/cpp/cacheddateformat.cpp
index e7ede1e..825d85f 100644
--- a/src/main/cpp/cacheddateformat.cpp
+++ b/src/main/cpp/cacheddateformat.cpp
@@ -132,25 +132,31 @@
            LogString plusZero;
            formatter->format(plusZero, slotBegin, pool);
 
-           //   If the next 3 characters match the magic
-           //      strings and the remaining fragments are identical
-           //
-           //
+           // Test if the next 1..3 characters match the magic string, main problem is that magic
+           // available millis in formatted can overlap. Therefore the current i is not always the
+           // index of the first millis char, but may be already within the millis. Besides that
+           // the millis can occur everywhere in formatted. See LOGCXX-420 and following.
+           size_t	magicLength		= magicString.length();
+           size_t	overlapping		= magicString.find(plusMagic[i]);
+           int		possibleRetVal	= i - overlapping;
            if (plusZero.length() == formatted.length()
-              && regionMatches(magicString, 0, plusMagic, i, magicString.length())
-              && regionMatches(formattedMillis, 0, formatted, i, magicString.length())
-              && regionMatches(zeroString, 0, plusZero, i, 3)
-              && (formatted.length() == i + 3
-                 || plusZero.compare(i + 3,
-                       LogString::npos, plusMagic, i+3, LogString::npos) == 0)) {
-              return i;
+              && regionMatches(magicString,		0, plusMagic,	possibleRetVal, magicLength)
+              && regionMatches(formattedMillis,	0, formatted,	possibleRetVal, magicLength)
+              && regionMatches(zeroString,		0, plusZero,	possibleRetVal, magicLength)
+              // The following will and should fail for patterns with more than one SSS because
+              // we only seem to be able to change one SSS in e.g. format and need to reformat the
+              // whole string in other cases.
+              && (formatted.length() == possibleRetVal + magicLength
+                 || plusZero.compare(possibleRetVal + magicLength,
+                       LogString::npos, plusMagic, possibleRetVal + magicLength, LogString::npos) == 0)) {
+              return possibleRetVal;
            } else {
               return UNRECOGNIZED_MILLISECONDS;
           }
         }
      }
   }
-  return  NO_MILLISECONDS;
+  return NO_MILLISECONDS;
 }
 
 
@@ -176,18 +182,16 @@
   //     (that is if it was found or milliseconds did not appear)
   //
   if (millisecondStart != UNRECOGNIZED_MILLISECONDS) {
-
       //    Check if the cache is still valid.
       //    If the requested time is within the same integral second
       //       as the last request and a shorter expiration was not requested.
       if (now < slotBegin + expiration
           && now >= slotBegin
           && now < slotBegin + 1000000L) {
-
           //
           //    if there was a millisecond field then update it
           //
-          if (millisecondStart >= 0 ) {
+          if (millisecondStart >= 0) {
               millisecondFormat((int) ((now - slotBegin)/1000), cache, millisecondStart);
           }
           //
@@ -195,11 +199,11 @@
           //      (the slot begin should be unchanged)
           previousTime = now;
           buf.append(cache);
+
           return;
       }
   }
 
-
   //
   //  could not use previous value.
   //    Call underlying formatter to format date.
@@ -212,7 +216,6 @@
       slotBegin -= 1000000;
   }
 
-
   //
   //    if the milliseconds field was previous found
   //       then reevaluate in case it moved.
@@ -222,10 +225,9 @@
   }
 }
 
-
 /**
  *   Formats a count of milliseconds (0-999) into a numeric representation.
- *   @param millis Millisecond coun between 0 and 999.
+ *   @param millis Millisecond count between 0 and 999.
  *   @buf String buffer, may not be null.
  *   @offset Starting position in buffer, the length of the
  *       buffer must be at least offset + 3.
@@ -233,7 +235,7 @@
 void CachedDateFormat::millisecondFormat(int millis,
      LogString& buf,
      int offset) {
-     buf[offset] = digits[ millis / 100];
+     buf[offset] = digits[millis / 100];
      buf[offset + 1] = digits[(millis / 10) % 10];
      buf[offset + 2] = digits[millis  % 10];
  }
diff --git a/src/main/cpp/charsetdecoder.cpp b/src/main/cpp/charsetdecoder.cpp
index be7247e..aa5a6a0 100644
--- a/src/main/cpp/charsetdecoder.cpp
+++ b/src/main/cpp/charsetdecoder.cpp
@@ -177,7 +177,7 @@
                                break;
                            } else {
                                stat = append(out, buf);
-                               in.position(in.position() + converted);
+                               in.position(in.position() + requested);
                            }
                       }
                   }
@@ -476,7 +476,7 @@
         StringHelper::equalsIgnoreCase(charset, LOG4CXX_STR("ISO-LATIN-1"), LOG4CXX_STR("iso-latin-1"))) {
         return new ISOLatinCharsetDecoder();
     }
-#if APR_HAS_XLATE || !defined(_WIN32)
+#if APR_HAS_XLATE
     return new APRCharsetDecoder(charset);
 #else
     throw IllegalArgumentException(charset);
diff --git a/src/main/cpp/charsetencoder.cpp b/src/main/cpp/charsetencoder.cpp
index 5a7089c..1b0c626 100644
--- a/src/main/cpp/charsetencoder.cpp
+++ b/src/main/cpp/charsetencoder.cpp
@@ -21,14 +21,20 @@
 #include <apr_xlate.h>
 #include <log4cxx/helpers/stringhelper.h>
 #include <log4cxx/helpers/transcoder.h>
+
 #if !defined(LOG4CXX)
 #define LOG4CXX 1
 #endif
+
 #include <log4cxx/private/log4cxx_private.h>
 #include <apr_portable.h>
 #include <log4cxx/helpers/mutex.h>
 #include <log4cxx/helpers/synchronized.h>
 
+#ifdef LOG4CXX_HAS_WCSTOMBS
+#include <stdlib.h>
+#endif
+
 using namespace log4cxx;
 using namespace log4cxx::helpers;
 
@@ -400,7 +406,7 @@
                             Transcoder::decode(encoding, ename);
                             try {
                                 encoder = CharsetEncoder::getEncoder(ename);
-                            } catch(IllegalArgumentException ex) {
+                            } catch(IllegalArgumentException &ex) {
                                 encoder = new USASCIICharsetEncoder();
                             }
                         }
@@ -484,7 +490,7 @@
     } else if (StringHelper::equalsIgnoreCase(charset, LOG4CXX_STR("UTF-16LE"), LOG4CXX_STR("utf-16le"))) {
         return new UTF16LECharsetEncoder();
     }
-#if APR_HAS_XLATE || !defined(_WIN32)
+#if APR_HAS_XLATE
     return new APRCharsetEncoder(charset);
 #else
     throw IllegalArgumentException(charset);
diff --git a/src/main/cpp/condition.cpp b/src/main/cpp/condition.cpp
old mode 100755
new mode 100644
diff --git a/src/main/cpp/consoleappender.cpp b/src/main/cpp/consoleappender.cpp
index 4a2ff5d..732fb80 100644
--- a/src/main/cpp/consoleappender.cpp
+++ b/src/main/cpp/consoleappender.cpp
@@ -36,9 +36,9 @@
  :target(getSystemOut())
 {
     setLayout(layout1);
-    WriterPtr wr(createWriter(getSystemOut()));
-    setWriter(wr);
     Pool p;
+    WriterPtr writer1(new SystemOutWriter());
+    setWriter(writer1);
     WriterAppender::activateOptions(p);
 }
 
@@ -46,10 +46,8 @@
  : target(target1)
 {
       setLayout(layout1);
-      WriterPtr wr(createWriter(target1));
-      setWriter(wr);
       Pool p;
-      WriterAppender::activateOptions(p);
+      ConsoleAppender::activateOptions(p);
 }
 
 ConsoleAppender::~ConsoleAppender()
@@ -67,16 +65,6 @@
   return name;
 }
 
-WriterPtr ConsoleAppender::createWriter(const LogString& value) {
-  LogString v = StringHelper::trim(value);
-
-  if (StringHelper::equalsIgnoreCase(v,
-         LOG4CXX_STR("SYSTEM.ERR"), LOG4CXX_STR("system.err"))) {
-          return new SystemErrWriter();
-  }
-  return new SystemOutWriter();
-}
-
 void ConsoleAppender::setTarget(const LogString& value)
 {
         LogString v = StringHelper::trim(value);
diff --git a/src/main/cpp/dailyrollingfileappender.cpp b/src/main/cpp/dailyrollingfileappender.cpp
index 62ef3f6..87f7891 100644
--- a/src/main/cpp/dailyrollingfileappender.cpp
+++ b/src/main/cpp/dailyrollingfileappender.cpp
@@ -37,25 +37,25 @@
 
 
 DailyRollingFileAppender::DailyRollingFileAppender(
-  const LayoutPtr& layout,
+  const LayoutPtr& l,
   const LogString& filename,
   const LogString& datePattern1)
   : datePattern(datePattern1) {
-    setLayout(layout);
+    setLayout(l);
     setFile(filename);
     Pool p;
     activateOptions(p);
 }
 
-void DailyRollingFileAppender::setDatePattern(const LogString& pattern) {
-   datePattern = pattern;
+void DailyRollingFileAppender::setDatePattern(const LogString& newPattern) {
+   datePattern = newPattern;
 }
 
 LogString DailyRollingFileAppender::getDatePattern() {
   return datePattern;
 }
 
-void DailyRollingFileAppender::activateOptions(log4cxx::helpers::Pool& pool) {
+void DailyRollingFileAppender::activateOptions(log4cxx::helpers::Pool& p) {
   TimeBasedRollingPolicyPtr policy = new TimeBasedRollingPolicy();
   LogString pattern(getFile());
   bool inLiteral = false;
@@ -85,11 +85,11 @@
   }
 
   policy->setFileNamePattern(pattern);
-  policy->activateOptions(pool);
+  policy->activateOptions(p);
   setTriggeringPolicy(policy);
   setRollingPolicy(policy);
 
-  RollingFileAppenderSkeleton::activateOptions(pool);
+  RollingFileAppenderSkeleton::activateOptions(p);
 }
 
 
diff --git a/src/main/cpp/date.cpp b/src/main/cpp/date.cpp
index 81e4546..e7703a8 100644
--- a/src/main/cpp/date.cpp
+++ b/src/main/cpp/date.cpp
@@ -17,19 +17,16 @@
 #include <log4cxx/logstring.h>
 #include <log4cxx/helpers/date.h>
 
-
+#include <apr_time.h>
 #ifndef INT64_C
 #define INT64_C(x) x ## LL
 #endif
 
-
-#include <apr_time.h>
 using namespace log4cxx;
 using namespace log4cxx::helpers;
 
 IMPLEMENT_LOG4CXX_OBJECT(Date)
 
-
 Date::Date() : time(apr_time_now()) {
 }
 
diff --git a/src/main/cpp/defaultconfigurator.cpp b/src/main/cpp/defaultconfigurator.cpp
old mode 100755
new mode 100644
diff --git a/src/main/cpp/domconfigurator.cpp b/src/main/cpp/domconfigurator.cpp
index 10b328b..618048a 100644
--- a/src/main/cpp/domconfigurator.cpp
+++ b/src/main/cpp/domconfigurator.cpp
@@ -46,6 +46,9 @@
 #include <log4cxx/net/smtpappender.h>
 #include <log4cxx/helpers/messagebuffer.h>
 
+#define LOG4CXX 1
+#include <log4cxx/helpers/aprinitializer.h>
+
 using namespace log4cxx;
 using namespace log4cxx::xml;
 using namespace log4cxx::helpers;
@@ -55,23 +58,30 @@
 
 
 #if APR_HAS_THREADS
-class XMLWatchdog  : public FileWatchdog
+namespace log4cxx
 {
-public:
-        XMLWatchdog(const File& filename) : FileWatchdog(filename)
-        {
-        }
+    namespace xml
+    {
+		class XMLWatchdog  : public FileWatchdog
+		{
+		public:
+			XMLWatchdog(const File& filename) : FileWatchdog(filename)
+			{
+			}
 
-        /**
-        Call DOMConfigurator#doConfigure with the
-        <code>filename</code> to reconfigure log4cxx.
-        */
-        void doOnChange()
-        {
-                DOMConfigurator().doConfigure(file,
-                        LogManager::getLoggerRepository());
-        }
-};
+			/**
+			Call DOMConfigurator#doConfigure with the
+			<code>filename</code> to reconfigure log4cxx.
+			*/
+			void doOnChange()
+			{
+				DOMConfigurator().doConfigure(file,
+						LogManager::getLoggerRepository());
+			}
+		};
+	}
+}
+XMLWatchdog *DOMConfigurator::xdog = NULL;
 #endif
 
 
@@ -285,6 +295,7 @@
                                         apr_xml_doc* doc,
                                         AppenderMap& appenders)
 {
+
     ErrorHandlerPtr eh = OptionConverter::instantiateByClassName(
                 subst(getAttribute(utf8Decoder, element, CLASS_ATTR)),
                 ErrorHandler::getStaticClass(),
@@ -321,7 +332,10 @@
                                 }
                 }
                 propSetter.activate(p);
-//                appender->setErrorHandler(eh);
+                ObjectPtrT<AppenderSkeleton> appSkeleton(appender);
+                if (appSkeleton != 0) {
+                    appSkeleton->setErrorHandler(eh);
+                }
     }
 }
 
@@ -721,8 +735,8 @@
             msg2.append(LOG4CXX_STR("]."));
             LogLog::error(msg2);
         } else {
-            apr_xml_parser *parser;
-            apr_xml_doc *doc;
+            apr_xml_parser *parser = NULL;
+            apr_xml_doc *doc = NULL;
             rv = apr_xml_parse_file(p.getAPRPool(), &parser, &doc, fd, 2000);
             if (rv != APR_SUCCESS) {
                 char errbuf[2000];
@@ -732,10 +746,13 @@
                 msg2.append(LOG4CXX_STR("], "));
                 apr_strerror(rv, errbuf, sizeof(errbuf));
                 LOG4CXX_DECODE_CHAR(lerrbuf, std::string(errbuf));
-                apr_xml_parser_geterror(parser, errbufXML, sizeof(errbufXML));
-                LOG4CXX_DECODE_CHAR(lerrbufXML, std::string(errbufXML));
                 msg2.append(lerrbuf);
-                msg2.append(lerrbufXML);
+		if(parser)
+                {
+                    apr_xml_parser_geterror(parser, errbufXML, sizeof(errbufXML));
+                    LOG4CXX_DECODE_CHAR(lerrbufXML, std::string(errbufXML));
+                    msg2.append(lerrbufXML);
+                }
                 LogLog::error(msg2);
             } else {
                 AppenderMap appenders;
@@ -806,7 +823,13 @@
 {
         File file(filename);
 #if APR_HAS_THREADS
-        XMLWatchdog * xdog = new XMLWatchdog(file);
+		if( xdog )
+		{
+			APRInitializer::unregisterCleanup(xdog);
+			delete xdog;
+		}
+        xdog = new XMLWatchdog(file);
+        APRInitializer::registerCleanup(xdog);
         xdog->setDelay(delay);
         xdog->start();
 #else
@@ -819,7 +842,13 @@
 {
         File file(filename);
 #if APR_HAS_THREADS
-        XMLWatchdog * xdog = new XMLWatchdog(file);
+		if( xdog )
+		{
+			APRInitializer::unregisterCleanup(xdog);
+			delete xdog;
+		}
+        xdog = new XMLWatchdog(file);
+        APRInitializer::registerCleanup(xdog);
         xdog->setDelay(delay);
         xdog->start();
 #else
@@ -833,7 +862,13 @@
 {
         File file(filename);
 #if APR_HAS_THREADS
-        XMLWatchdog * xdog = new XMLWatchdog(file);
+		if( xdog )
+		{
+			APRInitializer::unregisterCleanup(xdog);
+			delete xdog;
+		}
+        xdog = new XMLWatchdog(file);
+        APRInitializer::registerCleanup(xdog);
         xdog->setDelay(delay);
         xdog->start();
 #else
@@ -847,7 +882,13 @@
 {
         File file(filename);
 #if APR_HAS_THREADS
-        XMLWatchdog * xdog = new XMLWatchdog(file);
+		if( xdog )
+		{
+			APRInitializer::unregisterCleanup(xdog);
+			delete xdog;
+		}
+        xdog = new XMLWatchdog(file);
+        APRInitializer::registerCleanup(xdog);
         xdog->setDelay(delay);
         xdog->start();
 #else
diff --git a/src/main/cpp/fileappender.cpp b/src/main/cpp/fileappender.cpp
index 66b90d2..70d42bd 100644
--- a/src/main/cpp/fileappender.cpp
+++ b/src/main/cpp/fileappender.cpp
@@ -160,7 +160,7 @@
       msg.append(1, (logchar) 0x2C /* ',' */);
       StringHelper::toString(fileAppend, msg);
       msg.append(LOG4CXX_STR(") call failed."));
-      LogLog::error(msg, e);
+      errorHandler->error(msg, e, ErrorCode::FILE_OPEN_FAILURE);
     }
   } else {
     errors++;
@@ -275,10 +275,10 @@
           if(!parentDir.exists(p) && parentDir.mkdirs(p)) {
              outStream = new FileOutputStream(filename, append1);
           } else {
-             throw ex;
+             throw;
           }
       } else {
-        throw ex;
+        throw;
       }
   }
 
diff --git a/src/main/cpp/filewatchdog.cpp b/src/main/cpp/filewatchdog.cpp
index d41f80a..c9ea95a 100644
--- a/src/main/cpp/filewatchdog.cpp
+++ b/src/main/cpp/filewatchdog.cpp
@@ -22,7 +22,7 @@
 #include <apr_thread_proc.h>
 #include <apr_atomic.h>
 #include <log4cxx/helpers/transcoder.h>
-
+#include <log4cxx/helpers/exception.h>
 
 using namespace log4cxx;
 using namespace log4cxx::helpers;
@@ -39,7 +39,11 @@
 
 FileWatchdog::~FileWatchdog() {
    apr_atomic_set32(&interrupted, 0xFFFF);
-   thread.join();
+   try {
+        thread.interrupt();
+        thread.join();
+   } catch(Exception &e) {
+   }
 }
 
 void FileWatchdog::checkAndConfigure()
@@ -73,10 +77,10 @@
    unsigned int interrupted = apr_atomic_read32(&pThis->interrupted);
     while(!interrupted)
    {
-      apr_sleep(APR_INT64_C(1000) * pThis->delay);
-      interrupted = apr_atomic_read32(&pThis->interrupted);
-      if (!interrupted) {
+      try {
+        Thread::sleep(pThis->delay);
         pThis->checkAndConfigure();
+      } catch(InterruptedException& ex) {
         interrupted = apr_atomic_read32(&pThis->interrupted);
       }
     }
diff --git a/src/main/cpp/fixedwindowrollingpolicy.cpp b/src/main/cpp/fixedwindowrollingpolicy.cpp
index 0e94007..57f71aa 100644
--- a/src/main/cpp/fixedwindowrollingpolicy.cpp
+++ b/src/main/cpp/fixedwindowrollingpolicy.cpp
@@ -97,19 +97,22 @@
  * {@inheritDoc}
  */
 RolloverDescriptionPtr FixedWindowRollingPolicy::initialize(
-  const LogString& file, bool append, log4cxx::helpers::Pool& p) {
-  LogString newActiveFile(file);
+	const	LogString&	currentActiveFile,
+	const	bool		append,
+			Pool&		pool)
+{
+  LogString newActiveFile(currentActiveFile);
   explicitActiveFile = false;
 
-  if (file.length() > 0) {
+  if (currentActiveFile.length() > 0) {
     explicitActiveFile = true;
-    newActiveFile = file;
+    newActiveFile = currentActiveFile;
   }
 
   if (!explicitActiveFile) {
     LogString buf;
     ObjectPtr obj(new Integer(minIndex));
-    formatFileName(obj, buf, p);
+    formatFileName(obj, buf, pool);
     newActiveFile = buf;
   }
 
@@ -122,49 +125,67 @@
  * {@inheritDoc}
  */
 RolloverDescriptionPtr FixedWindowRollingPolicy::rollover(
-    const LogString& currentFileName,
-    log4cxx::helpers::Pool& p) {
-  RolloverDescriptionPtr desc;
-  if (maxIndex >= 0) {
-    int purgeStart = minIndex;
+	const	LogString&	currentActiveFile,
+	const	bool		append,
+			Pool&		pool)
+{
+	RolloverDescriptionPtr desc;
 
-    if (!explicitActiveFile) {
-      purgeStart++;
-    }
+	if (maxIndex < 0)
+	{
+		return desc;
+	}
 
-    if (!purge(purgeStart, maxIndex, p)) {
-      return desc;
-    }
+	int purgeStart = minIndex;
 
-    LogString buf;
-    ObjectPtr obj(new Integer(purgeStart));
-    formatFileName(obj, buf, p);
+	if (!explicitActiveFile)
+	{
+		purgeStart++;
+	}
 
-    LogString renameTo(buf);
-    LogString compressedName(renameTo);
-    ActionPtr compressAction ;
+	if (!purge(purgeStart, maxIndex, pool))
+	{
+		return desc;
+	}
 
-    if (StringHelper::endsWith(renameTo, LOG4CXX_STR(".gz"))) {
-      renameTo.resize(renameTo.size() - 3);
-      compressAction =
-        new GZCompressAction(
-          File().setPath(renameTo), File().setPath(compressedName), true);
-    } else if (StringHelper::endsWith(renameTo, LOG4CXX_STR(".zip"))) {
-      renameTo.resize(renameTo.size() - 4);
-      compressAction =
-        new ZipCompressAction(
-          File().setPath(renameTo), File().setPath(compressedName), true);
-    }
+	LogString buf;
+	ObjectPtr obj(new Integer(purgeStart));
+	formatFileName(obj, buf, pool);
 
-    FileRenameActionPtr renameAction =
-      new FileRenameAction(
-        File().setPath(currentFileName), File().setPath(renameTo), false);
+	LogString renameTo(buf);
+	LogString compressedName(renameTo);
+	ActionPtr compressAction ;
 
-    desc = new RolloverDescription(
-      currentFileName, false, renameAction, compressAction);
-  }
+	if (StringHelper::endsWith(renameTo, LOG4CXX_STR(".gz")))
+	{
+		renameTo.resize(renameTo.size() - 3);
+		compressAction =
+			new GZCompressAction(
+				File().setPath(renameTo),
+				File().setPath(compressedName),
+				true);
+	}
+	else if (StringHelper::endsWith(renameTo, LOG4CXX_STR(".zip")))
+	{
+		renameTo.resize(renameTo.size() - 4);
+		compressAction =
+			new ZipCompressAction(
+				File().setPath(renameTo),
+				File().setPath(compressedName),
+				true);
+	}
 
-  return desc;
+	FileRenameActionPtr renameAction =
+		new FileRenameAction(
+			File().setPath(currentActiveFile),
+			File().setPath(renameTo),
+			false);
+
+	desc = new RolloverDescription(
+		currentActiveFile,	append,
+		renameAction,		compressAction);
+
+	return desc;
 }
 
 /**
diff --git a/src/main/cpp/gzcompressaction.cpp b/src/main/cpp/gzcompressaction.cpp
index 2b30b6d..b6d0739 100644
--- a/src/main/cpp/gzcompressaction.cpp
+++ b/src/main/cpp/gzcompressaction.cpp
@@ -35,9 +35,9 @@
 
 bool GZCompressAction::execute(log4cxx::helpers::Pool& p) const {
     if (source.exists(p)) {
-        apr_pool_t* pool = p.getAPRPool();
+        apr_pool_t* aprpool = p.getAPRPool();
         apr_procattr_t* attr;
-        apr_status_t stat = apr_procattr_create(&attr, pool);
+        apr_status_t stat = apr_procattr_create(&attr, aprpool);
         if (stat != APR_SUCCESS) throw IOException(stat);
 
         stat = apr_procattr_io_set(attr, APR_NO_PIPE, APR_FULL_BLOCK, APR_FULL_BLOCK);
@@ -62,14 +62,14 @@
         //   redirect the child's error stream to this processes' error stream
         //
         apr_file_t* child_err;
-        stat = apr_file_open_stderr(&child_err, pool);
+        stat = apr_file_open_stderr(&child_err, aprpool);
         if (stat == APR_SUCCESS) {
          stat =  apr_procattr_child_err_set(attr, child_err, NULL);
          if (stat != APR_SUCCESS) throw IOException(stat);
         }
 
         const char** args = (const char**)
-            apr_palloc(pool, 4 *sizeof(*args));
+            apr_palloc(aprpool, 4 *sizeof(*args));
         int i = 0;
         args[i++] = "gzip";
         args[i++] = "-c";
@@ -78,7 +78,7 @@
 
 
         apr_proc_t pid;
-        stat = apr_proc_create(&pid, "gzip", args, NULL, attr, pool);
+        stat = apr_proc_create(&pid, "gzip", args, NULL, attr, aprpool);
         if (stat != APR_SUCCESS) throw IOException(stat);
 
         apr_proc_wait(&pid, NULL, NULL, APR_WAIT);
diff --git a/src/main/cpp/hierarchy.cpp b/src/main/cpp/hierarchy.cpp
index 88fc4f7..fc80d77 100644
--- a/src/main/cpp/hierarchy.cpp
+++ b/src/main/cpp/hierarchy.cpp
@@ -67,8 +67,12 @@
 
 Hierarchy::~Hierarchy()
 {
-    delete loggers;
-    delete provisionNodes;
+// TODO LOGCXX-430
+// https://issues.apache.org/jira/browse/LOGCXX-430?focusedCommentId=15175254&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-15175254
+#ifndef APR_HAS_THREADS
+	delete loggers;
+	delete provisionNodes;
+#endif
 }
 
 void Hierarchy::addRef() const {
@@ -333,9 +337,9 @@
         bool parentFound = false;
 
 
-        // if name = "w.x.y.z", loop thourgh "w.x.y", "w.x" and "w", but not "w.x.y.z"
+        // if name = "w.x.y.z", loop through "w.x.y", "w.x" and "w", but not "w.x.y.z"
         for(size_t i = name.find_last_of(0x2E /* '.' */, length-1);
-            i != LogString::npos;
+            (i != LogString::npos) && (i != 0);
             i = name.find_last_of(0x2E /* '.' */, i-1))
         {
                 LogString substr = name.substr(0, i);
diff --git a/src/main/cpp/inputstreamreader.cpp b/src/main/cpp/inputstreamreader.cpp
index 2f78490..cacdf1b 100644
--- a/src/main/cpp/inputstreamreader.cpp
+++ b/src/main/cpp/inputstreamreader.cpp
@@ -21,6 +21,9 @@
 #include <log4cxx/helpers/pool.h>
 #include <log4cxx/helpers/bytebuffer.h>
 
+#include <cstdio>
+#include <cstring>
+
 using namespace log4cxx;
 using namespace log4cxx::helpers;
 
diff --git a/src/main/cpp/level.cpp b/src/main/cpp/level.cpp
index f784203..ce679a4 100644
--- a/src/main/cpp/level.cpp
+++ b/src/main/cpp/level.cpp
@@ -30,44 +30,36 @@
 IMPLEMENT_LOG4CXX_OBJECT_WITH_CUSTOM_CLASS(Level, LevelClass)
 
 LevelPtr Level::getOff() {
-   static LevelPtr level(new Level(Level::OFF_INT, LOG4CXX_STR("OFF"), 0));
-   return level;
+   return LevelPtr(new Level(Level::OFF_INT, LOG4CXX_STR("OFF"), 0));
 }
 
 LevelPtr Level::getFatal() {
-   static LevelPtr level(new Level(Level::FATAL_INT, LOG4CXX_STR("FATAL"), 0));
-   return level;
+   return LevelPtr(new Level(Level::FATAL_INT, LOG4CXX_STR("FATAL"), 0));
 }
 
 LevelPtr Level::getError() {
-   static LevelPtr level(new Level(Level::ERROR_INT, LOG4CXX_STR("ERROR"), 3));
-   return level;
+   return LevelPtr(new Level(Level::ERROR_INT, LOG4CXX_STR("ERROR"), 3));
 }
 
 LevelPtr Level::getWarn() {
-   static LevelPtr level(new Level(Level::WARN_INT, LOG4CXX_STR("WARN"), 4));
-   return level;
+   return LevelPtr(new Level(Level::WARN_INT, LOG4CXX_STR("WARN"), 4));
 }
 
 LevelPtr Level::getInfo() {
-   static LevelPtr level(new Level(Level::INFO_INT, LOG4CXX_STR("INFO"), 6));
-   return level;
+   return LevelPtr(new Level(Level::INFO_INT, LOG4CXX_STR("INFO"), 6));
 }
 
 LevelPtr Level::getDebug() {
-   static LevelPtr level(new Level(Level::DEBUG_INT, LOG4CXX_STR("DEBUG"), 7));
-   return level;
+   return LevelPtr(new Level(Level::DEBUG_INT, LOG4CXX_STR("DEBUG"), 7));
 }
 
 LevelPtr Level::getTrace() {
-   static LevelPtr level(new Level(Level::TRACE_INT, LOG4CXX_STR("TRACE"), 7));
-   return level;
+   return LevelPtr(new Level(Level::TRACE_INT, LOG4CXX_STR("TRACE"), 7));
 }
 
 
 LevelPtr Level::getAll() {
-   static LevelPtr level(new Level(Level::ALL_INT, LOG4CXX_STR("ALL"), 7));
-   return level;
+   return LevelPtr(new Level(Level::ALL_INT, LOG4CXX_STR("ALL"), 7));
 }
 
 
@@ -183,35 +175,36 @@
 
 LevelPtr Level::toLevelLS(const LogString& sArg, const LevelPtr& defaultLevel)
 {
-    const size_t len = sArg.length();
+    const LogString trimmed(StringHelper::trim(sArg));
+    const size_t len = trimmed.length();
 
     if (len == 4) {
-      if (StringHelper::equalsIgnoreCase(sArg, LOG4CXX_STR("INFO"), LOG4CXX_STR("info"))) {
+      if (StringHelper::equalsIgnoreCase(trimmed, LOG4CXX_STR("INFO"), LOG4CXX_STR("info"))) {
         return getInfo();
       }
-      if (StringHelper::equalsIgnoreCase(sArg, LOG4CXX_STR("WARN"), LOG4CXX_STR("warn"))) {
+      if (StringHelper::equalsIgnoreCase(trimmed, LOG4CXX_STR("WARN"), LOG4CXX_STR("warn"))) {
         return getWarn();
       }
     } else {
       if (len == 5) {
-        if (StringHelper::equalsIgnoreCase(sArg, LOG4CXX_STR("DEBUG"), LOG4CXX_STR("debug"))) {
+        if (StringHelper::equalsIgnoreCase(trimmed, LOG4CXX_STR("DEBUG"), LOG4CXX_STR("debug"))) {
           return getDebug();
         }
-        if (StringHelper::equalsIgnoreCase(sArg, LOG4CXX_STR("TRACE"), LOG4CXX_STR("trace"))) {
+        if (StringHelper::equalsIgnoreCase(trimmed, LOG4CXX_STR("TRACE"), LOG4CXX_STR("trace"))) {
           return getTrace();
         }
-        if (StringHelper::equalsIgnoreCase(sArg, LOG4CXX_STR("ERROR"), LOG4CXX_STR("error"))) {
+        if (StringHelper::equalsIgnoreCase(trimmed, LOG4CXX_STR("ERROR"), LOG4CXX_STR("error"))) {
           return getError();
         }
-        if (StringHelper::equalsIgnoreCase(sArg, LOG4CXX_STR("FATAL"), LOG4CXX_STR("fatal"))) {
+        if (StringHelper::equalsIgnoreCase(trimmed, LOG4CXX_STR("FATAL"), LOG4CXX_STR("fatal"))) {
           return getFatal();
         }
       } else {
         if (len == 3) {
-          if (StringHelper::equalsIgnoreCase(sArg, LOG4CXX_STR("OFF"), LOG4CXX_STR("off"))) {
+          if (StringHelper::equalsIgnoreCase(trimmed, LOG4CXX_STR("OFF"), LOG4CXX_STR("off"))) {
             return getOff();
           }
-          if (StringHelper::equalsIgnoreCase(sArg, LOG4CXX_STR("ALL"), LOG4CXX_STR("all"))) {
+          if (StringHelper::equalsIgnoreCase(trimmed, LOG4CXX_STR("ALL"), LOG4CXX_STR("all"))) {
             return getAll();
           }
         }
diff --git a/src/main/cpp/levelrangefilter.cpp b/src/main/cpp/levelrangefilter.cpp
index 4bf2963..cb3a8df 100644
--- a/src/main/cpp/levelrangefilter.cpp
+++ b/src/main/cpp/levelrangefilter.cpp
@@ -31,7 +31,7 @@
 
 
 LevelRangeFilter::LevelRangeFilter()
-: acceptOnMatch(true), levelMin(Level::getAll()), levelMax(Level::getOff())
+: acceptOnMatch(false), levelMin(Level::getAll()), levelMax(Level::getOff())
 {
 }
 
diff --git a/src/main/cpp/locationinfo.cpp b/src/main/cpp/locationinfo.cpp
index 07ecb13..a848c95 100644
--- a/src/main/cpp/locationinfo.cpp
+++ b/src/main/cpp/locationinfo.cpp
@@ -112,7 +112,11 @@
  const std::string LocationInfo::getMethodName() const
 {
     std::string tmp(methodName);
-    size_t colonPos = tmp.find("::");
+    size_t parenPos = tmp.find('(');
+    if (parenPos != std::string::npos) {
+      tmp.erase(parenPos);
+    }
+    size_t colonPos = tmp.rfind("::");
     if (colonPos != std::string::npos) {
       tmp.erase(0, colonPos + 2);
     } else {
@@ -121,17 +125,17 @@
         tmp.erase(0, spacePos + 1);
       }
     }
-    size_t parenPos = tmp.find('(');
-    if (parenPos != std::string::npos) {
-      tmp.erase(parenPos);
-    }
     return tmp;
 }
 
 
 const std::string LocationInfo::getClassName() const {
         std::string tmp(methodName);
-        size_t colonPos = tmp.find("::");
+        size_t parenPos = tmp.find('(');
+        if (parenPos != std::string::npos) {
+          tmp.erase(parenPos);
+        }
+        size_t colonPos = tmp.rfind("::");
         if (colonPos != std::string::npos) {
            tmp.erase(colonPos);
            size_t spacePos = tmp.find_last_of(' ');
@@ -148,20 +152,22 @@
     if (lineNumber == -1 && fileName == NA && methodName == NA_METHOD) {
          os.writeNull(p);
     } else {
-        char prolog[] = {
-         0x72, 0x00, 0x21, 0x6F, 0x72, 0x67, 0x2E,
-         0x61, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2E, 0x6C,
-         0x6F, 0x67, 0x34, 0x6A, 0x2E, 0x73, 0x70, 0x69,
-         0x2E, 0x4C, 0x6F, 0x63, 0x61, 0x74, 0x69, 0x6F,
-         0x6E, 0x49, 0x6E, 0x66, 0x6F, 0xED, 0x99, 0xBB,
-         0xE1, 0x4A, 0x91, 0xA5, 0x7C, 0x02, 0x00, 0x01,
-         0x4C, 0x00, 0x08, 0x66, 0x75, 0x6C, 0x6C, 0x49,
-         0x6E, 0x66, 0x6F,
-            0x74, 0x00, 0x12, 0x4C, 0x6A,
-                0x61, 0x76, 0x61, 0x2F, 0x6C, 0x61, 0x6E, 0x67,
-                0x2F, 0x53, 0x74, 0x72, 0x69, 0x6E, 0x67, 0x3B,
-         0x78, 0x70 };
-      os.writeProlog("org.apache.log4j.spi.LocationInfo", 2, prolog, sizeof(prolog), p);
+        unsigned char prolog[] = {
+         0x72,
+         0x00,
+         0x21, 0x6F, 0x72, 0x67, 0x2E, 0x61, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2E,
+         0x6C, 0x6F, 0x67, 0x34, 0x6A, 0x2E, 0x73, 0x70, 0x69, 0x2E, 0x4C, 0x6F,
+         0x63, 0x61, 0x74, 0x69, 0x6F, 0x6E, 0x49, 0x6E, 0x66, 0x6F, 0xED, 0x99,
+         0xBB, 0xE1, 0x4A, 0x91, 0xA5, 0x7C, 0x02,
+         0x00,
+         0x01, 0x4C,
+         0x00,
+         0x08, 0x66, 0x75, 0x6C, 0x6C, 0x49, 0x6E, 0x66, 0x6F, 0x74,
+         0x00,
+         0x12, 0x4C, 0x6A, 0x61, 0x76, 0x61, 0x2F, 0x6C, 0x61, 0x6E, 0x67, 0x2F,
+         0x53, 0x74, 0x72, 0x69, 0x6E, 0x67, 0x3B, 0x78, 0x70
+        };
+      os.writeProlog("org.apache.log4j.spi.LocationInfo", 2, (char*) prolog, sizeof(prolog), p);
         char* line = p.itoa(lineNumber);
         //
         //   construct Java-like fullInfo (replace "::" with ".")
diff --git a/src/main/cpp/logger.cpp b/src/main/cpp/logger.cpp
index 15f748c..8c9a379 100644
--- a/src/main/cpp/logger.cpp
+++ b/src/main/cpp/logger.cpp
@@ -45,7 +45,6 @@
 : pool(&p), name(), level(), parent(), resourceBundle(),
 repository(), aai(), SHARED_MUTEX_INIT(mutex, p)
 {
-    LOCK_W sync(mutex);
     name = name1;
     additive = true;
 }
@@ -64,6 +63,8 @@
 
 void Logger::addAppender(const AppenderPtr& newAppender)
 {
+   log4cxx::spi::LoggerRepository* rep = 0;
+   {
         LOCK_W sync(mutex);
 
         if (aai == 0)
@@ -71,8 +72,10 @@
                   aai = new AppenderAttachableImpl(*pool);
         }
         aai->addAppender(newAppender);
-   if (repository != 0) {
-           repository->fireAddAppenderEvent(this, newAppender);
+        rep = repository;
+   }
+   if (rep != 0) {
+           rep->fireAddAppenderEvent(this, newAppender);
    }
 }
 
@@ -426,7 +429,7 @@
   std::vector<LogString> values(3);
   values[0] = lval1;
   values[1] = lval2;
-  values[3] = lval3;
+  values[2] = lval3;
   l7dlog(level1, lkey, location, values);
 }
 
diff --git a/src/main/cpp/loggermatchfilter.cpp b/src/main/cpp/loggermatchfilter.cpp
new file mode 100644
index 0000000..4a4d59f
--- /dev/null
+++ b/src/main/cpp/loggermatchfilter.cpp
@@ -0,0 +1,75 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <log4cxx/logstring.h>
+#include <log4cxx/filter/loggermatchfilter.h>
+#include <log4cxx/spi/loggingevent.h>
+#include <log4cxx/helpers/stringhelper.h>
+#include <log4cxx/helpers/optionconverter.h>
+
+using namespace log4cxx;
+using namespace log4cxx::filter;
+using namespace log4cxx::spi;
+using namespace log4cxx::helpers;
+
+IMPLEMENT_LOG4CXX_OBJECT(LoggerMatchFilter)
+
+
+LoggerMatchFilter::LoggerMatchFilter()
+: acceptOnMatch(true), loggerToMatch(LOG4CXX_STR("root"))
+{
+}
+
+void LoggerMatchFilter::setLoggerToMatch(const LogString& value) {
+    loggerToMatch = value;
+}
+
+LogString LoggerMatchFilter::getLoggerToMatch() const {
+    return loggerToMatch;
+}
+
+void LoggerMatchFilter::setOption(const LogString& option,
+   const LogString& value)
+{
+
+   if (StringHelper::equalsIgnoreCase(option,
+                 LOG4CXX_STR("LOGGERTOMATCH"), LOG4CXX_STR("loggertomatch")))
+   {
+      setLoggerToMatch(value);
+   }
+   else if (StringHelper::equalsIgnoreCase(option,
+                LOG4CXX_STR("ACCEPTONMATCH"), LOG4CXX_STR("acceptonmatch")))
+   {
+      acceptOnMatch = OptionConverter::toBoolean(value, acceptOnMatch);
+   }
+}
+
+Filter::FilterDecision LoggerMatchFilter::decide(
+   const spi::LoggingEventPtr& event) const
+{
+    bool matchOccured = loggerToMatch == event->getLoggerName();
+    if (matchOccured) {
+      if (acceptOnMatch) {
+        return Filter::ACCEPT;
+      } else {
+        return Filter::DENY;
+      }
+    } else {
+      return Filter::NEUTRAL;
+    }
+}
+
diff --git a/src/main/cpp/loggingevent.cpp b/src/main/cpp/loggingevent.cpp
index a7783fb..56140ad 100644
--- a/src/main/cpp/loggingevent.cpp
+++ b/src/main/cpp/loggingevent.cpp
@@ -236,7 +236,7 @@
 
 
 void LoggingEvent::writeProlog(ObjectOutputStream& os, Pool& p)  {
-     char classDesc[] = {
+     unsigned char classDesc[] = {
         0x72, 0x00, 0x21,
         0x6F, 0x72, 0x67, 0x2E, 0x61, 0x70, 0x61, 0x63,
         0x68, 0x65, 0x2E, 0x6C, 0x6F, 0x67, 0x34, 0x6A,
@@ -292,7 +292,7 @@
         0x3B, 0x78, 0x70 };
 
      os.writeProlog("org.apache.log4j.spi.LoggingEvent",
-        8, classDesc, sizeof(classDesc), p);
+        8, (char*) classDesc, sizeof(classDesc), p);
 }
 
 void LoggingEvent::write(helpers::ObjectOutputStream& os, Pool& p) const {
diff --git a/src/main/cpp/loglog.cpp b/src/main/cpp/loglog.cpp
index d3498f2..dbe5d37 100644
--- a/src/main/cpp/loglog.cpp
+++ b/src/main/cpp/loglog.cpp
@@ -30,92 +30,113 @@
 using namespace log4cxx;
 using namespace log4cxx::helpers;
 
-LogLog::LogLog() : mutex(APRInitializer::getRootPool()) {
+LogLog::LogLog() : mutex(APRInitializer::getRootPool())
+{
     synchronized sync(mutex);
-    debugEnabled = false;
-    quietMode = false;
+
+    debugEnabled    = false;
+    quietMode       = false;
 }
 
-LogLog& LogLog::getInstance() {
+LogLog& LogLog::getInstance()
+{
     static LogLog internalLogger;
+
     return internalLogger;
 }
 
-
 void LogLog::setInternalDebugging(bool debugEnabled1)
 {
-        synchronized sync(getInstance().mutex);
-        getInstance().debugEnabled = debugEnabled1;
+    synchronized sync(getInstance().mutex);
+
+    getInstance().debugEnabled = debugEnabled1;
 }
 
 void LogLog::debug(const LogString& msg)
 {
-        synchronized sync(getInstance().mutex);
-        if(getInstance().debugEnabled && !getInstance().quietMode)
-        {
-                emit(msg);
-        }
+    synchronized sync(getInstance().mutex);
+
+    if (getInstance().debugEnabled && !getInstance().quietMode)
+    {
+        emit(msg);
+    }
 }
 
 void LogLog::debug(const LogString& msg, const std::exception& e)
 {
-        synchronized sync(getInstance().mutex);
-        debug(msg);
-        emit(e);
+    synchronized sync(getInstance().mutex);
+
+    debug(msg);
+    emit(e);
 }
 
 
 void LogLog::error(const LogString& msg)
 {
-        synchronized sync(getInstance().mutex);
-        if(!getInstance().quietMode) {
-            emit(msg);
-        }
+    synchronized sync(getInstance().mutex);
+
+    if (!getInstance().quietMode)
+    {
+        emit(msg);
+    }
 }
 
 void LogLog::error(const LogString& msg, const std::exception& e)
 {
-        synchronized sync(getInstance().mutex);
-        error(msg);
-        emit(e);
+    synchronized sync(getInstance().mutex);
+
+    error(msg);
+    emit(e);
 }
 
 void LogLog::setQuietMode(bool quietMode1)
 {
-        synchronized sync(getInstance().mutex);
-        getInstance().quietMode = quietMode1;
+    synchronized sync(getInstance().mutex);
+
+    getInstance().quietMode = quietMode1;
 }
 
 void LogLog::warn(const LogString& msg)
 {
-        synchronized sync(getInstance().mutex);
-        if(!getInstance().quietMode) {
-           emit(msg);
-        }
+    synchronized sync(getInstance().mutex);
+
+    if (!getInstance().quietMode)
+    {
+       emit(msg);
+    }
 }
 
 void LogLog::warn(const LogString& msg, const std::exception& e)
 {
-        synchronized sync(getInstance().mutex);
-        warn(msg);
-        emit(e);
+    synchronized sync(getInstance().mutex);
+
+    warn(msg);
+    emit(e);
 }
 
-void LogLog::emit(const LogString& msg) {
+void LogLog::emit(const LogString& msg)
+{
     LogString out(LOG4CXX_STR("log4cxx: "));
+
     out.append(msg);
-   out.append(1, (logchar) 0x0A);
+    out.append(1, (logchar) 0x0A);
+
     SystemErrWriter::write(out);
 }
 
-void LogLog::emit(const std::exception& ex) {
+void LogLog::emit(const std::exception& ex)
+{
     LogString out(LOG4CXX_STR("log4cxx: "));
     const char* raw = ex.what();
-    if (raw != 0) {
+
+    if (raw != 0)
+    {
         Transcoder::decode(raw, out);
-    } else {
+    } else
+    {
         out.append(LOG4CXX_STR("std::exception::what() == null"));
     }
-   out.append(1, (logchar) 0x0A);
+    out.append(1, (logchar) 0x0A);
+
     SystemErrWriter::write(out);
 }
diff --git a/src/main/cpp/logstream.cpp b/src/main/cpp/logstream.cpp
index c3bc955..74396ed 100644
--- a/src/main/cpp/logstream.cpp
+++ b/src/main/cpp/logstream.cpp
@@ -165,8 +165,8 @@
     }
 }
 
-bool logstream_base::isEnabledFor(const ::log4cxx::LevelPtr& level) const {
-    return logger->isEnabledFor(level);
+bool logstream_base::isEnabledFor(const ::log4cxx::LevelPtr& l) const {
+    return logger->isEnabledFor(l);
 }
 
 
@@ -200,8 +200,8 @@
     return *this;
 }
 
-logstream& logstream::operator<<(const LevelPtr& level) {
-    setLevel(level);
+logstream& logstream::operator<<(const LevelPtr& l) {
+    setLevel(l);
     return *this;
 }
 
@@ -228,13 +228,13 @@
       return *stream;
 }
 
-void logstream::log(LoggerPtr& logger,
-                               const LevelPtr& level,
-                               const log4cxx::spi::LocationInfo& location) {
+void logstream::log(LoggerPtr& log,
+                               const LevelPtr& lev,
+                               const log4cxx::spi::LocationInfo& loc) {
     if (stream != 0) {
         std::basic_string<Ch> msg = stream->str();
         if (!msg.empty()) {
-            logger->log(level, msg, location);
+            log->log(lev, msg, loc);
         }
     }
 }
@@ -269,9 +269,9 @@
 
 void logstream::refresh_stream_state() {
    if (stream != 0) {
-      int fillchar;
-      if(logstream_base::set_stream_state(*stream, fillchar)) {
-         stream->fill(fillchar);
+      int ch;
+      if(logstream_base::set_stream_state(*stream, ch)) {
+         stream->fill(ch);
       }
    }
 }
@@ -302,8 +302,8 @@
     return *this;
 }
 
-wlogstream& wlogstream::operator<<(const LevelPtr& level) {
-    setLevel(level);
+wlogstream& wlogstream::operator<<(const LevelPtr& l) {
+    setLevel(l);
     return *this;
 }
 
@@ -333,13 +333,13 @@
       return *stream;
 }
 
-void wlogstream::log(LoggerPtr& logger,
-                               const LevelPtr& level,
-                               const log4cxx::spi::LocationInfo& location) {
+void wlogstream::log(LoggerPtr& log,
+                               const LevelPtr& lev,
+                               const log4cxx::spi::LocationInfo& loc) {
     if (stream != 0) {
         std::basic_string<Ch> msg = stream->str();
         if (!msg.empty()) {
-            logger->log(level, msg, location);
+            log->log(lev, msg, loc);
         }
     }
 }
@@ -374,9 +374,9 @@
 
 void wlogstream::refresh_stream_state() {
    if (stream != 0) {
-      int fillchar;
-      if(logstream_base::set_stream_state(*stream, fillchar)) {
-         stream->fill(fillchar);
+      int ch;
+      if(logstream_base::set_stream_state(*stream, ch)) {
+         stream->fill(ch);
       }
    }
 }
diff --git a/src/main/cpp/mutex.cpp b/src/main/cpp/mutex.cpp
index 4faf556..2a1f79d 100755
--- a/src/main/cpp/mutex.cpp
+++ b/src/main/cpp/mutex.cpp
@@ -16,8 +16,9 @@
  */
 
 #include <log4cxx/logstring.h>
-#include <log4cxx/helpers/mutex.h>
 #include <log4cxx/helpers/exception.h>
+#include <log4cxx/helpers/mutex.h>
+#include <log4cxx/helpers/pool.h>
 #include <apr_thread_mutex.h>
 #include <apr_thread_rwlock.h>
 #include <assert.h>
@@ -55,7 +56,13 @@
 
 Mutex::~Mutex() {
 #if APR_HAS_THREADS
-        apr_thread_mutex_destroy(mutex);
+	// LOGCXX-322
+	if (APRInitializer::isDestructed)
+	{
+		return;
+	}
+
+	apr_thread_mutex_destroy(mutex);
 #endif
 }
 
diff --git a/src/main/cpp/ndc.cpp b/src/main/cpp/ndc.cpp
index 4ab612d..89788c1 100644
--- a/src/main/cpp/ndc.cpp
+++ b/src/main/cpp/ndc.cpp
@@ -309,7 +309,7 @@
         Stack& stack = data->getStack();
         if(!stack.empty())
         {
-                dst = Transcoder::encode(stack.top().message);
+                dst = Transcoder::encode(getMessage(stack.top()));
                 stack.pop();
                 data->recycle();
                 return true;
@@ -326,7 +326,7 @@
         Stack& stack = data->getStack();
         if(!stack.empty())
         {
-                dst = Transcoder::encode(stack.top().message);
+                dst = Transcoder::encode(getMessage(stack.top()));
                 return true;
         }
         data->recycle();
diff --git a/src/main/cpp/nteventlogappender.cpp b/src/main/cpp/nteventlogappender.cpp
index 8caef9b..07a7866 100644
--- a/src/main/cpp/nteventlogappender.cpp
+++ b/src/main/cpp/nteventlogappender.cpp
@@ -17,8 +17,8 @@
 
 #if (defined(WIN32) || defined(_WIN32)) && !defined(_WIN32_WCE)
 
-#include <windows.h>
-#undef ERROR
+#include <apr_strings.h>
+
 #include <log4cxx/nt/nteventlogappender.h>
 #include <log4cxx/spi/loggingevent.h>
 #include <log4cxx/helpers/loglog.h>
@@ -26,7 +26,6 @@
 #include <log4cxx/helpers/stringhelper.h>
 #include <log4cxx/helpers/transcoder.h>
 #include <log4cxx/helpers/pool.h>
-#include <apr_strings.h>
 
 using namespace log4cxx;
 using namespace log4cxx::spi;
diff --git a/src/main/cpp/objectoutputstream.cpp b/src/main/cpp/objectoutputstream.cpp
index 877174b..11c56c7 100644
--- a/src/main/cpp/objectoutputstream.cpp
+++ b/src/main/cpp/objectoutputstream.cpp
@@ -6,7 +6,7 @@
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
  *
- *      http://www.apache.org/licenses/LICENSE-2.0
+ *	  http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
@@ -31,164 +31,205 @@
 IMPLEMENT_LOG4CXX_OBJECT(ObjectOutputStream)
 
 ObjectOutputStream::ObjectOutputStream(OutputStreamPtr outputStream, Pool& p)
-     : os(outputStream) ,
-       utf8Encoder(CharsetEncoder::getUTF8Encoder()),
-       objectHandle(0x7E0000),
-       classDescriptions(new ClassDescriptionMap())
+	:	os(outputStream),
+		utf8Encoder(CharsetEncoder::getUTF8Encoder()),
+		objectHandleDefault(0x7E0000),
+		objectHandle(objectHandleDefault),
+		classDescriptions(new ClassDescriptionMap())
 {
-   char start[] = { 0xAC, 0xED, 0x00, 0x05 };
-   ByteBuffer buf(start, sizeof(start));
-   os->write(buf, p);
+	unsigned char start[] = { 0xAC, 0xED, 0x00, 0x05 };
+	ByteBuffer buf((char*) start, sizeof(start));
+	os->write(buf, p);
 }
 
-ObjectOutputStream::~ObjectOutputStream() {
-    delete classDescriptions;
+ObjectOutputStream::~ObjectOutputStream()
+{
+	delete classDescriptions;
 }
 
-void ObjectOutputStream::close(Pool& p) {
-    os->close(p);
+void ObjectOutputStream::close(Pool& p)
+{
+	os->close(p);
 }
 
-void ObjectOutputStream::flush(Pool& p) {
-    os->flush(p);
+void ObjectOutputStream::flush(Pool& p)
+{
+	os->flush(p);
 }
 
-void ObjectOutputStream::writeObject(const LogString& val, Pool& p) {
-   objectHandle++;
-   writeByte(TC_STRING, p);
-   char bytes[2];
+void ObjectOutputStream::reset(Pool& p)
+{
+	os->flush(p);
+	writeByte(TC_RESET, p);
+	os->flush(p);
+
+	objectHandle = objectHandleDefault;
+	classDescriptions->clear();
+}
+
+void ObjectOutputStream::writeObject(const LogString& val, Pool& p)
+{
+	objectHandle++;
+	writeByte(TC_STRING, p);
+	char bytes[2];
 #if LOG4CXX_LOGCHAR_IS_UTF8
-    size_t len = val.size();
-    ByteBuffer dataBuf(const_cast<char*>(val.data()), val.size());
+	size_t len = val.size();
+	ByteBuffer dataBuf(const_cast<char*>(val.data()), val.size());
 #else
-    size_t maxSize = 6 * val.size();
-    char* data = p.pstralloc(maxSize);
-    ByteBuffer dataBuf(data, maxSize);
-    LogString::const_iterator iter(val.begin());
-    utf8Encoder->encode(val, iter, dataBuf);
-    dataBuf.flip();
-    size_t len = dataBuf.limit();
+	size_t maxSize = 6 * val.size();
+	char* data = p.pstralloc(maxSize);
+	ByteBuffer dataBuf(data, maxSize);
+	LogString::const_iterator iter(val.begin());
+	utf8Encoder->encode(val, iter, dataBuf);
+	dataBuf.flip();
+	size_t len = dataBuf.limit();
 #endif
-   bytes[1] = (char) (len & 0xFF);
-   bytes[0] = (char) ((len >> 8) & 0xFF);
-   ByteBuffer lenBuf(bytes, sizeof(bytes));
-   os->write(lenBuf, p);
-   os->write(dataBuf, p);
+	bytes[1] = (char) (len & 0xFF);
+	bytes[0] = (char) ((len >> 8) & 0xFF);
+	ByteBuffer lenBuf(bytes, sizeof(bytes));
+
+	os->write(lenBuf,	p);
+	os->write(dataBuf,	p);
 }
 
+void ObjectOutputStream::writeObject(const MDC::Map& val, Pool& p)
+{
+	//
+	// TC_OBJECT and the classDesc for java.util.Hashtable
+	//
+	unsigned char prolog[] = {
+		0x72, 0x00, 0x13, 0x6A, 0x61, 0x76, 0x61,
+		0x2E, 0x75, 0x74, 0x69, 0x6C, 0x2E, 0x48, 0x61,
+		0x73, 0x68, 0x74, 0x61, 0x62, 0x6C, 0x65, 0x13,
+		0xBB, 0x0F, 0x25, 0x21, 0x4A, 0xE4, 0xB8, 0x03,
+		0x00, 0x02, 0x46, 0x00, 0x0A, 0x6C, 0x6F, 0x61,
+		0x64, 0x46, 0x61, 0x63, 0x74, 0x6F, 0x72, 0x49,
+		0x00, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68,
+		0x6F, 0x6C, 0x64, 0x78, 0x70  };
+	writeProlog("java.util.Hashtable", 1, (char*) prolog, sizeof(prolog), p);
 
-void ObjectOutputStream::writeObject(const MDC::Map& val, Pool& p) {
-    //
-    //  TC_OBJECT and the classDesc for java.util.Hashtable
-    //
-    char prolog[] = {
-        0x72, 0x00, 0x13, 0x6A, 0x61, 0x76, 0x61,
-        0x2E, 0x75, 0x74, 0x69, 0x6C, 0x2E, 0x48, 0x61,
-        0x73, 0x68, 0x74, 0x61, 0x62, 0x6C, 0x65, 0x13,
-        0xBB, 0x0F, 0x25, 0x21, 0x4A, 0xE4, 0xB8, 0x03,
-        0x00, 0x02, 0x46, 0x00, 0x0A, 0x6C, 0x6F, 0x61,
-        0x64, 0x46, 0x61, 0x63, 0x74, 0x6F, 0x72, 0x49,
-        0x00, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68,
-        0x6F, 0x6C, 0x64, 0x78, 0x70  };
-    writeProlog("java.util.Hashtable", 1, prolog, sizeof(prolog), p);
-    //
-    //   loadFactor = 0.75, threshold = 5, blockdata start, buckets.size = 7
-    char data[] = { 0x3F, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05,
-        TC_BLOCKDATA, 0x08, 0x00, 0x00, 0x00, 0x07 };
-    ByteBuffer dataBuf(data, sizeof(data));
-    os->write(dataBuf, p);
-    char size[4];
-    size_t sz = val.size();
-    size[3] = (char) (sz & 0xFF);
-    size[2] = (char) ((sz >> 8) & 0xFF);
-    size[1] = (char) ((sz >> 16) & 0xFF);
-    size[0] = (char) ((sz >> 24) & 0xFF);
-    ByteBuffer sizeBuf(size, sizeof(size));
-    os->write(sizeBuf, p);
-    for(MDC::Map::const_iterator iter = val.begin();
-        iter != val.end();
-        iter++) {
-        writeObject(iter->first, p);
-        writeObject(iter->second, p);
-    }
-    writeByte(TC_ENDBLOCKDATA, p);
+	// loadFactor = 0.75, threshold = 5, blockdata start, buckets.size = 7
+	char data[] = {	0x3F, 0x40,   0x00, 0x00, 0x00, 0x00, 0x00, 0x05,
+					TC_BLOCKDATA, 0x08, 0x00, 0x00, 0x00, 0x07 };
+	ByteBuffer dataBuf(data, sizeof(data));
+	os->write(dataBuf, p);
+
+	char size[4];
+	size_t sz = val.size();
+
+	size[3] = (char) (sz			& 0xFF);
+	size[2] = (char) ((sz >> 8)		& 0xFF);
+	size[1] = (char) ((sz >> 16)	& 0xFF);
+	size[0] = (char) ((sz >> 24)	& 0xFF);
+
+	ByteBuffer sizeBuf(size, sizeof(size));
+	os->write(sizeBuf, p);
+
+	for (MDC::Map::const_iterator	iter  = val.begin();
+									iter != val.end();
+									iter++)
+	{
+		writeObject(iter->first, p);
+		writeObject(iter->second, p);
+	}
+	writeByte(TC_ENDBLOCKDATA, p);
 }
 
-void ObjectOutputStream::writeUTFString(const std::string& val, Pool& p) {
-    char bytes[3];
-    size_t len = val.size();
-    ByteBuffer dataBuf(const_cast<char*>(val.data()), val.size());
-   objectHandle++;
-   bytes[0] = 0x74;
-   bytes[1] = (char) ((len >> 8) & 0xFF);
-   bytes[2] = (char) (len & 0xFF);
-   ByteBuffer lenBuf(bytes, sizeof(bytes));
-   os->write(lenBuf, p);
-   os->write(dataBuf, p);
+void ObjectOutputStream::writeUTFString(const std::string& val, Pool& p)
+{
+	char bytes[3];
+	size_t len = val.size();
+	ByteBuffer dataBuf(const_cast<char*>(val.data()), val.size());
+	objectHandle++;
+
+	bytes[0] = 0x74;
+	bytes[1] = (char) ((len >> 8) & 0xFF);
+	bytes[2] = (char) (len & 0xFF);
+
+	ByteBuffer lenBuf(bytes, sizeof(bytes));
+	os->write(lenBuf, p);
+	os->write(dataBuf, p);
 }
 
-
-
-void ObjectOutputStream::writeByte(char val, Pool& p) {
-   ByteBuffer buf(&val, 1);
-   os->write(buf, p);
+void ObjectOutputStream::writeByte(char val, Pool& p)
+{
+	ByteBuffer buf(&val, 1);
+	os->write(buf, p);
 }
 
-void ObjectOutputStream::writeInt(int val, Pool& p) {
-   char bytes[4];
-   bytes[3] = (char) (val & 0xFF);
-   bytes[2] = (char) ((val >> 8) & 0xFF);
-   bytes[1] = (char) ((val >> 16) & 0xFF);
-   bytes[0] = (char) ((val >> 24) & 0xFF);
-   ByteBuffer buf(bytes, sizeof(bytes));
-   os->write(buf, p);
+void ObjectOutputStream::writeInt(int val, Pool& p)
+{
+	char bytes[4];
+
+	bytes[3] = (char) (val & 0xFF);
+	bytes[2] = (char) ((val >> 8) & 0xFF);
+	bytes[1] = (char) ((val >> 16) & 0xFF);
+	bytes[0] = (char) ((val >> 24) & 0xFF);
+
+	ByteBuffer buf(bytes, sizeof(bytes));
+	os->write(buf, p);
 }
 
-void ObjectOutputStream::writeLong(log4cxx_time_t val, Pool& p) {
-   char bytes[8];
-   bytes[7] = (char) (val & 0xFF);
-   bytes[6] = (char) ((val >> 8) & 0xFF);
-   bytes[5] = (char) ((val >> 16) & 0xFF);
-   bytes[4] = (char) ((val >> 24) & 0xFF);
-   bytes[3] = (char) ((val >> 32) & 0xFF);
-   bytes[2] = (char) ((val >> 40) & 0xFF);
-   bytes[1] = (char) ((val >> 48) & 0xFF);
-   bytes[0] = (char) ((val >> 56) & 0xFF);
-   ByteBuffer buf(bytes, sizeof(bytes));
-   os->write(buf, p);
+void ObjectOutputStream::writeLong(log4cxx_time_t val, Pool& p)
+{
+	char bytes[8];
+
+	bytes[7] = (char) (val & 0xFF);
+	bytes[6] = (char) ((val >> 8) & 0xFF);
+	bytes[5] = (char) ((val >> 16) & 0xFF);
+	bytes[4] = (char) ((val >> 24) & 0xFF);
+	bytes[3] = (char) ((val >> 32) & 0xFF);
+	bytes[2] = (char) ((val >> 40) & 0xFF);
+	bytes[1] = (char) ((val >> 48) & 0xFF);
+	bytes[0] = (char) ((val >> 56) & 0xFF);
+
+	ByteBuffer buf(bytes, sizeof(bytes));
+	os->write(buf, p);
 }
 
-void ObjectOutputStream::writeBytes(const char* bytes, size_t len, Pool& p) {
-   ByteBuffer buf(const_cast<char*>(bytes), len);
-   os->write(buf, p);
+void ObjectOutputStream::writeBytes(const char* bytes, size_t len, Pool& p)
+{
+	ByteBuffer buf(const_cast<char*>(bytes), len);
+	os->write(buf, p);
 }
 
-void ObjectOutputStream::writeNull(Pool& p) {
-   writeByte(TC_NULL, p);
+void ObjectOutputStream::writeNull(Pool& p)
+{
+	writeByte(TC_NULL, p);
 }
 
-void ObjectOutputStream::writeProlog(const char* className,
-                        int classDescIncrement,
-                        char* classDesc,
-                        size_t len,
-                        Pool& p) {
-    ClassDescriptionMap::const_iterator match = classDescriptions->find(className);
-    if (match != classDescriptions->end()) {
-        char bytes[6];
-        bytes[0] = TC_OBJECT;
-        bytes[1] = TC_REFERENCE;
-        bytes[2] = (char) ((match->second >> 24) & 0xFF);
-        bytes[3] = (char) ((match->second >> 16) & 0xFF);
-        bytes[4] = (char) ((match->second >> 8) & 0xFF);
-        bytes[5] = (char) (match->second & 0xFF);
-        ByteBuffer buf(bytes, sizeof(bytes));
-        os->write(buf, p);
-        objectHandle++;
-    } else {
-        classDescriptions->insert(ClassDescriptionMap::value_type(className, objectHandle));
-        writeByte(TC_OBJECT, p);
-        ByteBuffer buf(classDesc, len);
-        os->write(buf, p);
-        objectHandle += (classDescIncrement + 1);
-    }
+void ObjectOutputStream::writeProlog(const	char*	className,
+											int		classDescIncrement,
+											char*	classDesc,
+											size_t	len,
+											Pool&	p)
+{
+	ClassDescriptionMap::const_iterator match = classDescriptions->find(className);
+
+	if (match != classDescriptions->end())
+	{
+		char bytes[6];
+
+		bytes[0] = TC_OBJECT;
+		bytes[1] = TC_REFERENCE;
+		bytes[2] = (char) ((match->second >> 24) & 0xFF);
+		bytes[3] = (char) ((match->second >> 16) & 0xFF);
+		bytes[4] = (char) ((match->second >> 8) & 0xFF);
+		bytes[5] = (char) (match->second & 0xFF);
+
+		ByteBuffer buf(bytes, sizeof(bytes));
+		os->write(buf, p);
+
+		objectHandle++;
+	}
+	else
+	{
+		classDescriptions->insert(ClassDescriptionMap::value_type(className, objectHandle));
+		writeByte(TC_OBJECT, p);
+
+		ByteBuffer buf(classDesc, len);
+		os->write(buf, p);
+
+		objectHandle += (classDescIncrement + 1);
+	}
 }
diff --git a/src/main/cpp/objectptr.cpp b/src/main/cpp/objectptr.cpp
old mode 100755
new mode 100644
diff --git a/src/main/cpp/obsoleterollingfileappender.cpp b/src/main/cpp/obsoleterollingfileappender.cpp
index 5303d5f..5c6f5d6 100644
--- a/src/main/cpp/obsoleterollingfileappender.cpp
+++ b/src/main/cpp/obsoleterollingfileappender.cpp
@@ -64,24 +64,24 @@
 }
 
 RollingFileAppender::RollingFileAppender(
-  const LayoutPtr& layout,
+  const LayoutPtr& newLayout,
   const LogString& filename,
   bool append)
   : maxFileSize(10*1024*1024), maxBackupIndex(1) {
-  setLayout(layout);
+  setLayout(newLayout);
   setFile(filename);
   setAppend(append);
-  Pool pool;
-  activateOptions(pool);
+  Pool p;
+  activateOptions(p);
 }
 
-RollingFileAppender::RollingFileAppender(const LayoutPtr& layout,
+RollingFileAppender::RollingFileAppender(const LayoutPtr& newLayout,
    const LogString& filename)
    : maxFileSize(10*1024*1024), maxBackupIndex(1) {
-  setLayout(layout);
+  setLayout(newLayout);
   setFile(filename);
-  Pool pool;
-  activateOptions(pool);
+  Pool p;
+  activateOptions(p);
 }
 
 RollingFileAppender::~RollingFileAppender() {
@@ -133,11 +133,11 @@
   maxFileSize = OptionConverter::toFileSize(value, maxFileSize + 1);
 }
 
-void RollingFileAppender::activateOptions(Pool& pool) {
+void RollingFileAppender::activateOptions(Pool& p) {
   log4cxx::rolling::SizeBasedTriggeringPolicyPtr trigger(
       new log4cxx::rolling::SizeBasedTriggeringPolicy());
   trigger->setMaxFileSize(maxFileSize);
-  trigger->activateOptions(pool);
+  trigger->activateOptions(p);
   setTriggeringPolicy(trigger);
 
   log4cxx::rolling::FixedWindowRollingPolicyPtr rolling(
@@ -145,11 +145,11 @@
   rolling->setMinIndex(1);
   rolling->setMaxIndex(maxBackupIndex);
   rolling->setFileNamePattern(getFile() + LOG4CXX_STR(".%i"));
-  rolling->activateOptions(pool);
+  rolling->activateOptions(p);
   setRollingPolicy(rolling);
 
   using namespace log4cxx::rolling;
-  RollingFileAppenderSkeleton::activateOptions(pool);
+  RollingFileAppenderSkeleton::activateOptions(p);
 }
 
 
diff --git a/src/main/cpp/odbcappender.cpp b/src/main/cpp/odbcappender.cpp
index b8f7b5a..88876cf 100644
--- a/src/main/cpp/odbcappender.cpp
+++ b/src/main/cpp/odbcappender.cpp
@@ -167,7 +167,8 @@
          throw SQLException( SQL_HANDLE_DBC, con, "Failed to allocate sql handle.", p);
       }
 
-      SQLWCHAR* wsql = Transcoder::wencode(sql, p);
+      SQLWCHAR* wsql;
+      encode(&wsql, sql, p);
       ret = SQLExecDirectW(stmt, wsql, SQL_NTS);
 
      if (ret < 0)
@@ -182,7 +183,7 @@
          SQLFreeHandle(SQL_HANDLE_STMT, stmt);
       }
 
-      throw e;
+      throw;
    }
    SQLFreeHandle(SQL_HANDLE_STMT, stmt);
    closeConnection(con);
@@ -237,15 +238,15 @@
       }
 
 
-     SQLWCHAR* wURL = Transcoder::wencode(databaseURL, p);
+     SQLWCHAR *wURL, *wUser, *wPwd;
+     encode(&wURL, databaseURL, p);
+     encode(&wUser, databaseUser, p);
+     encode(&wPwd, databasePassword, p);
 
-     wchar_t szOutConnectionString[1024];
-     SQLSMALLINT nOutConnctionLength = 0;
-
-     ret = SQLDriverConnectW( connection, NULL,
+     ret = SQLConnectW( connection,
             wURL, SQL_NTS,
-            szOutConnectionString, sizeof( szOutConnectionString ),
-            &nOutConnctionLength, SQL_DRIVER_NOPROMPT );
+            wUser, SQL_NTS,
+            wPwd, SQL_NTS);
 
 
      if (ret < 0)
@@ -306,7 +307,7 @@
       }
       catch (SQLException& e)
       {
-         errorHandler->error(LOG4CXX_STR("Failed to excute sql"), e,
+         errorHandler->error(LOG4CXX_STR("Failed to execute sql"), e,
             ErrorCode::FLUSH_FAILURE);
       }
    }
@@ -331,3 +332,31 @@
       }
    }
 }
+
+void ODBCAppender::encode(wchar_t** dest, const LogString& src, Pool& p) {
+   *dest = Transcoder::wencode(src, p);
+}
+
+void ODBCAppender::encode(unsigned short** dest,
+    const LogString& src, Pool& p) {
+   //  worst case double number of characters from UTF-8 or wchar_t
+   *dest = (unsigned short*)
+        p.palloc((src.size() + 1) * 2 * sizeof(unsigned short));
+   unsigned short* current = *dest;
+   for(LogString::const_iterator i = src.begin();
+      i != src.end();) {
+      unsigned int sv = Transcoder::decode(src, i);
+      if (sv < 0x10000) {
+	 *current++ = (unsigned short) sv;
+      } else {
+        unsigned char u = (unsigned char) (sv >> 16);
+        unsigned char w = (unsigned char) (u - 1);
+        unsigned short hs = (0xD800 + ((w & 0xF) << 6) + ((sv & 0xFFFF) >> 10));
+        unsigned short ls = (0xDC00 + (sv & 0x3FF));
+	*current++ = (unsigned short) hs;
+	*current++ = (unsigned short) ls;
+      }
+  }
+  *current = 0;
+}
+
diff --git a/src/main/cpp/outputstream.cpp b/src/main/cpp/outputstream.cpp
index f7d3691..5ebb928 100644
--- a/src/main/cpp/outputstream.cpp
+++ b/src/main/cpp/outputstream.cpp
@@ -17,6 +17,7 @@
 
 #include <log4cxx/logstring.h>
 #include <log4cxx/helpers/outputstream.h>
+#include <stdexcept>
 
 using namespace log4cxx;
 using namespace log4cxx::helpers;
@@ -28,3 +29,13 @@
 
 OutputStream::~OutputStream() {
 }
+
+#ifdef LOG4CXX_MULTI_PROCESS
+apr_file_t* OutputStream::getFilePtr(){
+    throw std::logic_error("getFilePtr must be implemented in the derived class that you are using");
+}
+
+OutputStream& OutputStream::getFileOutPutStreamPtr(){
+    throw std::logic_error("getFileOutPutStreamPtr must be implemented in the derived class that you are using");
+}
+#endif
diff --git a/src/main/cpp/outputstreamwriter.cpp b/src/main/cpp/outputstreamwriter.cpp
index 7c95619..9b6bf35 100644
--- a/src/main/cpp/outputstreamwriter.cpp
+++ b/src/main/cpp/outputstreamwriter.cpp
@@ -58,9 +58,15 @@
 
 void OutputStreamWriter::write(const LogString& str, Pool& p) {
   if (str.length() > 0) {
+#ifdef LOG4CXX_MULTI_PROCESS
+    size_t bufSize = str.length() * 2;
+    char *rawbuf = new char[bufSize];
+    ByteBuffer buf(rawbuf, (size_t) bufSize);
+#else
     enum { BUFSIZE = 1024 };
     char rawbuf[BUFSIZE];
     ByteBuffer buf(rawbuf, (size_t) BUFSIZE);
+#endif
     enc->reset();
     LogString::const_iterator iter = str.begin();
     while(iter != str.end()) {
@@ -69,10 +75,14 @@
       out->write(buf, p);
       buf.clear();
     }
+
     CharsetEncoder::encode(enc, str, iter, buf);
     enc->flush(buf);
     buf.flip();
     out->write(buf, p);
+#ifdef LOG4CXX_MULTI_PROCESS
+    delete []rawbuf;
+#endif
   }
 }
 
diff --git a/src/main/cpp/pool.cpp b/src/main/cpp/pool.cpp
old mode 100755
new mode 100644
diff --git a/src/main/cpp/properties.cpp b/src/main/cpp/properties.cpp
index db6a1cb..177699c 100644
--- a/src/main/cpp/properties.cpp
+++ b/src/main/cpp/properties.cpp
@@ -47,7 +47,7 @@
                                 switch(c)
                                 {
                                 case 0x20: // ' '
-                                case 0x08: // '\t'
+                                case 0x09: // '\t'
                                 case 0x0A: // '\n'
                                 case 0x0D: // '\r'
                                         if (!get(in, c))
@@ -76,7 +76,7 @@
                                                 finished = true;
                                         break;
 
-                                case 0x08: // '\t'
+                                case 0x09: // '\t'
                                 case 0x20: // ' '
                                 case 0x3A: // ':'
                                 case 0x3D: // '='
@@ -106,28 +106,35 @@
                         case KEY_ESCAPE:
                                 switch(c)
                                 {
-                                case 0x08: // '\t'
-                                case 0x20: // ' '
-                                case 0x3A: // ':'
-                                case 0x3D: // '='
-                                case 0x5C: // '\\'
-                                        key.append(1, c);
+                                case 0x74: // 't'
+                                        key.append(1, 0x09);
                                         lexemType = KEY;
-                                        if (!get(in, c))
-                                                finished = true;
+                                        break;
+
+                                case 0x6E: // 'n'
+                                        key.append(1, 0x0A);
+                                        lexemType = KEY;
+                                        break;
+
+                                case 0x72: // 'r'
+                                        key.append(1, 0x0D);
+                                        lexemType = KEY;
                                         break;
 
                                 case 0x0A: // '\n'
                                         lexemType = KEY_CONTINUE;
-                                        if (!get(in, c))
-                                                finished = true;
                                         break;
 
                                 case 0x0D: // '\r'
                                         lexemType = KEY_CONTINUE2;
-                                        if (!get(in, c))
-                                                finished = true;
                                         break;
+
+                                default:
+                                        key.append(1, c);
+                                        lexemType = KEY;
+                                }
+                                if (!get(in, c)) {
+                                    finished = true;
                                 }
                                 break;
 
@@ -135,7 +142,7 @@
                                 switch(c)
                                 {
                                 case 0x20:  // ' '
-                                case 0x08: //  '\t'
+                                case 0x09: //  '\t'
                                         if (!get(in, c))
                                                 finished = true;
                                         break;
@@ -164,7 +171,7 @@
                         case DELIMITER:
                                 switch(c)
                                 {
-                                case 0x08: // '\t'
+                                case 0x09: // '\t'
                                 case 0x20: // ' '
                                 case 0x3A: // ':'
                                 case 0x3D: // '='
@@ -209,32 +216,35 @@
                         case ELEMENT_ESCAPE:
                                 switch(c)
                                 {
-                                case 0x08: // '\t'
-                                case 0x20: // ' '
-                                case 0x6E: // 'n'
-                                case 0x72: // 'r'
-                                case 0x27: // '\''
-                                case 0x5C: // '\\'
-                                case 0x22: // '\"'
-                                case 0x3A: // ':'
-                                default:
-                                        element.append(1, c);
+                                case 0x74: // 't'
+                                        element.append(1, 0x09);
                                         lexemType = ELEMENT;
-                                        if (!get(in, c))
-                                                finished = true;
+                                        break;
+
+                                case 0x6E: // 'n'
+                                        element.append(1, 0x0A);
+                                        lexemType = ELEMENT;
+                                        break;
+
+                                case 0x72: // 'r'
+                                        element.append(1, 0x0D);
+                                        lexemType = ELEMENT;
                                         break;
 
                                 case 0x0A: // '\n'
                                         lexemType = ELEMENT_CONTINUE;
-                                        if (!get(in, c))
-                                                finished = true;
                                         break;
 
                                 case 0x0D: // '\r'
                                         lexemType = ELEMENT_CONTINUE2;
-                                        if (!get(in, c))
-                                                finished = true;
                                         break;
+                                default:
+                                        element.append(1, c);
+                                        lexemType = ELEMENT;
+                                        break;
+                                }
+                                if (!get(in, c)) {
+                                    finished = true;
                                 }
                                 break;
 
@@ -242,7 +252,7 @@
                                 switch(c)
                                 {
                                 case 0x20: // ' '
-                                case 0x08: // '\t'
+                                case 0x09: // '\t'
                                         if (!get(in, c))
                                                 finished = true;
                                         break;
@@ -256,7 +266,7 @@
                         case ELEMENT_CONTINUE2:
                                 switch(c)
                                 {
-                                case 0x20: // '\n'
+                                case 0x0A: // '\n'
                                         if (!get(in, c))
                                                 finished = true;
                                         lexemType = ELEMENT_CONTINUE;
@@ -286,7 +296,7 @@
         }
 
 protected:
-        bool get(LogString& in, logchar& c)
+        static bool get(LogString& in, logchar& c)
         {
                 if (in.empty()) {
                     c = 0;
@@ -329,7 +339,6 @@
 {
         LogString oldValue((*properties)[key]);
         (*properties)[key] = value;
-        //tcout << ASCII_STR("setting property key=") << key << ASCII_STR(", value=") << value << std::endl;
         return oldValue;
 }
 
diff --git a/src/main/cpp/propertiespatternconverter.cpp b/src/main/cpp/propertiespatternconverter.cpp
index 5cf281c..7b1ba7d 100644
--- a/src/main/cpp/propertiespatternconverter.cpp
+++ b/src/main/cpp/propertiespatternconverter.cpp
@@ -24,6 +24,8 @@
 #include <log4cxx/spi/loggingevent.h>
 #include <log4cxx/spi/location/locationinfo.h>
 
+#include <iterator>
+
 using namespace log4cxx;
 using namespace log4cxx::pattern;
 using namespace log4cxx::spi;
diff --git a/src/main/cpp/propertyconfigurator.cpp b/src/main/cpp/propertyconfigurator.cpp
index f2c5b49..e567031 100644
--- a/src/main/cpp/propertyconfigurator.cpp
+++ b/src/main/cpp/propertyconfigurator.cpp
@@ -39,6 +39,9 @@
 #include <log4cxx/helpers/transcoder.h>
 #include <log4cxx/helpers/fileinputstream.h>
 
+#define LOG4CXX 1
+#include <log4cxx/helpers/aprinitializer.h>
+
 
 using namespace log4cxx;
 using namespace log4cxx::spi;
@@ -48,31 +51,34 @@
 
 #if APR_HAS_THREADS
 #include <log4cxx/helpers/filewatchdog.h>
-
-class PropertyWatchdog  : public FileWatchdog
+namespace log4cxx
 {
-public:
-        PropertyWatchdog(const File& filename) : FileWatchdog(filename)
-        {
-        }
+	class PropertyWatchdog  : public FileWatchdog
+	{
+	public:
+			PropertyWatchdog(const File& filename) : FileWatchdog(filename)
+			{
+			}
 
-        /**
-        Call PropertyConfigurator#doConfigure(const String& configFileName,
-        const spi::LoggerRepositoryPtr& hierarchy) with the
-        <code>filename</code> to reconfigure log4cxx.
-        */
-        void doOnChange()
-        {
-                PropertyConfigurator().doConfigure(file,
-                        LogManager::getLoggerRepository());
-        }
-};
+			/**
+			Call PropertyConfigurator#doConfigure(const String& configFileName,
+			const spi::LoggerRepositoryPtr& hierarchy) with the
+			<code>filename</code> to reconfigure log4cxx.
+			*/
+			void doOnChange()
+			{
+					PropertyConfigurator().doConfigure(file,
+							LogManager::getLoggerRepository());
+			}
+	};
+}
+
+PropertyWatchdog *PropertyConfigurator::pdog = NULL;
+
 #endif
 
 IMPLEMENT_LOG4CXX_OBJECT(PropertyConfigurator)
 
-
-
 PropertyConfigurator::PropertyConfigurator()
 : registry(new std::map<LogString, AppenderPtr>()), loggerFactory(new DefaultLoggerFactory())
 {
@@ -134,7 +140,13 @@
 void PropertyConfigurator::configureAndWatch(
         const File& configFilename, long delay)
 {
-    PropertyWatchdog * pdog = new PropertyWatchdog(configFilename);
+	if(pdog)
+	{
+	    APRInitializer::unregisterCleanup(pdog);
+		delete pdog;
+	}
+    pdog = new PropertyWatchdog(configFilename);
+    APRInitializer::registerCleanup(pdog);
     pdog->setDelay(delay);
     pdog->start();
 }
diff --git a/src/main/cpp/rollingfileappender.cpp b/src/main/cpp/rollingfileappender.cpp
index 4ae03da..33510de 100644
--- a/src/main/cpp/rollingfileappender.cpp
+++ b/src/main/cpp/rollingfileappender.cpp
@@ -19,6 +19,19 @@
 #pragma warning ( disable: 4231 4251 4275 4786 )
 #endif
 
+#ifdef LOG4CXX_MULTI_PROCESS
+#include <apr_portable.h>
+#include <libgen.h>
+#include <apr_file_io.h>
+#include <apr_atomic.h>
+#include <apr_mmap.h>
+#ifndef MAX_FILE_LEN
+#define MAX_FILE_LEN 2048
+#endif
+#include <log4cxx/pattern/filedatepatternconverter.h>
+#include <log4cxx/helpers/date.h>
+#endif
+
 #include <log4cxx/rolling/rollingfileappender.h>
 #include <log4cxx/helpers/loglog.h>
 #include <log4cxx/helpers/synchronized.h>
@@ -41,7 +54,7 @@
 /**
  * Construct a new instance.
  */
-RollingFileAppenderSkeleton::RollingFileAppenderSkeleton() {
+RollingFileAppenderSkeleton::RollingFileAppenderSkeleton() : _event(NULL){
 }
 
 RollingFileAppender::RollingFileAppender() {
@@ -115,9 +128,20 @@
              + getName());
     }
   }
-
 }
 
+#ifdef LOG4CXX_MULTI_PROCESS
+void RollingFileAppenderSkeleton::releaseFileLock(apr_file_t* lock_file){
+    if (lock_file){
+        apr_status_t stat = apr_file_unlock(lock_file);
+        if (stat != APR_SUCCESS){
+            LogLog::warn(LOG4CXX_STR("flock: unlock failed"));
+        }
+        apr_file_close(lock_file);
+        lock_file = NULL;
+    }
+}
+#endif
 /**
    Implements the usual roll over behaviour.
 
@@ -134,105 +158,196 @@
  * @return true if rollover performed.
  */
 bool RollingFileAppenderSkeleton::rollover(Pool& p) {
-  //
-  //   can't roll without a policy
-  //
-  if (rollingPolicy != NULL) {
+    //
+    //   can't roll without a policy
+    //
+    if (rollingPolicy != NULL) {
 
-{
-    LOCK_W sync(mutex);
-      try {
-        RolloverDescriptionPtr rollover1(rollingPolicy->rollover(getFile(), p));
+        {
+            LOCK_W sync(mutex);
 
-        if (rollover1 != NULL) {
-          if (rollover1->getActiveFileName() == getFile()) {
-            closeWriter();
-
-            bool success = true;
-
-            if (rollover1->getSynchronous() != NULL) {
-              success = false;
-
-              try {
-                success = rollover1->getSynchronous()->execute(p);
-              } catch (std::exception& ex) {
-                LogLog::warn(LOG4CXX_STR("Exception on rollover"));
-              }
+#ifdef LOG4CXX_MULTI_PROCESS
+            std::string fileName(getFile());
+            RollingPolicyBase *basePolicy = dynamic_cast<RollingPolicyBase* >(&(*rollingPolicy));
+            apr_time_t n = apr_time_now();
+            ObjectPtr obj(new Date(n));
+            LogString fileNamePattern;
+            if (basePolicy){
+                if (basePolicy->getPatternConverterList().size()){
+                    (*(basePolicy->getPatternConverterList().begin()))->format(obj, fileNamePattern, p);
+                    fileName = std::string(fileNamePattern);
+                }
             }
 
-            if (success) {
-              if (rollover1->getAppend()) {
-                fileLength = File().setPath(rollover1->getActiveFileName()).length(p);
-              } else {
-                fileLength = 0;
-              }
-
-              //
-              //  async action not yet implemented
-              //
-              ActionPtr asyncAction(rollover1->getAsynchronous());
-              if (asyncAction != NULL) {
-                asyncAction->execute(p);
-              }
-
-              setFile(
-                rollover1->getActiveFileName(), rollover1->getAppend(),
-                bufferedIO, bufferSize, p);
-            } else {
-              setFile(
-                rollover1->getActiveFileName(), true, bufferedIO, bufferSize, p);
-            }
-          } else {
-            OutputStreamPtr os(new FileOutputStream(
-                  rollover1->getActiveFileName(), rollover1->getAppend()));
-            WriterPtr newWriter(createWriter(os));
-            closeWriter();
-            setFile(rollover1->getActiveFileName());
-            setWriter(newWriter);
-
-            bool success = true;
-
-            if (rollover1->getSynchronous() != NULL) {
-              success = false;
-
-              try {
-                success = rollover1->getSynchronous()->execute(p);
-              } catch (std::exception& ex) {
-                LogLog::warn(LOG4CXX_STR("Exception during rollover"));
-              }
+            bool bAlreadyRolled = true;
+            char szDirName[MAX_FILE_LEN] = {'\0'};
+            char szBaseName[MAX_FILE_LEN] = {'\0'};
+            char szUid[MAX_FILE_LEN] = {'\0'};
+            memcpy(szDirName, fileName.c_str(), fileName.size() > MAX_FILE_LEN ? MAX_FILE_LEN : fileName.size());
+            memcpy(szBaseName, fileName.c_str(), fileName.size() > MAX_FILE_LEN ? MAX_FILE_LEN : fileName.size());
+            apr_uid_t uid;
+            apr_gid_t groupid;
+            apr_status_t stat = apr_uid_current(&uid, &groupid, pool.getAPRPool());
+            if (stat == APR_SUCCESS){
+                snprintf(szUid, MAX_FILE_LEN, "%u", uid);
             }
 
-            if (success) {
-              if (rollover1->getAppend()) {
-                fileLength = File().setPath(rollover1->getActiveFileName()).length(p);
-              } else {
-                fileLength = 0;
-              }
-
-              //
-              //   async action not yet implemented
-              //
-              ActionPtr asyncAction(rollover1->getAsynchronous());
-              if (asyncAction != NULL) {
-                asyncAction->execute(p);
-              }
+            const std::string lockname = std::string(::dirname(szDirName)) + "/." + ::basename(szBaseName) + szUid + ".lock";
+            apr_file_t* lock_file;
+            stat = apr_file_open(&lock_file, lockname.c_str(), APR_CREATE | APR_READ | APR_WRITE, APR_OS_DEFAULT, p.getAPRPool());
+            if (stat != APR_SUCCESS) {
+                std::string err = "lockfile return error: open lockfile failed. ";
+                err += (strerror(errno));
+                LogLog::warn(LOG4CXX_STR(err.c_str()));
+                bAlreadyRolled = false;
+                lock_file = NULL;
+            }else{
+                stat = apr_file_lock(lock_file, APR_FLOCK_EXCLUSIVE);
+                if (stat != APR_SUCCESS){
+                    std::string err = "apr_file_lock: lock failed. ";
+                    err += (strerror(errno));
+                    LogLog::warn(LOG4CXX_STR(err.c_str()));
+                    bAlreadyRolled = false;
+                }
+                else {
+                    if (_event)
+                        triggeringPolicy->isTriggeringEvent(this, *_event, getFile(), getFileLength());
+                }
             }
 
-            writeHeader(p);
-          }
+            if (bAlreadyRolled){
+                apr_finfo_t finfo1, finfo2;
+                apr_status_t st1, st2;
+                apr_file_t* _fd = getWriter()->getOutPutStreamPtr()->getFileOutPutStreamPtr().getFilePtr();
+                st1 = apr_file_info_get(&finfo1, APR_FINFO_IDENT, _fd);
+                if (st1 != APR_SUCCESS){
+                    LogLog::warn(LOG4CXX_STR("apr_file_info_get failed"));
+                }
 
-          return true;
+                st2 = apr_stat(&finfo2, std::string(getFile()).c_str(), APR_FINFO_IDENT, p.getAPRPool());
+                if (st2 != APR_SUCCESS){
+                    LogLog::warn(LOG4CXX_STR("apr_stat failed."));
+                }
+
+                bAlreadyRolled = ((st1 == APR_SUCCESS) && (st2 == APR_SUCCESS)
+                    && ((finfo1.device != finfo2.device) || (finfo1.inode != finfo2.inode)));
+            }
+
+            if (!bAlreadyRolled){
+#endif
+                try {
+                    RolloverDescriptionPtr rollover1(rollingPolicy->rollover(this->getFile(), this->getAppend(), p));
+                    if (rollover1 != NULL) {
+                        if (rollover1->getActiveFileName() == getFile()) {
+                            closeWriter();
+
+                            bool success = true;
+                            if (rollover1->getSynchronous() != NULL) {
+                                success = false;
+
+                                try {
+                                    success = rollover1->getSynchronous()->execute(p);
+                                } catch (std::exception& ex) {
+                                    LogLog::warn(LOG4CXX_STR("Exception on rollover"));
+                                }
+                            }
+
+                            if (success) {
+                                if (rollover1->getAppend()) {
+                                    fileLength = File().setPath(rollover1->getActiveFileName()).length(p);
+                                } else {
+                                    fileLength = 0;
+                                }
+
+                                //
+                                //  async action not yet implemented
+                                //
+                                ActionPtr asyncAction(rollover1->getAsynchronous());
+                                if (asyncAction != NULL) {
+                                    asyncAction->execute(p);
+                                }
+
+                                setFile(
+                                    rollover1->getActiveFileName(), rollover1->getAppend(),
+                                    bufferedIO, bufferSize, p);
+                            } else {
+                                setFile(
+                                    rollover1->getActiveFileName(), true, bufferedIO, bufferSize, p);
+                            }
+                        } else {
+                            OutputStreamPtr os(new FileOutputStream(
+                                    rollover1->getActiveFileName(), rollover1->getAppend()));
+                            WriterPtr newWriter(createWriter(os));
+                            closeWriter();
+                            setFile(rollover1->getActiveFileName());
+                            setWriter(newWriter);
+
+                            bool success = true;
+
+                            if (rollover1->getSynchronous() != NULL) {
+                                success = false;
+
+                                try {
+                                    success = rollover1->getSynchronous()->execute(p);
+                                } catch (std::exception& ex) {
+                                    LogLog::warn(LOG4CXX_STR("Exception during rollover"));
+                                }
+                            }
+
+                            if (success) {
+                                if (rollover1->getAppend()) {
+                                    fileLength = File().setPath(rollover1->getActiveFileName()).length(p);
+                                } else {
+                                    fileLength = 0;
+                                }
+
+                                //
+                                //   async action not yet implemented
+                                //
+                                ActionPtr asyncAction(rollover1->getAsynchronous());
+                                if (asyncAction != NULL) {
+                                    asyncAction->execute(p);
+                                }
+                            }
+
+                            writeHeader(p);
+                        }
+
+#ifdef LOG4CXX_MULTI_PROCESS
+                        releaseFileLock(lock_file);
+#endif
+                        return true;
+                    }
+                } catch (std::exception& ex) {
+                    LogLog::warn(LOG4CXX_STR("Exception during rollover"));
+                }
+#ifdef LOG4CXX_MULTI_PROCESS
+            }else{
+                reopenLatestFile(p);
+            }
+            releaseFileLock(lock_file);
+#endif
         }
-      } catch (std::exception& ex) {
-        LogLog::warn(LOG4CXX_STR("Exception during rollover"));
-      }
     }
-
-  }
-
-  return false;
+    return false;
 }
 
+#ifdef LOG4CXX_MULTI_PROCESS
+/**
+ * re-open current file when its own handler has been renamed
+ */
+void RollingFileAppenderSkeleton::reopenLatestFile(Pool& p){
+    closeWriter();
+    OutputStreamPtr os(new FileOutputStream(getFile(), true));
+    WriterPtr newWriter(createWriter(os));
+    setFile(getFile());
+    setWriter(newWriter);
+    fileLength = File().setPath(getFile()).length(p);
+    writeHeader(p);
+}
+
+#endif
+
 /**
  * {@inheritDoc}
 */
@@ -248,11 +363,38 @@
     //    is not provided.  However appender should still be in good
     //     condition and the append should still happen.
     try {
-      rollover(p);
+        _event = &(const_cast<LoggingEventPtr &>(event));
+        rollover(p);
     } catch (std::exception& ex) {
         LogLog::warn(LOG4CXX_STR("Exception during rollover attempt."));
     }
   }
+
+#ifdef LOG4CXX_MULTI_PROCESS
+  //do re-check before every write
+  //
+  apr_finfo_t finfo1, finfo2;
+  apr_status_t st1, st2;
+  apr_file_t* _fd = getWriter()->getOutPutStreamPtr()->getFileOutPutStreamPtr().getFilePtr();
+  st1 = apr_file_info_get(&finfo1, APR_FINFO_IDENT, _fd);
+  if (st1 != APR_SUCCESS){
+      LogLog::warn(LOG4CXX_STR("apr_file_info_get failed"));
+  }
+
+  st2 = apr_stat(&finfo2, std::string(getFile()).c_str(), APR_FINFO_IDENT, p.getAPRPool());
+  if (st2 != APR_SUCCESS){
+      std::string err = "apr_stat failed. file:" + std::string(getFile());
+      LogLog::warn(LOG4CXX_STR(err.c_str()));
+  }
+
+  bool bAlreadyRolled = ((st1 == APR_SUCCESS) && (st2 == APR_SUCCESS)
+      && ((finfo1.device != finfo2.device) || (finfo1.inode != finfo2.inode)));
+
+  if (bAlreadyRolled){
+      reopenLatestFile(p);
+  }
+#endif
+
   FileAppender::subAppend(event, p);
 }
 
@@ -345,10 +487,17 @@
   void write(ByteBuffer& buf, Pool& p) {
     os->write(buf, p);
     if (rfa != 0) {
+#ifndef LOG4CXX_MULTI_PROCESS
         rfa->incrementFileLength(buf.limit());
+#else
+        rfa->setFileLength(File().setPath(rfa->getFile()).length(p));
+#endif
     }
   }
 
+#ifdef LOG4CXX_MULTI_PROCESS
+  OutputStream& getFileOutPutStreamPtr() { return *os;}
+#endif
 };
   }
 }
@@ -375,6 +524,12 @@
   return fileLength;
 }
 
+#ifdef LOG4CXX_MULTI_PROCESS
+void RollingFileAppenderSkeleton::setFileLength(size_t length){
+    fileLength = length;
+}
+#endif
+
 /**
  * Increments estimated byte length of current active log file.
  * @param increment additional bytes written to log file.
diff --git a/src/main/cpp/simpledateformat.cpp b/src/main/cpp/simpledateformat.cpp
index cf440ea..3ddb05c 100644
--- a/src/main/cpp/simpledateformat.cpp
+++ b/src/main/cpp/simpledateformat.cpp
@@ -232,7 +232,6 @@
 
 private:
   size_t width;
-  char zeroDigit;
 };
 
 
@@ -438,7 +437,7 @@
 class HourToken : public NumericToken
 {
 public:
-  HourToken( int width1, int /* offset1 */ ) : NumericToken( width1 )
+  HourToken( int width1, int /* offset1 */ ) : NumericToken( width1 ), offset( 0 )
   {
   }
 
@@ -498,6 +497,21 @@
 
 
 
+class MicrosecondToken : public NumericToken
+{
+public:
+  MicrosecondToken( int width1 ) : NumericToken( width1 )
+  {
+  }
+
+  int getField( const apr_time_exp_t & tm ) const
+  {
+    return tm.tm_usec;
+  }
+};
+
+
+
 class AMPMToken : public PatternToken
 {
 public:
@@ -684,7 +698,17 @@
                break;
 
                case 0x53: // 'S'
-                 token = ( new MillisecondToken( repeat ) );
+                 if ( repeat == 6 )
+                 {
+                   token = ( new MicrosecondToken( repeat ) );
+                 }
+                 else
+                 {
+                   // It would be nice to support patterns with arbitrary
+                   // subsecond precision (like "s.S" or "s.SSSS"), but we
+                   // don't; so this is a back-compatible default.
+                   token = ( new MillisecondToken( repeat ) );
+                 }
                break;
 
                case 0x7A: // 'z'
diff --git a/src/main/cpp/smtpappender.cpp b/src/main/cpp/smtpappender.cpp
index 968aab4..3439588 100644
--- a/src/main/cpp/smtpappender.cpp
+++ b/src/main/cpp/smtpappender.cpp
@@ -163,6 +163,7 @@
                         const LogString msg, Pool& p) {
                  message = smtp_add_message(session);
                  body = current = toMessage(msg, p);
+                 messagecbState = 0;
                  smtp_set_reverse_path(message, toAscii(from, p));
                  addRecipients(to, "To", p);
                  addRecipients(cc, "Cc", p);
@@ -181,6 +182,7 @@
            smtp_message_t message;
            const char* body;
            const char* current;
+           int messagecbState;
            void addRecipients(const LogString& addresses, const char* field, Pool& p) {
               if (!addresses.empty()) {
                 char* str = p.pstrdup(toAscii(addresses, p));;
@@ -263,6 +265,10 @@
                if (len == NULL) {
                    pThis->current = pThis->body;
                } else {
+                  // we are asked for headers, but we don't have any
+                  if ((pThis->messagecbState)++ == 0) {
+                    return NULL;
+                  }
                   if (pThis->current) {
                     *len = strlen(pThis->current);
                   }
@@ -473,21 +479,21 @@
 {
    bool activate = true;
    if (layout == 0) {
-      LogLog::error(LOG4CXX_STR("No layout set for appender named [") +name+ LOG4CXX_STR("]."));
+      errorHandler->error(LOG4CXX_STR("No layout set for appender named [") +name+ LOG4CXX_STR("]."));
       activate = false;
    }
    if(evaluator == 0) {
-      LogLog::error(LOG4CXX_STR("No TriggeringEventEvaluator is set for appender [")+
+      errorHandler->error(LOG4CXX_STR("No TriggeringEventEvaluator is set for appender [")+
           name+LOG4CXX_STR("]."));
       activate = false;
    }
    if(smtpHost.empty()) {
-      LogLog::error(LOG4CXX_STR("No smtpHost is set for appender [")+
+      errorHandler->error(LOG4CXX_STR("No smtpHost is set for appender [")+
           name+LOG4CXX_STR("]."));
       activate = false;
    }
    if(to.empty() && cc.empty() && bcc.empty()) {
-      LogLog::error(LOG4CXX_STR("No recipient address is set for appender [")+
+      errorHandler->error(LOG4CXX_STR("No recipient address is set for appender [")+
           name+LOG4CXX_STR("]."));
       activate = false;
    }
@@ -496,8 +502,8 @@
    activate &= asciiCheck(bcc, LOG4CXX_STR("bcc"));
    activate &= asciiCheck(from, LOG4CXX_STR("from"));
 
-#if !LOG4CXX_HAS_LIBESMTP
-   LogLog::error(LOG4CXX_STR("log4cxx built without SMTP support."));
+#if !LOG4CXX_HAVE_LIBESMTP
+   errorHandler->error(LOG4CXX_STR("log4cxx built without SMTP support."));
    activate = false;
 #endif
    if (activate) {
@@ -598,7 +604,7 @@
 */
 void SMTPAppender::sendBuffer(Pool& p)
 {
-#if LOG4CXX_HAS_LIBESMTP
+#if LOG4CXX_HAVE_LIBESMTP
    // Note: this code already owns the monitor for this
    // appender. This frees us from needing to synchronize on 'cb'.
    try
@@ -653,10 +659,10 @@
 oldest events are deleted as new events are added to the
 buffer. By default the size of the cyclic buffer is 512 events.
 */
-void SMTPAppender::setBufferSize(int bufferSize)
+void SMTPAppender::setBufferSize(int sz)
 {
-   this->bufferSize = bufferSize;
-   cb.resize(bufferSize);
+   this->bufferSize = sz;
+   cb.resize(sz);
 }
 
 /**
diff --git a/src/main/cpp/socket.cpp b/src/main/cpp/socket.cpp
index 85e61e2..0d876ed 100644
--- a/src/main/cpp/socket.cpp
+++ b/src/main/cpp/socket.cpp
@@ -29,7 +29,7 @@
 /** Creates a stream socket and connects it to the specified port
 number at the specified IP address.
 */
-Socket::Socket(InetAddressPtr& address, int port) : pool(), socket(0), address(address), port(port)
+Socket::Socket(InetAddressPtr& addr, int prt) : pool(), socket(0), address(addr), port(prt)
 {
   apr_status_t status =
     apr_socket_create(&socket, APR_INET, SOCK_STREAM,
@@ -38,13 +38,13 @@
     throw SocketException(status);
   }
 
-  LOG4CXX_ENCODE_CHAR(host, address->getHostAddress());
+  LOG4CXX_ENCODE_CHAR(host, addr->getHostAddress());
 
   // create socket address (including port)
   apr_sockaddr_t *client_addr;
   status =
       apr_sockaddr_info_get(&client_addr, host.c_str(), APR_INET,
-                                  port, 0, pool.getAPRPool());
+                                  prt, 0, pool.getAPRPool());
   if (status != APR_SUCCESS) {
       throw ConnectException(status);
   }
@@ -56,10 +56,10 @@
   }
 }
 
-Socket::Socket(apr_socket_t* socket, apr_pool_t* pool) :
-    pool(pool, true), socket(socket) {
+Socket::Socket(apr_socket_t* s, apr_pool_t* p) :
+    pool(p, true), socket(s) {
     apr_sockaddr_t* sa;
-    apr_status_t status = apr_socket_addr_get(&sa, APR_REMOTE, socket);
+    apr_status_t status = apr_socket_addr_get(&sa, APR_REMOTE, s);
     if (status == APR_SUCCESS) {
         port = sa->port;
         LogString remotename;
diff --git a/src/main/cpp/socketappender.cpp b/src/main/cpp/socketappender.cpp
index 6c4fc60..70826c3 100644
--- a/src/main/cpp/socketappender.cpp
+++ b/src/main/cpp/socketappender.cpp
@@ -38,74 +38,93 @@
 
 
 // The default port number of remote logging server (4560)
-int SocketAppender::DEFAULT_PORT                 = 4560;
+int SocketAppender::DEFAULT_PORT				= 4560;
 
 // The default reconnection delay (30000 milliseconds or 30 seconds).
-int SocketAppender::DEFAULT_RECONNECTION_DELAY   = 30000;
-
-
+int SocketAppender::DEFAULT_RECONNECTION_DELAY	= 30000;
 
 SocketAppender::SocketAppender()
-: SocketAppenderSkeleton(DEFAULT_PORT, DEFAULT_RECONNECTION_DELAY) {
+: SocketAppenderSkeleton(DEFAULT_PORT, DEFAULT_RECONNECTION_DELAY)
+{
 }
 
 SocketAppender::SocketAppender(InetAddressPtr& address1, int port1)
-: SocketAppenderSkeleton(address1, port1, DEFAULT_RECONNECTION_DELAY) {
-    Pool p;
-    activateOptions(p);
+: SocketAppenderSkeleton(address1, port1, DEFAULT_RECONNECTION_DELAY)
+{
+	Pool p;
+	activateOptions(p);
 }
 
 SocketAppender::SocketAppender(const LogString& host, int port1)
-: SocketAppenderSkeleton(host, port1, DEFAULT_RECONNECTION_DELAY) {
-    Pool p;
-    activateOptions(p);
+: SocketAppenderSkeleton(host, port1, DEFAULT_RECONNECTION_DELAY)
+{
+	Pool p;
+	activateOptions(p);
 }
 
 SocketAppender::~SocketAppender()
 {
-    finalize();
+	finalize();
 }
 
-int SocketAppender::getDefaultDelay() const {
-    return DEFAULT_RECONNECTION_DELAY;
+int SocketAppender::getDefaultDelay() const
+{
+	return DEFAULT_RECONNECTION_DELAY;
 }
 
-int SocketAppender::getDefaultPort() const {
-    return DEFAULT_PORT;
+int SocketAppender::getDefaultPort() const
+{
+	return DEFAULT_PORT;
 }
 
-void SocketAppender::setSocket(log4cxx::helpers::SocketPtr& socket, Pool& p) {
-    LOCK_W sync(mutex);
-    oos = new ObjectOutputStream(new SocketOutputStream(socket), p);
+void SocketAppender::setSocket(log4cxx::helpers::SocketPtr& socket, Pool& p)
+{
+	LOCK_W sync(mutex);
+
+	oos = new ObjectOutputStream(new SocketOutputStream(socket), p);
 }
 
-void SocketAppender::cleanUp(Pool& p) {
-    if (oos != 0) {
-        try {
-            oos->close(p);
-            oos = 0;
-        } catch(std::exception& e) {
-        }
-    }
+void SocketAppender::cleanUp(Pool& p)
+{
+	if (oos == 0)
+	{
+		return;
+	}
+
+	try
+	{
+		oos->close(p);
+		oos = 0;
+	}
+	catch(std::exception& e)
+	{}
 }
 
+void SocketAppender::append(const spi::LoggingEventPtr& event, log4cxx::helpers::Pool& p)
+{
+	if (oos == 0)
+	{
+		return;
+	}
 
-void SocketAppender::append(const spi::LoggingEventPtr& event, log4cxx::helpers::Pool& p) {
-    if (oos != 0) {
-        LogString ndcVal;
-        event->getNDC(ndcVal);
-        event->getThreadName();
-        // Get a copy of this thread's MDC.
-        event->getMDCCopy();
-        try {
-           event->write(*oos, p);
-           oos->flush(p);
-        } catch(std::exception& e) {
-           oos = 0;
-           LogLog::warn(LOG4CXX_STR("Detected problem with connection: "), e);
-           if (getReconnectionDelay() > 0) {
-               fireConnector();
-           }
-        }
-    }
+	LogString ndcVal;
+	event->getNDC(ndcVal);
+	event->getThreadName();
+	event->getMDCCopy();
+
+	try
+	{
+		event->write(*oos, p);
+		oos->reset(p);
+	}
+	catch(std::exception& e)
+	{
+		oos = 0;
+		LogLog::warn(LOG4CXX_STR("Detected problem with connection: "), e);
+
+		if (getReconnectionDelay() > 0)
+		{
+			fireConnector();
+		}
+	}
 }
diff --git a/src/main/cpp/socketappenderskeleton.cpp b/src/main/cpp/socketappenderskeleton.cpp
index 6a28a9d..3010590 100755
--- a/src/main/cpp/socketappenderskeleton.cpp
+++ b/src/main/cpp/socketappenderskeleton.cpp
@@ -28,7 +28,6 @@
 #include <log4cxx/helpers/transcoder.h>
 #include <log4cxx/helpers/bytearrayoutputstream.h>
 
-
 using namespace log4cxx;
 using namespace log4cxx::helpers;
 using namespace log4cxx::net;
@@ -65,6 +64,11 @@
 SocketAppenderSkeleton::~SocketAppenderSkeleton()
 {
         finalize();
+        try {
+            thread.join();
+        } catch(ThreadException& ex) {
+            LogLog::error(LOG4CXX_STR("Error closing socket appender connection thread"), ex);
+        }
 }
 
 void SocketAppenderSkeleton::activateOptions(Pool& p)
@@ -130,8 +134,13 @@
 void SocketAppenderSkeleton::fireConnector()
 {
         LOCK_W sync(mutex);
-        if (thread.isActive()) {
-                thread.run(monitor, this);
+        if ( !thread.isAlive() ) {
+             LogLog::debug(LOG4CXX_STR("Connector thread not alive: starting monitor."));
+             try {
+                  thread.run(monitor, this);
+             } catch( ThreadException& te ) {
+                  LogLog::error(LOG4CXX_STR("Monitor not started: "), te);
+             }
         }
 }
 
@@ -144,14 +153,20 @@
                 try
                 {
                         Thread::sleep(socketAppender->reconnectionDelay);
-                        LogLog::debug(LogString(LOG4CXX_STR("Attempting connection to "))
+                        if(!socketAppender->closed) {
+                            LogLog::debug(LogString(LOG4CXX_STR("Attempting connection to "))
                                 + socketAppender->address->getHostName());
-                        socket = new Socket(socketAppender->address, socketAppender->port);
-                        Pool p;
-                        socketAppender->setSocket(socket, p);
-                        LogLog::debug(LOG4CXX_STR("Connection established. Exiting connector thread."));
+                            socket = new Socket(socketAppender->address, socketAppender->port);
+                            Pool p;
+                            socketAppender->setSocket(socket, p);
+                            LogLog::debug(LOG4CXX_STR("Connection established. Exiting connector thread."));
+                        }
                         return NULL;
                 }
+                catch(InterruptedException&) {
+                    LogLog::debug(LOG4CXX_STR("Connector interrupted.  Leaving loop."));
+                    return NULL;
+                }
                 catch(ConnectException&)
                 {
                         LogLog::debug(LOG4CXX_STR("Remote host ")
diff --git a/src/main/cpp/sockethubappender.cpp b/src/main/cpp/sockethubappender.cpp
index d169dde..b519fb0 100644
--- a/src/main/cpp/sockethubappender.cpp
+++ b/src/main/cpp/sockethubappender.cpp
@@ -156,6 +156,7 @@
                 {
                         // there was an io exception so just drop the connection
                         it = streams.erase(it);
+                        itEnd = streams.end();
                         LogLog::debug(LOG4CXX_STR("dropped connection"), e);
                 }
         }
diff --git a/src/main/cpp/socketoutputstream.cpp b/src/main/cpp/socketoutputstream.cpp
index 185f835..7c1e449 100644
--- a/src/main/cpp/socketoutputstream.cpp
+++ b/src/main/cpp/socketoutputstream.cpp
@@ -20,6 +20,9 @@
 #include <log4cxx/helpers/socket.h>
 #include <log4cxx/helpers/bytebuffer.h>
 
+#include <cstdio>
+#include <cstring>
+
 using namespace log4cxx;
 using namespace log4cxx::helpers;
 
diff --git a/src/main/cpp/stringhelper.cpp b/src/main/cpp/stringhelper.cpp
index ca4b1ac..bbd5fe2 100644
--- a/src/main/cpp/stringhelper.cpp
+++ b/src/main/cpp/stringhelper.cpp
@@ -28,7 +28,12 @@
 #endif
 #include <log4cxx/private/log4cxx_private.h>
 #include <cctype>
+#include <iterator>
 #include <apr.h>
+//LOG4CXX-417: need stdlib.h for atoi on some systems.
+#ifdef APR_HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
 
 
 using namespace log4cxx;
@@ -79,6 +84,11 @@
 
 bool StringHelper::startsWith(const LogString& s, const LogString& prefix)
 {
+    if (s.length() < prefix.length())
+    {
+      return false;
+    }
+
     return s.compare(0, prefix.length(), prefix) == 0;
 }
 
diff --git a/src/main/cpp/synchronized.cpp b/src/main/cpp/synchronized.cpp
old mode 100755
new mode 100644
index 210bf1f..e561f54
--- a/src/main/cpp/synchronized.cpp
+++ b/src/main/cpp/synchronized.cpp
@@ -37,6 +37,18 @@
 #endif
 }
 
+synchronized::synchronized(apr_thread_mutex_t* mutex1)
+: mutex(mutex1)
+{
+#if APR_HAS_THREADS
+        apr_status_t stat = apr_thread_mutex_lock(
+            (apr_thread_mutex_t*) this->mutex);
+        if (stat != APR_SUCCESS) {
+                throw MutexException(stat);
+        }
+#endif
+}
+
 synchronized::~synchronized()
 {
 #if APR_HAS_THREADS
diff --git a/src/main/cpp/syslogappender.cpp b/src/main/cpp/syslogappender.cpp
index 83baca7..a50f6c5 100644
--- a/src/main/cpp/syslogappender.cpp
+++ b/src/main/cpp/syslogappender.cpp
@@ -223,27 +223,27 @@
         {
                 return LOG_LOCAL1;
         }
-        else if (StringHelper::equalsIgnoreCase(s, LOG4CXX_STR("LOCAL1"), LOG4CXX_STR("local2")))
+        else if (StringHelper::equalsIgnoreCase(s, LOG4CXX_STR("LOCAL2"), LOG4CXX_STR("local2")))
         {
                 return LOG_LOCAL2;
         }
-        else if (StringHelper::equalsIgnoreCase(s, LOG4CXX_STR("LOCAL1"), LOG4CXX_STR("local3")))
+        else if (StringHelper::equalsIgnoreCase(s, LOG4CXX_STR("LOCAL3"), LOG4CXX_STR("local3")))
         {
                 return LOG_LOCAL3;
         }
-        else if (StringHelper::equalsIgnoreCase(s, LOG4CXX_STR("LOCAL1"), LOG4CXX_STR("local4")))
+        else if (StringHelper::equalsIgnoreCase(s, LOG4CXX_STR("LOCAL4"), LOG4CXX_STR("local4")))
         {
                 return LOG_LOCAL4;
         }
-        else if (StringHelper::equalsIgnoreCase(s, LOG4CXX_STR("LOCAL1"), LOG4CXX_STR("local5")))
+        else if (StringHelper::equalsIgnoreCase(s, LOG4CXX_STR("LOCAL5"), LOG4CXX_STR("local5")))
         {
                 return LOG_LOCAL5;
         }
-        else if (StringHelper::equalsIgnoreCase(s, LOG4CXX_STR("LOCAL1"), LOG4CXX_STR("local6")))
+        else if (StringHelper::equalsIgnoreCase(s, LOG4CXX_STR("LOCAL6"), LOG4CXX_STR("local6")))
         {
                 return LOG_LOCAL6;
         }
-        else if (StringHelper::equalsIgnoreCase(s, LOG4CXX_STR("LOCAL1"), LOG4CXX_STR("local7")))
+        else if (StringHelper::equalsIgnoreCase(s, LOG4CXX_STR("LOCAL7"), LOG4CXX_STR("local7")))
         {
                 return LOG_LOCAL7;
         }
@@ -323,6 +323,17 @@
                 delete this->sw;
                 this->sw = 0;
         }
+        LogString slHost = syslogHost1;
+        int slHostPort = -1;
+
+        LogString::size_type colonPos = 0;
+        colonPos = slHost.rfind(':');
+        if (colonPos != LogString::npos)
+        {
+            slHostPort = StringHelper::toInt(slHost.substr(colonPos+1));
+            // Erase the :port part of the host name
+            slHost.erase( colonPos );
+        }
 
 // On the local host, we can directly use the system function 'syslog'
 // if it is available (cf. append)
@@ -330,9 +341,11 @@
         if (syslogHost1 != LOG4CXX_STR("localhost") && syslogHost1 != LOG4CXX_STR("127.0.0.1")
         && !syslogHost1.empty())
 #endif
-                this->sw = new SyslogWriter(syslogHost1);
+                if (slHostPort >= 0) this->sw = new SyslogWriter(slHost, slHostPort);
+                else this->sw = new SyslogWriter(slHost);
 
-        this->syslogHost = syslogHost1;
+        this->syslogHost = slHost;
+        this->syslogHostPort = slHostPort;
 }
 
 
diff --git a/src/main/cpp/syslogwriter.cpp b/src/main/cpp/syslogwriter.cpp
index 7b80564..676a924 100644
--- a/src/main/cpp/syslogwriter.cpp
+++ b/src/main/cpp/syslogwriter.cpp
@@ -26,13 +26,11 @@
 #include <log4cxx/helpers/datagrampacket.h>
 #include <log4cxx/helpers/transcoder.h>
 
-#define SYSLOG_PORT 514
-
 using namespace log4cxx;
 using namespace log4cxx::helpers;
 
-SyslogWriter::SyslogWriter(const LogString& syslogHost1)
-: syslogHost(syslogHost1)
+SyslogWriter::SyslogWriter(const LogString& syslogHost1, int syslogHostPort1)
+: syslogHost(syslogHost1), syslogHostPort(syslogHostPort1)
 {
    try
    {
@@ -61,7 +59,7 @@
 
       DatagramPacketPtr packet(
           new DatagramPacket((void*) data.data(), data.length(),
-                             address, SYSLOG_PORT));
+                             address, syslogHostPort));
 
       ds->send(packet);
    }
diff --git a/src/main/cpp/systemoutwriter.cpp b/src/main/cpp/systemoutwriter.cpp
index ee86446..4296f77 100644
--- a/src/main/cpp/systemoutwriter.cpp
+++ b/src/main/cpp/systemoutwriter.cpp
@@ -29,7 +29,6 @@
 
 IMPLEMENT_LOG4CXX_OBJECT(SystemOutWriter)
 
-
 SystemOutWriter::SystemOutWriter() {
 }
 
diff --git a/src/main/cpp/telnetappender.cpp b/src/main/cpp/telnetappender.cpp
index 35f901b..ff38ee3 100644
--- a/src/main/cpp/telnetappender.cpp
+++ b/src/main/cpp/telnetappender.cpp
@@ -204,7 +204,8 @@
                         Pool p;
                         pThis->writeStatus(newClient, LOG4CXX_STR("Log closed.\r\n"), p);
                         newClient->close();
-                        return NULL;
+
+                        break;
                 }
 
                 size_t count = pThis->activeConnections;
@@ -223,6 +224,7 @@
                                 if (*iter == NULL) {
                                     *iter = newClient;
                                     pThis->activeConnections++;
+
                                     break;
                                 }
                         }
@@ -235,13 +237,13 @@
                 }
         } catch(InterruptedIOException &e) {
                 if (pThis->closed) {
-                    return NULL;
+                    break;
                 }
         } catch(Exception& e) {
                 if (!pThis->closed) {
                     LogLog::error(LOG4CXX_STR("Encountered error while in SocketHandler loop."), e);
                 } else {
-                    return NULL;
+                    break;
                 }
         }
     }
diff --git a/src/main/cpp/threadcxx.cpp b/src/main/cpp/threadcxx.cpp
index 63dacbe..05450fd 100644
--- a/src/main/cpp/threadcxx.cpp
+++ b/src/main/cpp/threadcxx.cpp
@@ -22,41 +22,138 @@
 #include <apr_atomic.h>
 #include <log4cxx/helpers/pool.h>
 #include <log4cxx/helpers/threadlocal.h>
+#include <log4cxx/helpers/synchronized.h>
+#include <apr_thread_cond.h>
 
 using namespace log4cxx::helpers;
 using namespace log4cxx;
 
-Thread::Thread() : thread(NULL), alive(0), interruptedStatus(0) {
+#if APR_HAS_THREADS
+namespace {
+                        /**
+                         *   This class is used to encapsulate the parameters to
+                         *   Thread::run when they are passed to Thread::launcher.
+                         *
+                         */
+                        class LaunchPackage {
+                        public:
+                            /**
+                             *  Placement new to create LaunchPackage in specified pool.
+                             *  LaunchPackage needs to be dynamically allocated since
+                             *  since a stack allocated instance may go out of scope
+                             *  before thread is launched.
+                             */
+                            static void* operator new(size_t sz, Pool& p) {
+    				return p.palloc(sz);
+			    }
+                            /**
+                            *  operator delete would be called if exception during construction.
+                            */
+                            static void operator delete(void*, Pool& p) {
+                            }
+                            /**
+                             *  Create new instance.
+                             */
+			    LaunchPackage(Thread* t, Runnable r, void* d) : thread(t), runnable(r), data(d) {
+                            }
+                            /**
+                             * Gets thread parameter.
+                             * @return thread.
+                             */
+                            Thread* getThread() const {
+				  return thread;
+			    }
+
+                            /**
+                             *  Gets runnable parameter.
+                             *  @return runnable.
+                             */
+                            Runnable getRunnable() const {
+                                  return runnable;
+                            }
+                            /**
+                             *  gets data parameter.
+                             *  @return thread.
+                             */
+                            void* getData() const {
+                                  return data;
+                            }
+                        private:
+                            LaunchPackage(const LaunchPackage&);
+                            LaunchPackage& operator=(const LaunchPackage&);
+                            Thread* thread;
+                            Runnable runnable;
+                            void* data;
+                        };
+
+                        /**
+                         *  This object atomically sets the specified memory location
+                         *  to non-zero on construction and to zero on destruction.
+                         *  Used to maintain Thread.alive.
+                         */
+                        class LaunchStatus {
+                        public:
+                            /*
+                             *  Construct new instance.
+                             *  @param p address of memory to set to non-zero on construction, zero on destruction.
+                             */
+			    LaunchStatus(volatile unsigned int* p) : alive(p) {
+    				apr_atomic_set32(alive, 0xFFFFFFFF);
+			    }
+                            /**
+                             *  Destructor.
+                             */
+                            ~LaunchStatus() {
+				 apr_atomic_set32(alive, 0);
+                             }
+
+                        private:
+                            LaunchStatus(const LaunchStatus&);
+                            LaunchStatus& operator=(const LaunchStatus&);
+                            volatile unsigned int* alive;
+                        };
+
+                        /**
+                         *   Get a key to the thread local storage used to hold the reference to
+                         *   the corresponding Thread object.
+                         */
+			ThreadLocal& getThreadLocal() {
+     				static ThreadLocal tls;
+     				return tls;
+			}
+
+}
+
+void* LOG4CXX_THREAD_FUNC ThreadLaunch::launcher(apr_thread_t* thread, void* data) {
+	LaunchPackage* package = (LaunchPackage*) data;
+	ThreadLocal& tls = getThreadLocal();
+	tls.set(package->getThread());
+    {
+      (package->getRunnable())(thread, package->getData());
+      package->getThread()->ending();
+    }
+    apr_thread_exit(thread, 0); // this function never returns !
+    return 0;
+}
+#endif
+
+Thread::Thread() : thread(NULL), alive(0), interruptedStatus(0),
+    interruptedMutex(NULL), interruptedCondition(NULL) {
 }
 
 Thread::~Thread() {
     join();
 }
 
-Thread::LaunchPackage::LaunchPackage(Thread* t, Runnable r, void* d) : thread(t), runnable(r), data(d) {
-}
 
-Thread* Thread::LaunchPackage::getThread() const {
-    return thread;
-}
-
-Runnable Thread::LaunchPackage::getRunnable() const {
-    return runnable;
-}
-
-void* Thread::LaunchPackage::getData() const {
-    return data;
-}
-
-void* Thread::LaunchPackage::operator new(size_t sz, Pool& p) {
-    return p.palloc(sz);
-}
-
-void Thread::LaunchPackage::operator delete(void* mem, Pool& p) {
-}
 
 void Thread::run(Runnable start, void* data) {
 #if APR_HAS_THREADS
+        // Try to join first if previous instance did exit
+        if ( isActive() && !isAlive() ) {
+             join();
+        }
+        // now we're ready to create the thread again
         //
         //    if attempting a second run method on the same Thread object
         //         throw an exception
@@ -70,58 +167,44 @@
                 throw ThreadException(stat);
         }
 
+       stat = apr_thread_cond_create(&interruptedCondition, p.getAPRPool());
+       if (stat != APR_SUCCESS) {
+            throw ThreadException(stat);
+       }
+       stat = apr_thread_mutex_create(&interruptedMutex, APR_THREAD_MUTEX_NESTED,
+                    p.getAPRPool());
+       if (stat != APR_SUCCESS) {
+            throw ThreadException(stat);
+       }
+
         //   create LaunchPackage on the thread's memory pool
         LaunchPackage* package = new(p) LaunchPackage(this, start, data);
         stat = apr_thread_create(&thread, attrs,
-            launcher, package, p.getAPRPool());
+            ThreadLaunch::launcher, package, p.getAPRPool());
         if (stat != APR_SUCCESS) {
                 throw ThreadException(stat);
         }
+        // we need to set alive here already, since we use isAlive() to check
+        // if run() has been called in a thread-safe way.
+        apr_atomic_set32(&alive, 0xFFFFFFFF);
 #else
         throw ThreadException(LOG4CXX_STR("APR_HAS_THREADS is not true"));
 #endif
 }
 
-
-Thread::LaunchStatus::LaunchStatus(volatile unsigned int* p) : alive(p) {
-    apr_atomic_set32(alive, 0xFFFFFFFF);
-}
-
-Thread::LaunchStatus::~LaunchStatus() {
-    apr_atomic_set32(alive, 0);
-}
-
-#if APR_HAS_THREADS
-void* LOG4CXX_THREAD_FUNC Thread::launcher(apr_thread_t* thread, void* data) {
-    LaunchPackage* package = (LaunchPackage*) data;
-    ThreadLocal& tls = getThreadLocal();
-    tls.set(package->getThread());
-    LaunchStatus alive(&package->getThread()->alive);
-    void* retval = (package->getRunnable())(thread, package->getData());
-    apr_thread_exit(thread, 0);
-    return retval;
-}
-#endif
-
-
 void Thread::join() {
 #if APR_HAS_THREADS
-        if (thread != NULL) {
-                apr_status_t startStat;
-                apr_status_t stat = apr_thread_join(&startStat, thread);
-                thread = NULL;
-                if (stat != APR_SUCCESS) {
-                        throw ThreadException(stat);
-                }
+    if (thread != NULL) {
+        apr_status_t startStat;
+        apr_status_t stat = apr_thread_join(&startStat, thread);
+        thread = NULL;
+        if (stat != APR_SUCCESS) {
+            throw ThreadException(stat);
         }
+    }
 #endif
 }
 
-ThreadLocal& Thread::getThreadLocal() {
-     static ThreadLocal tls;
-     return tls;
-}
-
 void Thread::currentThreadInterrupt() {
 #if APR_HAS_THREADS
    void* tls = getThreadLocal().get();
@@ -133,6 +216,13 @@
 
 void Thread::interrupt() {
     apr_atomic_set32(&interruptedStatus, 0xFFFFFFFF);
+#if APR_HAS_THREADS
+    if (interruptedMutex != NULL) {
+        synchronized sync(interruptedMutex);
+        apr_status_t stat = apr_thread_cond_signal(interruptedCondition);
+        if (stat != APR_SUCCESS) throw ThreadException(stat);
+    }
+#endif
 }
 
 bool Thread::interrupted() {
@@ -168,8 +258,25 @@
     if(interrupted()) {
          throw InterruptedException();
     }
-#endif
+    if (duration > 0) {
+        Thread* pThis = (Thread*) getThreadLocal().get();
+        if (pThis == NULL) {
+            apr_sleep(duration*1000);
+        } else {
+            synchronized sync(pThis->interruptedMutex);
+            apr_status_t stat = apr_thread_cond_timedwait(pThis->interruptedCondition,
+                pThis->interruptedMutex, duration*1000);
+            if (stat != APR_SUCCESS && !APR_STATUS_IS_TIMEUP(stat)) {
+                throw ThreadException(stat);
+            }
+            if (interrupted()) {
+                throw InterruptedException();
+            }
+        }
+    }
+#else
     if (duration > 0) {
         apr_sleep(duration*1000);
     }
+#endif
 }
diff --git a/src/main/cpp/threadspecificdata.cpp b/src/main/cpp/threadspecificdata.cpp
index 63b9901..0968526 100644
--- a/src/main/cpp/threadspecificdata.cpp
+++ b/src/main/cpp/threadspecificdata.cpp
@@ -18,6 +18,7 @@
 #include <log4cxx/logstring.h>
 #include <log4cxx/helpers/threadspecificdata.h>
 #include <log4cxx/helpers/exception.h>
+#include <apr_thread_proc.h>
 #if !defined(LOG4CXX)
 #define LOG4CXX 1
 #endif
@@ -79,7 +80,7 @@
         data = createCurrentData();
     }
     if (data != 0) {
-        data->getMap().insert(log4cxx::MDC::Map::value_type(key, val));
+        data->getMap()[key] = val;
     }
 }
 
diff --git a/src/main/cpp/timebasedrollingpolicy.cpp b/src/main/cpp/timebasedrollingpolicy.cpp
index 5214a31..0f786ec 100644
--- a/src/main/cpp/timebasedrollingpolicy.cpp
+++ b/src/main/cpp/timebasedrollingpolicy.cpp
@@ -18,6 +18,10 @@
 #pragma warning ( disable: 4231 4251 4275 4786 )
 #endif
 
+#ifdef LOG4CXX_MULTI_PROCESS
+#include <libgen.h>
+#endif
+
 #include <log4cxx/logstring.h>
 #include <log4cxx/rolling/timebasedrollingpolicy.h>
 #include <log4cxx/pattern/filedatepatternconverter.h>
@@ -27,6 +31,8 @@
 #include <log4cxx/helpers/exception.h>
 #include <log4cxx/rolling/gzcompressaction.h>
 #include <log4cxx/rolling/zipcompressaction.h>
+#include <log4cxx/rolling/rollingfileappenderskeleton.h>
+#include<iostream>
 
 #ifndef INT64_C
 #define INT64_C(x) x ## LL
@@ -34,7 +40,6 @@
 
 #include <apr_time.h>
 
-
 using namespace log4cxx;
 using namespace log4cxx::rolling;
 using namespace log4cxx::helpers;
@@ -42,9 +47,111 @@
 
 IMPLEMENT_LOG4CXX_OBJECT(TimeBasedRollingPolicy)
 
-TimeBasedRollingPolicy::TimeBasedRollingPolicy() {
+#ifdef LOG4CXX_MULTI_PROCESS
+#define MMAP_FILE_SUFFIX ".map"
+#define LOCK_FILE_SUFFIX ".maplck"
+#define MAX_FILE_LEN 2048
+
+bool TimeBasedRollingPolicy::isMapFileEmpty(log4cxx::helpers::Pool& pool){
+    apr_finfo_t finfo;
+    apr_status_t st = apr_stat(&finfo, _mapFileName.c_str(), APR_FINFO_SIZE, pool.getAPRPool());
+    if (st != APR_SUCCESS){
+        LogLog::warn(LOG4CXX_STR("apr_stat failed."));
+    }
+    if (st == APR_SUCCESS && !finfo.size)
+        return true;
+    return false;
 }
 
+void TimeBasedRollingPolicy::initMMapFile(const LogString& lastFileName, log4cxx::helpers::Pool& pool){
+    int iRet = 0;
+    if (!_mmap){
+        iRet = createMMapFile(std::string(_fileNamePattern), pool);
+    }
+    if (!iRet && isMapFileEmpty(pool)) {
+        lockMMapFile(APR_FLOCK_EXCLUSIVE);
+        memset(_mmap->mm, 0, MAX_FILE_LEN);
+        memcpy(_mmap->mm, std::string(lastFileName).c_str(), std::string(lastFileName).size());
+        unLockMMapFile();
+    }
+}
+
+const std::string TimeBasedRollingPolicy::createFile(const std::string& fileName, const std::string& suffix, log4cxx::helpers::Pool& pool) {
+   char szUid[MAX_FILE_LEN] = {'\0'};
+   char szBaseName[MAX_FILE_LEN] = {'\0'};
+   char szDirName[MAX_FILE_LEN] = {'\0'};
+   memcpy(szDirName, fileName.c_str(), fileName.size() > MAX_FILE_LEN ? MAX_FILE_LEN : fileName.size());
+   memcpy(szBaseName, fileName.c_str(), fileName.size() > MAX_FILE_LEN ? MAX_FILE_LEN : fileName.size());
+
+   apr_uid_t uid;
+   apr_gid_t groupid;
+   apr_status_t stat = apr_uid_current(&uid, &groupid, pool.getAPRPool());
+   if (stat == APR_SUCCESS){
+       snprintf(szUid, MAX_FILE_LEN, "%u", uid);
+   }
+   return std::string(::dirname(szDirName)) + "/." + ::basename(szBaseName) + szUid + suffix;
+}
+
+int TimeBasedRollingPolicy::createMMapFile(const std::string& fileName, log4cxx::helpers::Pool& pool){
+   _mapFileName = createFile(fileName, MMAP_FILE_SUFFIX, pool);
+
+   apr_status_t stat = apr_file_open(&_file_map, _mapFileName.c_str(), APR_CREATE | APR_READ | APR_WRITE, APR_OS_DEFAULT, _mmapPool->getAPRPool());
+   if (stat != APR_SUCCESS){
+        std::string err(std::string("open mmap file failed. ") + std::string(strerror(errno)) + ". Check the privilege or try to remove " + _mapFileName + " if exist.");
+        LogLog::warn(LOG4CXX_STR(err.c_str()));
+        return -1;
+   }
+
+   if (isMapFileEmpty(pool)){
+       stat = apr_file_trunc(_file_map, MAX_FILE_LEN + 1);
+       if (stat != APR_SUCCESS){
+           LogLog::warn(LOG4CXX_STR("apr_file_trunc failed."));
+           apr_file_close(_file_map);
+           return -1;
+       }
+   }
+
+   stat = apr_mmap_create(&_mmap, _file_map, 0, MAX_FILE_LEN, APR_MMAP_WRITE | APR_MMAP_READ, _mmapPool->getAPRPool());
+   if (stat != APR_SUCCESS){
+       LogLog::warn(LOG4CXX_STR("mmap failed."));
+       apr_file_close(_file_map);
+       return -1;
+   }
+
+   return 0;
+}
+
+int TimeBasedRollingPolicy::lockMMapFile(int type)
+{
+    apr_status_t stat = apr_file_lock(_lock_file, type);
+    if (stat != APR_SUCCESS) {
+        LogLog::warn(LOG4CXX_STR("apr_file_lock for mmap failed."));
+    }
+}
+int TimeBasedRollingPolicy::unLockMMapFile()
+{
+    apr_status_t stat = apr_file_unlock(_lock_file);
+    if (stat != APR_SUCCESS) {
+        LogLog::warn(LOG4CXX_STR("apr_file_unlock for mmap failed."));
+    }
+}
+
+#endif
+
+TimeBasedRollingPolicy::TimeBasedRollingPolicy()
+#ifdef LOG4CXX_MULTI_PROCESS
+    :_mmap(NULL), _file_map(NULL), bAlreadyInitialized(false), _mmapPool(new Pool()), _lock_file(NULL), bRefreshCurFile(false)
+#endif
+{
+}
+
+#ifdef LOG4CXX_MULTI_PROCESS
+TimeBasedRollingPolicy::~TimeBasedRollingPolicy() {
+    //no-need to delete mmap
+    delete _mmapPool;
+}
+#endif
+
 void TimeBasedRollingPolicy::addRef() const {
     TriggeringPolicy::addRef();
 }
@@ -75,6 +182,24 @@
     formatFileName(obj, buf, pool);
     lastFileName = buf;
 
+#ifdef LOG4CXX_MULTI_PROCESS
+    if (getPatternConverterList().size()){
+        (*(getPatternConverterList().begin()))->format(obj, _fileNamePattern, pool);
+    }else{
+        _fileNamePattern = lastFileName;
+    }
+
+    if (!_lock_file) {
+        const std::string lockname = createFile(std::string(_fileNamePattern), LOCK_FILE_SUFFIX, *_mmapPool);
+        apr_status_t stat = apr_file_open(&_lock_file, lockname.c_str(), APR_CREATE | APR_READ | APR_WRITE, APR_OS_DEFAULT, (*_mmapPool).getAPRPool());
+        if (stat != APR_SUCCESS) {
+            LogLog::warn(LOG4CXX_STR("open lock file failed."));
+        }
+    }
+
+    initMMapFile(lastFileName, *_mmapPool);
+#endif
+
     suffixLength = 0;
 
     if (lastFileName.length() >= 3) {
@@ -101,14 +226,17 @@
  * {@inheritDoc}
  */
 RolloverDescriptionPtr TimeBasedRollingPolicy::initialize(
-  const LogString& currentActiveFile,
-  const bool append,
-  Pool& pool) {
+	const	LogString&	currentActiveFile,
+	const	bool		append,
+			Pool&		pool)
+{
   apr_time_t n = apr_time_now();
   nextCheck = ((n / APR_USEC_PER_SEC) + 1) * APR_USEC_PER_SEC;
 
+  File currentFile(currentActiveFile);
+
   LogString buf;
-  ObjectPtr obj(new Date(n));
+  ObjectPtr obj(new Date(currentFile.exists(pool) ? currentFile.lastModified(pool) : n));
   formatFileName(obj, buf, pool);
   lastFileName = buf;
 
@@ -118,17 +246,18 @@
     return new RolloverDescription(
       currentActiveFile, append, noAction, noAction);
   } else {
+      bRefreshCurFile = true;
     return new RolloverDescription(
       lastFileName.substr(0, lastFileName.length() - suffixLength), append,
       noAction, noAction);
   }
 }
 
-
-
 RolloverDescriptionPtr TimeBasedRollingPolicy::rollover(
-   const LogString& currentActiveFile,
-   Pool& pool) {
+	const	LogString&	currentActiveFile,
+	const	bool		append,
+			Pool&		pool)
+{
   apr_time_t n = apr_time_now();
   nextCheck = ((n / APR_USEC_PER_SEC) + 1) * APR_USEC_PER_SEC;
 
@@ -138,6 +267,19 @@
 
   LogString newFileName(buf);
 
+#ifdef LOG4CXX_MULTI_PROCESS
+  bAlreadyInitialized = true;
+  if (_mmap && !isMapFileEmpty(*_mmapPool)){
+      lockMMapFile(APR_FLOCK_SHARED);
+      LogString mapLastFile((char *)_mmap->mm);
+      lastFileName = mapLastFile;
+      unLockMMapFile();
+  }else{
+      _mmap = NULL;
+      initMMapFile(lastFileName, *_mmapPool);
+  }
+#endif
+
   //
   //  if file names haven't changed, no rollover
   //
@@ -176,18 +318,40 @@
         File().setPath(lastBaseName), File().setPath(lastFileName), true);
   }
 
+#ifdef LOG4CXX_MULTI_PROCESS
+  if (_mmap && !isMapFileEmpty(*_mmapPool)){
+      lockMMapFile(APR_FLOCK_EXCLUSIVE);
+      memset(_mmap->mm, 0, MAX_FILE_LEN);
+      memcpy(_mmap->mm, std::string(newFileName).c_str(), std::string(newFileName).size());
+      unLockMMapFile();
+  }else{
+      _mmap = NULL;
+      initMMapFile(newFileName, *_mmapPool);
+  }
+#else
   lastFileName = newFileName;
+#endif
 
-  return new RolloverDescription(
-    nextActiveFile, false, renameAction, compressAction);
+  return new RolloverDescription(nextActiveFile, append, renameAction, compressAction);
 }
 
-
-
 bool TimeBasedRollingPolicy::isTriggeringEvent(
-  Appender* /* appender */,
+  Appender* appender,
   const log4cxx::spi::LoggingEventPtr& /* event */,
-  const LogString& /* filename */,
+  const LogString&  filename ,
   size_t /* fileLength */)  {
+#ifdef LOG4CXX_MULTI_PROCESS
+    if (bRefreshCurFile && _mmap && !isMapFileEmpty(*_mmapPool)) {
+        lockMMapFile(APR_FLOCK_SHARED);
+        LogString mapCurrent((char *)_mmap->mm);
+        unLockMMapFile();
+        LogString mapCurrentBase(mapCurrent.substr(0, mapCurrent.length() - suffixLength));
+        if (!mapCurrentBase.empty() && mapCurrentBase != filename) {
+            dynamic_cast<FileAppender *>(appender)->setFile(mapCurrentBase);
+        }
+    }
+    return ((apr_time_now()) > nextCheck) || (!bAlreadyInitialized);
+#else
     return apr_time_now() > nextCheck;
+#endif
 }
diff --git a/src/main/cpp/transcoder.cpp b/src/main/cpp/transcoder.cpp
index ba1de81..c3e6f62 100644
--- a/src/main/cpp/transcoder.cpp
+++ b/src/main/cpp/transcoder.cpp
@@ -356,7 +356,7 @@
         unsigned char u = (unsigned char) (sv >> 16);
         unsigned char w = (unsigned char) (u - 1);
         unsigned short hs = (0xD800 + ((w & 0xF) << 6) + ((sv & 0xFFFF) >> 10));
-        unsigned short ls = (0xDC00 + (sv && 0x3FF));
+        unsigned short ls = (0xDC00 + (sv & 0x3FF));
         dst.append(1, hs);
         dst.append(1, ls);
     }
@@ -523,13 +523,13 @@
                            '@', 'A', 'B', 'C', 'D', 'E', 'F',  'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O',
                            'P', 'Q', 'R', 'S', 'T', 'U', 'V',  'W', 'X', 'Y', 'Z', '[', '\\', ']', '^', '_',
                            '`', 'a', 'b', 'c', 'd', 'e', 'f',  'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o',
-                           'p', 'q', 'r', 's', 't', 'u', 'v',  'w', 'x', 'y', 'z', '{', '|', '}', '~', ' ' };
+                           'p', 'q', 'r', 's', 't', 'u', 'v',  'w', 'x', 'y', 'z', '{', '|', '}', '~' };
     std::string out;
     for(LogString::const_iterator iter = val.begin();
         iter != val.end();
         iter++) {
-        if (*iter >= 0x30 && *iter < 0x7F) {
-            out.append(1, asciiTable[*iter - 0x30]);
+        if (*iter >= 0x20 && *iter < 0x7F) {
+            out.append(1, asciiTable[*iter - 0x20]);
         } else {
             out.append(1, LOSSCHAR);
         }
diff --git a/src/main/cpp/writer.cpp b/src/main/cpp/writer.cpp
index b1f481f..ee44fca 100644
--- a/src/main/cpp/writer.cpp
+++ b/src/main/cpp/writer.cpp
@@ -17,6 +17,7 @@
 
 #include <log4cxx/logstring.h>
 #include <log4cxx/helpers/writer.h>
+#include <stdexcept>
 
 using namespace log4cxx::helpers;
 
@@ -27,3 +28,9 @@
 
 Writer::~Writer() {
 }
+
+#ifdef LOG4CXX_MULTI_PROCESS
+OutputStreamPtr Writer::getOutPutStreamPtr(){
+    throw std::logic_error("getOutPutStreamPtr must be implemented in the derived class that you are using");
+}
+#endif
diff --git a/src/main/cpp/writerappender.cpp b/src/main/cpp/writerappender.cpp
index 417f3a5..ca1baf8 100644
--- a/src/main/cpp/writerappender.cpp
+++ b/src/main/cpp/writerappender.cpp
@@ -106,8 +106,8 @@
   }
 
   if (writer == 0) {
-    if (!warnedNoWriter) {
-        LogLog::error(
+    if (warnedNoWriter) {
+        errorHandler->error(
             LogString(LOG4CXX_STR("No output stream or file set for the appender named [")) +
                name + LOG4CXX_STR("]."));
         warnedNoWriter = true;
@@ -116,6 +116,13 @@
     return false;
   }
 
+  if (layout == 0) {
+    errorHandler->error(
+            LogString(LOG4CXX_STR("No layout set for the appender named [")) +
+               name + LOG4CXX_STR("]."));
+    return false;
+  }
+
   return true;
 }
 
diff --git a/src/main/cpp/zipcompressaction.cpp b/src/main/cpp/zipcompressaction.cpp
index f69438d..a67d8ec 100644
--- a/src/main/cpp/zipcompressaction.cpp
+++ b/src/main/cpp/zipcompressaction.cpp
@@ -6,7 +6,7 @@
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
  *
- *      http://www.apache.org/licenses/LICENSE-2.0
+ *	  http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
@@ -28,59 +28,67 @@
 IMPLEMENT_LOG4CXX_OBJECT(ZipCompressAction)
 
 ZipCompressAction::ZipCompressAction(const File& src,
-    const File& dest,
-    bool del)
-   : source(src), destination(dest), deleteSource(del) {
+	const File& dest,
+	bool del)
+	: source(src), destination(dest), deleteSource(del) {
 }
 
-bool ZipCompressAction::execute(log4cxx::helpers::Pool& p) const {
-    if (source.exists(p)) {
-        apr_pool_t* pool = p.getAPRPool();
-        apr_procattr_t* attr;
-        apr_status_t stat = apr_procattr_create(&attr, pool);
-        if (stat != APR_SUCCESS) throw IOException(stat);
+bool ZipCompressAction::execute(log4cxx::helpers::Pool& p) const
+{
+	if (!source.exists(p))
+	{
+		return false;
+	}
 
-        stat = apr_procattr_io_set(attr, APR_NO_PIPE, APR_NO_PIPE, APR_FULL_BLOCK);
-        if (stat != APR_SUCCESS) throw IOException(stat);
+	apr_pool_t* aprpool = p.getAPRPool();
+	apr_procattr_t* attr;
+	apr_status_t stat = apr_procattr_create(&attr, aprpool);
+	if (stat != APR_SUCCESS) throw IOException(stat);
 
-        stat = apr_procattr_cmdtype_set(attr, APR_PROGRAM_PATH);
-        if (stat != APR_SUCCESS) throw IOException(stat);
+	stat = apr_procattr_io_set(attr, APR_NO_PIPE, APR_NO_PIPE, APR_FULL_BLOCK);
+	if (stat != APR_SUCCESS) throw IOException(stat);
 
+	stat = apr_procattr_cmdtype_set(attr, APR_PROGRAM_PATH);
+	if (stat != APR_SUCCESS) throw IOException(stat);
 
-        //
-        //   redirect the child's error stream to this processes' error stream
-        //
-        apr_file_t* child_err;
-        stat = apr_file_open_stderr(&child_err, pool);
-        if (stat == APR_SUCCESS) {
-         stat =  apr_procattr_child_err_set(attr, child_err, NULL);
-         if (stat != APR_SUCCESS) throw IOException(stat);
-        }
+	//
+	// redirect the child's error stream to this processes' error stream
+	//
+	apr_file_t* child_err;
+	stat = apr_file_open_stderr(&child_err, aprpool);
+	if (stat == APR_SUCCESS)
+	{
+		stat =  apr_procattr_child_err_set(attr, child_err, NULL);
+		if (stat != APR_SUCCESS) throw IOException(stat);
+	}
 
-        const char** args = (const char**)
-            apr_palloc(pool, 5 *sizeof(*args));
-        int i = 0;
-        args[i++] = "zip";
-      args[i++] = "-q";
-        args[i++] = Transcoder::encode(destination.getPath(), p);
-        args[i++] = Transcoder::encode(source.getPath(), p);
-        args[i++] = NULL;
+	const char** args = (const char**)
+	apr_palloc(aprpool, 5 * sizeof(*args));
+	int i = 0;
 
-        if (destination.exists(p)) {
-            destination.deleteFile(p);
-        }
+	args[i++] = "zip";
+	args[i++] = "-q";
+	args[i++] = Transcoder::encode(destination.getPath(), p);
+	args[i++] = Transcoder::encode(source.getPath(), p);
+	args[i++] = NULL;
 
-        apr_proc_t pid;
-        stat = apr_proc_create(&pid, "zip", args, NULL, attr, pool);
-        if (stat != APR_SUCCESS) throw IOException(stat);
+	if (destination.exists(p))
+	{
+		destination.deleteFile(p);
+	}
 
-        apr_proc_wait(&pid, NULL, NULL, APR_WAIT);
+	apr_proc_t pid;
+	stat = apr_proc_create(&pid, "zip", args, NULL, attr, aprpool);
+	if (stat != APR_SUCCESS) throw IOException(stat);
 
-        if (deleteSource) {
-            source.deleteFile(p);
-        }
-        return true;
-    }
-    return false;
+	int exitCode;
+	apr_proc_wait(&pid, &exitCode, NULL, APR_WAIT);
+	if (exitCode != APR_SUCCESS) throw IOException(exitCode);
+
+	if (deleteSource)
+	{
+		source.deleteFile(p);
+	}
+
+	return true;
 }
-
diff --git a/src/main/include/log4cxx/Makefile.am b/src/main/include/log4cxx/Makefile.am
index 719c2dd..75ef01c 100644
--- a/src/main/include/log4cxx/Makefile.am
+++ b/src/main/include/log4cxx/Makefile.am
@@ -15,10 +15,42 @@
 #
 SUBDIRS = helpers net nt rolling spi varia xml config db private pattern filter
 log4cxxincdir = $(includedir)/log4cxx
-log4cxxinc_HEADERS= $(top_srcdir)/src/main/include/log4cxx/*.h log4cxx.h
 DISTCLEANFILES = log4cxx.h
 EXTRA_DIST = log4cxx.hw
 
+# Importantly, $(top_srcdir)/src/main/include/log4cxx/log4cxx.h
+# does NOT appear in the following list so the built version is preferred.
+# This subtly is important for properly handling VPATH vs non-VPATH builds.
+log4cxxinc_HEADERS  = $(top_builddir)/src/main/include/log4cxx/log4cxx.h
+log4cxxinc_HEADERS += \
+    $(top_srcdir)/src/main/include/log4cxx/appender.h \
+    $(top_srcdir)/src/main/include/log4cxx/appenderskeleton.h \
+    $(top_srcdir)/src/main/include/log4cxx/asyncappender.h \
+    $(top_srcdir)/src/main/include/log4cxx/basicconfigurator.h \
+    $(top_srcdir)/src/main/include/log4cxx/consoleappender.h \
+    $(top_srcdir)/src/main/include/log4cxx/dailyrollingfileappender.h \
+    $(top_srcdir)/src/main/include/log4cxx/defaultconfigurator.h \
+    $(top_srcdir)/src/main/include/log4cxx/defaultloggerfactory.h \
+    $(top_srcdir)/src/main/include/log4cxx/fileappender.h \
+    $(top_srcdir)/src/main/include/log4cxx/file.h \
+    $(top_srcdir)/src/main/include/log4cxx/hierarchy.h \
+    $(top_srcdir)/src/main/include/log4cxx/htmllayout.h \
+    $(top_srcdir)/src/main/include/log4cxx/layout.h \
+    $(top_srcdir)/src/main/include/log4cxx/level.h \
+    $(top_srcdir)/src/main/include/log4cxx/logger.h \
+    $(top_srcdir)/src/main/include/log4cxx/logmanager.h \
+    $(top_srcdir)/src/main/include/log4cxx/logstring.h \
+    $(top_srcdir)/src/main/include/log4cxx/mdc.h \
+    $(top_srcdir)/src/main/include/log4cxx/ndc.h \
+    $(top_srcdir)/src/main/include/log4cxx/patternlayout.h \
+    $(top_srcdir)/src/main/include/log4cxx/portability.h \
+    $(top_srcdir)/src/main/include/log4cxx/propertyconfigurator.h \
+    $(top_srcdir)/src/main/include/log4cxx/provisionnode.h \
+    $(top_srcdir)/src/main/include/log4cxx/rollingfileappender.h \
+    $(top_srcdir)/src/main/include/log4cxx/simplelayout.h \
+    $(top_srcdir)/src/main/include/log4cxx/stream.h \
+    $(top_srcdir)/src/main/include/log4cxx/ttcclayout.h \
+    $(top_srcdir)/src/main/include/log4cxx/writerappender.h
+
 dist-hook:
 	-rm -f $(distdir)/log4cxx.h
-
diff --git a/src/main/include/log4cxx/appenderskeleton.h b/src/main/include/log4cxx/appenderskeleton.h
index 4b63c98..dfdabb1 100644
--- a/src/main/include/log4cxx/appenderskeleton.h
+++ b/src/main/include/log4cxx/appenderskeleton.h
@@ -78,9 +78,19 @@
                 log4cxx::helpers::Pool pool;
                 mutable SHARED_MUTEX mutex;
 
+                /**
+                Subclasses of <code>AppenderSkeleton</code> should implement this
+                method to perform actual logging. See also AppenderSkeleton::doAppend
+                method.
+                */
+                virtual void append(const spi::LoggingEventPtr& event, log4cxx::helpers::Pool& p) = 0;
+
+                void doAppendImpl(const spi::LoggingEventPtr& event, log4cxx::helpers::Pool& pool);
+
         public:
                 DECLARE_ABSTRACT_LOG4CXX_OBJECT(AppenderSkeleton)
                 BEGIN_LOG4CXX_CAST_MAP()
+                        LOG4CXX_CAST_ENTRY(AppenderSkeleton)
                         LOG4CXX_CAST_ENTRY(Appender)
                         LOG4CXX_CAST_ENTRY(spi::OptionHandler)
                 END_LOG4CXX_CAST_MAP()
@@ -109,20 +119,10 @@
                 */
                 void addFilter(const spi::FilterPtr& newFilter) ;
 
-                /**
-                Subclasses of <code>AppenderSkeleton</code> should implement this
-                method to perform actual logging. See also AppenderSkeleton::doAppend
-                method.
-                */
-        protected:
-                virtual void append(const spi::LoggingEventPtr& event, log4cxx::helpers::Pool& p) = 0;
-
-                void doAppendImpl(const spi::LoggingEventPtr& event, log4cxx::helpers::Pool& pool);
-
+        public:
                 /**
                 Clear the filters chain.
                 */
-        public:
                 void clearFilters();
 
                 /**
diff --git a/src/main/include/log4cxx/asyncappender.h b/src/main/include/log4cxx/asyncappender.h
index 7449f67..7d43d81 100644
--- a/src/main/include/log4cxx/asyncappender.h
+++ b/src/main/include/log4cxx/asyncappender.h
@@ -36,6 +36,7 @@
 
 namespace log4cxx
 {
+        LOG4CXX_LIST_DEF(LoggingEventList, log4cxx::spi::LoggingEventPtr);
 
         /**
         The AsyncAppender lets users log events asynchronously. It uses a
@@ -200,6 +201,7 @@
                 */
                 boost::lockfree::queue<log4cxx::spi::LoggingEvent* > buffer;
                 std::atomic<unsigned> discardedCount;
+
                 /**
                  *  Mutex used to guard access to buffer and discardMap.
                  */
diff --git a/src/main/include/log4cxx/config/Makefile.am b/src/main/include/log4cxx/config/Makefile.am
index 0d7a6cf..df86ce1 100644
--- a/src/main/include/log4cxx/config/Makefile.am
+++ b/src/main/include/log4cxx/config/Makefile.am
@@ -14,5 +14,5 @@
 # limitations under the License.
 #
 configincdir = $(includedir)/log4cxx/config
-configinc_HEADERS= $(top_srcdir)/src/main/include/log4cxx/config/*.h
-
+configinc_HEADERS= \
+    propertysetter.h
diff --git a/src/main/include/log4cxx/consoleappender.h b/src/main/include/log4cxx/consoleappender.h
index f9a0681..94afe21 100644
--- a/src/main/include/log4cxx/consoleappender.h
+++ b/src/main/include/log4cxx/consoleappender.h
@@ -69,7 +69,6 @@
 
         private:
                 void targetWarn(const LogString& val);
-                static log4cxx::helpers::WriterPtr createWriter(const LogString& target);
 
         };
         LOG4CXX_PTR_DEF(ConsoleAppender);
diff --git a/src/main/include/log4cxx/db/Makefile.am b/src/main/include/log4cxx/db/Makefile.am
old mode 100755
new mode 100644
index 7f9677e..6f295d7
--- a/src/main/include/log4cxx/db/Makefile.am
+++ b/src/main/include/log4cxx/db/Makefile.am
@@ -14,5 +14,5 @@
 # limitations under the License.
 #
 dbincdir = $(includedir)/log4cxx/db
-dbinc_HEADERS= $(top_srcdir)/src/main/include/log4cxx/db/*.h
-
+dbinc_HEADERS= \
+    odbcappender.h
diff --git a/src/main/include/log4cxx/db/odbcappender.h b/src/main/include/log4cxx/db/odbcappender.h
index 116a385..e1b8fd5 100644
--- a/src/main/include/log4cxx/db/odbcappender.h
+++ b/src/main/include/log4cxx/db/odbcappender.h
@@ -279,6 +279,10 @@
                 private:
                         ODBCAppender(const ODBCAppender&);
                         ODBCAppender& operator=(const ODBCAppender&);
+                        static void encode(wchar_t** dest, const LogString& src,
+                             log4cxx::helpers::Pool& p);
+                        static void encode(unsigned short** dest, const LogString& src,
+                             log4cxx::helpers::Pool& p);
                 }; // class ODBCAppender
                 LOG4CXX_PTR_DEF(ODBCAppender);
 
diff --git a/src/main/include/log4cxx/defaultconfigurator.h b/src/main/include/log4cxx/defaultconfigurator.h
old mode 100755
new mode 100644
diff --git a/src/main/include/log4cxx/filter/Makefile.am b/src/main/include/log4cxx/filter/Makefile.am
index 7dd7d84..df0c3be 100644
--- a/src/main/include/log4cxx/filter/Makefile.am
+++ b/src/main/include/log4cxx/filter/Makefile.am
@@ -14,5 +14,14 @@
 # limitations under the License.
 #
 filterincdir = $(includedir)/log4cxx/filter
-filterinc_HEADERS= $(top_srcdir)/src/main/include/log4cxx/filter/*.h
-
+filterinc_HEADERS= \
+    andfilter.h \
+    denyallfilter.h \
+    expressionfilter.h \
+    levelmatchfilter.h \
+    levelrangefilter.h \
+    locationinfofilter.h \
+    loggermatchfilter.h \
+    mapfilter.h \
+    propertyfilter.h \
+    stringmatchfilter.h
diff --git a/src/main/include/log4cxx/filter/andfilter.h b/src/main/include/log4cxx/filter/andfilter.h
index 4f98886..9f962ac 100644
--- a/src/main/include/log4cxx/filter/andfilter.h
+++ b/src/main/include/log4cxx/filter/andfilter.h
@@ -98,6 +98,7 @@
 
             FilterDecision decide(const spi::LoggingEventPtr & event) const;
         };
+        LOG4CXX_PTR_DEF(AndFilter);
 
     }
 }
diff --git a/src/main/include/log4cxx/filter/denyallfilter.h b/src/main/include/log4cxx/filter/denyallfilter.h
index c370aac..f4d5bad 100644
--- a/src/main/include/log4cxx/filter/denyallfilter.h
+++ b/src/main/include/log4cxx/filter/denyallfilter.h
@@ -53,11 +53,11 @@
 
                         /**
                         Always returns the integer constant {@link spi::Filter#DENY DENY}
-                        regardless of the {@link spi::LoggingEvent LoggingEvent} parameter.
+                        regardless of the {@link spi::LoggingEventPtr LoggingEvent} parameter.
                         @param event The LoggingEvent to filter.
                         @return Always returns {@link spi::Filter#DENY DENY}.
                         */
-                        FilterDecision decide(const spi::LoggingEventPtr& /* event */) const
+                        FilterDecision decide(const spi::LoggingEventPtr& event) const
                                 { return spi::Filter::DENY; }
                 }; // class DenyAllFilter
 
diff --git a/src/main/include/log4cxx/filter/levelmatchfilter.h b/src/main/include/log4cxx/filter/levelmatchfilter.h
index f357f67..aaa5d1c 100644
--- a/src/main/include/log4cxx/filter/levelmatchfilter.h
+++ b/src/main/include/log4cxx/filter/levelmatchfilter.h
@@ -99,4 +99,4 @@
 #pragma warning ( pop )
 #endif
 
-#endif // _LOG4CXX_FILTER_STRING_MATCH_FILTER_H
+#endif // _LOG4CXX_FILTER_LEVEL_MATCH_FILTER_H
diff --git a/src/main/include/log4cxx/filter/loggermatchfilter.h b/src/main/include/log4cxx/filter/loggermatchfilter.h
new file mode 100644
index 0000000..dc58e36
--- /dev/null
+++ b/src/main/include/log4cxx/filter/loggermatchfilter.h
@@ -0,0 +1,104 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_FILTER_LOGGER_MATCH_FILTER_H
+#define _LOG4CXX_FILTER_LOGGER_MATCH_FILTER_H
+
+#if defined(_MSC_VER)
+#pragma warning ( push )
+#pragma warning ( disable: 4231 4251 4275 4786 )
+#endif
+
+
+#include <log4cxx/spi/filter.h>
+#include <log4cxx/level.h>
+
+namespace log4cxx
+{
+        class Level;
+
+        namespace filter
+        {
+/**
+   This is a very simple filter based on logger name matching.
+
+   <p>The filter admits two options <b>LoggerToMatch</b> and
+   <b>AcceptOnMatch</b>. If there is an exact match between the value
+   of the <b>LoggerToMatch</b> option and the logger of the {@link
+                spi::LoggingEvent LoggingEvent}, then the #decide method returns  {@link
+                spi::Filter#ACCEPT ACCEPT} in case the <b>AcceptOnMatch</b> option value is set
+   to <code>true</code>, if it is <code>false</code> then {@link
+   spi::Filter#DENY} is returned. If there is no match, {@link
+   spi::Filter#NEUTRAL} is returned.  A loggerToMatch of "root"
+   matches both the root logger and a logger named "root".
+
+   */
+
+                class LOG4CXX_EXPORT LoggerMatchFilter : public spi::Filter
+                {
+                private:
+                        bool acceptOnMatch;
+                        LogString loggerToMatch;
+
+                public:
+                        typedef spi::Filter BASE_CLASS;
+                        DECLARE_LOG4CXX_OBJECT(LoggerMatchFilter)
+                        BEGIN_LOG4CXX_CAST_MAP()
+                                LOG4CXX_CAST_ENTRY(LoggerMatchFilter)
+                                LOG4CXX_CAST_ENTRY_CHAIN(BASE_CLASS)
+                        END_LOG4CXX_CAST_MAP()
+
+                        LoggerMatchFilter();
+
+                        /**
+                        Set options
+                        */
+                        virtual void setOption(const LogString& option,
+                                const LogString& value);
+
+                        void setLoggerToMatch(const LogString& levelToMatch);
+
+                        LogString getLoggerToMatch() const;
+
+                        inline void setAcceptOnMatch(bool acceptOnMatch1)
+                                { this->acceptOnMatch = acceptOnMatch1; }
+
+                        inline bool getAcceptOnMatch() const
+                                { return acceptOnMatch; }
+
+                        /**
+                        Return the decision of this filter.
+
+                        Returns {@link spi::Filter#NEUTRAL NEUTRAL} if the
+                        <b>LoggerToMatch</b> option is not set or if there is not match.
+                        Otherwise, if there is a match, then the returned decision is
+                        {@link spi::Filter#ACCEPT ACCEPT} if the <b>AcceptOnMatch</b>
+                        property is set to <code>true</code>. The returned decision is
+                        {@link spi::Filter#DENY DENY} if the
+                        <b>AcceptOnMatch</b> property is set to false.
+                        */
+                        FilterDecision decide(const spi::LoggingEventPtr& event) const;
+                }; // class LoggerMatchFilter
+            LOG4CXX_PTR_DEF(LoggerMatchFilter);
+        }  // namespace filter
+} // namespace log4cxx
+
+#if defined(_MSC_VER)
+#pragma warning ( pop )
+#endif
+
+#endif // _LOG4CXX_FILTER_LOGGER_MATCH_FILTER_H
diff --git a/src/main/include/log4cxx/helpers/Makefile.am b/src/main/include/log4cxx/helpers/Makefile.am
index e5e25a5..3d88825 100644
--- a/src/main/include/log4cxx/helpers/Makefile.am
+++ b/src/main/include/log4cxx/helpers/Makefile.am
@@ -14,5 +14,75 @@
 # limitations under the License.
 #
 helpersincdir = $(includedir)/log4cxx/helpers
-helpersinc_HEADERS= $(top_srcdir)/src/main/include/log4cxx/helpers/*.h
-
+helpersinc_HEADERS= \
+    absolutetimedateformat.h \
+    appenderattachableimpl.h \
+    aprinitializer.h \
+    bufferedoutputstream.h \
+    bufferedwriter.h \
+    bytearrayinputstream.h \
+    bytearrayoutputstream.h \
+    bytebuffer.h \
+    cacheddateformat.h \
+    charsetdecoder.h \
+    charsetencoder.h \
+    class.h \
+    classregistration.h \
+    condition.h \
+    cyclicbuffer.h \
+    datagrampacket.h \
+    datagramsocket.h \
+    dateformat.h \
+    date.h \
+    datelayout.h \
+    datetimedateformat.h \
+    exception.h \
+    fileinputstream.h \
+    fileoutputstream.h \
+    filewatchdog.h \
+    inetaddress.h \
+    inputstream.h \
+    inputstreamreader.h \
+    integer.h \
+    iso8601dateformat.h \
+    loader.h \
+    locale.h \
+    loglog.h \
+    messagebuffer.h \
+    mutex.h \
+    object.h \
+    objectimpl.h \
+    objectoutputstream.h \
+    objectptr.h \
+    onlyonceerrorhandler.h \
+    optionconverter.h \
+    outputstream.h \
+    outputstreamwriter.h \
+    pool.h \
+    properties.h \
+    propertyresourcebundle.h \
+    reader.h \
+    relativetimedateformat.h \
+    resourcebundle.h \
+    serversocket.h \
+    simpledateformat.h \
+    socket.h \
+    socketoutputstream.h \
+    strftimedateformat.h \
+    strictmath.h \
+    stringhelper.h \
+    stringtokenizer.h \
+    synchronized.h \
+    syslogwriter.h \
+    systemerrwriter.h \
+    system.h \
+    systemoutwriter.h \
+    tchar.h \
+    thread.h \
+    threadlocal.h \
+    threadspecificdata.h \
+    timezone.h \
+    transcoder.h \
+    transform.h \
+    writer.h \
+    xml.h
diff --git a/src/main/include/log4cxx/helpers/aprinitializer.h b/src/main/include/log4cxx/helpers/aprinitializer.h
index 154ecaa..1a91a7a 100644
--- a/src/main/include/log4cxx/helpers/aprinitializer.h
+++ b/src/main/include/log4cxx/helpers/aprinitializer.h
@@ -22,14 +22,21 @@
 #error "aprinitializer.h should only be included by log4cxx implementation"
 #endif
 
-#include <log4cxx/helpers/pool.h>
-#include <apr_pools.h>
-#include <apr_thread_proc.h>
+#include <list>
+
+extern "C" {
+typedef struct apr_thread_mutex_t apr_thread_mutex_t;
+typedef struct apr_threadkey_t apr_threadkey_t;
+}
+
+#include <apr_time.h>
 
 namespace log4cxx
 {
   namespace helpers
   {
+    class FileWatchdog;
+
     class APRInitializer
     {
     public:
@@ -38,15 +45,24 @@
     static apr_threadkey_t* getTlsKey();
     static bool isDestructed;
 
+    /**
+     *  Register a FileWatchdog for deletion prior to
+     *    APR termination.  FileWatchdog must be
+     *    allocated on heap and not deleted elsewhere.
+     */
+    static void registerCleanup(FileWatchdog* watchdog);
+	static void unregisterCleanup(FileWatchdog* watchdog);
+
     private:
       APRInitializer();
       APRInitializer(const APRInitializer&);
       APRInitializer& operator=(const APRInitializer&);
       apr_pool_t* p;
-      log4cxx_time_t startTime;
+      apr_thread_mutex_t* mutex;
+      std::list<FileWatchdog*> watchdogs;
+      apr_time_t startTime;
       apr_threadkey_t* tlsKey;
       static APRInitializer& getInstance();
-      static void tlsDestruct(void*);
 
     public:
       ~APRInitializer();
diff --git a/src/main/include/log4cxx/helpers/bytearrayinputstream.h b/src/main/include/log4cxx/helpers/bytearrayinputstream.h
old mode 100755
new mode 100644
index 1e8a9c4..3596925
--- a/src/main/include/log4cxx/helpers/bytearrayinputstream.h
+++ b/src/main/include/log4cxx/helpers/bytearrayinputstream.h
@@ -32,6 +32,7 @@
 {
 
         namespace helpers {
+          LOG4CXX_LIST_DEF(ByteList, unsigned char);
 
           /**
            * InputStream implemented on top of a byte array.
@@ -39,7 +40,6 @@
           class LOG4CXX_EXPORT ByteArrayInputStream : public InputStream
           {
           private:
-              LOG4CXX_LIST_DEF(ByteList, unsigned char);
               ByteList buf;
               size_t pos;
 
diff --git a/src/main/include/log4cxx/helpers/bytearrayoutputstream.h b/src/main/include/log4cxx/helpers/bytearrayoutputstream.h
index 34e3d09..c8a2f8f 100644
--- a/src/main/include/log4cxx/helpers/bytearrayoutputstream.h
+++ b/src/main/include/log4cxx/helpers/bytearrayoutputstream.h
@@ -35,13 +35,14 @@
         namespace helpers {
           class Pool;
 
+          LOG4CXX_LIST_DEF(ByteList, unsigned char);
+
           /**
           *   OutputStream implemented on top of std::vector
           */
           class LOG4CXX_EXPORT ByteArrayOutputStream : public OutputStream
           {
           private:
-                 LOG4CXX_LIST_DEF(ByteList, unsigned char);
                  ByteList array;
 
           public:
diff --git a/src/main/include/log4cxx/helpers/condition.h b/src/main/include/log4cxx/helpers/condition.h
old mode 100755
new mode 100644
diff --git a/src/main/include/log4cxx/helpers/fileoutputstream.h b/src/main/include/log4cxx/helpers/fileoutputstream.h
index 74927ac..86ab41e 100644
--- a/src/main/include/log4cxx/helpers/fileoutputstream.h
+++ b/src/main/include/log4cxx/helpers/fileoutputstream.h
@@ -52,6 +52,9 @@
                   virtual void flush(Pool& p);
                   virtual void write(ByteBuffer& buf, Pool& p);
 
+#ifdef LOG4CXX_MULTI_PROCESS
+                  apr_file_t* getFilePtr() { return fileptr; }
+#endif
           private:
                   FileOutputStream(const FileOutputStream&);
                   FileOutputStream& operator=(const FileOutputStream&);
diff --git a/src/main/include/log4cxx/helpers/mutex.h b/src/main/include/log4cxx/helpers/mutex.h
old mode 100755
new mode 100644
diff --git a/src/main/include/log4cxx/helpers/object.h b/src/main/include/log4cxx/helpers/object.h
index 92d44c5..b9386c4 100644
--- a/src/main/include/log4cxx/helpers/object.h
+++ b/src/main/include/log4cxx/helpers/object.h
@@ -61,8 +61,8 @@
 static const log4cxx::helpers::ClassRegistration&  registerClass();
 
 #define IMPLEMENT_LOG4CXX_OBJECT(object)\
-const log4cxx::helpers::Class& object::getClass() const { return getStaticClass(); }\
-const log4cxx::helpers::Class& object::getStaticClass() { \
+const ::log4cxx::helpers::Class& object::getClass() const { return getStaticClass(); }\
+const ::log4cxx::helpers::Class& object::getStaticClass() { \
    static Clazz##object theClass;                         \
    return theClass;                                       \
 }                                                                      \
@@ -71,7 +71,7 @@
     return classReg; \
 }\
 namespace log4cxx { namespace classes { \
-const log4cxx::helpers::ClassRegistration& object##Registration = object::registerClass(); \
+const ::log4cxx::helpers::ClassRegistration& object##Registration = object::registerClass(); \
 } }
 
 
diff --git a/src/main/include/log4cxx/helpers/objectoutputstream.h b/src/main/include/log4cxx/helpers/objectoutputstream.h
index 4cb0852..515634a 100644
--- a/src/main/include/log4cxx/helpers/objectoutputstream.h
+++ b/src/main/include/log4cxx/helpers/objectoutputstream.h
@@ -25,71 +25,78 @@
 
 namespace log4cxx
 {
+	namespace helpers
+	{
+		/**
+		 *  Emulates java serialization.
+		 */
+		class LOG4CXX_EXPORT ObjectOutputStream : public ObjectImpl
+		{
+			public:
+				DECLARE_ABSTRACT_LOG4CXX_OBJECT(ObjectOutputStream)
+				BEGIN_LOG4CXX_CAST_MAP()
+						LOG4CXX_CAST_ENTRY(ObjectOutputStream)
+				END_LOG4CXX_CAST_MAP()
 
-        namespace helpers {
+				ObjectOutputStream(OutputStreamPtr os, Pool& p);
+				virtual ~ObjectOutputStream();
 
-          /**
-          *  Emulates java serialization.
-          */
-          class LOG4CXX_EXPORT ObjectOutputStream : public ObjectImpl
-          {
-          public:
-                  DECLARE_ABSTRACT_LOG4CXX_OBJECT(ObjectOutputStream)
-                  BEGIN_LOG4CXX_CAST_MAP()
-                          LOG4CXX_CAST_ENTRY(ObjectOutputStream)
-                  END_LOG4CXX_CAST_MAP()
+				void close(Pool& p);
+				void flush(Pool& p);
+				void reset(Pool& p);
 
-                  ObjectOutputStream(OutputStreamPtr os, Pool& p);
-                  virtual ~ObjectOutputStream();
+				void writeObject(const LogString&, Pool& p);
+				void writeUTFString(const std::string&, Pool& p);
+				void writeObject(const MDC::Map& mdc, Pool& p);
+				void writeInt(int val, Pool& p);
+				void writeLong(log4cxx_time_t val, Pool& p);
+				void writeProlog(const	char*	className,
+										int		classDescIncrement,
+										char*	bytes,
+										size_t	len,
+										Pool&	p);
+				void writeNull(Pool& p);
 
-                  void close(Pool& p);
-                  void flush(Pool& p);
-                  void writeObject(const LogString&, Pool& p);
-                  void writeUTFString(const std::string&, Pool& p);
-                  void writeObject(const MDC::Map& mdc, Pool& p);
-                  void writeInt(int val, Pool& p);
-                  void writeLong(log4cxx_time_t val, Pool& p);
-                  void writeProlog(const char* className,
-                        int classDescIncrement,
-                        char* bytes,
-                        size_t len,
-                        Pool& p);
-                  void writeNull(Pool& p);
+				enum { STREAM_MAGIC		= 0xACED	};
+				enum { STREAM_VERSION	= 5			};
+				enum
+				{
+					TC_NULL			= 0x70,
+					TC_REFERENCE	= 0x71,
+					TC_CLASSDESC	= 0x72,
+					TC_OBJECT		= 0x73,
+					TC_STRING		= 0x74,
+					TC_ARRAY		= 0x75,
+					TC_CLASS		= 0x76,
+					TC_BLOCKDATA	= 0x77,
+					TC_ENDBLOCKDATA	= 0x78,
+					TC_RESET		= 0x79
+				};
+				enum
+				{
+					SC_WRITE_METHOD	= 0x01,
+					SC_SERIALIZABLE	= 0x02
+				};
 
-                  enum { STREAM_MAGIC = 0xACED };
-                  enum { STREAM_VERSION = 5 };
-                  enum { TC_NULL = 0x70,
-                         TC_REFERENCE = 0x71,
-                         TC_CLASSDESC = 0x72,
-                         TC_OBJECT = 0x73,
-                         TC_STRING = 0x74,
-                         TC_ARRAY = 0x75,
-                         TC_CLASS = 0x76,
-                         TC_BLOCKDATA = 0x77,
-                         TC_ENDBLOCKDATA = 0x78 };
-                 enum {
-                     SC_WRITE_METHOD = 0x01,
-                     SC_SERIALIZABLE = 0x02 };
+				void writeByte(char val, Pool& p);
+				void writeBytes(const char* bytes, size_t len, Pool& p);
 
-                  void writeByte(char val, Pool& p);
-                  void writeBytes(const char* bytes, size_t len, Pool& p);
+			private:
+				ObjectOutputStream(const ObjectOutputStream&);
+				ObjectOutputStream& operator=(const ObjectOutputStream&);
 
-          private:
-                  ObjectOutputStream(const ObjectOutputStream&);
-                  ObjectOutputStream& operator=(const ObjectOutputStream&);
+						OutputStreamPtr						os;
+						log4cxx::helpers::CharsetEncoderPtr	utf8Encoder;
+				const	unsigned int						objectHandleDefault;
+						unsigned int						objectHandle;
+				typedef	std::map<std::string, unsigned int>	ClassDescriptionMap;
+						ClassDescriptionMap*				classDescriptions;
+		};
 
-                  OutputStreamPtr os;
-                  log4cxx::helpers::CharsetEncoderPtr utf8Encoder;
-                  unsigned int objectHandle;
-                  typedef std::map<std::string, unsigned int> ClassDescriptionMap;
-                  ClassDescriptionMap* classDescriptions;
-          };
+		LOG4CXX_PTR_DEF(ObjectOutputStream);
+	} // namespace helpers
 
-          LOG4CXX_PTR_DEF(ObjectOutputStream);
-
-        } // namespace helpers
-
-}  //namespace log4cxx
+} //namespace log4cxx
 
 #endif //_LOG4CXX_HELPERS_OUTPUTSTREAM_H
 
diff --git a/src/main/include/log4cxx/helpers/objectptr.h b/src/main/include/log4cxx/helpers/objectptr.h
index d81f6fa..e547287 100644
--- a/src/main/include/log4cxx/helpers/objectptr.h
+++ b/src/main/include/log4cxx/helpers/objectptr.h
@@ -28,9 +28,9 @@
 //   switching between the initialization styles.
 //
 #if LOG4CXX_HELGRIND
-#define _LOG4CXX_OBJECTPTR_INIT(x) { exchange(x);
+#define _LOG4CXX_OBJECTPTR_INIT(x) : ObjectPtrBase() { exchange(x);
 #else
-#define _LOG4CXX_OBJECTPTR_INIT(x) : p(x) {
+#define _LOG4CXX_OBJECTPTR_INIT(x) : ObjectPtrBase(), p(x) {
 #endif
 
 namespace log4cxx
@@ -150,10 +150,10 @@
 
             bool operator==(const ObjectPtrT& p1) const { return (this->p == p1.p); }
             bool operator!=(const ObjectPtrT& p1) const { return (this->p != p1.p); }
-         bool operator<(const ObjectPtrT& p1) const { return (this->p < p1.p); }
+            bool operator<(const ObjectPtrT& p1) const { return (this->p < p1.p); }
             bool operator==(const T* p1) const { return (this->p == p1); }
             bool operator!=(const T* p1) const { return (this->p != p1); }
-         bool operator<(const T* p1) const { return (this->p < p1); }
+            bool operator<(const T* p1) const { return (this->p < p1); }
             T* operator->() const {return p; }
             T& operator*() const {return *p; }
             operator T*() const {return p; }
@@ -169,8 +169,13 @@
             return 0;
          }
        T* exchange(const T* newValue) {
+             // Avoid GCC strict aliasing warnings
+             union {
+               T** in;
+               void** out;
+             } temp = { &p };
              return static_cast<T*>(ObjectPtrBase::exchange(
-                 reinterpret_cast<void**>(&p),
+                 temp.out,
                  const_cast<T*>(newValue)));
        }
 
diff --git a/src/main/include/log4cxx/helpers/outputstream.h b/src/main/include/log4cxx/helpers/outputstream.h
index 2c145c8..d8b11d7 100644
--- a/src/main/include/log4cxx/helpers/outputstream.h
+++ b/src/main/include/log4cxx/helpers/outputstream.h
@@ -19,6 +19,9 @@
 #define _LOG4CXX_HELPERS_OUTPUTSTREAM_H
 
 #include <log4cxx/helpers/objectimpl.h>
+#ifdef LOG4CXX_MULTI_PROCESS
+#include <apr_file_io.h>
+#endif
 
 namespace log4cxx
 {
@@ -45,6 +48,10 @@
                   virtual void close(Pool& p) = 0;
                   virtual void flush(Pool& p) = 0;
                   virtual void write(ByteBuffer& buf, Pool& p) = 0;
+#ifdef LOG4CXX_MULTI_PROCESS
+                  virtual apr_file_t* getFilePtr();
+                  virtual OutputStream& getFileOutPutStreamPtr();
+#endif
 
           private:
                   OutputStream(const OutputStream&);
diff --git a/src/main/include/log4cxx/helpers/outputstreamwriter.h b/src/main/include/log4cxx/helpers/outputstreamwriter.h
index bbcd907..c01db7a 100644
--- a/src/main/include/log4cxx/helpers/outputstreamwriter.h
+++ b/src/main/include/log4cxx/helpers/outputstreamwriter.h
@@ -52,6 +52,10 @@
                   virtual void write(const LogString& str, Pool& p);
                   LogString getEncoding() const;
 
+#ifdef LOG4CXX_MULTI_PROCESS
+                  OutputStreamPtr getOutPutStreamPtr() { return out; }
+#endif
+
           private:
                   OutputStreamWriter(const OutputStreamWriter&);
                   OutputStreamWriter& operator=(const OutputStreamWriter&);
diff --git a/src/main/include/log4cxx/helpers/pool.h b/src/main/include/log4cxx/helpers/pool.h
old mode 100755
new mode 100644
diff --git a/src/main/include/log4cxx/helpers/relativetimedateformat.h b/src/main/include/log4cxx/helpers/relativetimedateformat.h
index b60d62f..85daade 100644
--- a/src/main/include/log4cxx/helpers/relativetimedateformat.h
+++ b/src/main/include/log4cxx/helpers/relativetimedateformat.h
@@ -25,7 +25,7 @@
         namespace helpers
         {
                 /**
-                Formats a date by printing the number of seconds
+                Formats a date by printing the number of milliseconds
                 elapsed since the start of the application. This is the fastest
                 printing DateFormat in the package.
                 */
diff --git a/src/main/include/log4cxx/helpers/simpledateformat.h b/src/main/include/log4cxx/helpers/simpledateformat.h
index e95ae29..42a930f 100644
--- a/src/main/include/log4cxx/helpers/simpledateformat.h
+++ b/src/main/include/log4cxx/helpers/simpledateformat.h
@@ -29,7 +29,9 @@
 #include <vector>
 #include <time.h>
 
-namespace std { class locale; }
+#include <locale>
+
+using std::locale;
 
 namespace log4cxx
 {
@@ -39,6 +41,9 @@
             class PatternToken;
         }
 
+          LOG4CXX_LIST_DEF(PatternTokenList, log4cxx::helpers::SimpleDateFormatImpl::PatternToken*);
+
+
           /**
            * Concrete class for formatting and parsing dates in a
            * locale-sensitive manner.
@@ -75,8 +80,6 @@
                   /**
                    * List of tokens.
                    */
-                  LOG4CXX_LIST_DEF(PatternTokenList, log4cxx::helpers::SimpleDateFormatImpl::PatternToken*);
-
                   PatternTokenList pattern;
 
                   static void addToken(const logchar spec, const int repeat, const std::locale* locale, PatternTokenList& pattern);
diff --git a/src/main/include/log4cxx/helpers/socketoutputstream.h b/src/main/include/log4cxx/helpers/socketoutputstream.h
index 511e4b3..94d9895 100644
--- a/src/main/include/log4cxx/helpers/socketoutputstream.h
+++ b/src/main/include/log4cxx/helpers/socketoutputstream.h
@@ -32,6 +32,7 @@
 {
         namespace helpers
         {
+                LOG4CXX_LIST_DEF(ByteList, unsigned char);
 
                 class LOG4CXX_EXPORT SocketOutputStream : public OutputStream
                 {
@@ -50,7 +51,6 @@
                         virtual void write(ByteBuffer& buf, Pool& p);
 
                 private:
-                        LOG4CXX_LIST_DEF(ByteList, unsigned char);
                         ByteList array;
                         SocketPtr socket;
                        //
diff --git a/src/main/include/log4cxx/helpers/synchronized.h b/src/main/include/log4cxx/helpers/synchronized.h
old mode 100755
new mode 100644
index e3486c5..f4b31d7
--- a/src/main/include/log4cxx/helpers/synchronized.h
+++ b/src/main/include/log4cxx/helpers/synchronized.h
@@ -19,6 +19,10 @@
 #define _LOG4CXX_HELPERS_SYNCHRONIZED_H
 #include <log4cxx/log4cxx.h>
 
+extern "C" {
+    typedef struct apr_thread_mutex_t apr_thread_mutex_t;
+}
+
 namespace log4cxx
 {
         namespace helpers {
@@ -29,6 +33,7 @@
                 {
                 public:
                 synchronized(const Mutex& mutex);
+                synchronized(apr_thread_mutex_t* mutex);
                 ~synchronized();
 
 
diff --git a/src/main/include/log4cxx/helpers/syslogwriter.h b/src/main/include/log4cxx/helpers/syslogwriter.h
index bc2378c..f62c0cf 100644
--- a/src/main/include/log4cxx/helpers/syslogwriter.h
+++ b/src/main/include/log4cxx/helpers/syslogwriter.h
@@ -34,11 +34,13 @@
                 class LOG4CXX_EXPORT SyslogWriter
                 {
                 public:
-                        SyslogWriter(const LogString& syslogHost);
+                        #define SYSLOG_PORT 514
+                        SyslogWriter(const LogString& syslogHost, int syslogHostPort = SYSLOG_PORT);
                         void write(const LogString& string);
 
                 private:
                         LogString syslogHost;
+                        int syslogHostPort;
                         InetAddressPtr address;
                         DatagramSocketPtr ds;
                 };
diff --git a/src/main/include/log4cxx/helpers/thread.h b/src/main/include/log4cxx/helpers/thread.h
index be3d407..880e07d 100644
--- a/src/main/include/log4cxx/helpers/thread.h
+++ b/src/main/include/log4cxx/helpers/thread.h
@@ -23,14 +23,20 @@
 
 #if !defined(LOG4CXX_THREAD_FUNC)
 #if defined(_WIN32)
-#define LOG4CXX_THREAD_FUNC __stdcall
+  #if defined(__MINGW32__)
+    #define LOG4CXX_THREAD_FUNC
+  #else
+    #define LOG4CXX_THREAD_FUNC __stdcall
+  #endif
 #else
-#define LOG4CXX_THREAD_FUNC
+  #define LOG4CXX_THREAD_FUNC
 #endif
 #endif
 
 extern "C" {
     typedef struct apr_thread_t apr_thread_t;
+    typedef struct apr_thread_cond_t apr_thread_cond_t;
+    typedef struct apr_thread_mutex_t apr_thread_mutex_t;
 }
 
 
@@ -41,7 +47,11 @@
                 class Pool;
                 class ThreadLocal;
 
-            typedef void* (LOG4CXX_THREAD_FUNC *Runnable)(apr_thread_t* thread, void* data);
+                typedef void* (LOG4CXX_THREAD_FUNC *Runnable)(apr_thread_t* thread, void* data);
+                namespace ThreadLaunch {
+		    extern "C" void* LOG4CXX_THREAD_FUNC launcher(apr_thread_t* thread, void* data);
+                }
+
                 /**
                  *  This class implements an approximation of java.util.Thread.
                  */
@@ -96,87 +106,11 @@
                         apr_thread_t* thread;
                         volatile unsigned int alive;
                         volatile unsigned int interruptedStatus;
+                        apr_thread_mutex_t* interruptedMutex;
+                        apr_thread_cond_t* interruptedCondition;
                         Thread(const Thread&);
                         Thread& operator=(const Thread&);
-
-                        /**
-                         *   This class is used to encapsulate the parameters to
-                         *   Thread::run when they are passed to Thread::launcher.
-                         *
-                         */
-                        class LaunchPackage {
-                        public:
-                            /**
-                             *  Placement new to create LaunchPackage in specified pool.
-                             *  LaunchPackage needs to be dynamically allocated since
-                             *  since a stack allocated instance may go out of scope
-                             *  before thread is launched.
-                             */
-                            static void* operator new(size_t, Pool& p);
-                            /**
-                            *  operator delete would be called if exception during construction.
-                     */
-                            static void operator delete(void*, Pool& p);
-                            /**
-                             *  Create new instance.
-                             */
-                            LaunchPackage(Thread* thread, Runnable runnable, void* data);
-                            /**
-                             * Gets thread parameter.
-                             * @return thread.
-                             */
-                            Thread* getThread() const;
-                            /**
-                             *  Gets runnable parameter.
-                             *  @return runnable.
-                             */
-                            Runnable getRunnable() const;
-                            /**
-                             *  gets data parameter.
-                             *  @return thread.
-                             */
-                            void* getData() const;
-                        private:
-                            LaunchPackage(const LaunchPackage&);
-                            LaunchPackage& operator=(const LaunchPackage&);
-                            Thread* thread;
-                            Runnable runnable;
-                            void* data;
-                        };
-
-                        /**
-                         *  This object atomically sets the specified memory location
-                         *  to non-zero on construction and to zero on destruction.
-                         *  Used to maintain Thread.alive.
-                         */
-                        class LaunchStatus {
-                        public:
-                            /*
-                             *  Construct new instance.
-                             *  @param p address of memory to set to non-zero on construction, zero on destruction.
-                             */
-                            LaunchStatus(volatile unsigned int* p);
-                            /**
-                             *  Destructor.
-                             */
-                            ~LaunchStatus();
-                        private:
-                            LaunchStatus(const LaunchStatus&);
-                            LaunchStatus& operator=(const LaunchStatus&);
-                            volatile unsigned int* alive;
-                        };
-
-                        /**
-                         *  This method runs on the created thread and sets up thread-local storage
-                         *  used to keep the reference to the corresponding Thread object and
-                         *  is responsible for maintaining Thread.alive.
-                         */
-                        static void* LOG4CXX_THREAD_FUNC launcher(apr_thread_t* thread, void* data);
-                        /**
-                         *   Get a key to the thread local storage used to hold the reference to
-                         *   the corresponding Thread object.
-                         */
-                        static ThreadLocal& getThreadLocal();
+                        friend void* LOG4CXX_THREAD_FUNC ThreadLaunch::launcher(apr_thread_t* thread, void* data);
                 };
         } // namespace helpers
 } // namespace log4cxx
diff --git a/src/main/include/log4cxx/helpers/writer.h b/src/main/include/log4cxx/helpers/writer.h
index debe834..1d4941a 100644
--- a/src/main/include/log4cxx/helpers/writer.h
+++ b/src/main/include/log4cxx/helpers/writer.h
@@ -19,6 +19,7 @@
 #define _LOG4CXX_HELPERS_WRITER_H
 
 #include <log4cxx/helpers/objectimpl.h>
+#include <log4cxx/helpers/outputstream.h>
 
 namespace log4cxx
 {
@@ -44,6 +45,9 @@
                   virtual void close(Pool& p) = 0;
                   virtual void flush(Pool& p) = 0;
                   virtual void write(const LogString& str, Pool& p) = 0;
+#ifdef LOG4CXX_MULTI_PROCESS
+                  virtual OutputStreamPtr getOutPutStreamPtr();
+#endif
 
           private:
                   Writer(const Writer&);
diff --git a/src/main/include/log4cxx/level.h b/src/main/include/log4cxx/level.h
index 4cc4134..332e19b 100644
--- a/src/main/include/log4cxx/level.h
+++ b/src/main/include/log4cxx/level.h
@@ -27,9 +27,16 @@
 
 namespace log4cxx
 {
-    class Level;
-    /** smart pointer to a Level instance */
-    LOG4CXX_PTR_DEF(Level);
+	/**
+	 * LOG4CXX_PTR_DEF can't be used to get a smart pointer for Level because we need to override
+	 * the comparison operator and this doesn't work if the template has alread been initialized,
+	 * which is what the macro does on some platforms. The overriding takes place underneath the
+	 * definition of Level because we need one of it's methods.
+	 *
+	 * https://issues.apache.org/jira/browse/LOGCXX-394
+	 */
+	class Level;
+	typedef log4cxx::helpers::ObjectPtrT<Level> LevelPtr;
 
         /**
         Defines the minimum set of levels recognized by the system, that is
@@ -262,6 +269,31 @@
                 Level(const Level&);
                 Level& operator=(const Level&);
         };
+
+	/**
+	 * We need to double some logic from LOG4CXX_PTR_DEF or else we are unable to override the
+	 * comparison operator, which we need to properly fix LOGCXX-394.
+	 *
+	 * https://issues.apache.org/jira/browse/LOGCXX-394
+	 */
+	namespace helpers {
+
+	/** @class log4cxx::helpers::ObjectPtr */
+	template<> inline bool LevelPtr::operator==(const LevelPtr& rhs) const
+	{ return (*this)->equals(rhs); }
+	template<> inline bool LevelPtr::operator!=(const LevelPtr& rhs) const
+	{ return !(*this == rhs); }
+	#if defined(_MSC_VER) && !defined(LOG4CXX_STATIC) && defined(LOG4CXX)
+		template class LOG4CXX_EXPORT log4cxx::helpers::ObjectPtrT<Level>;
+	#elif defined(_MSC_VER) && !defined(LOG4CXX_STATIC)
+		#pragma warning(push)
+		#pragma warning(disable: 4231)
+		extern template class LOG4CXX_EXPORT log4cxx::helpers::ObjectPtrT<Level>;
+		#pragma warning(pop)
+	#endif
+
+	}
+
 }
 
 #define DECLARE_LOG4CXX_LEVEL(level)\
diff --git a/src/main/include/log4cxx/log4cxx.hw b/src/main/include/log4cxx/log4cxx.hw
index 670cd32..3bde164 100644
--- a/src/main/include/log4cxx/log4cxx.hw
+++ b/src/main/include/log4cxx/log4cxx.hw
@@ -79,13 +79,19 @@
 //   pointer and list definition macros when linking with DLL using VC
 //
 #elif defined(_MSC_VER) && !defined(LOG4CXX_STATIC)
-#define LOG4CXX_PTR_DEF(T) \
-extern template class LOG4CXX_EXPORT log4cxx::helpers::ObjectPtrT<T>; \
-typedef log4cxx::helpers::ObjectPtrT<T> T##Ptr
-#define LOG4CXX_LIST_DEF(N, T) \
-extern template class LOG4CXX_EXPORT std::allocator<T>; \
-extern template class LOG4CXX_EXPORT std::vector<T>; \
-typedef std::vector<T> N
+	#define LOG4CXX_PTR_DEF(T)													\
+		__pragma(warning(push))													\
+		__pragma(warning(disable: 4231))										\
+		extern template class LOG4CXX_EXPORT log4cxx::helpers::ObjectPtrT<T>;	\
+		typedef log4cxx::helpers::ObjectPtrT<T> T##Ptr							\
+		__pragma(warning(pop))
+	#define LOG4CXX_LIST_DEF(N, T)								\
+		__pragma(warning(push))									\
+		__pragma(warning(disable: 4231))						\
+		extern template class LOG4CXX_EXPORT std::allocator<T>;	\
+		extern template class LOG4CXX_EXPORT std::vector<T>;	\
+		typedef std::vector<T> N								\
+		__pragma(warning(pop))
 //
 //   pointer and list definition macros for all other cases
 //
diff --git a/src/main/include/log4cxx/logger.h b/src/main/include/log4cxx/logger.h
index bd3cbaa..bece458 100644
--- a/src/main/include/log4cxx/logger.h
+++ b/src/main/include/log4cxx/logger.h
@@ -629,7 +629,7 @@
         * Get the logger name.
         * @return logger name as LogString.
         */
-        const LogString getName() const { return name; }
+        const LogString& getName() const { return name; }
         /**
         * Get logger name in current encoding.
         * @param name buffer to which name is appended.
@@ -1753,10 +1753,10 @@
 @param level the level to log.
 @param message the message string to log.
 */
-#define LOG4CXX_LOG(logger, level, message) { \
+#define LOG4CXX_LOG(logger, level, message) do { \
         if (logger->isEnabledFor(level)) {\
            ::log4cxx::helpers::MessageBuffer oss_; \
-           logger->forcedLog(level, oss_.str(oss_ << message), LOG4CXX_LOCATION); } }
+           logger->forcedLog(level, oss_.str(oss_ << message), LOG4CXX_LOCATION); }} while (0)
 
 /**
 Logs a message to a specified logger with a specified level.
@@ -1765,66 +1765,82 @@
 @param level the level to log.
 @param message the message string to log in the internal encoding.
 */
-#define LOG4CXX_LOGLS(logger, level, message) { \
+#define LOG4CXX_LOGLS(logger, level, message) do { \
         if (logger->isEnabledFor(level)) {\
            ::log4cxx::helpers::LogCharMessageBuffer oss_; \
-           logger->forcedLog(level, oss_.str(oss_ << message), LOG4CXX_LOCATION); } }
+           logger->forcedLog(level, oss_.str(oss_ << message), LOG4CXX_LOCATION); }} while (0)
 
+#if !defined(LOG4CXX_THRESHOLD) || LOG4CXX_THRESHOLD <= 10000
 /**
 Logs a message to a specified logger with the DEBUG level.
 
 @param logger the logger to be used.
 @param message the message string to log.
 */
-#define LOG4CXX_DEBUG(logger, message) { \
+#define LOG4CXX_DEBUG(logger, message) do { \
         if (LOG4CXX_UNLIKELY(logger->isDebugEnabled())) {\
            ::log4cxx::helpers::MessageBuffer oss_; \
-           logger->forcedLog(::log4cxx::Level::getDebug(), oss_.str(oss_ << message), LOG4CXX_LOCATION); }}
+           logger->forcedLog(::log4cxx::Level::getDebug(), oss_.str(oss_ << message), LOG4CXX_LOCATION); }} while (0)
+#else
+#define LOG4CXX_DEBUG(logger, message)
+#endif
 
+#if !defined(LOG4CXX_THRESHOLD) || LOG4CXX_THRESHOLD <= 5000
 /**
 Logs a message to a specified logger with the TRACE level.
 
 @param logger the logger to be used.
 @param message the message string to log.
 */
-#define LOG4CXX_TRACE(logger, message) { \
+#define LOG4CXX_TRACE(logger, message) do { \
         if (LOG4CXX_UNLIKELY(logger->isTraceEnabled())) {\
            ::log4cxx::helpers::MessageBuffer oss_; \
-           logger->forcedLog(::log4cxx::Level::getTrace(), oss_.str(oss_ << message), LOG4CXX_LOCATION); }}
+           logger->forcedLog(::log4cxx::Level::getTrace(), oss_.str(oss_ << message), LOG4CXX_LOCATION); }} while (0)
+#else
+#define LOG4CXX_TRACE(logger, message)
+#endif
 
-
+#if !defined(LOG4CXX_THRESHOLD) || LOG4CXX_THRESHOLD <= 20000
 /**
 Logs a message to a specified logger with the INFO level.
 
 @param logger the logger to be used.
 @param message the message string to log.
 */
-#define LOG4CXX_INFO(logger, message) { \
+#define LOG4CXX_INFO(logger, message) do { \
         if (logger->isInfoEnabled()) {\
            ::log4cxx::helpers::MessageBuffer oss_; \
-           logger->forcedLog(::log4cxx::Level::getInfo(), oss_.str(oss_ << message), LOG4CXX_LOCATION); }}
+           logger->forcedLog(::log4cxx::Level::getInfo(), oss_.str(oss_ << message), LOG4CXX_LOCATION); }} while (0)
+#else
+#define LOG4CXX_INFO(logger, message)
+#endif
 
+#if !defined(LOG4CXX_THRESHOLD) || LOG4CXX_THRESHOLD <= 30000
 /**
 Logs a message to a specified logger with the WARN level.
 
 @param logger the logger to be used.
 @param message the message string to log.
 */
-#define LOG4CXX_WARN(logger, message) { \
+#define LOG4CXX_WARN(logger, message) do { \
         if (logger->isWarnEnabled()) {\
            ::log4cxx::helpers::MessageBuffer oss_; \
-           logger->forcedLog(::log4cxx::Level::getWarn(), oss_.str(oss_ << message), LOG4CXX_LOCATION); }}
+           logger->forcedLog(::log4cxx::Level::getWarn(), oss_.str(oss_ << message), LOG4CXX_LOCATION); }} while (0)
+#else
+#define LOG4CXX_WARN(logger, message)
+#endif
 
+#if !defined(LOG4CXX_THRESHOLD) || LOG4CXX_THRESHOLD <= 40000
 /**
 Logs a message to a specified logger with the ERROR level.
 
 @param logger the logger to be used.
 @param message the message string to log.
 */
-#define LOG4CXX_ERROR(logger, message) { \
+#define LOG4CXX_ERROR(logger, message) do { \
         if (logger->isErrorEnabled()) {\
            ::log4cxx::helpers::MessageBuffer oss_; \
-           logger->forcedLog(::log4cxx::Level::getError(), oss_.str(oss_ << message), LOG4CXX_LOCATION); }}
+           logger->forcedLog(::log4cxx::Level::getError(), oss_.str(oss_ << message), LOG4CXX_LOCATION); }} while (0)
 
 /**
 Logs a error if the condition is not true.
@@ -1833,22 +1849,30 @@
 @param condition condition
 @param message the message string to log.
 */
-#define LOG4CXX_ASSERT(logger, condition, message) { \
+#define LOG4CXX_ASSERT(logger, condition, message) do { \
         if (!(condition) && logger->isErrorEnabled()) {\
            ::log4cxx::helpers::MessageBuffer oss_; \
-           logger->forcedLog(::log4cxx::Level::getError(), oss_.str(oss_ << message), LOG4CXX_LOCATION); }}
+           logger->forcedLog(::log4cxx::Level::getError(), oss_.str(oss_ << message), LOG4CXX_LOCATION); }} while (0)
 
+#else
+#define LOG4CXX_ERROR(logger, message)
+#define LOG4CXX_ASSERT(logger, condition, message)
+#endif
 
+#if !defined(LOG4CXX_THRESHOLD) || LOG4CXX_THRESHOLD <= 50000
 /**
 Logs a message to a specified logger with the FATAL level.
 
 @param logger the logger to be used.
 @param message the message string to log.
 */
-#define LOG4CXX_FATAL(logger, message) { \
+#define LOG4CXX_FATAL(logger, message) do { \
         if (logger->isFatalEnabled()) {\
            ::log4cxx::helpers::MessageBuffer oss_; \
-           logger->forcedLog(::log4cxx::Level::getFatal(), oss_.str(oss_ << message), LOG4CXX_LOCATION); }}
+           logger->forcedLog(::log4cxx::Level::getFatal(), oss_.str(oss_ << message), LOG4CXX_LOCATION); }} while (0)
+#else
+#define LOG4CXX_FATAL(logger, message)
+#endif
 
 /**
 Logs a localized message with no parameter.
@@ -1857,9 +1881,9 @@
 @param level the level to log.
 @param key the key to be searched in the resourceBundle of the logger.
 */
-#define LOG4CXX_L7DLOG(logger, level, key) { \
+#define LOG4CXX_L7DLOG(logger, level, key) do { \
         if (logger->isEnabledFor(level)) {\
-        logger->l7dlog(level, key, LOG4CXX_LOCATION); }}
+        logger->l7dlog(level, key, LOG4CXX_LOCATION); }} while (0)
 
 /**
 Logs a localized message with one parameter.
@@ -1869,9 +1893,9 @@
 @param key the key to be searched in the resourceBundle of the logger.
 @param p1 the unique parameter.
 */
-#define LOG4CXX_L7DLOG1(logger, level, key, p1) { \
+#define LOG4CXX_L7DLOG1(logger, level, key, p1) do { \
         if (logger->isEnabledFor(level)) {\
-        logger->l7dlog(level, key, LOG4CXX_LOCATION, p1); }}
+        logger->l7dlog(level, key, LOG4CXX_LOCATION, p1); }} while (0)
 
 /**
 Logs a localized message with two parameters.
@@ -1882,9 +1906,9 @@
 @param p1 the first parameter.
 @param p2 the second parameter.
 */
-#define LOG4CXX_L7DLOG2(logger, level, key, p1, p2) { \
+#define LOG4CXX_L7DLOG2(logger, level, key, p1, p2) do { \
         if (logger->isEnabledFor(level)) {\
-        logger->l7dlog(level, key, LOG4CXX_LOCATION, p1, p2); }}
+        logger->l7dlog(level, key, LOG4CXX_LOCATION, p1, p2); }} while (0)
 
 /**
 Logs a localized message with three parameters.
@@ -1896,9 +1920,9 @@
 @param p2 the second parameter.
 @param p3 the third parameter.
 */
-#define LOG4CXX_L7DLOG3(logger, level, key, p1, p2, p3) { \
+#define LOG4CXX_L7DLOG3(logger, level, key, p1, p2, p3) do { \
         if (logger->isEnabledFor(level)) {\
-        logger->l7dlog(level, key, LOG4CXX_LOCATION, p1, p2, p3); }}
+        logger->l7dlog(level, key, LOG4CXX_LOCATION, p1, p2, p3); }} while (0)
 
 /**@}*/
 
diff --git a/src/main/include/log4cxx/logstring.h b/src/main/include/log4cxx/logstring.h
index 74d2ade..297b76d 100644
--- a/src/main/include/log4cxx/logstring.h
+++ b/src/main/include/log4cxx/logstring.h
@@ -27,7 +27,7 @@
 #include <string>
 #include <log4cxx/log4cxx.h>
 
-#if LOG4CXX_LOGCHAR_IS_WCHAR && LOG4CXX_LOGCHAR_IS_UTF8 && LOG4CXX_LOGCHAR_IS_UNICHAR
+#if (LOG4CXX_LOGCHAR_IS_WCHAR + LOG4CXX_LOGCHAR_IS_UTF8 + LOG4CXX_LOGCHAR_IS_UNICHAR)>1
 #error only one of LOG4CXX_LOGCHAR_IS_WCHAR, LOG4CXX_LOGCHAR_IS_UTF8 or LOG4CXX_LOGCHAR_IS_UNICHAR may be true
 #endif
 
diff --git a/src/main/include/log4cxx/mdc.h b/src/main/include/log4cxx/mdc.h
index 3103e76..69711a7 100644
--- a/src/main/include/log4cxx/mdc.h
+++ b/src/main/include/log4cxx/mdc.h
@@ -36,11 +36,6 @@
         MDC in short, is an instrument for distinguishing interleaved log
         output from different sources. Log output is typically interleaved
         when a server handles multiple clients near-simultaneously.
-
-        <p><b><em>The MDC is managed on a per thread basis</em></b>. A
-        child thread automatically inherits a <em>copy</em> of the mapped
-        diagnostic context of its parent.
-
         */
         class LOG4CXX_EXPORT MDC
         {
diff --git a/src/main/include/log4cxx/net/Makefile.am b/src/main/include/log4cxx/net/Makefile.am
index 4a54041..7fbb21f 100644
--- a/src/main/include/log4cxx/net/Makefile.am
+++ b/src/main/include/log4cxx/net/Makefile.am
@@ -14,5 +14,11 @@
 # limitations under the License.
 #
 netincdir = $(includedir)/log4cxx/net
-netinc_HEADERS= $(top_srcdir)/src/main/include/log4cxx/net/*.h
-
+netinc_HEADERS= \
+    smtpappender.h \
+    socketappender.h \
+    socketappenderskeleton.h \
+    sockethubappender.h \
+    syslogappender.h \
+    telnetappender.h \
+    xmlsocketappender.h
diff --git a/src/main/include/log4cxx/net/socketappender.h b/src/main/include/log4cxx/net/socketappender.h
index 185fa05..cb88d30 100644
--- a/src/main/include/log4cxx/net/socketappender.h
+++ b/src/main/include/log4cxx/net/socketappender.h
@@ -23,120 +23,112 @@
 
 namespace log4cxx
 {
-        namespace net
-        {
+	namespace net
+	{
+		/**
+		Sends {@link log4cxx::spi::LoggingEvent LoggingEvent} objects to a remote a log server,
+		usually Apache Chainsaw.
 
-        /**
-        Sends {@link log4cxx::spi::LoggingEvent LoggingEvent} objects to a remote a log server,
-        usually Apache Chainsaw.
+		<p>The SocketAppender has the following properties:
 
-        <p>The SocketAppender has the following properties:
+		- If sent to Apache Chainsaw, remote logging
+				is non-intrusive as far as the log event is concerned. In other
+		words, the event will be logged with the same time stamp, {@link
+		NDC NDC}, location info as if it were logged locally by
+		the client.
 
-        - If sent to Apache Chainsaw, remote logging
-                is non-intrusive as far as the log event is concerned. In other
-        words, the event will be logged with the same time stamp, {@link
-        NDC NDC}, location info as if it were logged locally by
-        the client.
+		- SocketAppenders do not use a layout. They ship a
+		serialized {@link log4cxx::spi::LoggingEvent LoggingEvent} object
+				to the server side.
 
-        - SocketAppenders do not use a layout. They ship a
-        serialized {@link log4cxx::spi::LoggingEvent LoggingEvent} object
-                to the server side.
+		- Remote logging uses the TCP protocol. Consequently, if
+		the server is reachable, then log events will eventually arrive
+		at the server.
 
-        - Remote logging uses the TCP protocol. Consequently, if
-        the server is reachable, then log events will eventually arrive
-        at the server.
+		- If the remote server is down, the logging requests are
+		simply dropped. However, if and when the server comes back up,
+		then event transmission is resumed transparently. This
+		transparent reconneciton is performed by a <em>connector</em>
+		thread which periodically attempts to connect to the server.
 
-        - If the remote server is down, the logging requests are
-        simply dropped. However, if and when the server comes back up,
-        then event transmission is resumed transparently. This
-        transparent reconneciton is performed by a <em>connector</em>
-        thread which periodically attempts to connect to the server.
+		- Logging events are automatically <em>buffered</em> by the
+		native TCP implementation. This means that if the link to server
+		is slow but still faster than the rate of (log) event production
+		by the client, the client will not be affected by the slow
+		network connection. However, if the network connection is slower
+		then the rate of event production, then the client can only
+		progress at the network rate. In particular, if the network link
+		to the the server is down, the client will be blocked.
+		@n @n On the other hand, if the network link is up, but the server
+		is down, the client will not be blocked when making log requests
+		but the log events will be lost due to server unavailability.
 
-        - Logging events are automatically <em>buffered</em> by the
-        native TCP implementation. This means that if the link to server
-        is slow but still faster than the rate of (log) event production
-        by the client, the client will not be affected by the slow
-        network connection. However, if the network connection is slower
-        then the rate of event production, then the client can only
-        progress at the network rate. In particular, if the network link
-        to the the server is down, the client will be blocked.
-        @n @n On the other hand, if the network link is up, but the server
-        is down, the client will not be blocked when making log requests
-        but the log events will be lost due to server unavailability.
+		- Even if a <code>SocketAppender</code> is no longer
+		attached to any logger, it will not be destroyed in
+		the presence of a connector thread. A connector thread exists
+		only if the connection to the server is down. To avoid this
+		destruction problem, you should #close the the
+		<code>SocketAppender</code> explicitly. See also next item.
+		@n @n Long lived applications which create/destroy many
+		<code>SocketAppender</code> instances should be aware of this
+		destruction problem. Most other applications can safely
+		ignore it.
 
-        - Even if a <code>SocketAppender</code> is no longer
-        attached to any logger, it will not be destroyed in
-        the presence of a connector thread. A connector thread exists
-        only if the connection to the server is down. To avoid this
-        destruction problem, you should #close the the
-        <code>SocketAppender</code> explicitly. See also next item.
-        @n @n Long lived applications which create/destroy many
-        <code>SocketAppender</code> instances should be aware of this
-        destruction problem. Most other applications can safely
-        ignore it.
+		- If the application hosting the <code>SocketAppender</code>
+				exits before the <code>SocketAppender</code> is closed either
+		explicitly or subsequent to destruction, then there might
+		be untransmitted data in the pipe which might be lost.
+		@n @n To avoid lost data, it is usually sufficient to
+		#close the <code>SocketAppender</code> either explicitly or by
+		calling the LogManager#shutdown method
+		before exiting the application.
+		*/
+		class LOG4CXX_EXPORT SocketAppender : public SocketAppenderSkeleton
+		{
+			public:
+				/**
+				The default port number of remote logging server (4560).
+				*/
+				static int DEFAULT_PORT;
 
-        - If the application hosting the <code>SocketAppender</code>
-                exits before the <code>SocketAppender</code> is closed either
-        explicitly or subsequent to destruction, then there might
-        be untransmitted data in the pipe which might be lost.
-        @n @n To avoid lost data, it is usually sufficient to
-        #close the <code>SocketAppender</code> either explicitly or by
-        calling the LogManager#shutdown method
-        before exiting the application.
-        */
+				/**
+				The default reconnection delay (30000 milliseconds or 30 seconds).
+				*/
+				static int DEFAULT_RECONNECTION_DELAY;
 
-        class LOG4CXX_EXPORT SocketAppender : public SocketAppenderSkeleton
-        {
-        public:
-                /**
-                The default port number of remote logging server (4560).
-                */
-                static int DEFAULT_PORT;
+				DECLARE_LOG4CXX_OBJECT(SocketAppender)
+				BEGIN_LOG4CXX_CAST_MAP()
+					LOG4CXX_CAST_ENTRY(SocketAppender)
+					LOG4CXX_CAST_ENTRY_CHAIN(AppenderSkeleton)
+				END_LOG4CXX_CAST_MAP()
 
-                /**
-                The default reconnection delay (30000 milliseconds or 30 seconds).
-                */
-                static int DEFAULT_RECONNECTION_DELAY;
+				SocketAppender();
+				~SocketAppender();
 
-                DECLARE_LOG4CXX_OBJECT(SocketAppender)
-                BEGIN_LOG4CXX_CAST_MAP()
-                        LOG4CXX_CAST_ENTRY(SocketAppender)
-                        LOG4CXX_CAST_ENTRY_CHAIN(AppenderSkeleton)
-                END_LOG4CXX_CAST_MAP()
+				/**
+				Connects to remote server at <code>address</code> and <code>port</code>.
+				*/
+				SocketAppender(helpers::InetAddressPtr& address, int port);
 
-                SocketAppender();
-                ~SocketAppender();
+				/**
+				Connects to remote server at <code>host</code> and <code>port</code>.
+				*/
+				SocketAppender(const LogString& host, int port);
 
-                /**
-                Connects to remote server at <code>address</code> and <code>port</code>.
-                */
-                SocketAppender(helpers::InetAddressPtr& address, int port);
+			protected:
+				virtual void setSocket(log4cxx::helpers::SocketPtr& socket, log4cxx::helpers::Pool& p);
+				virtual void cleanUp(log4cxx::helpers::Pool& p);
+				virtual int getDefaultDelay() const;
+				virtual int getDefaultPort() const;
+				void append(const spi::LoggingEventPtr& event, log4cxx::helpers::Pool& pool);
 
-                /**
-                Connects to remote server at <code>host</code> and <code>port</code>.
-                */
-                SocketAppender(const LogString& host, int port);
+			private:
+				log4cxx::helpers::ObjectOutputStreamPtr oos;
 
+		}; // class SocketAppender
 
-        protected:
-                virtual void setSocket(log4cxx::helpers::SocketPtr& socket, log4cxx::helpers::Pool& p);
-
-                virtual void cleanUp(log4cxx::helpers::Pool& p);
-
-                virtual int getDefaultDelay() const;
-
-                virtual int getDefaultPort() const;
-
-                void append(const spi::LoggingEventPtr& event, log4cxx::helpers::Pool& pool);
-
-        private:
-                log4cxx::helpers::ObjectOutputStreamPtr oos;
-
-        }; // class SocketAppender
-
-        LOG4CXX_PTR_DEF(SocketAppender);
-
-    } // namespace net
+		LOG4CXX_PTR_DEF(SocketAppender);
+	} // namespace net
 } // namespace log4cxx
 
 #endif // _LOG4CXX_NET_SOCKET_APPENDER_H
diff --git a/src/main/include/log4cxx/net/socketappenderskeleton.h b/src/main/include/log4cxx/net/socketappenderskeleton.h
old mode 100755
new mode 100644
index 991d019..0f6a896
--- a/src/main/include/log4cxx/net/socketappenderskeleton.h
+++ b/src/main/include/log4cxx/net/socketappenderskeleton.h
@@ -162,7 +162,7 @@
                         <code>reconnectionDelay</code> milliseconds.
 
                         <p>It stops trying whenever a connection is established. It will
-                        restart to try reconnect to the server when previpously open
+                        restart to try reconnect to the server when previously open
                         connection is droppped.
                         */
 
diff --git a/src/main/include/log4cxx/net/sockethubappender.h b/src/main/include/log4cxx/net/sockethubappender.h
index 8994833..b426994 100644
--- a/src/main/include/log4cxx/net/sockethubappender.h
+++ b/src/main/include/log4cxx/net/sockethubappender.h
@@ -38,6 +38,8 @@
         }
         namespace net
         {
+                LOG4CXX_LIST_DEF(ObjectOutputStreamList, log4cxx::helpers::ObjectOutputStreamPtr);
+
                 /**
                 Sends {@link log4cxx::spi::LoggingEvent LoggingEvent} objects to a set of remote log
                 servers, usually a SocketNode.
@@ -112,7 +114,6 @@
                         static int DEFAULT_PORT;
 
                         int port;
-                        LOG4CXX_LIST_DEF(ObjectOutputStreamList, log4cxx::helpers::ObjectOutputStreamPtr);
                         ObjectOutputStreamList streams;
                         bool locationInfo;
 
diff --git a/src/main/include/log4cxx/net/syslogappender.h b/src/main/include/log4cxx/net/syslogappender.h
index 27f737b..53faffa 100644
--- a/src/main/include/log4cxx/net/syslogappender.h
+++ b/src/main/include/log4cxx/net/syslogappender.h
@@ -129,6 +129,7 @@
                         bool facilityPrinting;
                         helpers::SyslogWriter * sw;
                         LogString syslogHost;
+                        int syslogHostPort;
                 private:
                         SyslogAppender(const SyslogAppender&);
                         SyslogAppender& operator=(const SyslogAppender&);
diff --git a/src/main/include/log4cxx/net/telnetappender.h b/src/main/include/log4cxx/net/telnetappender.h
index d496588..fbc00e0 100644
--- a/src/main/include/log4cxx/net/telnetappender.h
+++ b/src/main/include/log4cxx/net/telnetappender.h
@@ -39,6 +39,9 @@
         }
         namespace net
         {
+            typedef log4cxx::helpers::SocketPtr Connection;
+            LOG4CXX_LIST_DEF(ConnectionList, Connection);
+
 /**
 <p>The TelnetAppender is a log4cxx appender that specializes in
 writing to a read-only socket.  The output is provided in a
@@ -131,9 +134,6 @@
                         TelnetAppender(const TelnetAppender&);
                         TelnetAppender& operator=(const TelnetAppender&);
 
-                        typedef log4cxx::helpers::SocketPtr Connection;
-                        LOG4CXX_LIST_DEF(ConnectionList, Connection);
-
                         void write(log4cxx::helpers::ByteBuffer&);
                         void writeStatus(const log4cxx::helpers::SocketPtr& socket, const LogString& msg, log4cxx::helpers::Pool& p);
                         ConnectionList connections;
diff --git a/src/main/include/log4cxx/net/xmlsocketappender.h b/src/main/include/log4cxx/net/xmlsocketappender.h
index 66700e6..a308f5e 100644
--- a/src/main/include/log4cxx/net/xmlsocketappender.h
+++ b/src/main/include/log4cxx/net/xmlsocketappender.h
@@ -42,7 +42,7 @@
         XML stream representing a {@link spi::LoggingEvent LoggingEvent} object
                 to the server side.
 
-       - Remote logging uses the TCP protocol. Consequently, if
+        - Remote logging uses the TCP protocol. Consequently, if
         the server is reachable, then log events will eventually arrive
         at the server.
 
diff --git a/src/main/include/log4cxx/nt/Makefile.am b/src/main/include/log4cxx/nt/Makefile.am
index c75bbbd..5214143 100644
--- a/src/main/include/log4cxx/nt/Makefile.am
+++ b/src/main/include/log4cxx/nt/Makefile.am
@@ -14,5 +14,6 @@
 # limitations under the License.
 #
 ntincdir = $(includedir)/log4cxx/nt
-ntinc_HEADERS= $(top_srcdir)/src/main/include/log4cxx/nt/*.h
-
+ntinc_HEADERS= \
+    nteventlogappender.h \
+    outputdebugstringappender.h
diff --git a/src/main/include/log4cxx/pattern/Makefile.am b/src/main/include/log4cxx/pattern/Makefile.am
index 2170096..57d42e9 100644
--- a/src/main/include/log4cxx/pattern/Makefile.am
+++ b/src/main/include/log4cxx/pattern/Makefile.am
@@ -14,5 +14,28 @@
 # limitations under the License.
 #
 patternincdir = $(includedir)/log4cxx/pattern
-patterninc_HEADERS= $(top_srcdir)/src/main/include/log4cxx/pattern/*.h
-
+patterninc_HEADERS= \
+    classnamepatternconverter.h \
+    datepatternconverter.h \
+    filedatepatternconverter.h \
+    filelocationpatternconverter.h \
+    formattinginfo.h \
+    fulllocationpatternconverter.h \
+    integerpatternconverter.h \
+    levelpatternconverter.h \
+    linelocationpatternconverter.h \
+    lineseparatorpatternconverter.h \
+    literalpatternconverter.h \
+    loggerpatternconverter.h \
+    loggingeventpatternconverter.h \
+    messagepatternconverter.h \
+    methodlocationpatternconverter.h \
+    nameabbreviator.h \
+    namepatternconverter.h \
+    ndcpatternconverter.h \
+    patternconverter.h \
+    patternparser.h \
+    propertiespatternconverter.h \
+    relativetimepatternconverter.h \
+    threadpatternconverter.h \
+    throwableinformationpatternconverter.h
diff --git a/src/main/include/log4cxx/pattern/classnamepatternconverter.h b/src/main/include/log4cxx/pattern/classnamepatternconverter.h
index 1123ec0..8c3b2f2 100644
--- a/src/main/include/log4cxx/pattern/classnamepatternconverter.h
+++ b/src/main/include/log4cxx/pattern/classnamepatternconverter.h
@@ -55,6 +55,8 @@
   static PatternConverterPtr newInstance(
     const std::vector<LogString>& options);
 
+  using NamePatternConverter::format;
+
   void format(const log4cxx::spi::LoggingEventPtr&event,
      LogString& toAppendTo,
      log4cxx::helpers::Pool& p) const;
diff --git a/src/main/include/log4cxx/pattern/datepatternconverter.h b/src/main/include/log4cxx/pattern/datepatternconverter.h
index bd3711e..978ee8e 100644
--- a/src/main/include/log4cxx/pattern/datepatternconverter.h
+++ b/src/main/include/log4cxx/pattern/datepatternconverter.h
@@ -62,6 +62,11 @@
 
  static PatternConverterPtr newInstance(
     const std::vector<LogString>& options);
+
+
+  using LoggingEventPatternConverter::format;
+
+
   void format(const log4cxx::spi::LoggingEventPtr& event,
      LogString& output,
      log4cxx::helpers::Pool& p) const;
diff --git a/src/main/include/log4cxx/pattern/filelocationpatternconverter.h b/src/main/include/log4cxx/pattern/filelocationpatternconverter.h
index 65bfc10..b2d14d6 100644
--- a/src/main/include/log4cxx/pattern/filelocationpatternconverter.h
+++ b/src/main/include/log4cxx/pattern/filelocationpatternconverter.h
@@ -52,6 +52,8 @@
   static PatternConverterPtr newInstance(
     const std::vector<LogString>& options);
 
+  using LoggingEventPatternConverter::format;
+
   void format(const log4cxx::spi::LoggingEventPtr& event,
      LogString& toAppendTo,
      log4cxx::helpers::Pool& p) const;
diff --git a/src/main/include/log4cxx/pattern/fulllocationpatternconverter.h b/src/main/include/log4cxx/pattern/fulllocationpatternconverter.h
index df917b8..1b54fa9 100644
--- a/src/main/include/log4cxx/pattern/fulllocationpatternconverter.h
+++ b/src/main/include/log4cxx/pattern/fulllocationpatternconverter.h
@@ -52,6 +52,8 @@
   static PatternConverterPtr newInstance(
     const std::vector<LogString>& options);
 
+  using LoggingEventPatternConverter::format;
+
   void format(const log4cxx::spi::LoggingEventPtr& event,
       LogString& toAppendTo,
       log4cxx::helpers::Pool& p) const;
diff --git a/src/main/include/log4cxx/pattern/levelpatternconverter.h b/src/main/include/log4cxx/pattern/levelpatternconverter.h
index 4cf7f3a..5ff198d 100644
--- a/src/main/include/log4cxx/pattern/levelpatternconverter.h
+++ b/src/main/include/log4cxx/pattern/levelpatternconverter.h
@@ -50,6 +50,8 @@
   static PatternConverterPtr newInstance(
     const std::vector<LogString>& options);
 
+  using LoggingEventPatternConverter::format;
+
   void format(const log4cxx::spi::LoggingEventPtr& event,
       LogString& toAppendTo,
       log4cxx::helpers::Pool& p) const;
diff --git a/src/main/include/log4cxx/pattern/linelocationpatternconverter.h b/src/main/include/log4cxx/pattern/linelocationpatternconverter.h
index 594171c..adacfdc 100644
--- a/src/main/include/log4cxx/pattern/linelocationpatternconverter.h
+++ b/src/main/include/log4cxx/pattern/linelocationpatternconverter.h
@@ -52,6 +52,8 @@
   static PatternConverterPtr newInstance(
     const std::vector<LogString>& options);
 
+  using LoggingEventPatternConverter::format;
+
   void format(const log4cxx::spi::LoggingEventPtr& event,
       LogString& toAppendTo,
       log4cxx::helpers::Pool& p) const;
diff --git a/src/main/include/log4cxx/pattern/lineseparatorpatternconverter.h b/src/main/include/log4cxx/pattern/lineseparatorpatternconverter.h
index 4f4b753..85f5633 100644
--- a/src/main/include/log4cxx/pattern/lineseparatorpatternconverter.h
+++ b/src/main/include/log4cxx/pattern/lineseparatorpatternconverter.h
@@ -54,6 +54,8 @@
   static PatternConverterPtr newInstance(
     const std::vector<LogString>& options);
 
+  using LoggingEventPatternConverter::format;
+
   void format(const log4cxx::spi::LoggingEventPtr& event,
       LogString& toAppendTo,
       log4cxx::helpers::Pool& p) const;
diff --git a/src/main/include/log4cxx/pattern/literalpatternconverter.h b/src/main/include/log4cxx/pattern/literalpatternconverter.h
index 4968676..3717f43 100644
--- a/src/main/include/log4cxx/pattern/literalpatternconverter.h
+++ b/src/main/include/log4cxx/pattern/literalpatternconverter.h
@@ -52,6 +52,8 @@
 
   static PatternConverterPtr newInstance(const LogString& literal);
 
+  using LoggingEventPatternConverter::format;
+
   void format(const log4cxx::spi::LoggingEventPtr& event,
      LogString& toAppendTo,
      log4cxx::helpers::Pool& p) const;
diff --git a/src/main/include/log4cxx/pattern/loggerpatternconverter.h b/src/main/include/log4cxx/pattern/loggerpatternconverter.h
index ff0eba3..76b8561 100644
--- a/src/main/include/log4cxx/pattern/loggerpatternconverter.h
+++ b/src/main/include/log4cxx/pattern/loggerpatternconverter.h
@@ -55,6 +55,8 @@
   static PatternConverterPtr newInstance(
     const std::vector<LogString>& options);
 
+  using NamePatternConverter::format;
+
   void format(const log4cxx::spi::LoggingEventPtr& event,
       LogString& toAppendTo,
       log4cxx::helpers::Pool& p) const;
diff --git a/src/main/include/log4cxx/pattern/messagepatternconverter.h b/src/main/include/log4cxx/pattern/messagepatternconverter.h
index 20b6e01..4bb86ef 100644
--- a/src/main/include/log4cxx/pattern/messagepatternconverter.h
+++ b/src/main/include/log4cxx/pattern/messagepatternconverter.h
@@ -51,6 +51,8 @@
   static PatternConverterPtr newInstance(
     const std::vector<LogString>& options);
 
+  using LoggingEventPatternConverter::format;
+
   void format(const log4cxx::spi::LoggingEventPtr& event,
       LogString& toAppendTo,
       log4cxx::helpers::Pool& p) const;
diff --git a/src/main/include/log4cxx/pattern/methodlocationpatternconverter.h b/src/main/include/log4cxx/pattern/methodlocationpatternconverter.h
index 30603fc..8cbc6b1 100644
--- a/src/main/include/log4cxx/pattern/methodlocationpatternconverter.h
+++ b/src/main/include/log4cxx/pattern/methodlocationpatternconverter.h
@@ -52,6 +52,8 @@
   static PatternConverterPtr newInstance(
     const std::vector<LogString>& options);
 
+  using LoggingEventPatternConverter::format;
+
   void format(const log4cxx::spi::LoggingEventPtr& event,
      LogString& toAppendTo,
      log4cxx::helpers::Pool& p) const;
diff --git a/src/main/include/log4cxx/pattern/ndcpatternconverter.h b/src/main/include/log4cxx/pattern/ndcpatternconverter.h
index 5b33df4..ce026fd 100644
--- a/src/main/include/log4cxx/pattern/ndcpatternconverter.h
+++ b/src/main/include/log4cxx/pattern/ndcpatternconverter.h
@@ -51,6 +51,8 @@
   static PatternConverterPtr newInstance(
     const std::vector<LogString>& options);
 
+  using LoggingEventPatternConverter::format;
+
   void format(const log4cxx::spi::LoggingEventPtr& event,
      LogString& toAppendTo,
      log4cxx::helpers::Pool& p) const;
diff --git a/src/main/include/log4cxx/pattern/patternconverter.h b/src/main/include/log4cxx/pattern/patternconverter.h
index 43106c6..c4e21db 100644
--- a/src/main/include/log4cxx/pattern/patternconverter.h
+++ b/src/main/include/log4cxx/pattern/patternconverter.h
@@ -70,10 +70,10 @@
   virtual ~PatternConverter();
 
 public:
-  DECLARE_LOG4CXX_PATTERN(PatternConverter)
-  BEGIN_LOG4CXX_CAST_MAP()
-          LOG4CXX_CAST_ENTRY(PatternConverter)
-  END_LOG4CXX_CAST_MAP()
+  DECLARE_LOG4CXX_PATTERN(PatternConverter);
+  BEGIN_LOG4CXX_CAST_MAP();
+          LOG4CXX_CAST_ENTRY(PatternConverter);
+  END_LOG4CXX_CAST_MAP();
 
   /**
    * Formats an object into a string buffer.
diff --git a/src/main/include/log4cxx/pattern/propertiespatternconverter.h b/src/main/include/log4cxx/pattern/propertiespatternconverter.h
index 0c37fdf..9dcad0c 100644
--- a/src/main/include/log4cxx/pattern/propertiespatternconverter.h
+++ b/src/main/include/log4cxx/pattern/propertiespatternconverter.h
@@ -61,6 +61,9 @@
    */
   static PatternConverterPtr newInstance(
     const std::vector<LogString>& options);
+
+  using LoggingEventPatternConverter::format;
+
   void format(const log4cxx::spi::LoggingEventPtr& event,
      LogString& toAppendTo,
      log4cxx::helpers::Pool& p) const;
diff --git a/src/main/include/log4cxx/pattern/relativetimepatternconverter.h b/src/main/include/log4cxx/pattern/relativetimepatternconverter.h
index f514777..708fe8f 100644
--- a/src/main/include/log4cxx/pattern/relativetimepatternconverter.h
+++ b/src/main/include/log4cxx/pattern/relativetimepatternconverter.h
@@ -50,6 +50,9 @@
   static PatternConverterPtr newInstance(
     const std::vector<LogString>& options);
 
+  using LoggingEventPatternConverter::format;
+
+
   void format(const log4cxx::spi::LoggingEventPtr& event,
       LogString& toAppendTo,
       log4cxx::helpers::Pool& p) const;
diff --git a/src/main/include/log4cxx/pattern/threadpatternconverter.h b/src/main/include/log4cxx/pattern/threadpatternconverter.h
index 4c3cedd..178f652 100644
--- a/src/main/include/log4cxx/pattern/threadpatternconverter.h
+++ b/src/main/include/log4cxx/pattern/threadpatternconverter.h
@@ -50,6 +50,8 @@
   static PatternConverterPtr newInstance(
     const std::vector<LogString>& options);
 
+  using LoggingEventPatternConverter::format;
+
   void format(const log4cxx::spi::LoggingEventPtr& event,
         LogString& toAppendTo,
         log4cxx::helpers::Pool& p) const;
diff --git a/src/main/include/log4cxx/pattern/throwableinformationpatternconverter.h b/src/main/include/log4cxx/pattern/throwableinformationpatternconverter.h
index f5d5641..e3a4805 100644
--- a/src/main/include/log4cxx/pattern/throwableinformationpatternconverter.h
+++ b/src/main/include/log4cxx/pattern/throwableinformationpatternconverter.h
@@ -59,6 +59,9 @@
    */
   static PatternConverterPtr newInstance(
     const std::vector<LogString>& options);
+
+  using LoggingEventPatternConverter::format;
+
   void format(const log4cxx::spi::LoggingEventPtr& event,
      LogString& toAppendTo,
      log4cxx::helpers::Pool& p) const;
diff --git a/src/main/include/log4cxx/patternlayout.h b/src/main/include/log4cxx/patternlayout.h
index 55d6eb5..b0687b7 100644
--- a/src/main/include/log4cxx/patternlayout.h
+++ b/src/main/include/log4cxx/patternlayout.h
@@ -23,8 +23,6 @@
 #pragma warning ( disable: 4231 4251 4275 4786 )
 #endif
 
-
-
 #include <log4cxx/layout.h>
 #include <log4cxx/pattern/loggingeventpatternconverter.h>
 #include <log4cxx/pattern/formattinginfo.h>
@@ -32,378 +30,384 @@
 
 namespace log4cxx
 {
+	LOG4CXX_LIST_DEF(LoggingEventPatternConverterList, log4cxx::pattern::LoggingEventPatternConverterPtr);
+	LOG4CXX_LIST_DEF(FormattingInfoList, log4cxx::pattern::FormattingInfoPtr);
 
-        /**
+	/**
+	 * A flexible layout configurable with pattern string.
+	 *
+	 * <p>
+	 * 	The goal of this class is to #format a {@link spi::LoggingEvent LoggingEvent} and
+	 * 	return the results as a string. The results depend on the <em>conversion pattern</em>.
+	 * </p>
+	 *
+	 * <p>
+	 * 	The conversion pattern is closely related to the conversion pattern of the printf
+	 * 	function in C. A conversion pattern is composed of literal text and format control
+	 * 	expressions called <em>conversion specifiers</em>.
+	 * </p>
+	 *
+	 * <p>
+	 * 	<i>You are free to insert any literal text within the conversion pattern.</i>
+	 * </p>
+	 *
+	 * <p>
+	 * 	Each conversion specifier starts with a percent sign (%) and is followed by optional
+	 * 	<em>format modifiers</em> and a <em>conversion character</em>. The conversion character
+	 * 	specifies the type of data, e.g. logger, level, date, thread name. The format modifiers
+	 * 	control such things as field width, padding, left and right justification. The
+	 * 	following is a simple example.
+	 * </p>
+	 *
+	 * <p>
+	 * 	Let the conversion pattern be <strong>"%-5p [%t]: %m%n"</strong> and assume that the log4cxx
+	 * 	environment was set to use a PatternLayout. Then the statements
+	 * 	<pre>
+	 * 		LoggerPtr root = Logger::getRoot();
+	 * 		root->debug("Message 1");
+	 * 		root->warn("Message 2");</pre>
+	 * 	would yield the output
+	 * 	<pre>
+	 * 		DEBUG [main]: Message 1
+	 * 		WARN  [main]: Message 2</pre>
+	 * </p>
+	 *
+	 * <p>
+	 * 	Note that there is no explicit separator between text and conversion specifiers. The
+	 * 	pattern parser knows when it has reached the end of a conversion specifier when it
+	 * 	reads a conversion character. In the example above the conversion specifier <strong>%-5p</strong>
+	 * 	means the level of the logging event should be left justified to a width of five
+	 * 	characters.
+	 * </p>
+	 *
+	 * <p>The recognized conversion characters are:</p>
+	 *
+	 * <table border="1" cellpadding="8">
+	 * 	<tr>
+	 * 		<th align="center"><strong>Conversion Character</strong></th>
+	 * 		<th align="center"><strong>Effect</strong></th>
+	 * 	</tr>
+	 * 	<tr>
+	 * 		<td align="center"><strong>c</strong></td>
+	 * 		<td>
+	 * 			Used to output the logger of the logging event. The logger conversion specifier
+	 * 			can be optionally followed by <em>precision specifier</em>, that is a decimal
+	 * 			constant in brackets.
+	 * 			<p>
+	 * 				If a precision specifier is given, then only the corresponding number of
+	 * 				right most components of the logger name will be printed. By default the
+	 * 				logger name is printed in full.
+	 * 			</p>
+	 * 			<p>
+	 * 				For example, for the logger name "a.b.c" the pattern <strong>%c{2}</strong> will
+	 * 				output "b.c".
+	 * 			</p>
+	 * 		</td>
+	 * 	</tr>
+	 * 	<tr>
+	 * 		<td align="center">
+	 * 			<p><strong>C</strong></p>
+	 * 			<p><strong>class</strong></p>
+	 * 		</td>
+	 * 		<td>
+	 * 			Used to output the class of the issuer of the logging event if the compiler
+	 * 			used supports a macro to retrieve the method of the currently compiled line and
+	 * 			if the LOG4CXX_TRACE-like macros are used to issue a logging request. In this
+	 * 			case the macro LOG4CXX_* is expanded at compile time to generate location info
+	 * 			of the logging event and adds the method name, besides file and line, if
+	 * 			available. In most cases the provided method contains the classname and can
+	 * 			therefore be retrieved form the location info as needed.
+	 * 			<p>
+	 * 				Currently supported compilers are those from Microsoft, GNU-C and Borland.
+	 * 			</p>
+	 * 		</td>
+	 * 	</tr>
+	 * 	<tr>
+	 * 		<td align="center"><strong>d</strong></td>
+	 * 		<td>
+	 * 			Used to output the date of the logging event. The date conversion specifier may
+	 * 			be followed by a set of braces containing a date and time pattern string
+	 * 			compatible with java.text.SimpleDateFormat, <em>ABSOLUTE</em>, <em>DATE</em> or
+	 * 			<em>ISO8601</em>. For example, <strong>%d{HH:mm:ss,SSS}</strong>,
+	 * 			<strong>%d{dd&nbsp;MMM&nbsp;yyyy&nbsp;HH:mm:ss,SSS}</strong> or <strong>%d{DATE}</strong>. If no
+	 * 			date format specifier is given then ISO8601 format is assumed.
+	 * 		</td>
+	 * 	</tr>
+	 * 	<tr>
+	 * 		<td align="center"><strong>F</strong></td>
+	 * 		<td>
+	 * 			Used to output the file name where the logging request was issued.
+	 * 		</td>
+	 * 	</tr>
+	 * 	<tr>
+	 * 		<td align="center"><strong>l</strong></td>
+	 * 		<td>
+	 * 			Used to output location information of the caller which generated the logging
+	 * 			event.
+	 * 		</td>
+	 * 	</tr>
+	 * 	<tr>
+	 * 		<td align="center"><strong>L</strong></td>
+	 * 		<td>
+	 * 			Used to output the line number from where the logging request was issued.
+	 * 		</td>
+	 * 	</tr>
+	 * 	<tr>
+	 * 		<td align="center"><strong>m</strong></td>
+	 * 		<td>
+	 * 			Used to output the application supplied message associated with the logging
+	 * 			event.
+	 * 		</td>
+	 * 	</tr>
+	 * 	<tr>
+	 * 		<td align="center">
+	 * 			<strong>M</strong>
+	 * 			<p><strong>method</strong></p>
+	 * 		</td>
+	 * 		<td>
+	 * 			Used to output the method of the issuer of the logging event if the compiler
+	 * 			used supports a macro to retrieve the method of the currently compiled line
+	 * 			and if the LOG4CXX_TRACE-like macros are used to issue a logging request. In
+	 * 			this case the macro LOG4CXX_* is expanded at compile time to generate location
+	 * 			info of the logging event and adds the method name, besides file and line, if
+	 * 			available. In most cases the provided method contains the classname which is
+	 * 			ignored in every attempt to retrieve the method from the location info.
+	 * 			<p>
+	 * 				Currently supported compilers are those from Microsoft, GNU-C and Borland.
+	 * 			</p>
+	 * 		</td>
+	 * 	</tr>
+	 * 	<tr>
+	 * 		<td align="center"><strong>n</strong></td>
+	 * 		<td>
+	 * 			Outputs the platform dependent line separator character or characters.
+	 * 			<p>
+	 * 				This conversion character offers practically the same performance as using
+	 * 				non-portable line separator strings such as "\n", or "\r\n". Thus, it is the
+	 * 				preferred way of specifying a line separator.
+	 * 			</p>
+	 * 		</td>
+	 * 	</tr>
+	 * 	<tr>
+	 * 		<td align="center"><strong>p</strong></td>
+	 * 		<td>Used to output the level of the logging event.</td>
+	 * 	</tr>
+	 * 	<tr>
+	 * 		<td align="center"><strong>r</strong></td>
+	 * 		<td>
+	 * 			Used to output the number of milliseconds elapsed since the start of the
+	 * 			application until the creation of the logging event.
+	 * 		</td>
+	 * 	</tr>
+	 * 	<tr>
+	 * 		<td align="center"><strong>t</strong></td>
+	 * 		<td>Used to output the name of the thread that generated the logging event.</td>
+	 * 	</tr>
+	 * 	<tr>
+	 * 		<td align="center"><strong>x</strong></td>
+	 * 		<td>
+	 * 			Used to output the NDC (nested diagnostic context) associated with the thread that
+	 * 			generated the logging event.
+	 * 		</td>
+	 * 	</tr>
+	 * 	<tr>
+	 * 		<td align="center"><strong>X</strong></td>
+	 * 		<td>
+	 * 			Used to output the MDC (mapped diagnostic context) associated with the thread that
+	 * 			generated the logging event. The <strong>X</strong> conversion character <em>must</em> be
+	 * 			followed by the key for the map placed between braces, as in <strong>%X{clientNumber}</strong>
+	 * 			where <code>clientNumber</code> is the key. The value in the MDC corresponding to
+	 * 			the key will be output.
+	 * 			<p>See MDC class for more details.</p>
+	 * 		</td>
+	 * 	</tr>
+	 * 	<tr>
+	 * 		<td align="center"><strong>%</strong></td>
+	 * 		<td>The sequence %% outputs a single percent sign.</td>
+	 * 	</tr>
+	 * </table>
+	 *
+	 * <p>
+	 * 	By default the relevant information is output as is. However, with the aid of format
+	 * 	modifiers it is possible to change the minimum field width, the maximum field width
+	 * 	and justification.
+	 * </p>
+	 *
+	 * <p>
+	 * 	The optional format modifier is placed between the percent sign and the conversion
+	 * 	character.
+	 * </p>
+	 *
+	 * <p>
+	 * 	The first optional format modifier is the <em>left justification flag</em> which is
+	 * 	just the minus (-) character. Then comes the optional <em>minimum field width</em>
+	 * 	modifier. This is a decimal constant that represents the minimum number of characters
+	 * 	to output. If the data item requires fewer characters, it is padded on either the left
+	 * 	or the right until the minimum width is reached. The default is to pad on the left
+	 * 	(right justify) but you can specify right padding with the left justification flag. The
+	 * 	padding character is space. If the data item is larger than the minimum field width,
+	 * 	the field is expanded to accommodate the data. The value is never truncated.
+	 * </p>
+	 *
+	 * <p>
+	 * 	This behavior can be changed using the <em>maximum field width</em> modifier which is
+	 * 	designated by a period followed by a decimal constant. If the data item is longer than
+	 * 	the maximum field, then the extra characters are removed from the <em>beginning</em> of
+	 * 	the data item and not from the end. For example, it the maximum field width is eight
+	 * 	and the data item is ten characters long, then the first two characters of the data
+	 * 	item are dropped. This behavior deviates from the printf function in C where truncation
+	 * 	is done from the end.
+	 * </p>
+	 *
+	 * <p>Below are various format modifier examples for the logger conversion specifier.</p>
+	 *
+	 * <table border="1" cellpadding="8">
+	 * 	<tr>
+	 * 		<th align="center"><strong>Format modifier</strong></th>
+	 * 		<th align="center"><strong>left justify</strong></th>
+	 * 		<th align="center"><strong>minimum width</strong></th>
+	 * 		<th align="center"><strong>maximum width</strong></th>
+	 * 		<th align="center"><strong>comment</strong></th>
+	 * 	</tr>
+	 * 	<tr>
+	 * 		<td align="center">%20c</td>
+	 * 		<td align="center">false</td>
+	 * 		<td align="center">20</td>
+	 * 		<td align="center">none</td>
+	 * 		<td>Left pad with spaces if the logger name is less than 20 characters long.</td>
+	 * 	</tr>
+	 * 	<tr>
+	 * 		<td align="center">%-20c</td>
+	 * 		<td align="center">true</td>
+	 * 		<td align="center">20</td>
+	 * 		<td align="center">none</td>
+	 * 		<td>Right pad with spaces if the logger name is less than 20 characters long.</td>
+	 * 	</tr>
+	 * 	<tr>
+	 * 		<td align="center">%.30c</td>
+	 * 		<td align="center">NA</td>
+	 * 		<td align="center">none</td>
+	 * 		<td align="center">30</td>
+	 * 		<td>Truncate from the beginning if the logger name is longer than 30 characters.</td>
+	 * 	</tr>
+	 * 	<tr>
+	 * 		<td align="center">%20.30c</td>
+	 * 		<td align="center">false</td>
+	 * 		<td align="center">20</td>
+	 * 		<td align="center">30</td>
+	 * 		<td>
+	 * 			Left pad with spaces if the logger name is shorter than 20 characters. However, if
+	 * 			logger name is longer than 30 characters, then truncate from the beginning.
+	 * 		</td>
+	 * 	</tr>
+	 * 	<tr>
+	 * 		<td align="center">%-20.30c</td>
+	 * 		<td align="center">true</td>
+	 * 		<td align="center">20</td>
+	 * 		<td align="center">30</td>
+	 * 		<td>
+	 * 			Right pad with spaces if the logger name is shorter than 20 characters. However, if
+	 * 			logger name is longer than 30 characters, then truncate from the beginning.
+	 * 		</td>
+	 * 	</tr>
+	 * </table>
+	 *
+	 * <p>Below are some examples of conversion patterns.</p>
+	 *
+	 * <p><strong>%r [%t] %-5p %c %x - %m\n</strong></p>
+	 * <p>This is essentially the TTCC layout.</p>
+	 *
+	 * <p><strong>%-6r [%15.15t] %-5p %30.30c %x - %m\n</strong></p>
+	 *
+	 * <p>
+	 * 	Similar to the TTCC layout except that the relative time is right padded if less than 6
+	 * 	digits, thread name is right padded if less than 15 characters and truncated if longer
+	 * 	and the logger name is left padded if shorter than 30 characters and truncated if
+	 * 	longer.
+	 * </p>
+	 *
+	 * <p>
+	 * 	The above text is largely inspired from Peter A. Darnell and Philip E. Margolis' highly
+	 * 	recommended book "C -- a Software Engineering Approach", ISBN 0-387-97389-3.
+	 * </p>
+	 */
+	class LOG4CXX_EXPORT PatternLayout : public Layout
+	{
+		/**
+		 * Conversion pattern.
+		 */
+		LogString conversionPattern;
 
-        A flexible layout configurable with pattern string.
+		/**
+		 * Pattern converters.
+		 */
+		LoggingEventPatternConverterList patternConverters;
 
-        <p>The goal of this class is to #format a {@link
-        spi::LoggingEvent LoggingEvent} and return the results as a string.
-        The results depend on the <em>conversion pattern</em>.
+		/**
+		 * Field widths and alignment corresponding to pattern converters.
+		 */
+		FormattingInfoList patternFields;
 
-        <p>The conversion pattern is closely related to the conversion
-        pattern of the printf function in C. A conversion pattern is
-        composed of literal text and format control expressions called
-        <em>conversion specifiers</em>.
+	public:
+		DECLARE_LOG4CXX_OBJECT(PatternLayout)
+		BEGIN_LOG4CXX_CAST_MAP()
+			LOG4CXX_CAST_ENTRY(PatternLayout)
+			LOG4CXX_CAST_ENTRY_CHAIN(Layout)
+		END_LOG4CXX_CAST_MAP()
 
-        <p><i>You are free to insert any literal text within the conversion
-        pattern.</i>
+		/**
+		 * Does nothing
+		 */
+		PatternLayout();
 
-        <p>Each conversion specifier starts with a percent sign (\%) and is
-        followed by optional <em>format modifiers</em> and a <em>conversion
-        character</em>. The conversion character specifies the type of
-        data, e.g. logger, level, date, thread name. The format
-        modifiers control such things as field width, padding, left and
-        right justification. The following is a simple example.
+		/**
+		 * Constructs a PatternLayout using the supplied conversion pattern.
+		 */
+		PatternLayout(const LogString& pattern);
 
-        <p>Let the conversion pattern be <b>"\%-5p [\%t]: \%m\%n"</b> and assume
-        that the log4cxx environment was set to use a PatternLayout. Then the
-        statements
-        <pre>
-        LoggerPtr root = Logger::getRoot();
-        root->debug("Message 1");
-        root->warn("Message 2");
-        </pre>
-        would yield the output
-        <pre>
-        DEBUG [main]: Message 1
-        WARN  [main]: Message 2
-        </pre>
-
-        <p>Note that there is no explicit separator between text and
-        conversion specifiers. The pattern parser knows when it has reached
-        the end of a conversion specifier when it reads a conversion
-        character. In the example above the conversion specifier
-        <b>\%-5p</b> means the level of the logging event should be left
-        justified to a width of five characters.
-
-        The recognized conversion characters are
-
-        <p>
-        <table border="1" CELLPADDING="8">
-        <tr>
-        <td align=center><b>Conversion Character</b></td>
-        <td align=center><b>Effect</b></td>
-        </tr>
-
-        <tr>
-        <td align=center><b>c</b></td>
-
-        <td>Used to output the logger of the logging event. The
-        logger conversion specifier can be optionally followed by
-        <em>precision specifier</em>, that is a decimal constant in
-        brackets.
-
-        <p>If a precision specifier is given, then only the corresponding
-        number of right most components of the logger name will be
-        printed. By default the logger name is printed in full.
-
-        <p>For example, for the logger name "a.b.c" the pattern
-        <b>\%c{2}</b> will output "b.c".
-
-        </td>
-        </tr>
-
-   <tr> <td align=center><b>d</b></td> <td>Used to output the date of
-         the logging event. The date conversion specifier may be
-         followed by a set of braces containing a
-         date and time pattern string compatible with java.text.SimpleDateFormat,
-         <em>ABSOLUTE</em>, <em>DATE</em> or <em>ISO8601</em>.
-         For example, <b>%d{HH:mm:ss,SSS}</b>,
-         <b>%d{dd&nbsp;MMM&nbsp;yyyy&nbsp;HH:mm:ss,SSS}</b> or
-         <b>%d{DATE}</b>.  If no date format specifier is given then
-         ISO8601 format is assumed.
-     </td>
-   </tr>
-
-        <tr>
-        <td align=center><b>F</b></td>
-
-        <td>Used to output the file name where the logging request was
-        issued.
-
-        </tr>
-
-        <tr>
-        <td align=center><b>l</b></td>
-
-        <td>Used to output location information of the caller which generated
-        the logging event.
-
-        </td>
-        </tr>
-
-        <tr>
-        <td align=center><b>L</b></td>
-
-        <td>Used to output the line number from where the logging request
-        was issued.
-        </tr>
-
-
-        <tr>
-        <td align=center><b>m</b></td>
-        <td>Used to output the application supplied message associated with
-        the logging event.</td>
-        </tr>
-
-        <tr>
-        <td align=center><b>n</b></td>
-
-        <td>Outputs the platform dependent line separator character or
-        characters.
-
-        <p>This conversion character offers practically the same
-        performance as using non-portable line separator strings such as
-        "\n", or "\r\n". Thus, it is the preferred way of specifying a
-        line separator.
-
-
-        </tr>
-
-        <tr>
-        <td align=center><b>p</b></td>
-        <td>Used to output the level of the logging event.</td>
-        </tr>
-
-        <tr>
-
-        <td align=center><b>r</b></td>
-
-        <td>Used to output the number of milliseconds elapsed since the start
-        of the application until the creation of the logging event.</td>
-        </tr>
-
-
-        <tr>
-        <td align=center><b>t</b></td>
-
-        <td>Used to output the name of the thread that generated the
-        logging event.</td>
-
-        </tr>
-
-        <tr>
-
-        <td align=center><b>x</b></td>
-
-        <td>Used to output the NDC (nested diagnostic context) associated
-        with the thread that generated the logging event.
-        </td>
-        </tr>
-
-
-        <tr>
-        <td align=center><b>X</b></td>
-
-        <td>
-
-        <p>Used to output the MDC (mapped diagnostic context) associated
-        with the thread that generated the logging event. The <b>X</b>
-        conversion character <em>must</em> be followed by the key for the
-        map placed between braces, as in <b>\%X{clientNumber}</b> where
-        <code>clientNumber</code> is the key. The value in the MDC
-        corresponding to the key will be output.</p>
-
-        <p>See MDC class for more details.
-        </p>
-
-        </td>
-        </tr>
-
-        <tr>
-
-        <td align=center><b>\%</b></td>
-
-        <td>The sequence \%\% outputs a single percent sign.
-        </td>
-        </tr>
-
-        </table>
-
-        <p>By default the relevant information is output as is. However,
-        with the aid of format modifiers it is possible to change the
-        minimum field width, the maximum field width and justification.
-
-        <p>The optional format modifier is placed between the percent sign
-        and the conversion character.
-
-        <p>The first optional format modifier is the <em>left justification
-        flag</em> which is just the minus (-) character. Then comes the
-        optional <em>minimum field width</em> modifier. This is a decimal
-        constant that represents the minimum number of characters to
-        output. If the data item requires fewer characters, it is padded on
-        either the left or the right until the minimum width is
-        reached. The default is to pad on the left (right justify) but you
-        can specify right padding with the left justification flag. The
-        padding character is space. If the data item is larger than the
-        minimum field width, the field is expanded to accommodate the
-        data. The value is never truncated.
-
-        <p>This behavior can be changed using the <em>maximum field
-        width</em> modifier which is designated by a period followed by a
-        decimal constant. If the data item is longer than the maximum
-        field, then the extra characters are removed from the
-        <em>beginning</em> of the data item and not from the end. For
-        example, it the maximum field width is eight and the data item is
-        ten characters long, then the first two characters of the data item
-        are dropped. This behavior deviates from the printf function in C
-        where truncation is done from the end.
-
-        <p>Below are various format modifier examples for the logger
-        conversion specifier.
-
-        <p>
-        <TABLE BORDER=1 CELLPADDING=8>
-        <tr>
-        <td align=center><b>Format modifier</b></td>
-        <td align=center><b>left justify</b></td>
-        <td align=center><b>minimum width</b></td>
-        <td align=center><b>maximum width</b></td>
-        <td align=center><b>comment</b></td>
-        </tr>
-
-        <tr>
-        <td align=center>\%20c</td>
-        <td align=center>false</td>
-        <td align=center>20</td>
-        <td align=center>none</td>
-
-        <td>Left pad with spaces if the logger name is less than 20
-        characters long.
-
-        <tr> <td align=center>\%-20c</td> <td align=center>true</td> <td
-        align=center>20</td> <td align=center>none</td> <td>Right pad with
-        spaces if the logger name is less than 20 characters long.
-
-        <tr>
-        <td align=center>\%.30c</td>
-        <td align=center>NA</td>
-        <td align=center>none</td>
-        <td align=center>30</td>
-
-        <td>Truncate from the beginning if the logger name is longer than 30
-        characters.
-
-        <tr>
-        <td align=center>\%20.30c</td>
-        <td align=center>false</td>
-        <td align=center>20</td>
-        <td align=center>30</td>
-
-        <td>Left pad with spaces if the logger name is shorter than 20
-        characters. However, if logger name is longer than 30 characters,
-        then truncate from the beginning.
-
-        <tr>
-        <td align=center>\%-20.30c</td>
-        <td align=center>true</td>
-        <td align=center>20</td>
-        <td align=center>30</td>
-
-        <td>Right pad with spaces if the logger name is shorter than 20
-        characters. However, if logger name is longer than 30 characters,
-        then truncate from the beginning.
-
-        </table>
-
-        <p>Below are some examples of conversion patterns.
-
-        <p><b>\%r [\%t] \%-5p \%c \%x - \%m\n</b>
-        <p>This is essentially the TTCC layout.
-
-        <p><b>\%-6r [\%15.15t] \%-5p \%30.30c \%x - \%m\n</b>
-
-        <p>Similar to the TTCC layout except that the relative time is
-        right padded if less than 6 digits, thread name is right padded if
-        less than 15 characters and truncated if longer and the logger
-        name is left padded if shorter than 30 characters and truncated if
-        longer.
-
-        <p>The above text is largely inspired from Peter A. Darnell and
-        Philip E. Margolis' highly recommended book "C -- a Software
-        Engineering Approach", ISBN 0-387-97389-3.
-        */
-        class LOG4CXX_EXPORT PatternLayout : public Layout
-        {
-                 /**
-                  * Conversion pattern.
-                  */
-                LogString conversionPattern;
-
-                /**
-                 * Pattern converters.
-                 */
-                LOG4CXX_LIST_DEF(LoggingEventPatternConverterList, log4cxx::pattern::LoggingEventPatternConverterPtr);
-                LoggingEventPatternConverterList patternConverters;
-
-               /**
-                * Field widths and alignment corresponding to pattern converters.
-                */
-                LOG4CXX_LIST_DEF(FormattingInfoList, log4cxx::pattern::FormattingInfoPtr);
-                FormattingInfoList patternFields;
-
-
-        public:
-                DECLARE_LOG4CXX_OBJECT(PatternLayout)
-                BEGIN_LOG4CXX_CAST_MAP()
-                        LOG4CXX_CAST_ENTRY(PatternLayout)
-                        LOG4CXX_CAST_ENTRY_CHAIN(Layout)
-                END_LOG4CXX_CAST_MAP()
-
-                /**
-                Does nothing
-                */
-                PatternLayout();
-
-                /**
-                Constructs a PatternLayout using the supplied conversion pattern.
-                */
-                PatternLayout(const LogString& pattern);
+		/**
+		 * Set the <strong>ConversionPattern</strong> option. This is the string which
+		 * controls formatting and consists of a mix of literal content and
+		 * conversion specifiers.
+		 */
+		void setConversionPattern(const LogString& conversionPattern);
 
-                /**
-                Set the <b>ConversionPattern</b> option. This is the string which
-                controls formatting and consists of a mix of literal content and
-                conversion specifiers.
-                */
-                void setConversionPattern(const LogString& conversionPattern);
+		/**
+		 * Returns the value of the <strong>ConversionPattern</strong> option.
+		 */
+		inline LogString getConversionPattern() const
+			{ return conversionPattern; }
 
-                /**
-                Returns the value of the <b>ConversionPattern</b> option.
-                */
-                inline LogString getConversionPattern() const
-                        { return conversionPattern; }
+		/**
+		 * Call createPatternParser
+		 */
+		virtual void activateOptions(log4cxx::helpers::Pool& p);
 
-                /**
-                Call createPatternParser
-                */
-                virtual void activateOptions(log4cxx::helpers::Pool& p);
+		virtual void setOption(const LogString& option, const LogString& value);
 
-                virtual void setOption(const LogString& option, const LogString& value);
+		/**
+		 * The PatternLayout does not handle the throwable contained within
+		 * {@link spi::LoggingEvent LoggingEvents}. Thus, it returns
+		 * <code>true</code>.
+		 */
+		virtual bool ignoresThrowable() const { return true; }
 
-                /**
-                The PatternLayout does not handle the throwable contained within
-                {@link spi::LoggingEvent LoggingEvents}. Thus, it returns
-                <code>true</code>.
-                */
-                virtual bool ignoresThrowable() const
-                        { return true; }
+		/**
+		 * Produces a formatted string as specified by the conversion pattern.
+		 */
+		virtual void format(	LogString& output,
+								const spi::LoggingEventPtr& event,
+								log4cxx::helpers::Pool& pool) const;
 
-                /**
-                Produces a formatted string as specified by the conversion pattern.
-                */
-                virtual void format(LogString& output,
-                     const spi::LoggingEventPtr& event, log4cxx::helpers::Pool& pool) const;
+	protected:
+		virtual log4cxx::pattern::PatternMap getFormatSpecifiers();
+	};
 
-        protected:
-                virtual log4cxx::pattern::PatternMap getFormatSpecifiers();
-        };
-      LOG4CXX_PTR_DEF(PatternLayout);
-}  // namespace log4cxx
+	LOG4CXX_PTR_DEF(PatternLayout);
+} // namespace log4cxx
 
 #if defined(_MSC_VER)
 #pragma warning ( pop )
 #endif
 
-
 #endif //_LOG4CXX_PATTERN_LAYOUT_H
diff --git a/src/main/include/log4cxx/private/Makefile.am b/src/main/include/log4cxx/private/Makefile.am
index 3a896ea..82ff880 100644
--- a/src/main/include/log4cxx/private/Makefile.am
+++ b/src/main/include/log4cxx/private/Makefile.am
@@ -14,10 +14,5 @@
 # limitations under the License.
 #
 privateincdir = $(includedir)/log4cxx/private
-privateinc_HEADERS= $(top_builddir)/src/main/include/log4cxx/private/*.h log4cxx_private.h
-DISTCLEANFILES = log4cxx_private.h
+privateinc_HEADERS = log4cxx_private.h
 EXTRA_DIST = log4cxx_private.hw
-
-dist-hook:
-	-rm -f $(distdir)/log4cxx_private.h
-
diff --git a/src/main/include/log4cxx/propertyconfigurator.h b/src/main/include/log4cxx/propertyconfigurator.h
index 9afa12d..e9706ff 100644
--- a/src/main/include/log4cxx/propertyconfigurator.h
+++ b/src/main/include/log4cxx/propertyconfigurator.h
@@ -50,6 +50,7 @@
         class LoggerFactory;
     }
 
+	class PropertyWatchdog;
 /**
 Allows the configuration of log4cxx from an external file.  See
 <b>{@link #doConfigure(const File&, log4cxx::spi::LoggerRepositoryPtr&)}</b>
@@ -384,6 +385,7 @@
 private:
       PropertyConfigurator(const PropertyConfigurator&);
       PropertyConfigurator& operator=(const PropertyConfigurator&);
+	  static PropertyWatchdog *pdog;
    }; // class PropertyConfigurator
 }  // namespace log4cxx
 
diff --git a/src/main/include/log4cxx/rolling/Makefile.am b/src/main/include/log4cxx/rolling/Makefile.am
old mode 100755
new mode 100644
index 8b10b18..5bca754
--- a/src/main/include/log4cxx/rolling/Makefile.am
+++ b/src/main/include/log4cxx/rolling/Makefile.am
@@ -14,5 +14,19 @@
 # limitations under the License.
 #
 rollingincdir = $(includedir)/log4cxx/rolling
-rollinginc_HEADERS= $(top_srcdir)/src/main/include/log4cxx/rolling/*.h
-
+rollinginc_HEADERS= \
+    action.h \
+    filerenameaction.h \
+    filterbasedtriggeringpolicy.h \
+    fixedwindowrollingpolicy.h \
+    gzcompressaction.h \
+    manualtriggeringpolicy.h \
+    rollingfileappender.h \
+    rollingfileappenderskeleton.h \
+    rollingpolicybase.h \
+    rollingpolicy.h \
+    rolloverdescription.h \
+    sizebasedtriggeringpolicy.h \
+    timebasedrollingpolicy.h \
+    triggeringpolicy.h \
+    zipcompressaction.h
diff --git a/src/main/include/log4cxx/rolling/fixedwindowrollingpolicy.h b/src/main/include/log4cxx/rolling/fixedwindowrollingpolicy.h
old mode 100755
new mode 100644
index b5ce14c..aeab8a3
--- a/src/main/include/log4cxx/rolling/fixedwindowrollingpolicy.h
+++ b/src/main/include/log4cxx/rolling/fixedwindowrollingpolicy.h
@@ -100,33 +100,21 @@
           void setMaxIndex(int newVal);
           void setMinIndex(int newVal);
 
+			/**
+			 * {@inheritDoc}
+ 			 */
+			RolloverDescriptionPtr initialize(
+				const	LogString&				currentActiveFile,
+				const	bool					append,
+						log4cxx::helpers::Pool&	pool);
 
-/**
-* Initialize the policy and return any initial actions for rolling file appender.
-*
-* @param file current value of RollingFileAppender::getFile().
-* @param append current value of RollingFileAppender::getAppend().
-* @param p pool used for any required memory allocations.
-* @return Description of the initialization, may be null to indicate
-* no initialization needed.
-* @throws SecurityException if denied access to log files.
-*/
-virtual RolloverDescriptionPtr initialize(
-const LogString& file, const bool append, log4cxx::helpers::Pool& p);
-
-/**
-* Prepare for a rollover.  This method is called prior to
-* closing the active log file, performs any necessary
-* preliminary actions and describes actions needed
-* after close of current log file.
-*
-* @param activeFile file name for current active log file.
-* @param p pool used for any required memory allocations.
-* @return Description of pending rollover, may be null to indicate no rollover
-* at this time.
-* @throws SecurityException if denied access to log files.
-*/
-virtual RolloverDescriptionPtr rollover(const LogString& activeFile, log4cxx::helpers::Pool& p);
+			/**
+			 * {@inheritDoc}
+ 			 */
+			RolloverDescriptionPtr rollover(
+				const	LogString&				currentActiveFile,
+				const	bool					append,
+						log4cxx::helpers::Pool&	pool);
 
 protected:
              log4cxx::pattern::PatternMap getFormatSpecifiers() const;
diff --git a/src/main/include/log4cxx/rolling/rollingfileappender.h b/src/main/include/log4cxx/rolling/rollingfileappender.h
old mode 100755
new mode 100644
diff --git a/src/main/include/log4cxx/rolling/rollingfileappenderskeleton.h b/src/main/include/log4cxx/rolling/rollingfileappenderskeleton.h
index f8f53f5..40568c7 100644
--- a/src/main/include/log4cxx/rolling/rollingfileappenderskeleton.h
+++ b/src/main/include/log4cxx/rolling/rollingfileappenderskeleton.h
@@ -57,6 +57,10 @@
            */
           size_t fileLength;
 
+          /**
+           *  save the loggingevent
+           */
+          spi::LoggingEventPtr* _event;
         public:
           /**
            * The default constructor simply calls its {@link
@@ -134,6 +138,25 @@
            */
           size_t getFileLength() const;
 
+#ifdef LOG4CXX_MULTI_PROCESS
+          /**
+           * Set byte length of current active log file.
+           * @return void
+           */
+          void setFileLength(size_t length);
+
+          /**
+           *  Release the file lock
+           * @return void
+           */
+          void releaseFileLock(apr_file_t* lock_file);
+          /**
+           * re-open the latest file when its own handler has been renamed
+           * @return void
+           */
+          void reopenLatestFile(log4cxx::helpers::Pool& p);
+#endif
+
           /**
            * Increments estimated byte length of current active log file.
            * @param increment additional bytes written to log file.
diff --git a/src/main/include/log4cxx/rolling/rollingpolicy.h b/src/main/include/log4cxx/rolling/rollingpolicy.h
old mode 100755
new mode 100644
index 96a9643..04a834d
--- a/src/main/include/log4cxx/rolling/rollingpolicy.h
+++ b/src/main/include/log4cxx/rolling/rollingpolicy.h
@@ -43,35 +43,39 @@
 
         public:
         virtual ~RollingPolicy() {}
-        /**
-       * Initialize the policy and return any initial actions for rolling file appender.
-       *
-       * @param file current value of RollingFileAppender.getFile().
-       * @param append current value of RollingFileAppender.getAppend().
-       * @param p pool for memory allocations during call.
-       * @return Description of the initialization, may be null to indicate
-       * no initialization needed.
-       * @throws SecurityException if denied access to log files.
-       */
-       virtual RolloverDescriptionPtr initialize(
-        const LogString& file,
-        const bool append,
-        log4cxx::helpers::Pool& p) = 0;
 
-      /**
-       * Prepare for a rollover.  This method is called prior to
-       * closing the active log file, performs any necessary
-       * preliminary actions and describes actions needed
-       * after close of current log file.
-       *
-       * @param activeFile file name for current active log file.
-       * @param p pool for memory allocations during call.
-       * @return Description of pending rollover, may be null to indicate no rollover
-       * at this time.
-       * @throws SecurityException if denied access to log files.
-       */
-      virtual RolloverDescriptionPtr rollover(const LogString& activeFile,
-          log4cxx::helpers::Pool& p) = 0;
+		/**
+		 * Initialize the policy and return any initial actions for rolling file appender.
+		 *
+		 * @param currentActiveFile current value of RollingFileAppender.getFile().
+		 * @param append current value of RollingFileAppender.getAppend().
+		 * @param pool pool for memory allocations during call.
+		 * @return Description of the initialization, may be null to indicate
+		 * no initialization needed.
+		 * @throws SecurityException if denied access to log files.
+		 */
+		virtual RolloverDescriptionPtr initialize(
+			const	LogString&				currentActiveFile,
+			const	bool					append,
+					log4cxx::helpers::Pool&	pool) = 0;
+
+		/**
+		 * Prepare for a rollover.  This method is called prior to
+		 * closing the active log file, performs any necessary
+		 * preliminary actions and describes actions needed
+		 * after close of current log file.
+		 *
+		 * @param currentActiveFile file name for current active log file.
+		 * @param append current value of the parent FileAppender.getAppend().
+		 * @param pool pool for memory allocations during call.
+		 * @return Description of pending rollover, may be null to indicate no rollover
+		 * at this time.
+		 * @throws SecurityException if denied access to log files.
+		 */
+		virtual RolloverDescriptionPtr rollover(
+			const	LogString&				currentActiveFile,
+			const	bool					append,
+					log4cxx::helpers::Pool&	pool) = 0;
         };
 
       LOG4CXX_PTR_DEF(RollingPolicy);
diff --git a/src/main/include/log4cxx/rolling/rollingpolicybase.h b/src/main/include/log4cxx/rolling/rollingpolicybase.h
old mode 100755
new mode 100644
index 86bd75c..4011a62
--- a/src/main/include/log4cxx/rolling/rollingpolicybase.h
+++ b/src/main/include/log4cxx/rolling/rollingpolicybase.h
@@ -34,6 +34,8 @@
 
 namespace log4cxx {
     namespace rolling {
+        LOG4CXX_LIST_DEF(PatternConverterList, log4cxx::pattern::PatternConverterPtr);
+        LOG4CXX_LIST_DEF(FormattingInfoList, log4cxx::pattern::FormattingInfoPtr);
 
         /**
          * Implements methods common to most, it not all, rolling
@@ -57,13 +59,11 @@
           /**
            * File name pattern converters.
            */
-          LOG4CXX_LIST_DEF(PatternConverterList, log4cxx::pattern::PatternConverterPtr);
           PatternConverterList patternConverters;
 
           /**
            * File name field specifiers.
            */
-          LOG4CXX_LIST_DEF(FormattingInfoList, log4cxx::pattern::FormattingInfoPtr);
           FormattingInfoList patternFields;
 
           /**
@@ -96,6 +96,9 @@
            LogString getFileNamePattern() const;
 
 
+#ifdef LOG4CXX_MULTI_PROCESS
+           PatternConverterList getPatternConverterList() { return patternConverters; }
+#endif
            protected:
            /**
             *   Parse file name pattern.
diff --git a/src/main/include/log4cxx/rolling/sizebasedtriggeringpolicy.h b/src/main/include/log4cxx/rolling/sizebasedtriggeringpolicy.h
old mode 100755
new mode 100644
diff --git a/src/main/include/log4cxx/rolling/timebasedrollingpolicy.h b/src/main/include/log4cxx/rolling/timebasedrollingpolicy.h
index 4becb3b..4491b0b 100755
--- a/src/main/include/log4cxx/rolling/timebasedrollingpolicy.h
+++ b/src/main/include/log4cxx/rolling/timebasedrollingpolicy.h
@@ -22,6 +22,9 @@
 #include <log4cxx/portability.h>
 #include <log4cxx/rolling/rollingpolicybase.h>
 #include <log4cxx/rolling/triggeringpolicy.h>
+#include <log4cxx/writerappender.h>
+#include <log4cxx/helpers/outputstream.h>
+#include <apr_mmap.h>
 
 namespace log4cxx {
 
@@ -132,9 +135,6 @@
          * <code> TimeBasedRollingPolicy</code> must be called <em>before</em> calling
          * the {@link #activateOptions} method of the owning
          * <code>RollingFileAppender</code>.
-         *
-         *
-         *
          */
         class LOG4CXX_EXPORT TimeBasedRollingPolicy : public RollingPolicyBase,
              public TriggeringPolicy {
@@ -157,6 +157,51 @@
         LogString lastFileName;
 
         /**
+         * mmap pointer
+         */
+        apr_mmap_t* _mmap;
+
+        /*
+         * pool for mmap handler
+         * */
+        log4cxx::helpers::Pool* _mmapPool;
+
+        /**
+         * mmap file descriptor
+         */
+        apr_file_t* _file_map;
+
+        /**
+         * mmap file name
+         */
+        std::string _mapFileName;
+
+        /*
+         * lock file handle
+         * */
+        apr_file_t* _lock_file;
+
+        /**
+         * Check nextCheck if it has already been set
+         * Timebased rolling policy has an issue when working at low rps.
+         * Under low rps, multiple processes will not be scheduled in time for the second chance(do rolling),
+         * so the rolling mechanism will not be triggered even if the time period is out of date.
+         * This results in log entries will be accumulated for serveral minutes to be rolling.
+         * Adding this flag to provide rolling opportunity for a process even if it is writing the first log entry
+         */
+        bool bAlreadyInitialized;
+
+        /*
+         * If the current file name contains date information, retrieve the current writting file from mmap
+         * */
+        bool bRefreshCurFile;
+
+        /*
+         * mmap file name
+         * */
+        LogString _fileNamePattern;
+
+        /**
          * Length of any file type suffix (.gz, .zip).
          */
         int suffixLength;
@@ -166,35 +211,56 @@
             void addRef() const;
             void releaseRef() const;
             void activateOptions(log4cxx::helpers::Pool& );
-            /**
-           * Initialize the policy and return any initial actions for rolling file appender.
-           *
-           * @param file current value of RollingFileAppender.getFile().
-           * @param append current value of RollingFileAppender.getAppend().
-           * @param pool pool for any required allocations.
-           * @return Description of the initialization, may be null to indicate
-           * no initialization needed.
-           * @throws SecurityException if denied access to log files.
-           */
-           RolloverDescriptionPtr initialize(
-            const LogString& file,
-            const bool append,
-            log4cxx::helpers::Pool& pool);
 
-          /**
-           * Prepare for a rollover.  This method is called prior to
-           * closing the active log file, performs any necessary
-           * preliminary actions and describes actions needed
-           * after close of current log file.
-           *
-           * @param activeFile file name for current active log file.
-           * @param pool pool for any required allocations.
-           * @return Description of pending rollover, may be null to indicate no rollover
-           * at this time.
-           * @throws SecurityException if denied access to log files.
-           */
-          RolloverDescriptionPtr rollover(const LogString& activeFile,
-            log4cxx::helpers::Pool& pool);
+#ifdef LOG4CXX_MULTI_PROCESS
+            virtual ~TimeBasedRollingPolicy();
+
+            /**
+             * Generate mmap file
+             */
+            int createMMapFile(const std::string& lastfilename, log4cxx::helpers::Pool& pool);
+
+            /**
+             *  Detect if the mmap file is empty
+             */
+            bool isMapFileEmpty(log4cxx::helpers::Pool& pool);
+
+            /**
+             *   init MMapFile
+             */
+            void initMMapFile(const LogString& lastFileName, log4cxx::helpers::Pool& pool);
+
+            /**
+             *   lock MMapFile
+             */
+            int lockMMapFile(int type);
+
+            /**
+             *   unlock MMapFile
+             */
+            int unLockMMapFile();
+
+            /**
+             *   create MMapFile/lockFile
+             */
+            const std::string createFile(const std::string& filename, const std::string& suffix, log4cxx::helpers::Pool& pool);
+#endif
+
+			/**
+			 * {@inheritDoc}
+ 			 */
+			RolloverDescriptionPtr initialize(
+				const	LogString&				currentActiveFile,
+				const	bool					append,
+						log4cxx::helpers::Pool&	pool);
+
+			/**
+			 * {@inheritDoc}
+ 			 */
+			RolloverDescriptionPtr rollover(
+				const	LogString&				currentActiveFile,
+				const	bool					append,
+						log4cxx::helpers::Pool&	pool);
 
 /**
  * Determines if a rollover may be appropriate at this time.  If
diff --git a/src/main/include/log4cxx/rolling/triggeringpolicy.h b/src/main/include/log4cxx/rolling/triggeringpolicy.h
old mode 100755
new mode 100644
diff --git a/src/main/include/log4cxx/spi/Makefile.am b/src/main/include/log4cxx/spi/Makefile.am
index 4e547ca..2c1336c 100644
--- a/src/main/include/log4cxx/spi/Makefile.am
+++ b/src/main/include/log4cxx/spi/Makefile.am
@@ -15,5 +15,17 @@
 #
 SUBDIRS = location
 spiincdir = $(includedir)/log4cxx/spi
-spiinc_HEADERS= $(top_srcdir)/src/main/include/log4cxx/spi/*.h
-
+spiinc_HEADERS= \
+    appenderattachable.h \
+    configurator.h \
+    defaultrepositoryselector.h \
+    errorhandler.h \
+    filter.h \
+    hierarchyeventlistener.h \
+    loggerfactory.h \
+    loggerrepository.h \
+    loggingevent.h \
+    optionhandler.h \
+    repositoryselector.h \
+    rootlogger.h \
+    triggeringeventevaluator.h
diff --git a/src/main/include/log4cxx/spi/errorhandler.h b/src/main/include/log4cxx/spi/errorhandler.h
index 54e8262..11faa90 100644
--- a/src/main/include/log4cxx/spi/errorhandler.h
+++ b/src/main/include/log4cxx/spi/errorhandler.h
@@ -65,6 +65,11 @@
                 {
                 public:
                         DECLARE_ABSTRACT_LOG4CXX_OBJECT(ErrorHandler)
+                         BEGIN_LOG4CXX_CAST_MAP()
+                                LOG4CXX_CAST_ENTRY(ErrorHandler)
+                                LOG4CXX_CAST_ENTRY(OptionHandler)
+                        END_LOG4CXX_CAST_MAP()
+
                         virtual ~ErrorHandler() {}
 
                                 /**
diff --git a/src/main/include/log4cxx/spi/location/Makefile.am b/src/main/include/log4cxx/spi/location/Makefile.am
index 6b780ae..f7da589 100644
--- a/src/main/include/log4cxx/spi/location/Makefile.am
+++ b/src/main/include/log4cxx/spi/location/Makefile.am
@@ -14,5 +14,5 @@
 # limitations under the License.
 #
 spiincdir = $(includedir)/log4cxx/spi/location
-spiinc_HEADERS= $(top_srcdir)/src/main/include/log4cxx/spi/location/*.h
-
+spiinc_HEADERS= \
+    locationinfo.h
diff --git a/src/main/include/log4cxx/spi/location/locationinfo.h b/src/main/include/log4cxx/spi/location/locationinfo.h
index 8f489ba..67b260f 100644
--- a/src/main/include/log4cxx/spi/location/locationinfo.h
+++ b/src/main/include/log4cxx/spi/location/locationinfo.h
@@ -115,22 +115,26 @@
   }
 }
 
-  #if !defined(LOG4CXX_LOCATION)
-#if defined(_MSC_VER)
-#if _MSC_VER >= 1300
+#if !defined(LOG4CXX_LOCATION)
+  #if defined(_MSC_VER)
+    #if _MSC_VER >= 1300
       #define __LOG4CXX_FUNC__ __FUNCSIG__
-#endif
-#else
-#if defined(__GNUC__)
+    #endif
+  #else
+    #if defined(__GNUC__)
       #define __LOG4CXX_FUNC__ __PRETTY_FUNCTION__
-#endif
-#endif
-#if !defined(__LOG4CXX_FUNC__)
-#define __LOG4CXX_FUNC__ ""
-#endif
-      #define LOG4CXX_LOCATION ::log4cxx::spi::LocationInfo(__FILE__, \
-           __LOG4CXX_FUNC__,                                                         \
-           __LINE__)
+    #else
+      #if defined(__BORLANDC__)
+        #define __LOG4CXX_FUNC__ __FUNC__
+      #endif
+    #endif
   #endif
+  #if !defined(__LOG4CXX_FUNC__)
+    #define __LOG4CXX_FUNC__ ""
+  #endif
+  #define LOG4CXX_LOCATION ::log4cxx::spi::LocationInfo(__FILE__,         \
+                                                        __LOG4CXX_FUNC__, \
+                                                        __LINE__)
+#endif
 
 #endif //_LOG4CXX_SPI_LOCATION_LOCATIONINFO_H
diff --git a/src/main/include/log4cxx/spi/loggingevent.h b/src/main/include/log4cxx/spi/loggingevent.h
index 74b4d0c..8f6dec0 100644
--- a/src/main/include/log4cxx/spi/loggingevent.h
+++ b/src/main/include/log4cxx/spi/loggingevent.h
@@ -43,6 +43,7 @@
 
         namespace spi
         {
+                LOG4CXX_LIST_DEF(KeySet, LogString);
 
                 /**
                 The internal representation of logging events. When an affirmative
@@ -61,6 +62,8 @@
                                 LOG4CXX_CAST_ENTRY(LoggingEvent)
                         END_LOG4CXX_CAST_MAP()
 
+                        typedef spi::KeySet KeySet;
+
                         /** For serialization only
                         */
                         LoggingEvent();
@@ -100,7 +103,7 @@
                                 { return message; }
 
                         /**Returns the time when the application started,
-                        in seconds elapsed since 01.01.1970.
+                        in microseconds elapsed since 01.01.1970.
                         */
                         static log4cxx_time_t getStartTime();
 
@@ -109,7 +112,8 @@
                              return threadName;
                         }
 
-                        /** Return the timeStamp of this event. */
+                        /** The number of microseconds elapsed from 01.01.1970 until logging event
+                         was created. */
                         inline log4cxx_time_t getTimeStamp() const
                                 { return timeStamp; }
 
@@ -152,7 +156,6 @@
                         */
                         bool getMDC(const LogString& key, LogString& dest) const;
 
-                        LOG4CXX_LIST_DEF(KeySet, LogString);
                         /**
                         * Returns the set of of the key values in the MDC for the event.
                         * The returned set is unmodifiable by the caller.
@@ -226,7 +229,7 @@
                         LogString message;
 
 
-                        /** The number of milliseconds elapsed from 1/1/1970 until logging event
+                        /** The number of microseconds elapsed from 01.01.1970 until logging event
                          was created. */
                         log4cxx_time_t timeStamp;
 
diff --git a/src/main/include/log4cxx/varia/Makefile.am b/src/main/include/log4cxx/varia/Makefile.am
index de87f54..85ff262 100644
--- a/src/main/include/log4cxx/varia/Makefile.am
+++ b/src/main/include/log4cxx/varia/Makefile.am
@@ -14,5 +14,5 @@
 # limitations under the License.
 #
 variaincdir = $(includedir)/log4cxx/varia
-variainc_HEADERS= $(top_srcdir)/src/main/include/log4cxx/varia/*.h
-
+variainc_HEADERS= \
+    fallbackerrorhandler.h
diff --git a/src/main/include/log4cxx/varia/fallbackerrorhandler.h b/src/main/include/log4cxx/varia/fallbackerrorhandler.h
index 63b6fc8..af031d2 100644
--- a/src/main/include/log4cxx/varia/fallbackerrorhandler.h
+++ b/src/main/include/log4cxx/varia/fallbackerrorhandler.h
@@ -49,8 +49,8 @@
                 public:
                         DECLARE_LOG4CXX_OBJECT(FallbackErrorHandler)
                         BEGIN_LOG4CXX_CAST_MAP()
-                                LOG4CXX_CAST_ENTRY(spi::OptionHandler)
-                                LOG4CXX_CAST_ENTRY(spi::ErrorHandler)
+                                LOG4CXX_CAST_ENTRY(FallbackErrorHandler)
+                                LOG4CXX_CAST_ENTRY_CHAIN(spi::ErrorHandler)
                         END_LOG4CXX_CAST_MAP()
 
                         FallbackErrorHandler();
@@ -109,6 +109,8 @@
                         */
                         void setBackupAppender(const AppenderPtr& backup);
                 };
+                LOG4CXX_PTR_DEF(FallbackErrorHandler);
+
         }  // namespace varia
 } // namespace log4cxx
 
diff --git a/src/main/include/log4cxx/writerappender.h b/src/main/include/log4cxx/writerappender.h
index 37db9b1..83db326 100644
--- a/src/main/include/log4cxx/writerappender.h
+++ b/src/main/include/log4cxx/writerappender.h
@@ -179,6 +179,9 @@
                   <p>
                   @param writer An already opened Writer.  */
                 void setWriter(const log4cxx::helpers::WriterPtr& writer);
+#ifdef LOG4CXX_MULTI_PROCESS
+                const log4cxx::helpers::WriterPtr getWriter() { return writer; };
+#endif
 
                 virtual bool requiresLayout() const;
 
diff --git a/src/main/include/log4cxx/xml/Makefile.am b/src/main/include/log4cxx/xml/Makefile.am
index b28bb8e..eeebb42 100644
--- a/src/main/include/log4cxx/xml/Makefile.am
+++ b/src/main/include/log4cxx/xml/Makefile.am
@@ -14,5 +14,6 @@
 # limitations under the License.
 #
 xmlincdir = $(includedir)/log4cxx/xml
-xmlinc_HEADERS= $(top_srcdir)/src/main/include/log4cxx/xml/*.h
-
+xmlinc_HEADERS= \
+    domconfigurator.h \
+    xmllayout.h
diff --git a/src/main/include/log4cxx/xml/domconfigurator.h b/src/main/include/log4cxx/xml/domconfigurator.h
index e997f52..e157a4e 100644
--- a/src/main/include/log4cxx/xml/domconfigurator.h
+++ b/src/main/include/log4cxx/xml/domconfigurator.h
@@ -49,6 +49,7 @@
 
         namespace xml
         {
+			class XMLWatchdog;
 
               /**
               Use this class to initialize the log4cxx environment using a DOM tree.
@@ -303,7 +304,7 @@
                         //   prevent assignment or copy statements
                         DOMConfigurator(const DOMConfigurator&);
                         DOMConfigurator& operator=(const DOMConfigurator&);
-
+						static XMLWatchdog *xdog;
                 };
             LOG4CXX_PTR_DEF(DOMConfigurator);
         }  // namespace xml
diff --git a/src/main/resources/log4cxx.rc b/src/main/resources/log4cxx.rc
old mode 100755
new mode 100644
index bd5f323..d61b19c
--- a/src/main/resources/log4cxx.rc
+++ b/src/main/resources/log4cxx.rc
@@ -14,7 +14,7 @@
 // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY

 // KIND, either express or implied.  See the License for the

 // specific language governing permissions and limitations

-// under the License. 

+// under the License.

 //

 //

 //   Message file include

@@ -50,18 +50,18 @@
 // TEXTINCLUDE

 //

 

-1 TEXTINCLUDE 

+1 TEXTINCLUDE

 BEGIN

     "resource.h\0"

 END

 

-2 TEXTINCLUDE 

+2 TEXTINCLUDE

 BEGIN

     "#include ""afxres.h""\r\n"

     "\0"

 END

 

-3 TEXTINCLUDE 

+3 TEXTINCLUDE

 BEGIN

     "\r\n"

     "\0"

@@ -76,8 +76,8 @@
 //

 

 VS_VERSION_INFO VERSIONINFO

- FILEVERSION  0, 10, 0, 1

- PRODUCTVERSION 0, 10, 0, 1

+ FILEVERSION 0, 0, 0, 0

+ PRODUCTVERSION 0, 0, 0, 0

  FILEFLAGSMASK 0x17L

 #ifdef _DEBUG

  FILEFLAGS 0x1L

@@ -94,12 +94,12 @@
         BEGIN

             VALUE "CompanyName", "Apache Software Foundation"

             VALUE "FileDescription", "Apache log4cxx"

-            VALUE "FileVersion", "0,10, 0, 1"

+            VALUE "FileVersion", "0, 0, 0, 0"

             VALUE "InternalName", "log4cxx"

             VALUE "LegalCopyright",  "Licensed to the Apache Software Foundation (ASF) under one or more\ncontributor license agreements.  See the NOTICE file distributed with\nthis work for additional information regarding copyright ownership.\nThe ASF licenses this file to You under the Apache License, Version 2.0\n(the ""License""); you may not use this file except in compliance with\nthe License.  You may obtain a copy of the License at\n\n     http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an ""AS IS"" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License."

             VALUE "OriginalFilename", "log4cxx.dll"

             VALUE "ProductName", "Apache log4cxx"

-            VALUE "ProductVersion", "0, 10, 0, 1" 

+            VALUE "ProductVersion", "0, 0, 0, 0"

         END

     END

     BLOCK "VarFileInfo"

diff --git a/src/site/apt/building/ant.apt b/src/site/apt/building/ant.apt
index 07c543d..ceb2838 100644
--- a/src/site/apt/building/ant.apt
+++ b/src/site/apt/building/ant.apt
@@ -18,10 +18,9 @@
  ------
  ------
 
-
 Building Apache log4cxx with Apache Ant
 
-   {{{http://ant.apache.org}Apache Ant}} with cpptasks from the 
+   {{{https://ant.apache.org}Apache Ant}} with cpptasks from the
    {{{http://ant-contrib.sourceforge.net}Ant-Contrib}} project can be used to build log4cxx
    with supported compilers and is also used to generate the IDE project files included
    in the releases.  The Apache Maven build which is used to generate the site documentation
@@ -29,29 +28,29 @@
    if source is available.
 
 * Quick start:
-  
-  *Install {{{http://ant.apache.org}Apache Ant}} 1.6.5 or later.
 
-  *Install cpptasks 1.0b5 or later from the {{{http://ant-contrib.sourceforge.net}Ant-Contrib Project}}.
+   * Install {{{https://ant.apache.org}Apache Ant}} 1.6.5 or later.
+
+   * Install cpptasks 1.0b5 or later from the {{{http://ant-contrib.sourceforge.net}Ant-Contrib Project}}.
      ant-contribs 1.0b3 or later is needed for some less frequent build targets.
 
-  *Install APR and APR-Util or place source in apr and apr-util directories as a 
-  sibling to the log4cxx directory.
-  
-  *Install gzip and zip (used for compression by RollingFileAppender) and 
-   sed (used to normalize output files for comparison in unit tests).
+   * Install APR and APR-Util or place source in apr and apr-util directories as a
+     sibling to the log4cxx directory.
 
-  * Install log4j 1.2.  Used in testing of SocketAppender. 
-        
-   Building and testing log4cxx on a Unix platform with packaged APR and APR-Util.  
+   * Install gzip and zip (used for compression by RollingFileAppender) and
+     sed (used to normalize output files for comparison in unit tests).
+
+   * Install log4j 1.2.  Used in testing of SocketAppender.
+
+   Building and testing log4cxx on a Unix platform with packaged APR and APR-Util.
 
 +----+
 $ export CLASSPATH=~/cpptasks/cpptasks-1.0b5.jar
-$ cd apache-log4cxx-0.10.0
+$ cd apache-log4cxx-x.x.x
 $ ant
-+----+  
++----+
 
-   Building and testing log4cxx on a Unix platform with APR and APR-Util built from source.  
+   Building and testing log4cxx on a Unix platform with APR and APR-Util built from source.
 
 +----+
 $ export CLASSPATH=~/cpptasks/cpptasks-1.0b5.jar
@@ -59,26 +58,23 @@
 $ mv apr-1.2.12 apr
 $ tar -xvzf apr-util-1.2.12.tar.gz
 $ mv apr-util-1.2.12 apr-util
-$ cd apache-log4cxx-0.10.0
+$ cd apache-log4cxx-x.x.x
 $ ant
-+----+  
++----+
 
-   Building and testing log4cxx on a Microsoft Windows with APR and APR-Util built from source.  
+   Building and testing log4cxx on a Microsoft Windows with APR and APR-Util built from source.
 
 +----+
-set PATH=\apache-ant-1.7.0\bin;%PATH%
-set CLASSPATH=\cpptasks\cpptasks-1.0b5.jar
-tar -xvzf apr-1.2.12.tar.gz
-rename apr-1.2.12 apr
-tar -xvzf apr-util-1.2.12.tar.gz
-rename apr-util-1.2.12 apr-util
-cd apache-log4cxx-0.10.0
-ant -Dfind=false
-+----+  
-
-
-
-
+$ "%VS120COMNTOOLS%\vsvars32.bat"

+$ set PATH=\apache-ant-1.7.0\bin;%PATH%
+$ set CLASSPATH=\cpptasks\cpptasks-1.0b5.jar
+$ tar -xvzf apr-1.2.12.tar.gz
+$ rename apr-1.2.12 apr
+$ tar -xvzf apr-util-1.2.12.tar.gz
+$ rename apr-util-1.2.12 apr-util
+$ cd apache-log4cxx-x.x.x
+$ ant -Dcompiler=xyz
++----+
 
 * Common ant targets
 
@@ -104,132 +100,130 @@
 | build-projects-xcode  | Build Apple Xcode project files.                                                            |
 *-----------------------+---------------------------------------------------------------------------------------------+
 
-   All build products will be placed in the target subdirectory.  
-   
+   All build products will be placed in the target subdirectory.
+
    Project files should be generated after successfully building the library, however it is possible
    to generate Microsoft Visual Studio project files on other platforms.  The project
    files will typically be missing references to the Platform SDK libraries.
    The Maven project modifies the generated project files for release preparation.  Generation
    of Xcode projects from Microsoft Windows is not supported.
 
-
 * ant options
 
-*-------------------+---------------------------------------------------------------------------------------------+
-| -Dcompiler        | Compiler, see cpptasks documentation for full list.                                         |
-*-------------------+---------------------------------------------------------------------------------------------+
-| -Ddebug           |  Build for debugging, yes (default), no.                                                    |
-*-------------------+---------------------------------------------------------------------------------------------+
-| -Dfind            |  Attempt to locate compiled APR and APR-Util, yes (default), no.                            |
-*-------------------+---------------------------------------------------------------------------------------------+
-| -Dwith-apr        | path to non-default location for APR.                                                       |
-*-------------------+---------------------------------------------------------------------------------------------+
-| -Dwith-apr-util   | path to non-default location for APR-Util.                                                  |
-*-------------------+---------------------------------------------------------------------------------------------+
-| -Denable-wchar_t  | Enable wchar_t API methods, choice of yes (default), no.                                    |
-*-------------------+---------------------------------------------------------------------------------------------+
-| -Denable-unichar  | Enable UniChar API methods, choice of yes, no (default).                                    |
-*-------------------+---------------------------------------------------------------------------------------------+
-| -Denable-cfstring | Enable CFString API methods, requires Mac OS/X CoreFoundation, choice of yes, no (default). |
-*-------------------+---------------------------------------------------------------------------------------------+
-| -Dwith-logchar    | Interal character representation, choice of utf-8 (default), wchar_t , unichar.             | 
-*-------------------+---------------------------------------------------------------------------------------------+
-| -Dwith-charset    | Exteral character encoding, choice of utf-8, iso-8859-1, usascii, ebcdic,  auto (default).  |
-*-------------------+---------------------------------------------------------------------------------------------+
-| -Dwith-SMTP       | SMTP implementation for SMTPAppender, choice of libesmtp, no (default).                     |
-*-------------------+---------------------------------------------------------------------------------------------+
-| -Dwith-ODBC       | OBDC implementation for ODBCAppender, choice of unixODBC, iODBC, Microsoft, no (default).   |
-*-------------------+---------------------------------------------------------------------------------------------+
-| -Dlog4j.jar       | Path to log4j.jar for run-socketserver.                                                     |
-*-------------------+---------------------------------------------------------------------------------------------+
-| -Dprojects.dir    | Location for generated IDE projects.                                                        |
-*-------------------+---------------------------------------------------------------------------------------------+
-| -Dlib.type        | Library type to create, choice of shared (default), static.                                 |

-*-------------------+---------------------------------------------------------------------------------------------+

-| -Druntime         | Type of C runtime library to use, choice of dynamic (default), static.                      |

-*-------------------+---------------------------------------------------------------------------------------------+

-| -Doptimization    | Optimization: none (default), size, minimal, speed, full, aggressive, extreme, unsafe.      |

-*-------------------+---------------------------------------------------------------------------------------------+

-| -p                | Display available targets and quit.                                                         |
-*-------------------+---------------------------------------------------------------------------------------------+
-
-   SMTP and ODBC options can depend on libraries that 
-   that have different licenses.
-   You should review the corresponding licenses and understand
-   the implications before redistribution.

+*-------------------+--------------------------------------------------------------------------------------------------------------------------+
+| -Dcompiler        | Compiler, see {{{http://ant-contrib.sourceforge.net/cpptasks/antdocs/CCTask.html}cpptasks documentation}} for full list. |
+*-------------------+--------------------------------------------------------------------------------------------------------------------------+
+| -Ddebug           | Build for debugging, yes (default), no.                                                                                  |
+*-------------------+--------------------------------------------------------------------------------------------------------------------------+
+| -Dfind            | Attempt to locate compiled APR and APR-Util, yes (default), no.                                                          |
+*-------------------+--------------------------------------------------------------------------------------------------------------------------+
+| -Dwith-apr        | path to non-default location for APR.                                                                                    |
+*-------------------+--------------------------------------------------------------------------------------------------------------------------+
+| -Dwith-apr-util   | path to non-default location for APR-Util.                                                                               |
+*-------------------+--------------------------------------------------------------------------------------------------------------------------+

+| -Denable-char     | Enable char API methods, choice of yes (default), no.                                                                    |

+*-------------------+--------------------------------------------------------------------------------------------------------------------------+
+| -Denable-wchar_t  | Enable wchar_t API methods, choice of yes (default), no.                                                                 |
+*-------------------+--------------------------------------------------------------------------------------------------------------------------+
+| -Denable-unichar  | Enable UniChar API methods, choice of yes, no (default).                                                                 |
+*-------------------+--------------------------------------------------------------------------------------------------------------------------+
+| -Denable-cfstring | Enable CFString API methods, requires Mac OS/X CoreFoundation, choice of yes, no (default).                              |
+*-------------------+--------------------------------------------------------------------------------------------------------------------------+
+| -Dwith-logchar    | Internal character representation, choice of utf-8 (default non-Windows), wchar_t (default Windows), unichar.            |
+*-------------------+--------------------------------------------------------------------------------------------------------------------------+
+| -Dwith-charset    | External character encoding, choice of utf-8, iso-8859-1, usascii, ebcdic, auto (default).                               |
+*-------------------+--------------------------------------------------------------------------------------------------------------------------+
+| -Dwith-SMTP       | SMTP implementation for SMTPAppender, choice of libesmtp, no (default).                                                  |
+*-------------------+--------------------------------------------------------------------------------------------------------------------------+
+| -Dwith-ODBC       | OBDC implementation for ODBCAppender, choice of auto (default), unixODBC, iODBC, Microsoft, no                           |
+*-------------------+--------------------------------------------------------------------------------------------------------------------------+
+| -Dlog4j.jar       | Path to log4j.jar for run-socketserver.                                                                                  |
+*-------------------+--------------------------------------------------------------------------------------------------------------------------+
+| -Dprojects.dir    | Location for generated IDE projects.                                                                                     |
+*-------------------+--------------------------------------------------------------------------------------------------------------------------+
+| -Dlib.type        | Library type to create, choice of shared (default), static.                                                              |

+*-------------------+--------------------------------------------------------------------------------------------------------------------------+

+| -Druntime         | Type of C runtime library to use, choice of dynamic (default), static.                                                   |

+*-------------------+--------------------------------------------------------------------------------------------------------------------------+

+| -Doptimize        | Optimization: none (default), speed, size.                                                                               |

+*-------------------+--------------------------------------------------------------------------------------------------------------------------+

+| -p                | Display available targets and quit.                                                                                      |
+*-------------------+--------------------------------------------------------------------------------------------------------------------------+
+

+   SMTP and ODBC options can depend on libraries that that have different licenses. You should
+   review the corresponding licenses and understand the implications before redistribution.

 

    Combining -Dlib.type=shared and -Druntime=static is unsafe.
-   
-   Properties may also be placed in a build.properties file in the log4cxx directory.
+
+   Properties may also be placed in a build.properties file in the log4cxx directory. The file has
+   to be in the default format for {{{https://en.wikipedia.org/wiki/.properties}Java properties files}},

+   especially one must not provide options using the syntax -Dxy=z like on the shell, but only as

+   xy=z per line.

 
 * Platform specific notes:
 
-  ** Microsoft Windows
+   ** Microsoft Windows
 
-  {{{http://gnuwin32.sourceforge.net}GnuWin32}}
-  provides binary versions of sed, gzip and zip.  Alternative,
-  the bin directory of {{{http://www.cygwin.com}Cygwin}} may be placed on the path.
+   {{{http://gnuwin32.sourceforge.net}GnuWin32}}
+   provides binary versions of sed, gzip and zip.  Alternative,
+   the bin directory of {{{https://www.cygwin.com}Cygwin}} may be placed on the path.
 
-  If -Dwith-SMTP=libesmtp is specified, the build will attempt to build
-  libesmtp from source, unfortunately libesmtp depends on poll.h and will not build.
-  
-  APR 1.2.12 has a known issue that will prevent
-  compilation with Visual Studio 6 unless a later Platform SDK is installed.
-  See APR bug {{{http://issues.apache.org/bugzilla/show_bug.cgi?44327}44327}}.
-  APR 1.2.11 and the corresponding APR-Util 1.2.10 will compile with Visual Studio 6.  
+   If -Dwith-SMTP=libesmtp is specified, the build will attempt to build
+   libesmtp from source, unfortunately libesmtp depends on poll.h and will not build.
 
-  
-  *** Cygwin:
-  
-  gcc 3.x does not provide wchar_t support which needs to be explicitly disabled.
-  The Win32 path to the APR libraries need to be provided (CYGWIN_HOME/lib) if compiling against an installed APR and APR-Util.
-  
+   APR 1.2.12 has a known issue that will prevent
+   compilation with Visual Studio 6 unless a later Platform SDK is installed.
+   See APR bug {{{https://issues.apache.org/bugzilla/show_bug.cgi?44327}44327}}.
+   APR 1.2.11 and the corresponding APR-Util 1.2.10 will compile with Visual Studio 6.
+

+   If your are using Visual Studio, vsvars32.bat from the directory ...\Common7\Tools needs to be

+   executed manually before a build. This script sets include paths etc., else you will get a lot

+   of errors about missing windows.h and such.

+
+   *** Cygwin:
+
+   gcc 3.x does not provide wchar_t support which needs to be explicitly disabled.
+   The Win32 path to the APR libraries need to be provided (CYGWIN_HOME/lib) if compiling against an installed APR and APR-Util.
+
 +-----+
-$ cd apache-log4cxx-0.10.0
-$ ant -Dos.family=cygwin \
-   -Dwith-apr=/cygwin/lib \
-   -Dwith-apr-util=/cygwin/lib \
-   -Denable-wchar_t=0
-+-----+  
-    
+$ cd apache-log4cxx-x.x.x
+$ ant -Dos.family=cygwin -Dwith-apr=/cygwin/lib -Dwith-apr-util=/cygwin/lib -Denable-wchar_t=0
++-----+
 
-  *** MinGW:
-
+   *** MinGW:
+

 +----+
-$ cd apache-log4cxx-0.10.0
+$ cd apache-log4cxx-x.x.x
 $ path c:\mingw\bin;%PATH%
 $ ant -Dcompiler=gcc -Dfind=false build-all
 $ cd src\test\resources
 $ set TOTO=wonderful
 $ set key1=value1
 $ set key2=value2
-$ ..\..\..\target\debug\shared\testsuite -v 
+$ ..\..\..\target\debug\shared\testsuite -v
 $ ..\..\..\target\debug\shared\trivial
-$ ..\..\..\target\debug\shared\stream 
+$ ..\..\..\target\debug\shared\stream
 +----+
 
    Running "ant check" was observed to fail with unexpected exceptions
    in streamtestcase and datetimedateformattestcase.
-   See {{{http://issues.apache.org/jira/browse/LOGCXX-244}LOGCXX-244}}.
+   See {{{https://issues.apache.org/jira/browse/LOGCXX-244}LOGCXX-244}}.
 
-  ** Debian:
-  
-  Apache APR, APR-Util, Ant and log4j and zip may be installed using:
+   ** Debian:
+
+   Apache APR, APR-Util, Ant and log4j and zip may be installed using:
 
 +----+
-$ sudo apt-get install libapr1.0-dev libaprutil1.0-dev \
-      ant ant-optional liblog4j1.2-java zip
+$ sudo apt-get install libapr1-dev libaprutil1-dev ant ant-optional liblog4j1.2-java zip
 +----+
 
+   ** Mac OS/X:
 
-  ** Mac OS/X:
-  
-  APR and APR-Util are provided by the platform in Mac OS/X 10.5 and iODBC in 10.4.
-  
-  Site generation requires "doxygen" command on path which can be provided
-  by installing Doxygen.app and then setting the path like:
-  
+   APR and APR-Util are provided by the platform in Mac OS/X 10.5 and iODBC in 10.4.
+
+   Site generation requires "doxygen" command on path which can be provided
+   by installing Doxygen.app and then setting the path like:
+
 +---+
 $ setenv PATH /Applications/Doxygen.app/Contents/Resources:$PATH
 +---+
-  
diff --git a/src/site/apt/building/autotools.apt b/src/site/apt/building/autotools.apt
index 7dd2373..b222bf4 100644
--- a/src/site/apt/building/autotools.apt
+++ b/src/site/apt/building/autotools.apt
@@ -22,16 +22,20 @@
 
 * Quick start:
 
-  Install or build apr 1.x, apr-util 1.x, gzip and zip.
+  Make sure autoconf 2.50+, libtool, g++ and make are available, install or
+  build apr 1.x, apr-util 1.x, gzip and zip.
 
 +------------+
-$ cd apache-log4cxx-0.10.0
+$ apt-get install build-essential automake libtool libapr1-dev libaprutil1-dev gzip zip
+$ cd apache-log4cxx-x.x.x
+$[./autogen.sh]
 $ ./configure
 $ make
 $ make check
 $ sudo make install
 +------------+
 
+  Those lines in brackets are only necessary if you directly build from source.
 
 * configure options
 
@@ -46,7 +50,7 @@
 *-------------------+---------------------------------------------------------------------------------------------+
 | --enable-cfstring | Enable CFString API methods, requires Mac OS/X CoreFoundation, choice of yes, no (default). |
 *-------------------+---------------------------------------------------------------------------------------------+
-| --with-logchar    | Interal character representation, choice of utf-8 (default), wchar_t , unichar.             | 
+| --with-logchar    | Interal character representation, choice of utf-8 (default), wchar_t , unichar.             |
 *-------------------+---------------------------------------------------------------------------------------------+
 | --with-charset    | Exteral character encoding, choice of utf-8, iso-8859-1, usascii, ebcdic,  auto (default).  |
 *-------------------+---------------------------------------------------------------------------------------------+
@@ -57,8 +61,7 @@
 | -help             | Display help showing all options and exit.                                                  |
 *-------------------+---------------------------------------------------------------------------------------------+
 
-        
-   SMTP and ODBC options can depend on libraries that 
+   SMTP and ODBC options can depend on libraries that
    that have different licenses.
    You should review the corresponding licenses and understand
    the implications before redistribution.
@@ -66,32 +69,35 @@
 * Platform specific notes:
 
 ** Mac OS/X:
-  
+
   APR and APR-Util are provided by the platform in Mac OS/X 10.5 and iODBC in 10.4.
 
 ** Debian:
 
-  APR, APR-Util and zip may be installed by:
+  APR, APR-Util, gzip and zip may be installed by:
 
 +----+
-$ sudo apt-get install libapr1.0-dev libaprutil1.0-dev zip
+$ sudo apt-get install libapr1-dev libaprutil1-dev gzip zip
 +----+
 
 ** FreeBSD:
 
-  APR, APR-Util and zip may be installed from the ports collection by:
+  APR, APR-Util, gzip and zip may be installed from the ports collection by:
 
 +----+
 # cd /usr/ports/archivers/zip
 # make
 # make install
+# cd /usr/ports/archivers/gzip
+# make
+# make install
 # cd /usr/ports/devel/apr
 # make
 # make install
 +----+
-  
+
 ** Cygwin:
-  
+
   Install zip (used by RollingFileAppender) and sed (used to normalize
   output files for comparison in the unit tests).  The prepackaged
   APR currently available from Cygwin has APR_HAS_THREADS == 0.
@@ -99,7 +105,6 @@
   with reduced functionality.  There have been reports of
   building APR on Cygwin with threads enabled.
 
-
 ** MinGW:
 
    Recent APR 1.2.x releases fail ./configure with a error
@@ -115,7 +120,7 @@
 $ svn co https://svn.apache.org/repos/asf/apr/apr/trunk apr
 $ cd apr
 $ ./buildconf.sh
-$ ./configure 
+$ ./configure
 $ make install
 $ cd ..
 $ svn co \
@@ -133,4 +138,4 @@
 
    Running "make check" was observed to fail with unexpected exceptions
    in streamtestcase and datetimedateformattestcase.
-   See {{{http://issues.apache.org/jira/browse/LOGCXX-244}LOGCXX-244}}.
+   See {{{https://issues.apache.org/jira/browse/LOGCXX-244}LOGCXX-244}}.
diff --git a/src/site/apt/building/maven.apt b/src/site/apt/building/maven.apt
index a40e313..a090497 100644
--- a/src/site/apt/building/maven.apt
+++ b/src/site/apt/building/maven.apt
@@ -18,49 +18,42 @@
  ------
  ------
 
-
 Building Apache log4cxx with Apache Maven 2
 
-   {{{http://maven.apache.org}Apache Maven 2}} is used to generate the release assemblies and generate
-   product documentation.  It delegates to the {{{ant.html}Apache Ant build}} to build
-   and test log4cxx and can be used as an alternate front end to the Ant 
+   {{{https://maven.apache.org}Apache Maven 2}} is used to generate the release assemblies and generate
+   product documentation.  It delegates to the {{{./ant.html}Apache Ant build}} to build
+   and test log4cxx and can be used as an alternate front end to the Ant
    build process since it can automatically download and use ant-contrib,
    cpptasks and log4j.
    The Maven build, like the Ant build, can build APR and APR-Util from source.
 
 * Quick start:
-  
-  *Install {{{http://maven.apache.org}Apache Maven}} 2.0.8 or later.
+
+  *Install {{{https://maven.apache.org}Apache Maven}} 2.0.8 or later.
 
   *Install APR and APR-Util or place source in apr and apr-util directories in same parent directory
       as log4cxx directory.
 
-        
-   Building and testing log4cxx on a Unix platform with packaged APR and APR-Util.  
+   Building and testing log4cxx on a Unix platform with packaged APR and APR-Util.
 
 +----+
- sudo apt-get install libapr1.0-dev libaprutil1.0-dev doxygen
- cd apache-log4cxx-0.10.0
- export PATH=/home/myself/maven-2.0.8/bin:$PATH
- mvn package
-+----+  
+$ sudo apt-get install libapr1-dev libaprutil1-dev doxygen
+$ cd apache-log4cxx-x.x.x
+$ export PATH=/home/myself/maven-2.0.8/bin:$PATH
+$ mvn package
++----+
 
-
-   Building and testing log4cxx on a Microsoft Windows with APR and APR-Util built from source.  
+   Building and testing log4cxx on a Microsoft Windows with APR and APR-Util built from source.
 
 +----+
- set PATH=\maven-2.0.8\bin;%PATH%
- tar -xvzf apr-1.2.12.tar.gz
- rename apr-1.2.12 apr
- tar -xvzf apr-util-1.2.12.tar.gz
- rename apr-util-1.2.12 apr-util
- cd apache-log4cxx-0.10.0
- mvn package
-+----+  
-
-
-
-
+$ set PATH=\maven-2.0.8\bin;%PATH%
+$ tar -xvzf apr-1.2.12.tar.gz
+$ rename apr-1.2.12 apr
+$ tar -xvzf apr-util-1.2.12.tar.gz
+$ rename apr-util-1.2.12 apr-util
+$ cd apache-log4cxx-x.x.x
+$ mvn package
++----+
 
 * Common Maven targets
 
@@ -69,7 +62,7 @@
 *--------------------------+---------------------------------------------------------------------------------------------+
 | package                  | build logcxx library and build and run unit tests and examples.                             |
 *--------------------------+---------------------------------------------------------------------------------------------+
-| site                     | Generate documentation and IDE project files, requires doxygen.                             |
+| site                     | Generate website and apidoc files, requires doxygen.                                        |
 *--------------------------+---------------------------------------------------------------------------------------------+
 | site assembly:assembly   | Generate snapshot tarball and zip file.                                                     |
 *--------------------------+---------------------------------------------------------------------------------------------+
@@ -78,18 +71,16 @@
 | clean                    | Delete all generated files.                                                                 |
 *--------------------------+---------------------------------------------------------------------------------------------+
 
-   All build products will be placed in the target subdirectory.  
+   All build products will be placed in the target subdirectory.
 
    It is not possible to directly pass options to the Ant build, however the ant build will read
-   any build.properties file in the log4cxx directory.
-        
-   SMTP and ODBC options can depend on libraries that 
-   that have different licenses.
-   You should review the corresponding licenses and understand
-   the implications before redistribution.
+   any build.properties file in the log4cxx directory. The file has to be in the default format
+   for {{{https://en.wikipedia.org/wiki/.properties}Java properties files}}, especially one must not
+   provide options using the syntax -Dxy=z like on the shell, but only as xy=z per line.
+
+   SMTP and ODBC options can depend on libraries that that have different licenses. You should
+   review the corresponding licenses and understand the implications before redistribution.
 
 * Platform specific notes:
 
-  See the {{{ant.html}Apache Ant build}} for platform specific notes.  
-  
-   
+  See the {{{./ant.html}Apache Ant build}} for platform specific notes.
diff --git a/src/site/apt/building/vstudio.apt b/src/site/apt/building/vstudio.apt
index 1577b11..8305838 100644
--- a/src/site/apt/building/vstudio.apt
+++ b/src/site/apt/building/vstudio.apt
@@ -27,22 +27,22 @@
 rename apr-1.2.11 apr
 unzip apr-util-1.2.10-win32-src.zip
 rename apr-util-1.2.10 apr-util
-cd apache-log4cxx-0.10.0
+cd apache-log4cxx-x.x.x
 configure
 configure-aprutil
 +----+
 
   configure.bat copies the prefabricated log4cxx.hw and private/log4cxx_private.hw over
   to log4cxx.h and private/log4cxx_private.h.
-  
+
   configure-aprutil.bat uses "sed" to modify apu.hw and apr_ldap.hw to disable APR-Iconv
   and LDAP which are not necessary for log4cxx and problematic to build.
   If "sed" is not available, the modifications would be trivial to do in any text editor.
-  
+
   Use the Win32 source zips for APR and APR-Util to preserve the required line endings
   for the project files.  Directories need to be renamed to "apr" and "apr-util" respectively.
 
-  
+
 
 *Building log4cxx.dll
 
@@ -50,18 +50,18 @@
    Visual Studio 6 or later at which time you may be prompted to
    upgrade the projects to the format used by your version
    of Microsoft Visual Studio.
-   
+
    Select log4cxx as active project and build.
-   
-   
+
+
 *Running unit tests
 
-   To pass the unit tests, gzip, zip and sed must be on the path.  
+   To pass the unit tests, gzip, zip and sed must be on the path.
    Also three
    environment variables need to be defined: TOTO=wonderful,
    key1=value1 and key2=value2.  These must be done outside
    of Microsoft Visual Studio, either in the Control Panel or
-   in a Command Prompt uses to launch Microsoft Visual Studio.
+   in a Command Prompt used to launch Microsoft Visual Studio.
 
    Open projects/testsuite.dsw or projects/testsuite-standalone.dsw
    (test suite and implementation in one project) in Microsoft Visual
@@ -77,10 +77,10 @@
 
   *APR 1.2.12 has a known issue that will prevent
   compilation with Visual Studio 6 unless a later Platform SDK is installed.
-  See APR bug {{{http://issues.apache.org/bugzilla/show_bug.cgi?44327}44327}}.
+  See APR bug {{{https://issues.apache.org/bugzilla/show_bug.cgi?44327}44327}}.
   APR 1.2.11 and the corresponding APR-Util 1.2.10 will compile with Visual Studio 6.
-  
+
   *APR-Util requires later LDAP headers than provided with Visual Studio 6
   and will fail to compile.  log4cxx does not use LDAP, it can be disabled in apr_ldap.hw.
-  
+
   *APR-Iconv is problematic and not used by log4cxx, it can be disabled in apu.hw.
diff --git a/src/site/apt/building/xcode.apt b/src/site/apt/building/xcode.apt
index a0a10d5..33a163a 100644
--- a/src/site/apt/building/xcode.apt
+++ b/src/site/apt/building/xcode.apt
@@ -24,42 +24,42 @@
 
    Run configure to generate log4cxx.h and log4cxx_private.h
    then launch Xcode.
-   
+
 +----+
-cd apache-log4cxx-0.10.0
+cd apache-log4cxx-x.x.x
 ./configure
 open projects/log4cxx.xcodeproj
-+----+   
++----+
 
 
 *Running unit tests
 
-   Run configure then open projects/testsuite.xcodeproj 
+   Run configure then open projects/testsuite.xcodeproj
    or projects/testsuite-standalone.xcodeproj
    (test suite and implementation in one project) in Xcode.
-   
+
    The unit tests require the working directory and several environment variables
-   to be set.  To set these, elect the executable in Groups & Files and press Info and:
-   
+   to be set. To set these, select the executable in Groups & Files, press Info and:
+
    * In the General pane, set Working Directory to Custom with path "../src/test/resources".
 
    * In the Arguments pane, add following key value pairs to "Variables to be set in the environment":
      TOTO=wonderful, key1=value1 and key2=value2.
-   
+
    * In the Arguments pane, add "-v" for verbose output, or individual test names in "Arguments to be passed on launch".
 
 *Issues
-    
-   The project file generation does does not 
+
+   The project file generation does does not
    properly create an entry in the "Link Binary with Libraries"
-   build phase for projects (such as the examples and unit tests) that depend 
+   build phase for projects (such as the examples and unit tests) that depend
    on log4cxx.  To work around the problem, open the project in Xcode and
    in the Groups & Files pane, drag log4cxx.dylib
    and drop on the "Link Binary with Libraries" folder
    under Targets.
 
-   See issue {{{http://issues.apache.org/jira/browse/LOGCXX-245}LOGCXX-245}} for further information.
-   
-   The projects provided in the release target Mac OS/X 10.5 which provides 
-   preinstalled APR and APR-Util libraries.  To generate XCode projects to target Mac OS/X 10.4, 
+   See issue {{{https://issues.apache.org/jira/browse/LOGCXX-245}LOGCXX-245}} for further information.
+
+   The projects provided in the release target Mac OS/X 10.5 which provides
+   preinstalled APR and APR-Util libraries.  To generate XCode projects to target Mac OS/X 10.4,
    set up the ant build and then "ant build-projects-xcode -Dfind=false".
diff --git a/src/site/apt/community/issue-tracking.apt b/src/site/apt/community/issue-tracking.apt
new file mode 100644
index 0000000..745923b
--- /dev/null
+++ b/src/site/apt/community/issue-tracking.apt
@@ -0,0 +1,48 @@
+~~ Licensed to the Apache Software Foundation (ASF) under one or more

+~~ contributor license agreements.  See the NOTICE file distributed with

+~~ this work for additional information regarding copyright ownership.

+~~ The ASF licenses this file to You under the Apache License, Version 2.0

+~~ (the "License"); you may not use this file except in compliance with

+~~ the License.  You may obtain a copy of the License at

+~~

+~~      http://www.apache.org/licenses/LICENSE-2.0

+~~

+~~ Unless required by applicable law or agreed to in writing, software

+~~ distributed under the License is distributed on an "AS IS" BASIS,

+~~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+~~ See the License for the specific language governing permissions and

+~~ limitations under the License.

+ ------

+Issue Tracking

+ ------

+ ------

+ ------

+

+Overview

+

+	This project uses {{{https://www.atlassian.com/software/jira}JIRA}}, a J2EE-based issue tracking

+	and project management application.

+

+Issue Tracking

+

+	<<Bugs>> and <<feature requests>> should be submitted to the following issue tracking system

+	for this project.

+

+	{{{https://issues.apache.org/jira/browse/LOGCXX}https://issues.apache.org/jira/browse/LOGCXX}}

+

+	<<Please don't just open bugs only because things don't work for you>>, some issues simply

+	don't are bugs in the code base of the project or it's build tools, but may have a lot of

+	different other reasons. If things don't work for you and you need some help, please subscribe

+	to the {{{https://logging.apache.org/log4cxx/mail-lists.html}users mailing list}} and describe

+	the issue you have, the more detailed the better. The mailing list is a far better place to

+	discuss things than JIRA, besides that there are more users than developers of the project and

+	issues created in JIRA are only forwarded to the latter. There's always the chance to create an

+	issue in JIRA later, hopefully with a specific explanation of the problem and even a solution

+	already.

+

+	As a rule of thumb, if you already digged through the code and found a problem in it or its

+	build tools, feel free to directly create a bug in {{{https://issues.apache.org/jira/browse/LOGCXX}JIRA}}.

+	But if things really only don't work and you don't have any clue why, please use the {{{https://logging.apache.org/log4cxx/mail-lists.html}users mailing listt}}

+	instead.

+

+	Thanks!
\ No newline at end of file
diff --git a/src/site/apt/download.apt b/src/site/apt/download.apt
deleted file mode 100644
index f56c556..0000000
--- a/src/site/apt/download.apt
+++ /dev/null
@@ -1,44 +0,0 @@
-~~ Licensed to the Apache Software Foundation (ASF) under one or more
-~~ contributor license agreements.  See the NOTICE file distributed with
-~~ this work for additional information regarding copyright ownership.
-~~ The ASF licenses this file to You under the Apache License, Version 2.0
-~~ (the "License"); you may not use this file except in compliance with
-~~ the License.  You may obtain a copy of the License at
-~~
-~~      http://www.apache.org/licenses/LICENSE-2.0
-~~
-~~ Unless required by applicable law or agreed to in writing, software
-~~ distributed under the License is distributed on an "AS IS" BASIS,
-~~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-~~ See the License for the specific language governing permissions and
-~~ limitations under the License.
- ------
-Download Apache log4cxx 0.10.0
- ------
- ------
- ------
-
-Download Apache log4cxx 0.10.0
-
-  Apache log4cxx 0.10.0 is distributed under the {{{http://www.apache.org/licenses/LICENSE-2.0.html} Apache License, version 2.0}}.
-
-  The link in the Mirrors column should display a list of available mirrors with a
-  default selection based on your inferred location.  If you do not see that page,
-  try a different browser.  The checksum and signature are links to
-  the originals on the main distribution server.
-  
-*-------------------------+---------+----------+-----------+
-|                         | Mirrors | Checksum | Signature |
-*-------------------------+---------+----------+-----------+
-| Apache log4cxx 0.10.0 (tar.gz)      | {{{http://www.apache.org/dyn/closer.cgi/logging/log4cxx/0.10.0/apache-log4cxx-0.10.0.tar.gz} apache-log4cxx-0.10.0.tar.gz}} | {{{http://www.apache.org/dist/logging/log4cxx/0.10.0/apache-log4cxx-0.10.0.tar.gz.md5} apache-log4cxx-0.10.0.tar.gz.md5}} | {{{http://www.apache.org/dist/logging/log4cxx/0.10.0/apache-log4cxx-0.10.0.tar.gz.asc} apache-log4cxx-0.10.0.tar.gz.asc}} |
-*-------------------------+---------+----------+-----------+
-| Apache log4cxx 0.10.0 (zip)      | {{{http://www.apache.org/dyn/closer.cgi/logging/log4cxx/0.10.0/apache-log4cxx-0.10.0.zip} apache-log4cxx-0.10.0.zip}} | {{{http://www.apache.org/dist/logging/log4cxx/0.10.0/apache-log4cxx-0.10.0.zip.md5} apache-log4cxx-0.10.0.zip.md5}} | {{{http://www.apache.org/dist/logging/log4cxx/0.10.0/apache-log4cxx-0.10.0.zip.asc} apache-log4cxx-0.10.0.zip.asc}} |
-*-------------------------+---------+----------+-----------+
-
-  Please read {{{http://httpd.apache.org/dev/verification.html}Verifying Apache HTTP Server Releases}}
-   for more information on why you should verify our releases.
-
-
-* Previous Releases
-
-  All previous releases of Apache log4cxx can be found in the {{{http://archive.apache.org/dist/logging/log4cxx}archive repository}}.
diff --git a/src/site/apt/download.apt.vm b/src/site/apt/download.apt.vm
new file mode 100644
index 0000000..891c334
--- /dev/null
+++ b/src/site/apt/download.apt.vm
@@ -0,0 +1,58 @@
+~~ Licensed to the Apache Software Foundation (ASF) under one or more
+~~ contributor license agreements.  See the NOTICE file distributed with
+~~ this work for additional information regarding copyright ownership.
+~~ The ASF licenses this file to You under the Apache License, Version 2.0
+~~ (the "License"); you may not use this file except in compliance with
+~~ the License.  You may obtain a copy of the License at
+~~
+~~      http://www.apache.org/licenses/LICENSE-2.0
+~~
+~~ Unless required by applicable law or agreed to in writing, software
+~~ distributed under the License is distributed on an "AS IS" BASIS,
+~~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+~~ See the License for the specific language governing permissions and
+~~ limitations under the License.
+ ------
+Download Apache log4cxx ${releaseVersion}
+ ------
+ ------
+ ------
+
+Download Apache log4cxx ${releaseVersion}
+
+  Apache log4cxx ${releaseVersion} is distributed under the {{{https://www.apache.org/licenses/LICENSE-2.0.html} Apache License, version 2.0}}.
+
+  The link in the Mirrors column should display a list of available mirrors with a
+  default selection based on your inferred location.  If you do not see that page,
+  try a different browser.  The checksum and signature are links to
+  the originals on the main distribution server.
+
+*-------------------------+---------+----------+-----------+
+|                         | Mirrors | Checksum | Signature |
+*-------------------------+---------+----------+-----------+
+| Apache log4cxx ${releaseVersion} (tar.gz)      | {{{https://www.apache.org/dyn/closer.cgi/logging/log4cxx/${releaseVersion}/${releaseArtifactId}-${releaseVersion}.tar.gz} ${releaseArtifactId}-${releaseVersion}.tar.gz}} | {{{https://www.apache.org/dist/logging/log4cxx/${releaseVersion}/${releaseArtifactId}-${releaseVersion}.tar.gz.md5} ${releaseArtifactId}-${releaseVersion}.tar.gz.md5}} | {{{https://www.apache.org/dist/logging/log4cxx/${releaseVersion}/${releaseArtifactId}-${releaseVersion}.tar.gz.asc} ${releaseArtifactId}-${releaseVersion}.tar.gz.asc}} |
+*-------------------------+---------+----------+-----------+
+| Apache log4cxx ${releaseVersion} (zip)      | {{{https://www.apache.org/dyn/closer.cgi/logging/log4cxx/${releaseVersion}/${releaseArtifactId}-${releaseVersion}.zip} ${releaseArtifactId}-${releaseVersion}.zip}} | {{{https://www.apache.org/dist/logging/log4cxx/${releaseVersion}/${releaseArtifactId}-${releaseVersion}.zip.md5} ${releaseArtifactId}-${releaseVersion}.zip.md5}} | {{{https://www.apache.org/dist/logging/log4cxx/${releaseVersion}/${releaseArtifactId}-${releaseVersion}.zip.asc} ${releaseArtifactId}-${releaseVersion}.zip.asc}} |
+*-------------------------+---------+----------+-----------+
+
+    It is essential that you verify the integrity of the downloaded files using the PGP or MD5 signatures.
+    Please read {{{https://httpd.apache.org/dev/verification.html}Verifying Apache HTTP Server Releases}} for more
+    information on why you should verify our releases.
+
+    The PGP signatures can be verified using PGP or GPG. First download the {{{https://www.apache.org/dist/logging/KEYS}KEYS}}
+    as well as the asc signature file for the relevant distribution. Make sure you get these files from the
+    {{{https://www.apache.org/dist/logging/}main distribution directory}}, rather than from a mirror. Then verify the signatures using:
+
+---
+% gpg --import KEYS
+% gpg --verify ${releaseArtifactId}-${releaseVersion}.tar.gz.asc ${releaseArtifactId}-${releaseVersion}.tar.gz
+---
+
+        * ${releaseArtifactId}-${releaseVersion} is signed by ${releaseManager} (${releaseKey})
+
+    Alternatively, you can verify the MD5 signature on the files. A unix program called md5 or md5sum is included
+    in many unix distributions.
+
+* Previous Releases
+
+  All previous releases of Apache log4cxx can be found in the {{{https://archive.apache.org/dist/logging/log4cxx}archive repository}}.
diff --git a/src/site/apt/index.apt b/src/site/apt/index.apt
new file mode 100644
index 0000000..4eb49dd
--- /dev/null
+++ b/src/site/apt/index.apt
@@ -0,0 +1,45 @@
+~~ Licensed to the Apache Software Foundation (ASF) under one or more
+~~ contributor license agreements.  See the NOTICE file distributed with
+~~ this work for additional information regarding copyright ownership.
+~~ The ASF licenses this file to You under the Apache License, Version 2.0
+~~ (the "License"); you may not use this file except in compliance with
+~~ the License.  You may obtain a copy of the License at
+~~
+~~      http://www.apache.org/licenses/LICENSE-2.0
+~~
+~~ Unless required by applicable law or agreed to in writing, software
+~~ distributed under the License is distributed on an "AS IS" BASIS,
+~~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+~~ See the License for the specific language governing permissions and
+~~ limitations under the License.
+ ------
+Short introduction to Apache log4cxx
+ ------
+ ------
+ ------
+
+Short introduction to Apache log4cxx
+
+	Apache log4cxx is a logging framework for C++ patterned after
+	{{{https://logging.apache.org/log4j}Apache log4j}}, which uses
+	{{{https://apr.apache.org}Apache Portable Runtime}} for most platform-specific code and should
+	be usable on any platform supported by APR. Apache log4cxx is licensed under the
+	{{{https://www.apache.org/licenses}Apache License}}, an open source license certified by the
+	{{{https://www.opensource.org}Open Source Initiative}}.
+
+	Almost every large application includes its own logging or tracing API. Inserting log
+	statements into code is a low-tech method for debugging it. It may also be the only way because
+	debuggers are not always available or applicable. This is usually the case for multithreaded
+	applications and distributed applications at large.
+
+	Experience indicates that logging is an important component of the development cycle. It offers
+	several advantages. It provides precise context about a run of the application. Once inserted
+	into the code, the generation of logging output requires no human intervention. Moreover, log
+	output can be saved in persistent medium to be studied at a later time. In addition to its use
+	in the development cycle, a sufficiently rich logging package can also be viewed as an auditing
+	tool.
+
+	Logging does have its drawbacks. It can slow down an application. If too verbose, it can cause
+	scrolling blindness. To alleviate these concerns, log4cxx is designed to be reliable, fast and
+	extensible. Since logging is rarely the main focus of an application, the log4cxx API strives
+	to be simple to understand and to use.
diff --git a/src/site/doxy/DTDs/xhtml-lat1.ent b/src/site/doxy/DTDs/xhtml-lat1.ent
new file mode 100644
index 0000000..ffee223
--- /dev/null
+++ b/src/site/doxy/DTDs/xhtml-lat1.ent
@@ -0,0 +1,196 @@
+<!-- Portions (C) International Organization for Standardization 1986
+     Permission to copy in any form is granted for use with
+     conforming SGML systems and applications as defined in
+     ISO 8879, provided this notice is included in all copies.
+-->
+<!-- Character entity set. Typical invocation:
+    <!ENTITY % HTMLlat1 PUBLIC
+       "-//W3C//ENTITIES Latin 1 for XHTML//EN"
+       "http://www.w3.org/TR/xhtml1/DTD/xhtml-lat1.ent">
+    %HTMLlat1;
+-->
+
+<!ENTITY nbsp   "&#160;"> <!-- no-break space = non-breaking space,
+                                  U+00A0 ISOnum -->
+<!ENTITY iexcl  "&#161;"> <!-- inverted exclamation mark, U+00A1 ISOnum -->
+<!ENTITY cent   "&#162;"> <!-- cent sign, U+00A2 ISOnum -->
+<!ENTITY pound  "&#163;"> <!-- pound sign, U+00A3 ISOnum -->
+<!ENTITY curren "&#164;"> <!-- currency sign, U+00A4 ISOnum -->
+<!ENTITY yen    "&#165;"> <!-- yen sign = yuan sign, U+00A5 ISOnum -->
+<!ENTITY brvbar "&#166;"> <!-- broken bar = broken vertical bar,
+                                  U+00A6 ISOnum -->
+<!ENTITY sect   "&#167;"> <!-- section sign, U+00A7 ISOnum -->
+<!ENTITY uml    "&#168;"> <!-- diaeresis = spacing diaeresis,
+                                  U+00A8 ISOdia -->
+<!ENTITY copy   "&#169;"> <!-- copyright sign, U+00A9 ISOnum -->
+<!ENTITY ordf   "&#170;"> <!-- feminine ordinal indicator, U+00AA ISOnum -->
+<!ENTITY laquo  "&#171;"> <!-- left-pointing double angle quotation mark
+                                  = left pointing guillemet, U+00AB ISOnum -->
+<!ENTITY not    "&#172;"> <!-- not sign = angled dash,
+                                  U+00AC ISOnum -->
+<!ENTITY shy    "&#173;"> <!-- soft hyphen = discretionary hyphen,
+                                  U+00AD ISOnum -->
+<!ENTITY reg    "&#174;"> <!-- registered sign = registered trade mark sign,
+                                  U+00AE ISOnum -->
+<!ENTITY macr   "&#175;"> <!-- macron = spacing macron = overline
+                                  = APL overbar, U+00AF ISOdia -->
+<!ENTITY deg    "&#176;"> <!-- degree sign, U+00B0 ISOnum -->
+<!ENTITY plusmn "&#177;"> <!-- plus-minus sign = plus-or-minus sign,
+                                  U+00B1 ISOnum -->
+<!ENTITY sup2   "&#178;"> <!-- superscript two = superscript digit two
+                                  = squared, U+00B2 ISOnum -->
+<!ENTITY sup3   "&#179;"> <!-- superscript three = superscript digit three
+                                  = cubed, U+00B3 ISOnum -->
+<!ENTITY acute  "&#180;"> <!-- acute accent = spacing acute,
+                                  U+00B4 ISOdia -->
+<!ENTITY micro  "&#181;"> <!-- micro sign, U+00B5 ISOnum -->
+<!ENTITY para   "&#182;"> <!-- pilcrow sign = paragraph sign,
+                                  U+00B6 ISOnum -->
+<!ENTITY middot "&#183;"> <!-- middle dot = Georgian comma
+                                  = Greek middle dot, U+00B7 ISOnum -->
+<!ENTITY cedil  "&#184;"> <!-- cedilla = spacing cedilla, U+00B8 ISOdia -->
+<!ENTITY sup1   "&#185;"> <!-- superscript one = superscript digit one,
+                                  U+00B9 ISOnum -->
+<!ENTITY ordm   "&#186;"> <!-- masculine ordinal indicator,
+                                  U+00BA ISOnum -->
+<!ENTITY raquo  "&#187;"> <!-- right-pointing double angle quotation mark
+                                  = right pointing guillemet, U+00BB ISOnum -->
+<!ENTITY frac14 "&#188;"> <!-- vulgar fraction one quarter
+                                  = fraction one quarter, U+00BC ISOnum -->
+<!ENTITY frac12 "&#189;"> <!-- vulgar fraction one half
+                                  = fraction one half, U+00BD ISOnum -->
+<!ENTITY frac34 "&#190;"> <!-- vulgar fraction three quarters
+                                  = fraction three quarters, U+00BE ISOnum -->
+<!ENTITY iquest "&#191;"> <!-- inverted question mark
+                                  = turned question mark, U+00BF ISOnum -->
+<!ENTITY Agrave "&#192;"> <!-- latin capital letter A with grave
+                                  = latin capital letter A grave,
+                                  U+00C0 ISOlat1 -->
+<!ENTITY Aacute "&#193;"> <!-- latin capital letter A with acute,
+                                  U+00C1 ISOlat1 -->
+<!ENTITY Acirc  "&#194;"> <!-- latin capital letter A with circumflex,
+                                  U+00C2 ISOlat1 -->
+<!ENTITY Atilde "&#195;"> <!-- latin capital letter A with tilde,
+                                  U+00C3 ISOlat1 -->
+<!ENTITY Auml   "&#196;"> <!-- latin capital letter A with diaeresis,
+                                  U+00C4 ISOlat1 -->
+<!ENTITY Aring  "&#197;"> <!-- latin capital letter A with ring above
+                                  = latin capital letter A ring,
+                                  U+00C5 ISOlat1 -->
+<!ENTITY AElig  "&#198;"> <!-- latin capital letter AE
+                                  = latin capital ligature AE,
+                                  U+00C6 ISOlat1 -->
+<!ENTITY Ccedil "&#199;"> <!-- latin capital letter C with cedilla,
+                                  U+00C7 ISOlat1 -->
+<!ENTITY Egrave "&#200;"> <!-- latin capital letter E with grave,
+                                  U+00C8 ISOlat1 -->
+<!ENTITY Eacute "&#201;"> <!-- latin capital letter E with acute,
+                                  U+00C9 ISOlat1 -->
+<!ENTITY Ecirc  "&#202;"> <!-- latin capital letter E with circumflex,
+                                  U+00CA ISOlat1 -->
+<!ENTITY Euml   "&#203;"> <!-- latin capital letter E with diaeresis,
+                                  U+00CB ISOlat1 -->
+<!ENTITY Igrave "&#204;"> <!-- latin capital letter I with grave,
+                                  U+00CC ISOlat1 -->
+<!ENTITY Iacute "&#205;"> <!-- latin capital letter I with acute,
+                                  U+00CD ISOlat1 -->
+<!ENTITY Icirc  "&#206;"> <!-- latin capital letter I with circumflex,
+                                  U+00CE ISOlat1 -->
+<!ENTITY Iuml   "&#207;"> <!-- latin capital letter I with diaeresis,
+                                  U+00CF ISOlat1 -->
+<!ENTITY ETH    "&#208;"> <!-- latin capital letter ETH, U+00D0 ISOlat1 -->
+<!ENTITY Ntilde "&#209;"> <!-- latin capital letter N with tilde,
+                                  U+00D1 ISOlat1 -->
+<!ENTITY Ograve "&#210;"> <!-- latin capital letter O with grave,
+                                  U+00D2 ISOlat1 -->
+<!ENTITY Oacute "&#211;"> <!-- latin capital letter O with acute,
+                                  U+00D3 ISOlat1 -->
+<!ENTITY Ocirc  "&#212;"> <!-- latin capital letter O with circumflex,
+                                  U+00D4 ISOlat1 -->
+<!ENTITY Otilde "&#213;"> <!-- latin capital letter O with tilde,
+                                  U+00D5 ISOlat1 -->
+<!ENTITY Ouml   "&#214;"> <!-- latin capital letter O with diaeresis,
+                                  U+00D6 ISOlat1 -->
+<!ENTITY times  "&#215;"> <!-- multiplication sign, U+00D7 ISOnum -->
+<!ENTITY Oslash "&#216;"> <!-- latin capital letter O with stroke
+                                  = latin capital letter O slash,
+                                  U+00D8 ISOlat1 -->
+<!ENTITY Ugrave "&#217;"> <!-- latin capital letter U with grave,
+                                  U+00D9 ISOlat1 -->
+<!ENTITY Uacute "&#218;"> <!-- latin capital letter U with acute,
+                                  U+00DA ISOlat1 -->
+<!ENTITY Ucirc  "&#219;"> <!-- latin capital letter U with circumflex,
+                                  U+00DB ISOlat1 -->
+<!ENTITY Uuml   "&#220;"> <!-- latin capital letter U with diaeresis,
+                                  U+00DC ISOlat1 -->
+<!ENTITY Yacute "&#221;"> <!-- latin capital letter Y with acute,
+                                  U+00DD ISOlat1 -->
+<!ENTITY THORN  "&#222;"> <!-- latin capital letter THORN,
+                                  U+00DE ISOlat1 -->
+<!ENTITY szlig  "&#223;"> <!-- latin small letter sharp s = ess-zed,
+                                  U+00DF ISOlat1 -->
+<!ENTITY agrave "&#224;"> <!-- latin small letter a with grave
+                                  = latin small letter a grave,
+                                  U+00E0 ISOlat1 -->
+<!ENTITY aacute "&#225;"> <!-- latin small letter a with acute,
+                                  U+00E1 ISOlat1 -->
+<!ENTITY acirc  "&#226;"> <!-- latin small letter a with circumflex,
+                                  U+00E2 ISOlat1 -->
+<!ENTITY atilde "&#227;"> <!-- latin small letter a with tilde,
+                                  U+00E3 ISOlat1 -->
+<!ENTITY auml   "&#228;"> <!-- latin small letter a with diaeresis,
+                                  U+00E4 ISOlat1 -->
+<!ENTITY aring  "&#229;"> <!-- latin small letter a with ring above
+                                  = latin small letter a ring,
+                                  U+00E5 ISOlat1 -->
+<!ENTITY aelig  "&#230;"> <!-- latin small letter ae
+                                  = latin small ligature ae, U+00E6 ISOlat1 -->
+<!ENTITY ccedil "&#231;"> <!-- latin small letter c with cedilla,
+                                  U+00E7 ISOlat1 -->
+<!ENTITY egrave "&#232;"> <!-- latin small letter e with grave,
+                                  U+00E8 ISOlat1 -->
+<!ENTITY eacute "&#233;"> <!-- latin small letter e with acute,
+                                  U+00E9 ISOlat1 -->
+<!ENTITY ecirc  "&#234;"> <!-- latin small letter e with circumflex,
+                                  U+00EA ISOlat1 -->
+<!ENTITY euml   "&#235;"> <!-- latin small letter e with diaeresis,
+                                  U+00EB ISOlat1 -->
+<!ENTITY igrave "&#236;"> <!-- latin small letter i with grave,
+                                  U+00EC ISOlat1 -->
+<!ENTITY iacute "&#237;"> <!-- latin small letter i with acute,
+                                  U+00ED ISOlat1 -->
+<!ENTITY icirc  "&#238;"> <!-- latin small letter i with circumflex,
+                                  U+00EE ISOlat1 -->
+<!ENTITY iuml   "&#239;"> <!-- latin small letter i with diaeresis,
+                                  U+00EF ISOlat1 -->
+<!ENTITY eth    "&#240;"> <!-- latin small letter eth, U+00F0 ISOlat1 -->
+<!ENTITY ntilde "&#241;"> <!-- latin small letter n with tilde,
+                                  U+00F1 ISOlat1 -->
+<!ENTITY ograve "&#242;"> <!-- latin small letter o with grave,
+                                  U+00F2 ISOlat1 -->
+<!ENTITY oacute "&#243;"> <!-- latin small letter o with acute,
+                                  U+00F3 ISOlat1 -->
+<!ENTITY ocirc  "&#244;"> <!-- latin small letter o with circumflex,
+                                  U+00F4 ISOlat1 -->
+<!ENTITY otilde "&#245;"> <!-- latin small letter o with tilde,
+                                  U+00F5 ISOlat1 -->
+<!ENTITY ouml   "&#246;"> <!-- latin small letter o with diaeresis,
+                                  U+00F6 ISOlat1 -->
+<!ENTITY divide "&#247;"> <!-- division sign, U+00F7 ISOnum -->
+<!ENTITY oslash "&#248;"> <!-- latin small letter o with stroke,
+                                  = latin small letter o slash,
+                                  U+00F8 ISOlat1 -->
+<!ENTITY ugrave "&#249;"> <!-- latin small letter u with grave,
+                                  U+00F9 ISOlat1 -->
+<!ENTITY uacute "&#250;"> <!-- latin small letter u with acute,
+                                  U+00FA ISOlat1 -->
+<!ENTITY ucirc  "&#251;"> <!-- latin small letter u with circumflex,
+                                  U+00FB ISOlat1 -->
+<!ENTITY uuml   "&#252;"> <!-- latin small letter u with diaeresis,
+                                  U+00FC ISOlat1 -->
+<!ENTITY yacute "&#253;"> <!-- latin small letter y with acute,
+                                  U+00FD ISOlat1 -->
+<!ENTITY thorn  "&#254;"> <!-- latin small letter thorn,
+                                  U+00FE ISOlat1 -->
+<!ENTITY yuml   "&#255;"> <!-- latin small letter y with diaeresis,
+                                  U+00FF ISOlat1 -->
diff --git a/src/site/doxy/DTDs/xhtml-special.ent b/src/site/doxy/DTDs/xhtml-special.ent
new file mode 100644
index 0000000..ca358b2
--- /dev/null
+++ b/src/site/doxy/DTDs/xhtml-special.ent
@@ -0,0 +1,80 @@
+<!-- Special characters for XHTML -->
+
+<!-- Character entity set. Typical invocation:
+     <!ENTITY % HTMLspecial PUBLIC
+        "-//W3C//ENTITIES Special for XHTML//EN"
+        "http://www.w3.org/TR/xhtml1/DTD/xhtml-special.ent">
+     %HTMLspecial;
+-->
+
+<!-- Portions (C) International Organization for Standardization 1986:
+     Permission to copy in any form is granted for use with
+     conforming SGML systems and applications as defined in
+     ISO 8879, provided this notice is included in all copies.
+-->
+
+<!-- Relevant ISO entity set is given unless names are newly introduced.
+     New names (i.e., not in ISO 8879 list) do not clash with any
+     existing ISO 8879 entity names. ISO 10646 character numbers
+     are given for each character, in hex. values are decimal
+     conversions of the ISO 10646 values and refer to the document
+     character set. Names are Unicode names. 
+-->
+
+<!-- C0 Controls and Basic Latin -->
+<!ENTITY quot    "&#34;"> <!--  quotation mark, U+0022 ISOnum -->
+<!ENTITY amp     "&#38;#38;"> <!--  ampersand, U+0026 ISOnum -->
+<!ENTITY lt      "&#38;#60;"> <!--  less-than sign, U+003C ISOnum -->
+<!ENTITY gt      "&#62;"> <!--  greater-than sign, U+003E ISOnum -->
+<!ENTITY apos	 "&#39;"> <!--  apostrophe = APL quote, U+0027 ISOnum -->
+
+<!-- Latin Extended-A -->
+<!ENTITY OElig   "&#338;"> <!--  latin capital ligature OE,
+                                    U+0152 ISOlat2 -->
+<!ENTITY oelig   "&#339;"> <!--  latin small ligature oe, U+0153 ISOlat2 -->
+<!-- ligature is a misnomer, this is a separate character in some languages -->
+<!ENTITY Scaron  "&#352;"> <!--  latin capital letter S with caron,
+                                    U+0160 ISOlat2 -->
+<!ENTITY scaron  "&#353;"> <!--  latin small letter s with caron,
+                                    U+0161 ISOlat2 -->
+<!ENTITY Yuml    "&#376;"> <!--  latin capital letter Y with diaeresis,
+                                    U+0178 ISOlat2 -->
+
+<!-- Spacing Modifier Letters -->
+<!ENTITY circ    "&#710;"> <!--  modifier letter circumflex accent,
+                                    U+02C6 ISOpub -->
+<!ENTITY tilde   "&#732;"> <!--  small tilde, U+02DC ISOdia -->
+
+<!-- General Punctuation -->
+<!ENTITY ensp    "&#8194;"> <!-- en space, U+2002 ISOpub -->
+<!ENTITY emsp    "&#8195;"> <!-- em space, U+2003 ISOpub -->
+<!ENTITY thinsp  "&#8201;"> <!-- thin space, U+2009 ISOpub -->
+<!ENTITY zwnj    "&#8204;"> <!-- zero width non-joiner,
+                                    U+200C NEW RFC 2070 -->
+<!ENTITY zwj     "&#8205;"> <!-- zero width joiner, U+200D NEW RFC 2070 -->
+<!ENTITY lrm     "&#8206;"> <!-- left-to-right mark, U+200E NEW RFC 2070 -->
+<!ENTITY rlm     "&#8207;"> <!-- right-to-left mark, U+200F NEW RFC 2070 -->
+<!ENTITY ndash   "&#8211;"> <!-- en dash, U+2013 ISOpub -->
+<!ENTITY mdash   "&#8212;"> <!-- em dash, U+2014 ISOpub -->
+<!ENTITY lsquo   "&#8216;"> <!-- left single quotation mark,
+                                    U+2018 ISOnum -->
+<!ENTITY rsquo   "&#8217;"> <!-- right single quotation mark,
+                                    U+2019 ISOnum -->
+<!ENTITY sbquo   "&#8218;"> <!-- single low-9 quotation mark, U+201A NEW -->
+<!ENTITY ldquo   "&#8220;"> <!-- left double quotation mark,
+                                    U+201C ISOnum -->
+<!ENTITY rdquo   "&#8221;"> <!-- right double quotation mark,
+                                    U+201D ISOnum -->
+<!ENTITY bdquo   "&#8222;"> <!-- double low-9 quotation mark, U+201E NEW -->
+<!ENTITY dagger  "&#8224;"> <!-- dagger, U+2020 ISOpub -->
+<!ENTITY Dagger  "&#8225;"> <!-- double dagger, U+2021 ISOpub -->
+<!ENTITY permil  "&#8240;"> <!-- per mille sign, U+2030 ISOtech -->
+<!ENTITY lsaquo  "&#8249;"> <!-- single left-pointing angle quotation mark,
+                                    U+2039 ISO proposed -->
+<!-- lsaquo is proposed but not yet ISO standardized -->
+<!ENTITY rsaquo  "&#8250;"> <!-- single right-pointing angle quotation mark,
+                                    U+203A ISO proposed -->
+<!-- rsaquo is proposed but not yet ISO standardized -->
+
+<!-- Currency Symbols -->
+<!ENTITY euro   "&#8364;"> <!--  euro sign, U+20AC NEW -->
diff --git a/src/site/doxy/DTDs/xhtml-symbol.ent b/src/site/doxy/DTDs/xhtml-symbol.ent
new file mode 100644
index 0000000..63c2abf
--- /dev/null
+++ b/src/site/doxy/DTDs/xhtml-symbol.ent
@@ -0,0 +1,237 @@
+<!-- Mathematical, Greek and Symbolic characters for XHTML -->
+
+<!-- Character entity set. Typical invocation:
+     <!ENTITY % HTMLsymbol PUBLIC
+        "-//W3C//ENTITIES Symbols for XHTML//EN"
+        "http://www.w3.org/TR/xhtml1/DTD/xhtml-symbol.ent">
+     %HTMLsymbol;
+-->
+
+<!-- Portions (C) International Organization for Standardization 1986:
+     Permission to copy in any form is granted for use with
+     conforming SGML systems and applications as defined in
+     ISO 8879, provided this notice is included in all copies.
+-->
+
+<!-- Relevant ISO entity set is given unless names are newly introduced.
+     New names (i.e., not in ISO 8879 list) do not clash with any
+     existing ISO 8879 entity names. ISO 10646 character numbers
+     are given for each character, in hex. values are decimal
+     conversions of the ISO 10646 values and refer to the document
+     character set. Names are Unicode names. 
+-->
+
+<!-- Latin Extended-B -->
+<!ENTITY fnof     "&#402;"> <!-- latin small letter f with hook = function
+                                    = florin, U+0192 ISOtech -->
+
+<!-- Greek -->
+<!ENTITY Alpha    "&#913;"> <!-- greek capital letter alpha, U+0391 -->
+<!ENTITY Beta     "&#914;"> <!-- greek capital letter beta, U+0392 -->
+<!ENTITY Gamma    "&#915;"> <!-- greek capital letter gamma,
+                                    U+0393 ISOgrk3 -->
+<!ENTITY Delta    "&#916;"> <!-- greek capital letter delta,
+                                    U+0394 ISOgrk3 -->
+<!ENTITY Epsilon  "&#917;"> <!-- greek capital letter epsilon, U+0395 -->
+<!ENTITY Zeta     "&#918;"> <!-- greek capital letter zeta, U+0396 -->
+<!ENTITY Eta      "&#919;"> <!-- greek capital letter eta, U+0397 -->
+<!ENTITY Theta    "&#920;"> <!-- greek capital letter theta,
+                                    U+0398 ISOgrk3 -->
+<!ENTITY Iota     "&#921;"> <!-- greek capital letter iota, U+0399 -->
+<!ENTITY Kappa    "&#922;"> <!-- greek capital letter kappa, U+039A -->
+<!ENTITY Lambda   "&#923;"> <!-- greek capital letter lamda,
+                                    U+039B ISOgrk3 -->
+<!ENTITY Mu       "&#924;"> <!-- greek capital letter mu, U+039C -->
+<!ENTITY Nu       "&#925;"> <!-- greek capital letter nu, U+039D -->
+<!ENTITY Xi       "&#926;"> <!-- greek capital letter xi, U+039E ISOgrk3 -->
+<!ENTITY Omicron  "&#927;"> <!-- greek capital letter omicron, U+039F -->
+<!ENTITY Pi       "&#928;"> <!-- greek capital letter pi, U+03A0 ISOgrk3 -->
+<!ENTITY Rho      "&#929;"> <!-- greek capital letter rho, U+03A1 -->
+<!-- there is no Sigmaf, and no U+03A2 character either -->
+<!ENTITY Sigma    "&#931;"> <!-- greek capital letter sigma,
+                                    U+03A3 ISOgrk3 -->
+<!ENTITY Tau      "&#932;"> <!-- greek capital letter tau, U+03A4 -->
+<!ENTITY Upsilon  "&#933;"> <!-- greek capital letter upsilon,
+                                    U+03A5 ISOgrk3 -->
+<!ENTITY Phi      "&#934;"> <!-- greek capital letter phi,
+                                    U+03A6 ISOgrk3 -->
+<!ENTITY Chi      "&#935;"> <!-- greek capital letter chi, U+03A7 -->
+<!ENTITY Psi      "&#936;"> <!-- greek capital letter psi,
+                                    U+03A8 ISOgrk3 -->
+<!ENTITY Omega    "&#937;"> <!-- greek capital letter omega,
+                                    U+03A9 ISOgrk3 -->
+
+<!ENTITY alpha    "&#945;"> <!-- greek small letter alpha,
+                                    U+03B1 ISOgrk3 -->
+<!ENTITY beta     "&#946;"> <!-- greek small letter beta, U+03B2 ISOgrk3 -->
+<!ENTITY gamma    "&#947;"> <!-- greek small letter gamma,
+                                    U+03B3 ISOgrk3 -->
+<!ENTITY delta    "&#948;"> <!-- greek small letter delta,
+                                    U+03B4 ISOgrk3 -->
+<!ENTITY epsilon  "&#949;"> <!-- greek small letter epsilon,
+                                    U+03B5 ISOgrk3 -->
+<!ENTITY zeta     "&#950;"> <!-- greek small letter zeta, U+03B6 ISOgrk3 -->
+<!ENTITY eta      "&#951;"> <!-- greek small letter eta, U+03B7 ISOgrk3 -->
+<!ENTITY theta    "&#952;"> <!-- greek small letter theta,
+                                    U+03B8 ISOgrk3 -->
+<!ENTITY iota     "&#953;"> <!-- greek small letter iota, U+03B9 ISOgrk3 -->
+<!ENTITY kappa    "&#954;"> <!-- greek small letter kappa,
+                                    U+03BA ISOgrk3 -->
+<!ENTITY lambda   "&#955;"> <!-- greek small letter lamda,
+                                    U+03BB ISOgrk3 -->
+<!ENTITY mu       "&#956;"> <!-- greek small letter mu, U+03BC ISOgrk3 -->
+<!ENTITY nu       "&#957;"> <!-- greek small letter nu, U+03BD ISOgrk3 -->
+<!ENTITY xi       "&#958;"> <!-- greek small letter xi, U+03BE ISOgrk3 -->
+<!ENTITY omicron  "&#959;"> <!-- greek small letter omicron, U+03BF NEW -->
+<!ENTITY pi       "&#960;"> <!-- greek small letter pi, U+03C0 ISOgrk3 -->
+<!ENTITY rho      "&#961;"> <!-- greek small letter rho, U+03C1 ISOgrk3 -->
+<!ENTITY sigmaf   "&#962;"> <!-- greek small letter final sigma,
+                                    U+03C2 ISOgrk3 -->
+<!ENTITY sigma    "&#963;"> <!-- greek small letter sigma,
+                                    U+03C3 ISOgrk3 -->
+<!ENTITY tau      "&#964;"> <!-- greek small letter tau, U+03C4 ISOgrk3 -->
+<!ENTITY upsilon  "&#965;"> <!-- greek small letter upsilon,
+                                    U+03C5 ISOgrk3 -->
+<!ENTITY phi      "&#966;"> <!-- greek small letter phi, U+03C6 ISOgrk3 -->
+<!ENTITY chi      "&#967;"> <!-- greek small letter chi, U+03C7 ISOgrk3 -->
+<!ENTITY psi      "&#968;"> <!-- greek small letter psi, U+03C8 ISOgrk3 -->
+<!ENTITY omega    "&#969;"> <!-- greek small letter omega,
+                                    U+03C9 ISOgrk3 -->
+<!ENTITY thetasym "&#977;"> <!-- greek theta symbol,
+                                    U+03D1 NEW -->
+<!ENTITY upsih    "&#978;"> <!-- greek upsilon with hook symbol,
+                                    U+03D2 NEW -->
+<!ENTITY piv      "&#982;"> <!-- greek pi symbol, U+03D6 ISOgrk3 -->
+
+<!-- General Punctuation -->
+<!ENTITY bull     "&#8226;"> <!-- bullet = black small circle,
+                                     U+2022 ISOpub  -->
+<!-- bullet is NOT the same as bullet operator, U+2219 -->
+<!ENTITY hellip   "&#8230;"> <!-- horizontal ellipsis = three dot leader,
+                                     U+2026 ISOpub  -->
+<!ENTITY prime    "&#8242;"> <!-- prime = minutes = feet, U+2032 ISOtech -->
+<!ENTITY Prime    "&#8243;"> <!-- double prime = seconds = inches,
+                                     U+2033 ISOtech -->
+<!ENTITY oline    "&#8254;"> <!-- overline = spacing overscore,
+                                     U+203E NEW -->
+<!ENTITY frasl    "&#8260;"> <!-- fraction slash, U+2044 NEW -->
+
+<!-- Letterlike Symbols -->
+<!ENTITY weierp   "&#8472;"> <!-- script capital P = power set
+                                     = Weierstrass p, U+2118 ISOamso -->
+<!ENTITY image    "&#8465;"> <!-- black-letter capital I = imaginary part,
+                                     U+2111 ISOamso -->
+<!ENTITY real     "&#8476;"> <!-- black-letter capital R = real part symbol,
+                                     U+211C ISOamso -->
+<!ENTITY trade    "&#8482;"> <!-- trade mark sign, U+2122 ISOnum -->
+<!ENTITY alefsym  "&#8501;"> <!-- alef symbol = first transfinite cardinal,
+                                     U+2135 NEW -->
+<!-- alef symbol is NOT the same as hebrew letter alef,
+     U+05D0 although the same glyph could be used to depict both characters -->
+
+<!-- Arrows -->
+<!ENTITY larr     "&#8592;"> <!-- leftwards arrow, U+2190 ISOnum -->
+<!ENTITY uarr     "&#8593;"> <!-- upwards arrow, U+2191 ISOnum-->
+<!ENTITY rarr     "&#8594;"> <!-- rightwards arrow, U+2192 ISOnum -->
+<!ENTITY darr     "&#8595;"> <!-- downwards arrow, U+2193 ISOnum -->
+<!ENTITY harr     "&#8596;"> <!-- left right arrow, U+2194 ISOamsa -->
+<!ENTITY crarr    "&#8629;"> <!-- downwards arrow with corner leftwards
+                                     = carriage return, U+21B5 NEW -->
+<!ENTITY lArr     "&#8656;"> <!-- leftwards double arrow, U+21D0 ISOtech -->
+<!-- Unicode does not say that lArr is the same as the 'is implied by' arrow
+    but also does not have any other character for that function. So lArr can
+    be used for 'is implied by' as ISOtech suggests -->
+<!ENTITY uArr     "&#8657;"> <!-- upwards double arrow, U+21D1 ISOamsa -->
+<!ENTITY rArr     "&#8658;"> <!-- rightwards double arrow,
+                                     U+21D2 ISOtech -->
+<!-- Unicode does not say this is the 'implies' character but does not have 
+     another character with this function so rArr can be used for 'implies'
+     as ISOtech suggests -->
+<!ENTITY dArr     "&#8659;"> <!-- downwards double arrow, U+21D3 ISOamsa -->
+<!ENTITY hArr     "&#8660;"> <!-- left right double arrow,
+                                     U+21D4 ISOamsa -->
+
+<!-- Mathematical Operators -->
+<!ENTITY forall   "&#8704;"> <!-- for all, U+2200 ISOtech -->
+<!ENTITY part     "&#8706;"> <!-- partial differential, U+2202 ISOtech  -->
+<!ENTITY exist    "&#8707;"> <!-- there exists, U+2203 ISOtech -->
+<!ENTITY empty    "&#8709;"> <!-- empty set = null set, U+2205 ISOamso -->
+<!ENTITY nabla    "&#8711;"> <!-- nabla = backward difference,
+                                     U+2207 ISOtech -->
+<!ENTITY isin     "&#8712;"> <!-- element of, U+2208 ISOtech -->
+<!ENTITY notin    "&#8713;"> <!-- not an element of, U+2209 ISOtech -->
+<!ENTITY ni       "&#8715;"> <!-- contains as member, U+220B ISOtech -->
+<!ENTITY prod     "&#8719;"> <!-- n-ary product = product sign,
+                                     U+220F ISOamsb -->
+<!-- prod is NOT the same character as U+03A0 'greek capital letter pi' though
+     the same glyph might be used for both -->
+<!ENTITY sum      "&#8721;"> <!-- n-ary summation, U+2211 ISOamsb -->
+<!-- sum is NOT the same character as U+03A3 'greek capital letter sigma'
+     though the same glyph might be used for both -->
+<!ENTITY minus    "&#8722;"> <!-- minus sign, U+2212 ISOtech -->
+<!ENTITY lowast   "&#8727;"> <!-- asterisk operator, U+2217 ISOtech -->
+<!ENTITY radic    "&#8730;"> <!-- square root = radical sign,
+                                     U+221A ISOtech -->
+<!ENTITY prop     "&#8733;"> <!-- proportional to, U+221D ISOtech -->
+<!ENTITY infin    "&#8734;"> <!-- infinity, U+221E ISOtech -->
+<!ENTITY ang      "&#8736;"> <!-- angle, U+2220 ISOamso -->
+<!ENTITY and      "&#8743;"> <!-- logical and = wedge, U+2227 ISOtech -->
+<!ENTITY or       "&#8744;"> <!-- logical or = vee, U+2228 ISOtech -->
+<!ENTITY cap      "&#8745;"> <!-- intersection = cap, U+2229 ISOtech -->
+<!ENTITY cup      "&#8746;"> <!-- union = cup, U+222A ISOtech -->
+<!ENTITY int      "&#8747;"> <!-- integral, U+222B ISOtech -->
+<!ENTITY there4   "&#8756;"> <!-- therefore, U+2234 ISOtech -->
+<!ENTITY sim      "&#8764;"> <!-- tilde operator = varies with = similar to,
+                                     U+223C ISOtech -->
+<!-- tilde operator is NOT the same character as the tilde, U+007E,
+     although the same glyph might be used to represent both  -->
+<!ENTITY cong     "&#8773;"> <!-- approximately equal to, U+2245 ISOtech -->
+<!ENTITY asymp    "&#8776;"> <!-- almost equal to = asymptotic to,
+                                     U+2248 ISOamsr -->
+<!ENTITY ne       "&#8800;"> <!-- not equal to, U+2260 ISOtech -->
+<!ENTITY equiv    "&#8801;"> <!-- identical to, U+2261 ISOtech -->
+<!ENTITY le       "&#8804;"> <!-- less-than or equal to, U+2264 ISOtech -->
+<!ENTITY ge       "&#8805;"> <!-- greater-than or equal to,
+                                     U+2265 ISOtech -->
+<!ENTITY sub      "&#8834;"> <!-- subset of, U+2282 ISOtech -->
+<!ENTITY sup      "&#8835;"> <!-- superset of, U+2283 ISOtech -->
+<!ENTITY nsub     "&#8836;"> <!-- not a subset of, U+2284 ISOamsn -->
+<!ENTITY sube     "&#8838;"> <!-- subset of or equal to, U+2286 ISOtech -->
+<!ENTITY supe     "&#8839;"> <!-- superset of or equal to,
+                                     U+2287 ISOtech -->
+<!ENTITY oplus    "&#8853;"> <!-- circled plus = direct sum,
+                                     U+2295 ISOamsb -->
+<!ENTITY otimes   "&#8855;"> <!-- circled times = vector product,
+                                     U+2297 ISOamsb -->
+<!ENTITY perp     "&#8869;"> <!-- up tack = orthogonal to = perpendicular,
+                                     U+22A5 ISOtech -->
+<!ENTITY sdot     "&#8901;"> <!-- dot operator, U+22C5 ISOamsb -->
+<!-- dot operator is NOT the same character as U+00B7 middle dot -->
+
+<!-- Miscellaneous Technical -->
+<!ENTITY lceil    "&#8968;"> <!-- left ceiling = APL upstile,
+                                     U+2308 ISOamsc  -->
+<!ENTITY rceil    "&#8969;"> <!-- right ceiling, U+2309 ISOamsc  -->
+<!ENTITY lfloor   "&#8970;"> <!-- left floor = APL downstile,
+                                     U+230A ISOamsc  -->
+<!ENTITY rfloor   "&#8971;"> <!-- right floor, U+230B ISOamsc  -->
+<!ENTITY lang     "&#9001;"> <!-- left-pointing angle bracket = bra,
+                                     U+2329 ISOtech -->
+<!-- lang is NOT the same character as U+003C 'less than sign' 
+     or U+2039 'single left-pointing angle quotation mark' -->
+<!ENTITY rang     "&#9002;"> <!-- right-pointing angle bracket = ket,
+                                     U+232A ISOtech -->
+<!-- rang is NOT the same character as U+003E 'greater than sign' 
+     or U+203A 'single right-pointing angle quotation mark' -->
+
+<!-- Geometric Shapes -->
+<!ENTITY loz      "&#9674;"> <!-- lozenge, U+25CA ISOpub -->
+
+<!-- Miscellaneous Symbols -->
+<!ENTITY spades   "&#9824;"> <!-- black spade suit, U+2660 ISOpub -->
+<!-- black here seems to mean filled as opposed to hollow -->
+<!ENTITY clubs    "&#9827;"> <!-- black club suit = shamrock,
+                                     U+2663 ISOpub -->
+<!ENTITY hearts   "&#9829;"> <!-- black heart suit = valentine,
+                                     U+2665 ISOpub -->
+<!ENTITY diams    "&#9830;"> <!-- black diamond suit, U+2666 ISOpub -->
diff --git a/src/site/doxy/DTDs/xhtml1-transitional.dtd b/src/site/doxy/DTDs/xhtml1-transitional.dtd
new file mode 100644
index 0000000..628f27a
--- /dev/null
+++ b/src/site/doxy/DTDs/xhtml1-transitional.dtd
@@ -0,0 +1,1201 @@
+<!--
+   Extensible HTML version 1.0 Transitional DTD
+
+   This is the same as HTML 4 Transitional except for
+   changes due to the differences between XML and SGML.
+
+   Namespace = http://www.w3.org/1999/xhtml
+
+   For further information, see: http://www.w3.org/TR/xhtml1
+
+   Copyright (c) 1998-2002 W3C (MIT, INRIA, Keio),
+   All Rights Reserved. 
+
+   This DTD module is identified by the PUBLIC and SYSTEM identifiers:
+
+   PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+   SYSTEM "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
+
+   $Revision: 1.2 $
+   $Date: 2002/08/01 18:37:55 $
+
+-->
+
+<!--================ Character mnemonic entities =========================-->
+
+<!ENTITY % HTMLlat1 PUBLIC
+   "-//W3C//ENTITIES Latin 1 for XHTML//EN"
+   "xhtml-lat1.ent">
+%HTMLlat1;
+
+<!ENTITY % HTMLsymbol PUBLIC
+   "-//W3C//ENTITIES Symbols for XHTML//EN"
+   "xhtml-symbol.ent">
+%HTMLsymbol;
+
+<!ENTITY % HTMLspecial PUBLIC
+   "-//W3C//ENTITIES Special for XHTML//EN"
+   "xhtml-special.ent">
+%HTMLspecial;
+
+<!--================== Imported Names ====================================-->
+
+<!ENTITY % ContentType "CDATA">
+    <!-- media type, as per [RFC2045] -->
+
+<!ENTITY % ContentTypes "CDATA">
+    <!-- comma-separated list of media types, as per [RFC2045] -->
+
+<!ENTITY % Charset "CDATA">
+    <!-- a character encoding, as per [RFC2045] -->
+
+<!ENTITY % Charsets "CDATA">
+    <!-- a space separated list of character encodings, as per [RFC2045] -->
+
+<!ENTITY % LanguageCode "NMTOKEN">
+    <!-- a language code, as per [RFC3066] -->
+
+<!ENTITY % Character "CDATA">
+    <!-- a single character, as per section 2.2 of [XML] -->
+
+<!ENTITY % Number "CDATA">
+    <!-- one or more digits -->
+
+<!ENTITY % LinkTypes "CDATA">
+    <!-- space-separated list of link types -->
+
+<!ENTITY % MediaDesc "CDATA">
+    <!-- single or comma-separated list of media descriptors -->
+
+<!ENTITY % URI "CDATA">
+    <!-- a Uniform Resource Identifier, see [RFC2396] -->
+
+<!ENTITY % UriList "CDATA">
+    <!-- a space separated list of Uniform Resource Identifiers -->
+
+<!ENTITY % Datetime "CDATA">
+    <!-- date and time information. ISO date format -->
+
+<!ENTITY % Script "CDATA">
+    <!-- script expression -->
+
+<!ENTITY % StyleSheet "CDATA">
+    <!-- style sheet data -->
+
+<!ENTITY % Text "CDATA">
+    <!-- used for titles etc. -->
+
+<!ENTITY % FrameTarget "NMTOKEN">
+    <!-- render in this frame -->
+
+<!ENTITY % Length "CDATA">
+    <!-- nn for pixels or nn% for percentage length -->
+
+<!ENTITY % MultiLength "CDATA">
+    <!-- pixel, percentage, or relative -->
+
+<!ENTITY % Pixels "CDATA">
+    <!-- integer representing length in pixels -->
+
+<!-- these are used for image maps -->
+
+<!ENTITY % Shape "(rect|circle|poly|default)">
+
+<!ENTITY % Coords "CDATA">
+    <!-- comma separated list of lengths -->
+
+<!-- used for object, applet, img, input and iframe -->
+<!ENTITY % ImgAlign "(top|middle|bottom|left|right)">
+
+<!-- a color using sRGB: #RRGGBB as Hex values -->
+<!ENTITY % Color "CDATA">
+
+<!-- There are also 16 widely known color names with their sRGB values:
+
+    Black  = #000000    Green  = #008000
+    Silver = #C0C0C0    Lime   = #00FF00
+    Gray   = #808080    Olive  = #808000
+    White  = #FFFFFF    Yellow = #FFFF00
+    Maroon = #800000    Navy   = #000080
+    Red    = #FF0000    Blue   = #0000FF
+    Purple = #800080    Teal   = #008080
+    Fuchsia= #FF00FF    Aqua   = #00FFFF
+-->
+
+<!--=================== Generic Attributes ===============================-->
+
+<!-- core attributes common to most elements
+  id       document-wide unique id
+  class    space separated list of classes
+  style    associated style info
+  title    advisory title/amplification
+-->
+<!ENTITY % coreattrs
+ "id          ID             #IMPLIED
+  class       CDATA          #IMPLIED
+  style       %StyleSheet;   #IMPLIED
+  title       %Text;         #IMPLIED"
+  >
+
+<!-- internationalization attributes
+  lang        language code (backwards compatible)
+  xml:lang    language code (as per XML 1.0 spec)
+  dir         direction for weak/neutral text
+-->
+<!ENTITY % i18n
+ "lang        %LanguageCode; #IMPLIED
+  xml:lang    %LanguageCode; #IMPLIED
+  dir         (ltr|rtl)      #IMPLIED"
+  >
+
+<!-- attributes for common UI events
+  onclick     a pointer button was clicked
+  ondblclick  a pointer button was double clicked
+  onmousedown a pointer button was pressed down
+  onmouseup   a pointer button was released
+  onmousemove a pointer was moved onto the element
+  onmouseout  a pointer was moved away from the element
+  onkeypress  a key was pressed and released
+  onkeydown   a key was pressed down
+  onkeyup     a key was released
+-->
+<!ENTITY % events
+ "onclick     %Script;       #IMPLIED
+  ondblclick  %Script;       #IMPLIED
+  onmousedown %Script;       #IMPLIED
+  onmouseup   %Script;       #IMPLIED
+  onmouseover %Script;       #IMPLIED
+  onmousemove %Script;       #IMPLIED
+  onmouseout  %Script;       #IMPLIED
+  onkeypress  %Script;       #IMPLIED
+  onkeydown   %Script;       #IMPLIED
+  onkeyup     %Script;       #IMPLIED"
+  >
+
+<!-- attributes for elements that can get the focus
+  accesskey   accessibility key character
+  tabindex    position in tabbing order
+  onfocus     the element got the focus
+  onblur      the element lost the focus
+-->
+<!ENTITY % focus
+ "accesskey   %Character;    #IMPLIED
+  tabindex    %Number;       #IMPLIED
+  onfocus     %Script;       #IMPLIED
+  onblur      %Script;       #IMPLIED"
+  >
+
+<!ENTITY % attrs "%coreattrs; %i18n; %events;">
+
+<!-- text alignment for p, div, h1-h6. The default is
+     align="left" for ltr headings, "right" for rtl -->
+
+<!ENTITY % TextAlign "align (left|center|right|justify) #IMPLIED">
+
+<!--=================== Text Elements ====================================-->
+
+<!ENTITY % special.extra
+   "object | applet | img | map | iframe">
+	
+<!ENTITY % special.basic
+	"br | span | bdo">
+
+<!ENTITY % special
+   "%special.basic; | %special.extra;">
+
+<!ENTITY % fontstyle.extra "big | small | font | basefont">
+
+<!ENTITY % fontstyle.basic "tt | i | b | u
+                      | s | strike ">
+
+<!ENTITY % fontstyle "%fontstyle.basic; | %fontstyle.extra;">
+
+<!ENTITY % phrase.extra "sub | sup">
+<!ENTITY % phrase.basic "em | strong | dfn | code | q |
+                   samp | kbd | var | cite | abbr | acronym">
+
+<!ENTITY % phrase "%phrase.basic; | %phrase.extra;">
+
+<!ENTITY % inline.forms "input | select | textarea | label | button">
+
+<!-- these can occur at block or inline level -->
+<!ENTITY % misc.inline "ins | del | script">
+
+<!-- these can only occur at block level -->
+<!ENTITY % misc "noscript | %misc.inline;">
+
+<!ENTITY % inline "a | %special; | %fontstyle; | %phrase; | %inline.forms;">
+
+<!-- %Inline; covers inline or "text-level" elements -->
+<!ENTITY % Inline "(#PCDATA | %inline; | %misc.inline;)*">
+
+<!--================== Block level elements ==============================-->
+
+<!ENTITY % heading "h1|h2|h3|h4|h5|h6">
+<!ENTITY % lists "ul | ol | dl | menu | dir">
+<!ENTITY % blocktext "pre | hr | blockquote | address | center | noframes">
+
+<!ENTITY % block
+    "p | %heading; | div | %lists; | %blocktext; | isindex |fieldset | table">
+
+<!-- %Flow; mixes block and inline and is used for list items etc. -->
+<!ENTITY % Flow "(#PCDATA | %block; | form | %inline; | %misc;)*">
+
+<!--================== Content models for exclusions =====================-->
+
+<!-- a elements use %Inline; excluding a -->
+
+<!ENTITY % a.content
+   "(#PCDATA | %special; | %fontstyle; | %phrase; | %inline.forms; | %misc.inline;)*">
+
+<!-- pre uses %Inline excluding img, object, applet, big, small,
+     font, or basefont -->
+
+<!ENTITY % pre.content
+   "(#PCDATA | a | %special.basic; | %fontstyle.basic; | %phrase.basic; |
+	   %inline.forms; | %misc.inline;)*">
+
+<!-- form uses %Flow; excluding form -->
+
+<!ENTITY % form.content "(#PCDATA | %block; | %inline; | %misc;)*">
+
+<!-- button uses %Flow; but excludes a, form, form controls, iframe -->
+
+<!ENTITY % button.content
+   "(#PCDATA | p | %heading; | div | %lists; | %blocktext; |
+      table | br | span | bdo | object | applet | img | map |
+      %fontstyle; | %phrase; | %misc;)*">
+
+<!--================ Document Structure ==================================-->
+
+<!-- the namespace URI designates the document profile -->
+
+<!ELEMENT html (head, body)>
+<!ATTLIST html
+  %i18n;
+  id          ID             #IMPLIED
+  xmlns       %URI;          #FIXED 'http://www.w3.org/1999/xhtml'
+  >
+
+<!--================ Document Head =======================================-->
+
+<!ENTITY % head.misc "(script|style|meta|link|object|isindex)*">
+
+<!-- content model is %head.misc; combined with a single
+     title and an optional base element in any order -->
+
+<!ELEMENT head (%head.misc;,
+     ((title, %head.misc;, (base, %head.misc;)?) |
+      (base, %head.misc;, (title, %head.misc;))))>
+
+<!ATTLIST head
+  %i18n;
+  id          ID             #IMPLIED
+  profile     %URI;          #IMPLIED
+  >
+
+<!-- The title element is not considered part of the flow of text.
+       It should be displayed, for example as the page header or
+       window title. Exactly one title is required per document.
+    -->
+<!ELEMENT title (#PCDATA)>
+<!ATTLIST title 
+  %i18n;
+  id          ID             #IMPLIED
+  >
+
+<!-- document base URI -->
+
+<!ELEMENT base EMPTY>
+<!ATTLIST base
+  id          ID             #IMPLIED
+  href        %URI;          #IMPLIED
+  target      %FrameTarget;  #IMPLIED
+  >
+
+<!-- generic metainformation -->
+<!ELEMENT meta EMPTY>
+<!ATTLIST meta
+  %i18n;
+  id          ID             #IMPLIED
+  http-equiv  CDATA          #IMPLIED
+  name        CDATA          #IMPLIED
+  content     CDATA          #REQUIRED
+  scheme      CDATA          #IMPLIED
+  >
+
+<!--
+  Relationship values can be used in principle:
+
+   a) for document specific toolbars/menus when used
+      with the link element in document head e.g.
+        start, contents, previous, next, index, end, help
+   b) to link to a separate style sheet (rel="stylesheet")
+   c) to make a link to a script (rel="script")
+   d) by stylesheets to control how collections of
+      html nodes are rendered into printed documents
+   e) to make a link to a printable version of this document
+      e.g. a PostScript or PDF version (rel="alternate" media="print")
+-->
+
+<!ELEMENT link EMPTY>
+<!ATTLIST link
+  %attrs;
+  charset     %Charset;      #IMPLIED
+  href        %URI;          #IMPLIED
+  hreflang    %LanguageCode; #IMPLIED
+  type        %ContentType;  #IMPLIED
+  rel         %LinkTypes;    #IMPLIED
+  rev         %LinkTypes;    #IMPLIED
+  media       %MediaDesc;    #IMPLIED
+  target      %FrameTarget;  #IMPLIED
+  >
+
+<!-- style info, which may include CDATA sections -->
+<!ELEMENT style (#PCDATA)>
+<!ATTLIST style
+  %i18n;
+  id          ID             #IMPLIED
+  type        %ContentType;  #REQUIRED
+  media       %MediaDesc;    #IMPLIED
+  title       %Text;         #IMPLIED
+  xml:space   (preserve)     #FIXED 'preserve'
+  >
+
+<!-- script statements, which may include CDATA sections -->
+<!ELEMENT script (#PCDATA)>
+<!ATTLIST script
+  id          ID             #IMPLIED
+  charset     %Charset;      #IMPLIED
+  type        %ContentType;  #REQUIRED
+  language    CDATA          #IMPLIED
+  src         %URI;          #IMPLIED
+  defer       (defer)        #IMPLIED
+  xml:space   (preserve)     #FIXED 'preserve'
+  >
+
+<!-- alternate content container for non script-based rendering -->
+
+<!ELEMENT noscript %Flow;>
+<!ATTLIST noscript
+  %attrs;
+  >
+
+<!--======================= Frames =======================================-->
+
+<!-- inline subwindow -->
+
+<!ELEMENT iframe %Flow;>
+<!ATTLIST iframe
+  %coreattrs;
+  longdesc    %URI;          #IMPLIED
+  name        NMTOKEN        #IMPLIED
+  src         %URI;          #IMPLIED
+  frameborder (1|0)          "1"
+  marginwidth %Pixels;       #IMPLIED
+  marginheight %Pixels;      #IMPLIED
+  scrolling   (yes|no|auto)  "auto"
+  align       %ImgAlign;     #IMPLIED
+  height      %Length;       #IMPLIED
+  width       %Length;       #IMPLIED
+  >
+
+<!-- alternate content container for non frame-based rendering -->
+
+<!ELEMENT noframes %Flow;>
+<!ATTLIST noframes
+  %attrs;
+  >
+
+<!--=================== Document Body ====================================-->
+
+<!ELEMENT body %Flow;>
+<!ATTLIST body
+  %attrs;
+  onload      %Script;       #IMPLIED
+  onunload    %Script;       #IMPLIED
+  background  %URI;          #IMPLIED
+  bgcolor     %Color;        #IMPLIED
+  text        %Color;        #IMPLIED
+  link        %Color;        #IMPLIED
+  vlink       %Color;        #IMPLIED
+  alink       %Color;        #IMPLIED
+  >
+
+<!ELEMENT div %Flow;>  <!-- generic language/style container -->
+<!ATTLIST div
+  %attrs;
+  %TextAlign;
+  >
+
+<!--=================== Paragraphs =======================================-->
+
+<!ELEMENT p %Inline;>
+<!ATTLIST p
+  %attrs;
+  %TextAlign;
+  >
+
+<!--=================== Headings =========================================-->
+
+<!--
+  There are six levels of headings from h1 (the most important)
+  to h6 (the least important).
+-->
+
+<!ELEMENT h1  %Inline;>
+<!ATTLIST h1
+  %attrs;
+  %TextAlign;
+  >
+
+<!ELEMENT h2 %Inline;>
+<!ATTLIST h2
+  %attrs;
+  %TextAlign;
+  >
+
+<!ELEMENT h3 %Inline;>
+<!ATTLIST h3
+  %attrs;
+  %TextAlign;
+  >
+
+<!ELEMENT h4 %Inline;>
+<!ATTLIST h4
+  %attrs;
+  %TextAlign;
+  >
+
+<!ELEMENT h5 %Inline;>
+<!ATTLIST h5
+  %attrs;
+  %TextAlign;
+  >
+
+<!ELEMENT h6 %Inline;>
+<!ATTLIST h6
+  %attrs;
+  %TextAlign;
+  >
+
+<!--=================== Lists ============================================-->
+
+<!-- Unordered list bullet styles -->
+
+<!ENTITY % ULStyle "(disc|square|circle)">
+
+<!-- Unordered list -->
+
+<!ELEMENT ul (li)+>
+<!ATTLIST ul
+  %attrs;
+  type        %ULStyle;     #IMPLIED
+  compact     (compact)     #IMPLIED
+  >
+
+<!-- Ordered list numbering style
+
+    1   arabic numbers      1, 2, 3, ...
+    a   lower alpha         a, b, c, ...
+    A   upper alpha         A, B, C, ...
+    i   lower roman         i, ii, iii, ...
+    I   upper roman         I, II, III, ...
+
+    The style is applied to the sequence number which by default
+    is reset to 1 for the first list item in an ordered list.
+-->
+<!ENTITY % OLStyle "CDATA">
+
+<!-- Ordered (numbered) list -->
+
+<!ELEMENT ol (li)+>
+<!ATTLIST ol
+  %attrs;
+  type        %OLStyle;      #IMPLIED
+  compact     (compact)      #IMPLIED
+  start       %Number;       #IMPLIED
+  >
+
+<!-- single column list (DEPRECATED) --> 
+<!ELEMENT menu (li)+>
+<!ATTLIST menu
+  %attrs;
+  compact     (compact)     #IMPLIED
+  >
+
+<!-- multiple column list (DEPRECATED) --> 
+<!ELEMENT dir (li)+>
+<!ATTLIST dir
+  %attrs;
+  compact     (compact)     #IMPLIED
+  >
+
+<!-- LIStyle is constrained to: "(%ULStyle;|%OLStyle;)" -->
+<!ENTITY % LIStyle "CDATA">
+
+<!-- list item -->
+
+<!ELEMENT li %Flow;>
+<!ATTLIST li
+  %attrs;
+  type        %LIStyle;      #IMPLIED
+  value       %Number;       #IMPLIED
+  >
+
+<!-- definition lists - dt for term, dd for its definition -->
+
+<!ELEMENT dl (dt|dd)+>
+<!ATTLIST dl
+  %attrs;
+  compact     (compact)      #IMPLIED
+  >
+
+<!ELEMENT dt %Inline;>
+<!ATTLIST dt
+  %attrs;
+  >
+
+<!ELEMENT dd %Flow;>
+<!ATTLIST dd
+  %attrs;
+  >
+
+<!--=================== Address ==========================================-->
+
+<!-- information on author -->
+
+<!ELEMENT address (#PCDATA | %inline; | %misc.inline; | p)*>
+<!ATTLIST address
+  %attrs;
+  >
+
+<!--=================== Horizontal Rule ==================================-->
+
+<!ELEMENT hr EMPTY>
+<!ATTLIST hr
+  %attrs;
+  align       (left|center|right) #IMPLIED
+  noshade     (noshade)      #IMPLIED
+  size        %Pixels;       #IMPLIED
+  width       %Length;       #IMPLIED
+  >
+
+<!--=================== Preformatted Text ================================-->
+
+<!-- content is %Inline; excluding 
+        "img|object|applet|big|small|sub|sup|font|basefont" -->
+
+<!ELEMENT pre %pre.content;>
+<!ATTLIST pre
+  %attrs;
+  width       %Number;      #IMPLIED
+  xml:space   (preserve)    #FIXED 'preserve'
+  >
+
+<!--=================== Block-like Quotes ================================-->
+
+<!ELEMENT blockquote %Flow;>
+<!ATTLIST blockquote
+  %attrs;
+  cite        %URI;          #IMPLIED
+  >
+
+<!--=================== Text alignment ===================================-->
+
+<!-- center content -->
+<!ELEMENT center %Flow;>
+<!ATTLIST center
+  %attrs;
+  >
+
+<!--=================== Inserted/Deleted Text ============================-->
+
+<!--
+  ins/del are allowed in block and inline content, but its
+  inappropriate to include block content within an ins element
+  occurring in inline content.
+-->
+<!ELEMENT ins %Flow;>
+<!ATTLIST ins
+  %attrs;
+  cite        %URI;          #IMPLIED
+  datetime    %Datetime;     #IMPLIED
+  >
+
+<!ELEMENT del %Flow;>
+<!ATTLIST del
+  %attrs;
+  cite        %URI;          #IMPLIED
+  datetime    %Datetime;     #IMPLIED
+  >
+
+<!--================== The Anchor Element ================================-->
+
+<!-- content is %Inline; except that anchors shouldn't be nested -->
+
+<!ELEMENT a %a.content;>
+<!ATTLIST a
+  %attrs;
+  %focus;
+  charset     %Charset;      #IMPLIED
+  type        %ContentType;  #IMPLIED
+  name        NMTOKEN        #IMPLIED
+  href        %URI;          #IMPLIED
+  hreflang    %LanguageCode; #IMPLIED
+  rel         %LinkTypes;    #IMPLIED
+  rev         %LinkTypes;    #IMPLIED
+  shape       %Shape;        "rect"
+  coords      %Coords;       #IMPLIED
+  target      %FrameTarget;  #IMPLIED
+  >
+
+<!--===================== Inline Elements ================================-->
+
+<!ELEMENT span %Inline;> <!-- generic language/style container -->
+<!ATTLIST span
+  %attrs;
+  >
+
+<!ELEMENT bdo %Inline;>  <!-- I18N BiDi over-ride -->
+<!ATTLIST bdo
+  %coreattrs;
+  %events;
+  lang        %LanguageCode; #IMPLIED
+  xml:lang    %LanguageCode; #IMPLIED
+  dir         (ltr|rtl)      #REQUIRED
+  >
+
+<!ELEMENT br EMPTY>   <!-- forced line break -->
+<!ATTLIST br
+  %coreattrs;
+  clear       (left|all|right|none) "none"
+  >
+
+<!ELEMENT em %Inline;>   <!-- emphasis -->
+<!ATTLIST em %attrs;>
+
+<!ELEMENT strong %Inline;>   <!-- strong emphasis -->
+<!ATTLIST strong %attrs;>
+
+<!ELEMENT dfn %Inline;>   <!-- definitional -->
+<!ATTLIST dfn %attrs;>
+
+<!ELEMENT code %Inline;>   <!-- program code -->
+<!ATTLIST code %attrs;>
+
+<!ELEMENT samp %Inline;>   <!-- sample -->
+<!ATTLIST samp %attrs;>
+
+<!ELEMENT kbd %Inline;>  <!-- something user would type -->
+<!ATTLIST kbd %attrs;>
+
+<!ELEMENT var %Inline;>   <!-- variable -->
+<!ATTLIST var %attrs;>
+
+<!ELEMENT cite %Inline;>   <!-- citation -->
+<!ATTLIST cite %attrs;>
+
+<!ELEMENT abbr %Inline;>   <!-- abbreviation -->
+<!ATTLIST abbr %attrs;>
+
+<!ELEMENT acronym %Inline;>   <!-- acronym -->
+<!ATTLIST acronym %attrs;>
+
+<!ELEMENT q %Inline;>   <!-- inlined quote -->
+<!ATTLIST q
+  %attrs;
+  cite        %URI;          #IMPLIED
+  >
+
+<!ELEMENT sub %Inline;> <!-- subscript -->
+<!ATTLIST sub %attrs;>
+
+<!ELEMENT sup %Inline;> <!-- superscript -->
+<!ATTLIST sup %attrs;>
+
+<!ELEMENT tt %Inline;>   <!-- fixed pitch font -->
+<!ATTLIST tt %attrs;>
+
+<!ELEMENT i %Inline;>   <!-- italic font -->
+<!ATTLIST i %attrs;>
+
+<!ELEMENT b %Inline;>   <!-- bold font -->
+<!ATTLIST b %attrs;>
+
+<!ELEMENT big %Inline;>   <!-- bigger font -->
+<!ATTLIST big %attrs;>
+
+<!ELEMENT small %Inline;>   <!-- smaller font -->
+<!ATTLIST small %attrs;>
+
+<!ELEMENT u %Inline;>   <!-- underline -->
+<!ATTLIST u %attrs;>
+
+<!ELEMENT s %Inline;>   <!-- strike-through -->
+<!ATTLIST s %attrs;>
+
+<!ELEMENT strike %Inline;>   <!-- strike-through -->
+<!ATTLIST strike %attrs;>
+
+<!ELEMENT basefont EMPTY>  <!-- base font size -->
+<!ATTLIST basefont
+  id          ID             #IMPLIED
+  size        CDATA          #REQUIRED
+  color       %Color;        #IMPLIED
+  face        CDATA          #IMPLIED
+  >
+
+<!ELEMENT font %Inline;> <!-- local change to font -->
+<!ATTLIST font
+  %coreattrs;
+  %i18n;
+  size        CDATA          #IMPLIED
+  color       %Color;        #IMPLIED
+  face        CDATA          #IMPLIED
+  >
+
+<!--==================== Object ======================================-->
+<!--
+  object is used to embed objects as part of HTML pages.
+  param elements should precede other content. Parameters
+  can also be expressed as attribute/value pairs on the
+  object element itself when brevity is desired.
+-->
+
+<!ELEMENT object (#PCDATA | param | %block; | form | %inline; | %misc;)*>
+<!ATTLIST object
+  %attrs;
+  declare     (declare)      #IMPLIED
+  classid     %URI;          #IMPLIED
+  codebase    %URI;          #IMPLIED
+  data        %URI;          #IMPLIED
+  type        %ContentType;  #IMPLIED
+  codetype    %ContentType;  #IMPLIED
+  archive     %UriList;      #IMPLIED
+  standby     %Text;         #IMPLIED
+  height      %Length;       #IMPLIED
+  width       %Length;       #IMPLIED
+  usemap      %URI;          #IMPLIED
+  name        NMTOKEN        #IMPLIED
+  tabindex    %Number;       #IMPLIED
+  align       %ImgAlign;     #IMPLIED
+  border      %Pixels;       #IMPLIED
+  hspace      %Pixels;       #IMPLIED
+  vspace      %Pixels;       #IMPLIED
+  >
+
+<!--
+  param is used to supply a named property value.
+  In XML it would seem natural to follow RDF and support an
+  abbreviated syntax where the param elements are replaced
+  by attribute value pairs on the object start tag.
+-->
+<!ELEMENT param EMPTY>
+<!ATTLIST param
+  id          ID             #IMPLIED
+  name        CDATA          #REQUIRED
+  value       CDATA          #IMPLIED
+  valuetype   (data|ref|object) "data"
+  type        %ContentType;  #IMPLIED
+  >
+
+<!--=================== Java applet ==================================-->
+<!--
+  One of code or object attributes must be present.
+  Place param elements before other content.
+-->
+<!ELEMENT applet (#PCDATA | param | %block; | form | %inline; | %misc;)*>
+<!ATTLIST applet
+  %coreattrs;
+  codebase    %URI;          #IMPLIED
+  archive     CDATA          #IMPLIED
+  code        CDATA          #IMPLIED
+  object      CDATA          #IMPLIED
+  alt         %Text;         #IMPLIED
+  name        NMTOKEN        #IMPLIED
+  width       %Length;       #REQUIRED
+  height      %Length;       #REQUIRED
+  align       %ImgAlign;     #IMPLIED
+  hspace      %Pixels;       #IMPLIED
+  vspace      %Pixels;       #IMPLIED
+  >
+
+<!--=================== Images ===========================================-->
+
+<!--
+   To avoid accessibility problems for people who aren't
+   able to see the image, you should provide a text
+   description using the alt and longdesc attributes.
+   In addition, avoid the use of server-side image maps.
+-->
+
+<!ELEMENT img EMPTY>
+<!ATTLIST img
+  %attrs;
+  src         %URI;          #REQUIRED
+  alt         %Text;         #REQUIRED
+  name        NMTOKEN        #IMPLIED
+  longdesc    %URI;          #IMPLIED
+  height      %Length;       #IMPLIED
+  width       %Length;       #IMPLIED
+  usemap      %URI;          #IMPLIED
+  ismap       (ismap)        #IMPLIED
+  align       %ImgAlign;     #IMPLIED
+  border      %Length;       #IMPLIED
+  hspace      %Pixels;       #IMPLIED
+  vspace      %Pixels;       #IMPLIED
+  >
+
+<!-- usemap points to a map element which may be in this document
+  or an external document, although the latter is not widely supported -->
+
+<!--================== Client-side image maps ============================-->
+
+<!-- These can be placed in the same document or grouped in a
+     separate document although this isn't yet widely supported -->
+
+<!ELEMENT map ((%block; | form | %misc;)+ | area+)>
+<!ATTLIST map
+  %i18n;
+  %events;
+  id          ID             #REQUIRED
+  class       CDATA          #IMPLIED
+  style       %StyleSheet;   #IMPLIED
+  title       %Text;         #IMPLIED
+  name        CDATA          #IMPLIED
+  >
+
+<!ELEMENT area EMPTY>
+<!ATTLIST area
+  %attrs;
+  %focus;
+  shape       %Shape;        "rect"
+  coords      %Coords;       #IMPLIED
+  href        %URI;          #IMPLIED
+  nohref      (nohref)       #IMPLIED
+  alt         %Text;         #REQUIRED
+  target      %FrameTarget;  #IMPLIED
+  >
+
+<!--================ Forms ===============================================-->
+
+<!ELEMENT form %form.content;>   <!-- forms shouldn't be nested -->
+
+<!ATTLIST form
+  %attrs;
+  action      %URI;          #REQUIRED
+  method      (get|post)     "get"
+  name        NMTOKEN        #IMPLIED
+  enctype     %ContentType;  "application/x-www-form-urlencoded"
+  onsubmit    %Script;       #IMPLIED
+  onreset     %Script;       #IMPLIED
+  accept      %ContentTypes; #IMPLIED
+  accept-charset %Charsets;  #IMPLIED
+  target      %FrameTarget;  #IMPLIED
+  >
+
+<!--
+  Each label must not contain more than ONE field
+  Label elements shouldn't be nested.
+-->
+<!ELEMENT label %Inline;>
+<!ATTLIST label
+  %attrs;
+  for         IDREF          #IMPLIED
+  accesskey   %Character;    #IMPLIED
+  onfocus     %Script;       #IMPLIED
+  onblur      %Script;       #IMPLIED
+  >
+
+<!ENTITY % InputType
+  "(text | password | checkbox |
+    radio | submit | reset |
+    file | hidden | image | button)"
+   >
+
+<!-- the name attribute is required for all but submit & reset -->
+
+<!ELEMENT input EMPTY>     <!-- form control -->
+<!ATTLIST input
+  %attrs;
+  %focus;
+  type        %InputType;    "text"
+  name        CDATA          #IMPLIED
+  value       CDATA          #IMPLIED
+  checked     (checked)      #IMPLIED
+  disabled    (disabled)     #IMPLIED
+  readonly    (readonly)     #IMPLIED
+  size        CDATA          #IMPLIED
+  maxlength   %Number;       #IMPLIED
+  src         %URI;          #IMPLIED
+  alt         CDATA          #IMPLIED
+  usemap      %URI;          #IMPLIED
+  onselect    %Script;       #IMPLIED
+  onchange    %Script;       #IMPLIED
+  accept      %ContentTypes; #IMPLIED
+  align       %ImgAlign;     #IMPLIED
+  >
+
+<!ELEMENT select (optgroup|option)+>  <!-- option selector -->
+<!ATTLIST select
+  %attrs;
+  name        CDATA          #IMPLIED
+  size        %Number;       #IMPLIED
+  multiple    (multiple)     #IMPLIED
+  disabled    (disabled)     #IMPLIED
+  tabindex    %Number;       #IMPLIED
+  onfocus     %Script;       #IMPLIED
+  onblur      %Script;       #IMPLIED
+  onchange    %Script;       #IMPLIED
+  >
+
+<!ELEMENT optgroup (option)+>   <!-- option group -->
+<!ATTLIST optgroup
+  %attrs;
+  disabled    (disabled)     #IMPLIED
+  label       %Text;         #REQUIRED
+  >
+
+<!ELEMENT option (#PCDATA)>     <!-- selectable choice -->
+<!ATTLIST option
+  %attrs;
+  selected    (selected)     #IMPLIED
+  disabled    (disabled)     #IMPLIED
+  label       %Text;         #IMPLIED
+  value       CDATA          #IMPLIED
+  >
+
+<!ELEMENT textarea (#PCDATA)>     <!-- multi-line text field -->
+<!ATTLIST textarea
+  %attrs;
+  %focus;
+  name        CDATA          #IMPLIED
+  rows        %Number;       #REQUIRED
+  cols        %Number;       #REQUIRED
+  disabled    (disabled)     #IMPLIED
+  readonly    (readonly)     #IMPLIED
+  onselect    %Script;       #IMPLIED
+  onchange    %Script;       #IMPLIED
+  >
+
+<!--
+  The fieldset element is used to group form fields.
+  Only one legend element should occur in the content
+  and if present should only be preceded by whitespace.
+-->
+<!ELEMENT fieldset (#PCDATA | legend | %block; | form | %inline; | %misc;)*>
+<!ATTLIST fieldset
+  %attrs;
+  >
+
+<!ENTITY % LAlign "(top|bottom|left|right)">
+
+<!ELEMENT legend %Inline;>     <!-- fieldset label -->
+<!ATTLIST legend
+  %attrs;
+  accesskey   %Character;    #IMPLIED
+  align       %LAlign;       #IMPLIED
+  >
+
+<!--
+ Content is %Flow; excluding a, form, form controls, iframe
+--> 
+<!ELEMENT button %button.content;>  <!-- push button -->
+<!ATTLIST button
+  %attrs;
+  %focus;
+  name        CDATA          #IMPLIED
+  value       CDATA          #IMPLIED
+  type        (button|submit|reset) "submit"
+  disabled    (disabled)     #IMPLIED
+  >
+
+<!-- single-line text input control (DEPRECATED) -->
+<!ELEMENT isindex EMPTY>
+<!ATTLIST isindex
+  %coreattrs;
+  %i18n;
+  prompt      %Text;         #IMPLIED
+  >
+
+<!--======================= Tables =======================================-->
+
+<!-- Derived from IETF HTML table standard, see [RFC1942] -->
+
+<!--
+ The border attribute sets the thickness of the frame around the
+ table. The default units are screen pixels.
+
+ The frame attribute specifies which parts of the frame around
+ the table should be rendered. The values are not the same as
+ CALS to avoid a name clash with the valign attribute.
+-->
+<!ENTITY % TFrame "(void|above|below|hsides|lhs|rhs|vsides|box|border)">
+
+<!--
+ The rules attribute defines which rules to draw between cells:
+
+ If rules is absent then assume:
+     "none" if border is absent or border="0" otherwise "all"
+-->
+
+<!ENTITY % TRules "(none | groups | rows | cols | all)">
+  
+<!-- horizontal placement of table relative to document -->
+<!ENTITY % TAlign "(left|center|right)">
+
+<!-- horizontal alignment attributes for cell contents
+
+  char        alignment char, e.g. char=':'
+  charoff     offset for alignment char
+-->
+<!ENTITY % cellhalign
+  "align      (left|center|right|justify|char) #IMPLIED
+   char       %Character;    #IMPLIED
+   charoff    %Length;       #IMPLIED"
+  >
+
+<!-- vertical alignment attributes for cell contents -->
+<!ENTITY % cellvalign
+  "valign     (top|middle|bottom|baseline) #IMPLIED"
+  >
+
+<!ELEMENT table
+     (caption?, (col*|colgroup*), thead?, tfoot?, (tbody+|tr+))>
+<!ELEMENT caption  %Inline;>
+<!ELEMENT thead    (tr)+>
+<!ELEMENT tfoot    (tr)+>
+<!ELEMENT tbody    (tr)+>
+<!ELEMENT colgroup (col)*>
+<!ELEMENT col      EMPTY>
+<!ELEMENT tr       (th|td)+>
+<!ELEMENT th       %Flow;>
+<!ELEMENT td       %Flow;>
+
+<!ATTLIST table
+  %attrs;
+  summary     %Text;         #IMPLIED
+  width       %Length;       #IMPLIED
+  border      %Pixels;       #IMPLIED
+  frame       %TFrame;       #IMPLIED
+  rules       %TRules;       #IMPLIED
+  cellspacing %Length;       #IMPLIED
+  cellpadding %Length;       #IMPLIED
+  align       %TAlign;       #IMPLIED
+  bgcolor     %Color;        #IMPLIED
+  >
+
+<!ENTITY % CAlign "(top|bottom|left|right)">
+
+<!ATTLIST caption
+  %attrs;
+  align       %CAlign;       #IMPLIED
+  >
+
+<!--
+colgroup groups a set of col elements. It allows you to group
+several semantically related columns together.
+-->
+<!ATTLIST colgroup
+  %attrs;
+  span        %Number;       "1"
+  width       %MultiLength;  #IMPLIED
+  %cellhalign;
+  %cellvalign;
+  >
+
+<!--
+ col elements define the alignment properties for cells in
+ one or more columns.
+
+ The width attribute specifies the width of the columns, e.g.
+
+     width=64        width in screen pixels
+     width=0.5*      relative width of 0.5
+
+ The span attribute causes the attributes of one
+ col element to apply to more than one column.
+-->
+<!ATTLIST col
+  %attrs;
+  span        %Number;       "1"
+  width       %MultiLength;  #IMPLIED
+  %cellhalign;
+  %cellvalign;
+  >
+
+<!--
+    Use thead to duplicate headers when breaking table
+    across page boundaries, or for static headers when
+    tbody sections are rendered in scrolling panel.
+
+    Use tfoot to duplicate footers when breaking table
+    across page boundaries, or for static footers when
+    tbody sections are rendered in scrolling panel.
+
+    Use multiple tbody sections when rules are needed
+    between groups of table rows.
+-->
+<!ATTLIST thead
+  %attrs;
+  %cellhalign;
+  %cellvalign;
+  >
+
+<!ATTLIST tfoot
+  %attrs;
+  %cellhalign;
+  %cellvalign;
+  >
+
+<!ATTLIST tbody
+  %attrs;
+  %cellhalign;
+  %cellvalign;
+  >
+
+<!ATTLIST tr
+  %attrs;
+  %cellhalign;
+  %cellvalign;
+  bgcolor     %Color;        #IMPLIED
+  >
+
+<!-- Scope is simpler than headers attribute for common tables -->
+<!ENTITY % Scope "(row|col|rowgroup|colgroup)">
+
+<!-- th is for headers, td for data and for cells acting as both -->
+
+<!ATTLIST th
+  %attrs;
+  abbr        %Text;         #IMPLIED
+  axis        CDATA          #IMPLIED
+  headers     IDREFS         #IMPLIED
+  scope       %Scope;        #IMPLIED
+  rowspan     %Number;       "1"
+  colspan     %Number;       "1"
+  %cellhalign;
+  %cellvalign;
+  nowrap      (nowrap)       #IMPLIED
+  bgcolor     %Color;        #IMPLIED
+  width       %Length;       #IMPLIED
+  height      %Length;       #IMPLIED
+  >
+
+<!ATTLIST td
+  %attrs;
+  abbr        %Text;         #IMPLIED
+  axis        CDATA          #IMPLIED
+  headers     IDREFS         #IMPLIED
+  scope       %Scope;        #IMPLIED
+  rowspan     %Number;       "1"
+  colspan     %Number;       "1"
+  %cellhalign;
+  %cellvalign;
+  nowrap      (nowrap)       #IMPLIED
+  bgcolor     %Color;        #IMPLIED
+  width       %Length;       #IMPLIED
+  height      %Length;       #IMPLIED
+  >
+
diff --git a/src/site/doxy/Doxyfile.in b/src/site/doxy/Doxyfile.in
index f39ae74..37c21f4 100644
--- a/src/site/doxy/Doxyfile.in
+++ b/src/site/doxy/Doxyfile.in
@@ -13,1294 +13,2316 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #
-# Doxyfile 1.5.3
+# Doxyfile 1.8.6
 
 # This file describes the settings to be used by the documentation system
-# doxygen (www.doxygen.org) for a project
+# doxygen (www.doxygen.org) for a project.
 #
-# All text after a hash (#) is considered a comment and will be ignored
+# All text after a double hash (##) is considered a comment and is placed in
+# front of the TAG it is preceding.
+#
+# All text after a single hash (#) is considered a comment and will be ignored.
 # The format is:
-#       TAG = value [value, ...]
-# For lists items can also be appended using:
-#       TAG += value [value, ...]
-# Values that contain spaces should be placed between quotes (" ")
+# TAG = value [value, ...]
+# For lists, items can also be appended using:
+# TAG += value [value, ...]
+# Values that contain spaces should be placed between quotes (\" \").
 
 #---------------------------------------------------------------------------
 # Project related configuration options
 #---------------------------------------------------------------------------
 
-# This tag specifies the encoding used for all characters in the config file that 
-# follow. The default is UTF-8 which is also the encoding used for all text before 
-# the first occurrence of this tag. Doxygen uses libiconv (or the iconv built into 
-# libc) for the transcoding. See http://www.gnu.org/software/libiconv for the list of 
-# possible encodings.
+# This tag specifies the encoding used for all characters in the config file
+# that follow. The default is UTF-8 which is also the encoding used for all text
+# before the first occurrence of this tag. Doxygen uses libiconv (or the iconv
+# built into libc) for the transcoding. See http://www.gnu.org/software/libiconv
+# for the list of possible encodings.
+# The default value is: UTF-8.
 
 DOXYFILE_ENCODING      = UTF-8
 
-# The PROJECT_NAME tag is a single word (or a sequence of words surrounded 
-# by quotes) that should identify the project.
+# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by
+# double-quotes, unless you are using Doxywizard) that should identify the
+# project for which the documentation is generated. This name is used in the
+# title of most generated pages and in a few other places.
+# The default value is: My Project.
 
 PROJECT_NAME           = "Apache log4cxx"
 
-# The PROJECT_NUMBER tag can be used to enter a project or revision number. 
-# This could be handy for archiving the generated documentation or 
-# if some version control system is used.
+# The PROJECT_NUMBER tag can be used to enter a project or revision number. This
+# could be handy for archiving the generated documentation or if some version
+# control system is used.
 
-PROJECT_NUMBER         = "Version @VERSION@"
+PROJECT_NUMBER         = "Version @version@"
 
-# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) 
-# base path where the generated documentation will be put. 
-# If a relative path is entered, it will be relative to the location 
-# where doxygen was started. If left blank the current directory will be used.
+# Using the PROJECT_BRIEF tag one can provide an optional one line description
+# for a project that appears at the top of each page and should give viewer a
+# quick idea about the purpose of the project. Keep the description short.
+
+PROJECT_BRIEF          =
+
+# With the PROJECT_LOGO tag one can specify an logo or icon that is included in
+# the documentation. The maximum height of the logo should not exceed 55 pixels
+# and the maximum width should not exceed 200 pixels. Doxygen will copy the logo
+# to the output directory.
+
+PROJECT_LOGO           =
+
+# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path
+# into which the generated documentation will be written. If a relative path is
+# entered, it will be relative to the location where doxygen was started. If
+# left blank the current directory will be used.
 
 OUTPUT_DIRECTORY       = .
 
-# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 
-# 4096 sub-directories (in 2 levels) under the output directory of each output 
-# format and will distribute the generated files over these directories. 
-# Enabling this option can be useful when feeding doxygen a huge amount of 
-# source files, where putting all generated files in the same directory would 
-# otherwise cause performance problems for the file system.
+# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 4096 sub-
+# directories (in 2 levels) under the output directory of each output format and
+# will distribute the generated files over these directories. Enabling this
+# option can be useful when feeding doxygen a huge amount of source files, where
+# putting all generated files in the same directory would otherwise causes
+# performance problems for the file system.
+# The default value is: NO.
 
 CREATE_SUBDIRS         = NO
 
-# The OUTPUT_LANGUAGE tag is used to specify the language in which all 
-# documentation generated by doxygen is written. Doxygen will use this 
-# information to generate all constant output in the proper language. 
-# The default language is English, other supported languages are: 
-# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, 
-# Croatian, Czech, Danish, Dutch, Finnish, French, German, Greek, Hungarian, 
-# Italian, Japanese, Japanese-en (Japanese with English messages), Korean, 
-# Korean-en, Lithuanian, Norwegian, Polish, Portuguese, Romanian, Russian, 
-# Serbian, Slovak, Slovene, Spanish, Swedish, and Ukrainian.
+# The OUTPUT_LANGUAGE tag is used to specify the language in which all
+# documentation generated by doxygen is written. Doxygen will use this
+# information to generate all constant output in the proper language.
+# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese,
+# Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States),
+# Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian,
+# Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages),
+# Korean, Korean-en (Korean with English messages), Latvian, Lithuanian,
+# Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian,
+# Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish,
+# Ukrainian and Vietnamese.
+# The default value is: English.
 
 OUTPUT_LANGUAGE        = English
 
-# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will 
-# include brief member descriptions after the members that are listed in 
-# the file and class documentation (similar to JavaDoc). 
-# Set to NO to disable this.
+# If the BRIEF_MEMBER_DESC tag is set to YES doxygen will include brief member
+# descriptions after the members that are listed in the file and class
+# documentation (similar to Javadoc). Set to NO to disable this.
+# The default value is: YES.
 
 BRIEF_MEMBER_DESC      = YES
 
-# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend 
-# the brief description of a member or function before the detailed description. 
-# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the 
+# If the REPEAT_BRIEF tag is set to YES doxygen will prepend the brief
+# description of a member or function before the detailed description
+#
+# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
 # brief descriptions will be completely suppressed.
+# The default value is: YES.
 
 REPEAT_BRIEF           = YES
 
-# This tag implements a quasi-intelligent brief description abbreviator 
-# that is used to form the text in various listings. Each string 
-# in this list, if found as the leading text of the brief description, will be 
-# stripped from the text and the result after processing the whole list, is 
-# used as the annotated text. Otherwise, the brief description is used as-is. 
-# If left blank, the following values are used ("$name" is automatically 
-# replaced with the name of the entity): "The $name class" "The $name widget" 
-# "The $name file" "is" "provides" "specifies" "contains" 
-# "represents" "a" "an" "the"
+# This tag implements a quasi-intelligent brief description abbreviator that is
+# used to form the text in various listings. Each string in this list, if found
+# as the leading text of the brief description, will be stripped from the text
+# and the result, after processing the whole list, is used as the annotated
+# text. Otherwise, the brief description is used as-is. If left blank, the
+# following values are used ($name is automatically replaced with the name of
+# the entity):The $name class, The $name widget, The $name file, is, provides,
+# specifies, contains, represents, a, an and the.
 
-ABBREVIATE_BRIEF       = 
+ABBREVIATE_BRIEF       =
 
-# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then 
-# Doxygen will generate a detailed section even if there is only a brief 
+# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
+# doxygen will generate a detailed section even if there is only a brief
 # description.
+# The default value is: NO.
 
 ALWAYS_DETAILED_SEC    = NO
 
-# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all 
-# inherited members of a class in the documentation of that class as if those 
-# members were ordinary class members. Constructors, destructors and assignment 
+# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all
+# inherited members of a class in the documentation of that class as if those
+# members were ordinary class members. Constructors, destructors and assignment
 # operators of the base classes will not be shown.
+# The default value is: NO.
 
 INLINE_INHERITED_MEMB  = NO
 
-# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full 
-# path before files name in the file list and in the header files. If set 
-# to NO the shortest path that makes the file name unique will be used.
+# If the FULL_PATH_NAMES tag is set to YES doxygen will prepend the full path
+# before files name in the file list and in the header files. If set to NO the
+# shortest path that makes the file name unique will be used
+# The default value is: YES.
 
 FULL_PATH_NAMES        = NO
 
-# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag 
-# can be used to strip a user-defined part of the path. Stripping is 
-# only done if one of the specified strings matches the left-hand part of 
-# the path. The tag can be used to show relative paths in the file list. 
-# If left blank the directory from which doxygen is run is used as the 
-# path to strip.
+# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path.
+# Stripping is only done if one of the specified strings matches the left-hand
+# part of the path. The tag can be used to show relative paths in the file list.
+# If left blank the directory from which doxygen is run is used as the path to
+# strip.
+#
+# Note that you can specify absolute paths here, but also relative paths, which
+# will be relative from the directory where doxygen is started.
+# This tag requires that the tag FULL_PATH_NAMES is set to YES.
 
-STRIP_FROM_PATH        = 
+STRIP_FROM_PATH        =
 
-# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of 
-# the path mentioned in the documentation of a class, which tells 
-# the reader which header file to include in order to use a class. 
-# If left blank only the name of the header file containing the class 
-# definition is used. Otherwise one should specify the include paths that 
-# are normally passed to the compiler using the -I flag.
+# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the
+# path mentioned in the documentation of a class, which tells the reader which
+# header file to include in order to use a class. If left blank only the name of
+# the header file containing the class definition is used. Otherwise one should
+# specify the list of include paths that are normally passed to the compiler
+# using the -I flag.
 
-STRIP_FROM_INC_PATH    = 
+STRIP_FROM_INC_PATH    =
 
-# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter 
-# (but less readable) file names. This can be useful is your file systems 
-# doesn't support long names like on DOS, Mac, or CD-ROM.
+# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but
+# less readable) file names. This can be useful is your file systems doesn't
+# support long names like on DOS, Mac, or CD-ROM.
+# The default value is: NO.
 
 SHORT_NAMES            = NO
 
-# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen 
-# will interpret the first line (until the first dot) of a JavaDoc-style 
-# comment as the brief description. If set to NO, the JavaDoc 
-# comments will behave just like regular Qt-style comments 
-# (thus requiring an explicit @brief command for a brief description.)
+# If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the
+# first line (until the first dot) of a Javadoc-style comment as the brief
+# description. If set to NO, the Javadoc-style will behave just like regular Qt-
+# style comments (thus requiring an explicit @brief command for a brief
+# description.)
+# The default value is: NO.
 
 JAVADOC_AUTOBRIEF      = YES
 
-# If the QT_AUTOBRIEF tag is set to YES then Doxygen will 
-# interpret the first line (until the first dot) of a Qt-style 
-# comment as the brief description. If set to NO, the comments 
-# will behave just like regular Qt-style comments (thus requiring 
-# an explicit \brief command for a brief description.)
+# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first
+# line (until the first dot) of a Qt-style comment as the brief description. If
+# set to NO, the Qt-style will behave just like regular Qt-style comments (thus
+# requiring an explicit \brief command for a brief description.)
+# The default value is: NO.
 
 QT_AUTOBRIEF           = NO
 
-# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen 
-# treat a multi-line C++ special comment block (i.e. a block of //! or /// 
-# comments) as a brief description. This used to be the default behaviour. 
-# The new default is to treat a multi-line C++ comment block as a detailed 
-# description. Set this tag to YES if you prefer the old behaviour instead.
+# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a
+# multi-line C++ special comment block (i.e. a block of //! or /// comments) as
+# a brief description. This used to be the default behavior. The new default is
+# to treat a multi-line C++ comment block as a detailed description. Set this
+# tag to YES if you prefer the old behavior instead.
+#
+# Note that setting this tag to YES also means that rational rose comments are
+# not recognized any more.
+# The default value is: NO.
 
 MULTILINE_CPP_IS_BRIEF = NO
 
-# If the DETAILS_AT_TOP tag is set to YES then Doxygen 
-# will output the detailed description near the top, like JavaDoc.
-# If set to NO, the detailed description appears after the member 
-# documentation.
-
-DETAILS_AT_TOP         = YES
-
-# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented 
-# member inherits the documentation from any documented member that it 
-# re-implements.
+# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the
+# documentation from any documented member that it re-implements.
+# The default value is: YES.
 
 INHERIT_DOCS           = YES
 
-# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce 
-# a new page for each member. If set to NO, the documentation of a member will 
-# be part of the file/class/namespace that contains it.
+# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce a
+# new page for each member. If set to NO, the documentation of a member will be
+# part of the file/class/namespace that contains it.
+# The default value is: NO.
 
 SEPARATE_MEMBER_PAGES  = NO
 
-# The TAB_SIZE tag can be used to set the number of spaces in a tab. 
-# Doxygen uses this value to replace tabs by spaces in code fragments.
+# The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen
+# uses this value to replace tabs by spaces in code fragments.
+# Minimum value: 1, maximum value: 16, default value: 4.
 
-TAB_SIZE               = 8
+TAB_SIZE               = 4
 
-# This tag can be used to specify a number of aliases that acts 
-# as commands in the documentation. An alias has the form "name=value". 
-# For example adding "sideeffect=\par Side Effects:\n" will allow you to 
-# put the command \sideeffect (or @sideeffect) in the documentation, which 
-# will result in a user-defined paragraph with heading "Side Effects:". 
-# You can put \n's in the value part of an alias to insert newlines.
+# This tag can be used to specify a number of aliases that act as commands in
+# the documentation. An alias has the form:
+# name=value
+# For example adding
+# "sideeffect=@par Side Effects:\n"
+# will allow you to put the command \sideeffect (or @sideeffect) in the
+# documentation, which will result in a user-defined paragraph with heading
+# "Side Effects:". You can put \n's in the value part of an alias to insert
+# newlines.
 
-ALIASES                = 
+ALIASES                =
 
-# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C 
-# sources only. Doxygen will then generate output that is more tailored for C. 
-# For instance, some of the names that are used will be different. The list 
-# of all members will be omitted, etc.
+# This tag can be used to specify a number of word-keyword mappings (TCL only).
+# A mapping has the form "name=value". For example adding "class=itcl::class"
+# will allow you to use the command class in the itcl::class meaning.
+
+TCL_SUBST              =
+
+# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources
+# only. Doxygen will then generate output that is more tailored for C. For
+# instance, some of the names that are used will be different. The list of all
+# members will be omitted, etc.
+# The default value is: NO.
 
 OPTIMIZE_OUTPUT_FOR_C  = NO
 
-# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java 
-# sources only. Doxygen will then generate output that is more tailored for Java. 
-# For instance, namespaces will be presented as packages, qualified scopes 
-# will look different, etc.
+# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or
+# Python sources only. Doxygen will then generate output that is more tailored
+# for that language. For instance, namespaces will be presented as packages,
+# qualified scopes will look different, etc.
+# The default value is: NO.
 
 OPTIMIZE_OUTPUT_JAVA   = NO
 
-# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want to 
-# include (a tag file for) the STL sources as input, then you should 
-# set this tag to YES in order to let doxygen match functions declarations and 
-# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. 
-# func(std::string) {}). This also make the inheritance and collaboration 
-# diagrams that involve STL classes more complete and accurate.
+# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran
+# sources. Doxygen will then generate output that is tailored for Fortran.
+# The default value is: NO.
 
-BUILTIN_STL_SUPPORT    = NO
+OPTIMIZE_FOR_FORTRAN   = NO
+
+# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL
+# sources. Doxygen will then generate output that is tailored for VHDL.
+# The default value is: NO.
+
+OPTIMIZE_OUTPUT_VHDL   = NO
+
+# Doxygen selects the parser to use depending on the extension of the files it
+# parses. With this tag you can assign which parser to use for a given
+# extension. Doxygen has a built-in mapping, but you can override or extend it
+# using this tag. The format is ext=language, where ext is a file extension, and
+# language is one of the parsers supported by doxygen: IDL, Java, Javascript,
+# C#, C, C++, D, PHP, Objective-C, Python, Fortran, VHDL. For instance to make
+# doxygen treat .inc files as Fortran files (default is PHP), and .f files as C
+# (default is Fortran), use: inc=Fortran f=C.
+#
+# Note For files without extension you can use no_extension as a placeholder.
+#
+# Note that for custom extensions you also need to set FILE_PATTERNS otherwise
+# the files are not read by doxygen.
+
+EXTENSION_MAPPING      =
+
+# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments
+# according to the Markdown format, which allows for more readable
+# documentation. See http://daringfireball.net/projects/markdown/ for details.
+# The output of markdown processing is further processed by doxygen, so you can
+# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in
+# case of backward compatibilities issues.
+# The default value is: YES.
+
+MARKDOWN_SUPPORT       = YES
+
+# When enabled doxygen tries to link words that correspond to documented
+# classes, or namespaces to their corresponding documentation. Such a link can
+# be prevented in individual cases by by putting a % sign in front of the word
+# or globally by setting AUTOLINK_SUPPORT to NO.
+# The default value is: YES.
+
+AUTOLINK_SUPPORT       = YES
+
+# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want
+# to include (a tag file for) the STL sources as input, then you should set this
+# tag to YES in order to let doxygen match functions declarations and
+# definitions whose arguments contain STL classes (e.g. func(std::string);
+# versus func(std::string) {}). This also make the inheritance and collaboration
+# diagrams that involve STL classes more complete and accurate.
+# The default value is: NO.
+
+BUILTIN_STL_SUPPORT    = YES
 
 # If you use Microsoft's C++/CLI language, you should set this option to YES to
 # enable parsing support.
+# The default value is: NO.
 
 CPP_CLI_SUPPORT        = NO
 
-# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC 
-# tag is set to YES, then doxygen will reuse the documentation of the first 
-# member in the group (if any) for the other members of the group. By default 
+# Set the SIP_SUPPORT tag to YES if your project consists of sip (see:
+# http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen
+# will parse them like normal C++ but will assume all classes use public instead
+# of private inheritance when no explicit protection keyword is present.
+# The default value is: NO.
+
+SIP_SUPPORT            = NO
+
+# For Microsoft's IDL there are propget and propput attributes to indicate
+# getter and setter methods for a property. Setting this option to YES will make
+# doxygen to replace the get and set methods by a property in the documentation.
+# This will only work if the methods are indeed getting or setting a simple
+# type. If this is not the case, or you want to show the methods anyway, you
+# should set this option to NO.
+# The default value is: YES.
+
+IDL_PROPERTY_SUPPORT   = YES
+
+# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
+# tag is set to YES, then doxygen will reuse the documentation of the first
+# member in the group (if any) for the other members of the group. By default
 # all members of a group must be documented explicitly.
+# The default value is: NO.
 
 DISTRIBUTE_GROUP_DOC   = NO
 
-# Set the SUBGROUPING tag to YES (the default) to allow class member groups of 
-# the same type (for instance a group of public functions) to be put as a 
-# subgroup of that type (e.g. under the Public Functions section). Set it to 
-# NO to prevent subgrouping. Alternatively, this can be done per class using 
-# the \nosubgrouping command.
+# Set the SUBGROUPING tag to YES to allow class member groups of the same type
+# (for instance a group of public functions) to be put as a subgroup of that
+# type (e.g. under the Public Functions section). Set it to NO to prevent
+# subgrouping. Alternatively, this can be done per class using the
+# \nosubgrouping command.
+# The default value is: YES.
 
 SUBGROUPING            = YES
 
+# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions
+# are shown inside the group in which they are included (e.g. using \ingroup)
+# instead of on a separate page (for HTML and Man pages) or section (for LaTeX
+# and RTF).
+#
+# Note that this feature does not work in combination with
+# SEPARATE_MEMBER_PAGES.
+# The default value is: NO.
+
+INLINE_GROUPED_CLASSES = NO
+
+# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions
+# with only public data fields or simple typedef fields will be shown inline in
+# the documentation of the scope in which they are defined (i.e. file,
+# namespace, or group documentation), provided this scope is documented. If set
+# to NO, structs, classes, and unions are shown on a separate page (for HTML and
+# Man pages) or section (for LaTeX and RTF).
+# The default value is: NO.
+
+INLINE_SIMPLE_STRUCTS  = NO
+
+# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or
+# enum is documented as struct, union, or enum with the name of the typedef. So
+# typedef struct TypeS {} TypeT, will appear in the documentation as a struct
+# with name TypeT. When disabled the typedef will appear as a member of a file,
+# namespace, or class. And the struct will be named TypeS. This can typically be
+# useful for C code in case the coding convention dictates that all compound
+# types are typedef'ed and only the typedef is referenced, never the tag name.
+# The default value is: NO.
+
+TYPEDEF_HIDES_STRUCT   = NO
+
+# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This
+# cache is used to resolve symbols given their name and scope. Since this can be
+# an expensive process and often the same symbol appears multiple times in the
+# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small
+# doxygen will become slower. If the cache is too large, memory is wasted. The
+# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range
+# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536
+# symbols. At the end of a run doxygen will report the cache usage and suggest
+# the optimal cache size from a speed point of view.
+# Minimum value: 0, maximum value: 9, default value: 0.
+
+LOOKUP_CACHE_SIZE      = 0
+
 #---------------------------------------------------------------------------
 # Build related configuration options
 #---------------------------------------------------------------------------
 
-# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in 
-# documentation are documented, even if no documentation was available. 
-# Private class members and static file members will be hidden unless 
-# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
+# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
+# documentation are documented, even if no documentation was available. Private
+# class members and static file members will be hidden unless the
+# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES.
+# Note: This will also disable the warnings about undocumented members that are
+# normally produced when WARNINGS is set to YES.
+# The default value is: NO.
 
 EXTRACT_ALL            = YES
 
-# If the EXTRACT_PRIVATE tag is set to YES all private members of a class 
-# will be included in the documentation.
+# If the EXTRACT_PRIVATE tag is set to YES all private members of a class will
+# be included in the documentation.
+# The default value is: NO.
 
 EXTRACT_PRIVATE        = NO
 
-# If the EXTRACT_STATIC tag is set to YES all static members of a file 
-# will be included in the documentation.
+# If the EXTRACT_PACKAGE tag is set to YES all members with package or internal
+# scope will be included in the documentation.
+# The default value is: NO.
+
+EXTRACT_PACKAGE        = NO
+
+# If the EXTRACT_STATIC tag is set to YES all static members of a file will be
+# included in the documentation.
+# The default value is: NO.
 
 EXTRACT_STATIC         = YES
 
-# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) 
-# defined locally in source files will be included in the documentation. 
-# If set to NO only classes defined in header files are included.
+# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) defined
+# locally in source files will be included in the documentation. If set to NO
+# only classes defined in header files are included. Does not have any effect
+# for Java sources.
+# The default value is: YES.
 
 EXTRACT_LOCAL_CLASSES  = NO
 
-# This flag is only useful for Objective-C code. When set to YES local 
-# methods, which are defined in the implementation section but not in 
-# the interface are included in the documentation. 
-# If set to NO (the default) only methods in the interface are included.
+# This flag is only useful for Objective-C code. When set to YES local methods,
+# which are defined in the implementation section but not in the interface are
+# included in the documentation. If set to NO only methods in the interface are
+# included.
+# The default value is: NO.
 
 EXTRACT_LOCAL_METHODS  = NO
 
-# If this flag is set to YES, the members of anonymous namespaces will be extracted 
-# and appear in the documentation as a namespace called 'anonymous_namespace{file}', 
-# where file will be replaced with the base name of the file that contains the anonymous 
-# namespace. By default anonymous namespace are hidden.
+# If this flag is set to YES, the members of anonymous namespaces will be
+# extracted and appear in the documentation as a namespace called
+# 'anonymous_namespace{file}', where file will be replaced with the base name of
+# the file that contains the anonymous namespace. By default anonymous namespace
+# are hidden.
+# The default value is: NO.
 
 EXTRACT_ANON_NSPACES   = NO
 
-# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all 
-# undocumented members of documented classes, files or namespaces. 
-# If set to NO (the default) these members will be included in the 
-# various overviews, but no documentation section is generated. 
-# This option has no effect if EXTRACT_ALL is enabled.
+# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all
+# undocumented members inside documented classes or files. If set to NO these
+# members will be included in the various overviews, but no documentation
+# section is generated. This option has no effect if EXTRACT_ALL is enabled.
+# The default value is: NO.
 
 HIDE_UNDOC_MEMBERS     = NO
 
-# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all 
-# undocumented classes that are normally visible in the class hierarchy. 
-# If set to NO (the default) these classes will be included in the various 
-# overviews. This option has no effect if EXTRACT_ALL is enabled.
+# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all
+# undocumented classes that are normally visible in the class hierarchy. If set
+# to NO these classes will be included in the various overviews. This option has
+# no effect if EXTRACT_ALL is enabled.
+# The default value is: NO.
 
 HIDE_UNDOC_CLASSES     = NO
 
-# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all 
-# friend (class|struct|union) declarations. 
-# If set to NO (the default) these declarations will be included in the 
-# documentation.
+# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend
+# (class|struct|union) declarations. If set to NO these declarations will be
+# included in the documentation.
+# The default value is: NO.
 
 HIDE_FRIEND_COMPOUNDS  = NO
 
-# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any 
-# documentation blocks found inside the body of a function. 
-# If set to NO (the default) these blocks will be appended to the 
-# function's detailed documentation block.
+# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any
+# documentation blocks found inside the body of a function. If set to NO these
+# blocks will be appended to the function's detailed documentation block.
+# The default value is: NO.
 
 HIDE_IN_BODY_DOCS      = NO
 
-# The INTERNAL_DOCS tag determines if documentation 
-# that is typed after a \internal command is included. If the tag is set 
-# to NO (the default) then the documentation will be excluded. 
-# Set it to YES to include the internal documentation.
+# The INTERNAL_DOCS tag determines if documentation that is typed after a
+# \internal command is included. If the tag is set to NO then the documentation
+# will be excluded. Set it to YES to include the internal documentation.
+# The default value is: NO.
 
 INTERNAL_DOCS          = NO
 
-# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate 
-# file names in lower-case letters. If set to YES upper-case letters are also 
-# allowed. This is useful if you have classes or files whose names only differ 
-# in case and if your file system supports case sensitive file names. Windows 
+# If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file
+# names in lower-case letters. If set to YES upper-case letters are also
+# allowed. This is useful if you have classes or files whose names only differ
+# in case and if your file system supports case sensitive file names. Windows
 # and Mac users are advised to set this option to NO.
+# The default value is: system dependent.
 
 CASE_SENSE_NAMES       = NO
 
-# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen 
-# will show members with their full class and namespace scopes in the 
-# documentation. If set to YES the scope will be hidden.
+# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with
+# their full class and namespace scopes in the documentation. If set to YES the
+# scope will be hidden.
+# The default value is: NO.
 
 HIDE_SCOPE_NAMES       = YES
 
-# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen 
-# will put a list of the files that are included by a file in the documentation 
-# of that file.
+# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of
+# the files that are included by a file in the documentation of that file.
+# The default value is: YES.
 
 SHOW_INCLUDE_FILES     = NO
 
-# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] 
-# is inserted in the documentation for inline members.
+# If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each
+# grouped member an include statement to the documentation, telling the reader
+# which file to include in order to use the member.
+# The default value is: NO.
+
+SHOW_GROUPED_MEMB_INC  = NO
+
+# If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include
+# files with double quotes in the documentation rather than with sharp brackets.
+# The default value is: NO.
+
+FORCE_LOCAL_INCLUDES   = NO
+
+# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the
+# documentation for inline members.
+# The default value is: YES.
 
 INLINE_INFO            = YES
 
-# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen 
-# will sort the (detailed) documentation of file and class members 
-# alphabetically by member name. If set to NO the members will appear in 
-# declaration order.
+# If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the
+# (detailed) documentation of file and class members alphabetically by member
+# name. If set to NO the members will appear in declaration order.
+# The default value is: YES.
 
 SORT_MEMBER_DOCS       = YES
 
-# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the 
-# brief documentation of file, namespace and class members alphabetically 
-# by member name. If set to NO (the default) the members will appear in 
-# declaration order.
+# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief
+# descriptions of file, namespace and class members alphabetically by member
+# name. If set to NO the members will appear in declaration order. Note that
+# this will also influence the order of the classes in the class list.
+# The default value is: NO.
 
 SORT_BRIEF_DOCS        = NO
 
-# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be 
-# sorted by fully-qualified names, including namespaces. If set to 
-# NO (the default), the class list will be sorted only by class name, 
-# not including the namespace part. 
+# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the
+# (brief and detailed) documentation of class members so that constructors and
+# destructors are listed first. If set to NO the constructors will appear in the
+# respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS.
+# Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief
+# member documentation.
+# Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting
+# detailed member documentation.
+# The default value is: NO.
+
+SORT_MEMBERS_CTORS_1ST = NO
+
+# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy
+# of group names into alphabetical order. If set to NO the group names will
+# appear in their defined order.
+# The default value is: NO.
+
+SORT_GROUP_NAMES       = NO
+
+# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by
+# fully-qualified names, including namespaces. If set to NO, the class list will
+# be sorted only by class name, not including the namespace part.
 # Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
-# Note: This option applies only to the class list, not to the 
-# alphabetical list.
+# Note: This option applies only to the class list, not to the alphabetical
+# list.
+# The default value is: NO.
 
 SORT_BY_SCOPE_NAME     = NO
 
-# The GENERATE_TODOLIST tag can be used to enable (YES) or 
-# disable (NO) the todo list. This list is created by putting \todo 
-# commands in the documentation.
+# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper
+# type resolution of all parameters of a function it will reject a match between
+# the prototype and the implementation of a member function even if there is
+# only one candidate or it is obvious which candidate to choose by doing a
+# simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still
+# accept a match between prototype and implementation in such cases.
+# The default value is: NO.
+
+STRICT_PROTO_MATCHING  = NO
+
+# The GENERATE_TODOLIST tag can be used to enable ( YES) or disable ( NO) the
+# todo list. This list is created by putting \todo commands in the
+# documentation.
+# The default value is: YES.
 
 GENERATE_TODOLIST      = YES
 
-# The GENERATE_TESTLIST tag can be used to enable (YES) or 
-# disable (NO) the test list. This list is created by putting \test 
-# commands in the documentation.
+# The GENERATE_TESTLIST tag can be used to enable ( YES) or disable ( NO) the
+# test list. This list is created by putting \test commands in the
+# documentation.
+# The default value is: YES.
 
 GENERATE_TESTLIST      = YES
 
-# The GENERATE_BUGLIST tag can be used to enable (YES) or 
-# disable (NO) the bug list. This list is created by putting \bug 
-# commands in the documentation.
+# The GENERATE_BUGLIST tag can be used to enable ( YES) or disable ( NO) the bug
+# list. This list is created by putting \bug commands in the documentation.
+# The default value is: YES.
 
 GENERATE_BUGLIST       = YES
 
-# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or 
-# disable (NO) the deprecated list. This list is created by putting 
-# \deprecated commands in the documentation.
+# The GENERATE_DEPRECATEDLIST tag can be used to enable ( YES) or disable ( NO)
+# the deprecated list. This list is created by putting \deprecated commands in
+# the documentation.
+# The default value is: YES.
 
 GENERATE_DEPRECATEDLIST= NO
 
-# The ENABLED_SECTIONS tag can be used to enable conditional 
-# documentation sections, marked by \if sectionname ... \endif.
+# The ENABLED_SECTIONS tag can be used to enable conditional documentation
+# sections, marked by \if <section_label> ... \endif and \cond <section_label>
+# ... \endcond blocks.
 
-ENABLED_SECTIONS       = 
+ENABLED_SECTIONS       =
 
-# The MAX_INITIALIZER_LINES tag determines the maximum number of lines 
-# the initial value of a variable or define consists of for it to appear in 
-# the documentation. If the initializer consists of more lines than specified 
-# here it will be hidden. Use a value of 0 to hide initializers completely. 
-# The appearance of the initializer of individual variables and defines in the 
-# documentation can be controlled using \showinitializer or \hideinitializer 
-# command in the documentation regardless of this setting.
+# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the
+# initial value of a variable or macro / define can have for it to appear in the
+# documentation. If the initializer consists of more lines than specified here
+# it will be hidden. Use a value of 0 to hide initializers completely. The
+# appearance of the value of individual variables and macros / defines can be
+# controlled using \showinitializer or \hideinitializer command in the
+# documentation regardless of this setting.
+# Minimum value: 0, maximum value: 10000, default value: 30.
 
 MAX_INITIALIZER_LINES  = 30
 
-# Set the SHOW_USED_FILES tag to NO to disable the list of files generated 
-# at the bottom of the documentation of classes and structs. If set to YES the 
-# list will mention the files that were used to generate the documentation.
+# Set the SHOW_USED_FILES tag to NO to disable the list of files generated at
+# the bottom of the documentation of classes and structs. If set to YES the list
+# will mention the files that were used to generate the documentation.
+# The default value is: YES.
 
 SHOW_USED_FILES        = YES
 
-# If the sources in your project are distributed over multiple directories 
-# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy 
-# in the documentation. The default is NO.
+# Set the SHOW_FILES tag to NO to disable the generation of the Files page. This
+# will remove the Files entry from the Quick Index and from the Folder Tree View
+# (if specified).
+# The default value is: YES.
 
-SHOW_DIRECTORIES       = NO
+SHOW_FILES             = YES
 
-# The FILE_VERSION_FILTER tag can be used to specify a program or script that 
-# doxygen should invoke to get the current version for each file (typically from the 
-# version control system). Doxygen will invoke the program by executing (via 
-# popen()) the command <command> <input-file>, where <command> is the value of 
-# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file 
-# provided by doxygen. Whatever the program writes to standard output 
-# is used as the file version. See the manual for examples.
+# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces
+# page. This will remove the Namespaces entry from the Quick Index and from the
+# Folder Tree View (if specified).
+# The default value is: YES.
 
-FILE_VERSION_FILTER    = 
+SHOW_NAMESPACES        = YES
+
+# The FILE_VERSION_FILTER tag can be used to specify a program or script that
+# doxygen should invoke to get the current version for each file (typically from
+# the version control system). Doxygen will invoke the program by executing (via
+# popen()) the command command input-file, where command is the value of the
+# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided
+# by doxygen. Whatever the program writes to standard output is used as the file
+# version. For an example see the documentation.
+
+FILE_VERSION_FILTER    =
+
+# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed
+# by doxygen. The layout file controls the global structure of the generated
+# output files in an output format independent way. To create the layout file
+# that represents doxygen's defaults, run doxygen with the -l option. You can
+# optionally specify a file name after the option, if omitted DoxygenLayout.xml
+# will be used as the name of the layout file.
+#
+# Note that if you run doxygen from a directory containing a file called
+# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE
+# tag is left empty.
+
+LAYOUT_FILE            =
+
+# The CITE_BIB_FILES tag can be used to specify one or more bib files containing
+# the reference definitions. This must be a list of .bib files. The .bib
+# extension is automatically appended if omitted. This requires the bibtex tool
+# to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info.
+# For LaTeX the style of the bibliography can be controlled using
+# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the
+# search path. Do not use file names with spaces, bibtex cannot handle them. See
+# also \cite for info how to create references.
+
+CITE_BIB_FILES         =
 
 #---------------------------------------------------------------------------
-# configuration options related to warning and progress messages
+# Configuration options related to warning and progress messages
 #---------------------------------------------------------------------------
 
-# The QUIET tag can be used to turn on/off the messages that are generated 
-# by doxygen. Possible values are YES and NO. If left blank NO is used.
+# The QUIET tag can be used to turn on/off the messages that are generated to
+# standard output by doxygen. If QUIET is set to YES this implies that the
+# messages are off.
+# The default value is: NO.
 
 QUIET                  = NO
 
-# The WARNINGS tag can be used to turn on/off the warning messages that are 
-# generated by doxygen. Possible values are YES and NO. If left blank 
-# NO is used.
+# The WARNINGS tag can be used to turn on/off the warning messages that are
+# generated to standard error ( stderr) by doxygen. If WARNINGS is set to YES
+# this implies that the warnings are on.
+#
+# Tip: Turn warnings on while writing the documentation.
+# The default value is: YES.
 
 WARNINGS               = YES
 
-# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings 
-# for undocumented members. If EXTRACT_ALL is set to YES then this flag will 
-# automatically be disabled.
+# If the WARN_IF_UNDOCUMENTED tag is set to YES, then doxygen will generate
+# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag
+# will automatically be disabled.
+# The default value is: YES.
 
 WARN_IF_UNDOCUMENTED   = NO
 
-# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for 
-# potential errors in the documentation, such as not documenting some 
-# parameters in a documented function, or documenting parameters that 
-# don't exist or using markup commands wrongly.
+# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for
+# potential errors in the documentation, such as not documenting some parameters
+# in a documented function, or documenting parameters that don't exist or using
+# markup commands wrongly.
+# The default value is: YES.
 
 WARN_IF_DOC_ERROR      = YES
 
-# This WARN_NO_PARAMDOC option can be abled to get warnings for 
-# functions that are documented, but have no documentation for their parameters 
-# or return value. If set to NO (the default) doxygen will only warn about 
-# wrong or incomplete parameter documentation, but not about the absence of 
-# documentation.
+# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that
+# are documented, but have no documentation for their parameters or return
+# value. If set to NO doxygen will only warn about wrong or incomplete parameter
+# documentation, but not about the absence of documentation.
+# The default value is: NO.
 
 WARN_NO_PARAMDOC       = NO
 
-# The WARN_FORMAT tag determines the format of the warning messages that 
-# doxygen can produce. The string should contain the $file, $line, and $text 
-# tags, which will be replaced by the file and line number from which the 
-# warning originated and the warning text. Optionally the format may contain 
-# $version, which will be replaced by the version of the file (if it could 
-# be obtained via FILE_VERSION_FILTER)
+# The WARN_FORMAT tag determines the format of the warning messages that doxygen
+# can produce. The string should contain the $file, $line, and $text tags, which
+# will be replaced by the file and line number from which the warning originated
+# and the warning text. Optionally the format may contain $version, which will
+# be replaced by the version of the file (if it could be obtained via
+# FILE_VERSION_FILTER)
+# The default value is: $file:$line: $text.
 
-WARN_FORMAT            = "$file:$line: $text "
+WARN_FORMAT            = "$file:$line: $text"
 
-# The WARN_LOGFILE tag can be used to specify a file to which warning 
-# and error messages should be written. If left blank the output is written 
-# to stderr.
+# The WARN_LOGFILE tag can be used to specify a file to which warning and error
+# messages should be written. If left blank the output is written to standard
+# error (stderr).
 
-WARN_LOGFILE           = 
+WARN_LOGFILE           =
 
 #---------------------------------------------------------------------------
-# configuration options related to the input files
+# Configuration options related to the input files
 #---------------------------------------------------------------------------
 
-# The INPUT tag can be used to specify the files and/or directories that contain 
-# documented source files. You may enter file names like "myfile.cpp" or 
-# directories like "/usr/src/myproject". Separate the files or directories 
-# with spaces.
+# The INPUT tag is used to specify the files and/or directories that contain
+# documented source files. You may enter file names like myfile.cpp or
+# directories like /usr/src/myproject. Separate the files or directories with
+# spaces.
+# Note: If this tag is empty the current directory is searched.
 
-INPUT                  = \
-			@base_dir@/src/main/include \ 
-			@base_dir@/src/site/doxy/mainpage.dox
+INPUT                  = @base_dir@/src/main/include \
+                         @base_dir@/target/mainpage.dox
 
-# If the value of the INPUT tag contains directories, you can use the 
-# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 
-# and *.h) to filter out the source-files in the directories. If left 
-# blank the following patterns are tested: 
-# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx 
-# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py
+# This tag can be used to specify the character encoding of the source files
+# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
+# libiconv (or the iconv built into libc) for the transcoding. See the libiconv
+# documentation (see: http://www.gnu.org/software/libiconv) for the list of
+# possible encodings.
+# The default value is: UTF-8.
+
+INPUT_ENCODING         = UTF-8
+
+# If the value of the INPUT tag contains directories, you can use the
+# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and
+# *.h) to filter out the source-files in the directories. If left blank the
+# following patterns are tested:*.c, *.cc, *.cxx, *.cpp, *.c++, *.java, *.ii,
+# *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, *.hh, *.hxx, *.hpp,
+# *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, *.m, *.markdown,
+# *.md, *.mm, *.dox, *.py, *.f90, *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf,
+# *.qsf, *.as and *.js.
 
 FILE_PATTERNS          = *.h
 
-# The RECURSIVE tag can be used to turn specify whether or not subdirectories 
-# should be searched for input files as well. Possible values are YES and NO. 
-# If left blank NO is used.
+# The RECURSIVE tag can be used to specify whether or not subdirectories should
+# be searched for input files as well.
+# The default value is: NO.
 
 RECURSIVE              = YES
 
-# The EXCLUDE tag can be used to specify files and/or directories that should 
-# excluded from the INPUT source files. This way you can easily exclude a 
+# The EXCLUDE tag can be used to specify files and/or directories that should be
+# excluded from the INPUT source files. This way you can easily exclude a
 # subdirectory from a directory tree whose root is specified with the INPUT tag.
+#
+# Note that relative paths are relative to the directory from which doxygen is
+# run.
 
-EXCLUDE                = 
+EXCLUDE                =
 
-# The EXCLUDE_SYMLINKS tag can be used select whether or not files or 
-# directories that are symbolic links (a Unix filesystem feature) are excluded 
+# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
+# directories that are symbolic links (a Unix file system feature) are excluded
 # from the input.
+# The default value is: NO.
 
 EXCLUDE_SYMLINKS       = NO
 
-# If the value of the INPUT tag contains directories, you can use the 
-# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude 
-# certain files from those directories. Note that the wildcards are matched 
-# against the file with absolute path, so to exclude all test directories 
-# for example use the pattern */test/*
+# If the value of the INPUT tag contains directories, you can use the
+# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
+# certain files from those directories.
+#
+# Note that the wildcards are matched against the file with absolute path, so to
+# exclude all test directories for example use the pattern */test/*
 
-EXCLUDE_PATTERNS       = 
+EXCLUDE_PATTERNS       =
 
-# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names 
-# (namespaces, classes, functions, etc.) that should be excluded from the output. 
-# The symbol name can be a fully qualified name, a word, or if the wildcard * is used, 
-# a substring. Examples: ANamespace, AClass, AClass::ANamespace, ANamespace::*Test
+# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
+# (namespaces, classes, functions, etc.) that should be excluded from the
+# output. The symbol name can be a fully qualified name, a word, or if the
+# wildcard * is used, a substring. Examples: ANamespace, AClass,
+# AClass::ANamespace, ANamespace::*Test
+#
+# Note that the wildcards are matched against the file with absolute path, so to
+# exclude all test directories use the pattern */test/*
 
-EXCLUDE_SYMBOLS        = 
+EXCLUDE_SYMBOLS        =
 
-# The EXAMPLE_PATH tag can be used to specify one or more files or 
-# directories that contain example code fragments that are included (see 
-# the \include command).
+# The EXAMPLE_PATH tag can be used to specify one or more files or directories
+# that contain example code fragments that are included (see the \include
+# command).
 
-EXAMPLE_PATH           = 
+EXAMPLE_PATH           =
 
-# If the value of the EXAMPLE_PATH tag contains directories, you can use the 
-# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 
-# and *.h) to filter out the source-files in the directories. If left 
-# blank all files are included.
+# If the value of the EXAMPLE_PATH tag contains directories, you can use the
+# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and
+# *.h) to filter out the source-files in the directories. If left blank all
+# files are included.
 
-EXAMPLE_PATTERNS       = 
+EXAMPLE_PATTERNS       =
 
-# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be 
-# searched for input files to be used with the \include or \dontinclude 
-# commands irrespective of the value of the RECURSIVE tag. 
-# Possible values are YES and NO. If left blank NO is used.
+# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
+# searched for input files to be used with the \include or \dontinclude commands
+# irrespective of the value of the RECURSIVE tag.
+# The default value is: NO.
 
 EXAMPLE_RECURSIVE      = NO
 
-# The IMAGE_PATH tag can be used to specify one or more files or 
-# directories that contain image that are included in the documentation (see 
-# the \image command).
+# The IMAGE_PATH tag can be used to specify one or more files or directories
+# that contain images that are to be included in the documentation (see the
+# \image command).
 
-IMAGE_PATH             = 
+IMAGE_PATH             =
 
-# The INPUT_FILTER tag can be used to specify a program that doxygen should 
-# invoke to filter for each input file. Doxygen will invoke the filter program 
-# by executing (via popen()) the command <filter> <input-file>, where <filter> 
-# is the value of the INPUT_FILTER tag, and <input-file> is the name of an 
-# input file. Doxygen will then use the output that the filter program writes 
-# to standard output.  If FILTER_PATTERNS is specified, this tag will be 
-# ignored.
+# The INPUT_FILTER tag can be used to specify a program that doxygen should
+# invoke to filter for each input file. Doxygen will invoke the filter program
+# by executing (via popen()) the command:
+#
+# <filter> <input-file>
+#
+# where <filter> is the value of the INPUT_FILTER tag, and <input-file> is the
+# name of an input file. Doxygen will then use the output that the filter
+# program writes to standard output. If FILTER_PATTERNS is specified, this tag
+# will be ignored.
+#
+# Note that the filter must not add or remove lines; it is applied before the
+# code is scanned, but not when the output code is generated. If lines are added
+# or removed, the anchors will not be placed correctly.
 
-INPUT_FILTER           = 
+INPUT_FILTER           =
 
-# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern 
-# basis.  Doxygen will compare the file name with each pattern and apply the 
-# filter if there is a match.  The filters are a list of the form: 
-# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further 
-# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER 
-# is applied to all files.
+# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
+# basis. Doxygen will compare the file name with each pattern and apply the
+# filter if there is a match. The filters are a list of the form: pattern=filter
+# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how
+# filters are used. If the FILTER_PATTERNS tag is empty or if none of the
+# patterns match the file name, INPUT_FILTER is applied.
 
-FILTER_PATTERNS        = 
+FILTER_PATTERNS        =
 
-# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using 
-# INPUT_FILTER) will be used to filter the input files when producing source 
-# files to browse (i.e. when SOURCE_BROWSER is set to YES).
+# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
+# INPUT_FILTER ) will also be used to filter the input files that are used for
+# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES).
+# The default value is: NO.
 
 FILTER_SOURCE_FILES    = NO
 
+# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file
+# pattern. A pattern will override the setting for FILTER_PATTERN (if any) and
+# it is also possible to disable source filtering for a specific pattern using
+# *.ext= (so without naming a filter).
+# This tag requires that the tag FILTER_SOURCE_FILES is set to YES.
+
+FILTER_SOURCE_PATTERNS =
+
+# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that
+# is part of the input, its contents will be placed on the main page
+# (index.html). This can be useful if you have a project on for instance GitHub
+# and want to reuse the introduction page also for the doxygen output.
+
+USE_MDFILE_AS_MAINPAGE =
+
 #---------------------------------------------------------------------------
-# configuration options related to source browsing
+# Configuration options related to source browsing
 #---------------------------------------------------------------------------
 
-# If the SOURCE_BROWSER tag is set to YES then a list of source files will 
-# be generated. Documented entities will be cross-referenced with these sources. 
-# Note: To get rid of all source code in the generated output, make sure also 
-# VERBATIM_HEADERS is set to NO. If you have enabled CALL_GRAPH or CALLER_GRAPH 
-# then you must also enable this option. If you don't then doxygen will produce 
-# a warning and turn it on anyway
+# If the SOURCE_BROWSER tag is set to YES then a list of source files will be
+# generated. Documented entities will be cross-referenced with these sources.
+#
+# Note: To get rid of all source code in the generated output, make sure that
+# also VERBATIM_HEADERS is set to NO.
+# The default value is: NO.
 
 SOURCE_BROWSER         = NO
 
-# Setting the INLINE_SOURCES tag to YES will include the body 
-# of functions and classes directly in the documentation.
+# Setting the INLINE_SOURCES tag to YES will include the body of functions,
+# classes and enums directly into the documentation.
+# The default value is: NO.
 
 INLINE_SOURCES         = NO
 
-# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct 
-# doxygen to hide any special comment blocks from generated source code 
-# fragments. Normal C and C++ comments will always remain visible.
+# Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any
+# special comment blocks from generated source code fragments. Normal C, C++ and
+# Fortran comments will always remain visible.
+# The default value is: YES.
 
 STRIP_CODE_COMMENTS    = YES
 
-# If the REFERENCED_BY_RELATION tag is set to YES (the default) 
-# then for each documented function all documented 
-# functions referencing it will be listed.
+# If the REFERENCED_BY_RELATION tag is set to YES then for each documented
+# function all documented functions referencing it will be listed.
+# The default value is: NO.
 
 REFERENCED_BY_RELATION = NO
 
-# If the REFERENCES_RELATION tag is set to YES (the default) 
-# then for each documented function all documented entities 
-# called/used by that function will be listed.
+# If the REFERENCES_RELATION tag is set to YES then for each documented function
+# all documented entities called/used by that function will be listed.
+# The default value is: NO.
 
 REFERENCES_RELATION    = NO
 
-# If the REFERENCES_LINK_SOURCE tag is set to YES (the default)
-# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from
-# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will
-# link to the source code.  Otherwise they will link to the documentstion.
+# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set
+# to YES, then the hyperlinks from functions in REFERENCES_RELATION and
+# REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will
+# link to the documentation.
+# The default value is: YES.
 
 REFERENCES_LINK_SOURCE = YES
 
-# If the USE_HTAGS tag is set to YES then the references to source code 
-# will point to the HTML generated by the htags(1) tool instead of doxygen 
-# built-in source browser. The htags tool is part of GNU's global source 
-# tagging system (see http://www.gnu.org/software/global/global.html). You 
-# will need version 4.8.6 or higher.
+# If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the
+# source code will show a tooltip with additional information such as prototype,
+# brief description and links to the definition and documentation. Since this
+# will make the HTML file larger and loading of large files a bit slower, you
+# can opt to disable this feature.
+# The default value is: YES.
+# This tag requires that the tag SOURCE_BROWSER is set to YES.
+
+SOURCE_TOOLTIPS        = YES
+
+# If the USE_HTAGS tag is set to YES then the references to source code will
+# point to the HTML generated by the htags(1) tool instead of doxygen built-in
+# source browser. The htags tool is part of GNU's global source tagging system
+# (see http://www.gnu.org/software/global/global.html). You will need version
+# 4.8.6 or higher.
+#
+# To use it do the following:
+# - Install the latest version of global
+# - Enable SOURCE_BROWSER and USE_HTAGS in the config file
+# - Make sure the INPUT points to the root of the source tree
+# - Run doxygen as normal
+#
+# Doxygen will invoke htags (and that will in turn invoke gtags), so these
+# tools must be available from the command line (i.e. in the search path).
+#
+# The result: instead of the source browser generated by doxygen, the links to
+# source code will now point to the output of htags.
+# The default value is: NO.
+# This tag requires that the tag SOURCE_BROWSER is set to YES.
 
 USE_HTAGS              = NO
 
-# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen 
-# will generate a verbatim copy of the header file for each class for 
-# which an include is specified. Set to NO to disable this.
+# If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a
+# verbatim copy of the header file for each class for which an include is
+# specified. Set to NO to disable this.
+# See also: Section \class.
+# The default value is: YES.
 
 VERBATIM_HEADERS       = NO
 
+# If the CLANG_ASSISTED_PARSING tag is set to YES, then doxygen will use the
+# clang parser (see: http://clang.llvm.org/) for more acurate parsing at the
+# cost of reduced performance. This can be particularly helpful with template
+# rich C++ code for which doxygen's built-in parser lacks the necessary type
+# information.
+# Note: The availability of this option depends on whether or not doxygen was
+# compiled with the --with-libclang option.
+# The default value is: NO.
+
+CLANG_ASSISTED_PARSING = NO
+
+# If clang assisted parsing is enabled you can provide the compiler with command
+# line options that you would normally use when invoking the compiler. Note that
+# the include paths will already be set by doxygen for the files and directories
+# specified with INPUT and INCLUDE_PATH.
+# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES.
+
+CLANG_OPTIONS          =
+
 #---------------------------------------------------------------------------
-# configuration options related to the alphabetical class index
+# Configuration options related to the alphabetical class index
 #---------------------------------------------------------------------------
 
-# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index 
-# of all compounds will be generated. Enable this if the project 
-# contains a lot of classes, structs, unions or interfaces.
+# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all
+# compounds will be generated. Enable this if the project contains a lot of
+# classes, structs, unions or interfaces.
+# The default value is: YES.
 
 ALPHABETICAL_INDEX     = YES
 
-# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then 
-# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns 
-# in which this list will be split (can be a number in the range [1..20])
+# The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in
+# which the alphabetical index list will be split.
+# Minimum value: 1, maximum value: 20, default value: 5.
+# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
 
 COLS_IN_ALPHA_INDEX    = 2
 
-# In case all classes in a project start with a common prefix, all 
-# classes will be put under the same header in the alphabetical index. 
-# The IGNORE_PREFIX tag can be used to specify one or more prefixes that 
-# should be ignored while generating the index headers.
+# In case all classes in a project start with a common prefix, all classes will
+# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag
+# can be used to specify a prefix (or a list of prefixes) that should be ignored
+# while generating the index headers.
+# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
 
-IGNORE_PREFIX          = 
+IGNORE_PREFIX          =
 
 #---------------------------------------------------------------------------
-# configuration options related to the HTML output
+# Configuration options related to the HTML output
 #---------------------------------------------------------------------------
 
-# If the GENERATE_HTML tag is set to YES (the default) Doxygen will 
-# generate HTML output.
+# If the GENERATE_HTML tag is set to YES doxygen will generate HTML output
+# The default value is: YES.
 
 GENERATE_HTML          = YES
 
-# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. 
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
-# put in front of it. If left blank `html' will be used as the default path.
+# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it.
+# The default directory is: html.
+# This tag requires that the tag GENERATE_HTML is set to YES.
 
 HTML_OUTPUT            = @manual_dest@
 
-# The HTML_FILE_EXTENSION tag can be used to specify the file extension for 
-# each generated HTML page (for example: .htm,.php,.asp). If it is left blank 
-# doxygen will generate files with .html extension.
+# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each
+# generated HTML page (for example: .htm, .php, .asp).
+# The default value is: .html.
+# This tag requires that the tag GENERATE_HTML is set to YES.
 
 HTML_FILE_EXTENSION    = .html
 
-# The HTML_HEADER tag can be used to specify a personal HTML header for 
-# each generated HTML page. If it is left blank doxygen will generate a 
+# The HTML_HEADER tag can be used to specify a user-defined HTML header file for
+# each generated HTML page. If the tag is left blank doxygen will generate a
 # standard header.
+#
+# To get valid HTML the header file that includes any scripts and style sheets
+# that doxygen needs, which is dependent on the configuration options used (e.g.
+# the setting GENERATE_TREEVIEW). It is highly recommended to start with a
+# default header using
+# doxygen -w html new_header.html new_footer.html new_stylesheet.css
+# YourConfigFile
+# and then modify the file new_header.html. See also section "Doxygen usage"
+# for information on how to generate the default header that doxygen normally
+# uses.
+# Note: The header is subject to change so you typically have to regenerate the
+# default header when upgrading to a newer version of doxygen. For a description
+# of the possible markers and block names see the documentation.
+# This tag requires that the tag GENERATE_HTML is set to YES.
 
-HTML_HEADER            = 
+HTML_HEADER            =
 
-# The HTML_FOOTER tag can be used to specify a personal HTML footer for 
-# each generated HTML page. If it is left blank doxygen will generate a 
-# standard footer.
+# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each
+# generated HTML page. If the tag is left blank doxygen will generate a standard
+# footer. See HTML_HEADER for more information on how to generate a default
+# footer and what special commands can be used inside the footer. See also
+# section "Doxygen usage" for information on how to generate the default footer
+# that doxygen normally uses.
+# This tag requires that the tag GENERATE_HTML is set to YES.
 
 HTML_FOOTER            = @base_dir@/src/site/doxy/license_notice_footer.txt
 
-# The HTML_STYLESHEET tag can be used to specify a user-defined cascading 
-# style sheet that is used by each HTML page. It can be used to 
-# fine-tune the look of the HTML output. If the tag is left blank doxygen 
-# will generate a default style sheet. Note that doxygen will try to copy 
-# the style sheet file to the HTML output directory, so don't put your own 
-# stylesheet in the HTML output directory as well, or it will be erased!
+# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style
+# sheet that is used by each HTML page. It can be used to fine-tune the look of
+# the HTML output. If left blank doxygen will generate a default style sheet.
+# See also section "Doxygen usage" for information on how to generate the style
+# sheet that doxygen normally uses.
+# Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as
+# it is more robust and this tag (HTML_STYLESHEET) will in the future become
+# obsolete.
+# This tag requires that the tag GENERATE_HTML is set to YES.
 
-HTML_STYLESHEET        = 
+HTML_STYLESHEET        =
 
-# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, 
-# files or namespaces will be aligned in HTML using tables. If set to 
-# NO a bullet list will be used.
+# The HTML_EXTRA_STYLESHEET tag can be used to specify an additional user-
+# defined cascading style sheet that is included after the standard style sheets
+# created by doxygen. Using this option one can overrule certain style aspects.
+# This is preferred over using HTML_STYLESHEET since it does not replace the
+# standard style sheet and is therefor more robust against future updates.
+# Doxygen will copy the style sheet file to the output directory. For an example
+# see the documentation.
+# This tag requires that the tag GENERATE_HTML is set to YES.
 
-HTML_ALIGN_MEMBERS     = YES
+HTML_EXTRA_STYLESHEET  =
 
-# If the GENERATE_HTMLHELP tag is set to YES, additional index files 
-# will be generated that can be used as input for tools like the 
-# Microsoft HTML help workshop to generate a compressed HTML help file (.chm) 
-# of the generated HTML documentation.
+# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or
+# other source files which should be copied to the HTML output directory. Note
+# that these files will be copied to the base HTML output directory. Use the
+# $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these
+# files. In the HTML_STYLESHEET file, use the file name only. Also note that the
+# files will be copied as-is; there are no commands or markers available.
+# This tag requires that the tag GENERATE_HTML is set to YES.
 
-GENERATE_HTMLHELP      = NO
+HTML_EXTRA_FILES       =
 
-# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML 
-# documentation will contain sections that can be hidden and shown after the 
-# page has loaded. For this to work a browser that supports 
-# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox 
-# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari).
+# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen
+# will adjust the colors in the stylesheet and background images according to
+# this color. Hue is specified as an angle on a colorwheel, see
+# http://en.wikipedia.org/wiki/Hue for more information. For instance the value
+# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300
+# purple, and 360 is red again.
+# Minimum value: 0, maximum value: 359, default value: 220.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_COLORSTYLE_HUE    = 220
+
+# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors
+# in the HTML output. For a value of 0 the output will use grayscales only. A
+# value of 255 will produce the most vivid colors.
+# Minimum value: 0, maximum value: 255, default value: 100.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_COLORSTYLE_SAT    = 100
+
+# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the
+# luminance component of the colors in the HTML output. Values below 100
+# gradually make the output lighter, whereas values above 100 make the output
+# darker. The value divided by 100 is the actual gamma applied, so 80 represents
+# a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not
+# change the gamma.
+# Minimum value: 40, maximum value: 240, default value: 80.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_COLORSTYLE_GAMMA  = 80
+
+# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML
+# page will contain the date and time when the page was generated. Setting this
+# to NO can help when comparing the output of multiple runs.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_TIMESTAMP         = NO
+
+# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
+# documentation will contain sections that can be hidden and shown after the
+# page has loaded.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
 
 HTML_DYNAMIC_SECTIONS  = NO
 
-# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can 
-# be used to specify the file name of the resulting .chm file. You 
-# can add a path in front of the file if the result should not be 
+# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries
+# shown in the various tree structured indices initially; the user can expand
+# and collapse entries dynamically later on. Doxygen will expand the tree to
+# such a level that at most the specified number of entries are visible (unless
+# a fully collapsed tree already exceeds this amount). So setting the number of
+# entries 1 will produce a full collapsed tree by default. 0 is a special value
+# representing an infinite number of entries and will result in a full expanded
+# tree by default.
+# Minimum value: 0, maximum value: 9999, default value: 100.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_INDEX_NUM_ENTRIES = 100
+
+# If the GENERATE_DOCSET tag is set to YES, additional index files will be
+# generated that can be used as input for Apple's Xcode 3 integrated development
+# environment (see: http://developer.apple.com/tools/xcode/), introduced with
+# OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a
+# Makefile in the HTML output directory. Running make will produce the docset in
+# that directory and running make install will install the docset in
+# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at
+# startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html
+# for more information.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+GENERATE_DOCSET        = NO
+
+# This tag determines the name of the docset feed. A documentation feed provides
+# an umbrella under which multiple documentation sets from a single provider
+# (such as a company or product suite) can be grouped.
+# The default value is: Doxygen generated docs.
+# This tag requires that the tag GENERATE_DOCSET is set to YES.
+
+DOCSET_FEEDNAME        = "Doxygen generated docs"
+
+# This tag specifies a string that should uniquely identify the documentation
+# set bundle. This should be a reverse domain-name style string, e.g.
+# com.mycompany.MyDocSet. Doxygen will append .docset to the name.
+# The default value is: org.doxygen.Project.
+# This tag requires that the tag GENERATE_DOCSET is set to YES.
+
+DOCSET_BUNDLE_ID       = org.doxygen.Project
+
+# The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify
+# the documentation publisher. This should be a reverse domain-name style
+# string, e.g. com.mycompany.MyDocSet.documentation.
+# The default value is: org.doxygen.Publisher.
+# This tag requires that the tag GENERATE_DOCSET is set to YES.
+
+DOCSET_PUBLISHER_ID    = org.doxygen.Publisher
+
+# The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher.
+# The default value is: Publisher.
+# This tag requires that the tag GENERATE_DOCSET is set to YES.
+
+DOCSET_PUBLISHER_NAME  = Publisher
+
+# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three
+# additional HTML index files: index.hhp, index.hhc, and index.hhk. The
+# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop
+# (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on
+# Windows.
+#
+# The HTML Help Workshop contains a compiler that can convert all HTML output
+# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML
+# files are now used as the Windows 98 help format, and will replace the old
+# Windows help format (.hlp) on all Windows platforms in the future. Compressed
+# HTML files also contain an index, a table of contents, and you can search for
+# words in the documentation. The HTML workshop also contains a viewer for
+# compressed HTML files.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+GENERATE_HTMLHELP      = NO
+
+# The CHM_FILE tag can be used to specify the file name of the resulting .chm
+# file. You can add a path in front of the file if the result should not be
 # written to the html output directory.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
 
-CHM_FILE               = 
+CHM_FILE               =
 
-# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can 
-# be used to specify the location (absolute path including file name) of 
-# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run 
-# the HTML help compiler on the generated index.hhp.
+# The HHC_LOCATION tag can be used to specify the location (absolute path
+# including file name) of the HTML help compiler ( hhc.exe). If non-empty
+# doxygen will try to run the HTML help compiler on the generated index.hhp.
+# The file has to be specified with full path.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
 
-HHC_LOCATION           = 
+HHC_LOCATION           =
 
-# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag 
-# controls if a separate .chi index file is generated (YES) or that 
-# it should be included in the master .chm file (NO).
+# The GENERATE_CHI flag controls if a separate .chi index file is generated (
+# YES) or that it should be included in the master .chm file ( NO).
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
 
 GENERATE_CHI           = NO
 
-# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag 
-# controls whether a binary table of contents is generated (YES) or a 
-# normal table of contents (NO) in the .chm file.
+# The CHM_INDEX_ENCODING is used to encode HtmlHelp index ( hhk), content ( hhc)
+# and project file content.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+CHM_INDEX_ENCODING     =
+
+# The BINARY_TOC flag controls whether a binary table of contents is generated (
+# YES) or a normal table of contents ( NO) in the .chm file.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
 
 BINARY_TOC             = NO
 
-# The TOC_EXPAND flag can be set to YES to add extra items for group members 
-# to the contents of the HTML help documentation and to the tree view.
+# The TOC_EXPAND flag can be set to YES to add extra items for group members to
+# the table of contents of the HTML help documentation and to the tree view.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
 
 TOC_EXPAND             = NO
 
-# The DISABLE_INDEX tag can be used to turn on/off the condensed index at 
-# top of each HTML page. The value NO (the default) enables the index and 
-# the value YES disables it.
+# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and
+# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that
+# can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help
+# (.qch) of the generated HTML documentation.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+GENERATE_QHP           = NO
+
+# If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify
+# the file name of the resulting .qch file. The path specified is relative to
+# the HTML output folder.
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QCH_FILE               =
+
+# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help
+# Project output. For more information please see Qt Help Project / Namespace
+# (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace).
+# The default value is: org.doxygen.Project.
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_NAMESPACE          = org.doxygen.Project
+
+# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt
+# Help Project output. For more information please see Qt Help Project / Virtual
+# Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual-
+# folders).
+# The default value is: doc.
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_VIRTUAL_FOLDER     = doc
+
+# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom
+# filter to add. For more information please see Qt Help Project / Custom
+# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-
+# filters).
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_CUST_FILTER_NAME   =
+
+# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the
+# custom filter to add. For more information please see Qt Help Project / Custom
+# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-
+# filters).
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_CUST_FILTER_ATTRS  =
+
+# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this
+# project's filter section matches. Qt Help Project / Filter Attributes (see:
+# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes).
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_SECT_FILTER_ATTRS  =
+
+# The QHG_LOCATION tag can be used to specify the location of Qt's
+# qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the
+# generated .qhp file.
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHG_LOCATION           =
+
+# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be
+# generated, together with the HTML files, they form an Eclipse help plugin. To
+# install this plugin and make it available under the help contents menu in
+# Eclipse, the contents of the directory containing the HTML and XML files needs
+# to be copied into the plugins directory of eclipse. The name of the directory
+# within the plugins directory should be the same as the ECLIPSE_DOC_ID value.
+# After copying Eclipse needs to be restarted before the help appears.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+GENERATE_ECLIPSEHELP   = NO
+
+# A unique identifier for the Eclipse help plugin. When installing the plugin
+# the directory name containing the HTML and XML files should also have this
+# name. Each documentation set should have its own identifier.
+# The default value is: org.doxygen.Project.
+# This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES.
+
+ECLIPSE_DOC_ID         = org.doxygen.Project
+
+# If you want full control over the layout of the generated HTML pages it might
+# be necessary to disable the index and replace it with your own. The
+# DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top
+# of each HTML page. A value of NO enables the index and the value YES disables
+# it. Since the tabs in the index contain the same information as the navigation
+# tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
 
 DISABLE_INDEX          = NO
 
-# This tag can be used to set the number of enum values (range [1..20]) 
-# that doxygen will group on one line in the generated HTML documentation.
-
-ENUM_VALUES_PER_LINE   = 4
-
-# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be
-# generated containing a tree-like index structure (just like the one that 
-# is generated for HTML Help). For this to work a browser that supports 
-# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, 
-# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are 
-# probably better off using the HTML help feature.
+# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index
+# structure should be generated to display hierarchical information. If the tag
+# value is set to YES, a side panel will be generated containing a tree-like
+# index structure (just like the one that is generated for HTML Help). For this
+# to work a browser that supports JavaScript, DHTML, CSS and frames is required
+# (i.e. any modern browser). Windows users are probably better off using the
+# HTML help feature. Via custom stylesheets (see HTML_EXTRA_STYLESHEET) one can
+# further fine-tune the look of the index. As an example, the default style
+# sheet generated by doxygen has an example that shows how to put an image at
+# the root of the tree instead of the PROJECT_NAME. Since the tree basically has
+# the same information as the tab index, you could consider setting
+# DISABLE_INDEX to YES when enabling this option.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
 
 GENERATE_TREEVIEW      = YES
 
-# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be 
-# used to set the initial width (in pixels) of the frame in which the tree 
-# is shown.
+# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that
+# doxygen will group on one line in the generated HTML documentation.
+#
+# Note that a value of 0 will completely suppress the enum values from appearing
+# in the overview section.
+# Minimum value: 0, maximum value: 20, default value: 4.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+ENUM_VALUES_PER_LINE   = 4
+
+# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used
+# to set the initial width (in pixels) of the frame in which the tree is shown.
+# Minimum value: 0, maximum value: 1500, default value: 250.
+# This tag requires that the tag GENERATE_HTML is set to YES.
 
 TREEVIEW_WIDTH         = 250
 
+# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open links to
+# external symbols imported via tag files in a separate window.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+EXT_LINKS_IN_WINDOW    = NO
+
+# Use this tag to change the font size of LaTeX formulas included as images in
+# the HTML documentation. When you change the font size after a successful
+# doxygen run you need to manually remove any form_*.png images from the HTML
+# output directory to force them to be regenerated.
+# Minimum value: 8, maximum value: 50, default value: 10.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+FORMULA_FONTSIZE       = 10
+
+# Use the FORMULA_TRANPARENT tag to determine whether or not the images
+# generated for formulas are transparent PNGs. Transparent PNGs are not
+# supported properly for IE 6.0, but are supported on all modern browsers.
+#
+# Note that when changing this option you need to delete any form_*.png files in
+# the HTML output directory before the changes have effect.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+FORMULA_TRANSPARENT    = YES
+
+# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see
+# http://www.mathjax.org) which uses client side Javascript for the rendering
+# instead of using prerendered bitmaps. Use this if you do not have LaTeX
+# installed or if you want to formulas look prettier in the HTML output. When
+# enabled you may also need to install MathJax separately and configure the path
+# to it using the MATHJAX_RELPATH option.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+USE_MATHJAX            = NO
+
+# When MathJax is enabled you can set the default output format to be used for
+# the MathJax output. See the MathJax site (see:
+# http://docs.mathjax.org/en/latest/output.html) for more details.
+# Possible values are: HTML-CSS (which is slower, but has the best
+# compatibility), NativeMML (i.e. MathML) and SVG.
+# The default value is: HTML-CSS.
+# This tag requires that the tag USE_MATHJAX is set to YES.
+
+MATHJAX_FORMAT         = HTML-CSS
+
+# When MathJax is enabled you need to specify the location relative to the HTML
+# output directory using the MATHJAX_RELPATH option. The destination directory
+# should contain the MathJax.js script. For instance, if the mathjax directory
+# is located at the same level as the HTML output directory, then
+# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax
+# Content Delivery Network so you can quickly see the result without installing
+# MathJax. However, it is strongly recommended to install a local copy of
+# MathJax from http://www.mathjax.org before deployment.
+# The default value is: http://cdn.mathjax.org/mathjax/latest.
+# This tag requires that the tag USE_MATHJAX is set to YES.
+
+MATHJAX_RELPATH        = http://cdn.mathjax.org/mathjax/latest
+
+# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax
+# extension names that should be enabled during MathJax rendering. For example
+# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols
+# This tag requires that the tag USE_MATHJAX is set to YES.
+
+MATHJAX_EXTENSIONS     =
+
+# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces
+# of code that will be used on startup of the MathJax code. See the MathJax site
+# (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an
+# example see the documentation.
+# This tag requires that the tag USE_MATHJAX is set to YES.
+
+MATHJAX_CODEFILE       =
+
+# When the SEARCHENGINE tag is enabled doxygen will generate a search box for
+# the HTML output. The underlying search engine uses javascript and DHTML and
+# should work on any modern browser. Note that when using HTML help
+# (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET)
+# there is already a search function so this one should typically be disabled.
+# For large projects the javascript based search engine can be slow, then
+# enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to
+# search using the keyboard; to jump to the search box use <access key> + S
+# (what the <access key> is depends on the OS and browser, but it is typically
+# <CTRL>, <ALT>/<option>, or both). Inside the search box use the <cursor down
+# key> to jump into the search results window, the results can be navigated
+# using the <cursor keys>. Press <Enter> to select an item or <escape> to cancel
+# the search. The filter options can be selected when the cursor is inside the
+# search box by pressing <Shift>+<cursor down>. Also here use the <cursor keys>
+# to select a filter and <Enter> or <escape> to activate or cancel the filter
+# option.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+SEARCHENGINE           = YES
+
+# When the SERVER_BASED_SEARCH tag is enabled the search engine will be
+# implemented using a web server instead of a web client using Javascript. There
+# are two flavours of web server based searching depending on the
+# EXTERNAL_SEARCH setting. When disabled, doxygen will generate a PHP script for
+# searching and an index file used by the script. When EXTERNAL_SEARCH is
+# enabled the indexing and searching needs to be provided by external tools. See
+# the section "External Indexing and Searching" for details.
+# The default value is: NO.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+SERVER_BASED_SEARCH    = NO
+
+# When EXTERNAL_SEARCH tag is enabled doxygen will no longer generate the PHP
+# script for searching. Instead the search results are written to an XML file
+# which needs to be processed by an external indexer. Doxygen will invoke an
+# external search engine pointed to by the SEARCHENGINE_URL option to obtain the
+# search results.
+#
+# Doxygen ships with an example indexer ( doxyindexer) and search engine
+# (doxysearch.cgi) which are based on the open source search engine library
+# Xapian (see: http://xapian.org/).
+#
+# See the section "External Indexing and Searching" for details.
+# The default value is: NO.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+EXTERNAL_SEARCH        = NO
+
+# The SEARCHENGINE_URL should point to a search engine hosted by a web server
+# which will return the search results when EXTERNAL_SEARCH is enabled.
+#
+# Doxygen ships with an example indexer ( doxyindexer) and search engine
+# (doxysearch.cgi) which are based on the open source search engine library
+# Xapian (see: http://xapian.org/). See the section "External Indexing and
+# Searching" for details.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+SEARCHENGINE_URL       =
+
+# When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the unindexed
+# search data is written to a file for indexing by an external tool. With the
+# SEARCHDATA_FILE tag the name of this file can be specified.
+# The default file is: searchdata.xml.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+SEARCHDATA_FILE        = searchdata.xml
+
+# When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the
+# EXTERNAL_SEARCH_ID tag can be used as an identifier for the project. This is
+# useful in combination with EXTRA_SEARCH_MAPPINGS to search through multiple
+# projects and redirect the results back to the right project.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+EXTERNAL_SEARCH_ID     =
+
+# The EXTRA_SEARCH_MAPPINGS tag can be used to enable searching through doxygen
+# projects other than the one defined by this configuration file, but that are
+# all added to the same external search index. Each project needs to have a
+# unique id set via EXTERNAL_SEARCH_ID. The search mapping then maps the id of
+# to a relative location where the documentation can be found. The format is:
+# EXTRA_SEARCH_MAPPINGS = tagname1=loc1 tagname2=loc2 ...
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+EXTRA_SEARCH_MAPPINGS  =
+
 #---------------------------------------------------------------------------
-# configuration options related to the LaTeX output
+# Configuration options related to the LaTeX output
 #---------------------------------------------------------------------------
 
-# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will 
-# generate Latex output.
+# If the GENERATE_LATEX tag is set to YES doxygen will generate LaTeX output.
+# The default value is: YES.
 
 GENERATE_LATEX         = NO
 
-# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. 
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
-# put in front of it. If left blank `latex' will be used as the default path.
+# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it.
+# The default directory is: latex.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
 
 LATEX_OUTPUT           = latex
 
-# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be 
-# invoked. If left blank `latex' will be used as the default command name.
+# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
+# invoked.
+#
+# Note that when enabling USE_PDFLATEX this option is only used for generating
+# bitmaps for formulas in the HTML output, but not in the Makefile that is
+# written to the output directory.
+# The default file is: latex.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
 
 LATEX_CMD_NAME         = latex
 
-# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to 
-# generate index for LaTeX. If left blank `makeindex' will be used as the 
-# default command name.
+# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to generate
+# index for LaTeX.
+# The default file is: makeindex.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
 
 MAKEINDEX_CMD_NAME     = makeindex
 
-# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact 
-# LaTeX documents. This may be useful for small projects and may help to 
-# save some trees in general.
+# If the COMPACT_LATEX tag is set to YES doxygen generates more compact LaTeX
+# documents. This may be useful for small projects and may help to save some
+# trees in general.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
 
 COMPACT_LATEX          = NO
 
-# The PAPER_TYPE tag can be used to set the paper type that is used 
-# by the printer. Possible values are: a4, a4wide, letter, legal and 
-# executive. If left blank a4wide will be used.
+# The PAPER_TYPE tag can be used to set the paper type that is used by the
+# printer.
+# Possible values are: a4 (210 x 297 mm), letter (8.5 x 11 inches), legal (8.5 x
+# 14 inches) and executive (7.25 x 10.5 inches).
+# The default value is: a4.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
 
 PAPER_TYPE             = a4wide
 
-# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX 
-# packages that should be included in the LaTeX output.
+# The EXTRA_PACKAGES tag can be used to specify one or more LaTeX package names
+# that should be included in the LaTeX output. To get the times font for
+# instance you can specify
+# EXTRA_PACKAGES=times
+# If left blank no extra packages will be included.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
 
-EXTRA_PACKAGES         = 
+EXTRA_PACKAGES         =
 
-# The LATEX_HEADER tag can be used to specify a personal LaTeX header for 
-# the generated latex document. The header should contain everything until 
-# the first chapter. If it is left blank doxygen will generate a 
-# standard header. Notice: only use this tag if you know what you are doing!
+# The LATEX_HEADER tag can be used to specify a personal LaTeX header for the
+# generated LaTeX document. The header should contain everything until the first
+# chapter. If it is left blank doxygen will generate a standard header. See
+# section "Doxygen usage" for information on how to let doxygen write the
+# default header to a separate file.
+#
+# Note: Only use a user-defined header if you know what you are doing! The
+# following commands have a special meaning inside the header: $title,
+# $datetime, $date, $doxygenversion, $projectname, $projectnumber. Doxygen will
+# replace them by respectively the title of the page, the current date and time,
+# only the current date, the version number of doxygen, the project name (see
+# PROJECT_NAME), or the project number (see PROJECT_NUMBER).
+# This tag requires that the tag GENERATE_LATEX is set to YES.
 
-LATEX_HEADER           = 
+LATEX_HEADER           =
 
-# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated 
-# is prepared for conversion to pdf (using ps2pdf). The pdf file will 
-# contain links (just like the HTML output) instead of page references 
-# This makes the output suitable for online browsing using a pdf viewer.
+# The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for the
+# generated LaTeX document. The footer should contain everything after the last
+# chapter. If it is left blank doxygen will generate a standard footer.
+#
+# Note: Only use a user-defined footer if you know what you are doing!
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_FOOTER           =
+
+# The LATEX_EXTRA_FILES tag can be used to specify one or more extra images or
+# other source files which should be copied to the LATEX_OUTPUT output
+# directory. Note that the files will be copied as-is; there are no commands or
+# markers available.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_EXTRA_FILES      =
+
+# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated is
+# prepared for conversion to PDF (using ps2pdf or pdflatex). The PDF file will
+# contain links (just like the HTML output) instead of page references. This
+# makes the output suitable for online browsing using a PDF viewer.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
 
 PDF_HYPERLINKS         = NO
 
-# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of 
-# plain latex in the generated Makefile. Set this option to YES to get a 
+# If the LATEX_PDFLATEX tag is set to YES, doxygen will use pdflatex to generate
+# the PDF file directly from the LaTeX files. Set this option to YES to get a
 # higher quality PDF documentation.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
 
 USE_PDFLATEX           = NO
 
-# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. 
-# command to the generated LaTeX files. This will instruct LaTeX to keep 
-# running if errors occur, instead of asking the user for help. 
-# This option is also used when generating formulas in HTML.
+# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \batchmode
+# command to the generated LaTeX files. This will instruct LaTeX to keep running
+# if errors occur, instead of asking the user for help. This option is also used
+# when generating formulas in HTML.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
 
 LATEX_BATCHMODE        = NO
 
-# If LATEX_HIDE_INDICES is set to YES then doxygen will not 
-# include the index chapters (such as File Index, Compound Index, etc.) 
-# in the output.
+# If the LATEX_HIDE_INDICES tag is set to YES then doxygen will not include the
+# index chapters (such as File Index, Compound Index, etc.) in the output.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
 
 LATEX_HIDE_INDICES     = NO
 
+# If the LATEX_SOURCE_CODE tag is set to YES then doxygen will include source
+# code with syntax highlighting in the LaTeX output.
+#
+# Note that which sources are shown also depends on other settings such as
+# SOURCE_BROWSER.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_SOURCE_CODE      = NO
+
+# The LATEX_BIB_STYLE tag can be used to specify the style to use for the
+# bibliography, e.g. plainnat, or ieeetr. See
+# http://en.wikipedia.org/wiki/BibTeX and \cite for more info.
+# The default value is: plain.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_BIB_STYLE        = plain
+
 #---------------------------------------------------------------------------
-# configuration options related to the RTF output
+# Configuration options related to the RTF output
 #---------------------------------------------------------------------------
 
-# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output 
-# The RTF output is optimized for Word 97 and may not look very pretty with 
-# other RTF readers or editors.
+# If the GENERATE_RTF tag is set to YES doxygen will generate RTF output. The
+# RTF output is optimized for Word 97 and may not look too pretty with other RTF
+# readers/editors.
+# The default value is: NO.
 
 GENERATE_RTF           = NO
 
-# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. 
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
-# put in front of it. If left blank `rtf' will be used as the default path.
+# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it.
+# The default directory is: rtf.
+# This tag requires that the tag GENERATE_RTF is set to YES.
 
 RTF_OUTPUT             = rtf
 
-# If the COMPACT_RTF tag is set to YES Doxygen generates more compact 
-# RTF documents. This may be useful for small projects and may help to 
-# save some trees in general.
+# If the COMPACT_RTF tag is set to YES doxygen generates more compact RTF
+# documents. This may be useful for small projects and may help to save some
+# trees in general.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_RTF is set to YES.
 
 COMPACT_RTF            = NO
 
-# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated 
-# will contain hyperlink fields. The RTF file will 
-# contain links (just like the HTML output) instead of page references. 
-# This makes the output suitable for online browsing using WORD or other 
-# programs which support those fields. 
-# Note: wordpad (write) and others do not support links.
+# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated will
+# contain hyperlink fields. The RTF file will contain links (just like the HTML
+# output) instead of page references. This makes the output suitable for online
+# browsing using Word or some other Word compatible readers that support those
+# fields.
+#
+# Note: WordPad (write) and others do not support links.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_RTF is set to YES.
 
 RTF_HYPERLINKS         = NO
 
-# Load stylesheet definitions from file. Syntax is similar to doxygen's 
-# config file, i.e. a series of assignments. You only have to provide 
-# replacements, missing definitions are set to their default value.
+# Load stylesheet definitions from file. Syntax is similar to doxygen's config
+# file, i.e. a series of assignments. You only have to provide replacements,
+# missing definitions are set to their default value.
+#
+# See also section "Doxygen usage" for information on how to generate the
+# default style sheet that doxygen normally uses.
+# This tag requires that the tag GENERATE_RTF is set to YES.
 
-RTF_STYLESHEET_FILE    = 
+RTF_STYLESHEET_FILE    =
 
-# Set optional variables used in the generation of an rtf document. 
-# Syntax is similar to doxygen's config file.
+# Set optional variables used in the generation of an RTF document. Syntax is
+# similar to doxygen's config file. A template extensions file can be generated
+# using doxygen -e rtf extensionFile.
+# This tag requires that the tag GENERATE_RTF is set to YES.
 
-RTF_EXTENSIONS_FILE    = 
+RTF_EXTENSIONS_FILE    =
 
 #---------------------------------------------------------------------------
-# configuration options related to the man page output
+# Configuration options related to the man page output
 #---------------------------------------------------------------------------
 
-# If the GENERATE_MAN tag is set to YES (the default) Doxygen will 
-# generate man pages
+# If the GENERATE_MAN tag is set to YES doxygen will generate man pages for
+# classes and files.
+# The default value is: NO.
 
 GENERATE_MAN           = NO
 
-# The MAN_OUTPUT tag is used to specify where the man pages will be put. 
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
-# put in front of it. If left blank `man' will be used as the default path.
+# The MAN_OUTPUT tag is used to specify where the man pages will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it. A directory man3 will be created inside the directory specified by
+# MAN_OUTPUT.
+# The default directory is: man.
+# This tag requires that the tag GENERATE_MAN is set to YES.
 
 MAN_OUTPUT             = man
 
-# The MAN_EXTENSION tag determines the extension that is added to 
-# the generated man pages (default is the subroutine's section .3)
+# The MAN_EXTENSION tag determines the extension that is added to the generated
+# man pages. In case the manual section does not start with a number, the number
+# 3 is prepended. The dot (.) at the beginning of the MAN_EXTENSION tag is
+# optional.
+# The default value is: .3.
+# This tag requires that the tag GENERATE_MAN is set to YES.
 
 MAN_EXTENSION          = .3
 
-# If the MAN_LINKS tag is set to YES and Doxygen generates man output, 
-# then it will generate one additional man file for each entity 
-# documented in the real man page(s). These additional files 
-# only source the real man page, but without them the man command 
-# would be unable to find the correct page. The default is NO.
+# If the MAN_LINKS tag is set to YES and doxygen generates man output, then it
+# will generate one additional man file for each entity documented in the real
+# man page(s). These additional files only source the real man page, but without
+# them the man command would be unable to find the correct page.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_MAN is set to YES.
 
 MAN_LINKS              = NO
 
 #---------------------------------------------------------------------------
-# configuration options related to the XML output
+# Configuration options related to the XML output
 #---------------------------------------------------------------------------
 
-# If the GENERATE_XML tag is set to YES Doxygen will 
-# generate an XML file that captures the structure of 
-# the code including all documentation.
+# If the GENERATE_XML tag is set to YES doxygen will generate an XML file that
+# captures the structure of the code including all documentation.
+# The default value is: NO.
 
 GENERATE_XML           = NO
 
-# The XML_OUTPUT tag is used to specify where the XML pages will be put. 
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
-# put in front of it. If left blank `xml' will be used as the default path.
+# The XML_OUTPUT tag is used to specify where the XML pages will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it.
+# The default directory is: xml.
+# This tag requires that the tag GENERATE_XML is set to YES.
 
 XML_OUTPUT             = xml
 
-# The XML_SCHEMA tag can be used to specify an XML schema, 
-# which can be used by a validating XML parser to check the 
-# syntax of the XML files.
-
-XML_SCHEMA             = 
-
-# The XML_DTD tag can be used to specify an XML DTD, 
-# which can be used by a validating XML parser to check the 
-# syntax of the XML files.
-
-XML_DTD                = 
-
-# If the XML_PROGRAMLISTING tag is set to YES Doxygen will 
-# dump the program listings (including syntax highlighting 
-# and cross-referencing information) to the XML output. Note that 
-# enabling this will significantly increase the size of the XML output.
+# If the XML_PROGRAMLISTING tag is set to YES doxygen will dump the program
+# listings (including syntax highlighting and cross-referencing information) to
+# the XML output. Note that enabling this will significantly increase the size
+# of the XML output.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_XML is set to YES.
 
 XML_PROGRAMLISTING     = YES
 
 #---------------------------------------------------------------------------
-# configuration options for the AutoGen Definitions output
+# Configuration options related to the DOCBOOK output
 #---------------------------------------------------------------------------
 
-# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will 
-# generate an AutoGen Definitions (see autogen.sf.net) file 
-# that captures the structure of the code including all 
-# documentation. Note that this feature is still experimental 
-# and incomplete at the moment.
+# If the GENERATE_DOCBOOK tag is set to YES doxygen will generate Docbook files
+# that can be used to generate PDF.
+# The default value is: NO.
+
+GENERATE_DOCBOOK       = NO
+
+# The DOCBOOK_OUTPUT tag is used to specify where the Docbook pages will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be put in
+# front of it.
+# The default directory is: docbook.
+# This tag requires that the tag GENERATE_DOCBOOK is set to YES.
+
+DOCBOOK_OUTPUT         = docbook
+
+#---------------------------------------------------------------------------
+# Configuration options for the AutoGen Definitions output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_AUTOGEN_DEF tag is set to YES doxygen will generate an AutoGen
+# Definitions (see http://autogen.sf.net) file that captures the structure of
+# the code including all documentation. Note that this feature is still
+# experimental and incomplete at the moment.
+# The default value is: NO.
 
 GENERATE_AUTOGEN_DEF   = NO
 
 #---------------------------------------------------------------------------
-# configuration options related to the Perl module output
+# Configuration options related to the Perl module output
 #---------------------------------------------------------------------------
 
-# If the GENERATE_PERLMOD tag is set to YES Doxygen will 
-# generate a Perl module file that captures the structure of 
-# the code including all documentation. Note that this 
-# feature is still experimental and incomplete at the 
-# moment.
+# If the GENERATE_PERLMOD tag is set to YES doxygen will generate a Perl module
+# file that captures the structure of the code including all documentation.
+#
+# Note that this feature is still experimental and incomplete at the moment.
+# The default value is: NO.
 
 GENERATE_PERLMOD       = NO
 
-# If the PERLMOD_LATEX tag is set to YES Doxygen will generate 
-# the necessary Makefile rules, Perl scripts and LaTeX code to be able 
-# to generate PDF and DVI output from the Perl module output.
+# If the PERLMOD_LATEX tag is set to YES doxygen will generate the necessary
+# Makefile rules, Perl scripts and LaTeX code to be able to generate PDF and DVI
+# output from the Perl module output.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_PERLMOD is set to YES.
 
 PERLMOD_LATEX          = NO
 
-# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be 
-# nicely formatted so it can be parsed by a human reader.  This is useful 
-# if you want to understand what is going on.  On the other hand, if this 
-# tag is set to NO the size of the Perl module output will be much smaller 
-# and Perl will parse it just the same.
+# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be nicely
+# formatted so it can be parsed by a human reader. This is useful if you want to
+# understand what is going on. On the other hand, if this tag is set to NO the
+# size of the Perl module output will be much smaller and Perl will parse it
+# just the same.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_PERLMOD is set to YES.
 
 PERLMOD_PRETTY         = YES
 
-# The names of the make variables in the generated doxyrules.make file 
-# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. 
-# This is useful so different doxyrules.make files included by the same 
-# Makefile don't overwrite each other's variables.
+# The names of the make variables in the generated doxyrules.make file are
+# prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. This is useful
+# so different doxyrules.make files included by the same Makefile don't
+# overwrite each other's variables.
+# This tag requires that the tag GENERATE_PERLMOD is set to YES.
 
-PERLMOD_MAKEVAR_PREFIX = 
+PERLMOD_MAKEVAR_PREFIX =
 
 #---------------------------------------------------------------------------
-# Configuration options related to the preprocessor   
+# Configuration options related to the preprocessor
 #---------------------------------------------------------------------------
 
-# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will 
-# evaluate all C-preprocessor directives found in the sources and include 
-# files.
+# If the ENABLE_PREPROCESSING tag is set to YES doxygen will evaluate all
+# C-preprocessor directives found in the sources and include files.
+# The default value is: YES.
 
 ENABLE_PREPROCESSING   = YES
 
-# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro 
-# names in the source code. If set to NO (the default) only conditional 
-# compilation will be performed. Macro expansion can be done in a controlled 
-# way by setting EXPAND_ONLY_PREDEF to YES.
+# If the MACRO_EXPANSION tag is set to YES doxygen will expand all macro names
+# in the source code. If set to NO only conditional compilation will be
+# performed. Macro expansion can be done in a controlled way by setting
+# EXPAND_ONLY_PREDEF to YES.
+# The default value is: NO.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
 
 MACRO_EXPANSION        = YES
 
-# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES 
-# then the macro expansion is limited to the macros specified with the 
-# PREDEFINED and EXPAND_AS_DEFINED tags.
+# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES then
+# the macro expansion is limited to the macros specified with the PREDEFINED and
+# EXPAND_AS_DEFINED tags.
+# The default value is: NO.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
 
 EXPAND_ONLY_PREDEF     = NO
 
-# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files 
-# in the INCLUDE_PATH (see below) will be search if a #include is found.
+# If the SEARCH_INCLUDES tag is set to YES the includes files in the
+# INCLUDE_PATH will be searched if a #include is found.
+# The default value is: YES.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
 
 SEARCH_INCLUDES        = YES
 
-# The INCLUDE_PATH tag can be used to specify one or more directories that 
-# contain include files that are not input files but should be processed by 
-# the preprocessor.
+# The INCLUDE_PATH tag can be used to specify one or more directories that
+# contain include files that are not input files but should be processed by the
+# preprocessor.
+# This tag requires that the tag SEARCH_INCLUDES is set to YES.
 
-INCLUDE_PATH           = 
+INCLUDE_PATH           =
 
-# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard 
-# patterns (like *.h and *.hpp) to filter out the header-files in the 
-# directories. If left blank, the patterns specified with FILE_PATTERNS will 
-# be used.
+# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
+# patterns (like *.h and *.hpp) to filter out the header-files in the
+# directories. If left blank, the patterns specified with FILE_PATTERNS will be
+# used.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
 
-INCLUDE_FILE_PATTERNS  = 
+INCLUDE_FILE_PATTERNS  =
 
-# The PREDEFINED tag can be used to specify one or more macro names that 
-# are defined before the preprocessor is started (similar to the -D option of 
-# gcc). The argument of the tag is a list of macros of the form: name 
-# or name=definition (no spaces). If the definition and the = are 
-# omitted =1 is assumed. To prevent a macro definition from being 
-# undefined via #undef or recursively expanded use the := operator 
-# instead of the = operator.
+# The PREDEFINED tag can be used to specify one or more macro names that are
+# defined before the preprocessor is started (similar to the -D option of e.g.
+# gcc). The argument of the tag is a list of macros of the form: name or
+# name=definition (no spaces). If the definition and the "=" are omitted, "=1"
+# is assumed. To prevent a macro definition from being undefined via #undef or
+# recursively expanded use the := operator instead of the = operator.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
 
 PREDEFINED             = LOG4CXX_WCHAR_T_API \
                          LOG4CXX_UNICHAR_API \
                          LOG4CXX_CFSTRING_API
 
-# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then 
-# this tag can be used to specify a list of macro names that should be expanded. 
-# The macro definition that is found in the sources will be used. 
-# Use the PREDEFINED tag if you want to use a different macro definition.
+# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
+# tag can be used to specify a list of macro names that should be expanded. The
+# macro definition that is found in the sources will be used. Use the PREDEFINED
+# tag if you want to use a different macro definition that overrules the
+# definition found in the source code.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
 
-EXPAND_AS_DEFINED      = 
+EXPAND_AS_DEFINED      =
 
-# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then 
-# doxygen's preprocessor will remove all function-like macros that are alone 
-# on a line, have an all uppercase name, and do not end with a semicolon. Such 
-# function macros are typically used for boiler-plate code, and will confuse 
-# the parser if not removed.
+# If the SKIP_FUNCTION_MACROS tag is set to YES then doxygen's preprocessor will
+# remove all refrences to function-like macros that are alone on a line, have an
+# all uppercase name, and do not end with a semicolon. Such function macros are
+# typically used for boiler-plate code, and will confuse the parser if not
+# removed.
+# The default value is: YES.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
 
 SKIP_FUNCTION_MACROS   = YES
 
 #---------------------------------------------------------------------------
-# Configuration::additions related to external references   
+# Configuration options related to external references
 #---------------------------------------------------------------------------
 
-# The TAGFILES option can be used to specify one or more tagfiles. 
-# Optionally an initial location of the external documentation 
-# can be added for each tagfile. The format of a tag file without 
-# this location is as follows: 
-#   TAGFILES = file1 file2 ... 
-# Adding location for the tag files is done as follows: 
-#   TAGFILES = file1=loc1 "file2 = loc2" ... 
-# where "loc1" and "loc2" can be relative or absolute paths or 
-# URLs. If a location is present for each tag, the installdox tool 
-# does not have to be run to correct the links.
-# Note that each tag file must have a unique name
-# (where the name does NOT include the path)
-# If a tag file is not located in the directory in which doxygen 
-# is run, you must also specify the path to the tagfile here.
+# The TAGFILES tag can be used to specify one or more tag files. For each tag
+# file the location of the external documentation should be added. The format of
+# a tag file without this location is as follows:
+# TAGFILES = file1 file2 ...
+# Adding location for the tag files is done as follows:
+# TAGFILES = file1=loc1 "file2 = loc2" ...
+# where loc1 and loc2 can be relative or absolute paths or URLs. See the
+# section "Linking to external documentation" for more information about the use
+# of tag files.
+# Note: Each tag file must have an unique name (where the name does NOT include
+# the path). If a tag file is not located in the directory in which doxygen is
+# run, you must also specify the path to the tagfile here.
 
-TAGFILES               = 
+TAGFILES               =
 
-# When a file name is specified after GENERATE_TAGFILE, doxygen will create 
-# a tag file that is based on the input files it reads.
+# When a file name is specified after GENERATE_TAGFILE, doxygen will create a
+# tag file that is based on the input files it reads. See section "Linking to
+# external documentation" for more information about the usage of tag files.
 
-GENERATE_TAGFILE       = 
+GENERATE_TAGFILE       =
 
-# If the ALLEXTERNALS tag is set to YES all external classes will be listed 
-# in the class index. If set to NO only the inherited external classes 
-# will be listed.
+# If the ALLEXTERNALS tag is set to YES all external class will be listed in the
+# class index. If set to NO only the inherited external classes will be listed.
+# The default value is: NO.
 
 ALLEXTERNALS           = NO
 
-# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed 
-# in the modules index. If set to NO, only the current project's groups will 
-# be listed.
+# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed in
+# the modules index. If set to NO, only the current project's groups will be
+# listed.
+# The default value is: YES.
 
 EXTERNAL_GROUPS        = YES
 
-# The PERL_PATH should be the absolute path and name of the perl script 
-# interpreter (i.e. the result of `which perl').
+# If the EXTERNAL_PAGES tag is set to YES all external pages will be listed in
+# the related pages index. If set to NO, only the current project's pages will
+# be listed.
+# The default value is: YES.
+
+EXTERNAL_PAGES         = YES
+
+# The PERL_PATH should be the absolute path and name of the perl script
+# interpreter (i.e. the result of 'which perl').
+# The default file (with absolute path) is: /usr/bin/perl.
 
 PERL_PATH              = /usr/bin/perl
 
 #---------------------------------------------------------------------------
-# Configuration options related to the dot tool   
+# Configuration options related to the dot tool
 #---------------------------------------------------------------------------
 
-# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will 
-# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base 
-# or super classes. Setting the tag to NO turns the diagrams off. Note that 
-# this option is superseded by the HAVE_DOT option below. This is only a 
-# fallback. It is recommended to install and use dot, since it yields more 
+# If the CLASS_DIAGRAMS tag is set to YES doxygen will generate a class diagram
+# (in HTML and LaTeX) for classes with base or super classes. Setting the tag to
+# NO turns the diagrams off. Note that this option also works with HAVE_DOT
+# disabled, but it is recommended to install and use dot, since it yields more
 # powerful graphs.
+# The default value is: YES.
 
-CLASS_DIAGRAMS         = NO
+CLASS_DIAGRAMS         = YES
 
-# You can define message sequence charts within doxygen comments using the \msc 
-# command. Doxygen will then run the mscgen tool (see http://www.mcternan.me.uk/mscgen/) to 
-# produce the chart and insert it in the documentation. The MSCGEN_PATH tag allows you to 
-# specify the directory where the mscgen tool resides. If left empty the tool is assumed to 
-# be found in the default search path.
+# You can define message sequence charts within doxygen comments using the \msc
+# command. Doxygen will then run the mscgen tool (see:
+# http://www.mcternan.me.uk/mscgen/)) to produce the chart and insert it in the
+# documentation. The MSCGEN_PATH tag allows you to specify the directory where
+# the mscgen tool resides. If left empty the tool is assumed to be found in the
+# default search path.
 
-MSCGEN_PATH            = 
+MSCGEN_PATH            =
 
-# If set to YES, the inheritance and collaboration graphs will hide 
-# inheritance and usage relations if the target is undocumented 
-# or is not a class.
+# You can include diagrams made with dia in doxygen documentation. Doxygen will
+# then run dia to produce the diagram and insert it in the documentation. The
+# DIA_PATH tag allows you to specify the directory where the dia binary resides.
+# If left empty dia is assumed to be found in the default search path.
+
+DIA_PATH               =
+
+# If set to YES, the inheritance and collaboration graphs will hide inheritance
+# and usage relations if the target is undocumented or is not a class.
+# The default value is: YES.
 
 HIDE_UNDOC_RELATIONS   = YES
 
-# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is 
-# available from the path. This tool is part of Graphviz, a graph visualization 
-# toolkit from AT&T and Lucent Bell Labs. The other options in this section 
-# have no effect if this option is set to NO (the default)
+# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
+# available from the path. This tool is part of Graphviz (see:
+# http://www.graphviz.org/), a graph visualization toolkit from AT&T and Lucent
+# Bell Labs. The other options in this section have no effect if this option is
+# set to NO
+# The default value is: NO.
 
 HAVE_DOT               = NO
 
-# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen 
-# will generate a graph for each documented class showing the direct and 
-# indirect inheritance relations. Setting this tag to YES will force the 
-# the CLASS_DIAGRAMS tag to NO.
+# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is allowed
+# to run in parallel. When set to 0 doxygen will base this on the number of
+# processors available in the system. You can set it explicitly to a value
+# larger than 0 to get control over the balance between CPU load and processing
+# speed.
+# Minimum value: 0, maximum value: 32, default value: 0.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_NUM_THREADS        = 0
+
+# When you want a differently looking font n the dot files that doxygen
+# generates you can specify the font name using DOT_FONTNAME. You need to make
+# sure dot is able to find the font, which can be done by putting it in a
+# standard location or by setting the DOTFONTPATH environment variable or by
+# setting DOT_FONTPATH to the directory containing the font.
+# The default value is: Helvetica.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_FONTNAME           = Helvetica
+
+# The DOT_FONTSIZE tag can be used to set the size (in points) of the font of
+# dot graphs.
+# Minimum value: 4, maximum value: 24, default value: 10.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_FONTSIZE           = 10
+
+# By default doxygen will tell dot to use the default font as specified with
+# DOT_FONTNAME. If you specify a different font using DOT_FONTNAME you can set
+# the path where dot can find it using this tag.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_FONTPATH           =
+
+# If the CLASS_GRAPH tag is set to YES then doxygen will generate a graph for
+# each documented class showing the direct and indirect inheritance relations.
+# Setting this tag to YES will force the CLASS_DIAGRAMS tag to NO.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
 
 CLASS_GRAPH            = YES
 
-# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen 
-# will generate a graph for each documented class showing the direct and 
-# indirect implementation dependencies (inheritance, containment, and 
-# class references variables) of the class with other documented classes.
+# If the COLLABORATION_GRAPH tag is set to YES then doxygen will generate a
+# graph for each documented class showing the direct and indirect implementation
+# dependencies (inheritance, containment, and class references variables) of the
+# class with other documented classes.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
 
 COLLABORATION_GRAPH    = YES
 
-# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen 
-# will generate a graph for groups, showing the direct groups dependencies
+# If the GROUP_GRAPHS tag is set to YES then doxygen will generate a graph for
+# groups, showing the direct groups dependencies.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
 
 GROUP_GRAPHS           = YES
 
-# If the UML_LOOK tag is set to YES doxygen will generate inheritance and 
-# collaboration diagrams in a style similar to the OMG's Unified Modeling 
+# If the UML_LOOK tag is set to YES doxygen will generate inheritance and
+# collaboration diagrams in a style similar to the OMG's Unified Modeling
 # Language.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
 
 UML_LOOK               = NO
 
-# If set to YES, the inheritance and collaboration graphs will show the 
-# relations between templates and their instances.
+# If the UML_LOOK tag is enabled, the fields and methods are shown inside the
+# class node. If there are many fields or methods and many nodes the graph may
+# become too big to be useful. The UML_LIMIT_NUM_FIELDS threshold limits the
+# number of items for each type to make the size more manageable. Set this to 0
+# for no limit. Note that the threshold may be exceeded by 50% before the limit
+# is enforced. So when you set the threshold to 10, up to 15 fields may appear,
+# but if the number exceeds 15, the total amount of fields shown is limited to
+# 10.
+# Minimum value: 0, maximum value: 100, default value: 10.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+UML_LIMIT_NUM_FIELDS   = 10
+
+# If the TEMPLATE_RELATIONS tag is set to YES then the inheritance and
+# collaboration graphs will show the relations between templates and their
+# instances.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
 
 TEMPLATE_RELATIONS     = YES
 
-# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT 
-# tags are set to YES then doxygen will generate a graph for each documented 
-# file showing the direct and indirect include dependencies of the file with 
-# other documented files.
+# If the INCLUDE_GRAPH, ENABLE_PREPROCESSING and SEARCH_INCLUDES tags are set to
+# YES then doxygen will generate a graph for each documented file showing the
+# direct and indirect include dependencies of the file with other documented
+# files.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
 
 INCLUDE_GRAPH          = YES
 
-# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and 
-# HAVE_DOT tags are set to YES then doxygen will generate a graph for each 
-# documented header file showing the documented files that directly or 
-# indirectly include this file.
+# If the INCLUDED_BY_GRAPH, ENABLE_PREPROCESSING and SEARCH_INCLUDES tags are
+# set to YES then doxygen will generate a graph for each documented file showing
+# the direct and indirect include dependencies of the file with other documented
+# files.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
 
 INCLUDED_BY_GRAPH      = YES
 
-# If the CALL_GRAPH, SOURCE_BROWSER and HAVE_DOT tags are set to YES then doxygen will 
-# generate a call dependency graph for every global function or class method. 
-# Note that enabling this option will significantly increase the time of a run. 
-# So in most cases it will be better to enable call graphs for selected 
+# If the CALL_GRAPH tag is set to YES then doxygen will generate a call
+# dependency graph for every global function or class method.
+#
+# Note that enabling this option will significantly increase the time of a run.
+# So in most cases it will be better to enable call graphs for selected
 # functions only using the \callgraph command.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
 
 CALL_GRAPH             = NO
 
-# If the CALLER_GRAPH, SOURCE_BROWSER and HAVE_DOT tags are set to YES then doxygen will 
-# generate a caller dependency graph for every global function or class method. 
-# Note that enabling this option will significantly increase the time of a run. 
-# So in most cases it will be better to enable caller graphs for selected 
+# If the CALLER_GRAPH tag is set to YES then doxygen will generate a caller
+# dependency graph for every global function or class method.
+#
+# Note that enabling this option will significantly increase the time of a run.
+# So in most cases it will be better to enable caller graphs for selected
 # functions only using the \callergraph command.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
 
 CALLER_GRAPH           = NO
 
-# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen 
-# will graphical hierarchy of all classes instead of a textual one.
+# If the GRAPHICAL_HIERARCHY tag is set to YES then doxygen will graphical
+# hierarchy of all classes instead of a textual one.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
 
 GRAPHICAL_HIERARCHY    = NO
 
-# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES 
-# then doxygen will show the dependencies a directory has on other directories 
-# in a graphical way. The dependency relations are determined by the #include
-# relations between the files in the directories.
+# If the DIRECTORY_GRAPH tag is set to YES then doxygen will show the
+# dependencies a directory has on other directories in a graphical way. The
+# dependency relations are determined by the #include relations between the
+# files in the directories.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
 
 DIRECTORY_GRAPH        = YES
 
-# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images 
-# generated by dot. Possible values are png, jpg, or gif
-# If left blank png will be used.
+# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
+# generated by dot.
+# Note: If you choose svg you need to set HTML_FILE_EXTENSION to xhtml in order
+# to make the SVG files visible in IE 9+ (other browsers do not have this
+# requirement).
+# Possible values are: png, jpg, gif and svg.
+# The default value is: png.
+# This tag requires that the tag HAVE_DOT is set to YES.
 
 DOT_IMAGE_FORMAT       = png
 
-# The tag DOT_PATH can be used to specify the path where the dot tool can be 
+# If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to
+# enable generation of interactive SVG images that allow zooming and panning.
+#
+# Note that this requires a modern browser other than Internet Explorer. Tested
+# and working are Firefox, Chrome, Safari, and Opera.
+# Note: For IE 9+ you need to set HTML_FILE_EXTENSION to xhtml in order to make
+# the SVG files visible. Older versions of IE do not have SVG support.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+INTERACTIVE_SVG        = NO
+
+# The DOT_PATH tag can be used to specify the path where the dot tool can be
 # found. If left blank, it is assumed the dot tool can be found in the path.
+# This tag requires that the tag HAVE_DOT is set to YES.
 
-DOT_PATH               = 
+DOT_PATH               =
 
-# The DOTFILE_DIRS tag can be used to specify one or more directories that 
-# contain dot files that are included in the documentation (see the 
-# \dotfile command).
+# The DOTFILE_DIRS tag can be used to specify one or more directories that
+# contain dot files that are included in the documentation (see the \dotfile
+# command).
+# This tag requires that the tag HAVE_DOT is set to YES.
 
-DOTFILE_DIRS           = 
+DOTFILE_DIRS           =
 
-# The MAX_DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of 
-# nodes that will be shown in the graph. If the number of nodes in a graph 
-# becomes larger than this value, doxygen will truncate the graph, which is 
-# visualized by representing a node as a red box. Note that doxygen if the number 
-# of direct children of the root node in a graph is already larger than 
-# MAX_DOT_GRAPH_NOTES then the graph will not be shown at all. Also note 
-# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
+# The MSCFILE_DIRS tag can be used to specify one or more directories that
+# contain msc files that are included in the documentation (see the \mscfile
+# command).
+
+MSCFILE_DIRS           =
+
+# The DIAFILE_DIRS tag can be used to specify one or more directories that
+# contain dia files that are included in the documentation (see the \diafile
+# command).
+
+DIAFILE_DIRS           =
+
+# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of nodes
+# that will be shown in the graph. If the number of nodes in a graph becomes
+# larger than this value, doxygen will truncate the graph, which is visualized
+# by representing a node as a red box. Note that doxygen if the number of direct
+# children of the root node in a graph is already larger than
+# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note that
+# the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
+# Minimum value: 0, maximum value: 10000, default value: 50.
+# This tag requires that the tag HAVE_DOT is set to YES.
 
 DOT_GRAPH_MAX_NODES    = 50
 
-# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the 
-# graphs generated by dot. A depth value of 3 means that only nodes reachable 
-# from the root by following a path via at most 3 edges will be shown. Nodes 
-# that lay further from the root node will be omitted. Note that setting this 
-# option to 1 or 2 may greatly reduce the computation time needed for large 
-# code bases. Also note that the size of a graph can be further restricted by 
+# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the graphs
+# generated by dot. A depth value of 3 means that only nodes reachable from the
+# root by following a path via at most 3 edges will be shown. Nodes that lay
+# further from the root node will be omitted. Note that setting this option to 1
+# or 2 may greatly reduce the computation time needed for large code bases. Also
+# note that the size of a graph can be further restricted by
 # DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
+# Minimum value: 0, maximum value: 1000, default value: 0.
+# This tag requires that the tag HAVE_DOT is set to YES.
 
 MAX_DOT_GRAPH_DEPTH    = 0
 
-# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent 
-# background. This is disabled by default, which results in a white background. 
-# Warning: Depending on the platform used, enabling this option may lead to 
-# badly anti-aliased labels on the edges of a graph (i.e. they become hard to 
+# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
+# background. This is disabled by default, because dot on Windows does not seem
+# to support this out of the box.
+#
+# Warning: Depending on the platform used, enabling this option may lead to
+# badly anti-aliased labels on the edges of a graph (i.e. they become hard to
 # read).
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
 
 DOT_TRANSPARENT        = NO
 
-# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output 
-# files in one run (i.e. multiple -o and -T options on the command line). This 
-# makes dot run faster, but since only newer versions of dot (>1.8.10) 
-# support this, this feature is disabled by default.
+# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output
+# files in one run (i.e. multiple -o and -T options on the command line). This
+# makes dot run faster, but since only newer versions of dot (>1.8.10) support
+# this, this feature is disabled by default.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
 
 DOT_MULTI_TARGETS      = NO
 
-# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will 
-# generate a legend page explaining the meaning of the various boxes and 
-# arrows in the dot generated graphs.
+# If the GENERATE_LEGEND tag is set to YES doxygen will generate a legend page
+# explaining the meaning of the various boxes and arrows in the dot generated
+# graphs.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
 
 GENERATE_LEGEND        = YES
 
-# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will 
-# remove the intermediate dot files that are used to generate 
-# the various graphs.
+# If the DOT_CLEANUP tag is set to YES doxygen will remove the intermediate dot
+# files that are used to generate the various graphs.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
 
 DOT_CLEANUP            = YES
-
-#---------------------------------------------------------------------------
-# Configuration::additions related to the search engine   
-#---------------------------------------------------------------------------
-
-# The SEARCHENGINE tag specifies whether or not a search engine should be 
-# used. If set to NO the values of all tags below this one will be ignored.
-
-SEARCHENGINE           = NO
diff --git a/src/site/doxy/Makefile.am b/src/site/doxy/Makefile.am
index 0c7293d..307e53b 100644
--- a/src/site/doxy/Makefile.am
+++ b/src/site/doxy/Makefile.am
@@ -13,18 +13,18 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #
-EXTRA_DIST = Doxyfile mainpage.dox license_notice_footer.txt
+EXTRA_DIST = Doxyfile license_notice_footer.txt
 
 # DOC is defined if installer requests doc generation.
 
 
 if DOC
 
-htmldest = $(pkgdatadir)/html
+htmldest = $(docdir)/html
 
 install-data-hook:
 	$(mkinstalldirs) $(DESTDIR)$(htmldest)
-	cp -dpR @manual_dest@/* $(DESTDIR)$(htmldest)
+	cp -pR @manual_dest@/* $(DESTDIR)$(htmldest)
 
 # Automake's "distcheck" is sensitive to having files left over
 # after "make uninstall", so we have to clean up the install hook.
@@ -40,7 +40,7 @@
 	$(MAKE) -C ./latex pdf
 	ln -s ./latex/refman.ps	 @PACKAGE@.ps
 	ln -s ./latex/refman.pdf @PACKAGE@.pdf
-	
+
 endif
 
 else
@@ -61,7 +61,7 @@
 all-local: dox
 
 
-@manual_dest@/index.html: Doxyfile mainpage.dox
+@manual_dest@/index.html: Doxyfile
 	"@DOXYGEN@"
 
 distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)
@@ -83,4 +83,3 @@
 
 dist-hook:
 	-rm -f $(distdir)/Doxyfile
-
diff --git a/src/site/doxy/license_notice_footer.txt b/src/site/doxy/license_notice_footer.txt
index 53eb256..7e37a54 100644
--- a/src/site/doxy/license_notice_footer.txt
+++ b/src/site/doxy/license_notice_footer.txt
Binary files differ
diff --git a/src/site/doxy/mainpage.dox b/src/site/doxy/mainpage.dox
deleted file mode 100755
index b87d2c8..0000000
--- a/src/site/doxy/mainpage.dox
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements.  See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
-the License.  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-*/
-/** @mainpage
-
-\ref Introduction
-<p>
-\ref LoggingMacros
diff --git a/src/site/doxy/mainpage.dox.xsl b/src/site/doxy/mainpage.dox.xsl
new file mode 100644
index 0000000..8681b7d
--- /dev/null
+++ b/src/site/doxy/mainpage.dox.xsl
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+ -->
+<xsl:stylesheet	version="2.0"
+				xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+				xmlns:saxon="http://saxon.sf.net/"
+				xmlns:xhtml="http://www.w3.org/1999/xhtml"
+				exclude-result-prefixes="saxon xhtml">
+
+	<!--
+		We need textual output with XHTML nodes, which is only possible for methods other than text
+		and without xml declaration or such.
+	 -->
+	<xsl:output	method="xml"
+				omit-xml-declaration="yes"
+				media-type="text/plain"
+				indent="yes"
+				encoding="UTF-8"
+				saxon:indent-spaces="4"
+	/>
+
+	<xsl:template match="/">
+		/*
+		Licensed to the Apache Software Foundation (ASF) under one or more
+		contributor license agreements.  See the NOTICE file distributed with
+		this work for additional information regarding copyright ownership.
+		The ASF licenses this file to You under the Apache License, Version 2.0
+		(the "License"); you may not use this file except in compliance with
+		the License.  You may obtain a copy of the License at
+
+			  http://www.apache.org/licenses/LICENSE-2.0
+
+		Unless required by applicable law or agreed to in writing, software
+		distributed under the License is distributed on an "AS IS" BASIS,
+		WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+		See the License for the specific language governing permissions and
+		limitations under the License.
+		*/
+
+		/** @mainpage
+
+		<xsl:apply-templates	select="//xhtml:div[@id = 'contentBox']/xhtml:div[@class = 'section']/*"
+								mode="copy-no-namespaces"
+		/>
+
+		 */
+	</xsl:template>
+
+	<!-- http://stackoverflow.com/a/20001084/2055163 -->
+	<xsl:template match="*" mode="copy-no-namespaces">
+		<xsl:element name="{local-name()}">
+			<xsl:copy-of select="@*" />
+			<xsl:apply-templates	select="node()"
+									mode="copy-no-namespaces"
+			/>
+		</xsl:element>
+	</xsl:template>
+ </xsl:stylesheet>
\ No newline at end of file
diff --git a/src/site/resources/.htaccess b/src/site/resources/.htaccess
deleted file mode 100644
index fd861ac..0000000
--- a/src/site/resources/.htaccess
+++ /dev/null
@@ -1,33 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-<IfModule mod_rewrite.c>
-  RewriteEngine on
-  #
-  #   rewrite site requests to equivalent new URLs
-  #
-  RewriteRule ^contributing\.html$ http://logging.apache.org/log4cxx/issue-tracking.html [R=permanent,L]
-  RewriteRule ^roadmap\.html$ http://logging.apache.org/log4cxx/issue-tracking.html [R=permanent,L]
-  RewriteRule ^support\.html$ http://logging.apache.org/log4cxx/index.html [R=permanent,L]
-  RewriteRule ^team\.html$ http://logging.apache.org/team-list.html [R=permanent,L]
-  RewriteRule ^performance\.html$ http://logging.apache.org/log4cxx/index.html [R=permanent,L]
-  RewriteRule ^ChangeLog$ http://logging.apache.org/log4cxx/changes-report.html [R=permanent,L]
-  RewriteRule ^news$ http://logging.apache.org/log4cxx/changes-report.html [R=permanent,L]
-  RewriteRule ^manual\.html$ http://logging.apache.org/log4cxx/index.html [R=permanent,L]
-  RewriteRule ^manual/index\.html$ http://logging.apache.org/log4cxx/manual.html [R=permanent,L] 
-  RewriteRule ^manual/(.*)$ http://logging.apache.org/log4cxx/apidocs/$1 [R=permanent,L]
-  RewriteRule ^manual\.html/index\.html$ http://logging.apache.org/log4cxx/manual.html [R=permanent,L] 
-  RewriteRule ^manual\.html/(.*)$ http://logging.apache.org/log4cxx/apidocs/$1 [R=permanent,L]
-</IfModule>
diff --git a/src/site/resources/css/bootstrap.css b/src/site/resources/css/bootstrap.css
new file mode 100644
index 0000000..3ef47e1
--- /dev/null
+++ b/src/site/resources/css/bootstrap.css
@@ -0,0 +1,5893 @@
+/*!
+ * Bootstrap v2.2.1
+ *
+ * Copyright 2012 Twitter, Inc
+ * Licensed under the Apache License v2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Designed and built with all the love in the world @twitter by @mdo and @fat.
+ */
+
+article,
+aside,
+details,
+figcaption,
+figure,
+footer,
+header,
+hgroup,
+nav,
+section {
+  display: block;
+}
+
+audio,
+canvas,
+video {
+  display: inline-block;
+  *display: inline;
+  *zoom: 1;
+}
+
+audio:not([controls]) {
+  display: none;
+}
+
+html {
+  font-size: 100%;
+  -webkit-text-size-adjust: 100%;
+      -ms-text-size-adjust: 100%;
+}
+
+a:focus {
+  outline: thin dotted #333;
+  outline: 5px auto -webkit-focus-ring-color;
+  outline-offset: -2px;
+}
+
+a:hover,
+a:active {
+  outline: 0;
+}
+
+sub,
+sup {
+  position: relative;
+  font-size: 75%;
+  line-height: 0;
+  vertical-align: baseline;
+}
+
+sup {
+  top: -0.5em;
+}
+
+sub {
+  bottom: -0.25em;
+}
+
+img {
+  width: auto\9;
+  height: auto;
+  max-width: 100%;
+  vertical-align: middle;
+  border: 0;
+  -ms-interpolation-mode: bicubic;
+}
+
+#map_canvas img,
+.google-maps img {
+  max-width: none;
+}
+
+button,
+input,
+select,
+textarea {
+  margin: 0;
+  font-size: 100%;
+  vertical-align: middle;
+}
+
+button,
+input {
+  *overflow: visible;
+  line-height: normal;
+}
+
+button::-moz-focus-inner,
+input::-moz-focus-inner {
+  padding: 0;
+  border: 0;
+}
+
+button,
+html input[type="button"],
+input[type="reset"],
+input[type="submit"] {
+  cursor: pointer;
+  -webkit-appearance: button;
+}
+
+input[type="search"] {
+  -webkit-box-sizing: content-box;
+     -moz-box-sizing: content-box;
+          box-sizing: content-box;
+  -webkit-appearance: textfield;
+}
+
+input[type="search"]::-webkit-search-decoration,
+input[type="search"]::-webkit-search-cancel-button {
+  -webkit-appearance: none;
+}
+
+textarea {
+  overflow: auto;
+  vertical-align: top;
+}
+
+.clearfix {
+  *zoom: 1;
+}
+
+.clearfix:before,
+.clearfix:after {
+  display: table;
+  line-height: 0;
+  content: "";
+}
+
+.clearfix:after {
+  clear: both;
+}
+
+.hide-text {
+  font: 0/0 a;
+  color: transparent;
+  text-shadow: none;
+  background-color: transparent;
+  border: 0;
+}
+
+.input-block-level {
+  display: block;
+  width: 100%;
+  min-height: 30px;
+  -webkit-box-sizing: border-box;
+     -moz-box-sizing: border-box;
+          box-sizing: border-box;
+}
+
+body {
+  margin: 0;
+  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
+  font-size: 14px;
+  line-height: 20px;
+  color: #333333;
+  background-color: #ffffff;
+}
+
+a {
+  color: #0088cc;
+  text-decoration: none;
+}
+
+a:hover {
+  color: #005580;
+  text-decoration: underline;
+}
+
+.img-rounded {
+  -webkit-border-radius: 6px;
+     -moz-border-radius: 6px;
+          border-radius: 6px;
+}
+
+.img-polaroid {
+  padding: 4px;
+  background-color: #fff;
+  border: 1px solid #ccc;
+  border: 1px solid rgba(0, 0, 0, 0.2);
+  -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
+     -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
+          box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
+}
+
+.img-circle {
+  -webkit-border-radius: 500px;
+     -moz-border-radius: 500px;
+          border-radius: 500px;
+}
+
+.row {
+  margin-left: -20px;
+  *zoom: 1;
+}
+
+.row:before,
+.row:after {
+  display: table;
+  line-height: 0;
+  content: "";
+}
+
+.row:after {
+  clear: both;
+}
+
+[class*="span"] {
+  float: left;
+  min-height: 1px;
+  margin-left: 20px;
+}
+
+.container,
+.navbar-static-top .container,
+.navbar-fixed-top .container,
+.navbar-fixed-bottom .container {
+  width: 940px;
+}
+
+.span12 {
+  width: 940px;
+}
+
+.span11 {
+  width: 860px;
+}
+
+.span10 {
+  width: 780px;
+}
+
+.span9 {
+  width: 700px;
+}
+
+.span8 {
+  width: 620px;
+}
+
+.span7 {
+  width: 540px;
+}
+
+.span6 {
+  width: 460px;
+}
+
+.span5 {
+  width: 380px;
+}
+
+.span4 {
+  width: 300px;
+}
+
+.span3 {
+  width: 220px;
+}
+
+.span2 {
+  width: 140px;
+}
+
+.span1 {
+  width: 60px;
+}
+
+.offset12 {
+  margin-left: 980px;
+}
+
+.offset11 {
+  margin-left: 900px;
+}
+
+.offset10 {
+  margin-left: 820px;
+}
+
+.offset9 {
+  margin-left: 740px;
+}
+
+.offset8 {
+  margin-left: 660px;
+}
+
+.offset7 {
+  margin-left: 580px;
+}
+
+.offset6 {
+  margin-left: 500px;
+}
+
+.offset5 {
+  margin-left: 420px;
+}
+
+.offset4 {
+  margin-left: 340px;
+}
+
+.offset3 {
+  margin-left: 260px;
+}
+
+.offset2 {
+  margin-left: 180px;
+}
+
+.offset1 {
+  margin-left: 100px;
+}
+
+.row-fluid {
+  width: 100%;
+  *zoom: 1;
+}
+
+.row-fluid:before,
+.row-fluid:after {
+  display: table;
+  line-height: 0;
+  content: "";
+}
+
+.row-fluid:after {
+  clear: both;
+}
+
+.row-fluid [class*="span"] {
+  display: block;
+  float: left;
+  width: 100%;
+  min-height: 30px;
+  margin-left: 2.127659574468085%;
+  *margin-left: 2.074468085106383%;
+  -webkit-box-sizing: border-box;
+     -moz-box-sizing: border-box;
+          box-sizing: border-box;
+}
+
+.row-fluid [class*="span"]:first-child {
+  margin-left: 0;
+}
+
+.row-fluid .controls-row [class*="span"] + [class*="span"] {
+  margin-left: 2.127659574468085%;
+}
+
+.row-fluid .span12 {
+  width: 100%;
+  *width: 99.94680851063829%;
+}
+
+.row-fluid .span11 {
+  width: 91.48936170212765%;
+  *width: 91.43617021276594%;
+}
+
+.row-fluid .span10 {
+  width: 82.97872340425532%;
+  *width: 82.92553191489361%;
+}
+
+.row-fluid .span9 {
+  width: 74.46808510638297%;
+  *width: 74.41489361702126%;
+}
+
+.row-fluid .span8 {
+  width: 65.95744680851064%;
+  *width: 65.90425531914893%;
+}
+
+.row-fluid .span7 {
+  width: 57.44680851063829%;
+  *width: 57.39361702127659%;
+}
+
+.row-fluid .span6 {
+  width: 48.93617021276595%;
+  *width: 48.88297872340425%;
+}
+
+.row-fluid .span5 {
+  width: 40.42553191489362%;
+  *width: 40.37234042553192%;
+}
+
+.row-fluid .span4 {
+  width: 31.914893617021278%;
+  *width: 31.861702127659576%;
+}
+
+.row-fluid .span3 {
+  width: 23.404255319148934%;
+  *width: 23.351063829787233%;
+}
+
+.row-fluid .span2 {
+  width: 14.893617021276595%;
+  *width: 14.840425531914894%;
+}
+
+.row-fluid .span1 {
+  width: 6.382978723404255%;
+  *width: 6.329787234042553%;
+}
+
+.row-fluid .offset12 {
+  margin-left: 104.25531914893617%;
+  *margin-left: 104.14893617021275%;
+}
+
+.row-fluid .offset12:first-child {
+  margin-left: 102.12765957446808%;
+  *margin-left: 102.02127659574467%;
+}
+
+.row-fluid .offset11 {
+  margin-left: 95.74468085106382%;
+  *margin-left: 95.6382978723404%;
+}
+
+.row-fluid .offset11:first-child {
+  margin-left: 93.61702127659574%;
+  *margin-left: 93.51063829787232%;
+}
+
+.row-fluid .offset10 {
+  margin-left: 87.23404255319149%;
+  *margin-left: 87.12765957446807%;
+}
+
+.row-fluid .offset10:first-child {
+  margin-left: 85.1063829787234%;
+  *margin-left: 84.99999999999999%;
+}
+
+.row-fluid .offset9 {
+  margin-left: 78.72340425531914%;
+  *margin-left: 78.61702127659572%;
+}
+
+.row-fluid .offset9:first-child {
+  margin-left: 76.59574468085106%;
+  *margin-left: 76.48936170212764%;
+}
+
+.row-fluid .offset8 {
+  margin-left: 70.2127659574468%;
+  *margin-left: 70.10638297872339%;
+}
+
+.row-fluid .offset8:first-child {
+  margin-left: 68.08510638297872%;
+  *margin-left: 67.9787234042553%;
+}
+
+.row-fluid .offset7 {
+  margin-left: 61.70212765957446%;
+  *margin-left: 61.59574468085106%;
+}
+
+.row-fluid .offset7:first-child {
+  margin-left: 59.574468085106375%;
+  *margin-left: 59.46808510638297%;
+}
+
+.row-fluid .offset6 {
+  margin-left: 53.191489361702125%;
+  *margin-left: 53.085106382978715%;
+}
+
+.row-fluid .offset6:first-child {
+  margin-left: 51.063829787234035%;
+  *margin-left: 50.95744680851063%;
+}
+
+.row-fluid .offset5 {
+  margin-left: 44.68085106382979%;
+  *margin-left: 44.57446808510638%;
+}
+
+.row-fluid .offset5:first-child {
+  margin-left: 42.5531914893617%;
+  *margin-left: 42.4468085106383%;
+}
+
+.row-fluid .offset4 {
+  margin-left: 36.170212765957444%;
+  *margin-left: 36.06382978723405%;
+}
+
+.row-fluid .offset4:first-child {
+  margin-left: 34.04255319148936%;
+  *margin-left: 33.93617021276596%;
+}
+
+.row-fluid .offset3 {
+  margin-left: 27.659574468085104%;
+  *margin-left: 27.5531914893617%;
+}
+
+.row-fluid .offset3:first-child {
+  margin-left: 25.53191489361702%;
+  *margin-left: 25.425531914893618%;
+}
+
+.row-fluid .offset2 {
+  margin-left: 19.148936170212764%;
+  *margin-left: 19.04255319148936%;
+}
+
+.row-fluid .offset2:first-child {
+  margin-left: 17.02127659574468%;
+  *margin-left: 16.914893617021278%;
+}
+
+.row-fluid .offset1 {
+  margin-left: 10.638297872340425%;
+  *margin-left: 10.53191489361702%;
+}
+
+.row-fluid .offset1:first-child {
+  margin-left: 8.51063829787234%;
+  *margin-left: 8.404255319148938%;
+}
+
+[class*="span"].hide,
+.row-fluid [class*="span"].hide {
+  display: none;
+}
+
+[class*="span"].pull-right,
+.row-fluid [class*="span"].pull-right {
+  float: right;
+}
+
+.container {
+  margin-right: auto;
+  margin-left: auto;
+  *zoom: 1;
+}
+
+.container:before,
+.container:after {
+  display: table;
+  line-height: 0;
+  content: "";
+}
+
+.container:after {
+  clear: both;
+}
+
+.container-fluid {
+  padding-right: 20px;
+  padding-left: 20px;
+  *zoom: 1;
+}
+
+.container-fluid:before,
+.container-fluid:after {
+  display: table;
+  line-height: 0;
+  content: "";
+}
+
+.container-fluid:after {
+  clear: both;
+}
+
+p {
+  margin: 0 0 10px;
+}
+
+.lead {
+  margin-bottom: 20px;
+  font-size: 21px;
+  font-weight: 200;
+  line-height: 30px;
+}
+
+small {
+  font-size: 85%;
+}
+
+strong {
+  font-weight: bold;
+}
+
+em {
+  font-style: italic;
+}
+
+cite {
+  font-style: normal;
+}
+
+.muted {
+  color: #999999;
+}
+
+.text-warning {
+  color: #c09853;
+}
+
+a.text-warning:hover {
+  color: #a47e3c;
+}
+
+.text-error {
+  color: #b94a48;
+}
+
+a.text-error:hover {
+  color: #953b39;
+}
+
+.text-info {
+  color: #3a87ad;
+}
+
+a.text-info:hover {
+  color: #2d6987;
+}
+
+.text-success {
+  color: #468847;
+}
+
+a.text-success:hover {
+  color: #356635;
+}
+
+h1,
+h2,
+h3,
+h4,
+h5,
+h6 {
+  margin: 10px 0;
+  font-family: inherit;
+  font-weight: bold;
+  line-height: 20px;
+  color: inherit;
+  text-rendering: optimizelegibility;
+}
+
+h1 small,
+h2 small,
+h3 small,
+h4 small,
+h5 small,
+h6 small {
+  font-weight: normal;
+  line-height: 1;
+  color: #999999;
+}
+
+h1,
+h2,
+h3 {
+  line-height: 40px;
+}
+
+h1 {
+  font-size: 38.5px;
+}
+
+h2 {
+  font-size: 31.5px;
+}
+
+h3 {
+  font-size: 24.5px;
+}
+
+h4 {
+  font-size: 17.5px;
+}
+
+h5 {
+  font-size: 14px;
+}
+
+h6 {
+  font-size: 11.9px;
+}
+
+h1 small {
+  font-size: 24.5px;
+}
+
+h2 small {
+  font-size: 17.5px;
+}
+
+h3 small {
+  font-size: 14px;
+}
+
+h4 small {
+  font-size: 14px;
+}
+
+.page-header {
+  padding-bottom: 9px;
+  margin: 20px 0 30px;
+  border-bottom: 1px solid #eeeeee;
+}
+
+ul,
+ol {
+  padding: 0;
+  margin: 0 0 10px 25px;
+}
+
+ul ul,
+ul ol,
+ol ol,
+ol ul {
+  margin-bottom: 0;
+}
+
+li {
+  line-height: 20px;
+}
+
+ul.unstyled,
+ol.unstyled {
+  margin-left: 0;
+  list-style: none;
+}
+
+dl {
+  margin-bottom: 20px;
+}
+
+dt,
+dd {
+  line-height: 20px;
+}
+
+dt {
+  font-weight: bold;
+}
+
+dd {
+  margin-left: 10px;
+}
+
+.dl-horizontal {
+  *zoom: 1;
+}
+
+.dl-horizontal:before,
+.dl-horizontal:after {
+  display: table;
+  line-height: 0;
+  content: "";
+}
+
+.dl-horizontal:after {
+  clear: both;
+}
+
+.dl-horizontal dt {
+  float: left;
+  width: 160px;
+  overflow: hidden;
+  clear: left;
+  text-align: right;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+}
+
+.dl-horizontal dd {
+  margin-left: 180px;
+}
+
+hr {
+  margin: 20px 0;
+  border: 0;
+  border-top: 1px solid #eeeeee;
+  border-bottom: 1px solid #ffffff;
+}
+
+abbr[title],
+abbr[data-original-title] {
+  cursor: help;
+  border-bottom: 1px dotted #999999;
+}
+
+abbr.initialism {
+  font-size: 90%;
+  text-transform: uppercase;
+}
+
+blockquote {
+  padding: 0 0 0 15px;
+  margin: 0 0 20px;
+  border-left: 5px solid #eeeeee;
+}
+
+blockquote p {
+  margin-bottom: 0;
+  font-size: 16px;
+  font-weight: 300;
+  line-height: 25px;
+}
+
+blockquote small {
+  display: block;
+  line-height: 20px;
+  color: #999999;
+}
+
+blockquote small:before {
+  content: '\2014 \00A0';
+}
+
+blockquote.pull-right {
+  float: right;
+  padding-right: 15px;
+  padding-left: 0;
+  border-right: 5px solid #eeeeee;
+  border-left: 0;
+}
+
+blockquote.pull-right p,
+blockquote.pull-right small {
+  text-align: right;
+}
+
+blockquote.pull-right small:before {
+  content: '';
+}
+
+blockquote.pull-right small:after {
+  content: '\00A0 \2014';
+}
+
+q:before,
+q:after,
+blockquote:before,
+blockquote:after {
+  content: "";
+}
+
+address {
+  display: block;
+  margin-bottom: 20px;
+  font-style: normal;
+  line-height: 20px;
+}
+
+code,
+pre {
+  padding: 0 3px 2px;
+  font-family: Monaco, Menlo, Consolas, "Courier New", monospace;
+  font-size: 12px;
+  color: #333333;
+  -webkit-border-radius: 3px;
+     -moz-border-radius: 3px;
+          border-radius: 3px;
+}
+
+code {
+  padding: 2px 4px;
+  color: #d14; /* FIXME: red? really? */
+  background-color: #f7f7f9;
+  border: 1px solid #e1e1e8;
+}
+
+pre {
+  display: block;
+  padding: 9.5px;
+  margin: 0 0 10px;
+  font-size: 13px;
+  line-height: 20px;
+  word-break: break-all;
+  word-wrap: break-word;
+  white-space: pre;
+  white-space: pre-wrap;
+  background-color: #f5f5f5;
+  border: 1px solid #ccc;
+  border: 1px solid rgba(0, 0, 0, 0.15);
+  -webkit-border-radius: 4px;
+     -moz-border-radius: 4px;
+          border-radius: 4px;
+}
+
+pre.prettyprint {
+  margin-bottom: 20px;
+}
+
+pre code {
+  padding: 0;
+  color: inherit;
+  background-color: transparent;
+  border: 0;
+}
+
+.pre-scrollable {
+  max-height: 340px;
+  overflow-y: scroll;
+}
+
+form {
+  margin: 0 0 20px;
+}
+
+fieldset {
+  padding: 0;
+  margin: 0;
+  border: 0;
+}
+
+legend {
+  display: block;
+  width: 100%;
+  padding: 0;
+  margin-bottom: 20px;
+  font-size: 21px;
+  line-height: 40px;
+  color: #333333;
+  border: 0;
+  border-bottom: 1px solid #e5e5e5;
+}
+
+legend small {
+  font-size: 15px;
+  color: #999999;
+}
+
+label,
+input,
+button,
+select,
+textarea {
+  font-size: 14px;
+  font-weight: normal;
+  line-height: 20px;
+}
+
+input,
+button,
+select,
+textarea {
+  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
+}
+
+label {
+  display: block;
+  margin-bottom: 5px;
+}
+
+select,
+textarea,
+input[type="text"],
+input[type="password"],
+input[type="datetime"],
+input[type="datetime-local"],
+input[type="date"],
+input[type="month"],
+input[type="time"],
+input[type="week"],
+input[type="number"],
+input[type="email"],
+input[type="url"],
+input[type="search"],
+input[type="tel"],
+input[type="color"],
+.uneditable-input {
+  display: inline-block;
+  height: 20px;
+  padding: 4px 6px;
+  margin-bottom: 10px;
+  font-size: 14px;
+  line-height: 20px;
+  color: #555555;
+  vertical-align: middle;
+  -webkit-border-radius: 4px;
+     -moz-border-radius: 4px;
+          border-radius: 4px;
+}
+
+input,
+textarea,
+.uneditable-input {
+  width: 206px;
+}
+
+textarea {
+  height: auto;
+}
+
+textarea,
+input[type="text"],
+input[type="password"],
+input[type="datetime"],
+input[type="datetime-local"],
+input[type="date"],
+input[type="month"],
+input[type="time"],
+input[type="week"],
+input[type="number"],
+input[type="email"],
+input[type="url"],
+input[type="search"],
+input[type="tel"],
+input[type="color"],
+.uneditable-input {
+  background-color: #ffffff;
+  border: 1px solid #cccccc;
+  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+     -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+          box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+  -webkit-transition: border linear 0.2s, box-shadow linear 0.2s;
+     -moz-transition: border linear 0.2s, box-shadow linear 0.2s;
+       -o-transition: border linear 0.2s, box-shadow linear 0.2s;
+          transition: border linear 0.2s, box-shadow linear 0.2s;
+}
+
+textarea:focus,
+input[type="text"]:focus,
+input[type="password"]:focus,
+input[type="datetime"]:focus,
+input[type="datetime-local"]:focus,
+input[type="date"]:focus,
+input[type="month"]:focus,
+input[type="time"]:focus,
+input[type="week"]:focus,
+input[type="number"]:focus,
+input[type="email"]:focus,
+input[type="url"]:focus,
+input[type="search"]:focus,
+input[type="tel"]:focus,
+input[type="color"]:focus,
+.uneditable-input:focus {
+  border-color: rgba(82, 168, 236, 0.8);
+  outline: 0;
+  outline: thin dotted \9;
+  /* IE6-9 */
+
+  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6);
+     -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6);
+          box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6);
+}
+
+input[type="radio"],
+input[type="checkbox"] {
+  margin: 4px 0 0;
+  margin-top: 1px \9;
+  *margin-top: 0;
+  line-height: normal;
+  cursor: pointer;
+}
+
+input[type="file"],
+input[type="image"],
+input[type="submit"],
+input[type="reset"],
+input[type="button"],
+input[type="radio"],
+input[type="checkbox"] {
+  width: auto;
+}
+
+select,
+input[type="file"] {
+  height: 30px;
+  /* In IE7, the height of the select element cannot be changed by height, only font-size */
+
+  *margin-top: 4px;
+  /* For IE7, add top margin to align select with labels */
+
+  line-height: 30px;
+}
+
+select {
+  width: 220px;
+  background-color: #ffffff;
+  border: 1px solid #cccccc;
+}
+
+select[multiple],
+select[size] {
+  height: auto;
+}
+
+select:focus,
+input[type="file"]:focus,
+input[type="radio"]:focus,
+input[type="checkbox"]:focus {
+  outline: thin dotted #333;
+  outline: 5px auto -webkit-focus-ring-color;
+  outline-offset: -2px;
+}
+
+.uneditable-input,
+.uneditable-textarea {
+  color: #999999;
+  cursor: not-allowed;
+  background-color: #fcfcfc;
+  border-color: #cccccc;
+  -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025);
+     -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025);
+          box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025);
+}
+
+.uneditable-input {
+  overflow: hidden;
+  white-space: nowrap;
+}
+
+.uneditable-textarea {
+  width: auto;
+  height: auto;
+}
+
+input:-moz-placeholder,
+textarea:-moz-placeholder {
+  color: #999999;
+}
+
+input:-ms-input-placeholder,
+textarea:-ms-input-placeholder {
+  color: #999999;
+}
+
+input::-webkit-input-placeholder,
+textarea::-webkit-input-placeholder {
+  color: #999999;
+}
+
+.radio,
+.checkbox {
+  min-height: 20px;
+  padding-left: 20px;
+}
+
+.radio input[type="radio"],
+.checkbox input[type="checkbox"] {
+  float: left;
+  margin-left: -20px;
+}
+
+.controls > .radio:first-child,
+.controls > .checkbox:first-child {
+  padding-top: 5px;
+}
+
+.radio.inline,
+.checkbox.inline {
+  display: inline-block;
+  padding-top: 5px;
+  margin-bottom: 0;
+  vertical-align: middle;
+}
+
+.radio.inline + .radio.inline,
+.checkbox.inline + .checkbox.inline {
+  margin-left: 10px;
+}
+
+.input-mini {
+  width: 60px;
+}
+
+.input-small {
+  width: 90px;
+}
+
+.input-medium {
+  width: 150px;
+}
+
+.input-large {
+  width: 210px;
+}
+
+.input-xlarge {
+  width: 270px;
+}
+
+.input-xxlarge {
+  width: 530px;
+}
+
+input[class*="span"],
+select[class*="span"],
+textarea[class*="span"],
+.uneditable-input[class*="span"],
+.row-fluid input[class*="span"],
+.row-fluid select[class*="span"],
+.row-fluid textarea[class*="span"],
+.row-fluid .uneditable-input[class*="span"] {
+  float: none;
+  margin-left: 0;
+}
+
+.input-append input[class*="span"],
+.input-append .uneditable-input[class*="span"],
+.input-prepend input[class*="span"],
+.input-prepend .uneditable-input[class*="span"],
+.row-fluid input[class*="span"],
+.row-fluid select[class*="span"],
+.row-fluid textarea[class*="span"],
+.row-fluid .uneditable-input[class*="span"],
+.row-fluid .input-prepend [class*="span"],
+.row-fluid .input-append [class*="span"] {
+  display: inline-block;
+}
+
+input,
+textarea,
+.uneditable-input {
+  margin-left: 0;
+}
+
+.controls-row [class*="span"] + [class*="span"] {
+  margin-left: 20px;
+}
+
+input.span12,
+textarea.span12,
+.uneditable-input.span12 {
+  width: 926px;
+}
+
+input.span11,
+textarea.span11,
+.uneditable-input.span11 {
+  width: 846px;
+}
+
+input.span10,
+textarea.span10,
+.uneditable-input.span10 {
+  width: 766px;
+}
+
+input.span9,
+textarea.span9,
+.uneditable-input.span9 {
+  width: 686px;
+}
+
+input.span8,
+textarea.span8,
+.uneditable-input.span8 {
+  width: 606px;
+}
+
+input.span7,
+textarea.span7,
+.uneditable-input.span7 {
+  width: 526px;
+}
+
+input.span6,
+textarea.span6,
+.uneditable-input.span6 {
+  width: 446px;
+}
+
+input.span5,
+textarea.span5,
+.uneditable-input.span5 {
+  width: 366px;
+}
+
+input.span4,
+textarea.span4,
+.uneditable-input.span4 {
+  width: 286px;
+}
+
+input.span3,
+textarea.span3,
+.uneditable-input.span3 {
+  width: 206px;
+}
+
+input.span2,
+textarea.span2,
+.uneditable-input.span2 {
+  width: 126px;
+}
+
+input.span1,
+textarea.span1,
+.uneditable-input.span1 {
+  width: 46px;
+}
+
+.controls-row {
+  *zoom: 1;
+}
+
+.controls-row:before,
+.controls-row:after {
+  display: table;
+  line-height: 0;
+  content: "";
+}
+
+.controls-row:after {
+  clear: both;
+}
+
+.controls-row [class*="span"],
+.row-fluid .controls-row [class*="span"] {
+  float: left;
+}
+
+.controls-row .checkbox[class*="span"],
+.controls-row .radio[class*="span"] {
+  padding-top: 5px;
+}
+
+input[disabled],
+select[disabled],
+textarea[disabled],
+input[readonly],
+select[readonly],
+textarea[readonly] {
+  cursor: not-allowed;
+  background-color: #eeeeee;
+}
+
+input[type="radio"][disabled],
+input[type="checkbox"][disabled],
+input[type="radio"][readonly],
+input[type="checkbox"][readonly] {
+  background-color: transparent;
+}
+
+.control-group.warning > label,
+.control-group.warning .help-block,
+.control-group.warning .help-inline {
+  color: #c09853;
+}
+
+.control-group.warning .checkbox,
+.control-group.warning .radio,
+.control-group.warning input,
+.control-group.warning select,
+.control-group.warning textarea {
+  color: #c09853;
+}
+
+.control-group.warning input,
+.control-group.warning select,
+.control-group.warning textarea {
+  border-color: #c09853;
+  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+     -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+          box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+}
+
+.control-group.warning input:focus,
+.control-group.warning select:focus,
+.control-group.warning textarea:focus {
+  border-color: #a47e3c;
+  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e;
+     -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e;
+          box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e;
+}
+
+.control-group.warning .input-prepend .add-on,
+.control-group.warning .input-append .add-on {
+  color: #c09853;
+  background-color: #fcf8e3;
+  border-color: #c09853;
+}
+
+.control-group.error > label,
+.control-group.error .help-block,
+.control-group.error .help-inline {
+  color: #b94a48;
+}
+
+.control-group.error .checkbox,
+.control-group.error .radio,
+.control-group.error input,
+.control-group.error select,
+.control-group.error textarea {
+  color: #b94a48;
+}
+
+.control-group.error input,
+.control-group.error select,
+.control-group.error textarea {
+  border-color: #b94a48;
+  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+     -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+          box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+}
+
+.control-group.error input:focus,
+.control-group.error select:focus,
+.control-group.error textarea:focus {
+  border-color: #953b39;
+  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392;
+     -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392;
+          box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392;
+}
+
+.control-group.error .input-prepend .add-on,
+.control-group.error .input-append .add-on {
+  color: #b94a48;
+  background-color: #f2dede;
+  border-color: #b94a48;
+}
+
+.control-group.success > label,
+.control-group.success .help-block,
+.control-group.success .help-inline {
+  color: #468847;
+}
+
+.control-group.success .checkbox,
+.control-group.success .radio,
+.control-group.success input,
+.control-group.success select,
+.control-group.success textarea {
+  color: #468847;
+}
+
+.control-group.success input,
+.control-group.success select,
+.control-group.success textarea {
+  border-color: #468847;
+  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+     -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+          box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+}
+
+.control-group.success input:focus,
+.control-group.success select:focus,
+.control-group.success textarea:focus {
+  border-color: #356635;
+  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b;
+     -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b;
+          box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b;
+}
+
+.control-group.success .input-prepend .add-on,
+.control-group.success .input-append .add-on {
+  color: #468847;
+  background-color: #dff0d8;
+  border-color: #468847;
+}
+
+.control-group.info > label,
+.control-group.info .help-block,
+.control-group.info .help-inline {
+  color: #3a87ad;
+}
+
+.control-group.info .checkbox,
+.control-group.info .radio,
+.control-group.info input,
+.control-group.info select,
+.control-group.info textarea {
+  color: #3a87ad;
+}
+
+.control-group.info input,
+.control-group.info select,
+.control-group.info textarea {
+  border-color: #3a87ad;
+  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+     -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+          box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+}
+
+.control-group.info input:focus,
+.control-group.info select:focus,
+.control-group.info textarea:focus {
+  border-color: #2d6987;
+  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7ab5d3;
+     -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7ab5d3;
+          box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7ab5d3;
+}
+
+.control-group.info .input-prepend .add-on,
+.control-group.info .input-append .add-on {
+  color: #3a87ad;
+  background-color: #d9edf7;
+  border-color: #3a87ad;
+}
+
+input:focus:required:invalid,
+textarea:focus:required:invalid,
+select:focus:required:invalid {
+  color: #b94a48;
+  border-color: #ee5f5b;
+}
+
+input:focus:required:invalid:focus,
+textarea:focus:required:invalid:focus,
+select:focus:required:invalid:focus {
+  border-color: #e9322d;
+  -webkit-box-shadow: 0 0 6px #f8b9b7;
+     -moz-box-shadow: 0 0 6px #f8b9b7;
+          box-shadow: 0 0 6px #f8b9b7;
+}
+
+.form-actions {
+  padding: 19px 20px 20px;
+  margin-top: 20px;
+  margin-bottom: 20px;
+  background-color: #f5f5f5;
+  border-top: 1px solid #e5e5e5;
+  *zoom: 1;
+}
+
+.form-actions:before,
+.form-actions:after {
+  display: table;
+  line-height: 0;
+  content: "";
+}
+
+.form-actions:after {
+  clear: both;
+}
+
+.help-block,
+.help-inline {
+  color: #595959;
+}
+
+.help-block {
+  display: block;
+  margin-bottom: 10px;
+}
+
+.help-inline {
+  display: inline-block;
+  *display: inline;
+  padding-left: 5px;
+  vertical-align: middle;
+  *zoom: 1;
+}
+
+.input-append,
+.input-prepend {
+  margin-bottom: 5px;
+  font-size: 0;
+  white-space: nowrap;
+}
+
+.input-append input,
+.input-prepend input,
+.input-append select,
+.input-prepend select,
+.input-append .uneditable-input,
+.input-prepend .uneditable-input,
+.input-append .dropdown-menu,
+.input-prepend .dropdown-menu {
+  font-size: 14px;
+}
+
+.input-append input,
+.input-prepend input,
+.input-append select,
+.input-prepend select,
+.input-append .uneditable-input,
+.input-prepend .uneditable-input {
+  position: relative;
+  margin-bottom: 0;
+  *margin-left: 0;
+  vertical-align: top;
+  -webkit-border-radius: 0 4px 4px 0;
+     -moz-border-radius: 0 4px 4px 0;
+          border-radius: 0 4px 4px 0;
+}
+
+.input-append input:focus,
+.input-prepend input:focus,
+.input-append select:focus,
+.input-prepend select:focus,
+.input-append .uneditable-input:focus,
+.input-prepend .uneditable-input:focus {
+  z-index: 2;
+}
+
+.input-append .add-on,
+.input-prepend .add-on {
+  display: inline-block;
+  width: auto;
+  height: 20px;
+  min-width: 16px;
+  padding: 4px 5px;
+  font-size: 14px;
+  font-weight: normal;
+  line-height: 20px;
+  text-align: center;
+  text-shadow: 0 1px 0 #ffffff;
+  background-color: #eeeeee;
+  border: 1px solid #ccc;
+}
+
+.input-append .add-on,
+.input-prepend .add-on,
+.input-append .btn,
+.input-prepend .btn {
+  vertical-align: top;
+  -webkit-border-radius: 0;
+     -moz-border-radius: 0;
+          border-radius: 0;
+}
+
+.input-append .active,
+.input-prepend .active {
+  background-color: #a9dba9;
+  border-color: #46a546;
+}
+
+.input-prepend .add-on,
+.input-prepend .btn {
+  margin-right: -1px;
+}
+
+.input-prepend .add-on:first-child,
+.input-prepend .btn:first-child {
+  -webkit-border-radius: 4px 0 0 4px;
+     -moz-border-radius: 4px 0 0 4px;
+          border-radius: 4px 0 0 4px;
+}
+
+.input-append input,
+.input-append select,
+.input-append .uneditable-input {
+  -webkit-border-radius: 4px 0 0 4px;
+     -moz-border-radius: 4px 0 0 4px;
+          border-radius: 4px 0 0 4px;
+}
+
+.input-append input + .btn-group .btn,
+.input-append select + .btn-group .btn,
+.input-append .uneditable-input + .btn-group .btn {
+  -webkit-border-radius: 0 4px 4px 0;
+     -moz-border-radius: 0 4px 4px 0;
+          border-radius: 0 4px 4px 0;
+}
+
+.input-append .add-on,
+.input-append .btn,
+.input-append .btn-group {
+  margin-left: -1px;
+}
+
+.input-append .add-on:last-child,
+.input-append .btn:last-child {
+  -webkit-border-radius: 0 4px 4px 0;
+     -moz-border-radius: 0 4px 4px 0;
+          border-radius: 0 4px 4px 0;
+}
+
+.input-prepend.input-append input,
+.input-prepend.input-append select,
+.input-prepend.input-append .uneditable-input {
+  -webkit-border-radius: 0;
+     -moz-border-radius: 0;
+          border-radius: 0;
+}
+
+.input-prepend.input-append input + .btn-group .btn,
+.input-prepend.input-append select + .btn-group .btn,
+.input-prepend.input-append .uneditable-input + .btn-group .btn {
+  -webkit-border-radius: 0 4px 4px 0;
+     -moz-border-radius: 0 4px 4px 0;
+          border-radius: 0 4px 4px 0;
+}
+
+.input-prepend.input-append .add-on:first-child,
+.input-prepend.input-append .btn:first-child {
+  margin-right: -1px;
+  -webkit-border-radius: 4px 0 0 4px;
+     -moz-border-radius: 4px 0 0 4px;
+          border-radius: 4px 0 0 4px;
+}
+
+.input-prepend.input-append .add-on:last-child,
+.input-prepend.input-append .btn:last-child {
+  margin-left: -1px;
+  -webkit-border-radius: 0 4px 4px 0;
+     -moz-border-radius: 0 4px 4px 0;
+          border-radius: 0 4px 4px 0;
+}
+
+.input-prepend.input-append .btn-group:first-child {
+  margin-left: 0;
+}
+
+input.search-query {
+  padding-right: 14px;
+  padding-right: 4px \9;
+  padding-left: 14px;
+  padding-left: 4px \9;
+  /* IE7-8 doesn't have border-radius, so don't indent the padding */
+
+  margin-bottom: 0;
+  -webkit-border-radius: 15px;
+     -moz-border-radius: 15px;
+          border-radius: 15px;
+}
+
+/* Allow for input prepend/append in search forms */
+
+.form-search .input-append .search-query,
+.form-search .input-prepend .search-query {
+  -webkit-border-radius: 0;
+     -moz-border-radius: 0;
+          border-radius: 0;
+}
+
+.form-search .input-append .search-query {
+  -webkit-border-radius: 14px 0 0 14px;
+     -moz-border-radius: 14px 0 0 14px;
+          border-radius: 14px 0 0 14px;
+}
+
+.form-search .input-append .btn {
+  -webkit-border-radius: 0 14px 14px 0;
+     -moz-border-radius: 0 14px 14px 0;
+          border-radius: 0 14px 14px 0;
+}
+
+.form-search .input-prepend .search-query {
+  -webkit-border-radius: 0 14px 14px 0;
+     -moz-border-radius: 0 14px 14px 0;
+          border-radius: 0 14px 14px 0;
+}
+
+.form-search .input-prepend .btn {
+  -webkit-border-radius: 14px 0 0 14px;
+     -moz-border-radius: 14px 0 0 14px;
+          border-radius: 14px 0 0 14px;
+}
+
+.form-search input,
+.form-inline input,
+.form-horizontal input,
+.form-search textarea,
+.form-inline textarea,
+.form-horizontal textarea,
+.form-search select,
+.form-inline select,
+.form-horizontal select,
+.form-search .help-inline,
+.form-inline .help-inline,
+.form-horizontal .help-inline,
+.form-search .uneditable-input,
+.form-inline .uneditable-input,
+.form-horizontal .uneditable-input,
+.form-search .input-prepend,
+.form-inline .input-prepend,
+.form-horizontal .input-prepend,
+.form-search .input-append,
+.form-inline .input-append,
+.form-horizontal .input-append {
+  display: inline-block;
+  *display: inline;
+  margin-bottom: 0;
+  vertical-align: middle;
+  *zoom: 1;
+}
+
+.form-search .hide,
+.form-inline .hide,
+.form-horizontal .hide {
+  display: none;
+}
+
+.form-search label,
+.form-inline label,
+.form-search .btn-group,
+.form-inline .btn-group {
+  display: inline-block;
+}
+
+.form-search .input-append,
+.form-inline .input-append,
+.form-search .input-prepend,
+.form-inline .input-prepend {
+  margin-bottom: 0;
+}
+
+.form-search .radio,
+.form-search .checkbox,
+.form-inline .radio,
+.form-inline .checkbox {
+  padding-left: 0;
+  margin-bottom: 0;
+  vertical-align: middle;
+}
+
+.form-search .radio input[type="radio"],
+.form-search .checkbox input[type="checkbox"],
+.form-inline .radio input[type="radio"],
+.form-inline .checkbox input[type="checkbox"] {
+  float: left;
+  margin-right: 3px;
+  margin-left: 0;
+}
+
+.control-group {
+  margin-bottom: 10px;
+}
+
+legend + .control-group {
+  margin-top: 20px;
+  -webkit-margin-top-collapse: separate;
+}
+
+.form-horizontal .control-group {
+  margin-bottom: 20px;
+  *zoom: 1;
+}
+
+.form-horizontal .control-group:before,
+.form-horizontal .control-group:after {
+  display: table;
+  line-height: 0;
+  content: "";
+}
+
+.form-horizontal .control-group:after {
+  clear: both;
+}
+
+.form-horizontal .control-label {
+  float: left;
+  width: 160px;
+  padding-top: 5px;
+  text-align: right;
+}
+
+.form-horizontal .controls {
+  *display: inline-block;
+  *padding-left: 20px;
+  margin-left: 180px;
+  *margin-left: 0;
+}
+
+.form-horizontal .controls:first-child {
+  *padding-left: 180px;
+}
+
+.form-horizontal .help-block {
+  margin-bottom: 0;
+}
+
+.form-horizontal input + .help-block,
+.form-horizontal select + .help-block,
+.form-horizontal textarea + .help-block {
+  margin-top: 10px;
+}
+
+.form-horizontal .form-actions {
+  padding-left: 180px;
+}
+
+table {
+  max-width: 100%;
+  background-color: transparent;
+  border-collapse: collapse;
+  border-spacing: 0;
+}
+
+.table {
+  width: 100%;
+  margin-bottom: 20px;
+}
+
+.table th,
+.table td {
+  padding: 8px;
+  line-height: 20px;
+  text-align: left;
+  vertical-align: top;
+  border-top: 1px solid #dddddd;
+}
+
+.table th {
+  font-weight: bold;
+}
+
+.table thead th {
+  vertical-align: bottom;
+}
+
+.table caption + thead tr:first-child th,
+.table caption + thead tr:first-child td,
+.table colgroup + thead tr:first-child th,
+.table colgroup + thead tr:first-child td,
+.table thead:first-child tr:first-child th,
+.table thead:first-child tr:first-child td {
+  border-top: 0;
+}
+
+.table tbody + tbody {
+  border-top: 2px solid #dddddd;
+}
+
+.table-condensed th,
+.table-condensed td {
+  padding: 4px 5px;
+}
+
+.table-bordered {
+  border: 1px solid #dddddd;
+  border-collapse: separate;
+  *border-collapse: collapse;
+  border-left: 0;
+  -webkit-border-radius: 4px;
+     -moz-border-radius: 4px;
+          border-radius: 4px;
+}
+
+.table-bordered th,
+.table-bordered td {
+  border-left: 1px solid #dddddd;
+}
+
+.table-bordered caption + thead tr:first-child th,
+.table-bordered caption + tbody tr:first-child th,
+.table-bordered caption + tbody tr:first-child td,
+.table-bordered colgroup + thead tr:first-child th,
+.table-bordered colgroup + tbody tr:first-child th,
+.table-bordered colgroup + tbody tr:first-child td,
+.table-bordered thead:first-child tr:first-child th,
+.table-bordered tbody:first-child tr:first-child th,
+.table-bordered tbody:first-child tr:first-child td {
+  border-top: 0;
+}
+
+.table-bordered thead:first-child tr:first-child th:first-child,
+.table-bordered tbody:first-child tr:first-child td:first-child {
+  -webkit-border-top-left-radius: 4px;
+          border-top-left-radius: 4px;
+  -moz-border-radius-topleft: 4px;
+}
+
+.table-bordered thead:first-child tr:first-child th:last-child,
+.table-bordered tbody:first-child tr:first-child td:last-child {
+  -webkit-border-top-right-radius: 4px;
+          border-top-right-radius: 4px;
+  -moz-border-radius-topright: 4px;
+}
+
+.table-bordered thead:last-child tr:last-child th:first-child,
+.table-bordered tbody:last-child tr:last-child td:first-child,
+.table-bordered tfoot:last-child tr:last-child td:first-child {
+  -webkit-border-radius: 0 0 0 4px;
+     -moz-border-radius: 0 0 0 4px;
+          border-radius: 0 0 0 4px;
+  -webkit-border-bottom-left-radius: 4px;
+          border-bottom-left-radius: 4px;
+  -moz-border-radius-bottomleft: 4px;
+}
+
+.table-bordered thead:last-child tr:last-child th:last-child,
+.table-bordered tbody:last-child tr:last-child td:last-child,
+.table-bordered tfoot:last-child tr:last-child td:last-child {
+  -webkit-border-bottom-right-radius: 4px;
+          border-bottom-right-radius: 4px;
+  -moz-border-radius-bottomright: 4px;
+}
+
+.table-bordered caption + thead tr:first-child th:first-child,
+.table-bordered caption + tbody tr:first-child td:first-child,
+.table-bordered colgroup + thead tr:first-child th:first-child,
+.table-bordered colgroup + tbody tr:first-child td:first-child {
+  -webkit-border-top-left-radius: 4px;
+          border-top-left-radius: 4px;
+  -moz-border-radius-topleft: 4px;
+}
+
+.table-bordered caption + thead tr:first-child th:last-child,
+.table-bordered caption + tbody tr:first-child td:last-child,
+.table-bordered colgroup + thead tr:first-child th:last-child,
+.table-bordered colgroup + tbody tr:first-child td:last-child {
+  -webkit-border-top-right-radius: 4px;
+          border-top-right-radius: 4px;
+  -moz-border-radius-topright: 4px;
+}
+
+.table-striped tbody tr:nth-child(odd) td,
+.table-striped tbody tr:nth-child(odd) th {
+  background-color: #f9f9f9;
+}
+
+.table-hover tbody tr:hover td,
+.table-hover tbody tr:hover th {
+  background-color: #f5f5f5;
+}
+
+table td[class*="span"],
+table th[class*="span"],
+.row-fluid table td[class*="span"],
+.row-fluid table th[class*="span"] {
+  display: table-cell;
+  float: none;
+  margin-left: 0;
+}
+
+.table td.span1,
+.table th.span1 {
+  float: none;
+  width: 44px;
+  margin-left: 0;
+}
+
+.table td.span2,
+.table th.span2 {
+  float: none;
+  width: 124px;
+  margin-left: 0;
+}
+
+.table td.span3,
+.table th.span3 {
+  float: none;
+  width: 204px;
+  margin-left: 0;
+}
+
+.table td.span4,
+.table th.span4 {
+  float: none;
+  width: 284px;
+  margin-left: 0;
+}
+
+.table td.span5,
+.table th.span5 {
+  float: none;
+  width: 364px;
+  margin-left: 0;
+}
+
+.table td.span6,
+.table th.span6 {
+  float: none;
+  width: 444px;
+  margin-left: 0;
+}
+
+.table td.span7,
+.table th.span7 {
+  float: none;
+  width: 524px;
+  margin-left: 0;
+}
+
+.table td.span8,
+.table th.span8 {
+  float: none;
+  width: 604px;
+  margin-left: 0;
+}
+
+.table td.span9,
+.table th.span9 {
+  float: none;
+  width: 684px;
+  margin-left: 0;
+}
+
+.table td.span10,
+.table th.span10 {
+  float: none;
+  width: 764px;
+  margin-left: 0;
+}
+
+.table td.span11,
+.table th.span11 {
+  float: none;
+  width: 844px;
+  margin-left: 0;
+}
+
+.table td.span12,
+.table th.span12 {
+  float: none;
+  width: 924px;
+  margin-left: 0;
+}
+
+.table tbody tr.success td {
+  background-color: #dff0d8;
+}
+
+.table tbody tr.error td {
+  background-color: #f2dede;
+}
+
+.table tbody tr.warning td {
+  background-color: #fcf8e3;
+}
+
+.table tbody tr.info td {
+  background-color: #d9edf7;
+}
+
+.table-hover tbody tr.success:hover td {
+  background-color: #d0e9c6;
+}
+
+.table-hover tbody tr.error:hover td {
+  background-color: #ebcccc;
+}
+
+.table-hover tbody tr.warning:hover td {
+  background-color: #faf2cc;
+}
+
+.table-hover tbody tr.info:hover td {
+  background-color: #c4e3f3;
+}
+
+[class^="icon-"],
+[class*=" icon-"] {
+  display: inline-block;
+  width: 14px;
+  height: 14px;
+  margin-top: 1px;
+  *margin-right: .3em;
+  line-height: 14px;
+  vertical-align: text-top;
+  background-image: url("../img/glyphicons-halflings.png");
+  background-position: 14px 14px;
+  background-repeat: no-repeat;
+}
+
+/* White icons with optional class, or on hover/active states of certain elements */
+
+.icon-white,
+.nav-pills > .active > a > [class^="icon-"],
+.nav-pills > .active > a > [class*=" icon-"],
+.nav-list > .active > a > [class^="icon-"],
+.nav-list > .active > a > [class*=" icon-"],
+.navbar-inverse .nav > .active > a > [class^="icon-"],
+.navbar-inverse .nav > .active > a > [class*=" icon-"],
+.dropdown-menu > li > a:hover > [class^="icon-"],
+.dropdown-menu > li > a:hover > [class*=" icon-"],
+.dropdown-menu > .active > a > [class^="icon-"],
+.dropdown-menu > .active > a > [class*=" icon-"],
+.dropdown-submenu:hover > a > [class^="icon-"],
+.dropdown-submenu:hover > a > [class*=" icon-"] {
+  background-image: url("../img/glyphicons-halflings-white.png");
+}
+
+.icon-glass {
+  background-position: 0      0;
+}
+
+.icon-music {
+  background-position: -24px 0;
+}
+
+.icon-search {
+  background-position: -48px 0;
+}
+
+.icon-envelope {
+  background-position: -72px 0;
+}
+
+.icon-heart {
+  background-position: -96px 0;
+}
+
+.icon-star {
+  background-position: -120px 0;
+}
+
+.icon-star-empty {
+  background-position: -144px 0;
+}
+
+.icon-user {
+  background-position: -168px 0;
+}
+
+.icon-film {
+  background-position: -192px 0;
+}
+
+.icon-th-large {
+  background-position: -216px 0;
+}
+
+.icon-th {
+  background-position: -240px 0;
+}
+
+.icon-th-list {
+  background-position: -264px 0;
+}
+
+.icon-ok {
+  background-position: -288px 0;
+}
+
+.icon-remove {
+  background-position: -312px 0;
+}
+
+.icon-zoom-in {
+  background-position: -336px 0;
+}
+
+.icon-zoom-out {
+  background-position: -360px 0;
+}
+
+.icon-off {
+  background-position: -384px 0;
+}
+
+.icon-signal {
+  background-position: -408px 0;
+}
+
+.icon-cog {
+  background-position: -432px 0;
+}
+
+.icon-trash {
+  background-position: -456px 0;
+}
+
+.icon-home {
+  background-position: 0 -24px;
+}
+
+.icon-file {
+  background-position: -24px -24px;
+}
+
+.icon-time {
+  background-position: -48px -24px;
+}
+
+.icon-road {
+  background-position: -72px -24px;
+}
+
+.icon-download-alt {
+  background-position: -96px -24px;
+}
+
+.icon-download {
+  background-position: -120px -24px;
+}
+
+.icon-upload {
+  background-position: -144px -24px;
+}
+
+.icon-inbox {
+  background-position: -168px -24px;
+}
+
+.icon-play-circle {
+  background-position: -192px -24px;
+}
+
+.icon-repeat {
+  background-position: -216px -24px;
+}
+
+.icon-refresh {
+  background-position: -240px -24px;
+}
+
+.icon-list-alt {
+  background-position: -264px -24px;
+}
+
+.icon-lock {
+  background-position: -287px -24px;
+}
+
+.icon-flag {
+  background-position: -312px -24px;
+}
+
+.icon-headphones {
+  background-position: -336px -24px;
+}
+
+.icon-volume-off {
+  background-position: -360px -24px;
+}
+
+.icon-volume-down {
+  background-position: -384px -24px;
+}
+
+.icon-volume-up {
+  background-position: -408px -24px;
+}
+
+.icon-qrcode {
+  background-position: -432px -24px;
+}
+
+.icon-barcode {
+  background-position: -456px -24px;
+}
+
+.icon-tag {
+  background-position: 0 -48px;
+}
+
+.icon-tags {
+  background-position: -25px -48px;
+}
+
+.icon-book {
+  background-position: -48px -48px;
+}
+
+.icon-bookmark {
+  background-position: -72px -48px;
+}
+
+.icon-print {
+  background-position: -96px -48px;
+}
+
+.icon-camera {
+  background-position: -120px -48px;
+}
+
+.icon-font {
+  background-position: -144px -48px;
+}
+
+.icon-bold {
+  background-position: -167px -48px;
+}
+
+.icon-italic {
+  background-position: -192px -48px;
+}
+
+.icon-text-height {
+  background-position: -216px -48px;
+}
+
+.icon-text-width {
+  background-position: -240px -48px;
+}
+
+.icon-align-left {
+  background-position: -264px -48px;
+}
+
+.icon-align-center {
+  background-position: -288px -48px;
+}
+
+.icon-align-right {
+  background-position: -312px -48px;
+}
+
+.icon-align-justify {
+  background-position: -336px -48px;
+}
+
+.icon-list {
+  background-position: -360px -48px;
+}
+
+.icon-indent-left {
+  background-position: -384px -48px;
+}
+
+.icon-indent-right {
+  background-position: -408px -48px;
+}
+
+.icon-facetime-video {
+  background-position: -432px -48px;
+}
+
+.icon-picture {
+  background-position: -456px -48px;
+}
+
+.icon-pencil {
+  background-position: 0 -72px;
+}
+
+.icon-map-marker {
+  background-position: -24px -72px;
+}
+
+.icon-adjust {
+  background-position: -48px -72px;
+}
+
+.icon-tint {
+  background-position: -72px -72px;
+}
+
+.icon-edit {
+  background-position: -96px -72px;
+}
+
+.icon-share {
+  background-position: -120px -72px;
+}
+
+.icon-check {
+  background-position: -144px -72px;
+}
+
+.icon-move {
+  background-position: -168px -72px;
+}
+
+.icon-step-backward {
+  background-position: -192px -72px;
+}
+
+.icon-fast-backward {
+  background-position: -216px -72px;
+}
+
+.icon-backward {
+  background-position: -240px -72px;
+}
+
+.icon-play {
+  background-position: -264px -72px;
+}
+
+.icon-pause {
+  background-position: -288px -72px;
+}
+
+.icon-stop {
+  background-position: -312px -72px;
+}
+
+.icon-forward {
+  background-position: -336px -72px;
+}
+
+.icon-fast-forward {
+  background-position: -360px -72px;
+}
+
+.icon-step-forward {
+  background-position: -384px -72px;
+}
+
+.icon-eject {
+  background-position: -408px -72px;
+}
+
+.icon-chevron-left {
+  background-position: -432px -72px;
+}
+
+.icon-chevron-right {
+  background-position: -456px -72px;
+}
+
+.icon-plus-sign {
+  background-position: 0 -96px;
+}
+
+.icon-minus-sign {
+  background-position: -24px -96px;
+}
+
+.icon-remove-sign {
+  background-position: -48px -96px;
+}
+
+.icon-ok-sign {
+  background-position: -72px -96px;
+}
+
+.icon-question-sign {
+  background-position: -96px -96px;
+}
+
+.icon-info-sign {
+  background-position: -120px -96px;
+}
+
+.icon-screenshot {
+  background-position: -144px -96px;
+}
+
+.icon-remove-circle {
+  background-position: -168px -96px;
+}
+
+.icon-ok-circle {
+  background-position: -192px -96px;
+}
+
+.icon-ban-circle {
+  background-position: -216px -96px;
+}
+
+.icon-arrow-left {
+  background-position: -240px -96px;
+}
+
+.icon-arrow-right {
+  background-position: -264px -96px;
+}
+
+.icon-arrow-up {
+  background-position: -289px -96px;
+}
+
+.icon-arrow-down {
+  background-position: -312px -96px;
+}
+
+.icon-share-alt {
+  background-position: -336px -96px;
+}
+
+.icon-resize-full {
+  background-position: -360px -96px;
+}
+
+.icon-resize-small {
+  background-position: -384px -96px;
+}
+
+.icon-plus {
+  background-position: -408px -96px;
+}
+
+.icon-minus {
+  background-position: -433px -96px;
+}
+
+.icon-asterisk {
+  background-position: -456px -96px;
+}
+
+.icon-exclamation-sign {
+  background-position: 0 -120px;
+}
+
+.icon-gift {
+  background-position: -24px -120px;
+}
+
+.icon-leaf {
+  background-position: -48px -120px;
+}
+
+.icon-fire {
+  background-position: -72px -120px;
+}
+
+.icon-eye-open {
+  background-position: -96px -120px;
+}
+
+.icon-eye-close {
+  background-position: -120px -120px;
+}
+
+.icon-warning-sign {
+  background-position: -144px -120px;
+}
+
+.icon-plane {
+  background-position: -168px -120px;
+}
+
+.icon-calendar {
+  background-position: -192px -120px;
+}
+
+.icon-random {
+  width: 16px;
+  background-position: -216px -120px;
+}
+
+.icon-comment {
+  background-position: -240px -120px;
+}
+
+.icon-magnet {
+  background-position: -264px -120px;
+}
+
+.icon-chevron-up {
+  background-position: -288px -120px;
+}
+
+.icon-chevron-down {
+  background-position: -313px -119px;
+}
+
+.icon-retweet {
+  background-position: -336px -120px;
+}
+
+.icon-shopping-cart {
+  background-position: -360px -120px;
+}
+
+.icon-folder-close {
+  background-position: -384px -120px;
+}
+
+.icon-folder-open {
+  width: 16px;
+  background-position: -408px -120px;
+}
+
+.icon-resize-vertical {
+  background-position: -432px -119px;
+}
+
+.icon-resize-horizontal {
+  background-position: -456px -118px;
+}
+
+.icon-hdd {
+  background-position: 0 -144px;
+}
+
+.icon-bullhorn {
+  background-position: -24px -144px;
+}
+
+.icon-bell {
+  background-position: -48px -144px;
+}
+
+.icon-certificate {
+  background-position: -72px -144px;
+}
+
+.icon-thumbs-up {
+  background-position: -96px -144px;
+}
+
+.icon-thumbs-down {
+  background-position: -120px -144px;
+}
+
+.icon-hand-right {
+  background-position: -144px -144px;
+}
+
+.icon-hand-left {
+  background-position: -168px -144px;
+}
+
+.icon-hand-up {
+  background-position: -192px -144px;
+}
+
+.icon-hand-down {
+  background-position: -216px -144px;
+}
+
+.icon-circle-arrow-right {
+  background-position: -240px -144px;
+}
+
+.icon-circle-arrow-left {
+  background-position: -264px -144px;
+}
+
+.icon-circle-arrow-up {
+  background-position: -288px -144px;
+}
+
+.icon-circle-arrow-down {
+  background-position: -312px -144px;
+}
+
+.icon-globe {
+  background-position: -336px -144px;
+}
+
+.icon-wrench {
+  background-position: -360px -144px;
+}
+
+.icon-tasks {
+  background-position: -384px -144px;
+}
+
+.icon-filter {
+  background-position: -408px -144px;
+}
+
+.icon-briefcase {
+  background-position: -432px -144px;
+}
+
+.icon-fullscreen {
+  background-position: -456px -144px;
+}
+
+.dropup,
+.dropdown {
+  position: relative;
+}
+
+.dropdown-toggle {
+  *margin-bottom: -3px;
+}
+
+.dropdown-toggle:active,
+.open .dropdown-toggle {
+  outline: 0;
+}
+
+.caret {
+  display: inline-block;
+  width: 0;
+  height: 0;
+  vertical-align: top;
+  border-top: 4px solid #000000;
+  border-right: 4px solid transparent;
+  border-left: 4px solid transparent;
+  content: "";
+}
+
+.dropdown .caret {
+  margin-top: 8px;
+  margin-left: 2px;
+}
+
+.dropdown-menu {
+  position: absolute;
+  top: 100%;
+  left: 0;
+  z-index: 1000;
+  display: none;
+  float: left;
+  min-width: 160px;
+  padding: 5px 0;
+  margin: 2px 0 0;
+  list-style: none;
+  background-color: #ffffff;
+  border: 1px solid #ccc;
+  border: 1px solid rgba(0, 0, 0, 0.2);
+  *border-right-width: 2px;
+  *border-bottom-width: 2px;
+  -webkit-border-radius: 6px;
+     -moz-border-radius: 6px;
+          border-radius: 6px;
+  -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
+     -moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
+          box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
+  -webkit-background-clip: padding-box;
+     -moz-background-clip: padding;
+          background-clip: padding-box;
+}
+
+.dropdown-menu.pull-right {
+  right: 0;
+  left: auto;
+}
+
+.dropdown-menu .divider {
+  *width: 100%;
+  height: 1px;
+  margin: 9px 1px;
+  *margin: -5px 0 5px;
+  overflow: hidden;
+  background-color: #e5e5e5;
+  border-bottom: 1px solid #ffffff;
+}
+
+.dropdown-menu li > a {
+  display: block;
+  padding: 3px 20px;
+  clear: both;
+  font-weight: normal;
+  line-height: 20px;
+  color: #333333;
+  white-space: nowrap;
+}
+
+.dropdown-menu li > a:hover,
+.dropdown-menu li > a:focus,
+.dropdown-submenu:hover > a {
+  color: #ffffff;
+  text-decoration: none;
+  background-color: #0081c2;
+  background-image: -moz-linear-gradient(top, #0088cc, #0077b3);
+  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0077b3));
+  background-image: -webkit-linear-gradient(top, #0088cc, #0077b3);
+  background-image: -o-linear-gradient(top, #0088cc, #0077b3);
+  background-image: linear-gradient(to bottom, #0088cc, #0077b3);
+  background-repeat: repeat-x;
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0077b3', GradientType=0);
+}
+
+.dropdown-menu .active > a,
+.dropdown-menu .active > a:hover {
+  color: #333333;
+  text-decoration: none;
+  background-color: #0081c2;
+  background-image: -moz-linear-gradient(top, #0088cc, #0077b3);
+  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0077b3));
+  background-image: -webkit-linear-gradient(top, #0088cc, #0077b3);
+  background-image: -o-linear-gradient(top, #0088cc, #0077b3);
+  background-image: linear-gradient(to bottom, #0088cc, #0077b3);
+  background-repeat: repeat-x;
+  outline: 0;
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0077b3', GradientType=0);
+}
+
+.dropdown-menu .disabled > a,
+.dropdown-menu .disabled > a:hover {
+  color: #999999;
+}
+
+.dropdown-menu .disabled > a:hover {
+  text-decoration: none;
+  cursor: default;
+  background-color: transparent;
+  background-image: none;
+}
+
+.open {
+  *z-index: 1000;
+}
+
+.open > .dropdown-menu {
+  display: block;
+}
+
+.pull-right > .dropdown-menu {
+  right: 0;
+  left: auto;
+}
+
+.dropup .caret,
+.navbar-fixed-bottom .dropdown .caret {
+  border-top: 0;
+  border-bottom: 4px solid #000000;
+  content: "";
+}
+
+.dropup .dropdown-menu,
+.navbar-fixed-bottom .dropdown .dropdown-menu {
+  top: auto;
+  bottom: 100%;
+  margin-bottom: 1px;
+}
+
+.dropdown-submenu {
+  position: relative;
+}
+
+.dropdown-submenu > .dropdown-menu {
+  top: 0;
+  left: 100%;
+  margin-top: -6px;
+  margin-left: -1px;
+  -webkit-border-radius: 0 6px 6px 6px;
+     -moz-border-radius: 0 6px 6px 6px;
+          border-radius: 0 6px 6px 6px;
+}
+
+.dropdown-submenu:hover > .dropdown-menu {
+  display: block;
+}
+
+.dropup .dropdown-submenu > .dropdown-menu {
+  top: auto;
+  bottom: 0;
+  margin-top: 0;
+  margin-bottom: -2px;
+  -webkit-border-radius: 5px 5px 5px 0;
+     -moz-border-radius: 5px 5px 5px 0;
+          border-radius: 5px 5px 5px 0;
+}
+
+.dropdown-submenu > a:after {
+  display: block;
+  float: right;
+  width: 0;
+  height: 0;
+  margin-top: 5px;
+  margin-right: -10px;
+  border-color: transparent;
+  border-left-color: #cccccc;
+  border-style: solid;
+  border-width: 5px 0 5px 5px;
+  content: " ";
+}
+
+.dropdown-submenu:hover > a:after {
+  border-left-color: #ffffff;
+}
+
+.dropdown-submenu.pull-left {
+  float: none;
+}
+
+.dropdown-submenu.pull-left > .dropdown-menu {
+  left: -100%;
+  margin-left: 10px;
+  -webkit-border-radius: 6px 0 6px 6px;
+     -moz-border-radius: 6px 0 6px 6px;
+          border-radius: 6px 0 6px 6px;
+}
+
+.dropdown .dropdown-menu .nav-header {
+  padding-right: 20px;
+  padding-left: 20px;
+}
+
+.typeahead {
+  margin-top: 2px;
+  -webkit-border-radius: 4px;
+     -moz-border-radius: 4px;
+          border-radius: 4px;
+}
+
+.well {
+  min-height: 20px;
+  padding: 19px;
+  margin-bottom: 20px;
+  background-color: #f5f5f5;
+  border: 1px solid #e3e3e3;
+  -webkit-border-radius: 4px;
+     -moz-border-radius: 4px;
+          border-radius: 4px;
+  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
+     -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
+          box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
+}
+
+.well blockquote {
+  border-color: #ddd;
+  border-color: rgba(0, 0, 0, 0.15);
+}
+
+.well-large {
+  padding: 24px;
+  -webkit-border-radius: 6px;
+     -moz-border-radius: 6px;
+          border-radius: 6px;
+}
+
+.well-small {
+  padding: 9px;
+  -webkit-border-radius: 3px;
+     -moz-border-radius: 3px;
+          border-radius: 3px;
+}
+
+.fade {
+  opacity: 0;
+  -webkit-transition: opacity 0.15s linear;
+     -moz-transition: opacity 0.15s linear;
+       -o-transition: opacity 0.15s linear;
+          transition: opacity 0.15s linear;
+}
+
+.fade.in {
+  opacity: 1;
+}
+
+.collapse {
+  position: relative;
+  height: 0;
+  overflow: hidden;
+  -webkit-transition: height 0.35s ease;
+     -moz-transition: height 0.35s ease;
+       -o-transition: height 0.35s ease;
+          transition: height 0.35s ease;
+}
+
+.collapse.in {
+  height: auto;
+}
+
+.close {
+  float: right;
+  font-size: 20px;
+  font-weight: bold;
+  line-height: 20px;
+  color: #000000;
+  text-shadow: 0 1px 0 #ffffff;
+  opacity: 0.2;
+  filter: alpha(opacity=20);
+}
+
+.close:hover {
+  color: #000000;
+  text-decoration: none;
+  cursor: pointer;
+  opacity: 0.4;
+  filter: alpha(opacity=40);
+}
+
+button.close {
+  padding: 0;
+  cursor: pointer;
+  background: transparent;
+  border: 0;
+  -webkit-appearance: none;
+}
+
+.btn {
+  display: inline-block;
+  *display: inline;
+  padding: 4px 12px;
+  margin-bottom: 0;
+  *margin-left: .3em;
+  font-size: 14px;
+  line-height: 20px;
+  *line-height: 20px;
+  color: #333333;
+  text-align: center;
+  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);
+  vertical-align: middle;
+  cursor: pointer;
+  background-color: #f5f5f5;
+  *background-color: #e6e6e6;
+  background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6);
+  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6));
+  background-image: -webkit-linear-gradient(top, #ffffff, #e6e6e6);
+  background-image: -o-linear-gradient(top, #ffffff, #e6e6e6);
+  background-image: linear-gradient(to bottom, #ffffff, #e6e6e6);
+  background-repeat: repeat-x;
+  border: 1px solid #bbbbbb;
+  *border: 0;
+  border-color: #e6e6e6 #e6e6e6 #bfbfbf;
+  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+  border-bottom-color: #a2a2a2;
+  -webkit-border-radius: 4px;
+     -moz-border-radius: 4px;
+          border-radius: 4px;
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe6e6e6', GradientType=0);
+  filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
+  *zoom: 1;
+  -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
+     -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
+          box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
+}
+
+.btn:hover,
+.btn:active,
+.btn.active,
+.btn.disabled,
+.btn[disabled] {
+  color: #333333;
+  background-color: #e6e6e6;
+  *background-color: #d9d9d9;
+}
+
+.btn:active,
+.btn.active {
+  background-color: #cccccc \9;
+}
+
+.btn:first-child {
+  *margin-left: 0;
+}
+
+.btn:hover {
+  color: #333333;
+  text-decoration: none;
+  background-color: #e6e6e6;
+  *background-color: #d9d9d9;
+  /* Buttons in IE7 don't get borders, so darken on hover */
+
+  background-position: 0 -15px;
+  -webkit-transition: background-position 0.1s linear;
+     -moz-transition: background-position 0.1s linear;
+       -o-transition: background-position 0.1s linear;
+          transition: background-position 0.1s linear;
+}
+
+.btn:focus {
+  outline: thin dotted #333;
+  outline: 5px auto -webkit-focus-ring-color;
+  outline-offset: -2px;
+}
+
+.btn.active,
+.btn:active {
+  background-color: #e6e6e6;
+  background-color: #d9d9d9 \9;
+  background-image: none;
+  outline: 0;
+  -webkit-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
+     -moz-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
+          box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
+}
+
+.btn.disabled,
+.btn[disabled] {
+  cursor: default;
+  background-color: #e6e6e6;
+  background-image: none;
+  opacity: 0.65;
+  filter: alpha(opacity=65);
+  -webkit-box-shadow: none;
+     -moz-box-shadow: none;
+          box-shadow: none;
+}
+
+.btn-large {
+  padding: 11px 19px;
+  font-size: 17.5px;
+  -webkit-border-radius: 6px;
+     -moz-border-radius: 6px;
+          border-radius: 6px;
+}
+
+.btn-large [class^="icon-"],
+.btn-large [class*=" icon-"] {
+  margin-top: 2px;
+}
+
+.btn-small {
+  padding: 2px 10px;
+  font-size: 11.9px;
+  -webkit-border-radius: 3px;
+     -moz-border-radius: 3px;
+          border-radius: 3px;
+}
+
+.btn-small [class^="icon-"],
+.btn-small [class*=" icon-"] {
+  margin-top: 0;
+}
+
+.btn-mini {
+  padding: 1px 6px;
+  font-size: 10.5px;
+  -webkit-border-radius: 3px;
+     -moz-border-radius: 3px;
+          border-radius: 3px;
+}
+
+.btn-block {
+  display: block;
+  width: 100%;
+  padding-right: 0;
+  padding-left: 0;
+  -webkit-box-sizing: border-box;
+     -moz-box-sizing: border-box;
+          box-sizing: border-box;
+}
+
+.btn-block + .btn-block {
+  margin-top: 5px;
+}
+
+input[type="submit"].btn-block,
+input[type="reset"].btn-block,
+input[type="button"].btn-block {
+  width: 100%;
+}
+
+.btn-primary.active,
+.btn-warning.active,
+.btn-danger.active,
+.btn-success.active,
+.btn-info.active,
+.btn-inverse.active {
+  color: rgba(255, 255, 255, 0.75);
+}
+
+.btn {
+  border-color: #c5c5c5;
+  border-color: rgba(0, 0, 0, 0.15) rgba(0, 0, 0, 0.15) rgba(0, 0, 0, 0.25);
+}
+
+.btn-primary {
+  color: #ffffff;
+  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+  background-color: #006dcc;
+  *background-color: #0044cc;
+  background-image: -moz-linear-gradient(top, #0088cc, #0044cc);
+  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0044cc));
+  background-image: -webkit-linear-gradient(top, #0088cc, #0044cc);
+  background-image: -o-linear-gradient(top, #0088cc, #0044cc);
+  background-image: linear-gradient(to bottom, #0088cc, #0044cc);
+  background-repeat: repeat-x;
+  border-color: #0044cc #0044cc #002a80;
+  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0044cc', GradientType=0);
+  filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
+}
+
+.btn-primary:hover,
+.btn-primary:active,
+.btn-primary.active,
+.btn-primary.disabled,
+.btn-primary[disabled] {
+  color: #ffffff;
+  background-color: #0044cc;
+  *background-color: #003bb3;
+}
+
+.btn-primary:active,
+.btn-primary.active {
+  background-color: #003399 \9;
+}
+
+.btn-warning {
+  color: #ffffff;
+  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+  background-color: #faa732;
+  *background-color: #f89406;
+  background-image: -moz-linear-gradient(top, #fbb450, #f89406);
+  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fbb450), to(#f89406));
+  background-image: -webkit-linear-gradient(top, #fbb450, #f89406);
+  background-image: -o-linear-gradient(top, #fbb450, #f89406);
+  background-image: linear-gradient(to bottom, #fbb450, #f89406);
+  background-repeat: repeat-x;
+  border-color: #f89406 #f89406 #ad6704;
+  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffbb450', endColorstr='#fff89406', GradientType=0);
+  filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
+}
+
+.btn-warning:hover,
+.btn-warning:active,
+.btn-warning.active,
+.btn-warning.disabled,
+.btn-warning[disabled] {
+  color: #ffffff;
+  background-color: #f89406;
+  *background-color: #df8505;
+}
+
+.btn-warning:active,
+.btn-warning.active {
+  background-color: #c67605 \9;
+}
+
+.btn-danger {
+  color: #ffffff;
+  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+  background-color: #da4f49;
+  *background-color: #bd362f;
+  background-image: -moz-linear-gradient(top, #ee5f5b, #bd362f);
+  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ee5f5b), to(#bd362f));
+  background-image: -webkit-linear-gradient(top, #ee5f5b, #bd362f);
+  background-image: -o-linear-gradient(top, #ee5f5b, #bd362f);
+  background-image: linear-gradient(to bottom, #ee5f5b, #bd362f);
+  background-repeat: repeat-x;
+  border-color: #bd362f #bd362f #802420;
+  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffee5f5b', endColorstr='#ffbd362f', GradientType=0);
+  filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
+}
+
+.btn-danger:hover,
+.btn-danger:active,
+.btn-danger.active,
+.btn-danger.disabled,
+.btn-danger[disabled] {
+  color: #ffffff;
+  background-color: #bd362f;
+  *background-color: #a9302a;
+}
+
+.btn-danger:active,
+.btn-danger.active {
+  background-color: #942a25 \9;
+}
+
+.btn-success {
+  color: #ffffff;
+  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+  background-color: #5bb75b;
+  *background-color: #51a351;
+  background-image: -moz-linear-gradient(top, #62c462, #51a351);
+  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#62c462), to(#51a351));
+  background-image: -webkit-linear-gradient(top, #62c462, #51a351);
+  background-image: -o-linear-gradient(top, #62c462, #51a351);
+  background-image: linear-gradient(to bottom, #62c462, #51a351);
+  background-repeat: repeat-x;
+  border-color: #51a351 #51a351 #387038;
+  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff62c462', endColorstr='#ff51a351', GradientType=0);
+  filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
+}
+
+.btn-success:hover,
+.btn-success:active,
+.btn-success.active,
+.btn-success.disabled,
+.btn-success[disabled] {
+  color: #ffffff;
+  background-color: #51a351;
+  *background-color: #499249;
+}
+
+.btn-success:active,
+.btn-success.active {
+  background-color: #408140 \9;
+}
+
+.btn-info {
+  color: #ffffff;
+  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+  background-color: #49afcd;
+  *background-color: #2f96b4;
+  background-image: -moz-linear-gradient(top, #5bc0de, #2f96b4);
+  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#5bc0de), to(#2f96b4));
+  background-image: -webkit-linear-gradient(top, #5bc0de, #2f96b4);
+  background-image: -o-linear-gradient(top, #5bc0de, #2f96b4);
+  background-image: linear-gradient(to bottom, #5bc0de, #2f96b4);
+  background-repeat: repeat-x;
+  border-color: #2f96b4 #2f96b4 #1f6377;
+  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2f96b4', GradientType=0);
+  filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
+}
+
+.btn-info:hover,
+.btn-info:active,
+.btn-info.active,
+.btn-info.disabled,
+.btn-info[disabled] {
+  color: #ffffff;
+  background-color: #2f96b4;
+  *background-color: #2a85a0;
+}
+
+.btn-info:active,
+.btn-info.active {
+  background-color: #24748c \9;
+}
+
+.btn-inverse {
+  color: #ffffff;
+  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+  background-color: #363636;
+  *background-color: #222222;
+  background-image: -moz-linear-gradient(top, #444444, #222222);
+  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#444444), to(#222222));
+  background-image: -webkit-linear-gradient(top, #444444, #222222);
+  background-image: -o-linear-gradient(top, #444444, #222222);
+  background-image: linear-gradient(to bottom, #444444, #222222);
+  background-repeat: repeat-x;
+  border-color: #222222 #222222 #000000;
+  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff444444', endColorstr='#ff222222', GradientType=0);
+  filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
+}
+
+.btn-inverse:hover,
+.btn-inverse:active,
+.btn-inverse.active,
+.btn-inverse.disabled,
+.btn-inverse[disabled] {
+  color: #ffffff;
+  background-color: #222222;
+  *background-color: #151515;
+}
+
+.btn-inverse:active,
+.btn-inverse.active {
+  background-color: #080808 \9;
+}
+
+button.btn,
+input[type="submit"].btn {
+  *padding-top: 3px;
+  *padding-bottom: 3px;
+}
+
+button.btn::-moz-focus-inner,
+input[type="submit"].btn::-moz-focus-inner {
+  padding: 0;
+  border: 0;
+}
+
+button.btn.btn-large,
+input[type="submit"].btn.btn-large {
+  *padding-top: 7px;
+  *padding-bottom: 7px;
+}
+
+button.btn.btn-small,
+input[type="submit"].btn.btn-small {
+  *padding-top: 3px;
+  *padding-bottom: 3px;
+}
+
+button.btn.btn-mini,
+input[type="submit"].btn.btn-mini {
+  *padding-top: 1px;
+  *padding-bottom: 1px;
+}
+
+.btn-link,
+.btn-link:active,
+.btn-link[disabled] {
+  background-color: transparent;
+  background-image: none;
+  -webkit-box-shadow: none;
+     -moz-box-shadow: none;
+          box-shadow: none;
+}
+
+.btn-link {
+  color: #0088cc;
+  cursor: pointer;
+  border-color: transparent;
+  -webkit-border-radius: 0;
+     -moz-border-radius: 0;
+          border-radius: 0;
+}
+
+.btn-link:hover {
+  color: #005580;
+  text-decoration: underline;
+  background-color: transparent;
+}
+
+.btn-link[disabled]:hover {
+  color: #333333;
+  text-decoration: none;
+}
+
+.btn-group {
+  position: relative;
+  display: inline-block;
+  *display: inline;
+  *margin-left: .3em;
+  font-size: 0;
+  white-space: nowrap;
+  vertical-align: middle;
+  *zoom: 1;
+}
+
+.btn-group:first-child {
+  *margin-left: 0;
+}
+
+.btn-group + .btn-group {
+  margin-left: 5px;
+}
+
+.btn-toolbar {
+  margin-top: 10px;
+  margin-bottom: 10px;
+  font-size: 0;
+}
+
+.btn-toolbar .btn + .btn,
+.btn-toolbar .btn-group + .btn,
+.btn-toolbar .btn + .btn-group {
+  margin-left: 5px;
+}
+
+.btn-group > .btn {
+  position: relative;
+  -webkit-border-radius: 0;
+     -moz-border-radius: 0;
+          border-radius: 0;
+}
+
+.btn-group > .btn + .btn {
+  margin-left: -1px;
+}
+
+.btn-group > .btn,
+.btn-group > .dropdown-menu {
+  font-size: 14px;
+}
+
+.btn-group > .btn-mini {
+  font-size: 11px;
+}
+
+.btn-group > .btn-small {
+  font-size: 12px;
+}
+
+.btn-group > .btn-large {
+  font-size: 16px;
+}
+
+.btn-group > .btn:first-child {
+  margin-left: 0;
+  -webkit-border-bottom-left-radius: 4px;
+          border-bottom-left-radius: 4px;
+  -webkit-border-top-left-radius: 4px;
+          border-top-left-radius: 4px;
+  -moz-border-radius-bottomleft: 4px;
+  -moz-border-radius-topleft: 4px;
+}
+
+.btn-group > .btn:last-child,
+.btn-group > .dropdown-toggle {
+  -webkit-border-top-right-radius: 4px;
+          border-top-right-radius: 4px;
+  -webkit-border-bottom-right-radius: 4px;
+          border-bottom-right-radius: 4px;
+  -moz-border-radius-topright: 4px;
+  -moz-border-radius-bottomright: 4px;
+}
+
+.btn-group > .btn.large:first-child {
+  margin-left: 0;
+  -webkit-border-bottom-left-radius: 6px;
+          border-bottom-left-radius: 6px;
+  -webkit-border-top-left-radius: 6px;
+          border-top-left-radius: 6px;
+  -moz-border-radius-bottomleft: 6px;
+  -moz-border-radius-topleft: 6px;
+}
+
+.btn-group > .btn.large:last-child,
+.btn-group > .large.dropdown-toggle {
+  -webkit-border-top-right-radius: 6px;
+          border-top-right-radius: 6px;
+  -webkit-border-bottom-right-radius: 6px;
+          border-bottom-right-radius: 6px;
+  -moz-border-radius-topright: 6px;
+  -moz-border-radius-bottomright: 6px;
+}
+
+.btn-group > .btn:hover,
+.btn-group > .btn:focus,
+.btn-group > .btn:active,
+.btn-group > .btn.active {
+  z-index: 2;
+}
+
+.btn-group .dropdown-toggle:active,
+.btn-group.open .dropdown-toggle {
+  outline: 0;
+}
+
+.btn-group > .btn + .dropdown-toggle {
+  *padding-top: 5px;
+  padding-right: 8px;
+  *padding-bottom: 5px;
+  padding-left: 8px;
+  -webkit-box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.125), inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
+     -moz-box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.125), inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
+          box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.125), inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
+}
+
+.btn-group > .btn-mini + .dropdown-toggle {
+  *padding-top: 2px;
+  padding-right: 5px;
+  *padding-bottom: 2px;
+  padding-left: 5px;
+}
+
+.btn-group > .btn-small + .dropdown-toggle {
+  *padding-top: 5px;
+  *padding-bottom: 4px;
+}
+
+.btn-group > .btn-large + .dropdown-toggle {
+  *padding-top: 7px;
+  padding-right: 12px;
+  *padding-bottom: 7px;
+  padding-left: 12px;
+}
+
+.btn-group.open .dropdown-toggle {
+  background-image: none;
+  -webkit-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
+     -moz-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
+          box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
+}
+
+.btn-group.open .btn.dropdown-toggle {
+  background-color: #e6e6e6;
+}
+
+.btn-group.open .btn-primary.dropdown-toggle {
+  background-color: #0044cc;
+}
+
+.btn-group.open .btn-warning.dropdown-toggle {
+  background-color: #f89406;
+}
+
+.btn-group.open .btn-danger.dropdown-toggle {
+  background-color: #bd362f;
+}
+
+.btn-group.open .btn-success.dropdown-toggle {
+  background-color: #51a351;
+}
+
+.btn-group.open .btn-info.dropdown-toggle {
+  background-color: #2f96b4;
+}
+
+.btn-group.open .btn-inverse.dropdown-toggle {
+  background-color: #222222;
+}
+
+.btn .caret {
+  margin-top: 8px;
+  margin-left: 0;
+}
+
+.btn-mini .caret,
+.btn-small .caret,
+.btn-large .caret {
+  margin-top: 6px;
+}
+
+.btn-large .caret {
+  border-top-width: 5px;
+  border-right-width: 5px;
+  border-left-width: 5px;
+}
+
+.dropup .btn-large .caret {
+  border-bottom-width: 5px;
+}
+
+.btn-primary .caret,
+.btn-warning .caret,
+.btn-danger .caret,
+.btn-info .caret,
+.btn-success .caret,
+.btn-inverse .caret {
+  border-top-color: #ffffff;
+  border-bottom-color: #ffffff;
+}
+
+.btn-group-vertical {
+  display: inline-block;
+  *display: inline;
+  /* IE7 inline-block hack */
+
+  *zoom: 1;
+}
+
+.btn-group-vertical .btn {
+  display: block;
+  float: none;
+  width: 100%;
+  -webkit-border-radius: 0;
+     -moz-border-radius: 0;
+          border-radius: 0;
+}
+
+.btn-group-vertical .btn + .btn {
+  margin-top: -1px;
+  margin-left: 0;
+}
+
+.btn-group-vertical .btn:first-child {
+  -webkit-border-radius: 4px 4px 0 0;
+     -moz-border-radius: 4px 4px 0 0;
+          border-radius: 4px 4px 0 0;
+}
+
+.btn-group-vertical .btn:last-child {
+  -webkit-border-radius: 0 0 4px 4px;
+     -moz-border-radius: 0 0 4px 4px;
+          border-radius: 0 0 4px 4px;
+}
+
+.btn-group-vertical .btn-large:first-child {
+  -webkit-border-radius: 6px 6px 0 0;
+     -moz-border-radius: 6px 6px 0 0;
+          border-radius: 6px 6px 0 0;
+}
+
+.btn-group-vertical .btn-large:last-child {
+  -webkit-border-radius: 0 0 6px 6px;
+     -moz-border-radius: 0 0 6px 6px;
+          border-radius: 0 0 6px 6px;
+}
+
+.alert {
+  padding: 8px 35px 8px 14px;
+  margin-bottom: 20px;
+  color: #c09853;
+  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
+  background-color: #fcf8e3;
+  border: 1px solid #fbeed5;
+  -webkit-border-radius: 4px;
+     -moz-border-radius: 4px;
+          border-radius: 4px;
+}
+
+.alert h4 {
+  margin: 0;
+}
+
+.alert .close {
+  position: relative;
+  top: -2px;
+  right: -21px;
+  line-height: 20px;
+}
+
+.alert-success {
+  color: #468847;
+  background-color: #dff0d8;
+  border-color: #d6e9c6;
+}
+
+.alert-danger,
+.alert-error {
+  color: #b94a48;
+  background-color: #f2dede;
+  border-color: #eed3d7;
+}
+
+.alert-info {
+  color: #3a87ad;
+  background-color: #d9edf7;
+  border-color: #bce8f1;
+}
+
+.alert-block {
+  padding-top: 14px;
+  padding-bottom: 14px;
+}
+
+.alert-block > p,
+.alert-block > ul {
+  margin-bottom: 0;
+}
+
+.alert-block p + p {
+  margin-top: 5px;
+}
+
+.nav {
+  margin-bottom: 20px;
+  margin-left: 0;
+  list-style: none;
+}
+
+.nav > li > a {
+  display: block;
+}
+
+.nav > li > a:hover {
+  text-decoration: none;
+  background-color: #eeeeee;
+}
+
+.nav > .pull-right {
+  float: right;
+}
+
+.nav-header {
+  display: block;
+  padding: 3px 15px;
+  font-size: 11px;
+  font-weight: bold;
+  line-height: 20px;
+  color: #999999;
+  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
+  text-transform: uppercase;
+}
+
+.nav li + .nav-header {
+  margin-top: 9px;
+}
+
+.nav-list {
+  padding-right: 15px;
+  padding-left: 15px;
+  margin-bottom: 0;
+}
+
+.nav-list > li > a,
+.nav-list .nav-header {
+  margin-right: -15px;
+  margin-left: -15px;
+  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
+}
+
+.nav-list > li > a {
+  padding: 3px 15px;
+}
+
+.nav-list > .active > a,
+.nav-list > .active > a:hover {
+  color: #ffffff;
+  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2);
+  background-color: #0088cc;
+}
+
+.nav-list [class^="icon-"],
+.nav-list [class*=" icon-"] {
+  margin-right: 2px;
+}
+
+.nav-list .divider {
+  *width: 100%;
+  height: 1px;
+  margin: 9px 1px;
+  *margin: -5px 0 5px;
+  overflow: hidden;
+  background-color: #e5e5e5;
+  border-bottom: 1px solid #ffffff;
+}
+
+.nav-tabs,
+.nav-pills {
+  *zoom: 1;
+}
+
+.nav-tabs:before,
+.nav-pills:before,
+.nav-tabs:after,
+.nav-pills:after {
+  display: table;
+  line-height: 0;
+  content: "";
+}
+
+.nav-tabs:after,
+.nav-pills:after {
+  clear: both;
+}
+
+.nav-tabs > li,
+.nav-pills > li {
+  float: left;
+}
+
+.nav-tabs > li > a,
+.nav-pills > li > a {
+  padding-right: 12px;
+  padding-left: 12px;
+  margin-right: 2px;
+  line-height: 14px;
+}
+
+.nav-tabs {
+  border-bottom: 1px solid #ddd;
+}
+
+.nav-tabs > li {
+  margin-bottom: -1px;
+}
+
+.nav-tabs > li > a {
+  padding-top: 8px;
+  padding-bottom: 8px;
+  line-height: 20px;
+  border: 1px solid transparent;
+  -webkit-border-radius: 4px 4px 0 0;
+     -moz-border-radius: 4px 4px 0 0;
+          border-radius: 4px 4px 0 0;
+}
+
+.nav-tabs > li > a:hover {
+  border-color: #eeeeee #eeeeee #dddddd;
+}
+
+.nav-tabs > .active > a,
+.nav-tabs > .active > a:hover {
+  color: #555555;
+  cursor: default;
+  background-color: #ffffff;
+  border: 1px solid #ddd;
+  border-bottom-color: transparent;
+}
+
+.nav-pills > li > a {
+  padding-top: 8px;
+  padding-bottom: 8px;
+  margin-top: 2px;
+  margin-bottom: 2px;
+  -webkit-border-radius: 5px;
+     -moz-border-radius: 5px;
+          border-radius: 5px;
+}
+
+.nav-pills > .active > a,
+.nav-pills > .active > a:hover {
+  color: #ffffff;
+  background-color: #0088cc;
+}
+
+.nav-stacked > li {
+  float: none;
+}
+
+.nav-stacked > li > a {
+  margin-right: 0;
+}
+
+.nav-tabs.nav-stacked {
+  border-bottom: 0;
+}
+
+.nav-tabs.nav-stacked > li > a {
+  border: 1px solid #ddd;
+  -webkit-border-radius: 0;
+     -moz-border-radius: 0;
+          border-radius: 0;
+}
+
+.nav-tabs.nav-stacked > li:first-child > a {
+  -webkit-border-top-right-radius: 4px;
+          border-top-right-radius: 4px;
+  -webkit-border-top-left-radius: 4px;
+          border-top-left-radius: 4px;
+  -moz-border-radius-topright: 4px;
+  -moz-border-radius-topleft: 4px;
+}
+
+.nav-tabs.nav-stacked > li:last-child > a {
+  -webkit-border-bottom-right-radius: 4px;
+          border-bottom-right-radius: 4px;
+  -webkit-border-bottom-left-radius: 4px;
+          border-bottom-left-radius: 4px;
+  -moz-border-radius-bottomright: 4px;
+  -moz-border-radius-bottomleft: 4px;
+}
+
+.nav-tabs.nav-stacked > li > a:hover {
+  z-index: 2;
+  border-color: #ddd;
+}
+
+.nav-pills.nav-stacked > li > a {
+  margin-bottom: 3px;
+}
+
+.nav-pills.nav-stacked > li:last-child > a {
+  margin-bottom: 1px;
+}
+
+.nav-tabs .dropdown-menu {
+  -webkit-border-radius: 0 0 6px 6px;
+     -moz-border-radius: 0 0 6px 6px;
+          border-radius: 0 0 6px 6px;
+}
+
+.nav-pills .dropdown-menu {
+  -webkit-border-radius: 6px;
+     -moz-border-radius: 6px;
+          border-radius: 6px;
+}
+
+.nav .dropdown-toggle .caret {
+  margin-top: 6px;
+  border-top-color: #0088cc;
+  border-bottom-color: #0088cc;
+}
+
+.nav .dropdown-toggle:hover .caret {
+  border-top-color: #005580;
+  border-bottom-color: #005580;
+}
+
+/* move down carets for tabs */
+
+.nav-tabs .dropdown-toggle .caret {
+  margin-top: 8px;
+}
+
+.nav .active .dropdown-toggle .caret {
+  border-top-color: #fff;
+  border-bottom-color: #fff;
+}
+
+.nav-tabs .active .dropdown-toggle .caret {
+  border-top-color: #555555;
+  border-bottom-color: #555555;
+}
+
+.nav > .dropdown.active > a:hover {
+  cursor: pointer;
+}
+
+.nav-tabs .open .dropdown-toggle,
+.nav-pills .open .dropdown-toggle,
+.nav > li.dropdown.open.active > a:hover {
+  color: #ffffff;
+  background-color: #999999;
+  border-color: #999999;
+}
+
+.nav li.dropdown.open .caret,
+.nav li.dropdown.open.active .caret,
+.nav li.dropdown.open a:hover .caret {
+  border-top-color: #ffffff;
+  border-bottom-color: #ffffff;
+  opacity: 1;
+  filter: alpha(opacity=100);
+}
+
+.tabs-stacked .open > a:hover {
+  border-color: #999999;
+}
+
+.tabbable {
+  *zoom: 1;
+}
+
+.tabbable:before,
+.tabbable:after {
+  display: table;
+  line-height: 0;
+  content: "";
+}
+
+.tabbable:after {
+  clear: both;
+}
+
+.tab-content {
+  overflow: auto;
+}
+
+.tabs-below > .nav-tabs,
+.tabs-right > .nav-tabs,
+.tabs-left > .nav-tabs {
+  border-bottom: 0;
+}
+
+.tab-content > .tab-pane,
+.pill-content > .pill-pane {
+  display: none;
+}
+
+.tab-content > .active,
+.pill-content > .active {
+  display: block;
+}
+
+.tabs-below > .nav-tabs {
+  border-top: 1px solid #ddd;
+}
+
+.tabs-below > .nav-tabs > li {
+  margin-top: -1px;
+  margin-bottom: 0;
+}
+
+.tabs-below > .nav-tabs > li > a {
+  -webkit-border-radius: 0 0 4px 4px;
+     -moz-border-radius: 0 0 4px 4px;
+          border-radius: 0 0 4px 4px;
+}
+
+.tabs-below > .nav-tabs > li > a:hover {
+  border-top-color: #ddd;
+  border-bottom-color: transparent;
+}
+
+.tabs-below > .nav-tabs > .active > a,
+.tabs-below > .nav-tabs > .active > a:hover {
+  border-color: transparent #ddd #ddd #ddd;
+}
+
+.tabs-left > .nav-tabs > li,
+.tabs-right > .nav-tabs > li {
+  float: none;
+}
+
+.tabs-left > .nav-tabs > li > a,
+.tabs-right > .nav-tabs > li > a {
+  min-width: 74px;
+  margin-right: 0;
+  margin-bottom: 3px;
+}
+
+.tabs-left > .nav-tabs {
+  float: left;
+  margin-right: 19px;
+  border-right: 1px solid #ddd;
+}
+
+.tabs-left > .nav-tabs > li > a {
+  margin-right: -1px;
+  -webkit-border-radius: 4px 0 0 4px;
+     -moz-border-radius: 4px 0 0 4px;
+          border-radius: 4px 0 0 4px;
+}
+
+.tabs-left > .nav-tabs > li > a:hover {
+  border-color: #eeeeee #dddddd #eeeeee #eeeeee;
+}
+
+.tabs-left > .nav-tabs .active > a,
+.tabs-left > .nav-tabs .active > a:hover {
+  border-color: #ddd transparent #ddd #ddd;
+  *border-right-color: #ffffff;
+}
+
+.tabs-right > .nav-tabs {
+  float: right;
+  margin-left: 19px;
+  border-left: 1px solid #ddd;
+}
+
+.tabs-right > .nav-tabs > li > a {
+  margin-left: -1px;
+  -webkit-border-radius: 0 4px 4px 0;
+     -moz-border-radius: 0 4px 4px 0;
+          border-radius: 0 4px 4px 0;
+}
+
+.tabs-right > .nav-tabs > li > a:hover {
+  border-color: #eeeeee #eeeeee #eeeeee #dddddd;
+}
+
+.tabs-right > .nav-tabs .active > a,
+.tabs-right > .nav-tabs .active > a:hover {
+  border-color: #ddd #ddd #ddd transparent;
+  *border-left-color: #ffffff;
+}
+
+.nav > .disabled > a {
+  color: #999999;
+}
+
+.nav > .disabled > a:hover {
+  text-decoration: none;
+  cursor: default;
+  background-color: transparent;
+}
+
+.navbar {
+  *position: relative;
+  *z-index: 2;
+  margin-bottom: 20px;
+  overflow: visible;
+  color: #777777;
+}
+
+.navbar-inner {
+  min-height: 40px;
+  padding-right: 20px;
+  padding-left: 20px;
+  background-color: #fafafa;
+  background-image: -moz-linear-gradient(top, #ffffff, #f2f2f2);
+  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#f2f2f2));
+  background-image: -webkit-linear-gradient(top, #ffffff, #f2f2f2);
+  background-image: -o-linear-gradient(top, #ffffff, #f2f2f2);
+  background-image: linear-gradient(to bottom, #ffffff, #f2f2f2);
+  background-repeat: repeat-x;
+  border: 1px solid #d4d4d4;
+  -webkit-border-radius: 4px;
+     -moz-border-radius: 4px;
+          border-radius: 4px;
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff2f2f2', GradientType=0);
+  *zoom: 1;
+  -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065);
+     -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065);
+          box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065);
+}
+
+.navbar-inner:before,
+.navbar-inner:after {
+  display: table;
+  line-height: 0;
+  content: "";
+}
+
+.navbar-inner:after {
+  clear: both;
+}
+
+.navbar .container {
+  width: auto;
+}
+
+.nav-collapse.collapse {
+  height: auto;
+  overflow: visible;
+}
+
+.navbar .brand {
+  display: block;
+  float: left;
+  padding: 10px 20px 10px;
+  margin-left: -20px;
+  font-size: 20px;
+  font-weight: 200;
+  color: #777777;
+  text-shadow: 0 1px 0 #ffffff;
+}
+
+.navbar .brand:hover {
+  text-decoration: none;
+}
+
+.navbar-text {
+  margin-bottom: 0;
+  line-height: 40px;
+}
+
+.navbar-link {
+  color: #777777;
+}
+
+.navbar-link:hover {
+  color: #333333;
+}
+
+.navbar .divider-vertical {
+  height: 40px;
+  margin: 0 9px;
+  border-right: 1px solid #ffffff;
+  border-left: 1px solid #f2f2f2;
+}
+
+.navbar .btn,
+.navbar .btn-group {
+  margin-top: 5px;
+}
+
+.navbar .btn-group .btn,
+.navbar .input-prepend .btn,
+.navbar .input-append .btn {
+  margin-top: 0;
+}
+
+.navbar-form {
+  margin-bottom: 0;
+  *zoom: 1;
+}
+
+.navbar-form:before,
+.navbar-form:after {
+  display: table;
+  line-height: 0;
+  content: "";
+}
+
+.navbar-form:after {
+  clear: both;
+}
+
+.navbar-form input,
+.navbar-form select,
+.navbar-form .radio,
+.navbar-form .checkbox {
+  margin-top: 5px;
+}
+
+.navbar-form input,
+.navbar-form select,
+.navbar-form .btn {
+  display: inline-block;
+  margin-bottom: 0;
+}
+
+.navbar-form input[type="image"],
+.navbar-form input[type="checkbox"],
+.navbar-form input[type="radio"] {
+  margin-top: 3px;
+}
+
+.navbar-form .input-append,
+.navbar-form .input-prepend {
+  margin-top: 6px;
+  white-space: nowrap;
+}
+
+.navbar-form .input-append input,
+.navbar-form .input-prepend input {
+  margin-top: 0;
+}
+
+.navbar-search {
+  position: relative;
+  float: left;
+  margin-top: 5px;
+  margin-bottom: 0;
+}
+
+.navbar-search .search-query {
+  padding: 4px 14px;
+  margin-bottom: 0;
+  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
+  font-size: 13px;
+  font-weight: normal;
+  line-height: 1;
+  -webkit-border-radius: 15px;
+     -moz-border-radius: 15px;
+          border-radius: 15px;
+}
+
+.navbar-static-top {
+  position: static;
+  margin-bottom: 0;
+}
+
+.navbar-static-top .navbar-inner {
+  -webkit-border-radius: 0;
+     -moz-border-radius: 0;
+          border-radius: 0;
+}
+
+.navbar-fixed-top,
+.navbar-fixed-bottom {
+  position: fixed;
+  right: 0;
+  left: 0;
+  z-index: 1030;
+  margin-bottom: 0;
+}
+
+.navbar-fixed-top .navbar-inner,
+.navbar-static-top .navbar-inner {
+  border-width: 0 0 1px;
+}
+
+.navbar-fixed-bottom .navbar-inner {
+  border-width: 1px 0 0;
+}
+
+.navbar-fixed-top .navbar-inner,
+.navbar-fixed-bottom .navbar-inner {
+  padding-right: 0;
+  padding-left: 0;
+  -webkit-border-radius: 0;
+     -moz-border-radius: 0;
+          border-radius: 0;
+}
+
+.navbar-static-top .container,
+.navbar-fixed-top .container,
+.navbar-fixed-bottom .container {
+  width: 940px;
+}
+
+.navbar-fixed-top {
+  top: 0;
+}
+
+.navbar-fixed-top .navbar-inner,
+.navbar-static-top .navbar-inner {
+  -webkit-box-shadow: 0 1px 10px rgba(0, 0, 0, 0.1);
+     -moz-box-shadow: 0 1px 10px rgba(0, 0, 0, 0.1);
+          box-shadow: 0 1px 10px rgba(0, 0, 0, 0.1);
+}
+
+.navbar-fixed-bottom {
+  bottom: 0;
+}
+
+.navbar-fixed-bottom .navbar-inner {
+  -webkit-box-shadow: 0 -1px 10px rgba(0, 0, 0, 0.1);
+     -moz-box-shadow: 0 -1px 10px rgba(0, 0, 0, 0.1);
+          box-shadow: 0 -1px 10px rgba(0, 0, 0, 0.1);
+}
+
+.navbar .nav {
+  position: relative;
+  left: 0;
+  display: block;
+  float: left;
+  margin: 0 10px 0 0;
+}
+
+.navbar .nav.pull-right {
+  float: right;
+  margin-right: 0;
+}
+
+.navbar .nav > li {
+  float: left;
+}
+
+.navbar .nav > li > a {
+  float: none;
+  padding: 10px 15px 10px;
+  color: #777777;
+  text-decoration: none;
+  text-shadow: 0 1px 0 #ffffff;
+}
+
+.navbar .nav .dropdown-toggle .caret {
+  margin-top: 8px;
+}
+
+.navbar .nav > li > a:focus,
+.navbar .nav > li > a:hover {
+  color: #333333;
+  text-decoration: none;
+  background-color: transparent;
+}
+
+.navbar .nav > .active > a,
+.navbar .nav > .active > a:hover,
+.navbar .nav > .active > a:focus {
+  color: #555555;
+  text-decoration: none;
+  background-color: #e5e5e5;
+  -webkit-box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.125);
+     -moz-box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.125);
+          box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.125);
+}
+
+.navbar .btn-navbar {
+  display: none;
+  float: right;
+  padding: 7px 10px;
+  margin-right: 5px;
+  margin-left: 5px;
+  color: #ffffff;
+  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+  background-color: #ededed;
+  *background-color: #e5e5e5;
+  background-image: -moz-linear-gradient(top, #f2f2f2, #e5e5e5);
+  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f2f2f2), to(#e5e5e5));
+  background-image: -webkit-linear-gradient(top, #f2f2f2, #e5e5e5);
+  background-image: -o-linear-gradient(top, #f2f2f2, #e5e5e5);
+  background-image: linear-gradient(to bottom, #f2f2f2, #e5e5e5);
+  background-repeat: repeat-x;
+  border-color: #e5e5e5 #e5e5e5 #bfbfbf;
+  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2f2f2', endColorstr='#ffe5e5e5', GradientType=0);
+  filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
+  -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.075);
+     -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.075);
+          box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.075);
+}
+
+.navbar .btn-navbar:hover,
+.navbar .btn-navbar:active,
+.navbar .btn-navbar.active,
+.navbar .btn-navbar.disabled,
+.navbar .btn-navbar[disabled] {
+  color: #ffffff;
+  background-color: #e5e5e5;
+  *background-color: #d9d9d9;
+}
+
+.navbar .btn-navbar:active,
+.navbar .btn-navbar.active {
+  background-color: #cccccc \9;
+}
+
+.navbar .btn-navbar .icon-bar {
+  display: block;
+  width: 18px;
+  height: 2px;
+  background-color: #f5f5f5;
+  -webkit-border-radius: 1px;
+     -moz-border-radius: 1px;
+          border-radius: 1px;
+  -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
+     -moz-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
+          box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
+}
+
+.btn-navbar .icon-bar + .icon-bar {
+  margin-top: 3px;
+}
+
+.navbar .nav > li > .dropdown-menu:before {
+  position: absolute;
+  top: -7px;
+  left: 9px;
+  display: inline-block;
+  border-right: 7px solid transparent;
+  border-bottom: 7px solid #ccc;
+  border-left: 7px solid transparent;
+  border-bottom-color: rgba(0, 0, 0, 0.2);
+  content: '';
+}
+
+.navbar .nav > li > .dropdown-menu:after {
+  position: absolute;
+  top: -6px;
+  left: 10px;
+  display: inline-block;
+  border-right: 6px solid transparent;
+  border-bottom: 6px solid #ffffff;
+  border-left: 6px solid transparent;
+  content: '';
+}
+
+.navbar-fixed-bottom .nav > li > .dropdown-menu:before {
+  top: auto;
+  bottom: -7px;
+  border-top: 7px solid #ccc;
+  border-bottom: 0;
+  border-top-color: rgba(0, 0, 0, 0.2);
+}
+
+.navbar-fixed-bottom .nav > li > .dropdown-menu:after {
+  top: auto;
+  bottom: -6px;
+  border-top: 6px solid #ffffff;
+  border-bottom: 0;
+}
+
+.navbar .nav li.dropdown.open > .dropdown-toggle,
+.navbar .nav li.dropdown.active > .dropdown-toggle,
+.navbar .nav li.dropdown.open.active > .dropdown-toggle {
+  color: #555555;
+  background-color: #e5e5e5;
+}
+
+.navbar .nav li.dropdown > .dropdown-toggle .caret {
+  border-top-color: #777777;
+  border-bottom-color: #777777;
+}
+
+.navbar .nav li.dropdown.open > .dropdown-toggle .caret,
+.navbar .nav li.dropdown.active > .dropdown-toggle .caret,
+.navbar .nav li.dropdown.open.active > .dropdown-toggle .caret {
+  border-top-color: #555555;
+  border-bottom-color: #555555;
+}
+
+.navbar .pull-right > li > .dropdown-menu,
+.navbar .nav > li > .dropdown-menu.pull-right {
+  right: 0;
+  left: auto;
+}
+
+.navbar .pull-right > li > .dropdown-menu:before,
+.navbar .nav > li > .dropdown-menu.pull-right:before {
+  right: 12px;
+  left: auto;
+}
+
+.navbar .pull-right > li > .dropdown-menu:after,
+.navbar .nav > li > .dropdown-menu.pull-right:after {
+  right: 13px;
+  left: auto;
+}
+
+.navbar .pull-right > li > .dropdown-menu .dropdown-menu,
+.navbar .nav > li > .dropdown-menu.pull-right .dropdown-menu {
+  right: 100%;
+  left: auto;
+  margin-right: -1px;
+  margin-left: 0;
+  -webkit-border-radius: 6px 0 6px 6px;
+     -moz-border-radius: 6px 0 6px 6px;
+          border-radius: 6px 0 6px 6px;
+}
+
+.navbar-inverse {
+  color: #999999;
+}
+
+.navbar-inverse .navbar-inner {
+  background-color: #1b1b1b;
+  background-image: -moz-linear-gradient(top, #222222, #111111);
+  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#222222), to(#111111));
+  background-image: -webkit-linear-gradient(top, #222222, #111111);
+  background-image: -o-linear-gradient(top, #222222, #111111);
+  background-image: linear-gradient(to bottom, #222222, #111111);
+  background-repeat: repeat-x;
+  border-color: #252525;
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff222222', endColorstr='#ff111111', GradientType=0);
+}
+
+.navbar-inverse .brand,
+.navbar-inverse .nav > li > a {
+  color: #999999;
+  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+}
+
+.navbar-inverse .brand:hover,
+.navbar-inverse .nav > li > a:hover {
+  color: #ffffff;
+}
+
+.navbar-inverse .nav > li > a:focus,
+.navbar-inverse .nav > li > a:hover {
+  color: #ffffff;
+  background-color: transparent;
+}
+
+.navbar-inverse .nav .active > a,
+.navbar-inverse .nav .active > a:hover,
+.navbar-inverse .nav .active > a:focus {
+  color: #ffffff;
+  background-color: #111111;
+}
+
+.navbar-inverse .navbar-link {
+  color: #999999;
+}
+
+.navbar-inverse .navbar-link:hover {
+  color: #ffffff;
+}
+
+.navbar-inverse .divider-vertical {
+  border-right-color: #222222;
+  border-left-color: #111111;
+}
+
+.navbar-inverse .nav li.dropdown.open > .dropdown-toggle,
+.navbar-inverse .nav li.dropdown.active > .dropdown-toggle,
+.navbar-inverse .nav li.dropdown.open.active > .dropdown-toggle {
+  color: #ffffff;
+  background-color: #111111;
+}
+
+.navbar-inverse .nav li.dropdown > .dropdown-toggle .caret {
+  border-top-color: #999999;
+  border-bottom-color: #999999;
+}
+
+.navbar-inverse .nav li.dropdown.open > .dropdown-toggle .caret,
+.navbar-inverse .nav li.dropdown.active > .dropdown-toggle .caret,
+.navbar-inverse .nav li.dropdown.open.active > .dropdown-toggle .caret {
+  border-top-color: #ffffff;
+  border-bottom-color: #ffffff;
+}
+
+.navbar-inverse .navbar-search .search-query {
+  color: #ffffff;
+  background-color: #515151;
+  border-color: #111111;
+  -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 0 rgba(255, 255, 255, 0.15);
+     -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 0 rgba(255, 255, 255, 0.15);
+          box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 0 rgba(255, 255, 255, 0.15);
+  -webkit-transition: none;
+     -moz-transition: none;
+       -o-transition: none;
+          transition: none;
+}
+
+.navbar-inverse .navbar-search .search-query:-moz-placeholder {
+  color: #cccccc;
+}
+
+.navbar-inverse .navbar-search .search-query:-ms-input-placeholder {
+  color: #cccccc;
+}
+
+.navbar-inverse .navbar-search .search-query::-webkit-input-placeholder {
+  color: #cccccc;
+}
+
+.navbar-inverse .navbar-search .search-query:focus,
+.navbar-inverse .navbar-search .search-query.focused {
+  padding: 5px 15px;
+  color: #333333;
+  text-shadow: 0 1px 0 #ffffff;
+  background-color: #ffffff;
+  border: 0;
+  outline: 0;
+  -webkit-box-shadow: 0 0 3px rgba(0, 0, 0, 0.15);
+     -moz-box-shadow: 0 0 3px rgba(0, 0, 0, 0.15);
+          box-shadow: 0 0 3px rgba(0, 0, 0, 0.15);
+}
+
+.navbar-inverse .btn-navbar {
+  color: #ffffff;
+  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+  background-color: #0e0e0e;
+  *background-color: #040404;
+  background-image: -moz-linear-gradient(top, #151515, #040404);
+  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#151515), to(#040404));
+  background-image: -webkit-linear-gradient(top, #151515, #040404);
+  background-image: -o-linear-gradient(top, #151515, #040404);
+  background-image: linear-gradient(to bottom, #151515, #040404);
+  background-repeat: repeat-x;
+  border-color: #040404 #040404 #000000;
+  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff151515', endColorstr='#ff040404', GradientType=0);
+  filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
+}
+
+.navbar-inverse .btn-navbar:hover,
+.navbar-inverse .btn-navbar:active,
+.navbar-inverse .btn-navbar.active,
+.navbar-inverse .btn-navbar.disabled,
+.navbar-inverse .btn-navbar[disabled] {
+  color: #ffffff;
+  background-color: #040404;
+  *background-color: #000000;
+}
+
+.navbar-inverse .btn-navbar:active,
+.navbar-inverse .btn-navbar.active {
+  background-color: #000000 \9;
+}
+
+.breadcrumb {
+  padding: 8px 15px;
+  margin: 0 0 20px;
+  list-style: none;
+  background-color: #f5f5f5;
+  -webkit-border-radius: 4px;
+     -moz-border-radius: 4px;
+          border-radius: 4px;
+}
+
+.breadcrumb li {
+  display: inline-block;
+  *display: inline;
+  text-shadow: 0 1px 0 #ffffff;
+  *zoom: 1;
+}
+
+.breadcrumb .divider {
+  padding: 0 5px;
+  color: #ccc;
+}
+
+.breadcrumb .active {
+  color: #999999;
+}
+
+.pagination {
+  margin: 20px 0;
+}
+
+.pagination ul {
+  display: inline-block;
+  *display: inline;
+  margin-bottom: 0;
+  margin-left: 0;
+  -webkit-border-radius: 4px;
+     -moz-border-radius: 4px;
+          border-radius: 4px;
+  *zoom: 1;
+  -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
+     -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
+          box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
+}
+
+.pagination ul > li {
+  display: inline;
+}
+
+.pagination ul > li > a,
+.pagination ul > li > span {
+  float: left;
+  padding: 4px 12px;
+  line-height: 20px;
+  text-decoration: none;
+  background-color: #ffffff;
+  border: 1px solid #dddddd;
+  border-left-width: 0;
+}
+
+.pagination ul > li > a:hover,
+.pagination ul > .active > a,
+.pagination ul > .active > span {
+  background-color: #f5f5f5;
+}
+
+.pagination ul > .active > a,
+.pagination ul > .active > span {
+  color: #999999;
+  cursor: default;
+}
+
+.pagination ul > .disabled > span,
+.pagination ul > .disabled > a,
+.pagination ul > .disabled > a:hover {
+  color: #999999;
+  cursor: default;
+  background-color: transparent;
+}
+
+.pagination ul > li:first-child > a,
+.pagination ul > li:first-child > span {
+  border-left-width: 1px;
+  -webkit-border-bottom-left-radius: 4px;
+          border-bottom-left-radius: 4px;
+  -webkit-border-top-left-radius: 4px;
+          border-top-left-radius: 4px;
+  -moz-border-radius-bottomleft: 4px;
+  -moz-border-radius-topleft: 4px;
+}
+
+.pagination ul > li:last-child > a,
+.pagination ul > li:last-child > span {
+  -webkit-border-top-right-radius: 4px;
+          border-top-right-radius: 4px;
+  -webkit-border-bottom-right-radius: 4px;
+          border-bottom-right-radius: 4px;
+  -moz-border-radius-topright: 4px;
+  -moz-border-radius-bottomright: 4px;
+}
+
+.pagination-centered {
+  text-align: center;
+}
+
+.pagination-right {
+  text-align: right;
+}
+
+.pagination-large ul > li > a,
+.pagination-large ul > li > span {
+  padding: 11px 19px;
+  font-size: 17.5px;
+}
+
+.pagination-large ul > li:first-child > a,
+.pagination-large ul > li:first-child > span {
+  -webkit-border-bottom-left-radius: 6px;
+          border-bottom-left-radius: 6px;
+  -webkit-border-top-left-radius: 6px;
+          border-top-left-radius: 6px;
+  -moz-border-radius-bottomleft: 6px;
+  -moz-border-radius-topleft: 6px;
+}
+
+.pagination-large ul > li:last-child > a,
+.pagination-large ul > li:last-child > span {
+  -webkit-border-top-right-radius: 6px;
+          border-top-right-radius: 6px;
+  -webkit-border-bottom-right-radius: 6px;
+          border-bottom-right-radius: 6px;
+  -moz-border-radius-topright: 6px;
+  -moz-border-radius-bottomright: 6px;
+}
+
+.pagination-mini ul > li:first-child > a,
+.pagination-small ul > li:first-child > a,
+.pagination-mini ul > li:first-child > span,
+.pagination-small ul > li:first-child > span {
+  -webkit-border-bottom-left-radius: 3px;
+          border-bottom-left-radius: 3px;
+  -webkit-border-top-left-radius: 3px;
+          border-top-left-radius: 3px;
+  -moz-border-radius-bottomleft: 3px;
+  -moz-border-radius-topleft: 3px;
+}
+
+.pagination-mini ul > li:last-child > a,
+.pagination-small ul > li:last-child > a,
+.pagination-mini ul > li:last-child > span,
+.pagination-small ul > li:last-child > span {
+  -webkit-border-top-right-radius: 3px;
+          border-top-right-radius: 3px;
+  -webkit-border-bottom-right-radius: 3px;
+          border-bottom-right-radius: 3px;
+  -moz-border-radius-topright: 3px;
+  -moz-border-radius-bottomright: 3px;
+}
+
+.pagination-small ul > li > a,
+.pagination-small ul > li > span {
+  padding: 2px 10px;
+  font-size: 11.9px;
+}
+
+.pagination-mini ul > li > a,
+.pagination-mini ul > li > span {
+  padding: 1px 6px;
+  font-size: 10.5px;
+}
+
+.pager {
+  margin: 20px 0;
+  text-align: center;
+  list-style: none;
+  *zoom: 1;
+}
+
+.pager:before,
+.pager:after {
+  display: table;
+  line-height: 0;
+  content: "";
+}
+
+.pager:after {
+  clear: both;
+}
+
+.pager li {
+  display: inline;
+}
+
+.pager li > a,
+.pager li > span {
+  display: inline-block;
+  padding: 5px 14px;
+  background-color: #fff;
+  border: 1px solid #ddd;
+  -webkit-border-radius: 15px;
+     -moz-border-radius: 15px;
+          border-radius: 15px;
+}
+
+.pager li > a:hover {
+  text-decoration: none;
+  background-color: #f5f5f5;
+}
+
+.pager .next > a,
+.pager .next > span {
+  float: right;
+}
+
+.pager .previous > a,
+.pager .previous > span {
+  float: left;
+}
+
+.pager .disabled > a,
+.pager .disabled > a:hover,
+.pager .disabled > span {
+  color: #999999;
+  cursor: default;
+  background-color: #fff;
+}
+
+.modal-backdrop {
+  position: fixed;
+  top: 0;
+  right: 0;
+  bottom: 0;
+  left: 0;
+  z-index: 1040;
+  background-color: #000000;
+}
+
+.modal-backdrop.fade {
+  opacity: 0;
+}
+
+.modal-backdrop,
+.modal-backdrop.fade.in {
+  opacity: 0.8;
+  filter: alpha(opacity=80);
+}
+
+.modal {
+  position: fixed;
+  top: 50%;
+  left: 50%;
+  z-index: 1050;
+  width: 560px;
+  margin: -250px 0 0 -280px;
+  background-color: #ffffff;
+  border: 1px solid #999;
+  border: 1px solid rgba(0, 0, 0, 0.3);
+  *border: 1px solid #999;
+  -webkit-border-radius: 6px;
+     -moz-border-radius: 6px;
+          border-radius: 6px;
+  outline: none;
+  -webkit-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3);
+     -moz-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3);
+          box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3);
+  -webkit-background-clip: padding-box;
+     -moz-background-clip: padding-box;
+          background-clip: padding-box;
+}
+
+.modal.fade {
+  top: -25%;
+  -webkit-transition: opacity 0.3s linear, top 0.3s ease-out;
+     -moz-transition: opacity 0.3s linear, top 0.3s ease-out;
+       -o-transition: opacity 0.3s linear, top 0.3s ease-out;
+          transition: opacity 0.3s linear, top 0.3s ease-out;
+}
+
+.modal.fade.in {
+  top: 50%;
+}
+
+.modal-header {
+  padding: 9px 15px;
+  border-bottom: 1px solid #eee;
+}
+
+.modal-header .close {
+  margin-top: 2px;
+}
+
+.modal-header h3 {
+  margin: 0;
+  line-height: 30px;
+}
+
+.modal-body {
+  max-height: 400px;
+  padding: 15px;
+  overflow-y: auto;
+}
+
+.modal-form {
+  margin-bottom: 0;
+}
+
+.modal-footer {
+  padding: 14px 15px 15px;
+  margin-bottom: 0;
+  text-align: right;
+  background-color: #f5f5f5;
+  border-top: 1px solid #ddd;
+  -webkit-border-radius: 0 0 6px 6px;
+     -moz-border-radius: 0 0 6px 6px;
+          border-radius: 0 0 6px 6px;
+  *zoom: 1;
+  -webkit-box-shadow: inset 0 1px 0 #ffffff;
+     -moz-box-shadow: inset 0 1px 0 #ffffff;
+          box-shadow: inset 0 1px 0 #ffffff;
+}
+
+.modal-footer:before,
+.modal-footer:after {
+  display: table;
+  line-height: 0;
+  content: "";
+}
+
+.modal-footer:after {
+  clear: both;
+}
+
+.modal-footer .btn + .btn {
+  margin-bottom: 0;
+  margin-left: 5px;
+}
+
+.modal-footer .btn-group .btn + .btn {
+  margin-left: -1px;
+}
+
+.modal-footer .btn-block + .btn-block {
+  margin-left: 0;
+}
+
+.tooltip {
+  position: absolute;
+  z-index: 1030;
+  display: block;
+  padding: 5px;
+  font-size: 11px;
+  opacity: 0;
+  filter: alpha(opacity=0);
+  visibility: visible;
+}
+
+.tooltip.in {
+  opacity: 0.8;
+  filter: alpha(opacity=80);
+}
+
+.tooltip.top {
+  margin-top: -3px;
+}
+
+.tooltip.right {
+  margin-left: 3px;
+}
+
+.tooltip.bottom {
+  margin-top: 3px;
+}
+
+.tooltip.left {
+  margin-left: -3px;
+}
+
+.tooltip-inner {
+  max-width: 200px;
+  padding: 3px 8px;
+  color: #ffffff;
+  text-align: center;
+  text-decoration: none;
+  background-color: #000000;
+  -webkit-border-radius: 4px;
+     -moz-border-radius: 4px;
+          border-radius: 4px;
+}
+
+.tooltip-arrow {
+  position: absolute;
+  width: 0;
+  height: 0;
+  border-color: transparent;
+  border-style: solid;
+}
+
+.tooltip.top .tooltip-arrow {
+  bottom: 0;
+  left: 50%;
+  margin-left: -5px;
+  border-top-color: #000000;
+  border-width: 5px 5px 0;
+}
+
+.tooltip.right .tooltip-arrow {
+  top: 50%;
+  left: 0;
+  margin-top: -5px;
+  border-right-color: #000000;
+  border-width: 5px 5px 5px 0;
+}
+
+.tooltip.left .tooltip-arrow {
+  top: 50%;
+  right: 0;
+  margin-top: -5px;
+  border-left-color: #000000;
+  border-width: 5px 0 5px 5px;
+}
+
+.tooltip.bottom .tooltip-arrow {
+  top: 0;
+  left: 50%;
+  margin-left: -5px;
+  border-bottom-color: #000000;
+  border-width: 0 5px 5px;
+}
+
+.popover {
+  position: absolute;
+  top: 0;
+  left: 0;
+  z-index: 1010;
+  display: none;
+  width: 236px;
+  padding: 1px;
+  background-color: #ffffff;
+  border: 1px solid #ccc;
+  border: 1px solid rgba(0, 0, 0, 0.2);
+  -webkit-border-radius: 6px;
+     -moz-border-radius: 6px;
+          border-radius: 6px;
+  -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
+     -moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
+          box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
+  -webkit-background-clip: padding-box;
+     -moz-background-clip: padding;
+          background-clip: padding-box;
+}
+
+.popover.top {
+  margin-top: -10px;
+}
+
+.popover.right {
+  margin-left: 10px;
+}
+
+.popover.bottom {
+  margin-top: 10px;
+}
+
+.popover.left {
+  margin-left: -10px;
+}
+
+.popover-title {
+  padding: 8px 14px;
+  margin: 0;
+  font-size: 14px;
+  font-weight: normal;
+  line-height: 18px;
+  background-color: #f7f7f7;
+  border-bottom: 1px solid #ebebeb;
+  -webkit-border-radius: 5px 5px 0 0;
+     -moz-border-radius: 5px 5px 0 0;
+          border-radius: 5px 5px 0 0;
+}
+
+.popover-content {
+  padding: 9px 14px;
+}
+
+.popover-content p,
+.popover-content ul,
+.popover-content ol {
+  margin-bottom: 0;
+}
+
+.popover .arrow,
+.popover .arrow:after {
+  position: absolute;
+  display: inline-block;
+  width: 0;
+  height: 0;
+  border-color: transparent;
+  border-style: solid;
+}
+
+.popover .arrow:after {
+  z-index: -1;
+  content: "";
+}
+
+.popover.top .arrow {
+  bottom: -10px;
+  left: 50%;
+  margin-left: -10px;
+  border-top-color: #ffffff;
+  border-width: 10px 10px 0;
+}
+
+.popover.top .arrow:after {
+  bottom: -1px;
+  left: -11px;
+  border-top-color: rgba(0, 0, 0, 0.25);
+  border-width: 11px 11px 0;
+}
+
+.popover.right .arrow {
+  top: 50%;
+  left: -10px;
+  margin-top: -10px;
+  border-right-color: #ffffff;
+  border-width: 10px 10px 10px 0;
+}
+
+.popover.right .arrow:after {
+  bottom: -11px;
+  left: -1px;
+  border-right-color: rgba(0, 0, 0, 0.25);
+  border-width: 11px 11px 11px 0;
+}
+
+.popover.bottom .arrow {
+  top: -10px;
+  left: 50%;
+  margin-left: -10px;
+  border-bottom-color: #ffffff;
+  border-width: 0 10px 10px;
+}
+
+.popover.bottom .arrow:after {
+  top: -1px;
+  left: -11px;
+  border-bottom-color: rgba(0, 0, 0, 0.25);
+  border-width: 0 11px 11px;
+}
+
+.popover.left .arrow {
+  top: 50%;
+  right: -10px;
+  margin-top: -10px;
+  border-left-color: #ffffff;
+  border-width: 10px 0 10px 10px;
+}
+
+.popover.left .arrow:after {
+  right: -1px;
+  bottom: -11px;
+  border-left-color: rgba(0, 0, 0, 0.25);
+  border-width: 11px 0 11px 11px;
+}
+
+.thumbnails {
+  margin-left: -20px;
+  list-style: none;
+  *zoom: 1;
+}
+
+.thumbnails:before,
+.thumbnails:after {
+  display: table;
+  line-height: 0;
+  content: "";
+}
+
+.thumbnails:after {
+  clear: both;
+}
+
+.row-fluid .thumbnails {
+  margin-left: 0;
+}
+
+.thumbnails > li {
+  float: left;
+  margin-bottom: 20px;
+  margin-left: 20px;
+}
+
+.thumbnail {
+  display: block;
+  padding: 4px;
+  line-height: 20px;
+  border: 1px solid #ddd;
+  -webkit-border-radius: 4px;
+     -moz-border-radius: 4px;
+          border-radius: 4px;
+  -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.055);
+     -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.055);
+          box-shadow: 0 1px 3px rgba(0, 0, 0, 0.055);
+  -webkit-transition: all 0.2s ease-in-out;
+     -moz-transition: all 0.2s ease-in-out;
+       -o-transition: all 0.2s ease-in-out;
+          transition: all 0.2s ease-in-out;
+}
+
+a.thumbnail:hover {
+  border-color: #0088cc;
+  -webkit-box-shadow: 0 1px 4px rgba(0, 105, 214, 0.25);
+     -moz-box-shadow: 0 1px 4px rgba(0, 105, 214, 0.25);
+          box-shadow: 0 1px 4px rgba(0, 105, 214, 0.25);
+}
+
+.thumbnail > img {
+  display: block;
+  max-width: 100%;
+  margin-right: auto;
+  margin-left: auto;
+}
+
+.thumbnail .caption {
+  padding: 9px;
+  color: #555555;
+}
+
+.media,
+.media-body {
+  overflow: hidden;
+  *overflow: visible;
+  zoom: 1;
+}
+
+.media,
+.media .media {
+  margin-top: 15px;
+}
+
+.media:first-child {
+  margin-top: 0;
+}
+
+.media-object {
+  display: block;
+}
+
+.media-heading {
+  margin: 0 0 5px;
+}
+
+.media .pull-left {
+  margin-right: 10px;
+}
+
+.media .pull-right {
+  margin-left: 10px;
+}
+
+.media-list {
+  margin-left: 0;
+  list-style: none;
+}
+
+.label,
+.badge {
+  display: inline-block;
+  padding: 2px 4px;
+  font-size: 11.844px;
+  font-weight: bold;
+  line-height: 14px;
+  color: #ffffff;
+  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+  white-space: nowrap;
+  vertical-align: baseline;
+  background-color: #999999;
+}
+
+.label {
+  -webkit-border-radius: 3px;
+     -moz-border-radius: 3px;
+          border-radius: 3px;
+}
+
+.badge {
+  padding-right: 9px;
+  padding-left: 9px;
+  -webkit-border-radius: 9px;
+     -moz-border-radius: 9px;
+          border-radius: 9px;
+}
+
+a.label:hover,
+a.badge:hover {
+  color: #ffffff;
+  text-decoration: none;
+  cursor: pointer;
+}
+
+.label-important,
+.badge-important {
+  background-color: #b94a48;
+}
+
+.label-important[href],
+.badge-important[href] {
+  background-color: #953b39;
+}
+
+.label-warning,
+.badge-warning {
+  background-color: #f89406;
+}
+
+.label-warning[href],
+.badge-warning[href] {
+  background-color: #c67605;
+}
+
+.label-success,
+.badge-success {
+  background-color: #468847;
+}
+
+.label-success[href],
+.badge-success[href] {
+  background-color: #356635;
+}
+
+.label-info,
+.badge-info {
+  background-color: #3a87ad;
+}
+
+.label-info[href],
+.badge-info[href] {
+  background-color: #2d6987;
+}
+
+.label-inverse,
+.badge-inverse {
+  background-color: #333333;
+}
+
+.label-inverse[href],
+.badge-inverse[href] {
+  background-color: #1a1a1a;
+}
+
+.btn .label,
+.btn .badge {
+  position: relative;
+  top: -1px;
+}
+
+.btn-mini .label,
+.btn-mini .badge {
+  top: 0;
+}
+
+@-webkit-keyframes progress-bar-stripes {
+  from {
+    background-position: 40px 0;
+  }
+  to {
+    background-position: 0 0;
+  }
+}
+
+@-moz-keyframes progress-bar-stripes {
+  from {
+    background-position: 40px 0;
+  }
+  to {
+    background-position: 0 0;
+  }
+}
+
+@-ms-keyframes progress-bar-stripes {
+  from {
+    background-position: 40px 0;
+  }
+  to {
+    background-position: 0 0;
+  }
+}
+
+@-o-keyframes progress-bar-stripes {
+  from {
+    background-position: 0 0;
+  }
+  to {
+    background-position: 40px 0;
+  }
+}
+
+@keyframes progress-bar-stripes {
+  from {
+    background-position: 40px 0;
+  }
+  to {
+    background-position: 0 0;
+  }
+}
+
+.progress {
+  height: 20px;
+  margin-bottom: 20px;
+  overflow: hidden;
+  background-color: #f7f7f7;
+  background-image: -moz-linear-gradient(top, #f5f5f5, #f9f9f9);
+  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f5f5f5), to(#f9f9f9));
+  background-image: -webkit-linear-gradient(top, #f5f5f5, #f9f9f9);
+  background-image: -o-linear-gradient(top, #f5f5f5, #f9f9f9);
+  background-image: linear-gradient(to bottom, #f5f5f5, #f9f9f9);
+  background-repeat: repeat-x;
+  -webkit-border-radius: 4px;
+     -moz-border-radius: 4px;
+          border-radius: 4px;
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#fff9f9f9', GradientType=0);
+  -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
+     -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
+          box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
+}
+
+.progress .bar {
+  float: left;
+  width: 0;
+  height: 100%;
+  font-size: 12px;
+  color: #ffffff;
+  text-align: center;
+  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+  background-color: #0e90d2;
+  background-image: -moz-linear-gradient(top, #149bdf, #0480be);
+  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#149bdf), to(#0480be));
+  background-image: -webkit-linear-gradient(top, #149bdf, #0480be);
+  background-image: -o-linear-gradient(top, #149bdf, #0480be);
+  background-image: linear-gradient(to bottom, #149bdf, #0480be);
+  background-repeat: repeat-x;
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff149bdf', endColorstr='#ff0480be', GradientType=0);
+  -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);
+     -moz-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);
+          box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);
+  -webkit-box-sizing: border-box;
+     -moz-box-sizing: border-box;
+          box-sizing: border-box;
+  -webkit-transition: width 0.6s ease;
+     -moz-transition: width 0.6s ease;
+       -o-transition: width 0.6s ease;
+          transition: width 0.6s ease;
+}
+
+.progress .bar + .bar {
+  -webkit-box-shadow: inset 1px 0 0 rgba(0, 0, 0, 0.15), inset 0 -1px 0 rgba(0, 0, 0, 0.15);
+     -moz-box-shadow: inset 1px 0 0 rgba(0, 0, 0, 0.15), inset 0 -1px 0 rgba(0, 0, 0, 0.15);
+          box-shadow: inset 1px 0 0 rgba(0, 0, 0, 0.15), inset 0 -1px 0 rgba(0, 0, 0, 0.15);
+}
+
+.progress-striped .bar {
+  background-color: #149bdf;
+  background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));
+  background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+  background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+  background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+  background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+  -webkit-background-size: 40px 40px;
+     -moz-background-size: 40px 40px;
+       -o-background-size: 40px 40px;
+          background-size: 40px 40px;
+}
+
+.progress.active .bar {
+  -webkit-animation: progress-bar-stripes 2s linear infinite;
+     -moz-animation: progress-bar-stripes 2s linear infinite;
+      -ms-animation: progress-bar-stripes 2s linear infinite;
+       -o-animation: progress-bar-stripes 2s linear infinite;
+          animation: progress-bar-stripes 2s linear infinite;
+}
+
+.progress-danger .bar,
+.progress .bar-danger {
+  background-color: #dd514c;
+  background-image: -moz-linear-gradient(top, #ee5f5b, #c43c35);
+  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ee5f5b), to(#c43c35));
+  background-image: -webkit-linear-gradient(top, #ee5f5b, #c43c35);
+  background-image: -o-linear-gradient(top, #ee5f5b, #c43c35);
+  background-image: linear-gradient(to bottom, #ee5f5b, #c43c35);
+  background-repeat: repeat-x;
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffee5f5b', endColorstr='#ffc43c35', GradientType=0);
+}
+
+.progress-danger.progress-striped .bar,
+.progress-striped .bar-danger {
+  background-color: #ee5f5b;
+  background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));
+  background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+  background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+  background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+  background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+}
+
+.progress-success .bar,
+.progress .bar-success {
+  background-color: #5eb95e;
+  background-image: -moz-linear-gradient(top, #62c462, #57a957);
+  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#62c462), to(#57a957));
+  background-image: -webkit-linear-gradient(top, #62c462, #57a957);
+  background-image: -o-linear-gradient(top, #62c462, #57a957);
+  background-image: linear-gradient(to bottom, #62c462, #57a957);
+  background-repeat: repeat-x;
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff62c462', endColorstr='#ff57a957', GradientType=0);
+}
+
+.progress-success.progress-striped .bar,
+.progress-striped .bar-success {
+  background-color: #62c462;
+  background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));
+  background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+  background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+  background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+  background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+}
+
+.progress-info .bar,
+.progress .bar-info {
+  background-color: #4bb1cf;
+  background-image: -moz-linear-gradient(top, #5bc0de, #339bb9);
+  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#5bc0de), to(#339bb9));
+  background-image: -webkit-linear-gradient(top, #5bc0de, #339bb9);
+  background-image: -o-linear-gradient(top, #5bc0de, #339bb9);
+  background-image: linear-gradient(to bottom, #5bc0de, #339bb9);
+  background-repeat: repeat-x;
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff339bb9', GradientType=0);
+}
+
+.progress-info.progress-striped .bar,
+.progress-striped .bar-info {
+  background-color: #5bc0de;
+  background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));
+  background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+  background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+  background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+  background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+}
+
+.progress-warning .bar,
+.progress .bar-warning {
+  background-color: #faa732;
+  background-image: -moz-linear-gradient(top, #fbb450, #f89406);
+  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fbb450), to(#f89406));
+  background-image: -webkit-linear-gradient(top, #fbb450, #f89406);
+  background-image: -o-linear-gradient(top, #fbb450, #f89406);
+  background-image: linear-gradient(to bottom, #fbb450, #f89406);
+  background-repeat: repeat-x;
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffbb450', endColorstr='#fff89406', GradientType=0);
+}
+
+.progress-warning.progress-striped .bar,
+.progress-striped .bar-warning {
+  background-color: #fbb450;
+  background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));
+  background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+  background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+  background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+  background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+}
+
+.accordion {
+  margin-bottom: 20px;
+}
+
+.accordion-group {
+  margin-bottom: 2px;
+  border: 1px solid #e5e5e5;
+  -webkit-border-radius: 4px;
+     -moz-border-radius: 4px;
+          border-radius: 4px;
+}
+
+.accordion-heading {
+  border-bottom: 0;
+}
+
+.accordion-heading .accordion-toggle {
+  display: block;
+  padding: 8px 15px;
+}
+
+.accordion-toggle {
+  cursor: pointer;
+}
+
+.accordion-inner {
+  padding: 9px 15px;
+  border-top: 1px solid #e5e5e5;
+}
+
+.carousel {
+  position: relative;
+  margin-bottom: 20px;
+  line-height: 1;
+}
+
+.carousel-inner {
+  position: relative;
+  width: 100%;
+  overflow: hidden;
+}
+
+.carousel .item {
+  position: relative;
+  display: none;
+  -webkit-transition: 0.6s ease-in-out left;
+     -moz-transition: 0.6s ease-in-out left;
+       -o-transition: 0.6s ease-in-out left;
+          transition: 0.6s ease-in-out left;
+}
+
+.carousel .item > img {
+  display: block;
+  line-height: 1;
+}
+
+.carousel .active,
+.carousel .next,
+.carousel .prev {
+  display: block;
+}
+
+.carousel .active {
+  left: 0;
+}
+
+.carousel .next,
+.carousel .prev {
+  position: absolute;
+  top: 0;
+  width: 100%;
+}
+
+.carousel .next {
+  left: 100%;
+}
+
+.carousel .prev {
+  left: -100%;
+}
+
+.carousel .next.left,
+.carousel .prev.right {
+  left: 0;
+}
+
+.carousel .active.left {
+  left: -100%;
+}
+
+.carousel .active.right {
+  left: 100%;
+}
+
+.carousel-control {
+  position: absolute;
+  top: 40%;
+  left: 15px;
+  width: 40px;
+  height: 40px;
+  margin-top: -20px;
+  font-size: 60px;
+  font-weight: 100;
+  line-height: 30px;
+  color: #ffffff;
+  text-align: center;
+  background: #222222;
+  border: 3px solid #ffffff;
+  -webkit-border-radius: 23px;
+     -moz-border-radius: 23px;
+          border-radius: 23px;
+  opacity: 0.5;
+  filter: alpha(opacity=50);
+}
+
+.carousel-control.right {
+  right: 15px;
+  left: auto;
+}
+
+.carousel-control:hover {
+  color: #ffffff;
+  text-decoration: none;
+  opacity: 0.9;
+  filter: alpha(opacity=90);
+}
+
+.carousel-caption {
+  position: absolute;
+  right: 0;
+  bottom: 0;
+  left: 0;
+  padding: 15px;
+  background: #333333;
+  background: rgba(0, 0, 0, 0.75);
+}
+
+.carousel-caption h4,
+.carousel-caption p {
+  line-height: 20px;
+  color: #ffffff;
+}
+
+.carousel-caption h4 {
+  margin: 0 0 5px;
+}
+
+.carousel-caption p {
+  margin-bottom: 0;
+}
+
+.hero-unit {
+  padding: 60px;
+  margin-bottom: 30px;
+  font-size: 18px;
+  font-weight: 200;
+  line-height: 30px;
+  color: inherit;
+  background-color: #eeeeee;
+  -webkit-border-radius: 6px;
+     -moz-border-radius: 6px;
+          border-radius: 6px;
+}
+
+.hero-unit h1 {
+  margin-bottom: 0;
+  font-size: 60px;
+  line-height: 1;
+  letter-spacing: -1px;
+  color: inherit;
+}
+
+.hero-unit li {
+  line-height: 30px;
+}
+
+.pull-right {
+  float: right;
+}
+
+.pull-left {
+  float: left;
+}
+
+.hide {
+  display: none;
+}
+
+.show {
+  display: block;
+}
+
+.invisible {
+  visibility: hidden;
+}
+
+.affix {
+  position: fixed;
+}
diff --git a/src/site/resources/css/bootstrap.min.css b/src/site/resources/css/bootstrap.min.css
new file mode 100644
index 0000000..43e16d7
--- /dev/null
+++ b/src/site/resources/css/bootstrap.min.css
@@ -0,0 +1,9 @@
+/*!
+ * Bootstrap v2.2.1
+ *
+ * Copyright 2012 Twitter, Inc
+ * Licensed under the Apache License v2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Designed and built with all the love in the world @twitter by @mdo and @fat.
+ */article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block}audio,canvas,video{display:inline-block;*display:inline;*zoom:1}audio:not([controls]){display:none}html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}a:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}a:hover,a:active{outline:0}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{width:auto\9;height:auto;max-width:100%;vertical-align:middle;border:0;-ms-interpolation-mode:bicubic}#map_canvas img,.google-maps img{max-width:none}button,input,select,textarea{margin:0;font-size:100%;vertical-align:middle}button,input{*overflow:visible;line-height:normal}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}button,html input[type="button"],input[type="reset"],input[type="submit"]{cursor:pointer;-webkit-appearance:button}input[type="search"]{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-appearance:textfield}input[type="search"]::-webkit-search-decoration,input[type="search"]::-webkit-search-cancel-button{-webkit-appearance:none}textarea{overflow:auto;vertical-align:top}.clearfix{*zoom:1}.clearfix:before,.clearfix:after{display:table;line-height:0;content:""}.clearfix:after{clear:both}.hide-text{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.input-block-level{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}body{margin:0;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:20px;color:#333;background-color:#fff}a{color:#08c;text-decoration:none}a:hover{color:#005580;text-decoration:underline}.img-rounded{-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.img-polaroid{padding:4px;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.2);-webkit-box-shadow:0 1px 3px rgba(0,0,0,0.1);-moz-box-shadow:0 1px 3px rgba(0,0,0,0.1);box-shadow:0 1px 3px rgba(0,0,0,0.1)}.img-circle{-webkit-border-radius:500px;-moz-border-radius:500px;border-radius:500px}.row{margin-left:-20px;*zoom:1}.row:before,.row:after{display:table;line-height:0;content:""}.row:after{clear:both}[class*="span"]{float:left;min-height:1px;margin-left:20px}.container,.navbar-static-top .container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:940px}.span12{width:940px}.span11{width:860px}.span10{width:780px}.span9{width:700px}.span8{width:620px}.span7{width:540px}.span6{width:460px}.span5{width:380px}.span4{width:300px}.span3{width:220px}.span2{width:140px}.span1{width:60px}.offset12{margin-left:980px}.offset11{margin-left:900px}.offset10{margin-left:820px}.offset9{margin-left:740px}.offset8{margin-left:660px}.offset7{margin-left:580px}.offset6{margin-left:500px}.offset5{margin-left:420px}.offset4{margin-left:340px}.offset3{margin-left:260px}.offset2{margin-left:180px}.offset1{margin-left:100px}.row-fluid{width:100%;*zoom:1}.row-fluid:before,.row-fluid:after{display:table;line-height:0;content:""}.row-fluid:after{clear:both}.row-fluid [class*="span"]{display:block;float:left;width:100%;min-height:30px;margin-left:2.127659574468085%;*margin-left:2.074468085106383%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.row-fluid [class*="span"]:first-child{margin-left:0}.row-fluid .controls-row [class*="span"]+[class*="span"]{margin-left:2.127659574468085%}.row-fluid .span12{width:100%;*width:99.94680851063829%}.row-fluid .span11{width:91.48936170212765%;*width:91.43617021276594%}.row-fluid .span10{width:82.97872340425532%;*width:82.92553191489361%}.row-fluid .span9{width:74.46808510638297%;*width:74.41489361702126%}.row-fluid .span8{width:65.95744680851064%;*width:65.90425531914893%}.row-fluid .span7{width:57.44680851063829%;*width:57.39361702127659%}.row-fluid .span6{width:48.93617021276595%;*width:48.88297872340425%}.row-fluid .span5{width:40.42553191489362%;*width:40.37234042553192%}.row-fluid .span4{width:31.914893617021278%;*width:31.861702127659576%}.row-fluid .span3{width:23.404255319148934%;*width:23.351063829787233%}.row-fluid .span2{width:14.893617021276595%;*width:14.840425531914894%}.row-fluid .span1{width:6.382978723404255%;*width:6.329787234042553%}.row-fluid .offset12{margin-left:104.25531914893617%;*margin-left:104.14893617021275%}.row-fluid .offset12:first-child{margin-left:102.12765957446808%;*margin-left:102.02127659574467%}.row-fluid .offset11{margin-left:95.74468085106382%;*margin-left:95.6382978723404%}.row-fluid .offset11:first-child{margin-left:93.61702127659574%;*margin-left:93.51063829787232%}.row-fluid .offset10{margin-left:87.23404255319149%;*margin-left:87.12765957446807%}.row-fluid .offset10:first-child{margin-left:85.1063829787234%;*margin-left:84.99999999999999%}.row-fluid .offset9{margin-left:78.72340425531914%;*margin-left:78.61702127659572%}.row-fluid .offset9:first-child{margin-left:76.59574468085106%;*margin-left:76.48936170212764%}.row-fluid .offset8{margin-left:70.2127659574468%;*margin-left:70.10638297872339%}.row-fluid .offset8:first-child{margin-left:68.08510638297872%;*margin-left:67.9787234042553%}.row-fluid .offset7{margin-left:61.70212765957446%;*margin-left:61.59574468085106%}.row-fluid .offset7:first-child{margin-left:59.574468085106375%;*margin-left:59.46808510638297%}.row-fluid .offset6{margin-left:53.191489361702125%;*margin-left:53.085106382978715%}.row-fluid .offset6:first-child{margin-left:51.063829787234035%;*margin-left:50.95744680851063%}.row-fluid .offset5{margin-left:44.68085106382979%;*margin-left:44.57446808510638%}.row-fluid .offset5:first-child{margin-left:42.5531914893617%;*margin-left:42.4468085106383%}.row-fluid .offset4{margin-left:36.170212765957444%;*margin-left:36.06382978723405%}.row-fluid .offset4:first-child{margin-left:34.04255319148936%;*margin-left:33.93617021276596%}.row-fluid .offset3{margin-left:27.659574468085104%;*margin-left:27.5531914893617%}.row-fluid .offset3:first-child{margin-left:25.53191489361702%;*margin-left:25.425531914893618%}.row-fluid .offset2{margin-left:19.148936170212764%;*margin-left:19.04255319148936%}.row-fluid .offset2:first-child{margin-left:17.02127659574468%;*margin-left:16.914893617021278%}.row-fluid .offset1{margin-left:10.638297872340425%;*margin-left:10.53191489361702%}.row-fluid .offset1:first-child{margin-left:8.51063829787234%;*margin-left:8.404255319148938%}[class*="span"].hide,.row-fluid [class*="span"].hide{display:none}[class*="span"].pull-right,.row-fluid [class*="span"].pull-right{float:right}.container{margin-right:auto;margin-left:auto;*zoom:1}.container:before,.container:after{display:table;line-height:0;content:""}.container:after{clear:both}.container-fluid{padding-right:20px;padding-left:20px;*zoom:1}.container-fluid:before,.container-fluid:after{display:table;line-height:0;content:""}.container-fluid:after{clear:both}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:21px;font-weight:200;line-height:30px}small{font-size:85%}strong{font-weight:bold}em{font-style:italic}cite{font-style:normal}.muted{color:#999}.text-warning{color:#c09853}a.text-warning:hover{color:#a47e3c}.text-error{color:#b94a48}a.text-error:hover{color:#953b39}.text-info{color:#3a87ad}a.text-info:hover{color:#2d6987}.text-success{color:#468847}a.text-success:hover{color:#356635}h1,h2,h3,h4,h5,h6{margin:10px 0;font-family:inherit;font-weight:bold;line-height:20px;color:inherit;text-rendering:optimizelegibility}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small{font-weight:normal;line-height:1;color:#999}h1,h2,h3{line-height:40px}h1{font-size:38.5px}h2{font-size:31.5px}h3{font-size:24.5px}h4{font-size:17.5px}h5{font-size:14px}h6{font-size:11.9px}h1 small{font-size:24.5px}h2 small{font-size:17.5px}h3 small{font-size:14px}h4 small{font-size:14px}.page-header{padding-bottom:9px;margin:20px 0 30px;border-bottom:1px solid #eee}ul,ol{padding:0;margin:0 0 10px 25px}ul ul,ul ol,ol ol,ol ul{margin-bottom:0}li{line-height:20px}ul.unstyled,ol.unstyled{margin-left:0;list-style:none}dl{margin-bottom:20px}dt,dd{line-height:20px}dt{font-weight:bold}dd{margin-left:10px}.dl-horizontal{*zoom:1}.dl-horizontal:before,.dl-horizontal:after{display:table;line-height:0;content:""}.dl-horizontal:after{clear:both}.dl-horizontal dt{float:left;width:160px;overflow:hidden;clear:left;text-align:right;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}hr{margin:20px 0;border:0;border-top:1px solid #eee;border-bottom:1px solid #fff}abbr[title],abbr[data-original-title]{cursor:help;border-bottom:1px dotted #999}abbr.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:0 0 0 15px;margin:0 0 20px;border-left:5px solid #eee}blockquote p{margin-bottom:0;font-size:16px;font-weight:300;line-height:25px}blockquote small{display:block;line-height:20px;color:#999}blockquote small:before{content:'\2014 \00A0'}blockquote.pull-right{float:right;padding-right:15px;padding-left:0;border-right:5px solid #eee;border-left:0}blockquote.pull-right p,blockquote.pull-right small{text-align:right}blockquote.pull-right small:before{content:''}blockquote.pull-right small:after{content:'\00A0 \2014'}q:before,q:after,blockquote:before,blockquote:after{content:""}address{display:block;margin-bottom:20px;font-style:normal;line-height:20px}code,pre{padding:0 3px 2px;font-family:Monaco,Menlo,Consolas,"Courier New",monospace;font-size:12px;color:#333;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}code{padding:2px 4px;color:#d14;background-color:#f7f7f9;border:1px solid #e1e1e8}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:20px;word-break:break-all;word-wrap:break-word;white-space:pre;white-space:pre-wrap;background-color:#f5f5f5;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.15);-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}pre.prettyprint{margin-bottom:20px}pre code{padding:0;color:inherit;background-color:transparent;border:0}.pre-scrollable{max-height:340px;overflow-y:scroll}form{margin:0 0 20px}fieldset{padding:0;margin:0;border:0}legend{display:block;width:100%;padding:0;margin-bottom:20px;font-size:21px;line-height:40px;color:#333;border:0;border-bottom:1px solid #e5e5e5}legend small{font-size:15px;color:#999}label,input,button,select,textarea{font-size:14px;font-weight:normal;line-height:20px}input,button,select,textarea{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif}label{display:block;margin-bottom:5px}select,textarea,input[type="text"],input[type="password"],input[type="datetime"],input[type="datetime-local"],input[type="date"],input[type="month"],input[type="time"],input[type="week"],input[type="number"],input[type="email"],input[type="url"],input[type="search"],input[type="tel"],input[type="color"],.uneditable-input{display:inline-block;height:20px;padding:4px 6px;margin-bottom:10px;font-size:14px;line-height:20px;color:#555;vertical-align:middle;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}input,textarea,.uneditable-input{width:206px}textarea{height:auto}textarea,input[type="text"],input[type="password"],input[type="datetime"],input[type="datetime-local"],input[type="date"],input[type="month"],input[type="time"],input[type="week"],input[type="number"],input[type="email"],input[type="url"],input[type="search"],input[type="tel"],input[type="color"],.uneditable-input{background-color:#fff;border:1px solid #ccc;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-webkit-transition:border linear .2s,box-shadow linear .2s;-moz-transition:border linear .2s,box-shadow linear .2s;-o-transition:border linear .2s,box-shadow linear .2s;transition:border linear .2s,box-shadow linear .2s}textarea:focus,input[type="text"]:focus,input[type="password"]:focus,input[type="datetime"]:focus,input[type="datetime-local"]:focus,input[type="date"]:focus,input[type="month"]:focus,input[type="time"]:focus,input[type="week"]:focus,input[type="number"]:focus,input[type="email"]:focus,input[type="url"]:focus,input[type="search"]:focus,input[type="tel"]:focus,input[type="color"]:focus,.uneditable-input:focus{border-color:rgba(82,168,236,0.8);outline:0;outline:thin dotted \9;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(82,168,236,0.6);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(82,168,236,0.6);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(82,168,236,0.6)}input[type="radio"],input[type="checkbox"]{margin:4px 0 0;margin-top:1px \9;*margin-top:0;line-height:normal;cursor:pointer}input[type="file"],input[type="image"],input[type="submit"],input[type="reset"],input[type="button"],input[type="radio"],input[type="checkbox"]{width:auto}select,input[type="file"]{height:30px;*margin-top:4px;line-height:30px}select{width:220px;background-color:#fff;border:1px solid #ccc}select[multiple],select[size]{height:auto}select:focus,input[type="file"]:focus,input[type="radio"]:focus,input[type="checkbox"]:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.uneditable-input,.uneditable-textarea{color:#999;cursor:not-allowed;background-color:#fcfcfc;border-color:#ccc;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,0.025);-moz-box-shadow:inset 0 1px 2px rgba(0,0,0,0.025);box-shadow:inset 0 1px 2px rgba(0,0,0,0.025)}.uneditable-input{overflow:hidden;white-space:nowrap}.uneditable-textarea{width:auto;height:auto}input:-moz-placeholder,textarea:-moz-placeholder{color:#999}input:-ms-input-placeholder,textarea:-ms-input-placeholder{color:#999}input::-webkit-input-placeholder,textarea::-webkit-input-placeholder{color:#999}.radio,.checkbox{min-height:20px;padding-left:20px}.radio input[type="radio"],.checkbox input[type="checkbox"]{float:left;margin-left:-20px}.controls>.radio:first-child,.controls>.checkbox:first-child{padding-top:5px}.radio.inline,.checkbox.inline{display:inline-block;padding-top:5px;margin-bottom:0;vertical-align:middle}.radio.inline+.radio.inline,.checkbox.inline+.checkbox.inline{margin-left:10px}.input-mini{width:60px}.input-small{width:90px}.input-medium{width:150px}.input-large{width:210px}.input-xlarge{width:270px}.input-xxlarge{width:530px}input[class*="span"],select[class*="span"],textarea[class*="span"],.uneditable-input[class*="span"],.row-fluid input[class*="span"],.row-fluid select[class*="span"],.row-fluid textarea[class*="span"],.row-fluid .uneditable-input[class*="span"]{float:none;margin-left:0}.input-append input[class*="span"],.input-append .uneditable-input[class*="span"],.input-prepend input[class*="span"],.input-prepend .uneditable-input[class*="span"],.row-fluid input[class*="span"],.row-fluid select[class*="span"],.row-fluid textarea[class*="span"],.row-fluid .uneditable-input[class*="span"],.row-fluid .input-prepend [class*="span"],.row-fluid .input-append [class*="span"]{display:inline-block}input,textarea,.uneditable-input{margin-left:0}.controls-row [class*="span"]+[class*="span"]{margin-left:20px}input.span12,textarea.span12,.uneditable-input.span12{width:926px}input.span11,textarea.span11,.uneditable-input.span11{width:846px}input.span10,textarea.span10,.uneditable-input.span10{width:766px}input.span9,textarea.span9,.uneditable-input.span9{width:686px}input.span8,textarea.span8,.uneditable-input.span8{width:606px}input.span7,textarea.span7,.uneditable-input.span7{width:526px}input.span6,textarea.span6,.uneditable-input.span6{width:446px}input.span5,textarea.span5,.uneditable-input.span5{width:366px}input.span4,textarea.span4,.uneditable-input.span4{width:286px}input.span3,textarea.span3,.uneditable-input.span3{width:206px}input.span2,textarea.span2,.uneditable-input.span2{width:126px}input.span1,textarea.span1,.uneditable-input.span1{width:46px}.controls-row{*zoom:1}.controls-row:before,.controls-row:after{display:table;line-height:0;content:""}.controls-row:after{clear:both}.controls-row [class*="span"],.row-fluid .controls-row [class*="span"]{float:left}.controls-row .checkbox[class*="span"],.controls-row .radio[class*="span"]{padding-top:5px}input[disabled],select[disabled],textarea[disabled],input[readonly],select[readonly],textarea[readonly]{cursor:not-allowed;background-color:#eee}input[type="radio"][disabled],input[type="checkbox"][disabled],input[type="radio"][readonly],input[type="checkbox"][readonly]{background-color:transparent}.control-group.warning>label,.control-group.warning .help-block,.control-group.warning .help-inline{color:#c09853}.control-group.warning .checkbox,.control-group.warning .radio,.control-group.warning input,.control-group.warning select,.control-group.warning textarea{color:#c09853}.control-group.warning input,.control-group.warning select,.control-group.warning textarea{border-color:#c09853;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.control-group.warning input:focus,.control-group.warning select:focus,.control-group.warning textarea:focus{border-color:#a47e3c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #dbc59e;-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #dbc59e;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #dbc59e}.control-group.warning .input-prepend .add-on,.control-group.warning .input-append .add-on{color:#c09853;background-color:#fcf8e3;border-color:#c09853}.control-group.error>label,.control-group.error .help-block,.control-group.error .help-inline{color:#b94a48}.control-group.error .checkbox,.control-group.error .radio,.control-group.error input,.control-group.error select,.control-group.error textarea{color:#b94a48}.control-group.error input,.control-group.error select,.control-group.error textarea{border-color:#b94a48;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.control-group.error input:focus,.control-group.error select:focus,.control-group.error textarea:focus{border-color:#953b39;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #d59392;-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #d59392;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #d59392}.control-group.error .input-prepend .add-on,.control-group.error .input-append .add-on{color:#b94a48;background-color:#f2dede;border-color:#b94a48}.control-group.success>label,.control-group.success .help-block,.control-group.success .help-inline{color:#468847}.control-group.success .checkbox,.control-group.success .radio,.control-group.success input,.control-group.success select,.control-group.success textarea{color:#468847}.control-group.success input,.control-group.success select,.control-group.success textarea{border-color:#468847;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.control-group.success input:focus,.control-group.success select:focus,.control-group.success textarea:focus{border-color:#356635;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7aba7b;-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7aba7b;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7aba7b}.control-group.success .input-prepend .add-on,.control-group.success .input-append .add-on{color:#468847;background-color:#dff0d8;border-color:#468847}.control-group.info>label,.control-group.info .help-block,.control-group.info .help-inline{color:#3a87ad}.control-group.info .checkbox,.control-group.info .radio,.control-group.info input,.control-group.info select,.control-group.info textarea{color:#3a87ad}.control-group.info input,.control-group.info select,.control-group.info textarea{border-color:#3a87ad;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.control-group.info input:focus,.control-group.info select:focus,.control-group.info textarea:focus{border-color:#2d6987;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7ab5d3;-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7ab5d3;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7ab5d3}.control-group.info .input-prepend .add-on,.control-group.info .input-append .add-on{color:#3a87ad;background-color:#d9edf7;border-color:#3a87ad}input:focus:required:invalid,textarea:focus:required:invalid,select:focus:required:invalid{color:#b94a48;border-color:#ee5f5b}input:focus:required:invalid:focus,textarea:focus:required:invalid:focus,select:focus:required:invalid:focus{border-color:#e9322d;-webkit-box-shadow:0 0 6px #f8b9b7;-moz-box-shadow:0 0 6px #f8b9b7;box-shadow:0 0 6px #f8b9b7}.form-actions{padding:19px 20px 20px;margin-top:20px;margin-bottom:20px;background-color:#f5f5f5;border-top:1px solid #e5e5e5;*zoom:1}.form-actions:before,.form-actions:after{display:table;line-height:0;content:""}.form-actions:after{clear:both}.help-block,.help-inline{color:#595959}.help-block{display:block;margin-bottom:10px}.help-inline{display:inline-block;*display:inline;padding-left:5px;vertical-align:middle;*zoom:1}.input-append,.input-prepend{margin-bottom:5px;font-size:0;white-space:nowrap}.input-append input,.input-prepend input,.input-append select,.input-prepend select,.input-append .uneditable-input,.input-prepend .uneditable-input,.input-append .dropdown-menu,.input-prepend .dropdown-menu{font-size:14px}.input-append input,.input-prepend input,.input-append select,.input-prepend select,.input-append .uneditable-input,.input-prepend .uneditable-input{position:relative;margin-bottom:0;*margin-left:0;vertical-align:top;-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.input-append input:focus,.input-prepend input:focus,.input-append select:focus,.input-prepend select:focus,.input-append .uneditable-input:focus,.input-prepend .uneditable-input:focus{z-index:2}.input-append .add-on,.input-prepend .add-on{display:inline-block;width:auto;height:20px;min-width:16px;padding:4px 5px;font-size:14px;font-weight:normal;line-height:20px;text-align:center;text-shadow:0 1px 0 #fff;background-color:#eee;border:1px solid #ccc}.input-append .add-on,.input-prepend .add-on,.input-append .btn,.input-prepend .btn{vertical-align:top;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.input-append .active,.input-prepend .active{background-color:#a9dba9;border-color:#46a546}.input-prepend .add-on,.input-prepend .btn{margin-right:-1px}.input-prepend .add-on:first-child,.input-prepend .btn:first-child{-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px}.input-append input,.input-append select,.input-append .uneditable-input{-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px}.input-append input+.btn-group .btn,.input-append select+.btn-group .btn,.input-append .uneditable-input+.btn-group .btn{-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.input-append .add-on,.input-append .btn,.input-append .btn-group{margin-left:-1px}.input-append .add-on:last-child,.input-append .btn:last-child{-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.input-prepend.input-append input,.input-prepend.input-append select,.input-prepend.input-append .uneditable-input{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.input-prepend.input-append input+.btn-group .btn,.input-prepend.input-append select+.btn-group .btn,.input-prepend.input-append .uneditable-input+.btn-group .btn{-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.input-prepend.input-append .add-on:first-child,.input-prepend.input-append .btn:first-child{margin-right:-1px;-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px}.input-prepend.input-append .add-on:last-child,.input-prepend.input-append .btn:last-child{margin-left:-1px;-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.input-prepend.input-append .btn-group:first-child{margin-left:0}input.search-query{padding-right:14px;padding-right:4px \9;padding-left:14px;padding-left:4px \9;margin-bottom:0;-webkit-border-radius:15px;-moz-border-radius:15px;border-radius:15px}.form-search .input-append .search-query,.form-search .input-prepend .search-query{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.form-search .input-append .search-query{-webkit-border-radius:14px 0 0 14px;-moz-border-radius:14px 0 0 14px;border-radius:14px 0 0 14px}.form-search .input-append .btn{-webkit-border-radius:0 14px 14px 0;-moz-border-radius:0 14px 14px 0;border-radius:0 14px 14px 0}.form-search .input-prepend .search-query{-webkit-border-radius:0 14px 14px 0;-moz-border-radius:0 14px 14px 0;border-radius:0 14px 14px 0}.form-search .input-prepend .btn{-webkit-border-radius:14px 0 0 14px;-moz-border-radius:14px 0 0 14px;border-radius:14px 0 0 14px}.form-search input,.form-inline input,.form-horizontal input,.form-search textarea,.form-inline textarea,.form-horizontal textarea,.form-search select,.form-inline select,.form-horizontal select,.form-search .help-inline,.form-inline .help-inline,.form-horizontal .help-inline,.form-search .uneditable-input,.form-inline .uneditable-input,.form-horizontal .uneditable-input,.form-search .input-prepend,.form-inline .input-prepend,.form-horizontal .input-prepend,.form-search .input-append,.form-inline .input-append,.form-horizontal .input-append{display:inline-block;*display:inline;margin-bottom:0;vertical-align:middle;*zoom:1}.form-search .hide,.form-inline .hide,.form-horizontal .hide{display:none}.form-search label,.form-inline label,.form-search .btn-group,.form-inline .btn-group{display:inline-block}.form-search .input-append,.form-inline .input-append,.form-search .input-prepend,.form-inline .input-prepend{margin-bottom:0}.form-search .radio,.form-search .checkbox,.form-inline .radio,.form-inline .checkbox{padding-left:0;margin-bottom:0;vertical-align:middle}.form-search .radio input[type="radio"],.form-search .checkbox input[type="checkbox"],.form-inline .radio input[type="radio"],.form-inline .checkbox input[type="checkbox"]{float:left;margin-right:3px;margin-left:0}.control-group{margin-bottom:10px}legend+.control-group{margin-top:20px;-webkit-margin-top-collapse:separate}.form-horizontal .control-group{margin-bottom:20px;*zoom:1}.form-horizontal .control-group:before,.form-horizontal .control-group:after{display:table;line-height:0;content:""}.form-horizontal .control-group:after{clear:both}.form-horizontal .control-label{float:left;width:160px;padding-top:5px;text-align:right}.form-horizontal .controls{*display:inline-block;*padding-left:20px;margin-left:180px;*margin-left:0}.form-horizontal .controls:first-child{*padding-left:180px}.form-horizontal .help-block{margin-bottom:0}.form-horizontal input+.help-block,.form-horizontal select+.help-block,.form-horizontal textarea+.help-block{margin-top:10px}.form-horizontal .form-actions{padding-left:180px}table{max-width:100%;background-color:transparent;border-collapse:collapse;border-spacing:0}.table{width:100%;margin-bottom:20px}.table th,.table td{padding:8px;line-height:20px;text-align:left;vertical-align:top;border-top:1px solid #ddd}.table th{font-weight:bold}.table thead th{vertical-align:bottom}.table caption+thead tr:first-child th,.table caption+thead tr:first-child td,.table colgroup+thead tr:first-child th,.table colgroup+thead tr:first-child td,.table thead:first-child tr:first-child th,.table thead:first-child tr:first-child td{border-top:0}.table tbody+tbody{border-top:2px solid #ddd}.table-condensed th,.table-condensed td{padding:4px 5px}.table-bordered{border:1px solid #ddd;border-collapse:separate;*border-collapse:collapse;border-left:0;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.table-bordered th,.table-bordered td{border-left:1px solid #ddd}.table-bordered caption+thead tr:first-child th,.table-bordered caption+tbody tr:first-child th,.table-bordered caption+tbody tr:first-child td,.table-bordered colgroup+thead tr:first-child th,.table-bordered colgroup+tbody tr:first-child th,.table-bordered colgroup+tbody tr:first-child td,.table-bordered thead:first-child tr:first-child th,.table-bordered tbody:first-child tr:first-child th,.table-bordered tbody:first-child tr:first-child td{border-top:0}.table-bordered thead:first-child tr:first-child th:first-child,.table-bordered tbody:first-child tr:first-child td:first-child{-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-topleft:4px}.table-bordered thead:first-child tr:first-child th:last-child,.table-bordered tbody:first-child tr:first-child td:last-child{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-moz-border-radius-topright:4px}.table-bordered thead:last-child tr:last-child th:first-child,.table-bordered tbody:last-child tr:last-child td:first-child,.table-bordered tfoot:last-child tr:last-child td:first-child{-webkit-border-radius:0 0 0 4px;-moz-border-radius:0 0 0 4px;border-radius:0 0 0 4px;-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px;-moz-border-radius-bottomleft:4px}.table-bordered thead:last-child tr:last-child th:last-child,.table-bordered tbody:last-child tr:last-child td:last-child,.table-bordered tfoot:last-child tr:last-child td:last-child{-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px;-moz-border-radius-bottomright:4px}.table-bordered caption+thead tr:first-child th:first-child,.table-bordered caption+tbody tr:first-child td:first-child,.table-bordered colgroup+thead tr:first-child th:first-child,.table-bordered colgroup+tbody tr:first-child td:first-child{-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-topleft:4px}.table-bordered caption+thead tr:first-child th:last-child,.table-bordered caption+tbody tr:first-child td:last-child,.table-bordered colgroup+thead tr:first-child th:last-child,.table-bordered colgroup+tbody tr:first-child td:last-child{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-moz-border-radius-topright:4px}.table-striped tbody tr:nth-child(odd) td,.table-striped tbody tr:nth-child(odd) th{background-color:#f9f9f9}.table-hover tbody tr:hover td,.table-hover tbody tr:hover th{background-color:#f5f5f5}table td[class*="span"],table th[class*="span"],.row-fluid table td[class*="span"],.row-fluid table th[class*="span"]{display:table-cell;float:none;margin-left:0}.table td.span1,.table th.span1{float:none;width:44px;margin-left:0}.table td.span2,.table th.span2{float:none;width:124px;margin-left:0}.table td.span3,.table th.span3{float:none;width:204px;margin-left:0}.table td.span4,.table th.span4{float:none;width:284px;margin-left:0}.table td.span5,.table th.span5{float:none;width:364px;margin-left:0}.table td.span6,.table th.span6{float:none;width:444px;margin-left:0}.table td.span7,.table th.span7{float:none;width:524px;margin-left:0}.table td.span8,.table th.span8{float:none;width:604px;margin-left:0}.table td.span9,.table th.span9{float:none;width:684px;margin-left:0}.table td.span10,.table th.span10{float:none;width:764px;margin-left:0}.table td.span11,.table th.span11{float:none;width:844px;margin-left:0}.table td.span12,.table th.span12{float:none;width:924px;margin-left:0}.table tbody tr.success td{background-color:#dff0d8}.table tbody tr.error td{background-color:#f2dede}.table tbody tr.warning td{background-color:#fcf8e3}.table tbody tr.info td{background-color:#d9edf7}.table-hover tbody tr.success:hover td{background-color:#d0e9c6}.table-hover tbody tr.error:hover td{background-color:#ebcccc}.table-hover tbody tr.warning:hover td{background-color:#faf2cc}.table-hover tbody tr.info:hover td{background-color:#c4e3f3}[class^="icon-"],[class*=" icon-"]{display:inline-block;width:14px;height:14px;margin-top:1px;*margin-right:.3em;line-height:14px;vertical-align:text-top;background-image:url("../img/glyphicons-halflings.png");background-position:14px 14px;background-repeat:no-repeat}.icon-white,.nav-pills>.active>a>[class^="icon-"],.nav-pills>.active>a>[class*=" icon-"],.nav-list>.active>a>[class^="icon-"],.nav-list>.active>a>[class*=" icon-"],.navbar-inverse .nav>.active>a>[class^="icon-"],.navbar-inverse .nav>.active>a>[class*=" icon-"],.dropdown-menu>li>a:hover>[class^="icon-"],.dropdown-menu>li>a:hover>[class*=" icon-"],.dropdown-menu>.active>a>[class^="icon-"],.dropdown-menu>.active>a>[class*=" icon-"],.dropdown-submenu:hover>a>[class^="icon-"],.dropdown-submenu:hover>a>[class*=" icon-"]{background-image:url("../img/glyphicons-halflings-white.png")}.icon-glass{background-position:0 0}.icon-music{background-position:-24px 0}.icon-search{background-position:-48px 0}.icon-envelope{background-position:-72px 0}.icon-heart{background-position:-96px 0}.icon-star{background-position:-120px 0}.icon-star-empty{background-position:-144px 0}.icon-user{background-position:-168px 0}.icon-film{background-position:-192px 0}.icon-th-large{background-position:-216px 0}.icon-th{background-position:-240px 0}.icon-th-list{background-position:-264px 0}.icon-ok{background-position:-288px 0}.icon-remove{background-position:-312px 0}.icon-zoom-in{background-position:-336px 0}.icon-zoom-out{background-position:-360px 0}.icon-off{background-position:-384px 0}.icon-signal{background-position:-408px 0}.icon-cog{background-position:-432px 0}.icon-trash{background-position:-456px 0}.icon-home{background-position:0 -24px}.icon-file{background-position:-24px -24px}.icon-time{background-position:-48px -24px}.icon-road{background-position:-72px -24px}.icon-download-alt{background-position:-96px -24px}.icon-download{background-position:-120px -24px}.icon-upload{background-position:-144px -24px}.icon-inbox{background-position:-168px -24px}.icon-play-circle{background-position:-192px -24px}.icon-repeat{background-position:-216px -24px}.icon-refresh{background-position:-240px -24px}.icon-list-alt{background-position:-264px -24px}.icon-lock{background-position:-287px -24px}.icon-flag{background-position:-312px -24px}.icon-headphones{background-position:-336px -24px}.icon-volume-off{background-position:-360px -24px}.icon-volume-down{background-position:-384px -24px}.icon-volume-up{background-position:-408px -24px}.icon-qrcode{background-position:-432px -24px}.icon-barcode{background-position:-456px -24px}.icon-tag{background-position:0 -48px}.icon-tags{background-position:-25px -48px}.icon-book{background-position:-48px -48px}.icon-bookmark{background-position:-72px -48px}.icon-print{background-position:-96px -48px}.icon-camera{background-position:-120px -48px}.icon-font{background-position:-144px -48px}.icon-bold{background-position:-167px -48px}.icon-italic{background-position:-192px -48px}.icon-text-height{background-position:-216px -48px}.icon-text-width{background-position:-240px -48px}.icon-align-left{background-position:-264px -48px}.icon-align-center{background-position:-288px -48px}.icon-align-right{background-position:-312px -48px}.icon-align-justify{background-position:-336px -48px}.icon-list{background-position:-360px -48px}.icon-indent-left{background-position:-384px -48px}.icon-indent-right{background-position:-408px -48px}.icon-facetime-video{background-position:-432px -48px}.icon-picture{background-position:-456px -48px}.icon-pencil{background-position:0 -72px}.icon-map-marker{background-position:-24px -72px}.icon-adjust{background-position:-48px -72px}.icon-tint{background-position:-72px -72px}.icon-edit{background-position:-96px -72px}.icon-share{background-position:-120px -72px}.icon-check{background-position:-144px -72px}.icon-move{background-position:-168px -72px}.icon-step-backward{background-position:-192px -72px}.icon-fast-backward{background-position:-216px -72px}.icon-backward{background-position:-240px -72px}.icon-play{background-position:-264px -72px}.icon-pause{background-position:-288px -72px}.icon-stop{background-position:-312px -72px}.icon-forward{background-position:-336px -72px}.icon-fast-forward{background-position:-360px -72px}.icon-step-forward{background-position:-384px -72px}.icon-eject{background-position:-408px -72px}.icon-chevron-left{background-position:-432px -72px}.icon-chevron-right{background-position:-456px -72px}.icon-plus-sign{background-position:0 -96px}.icon-minus-sign{background-position:-24px -96px}.icon-remove-sign{background-position:-48px -96px}.icon-ok-sign{background-position:-72px -96px}.icon-question-sign{background-position:-96px -96px}.icon-info-sign{background-position:-120px -96px}.icon-screenshot{background-position:-144px -96px}.icon-remove-circle{background-position:-168px -96px}.icon-ok-circle{background-position:-192px -96px}.icon-ban-circle{background-position:-216px -96px}.icon-arrow-left{background-position:-240px -96px}.icon-arrow-right{background-position:-264px -96px}.icon-arrow-up{background-position:-289px -96px}.icon-arrow-down{background-position:-312px -96px}.icon-share-alt{background-position:-336px -96px}.icon-resize-full{background-position:-360px -96px}.icon-resize-small{background-position:-384px -96px}.icon-plus{background-position:-408px -96px}.icon-minus{background-position:-433px -96px}.icon-asterisk{background-position:-456px -96px}.icon-exclamation-sign{background-position:0 -120px}.icon-gift{background-position:-24px -120px}.icon-leaf{background-position:-48px -120px}.icon-fire{background-position:-72px -120px}.icon-eye-open{background-position:-96px -120px}.icon-eye-close{background-position:-120px -120px}.icon-warning-sign{background-position:-144px -120px}.icon-plane{background-position:-168px -120px}.icon-calendar{background-position:-192px -120px}.icon-random{width:16px;background-position:-216px -120px}.icon-comment{background-position:-240px -120px}.icon-magnet{background-position:-264px -120px}.icon-chevron-up{background-position:-288px -120px}.icon-chevron-down{background-position:-313px -119px}.icon-retweet{background-position:-336px -120px}.icon-shopping-cart{background-position:-360px -120px}.icon-folder-close{background-position:-384px -120px}.icon-folder-open{width:16px;background-position:-408px -120px}.icon-resize-vertical{background-position:-432px -119px}.icon-resize-horizontal{background-position:-456px -118px}.icon-hdd{background-position:0 -144px}.icon-bullhorn{background-position:-24px -144px}.icon-bell{background-position:-48px -144px}.icon-certificate{background-position:-72px -144px}.icon-thumbs-up{background-position:-96px -144px}.icon-thumbs-down{background-position:-120px -144px}.icon-hand-right{background-position:-144px -144px}.icon-hand-left{background-position:-168px -144px}.icon-hand-up{background-position:-192px -144px}.icon-hand-down{background-position:-216px -144px}.icon-circle-arrow-right{background-position:-240px -144px}.icon-circle-arrow-left{background-position:-264px -144px}.icon-circle-arrow-up{background-position:-288px -144px}.icon-circle-arrow-down{background-position:-312px -144px}.icon-globe{background-position:-336px -144px}.icon-wrench{background-position:-360px -144px}.icon-tasks{background-position:-384px -144px}.icon-filter{background-position:-408px -144px}.icon-briefcase{background-position:-432px -144px}.icon-fullscreen{background-position:-456px -144px}.dropup,.dropdown{position:relative}.dropdown-toggle{*margin-bottom:-3px}.dropdown-toggle:active,.open .dropdown-toggle{outline:0}.caret{display:inline-block;width:0;height:0;vertical-align:top;border-top:4px solid #000;border-right:4px solid transparent;border-left:4px solid transparent;content:""}.dropdown .caret{margin-top:8px;margin-left:2px}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;list-style:none;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.2);*border-right-width:2px;*border-bottom-width:2px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,0.2);-moz-box-shadow:0 5px 10px rgba(0,0,0,0.2);box-shadow:0 5px 10px rgba(0,0,0,0.2);-webkit-background-clip:padding-box;-moz-background-clip:padding;background-clip:padding-box}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{*width:100%;height:1px;margin:9px 1px;*margin:-5px 0 5px;overflow:hidden;background-color:#e5e5e5;border-bottom:1px solid #fff}.dropdown-menu li>a{display:block;padding:3px 20px;clear:both;font-weight:normal;line-height:20px;color:#333;white-space:nowrap}.dropdown-menu li>a:hover,.dropdown-menu li>a:focus,.dropdown-submenu:hover>a{color:#fff;text-decoration:none;background-color:#0081c2;background-image:-moz-linear-gradient(top,#08c,#0077b3);background-image:-webkit-gradient(linear,0 0,0 100%,from(#08c),to(#0077b3));background-image:-webkit-linear-gradient(top,#08c,#0077b3);background-image:-o-linear-gradient(top,#08c,#0077b3);background-image:linear-gradient(to bottom,#08c,#0077b3);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc',endColorstr='#ff0077b3',GradientType=0)}.dropdown-menu .active>a,.dropdown-menu .active>a:hover{color:#333;text-decoration:none;background-color:#0081c2;background-image:-moz-linear-gradient(top,#08c,#0077b3);background-image:-webkit-gradient(linear,0 0,0 100%,from(#08c),to(#0077b3));background-image:-webkit-linear-gradient(top,#08c,#0077b3);background-image:-o-linear-gradient(top,#08c,#0077b3);background-image:linear-gradient(to bottom,#08c,#0077b3);background-repeat:repeat-x;outline:0;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc',endColorstr='#ff0077b3',GradientType=0)}.dropdown-menu .disabled>a,.dropdown-menu .disabled>a:hover{color:#999}.dropdown-menu .disabled>a:hover{text-decoration:none;cursor:default;background-color:transparent;background-image:none}.open{*z-index:1000}.open>.dropdown-menu{display:block}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{border-top:0;border-bottom:4px solid #000;content:""}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:1px}.dropdown-submenu{position:relative}.dropdown-submenu>.dropdown-menu{top:0;left:100%;margin-top:-6px;margin-left:-1px;-webkit-border-radius:0 6px 6px 6px;-moz-border-radius:0 6px 6px 6px;border-radius:0 6px 6px 6px}.dropdown-submenu:hover>.dropdown-menu{display:block}.dropup .dropdown-submenu>.dropdown-menu{top:auto;bottom:0;margin-top:0;margin-bottom:-2px;-webkit-border-radius:5px 5px 5px 0;-moz-border-radius:5px 5px 5px 0;border-radius:5px 5px 5px 0}.dropdown-submenu>a:after{display:block;float:right;width:0;height:0;margin-top:5px;margin-right:-10px;border-color:transparent;border-left-color:#ccc;border-style:solid;border-width:5px 0 5px 5px;content:" "}.dropdown-submenu:hover>a:after{border-left-color:#fff}.dropdown-submenu.pull-left{float:none}.dropdown-submenu.pull-left>.dropdown-menu{left:-100%;margin-left:10px;-webkit-border-radius:6px 0 6px 6px;-moz-border-radius:6px 0 6px 6px;border-radius:6px 0 6px 6px}.dropdown .dropdown-menu .nav-header{padding-right:20px;padding-left:20px}.typeahead{margin-top:2px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.05);box-shadow:inset 0 1px 1px rgba(0,0,0,0.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,0.15)}.well-large{padding:24px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.well-small{padding:9px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.fade{opacity:0;-webkit-transition:opacity .15s linear;-moz-transition:opacity .15s linear;-o-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{position:relative;height:0;overflow:hidden;-webkit-transition:height .35s ease;-moz-transition:height .35s ease;-o-transition:height .35s ease;transition:height .35s ease}.collapse.in{height:auto}.close{float:right;font-size:20px;font-weight:bold;line-height:20px;color:#000;text-shadow:0 1px 0 #fff;opacity:.2;filter:alpha(opacity=20)}.close:hover{color:#000;text-decoration:none;cursor:pointer;opacity:.4;filter:alpha(opacity=40)}button.close{padding:0;cursor:pointer;background:transparent;border:0;-webkit-appearance:none}.btn{display:inline-block;*display:inline;padding:4px 12px;margin-bottom:0;*margin-left:.3em;font-size:14px;line-height:20px;*line-height:20px;color:#333;text-align:center;text-shadow:0 1px 1px rgba(255,255,255,0.75);vertical-align:middle;cursor:pointer;background-color:#f5f5f5;*background-color:#e6e6e6;background-image:-moz-linear-gradient(top,#fff,#e6e6e6);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fff),to(#e6e6e6));background-image:-webkit-linear-gradient(top,#fff,#e6e6e6);background-image:-o-linear-gradient(top,#fff,#e6e6e6);background-image:linear-gradient(to bottom,#fff,#e6e6e6);background-repeat:repeat-x;border:1px solid #bbb;*border:0;border-color:#e6e6e6 #e6e6e6 #bfbfbf;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);border-bottom-color:#a2a2a2;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff',endColorstr='#ffe6e6e6',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);*zoom:1;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05)}.btn:hover,.btn:active,.btn.active,.btn.disabled,.btn[disabled]{color:#333;background-color:#e6e6e6;*background-color:#d9d9d9}.btn:active,.btn.active{background-color:#ccc \9}.btn:first-child{*margin-left:0}.btn:hover{color:#333;text-decoration:none;background-color:#e6e6e6;*background-color:#d9d9d9;background-position:0 -15px;-webkit-transition:background-position .1s linear;-moz-transition:background-position .1s linear;-o-transition:background-position .1s linear;transition:background-position .1s linear}.btn:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn.active,.btn:active{background-color:#e6e6e6;background-color:#d9d9d9 \9;background-image:none;outline:0;-webkit-box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05);box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05)}.btn.disabled,.btn[disabled]{cursor:default;background-color:#e6e6e6;background-image:none;opacity:.65;filter:alpha(opacity=65);-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.btn-large{padding:11px 19px;font-size:17.5px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.btn-large [class^="icon-"],.btn-large [class*=" icon-"]{margin-top:2px}.btn-small{padding:2px 10px;font-size:11.9px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.btn-small [class^="icon-"],.btn-small [class*=" icon-"]{margin-top:0}.btn-mini{padding:1px 6px;font-size:10.5px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.btn-block{display:block;width:100%;padding-right:0;padding-left:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.btn-block+.btn-block{margin-top:5px}input[type="submit"].btn-block,input[type="reset"].btn-block,input[type="button"].btn-block{width:100%}.btn-primary.active,.btn-warning.active,.btn-danger.active,.btn-success.active,.btn-info.active,.btn-inverse.active{color:rgba(255,255,255,0.75)}.btn{border-color:#c5c5c5;border-color:rgba(0,0,0,0.15) rgba(0,0,0,0.15) rgba(0,0,0,0.25)}.btn-primary{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#006dcc;*background-color:#04c;background-image:-moz-linear-gradient(top,#08c,#04c);background-image:-webkit-gradient(linear,0 0,0 100%,from(#08c),to(#04c));background-image:-webkit-linear-gradient(top,#08c,#04c);background-image:-o-linear-gradient(top,#08c,#04c);background-image:linear-gradient(to bottom,#08c,#04c);background-repeat:repeat-x;border-color:#04c #04c #002a80;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc',endColorstr='#ff0044cc',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-primary:hover,.btn-primary:active,.btn-primary.active,.btn-primary.disabled,.btn-primary[disabled]{color:#fff;background-color:#04c;*background-color:#003bb3}.btn-primary:active,.btn-primary.active{background-color:#039 \9}.btn-warning{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#faa732;*background-color:#f89406;background-image:-moz-linear-gradient(top,#fbb450,#f89406);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fbb450),to(#f89406));background-image:-webkit-linear-gradient(top,#fbb450,#f89406);background-image:-o-linear-gradient(top,#fbb450,#f89406);background-image:linear-gradient(to bottom,#fbb450,#f89406);background-repeat:repeat-x;border-color:#f89406 #f89406 #ad6704;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffbb450',endColorstr='#fff89406',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-warning:hover,.btn-warning:active,.btn-warning.active,.btn-warning.disabled,.btn-warning[disabled]{color:#fff;background-color:#f89406;*background-color:#df8505}.btn-warning:active,.btn-warning.active{background-color:#c67605 \9}.btn-danger{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#da4f49;*background-color:#bd362f;background-image:-moz-linear-gradient(top,#ee5f5b,#bd362f);background-image:-webkit-gradient(linear,0 0,0 100%,from(#ee5f5b),to(#bd362f));background-image:-webkit-linear-gradient(top,#ee5f5b,#bd362f);background-image:-o-linear-gradient(top,#ee5f5b,#bd362f);background-image:linear-gradient(to bottom,#ee5f5b,#bd362f);background-repeat:repeat-x;border-color:#bd362f #bd362f #802420;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffee5f5b',endColorstr='#ffbd362f',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-danger:hover,.btn-danger:active,.btn-danger.active,.btn-danger.disabled,.btn-danger[disabled]{color:#fff;background-color:#bd362f;*background-color:#a9302a}.btn-danger:active,.btn-danger.active{background-color:#942a25 \9}.btn-success{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#5bb75b;*background-color:#51a351;background-image:-moz-linear-gradient(top,#62c462,#51a351);background-image:-webkit-gradient(linear,0 0,0 100%,from(#62c462),to(#51a351));background-image:-webkit-linear-gradient(top,#62c462,#51a351);background-image:-o-linear-gradient(top,#62c462,#51a351);background-image:linear-gradient(to bottom,#62c462,#51a351);background-repeat:repeat-x;border-color:#51a351 #51a351 #387038;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff62c462',endColorstr='#ff51a351',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-success:hover,.btn-success:active,.btn-success.active,.btn-success.disabled,.btn-success[disabled]{color:#fff;background-color:#51a351;*background-color:#499249}.btn-success:active,.btn-success.active{background-color:#408140 \9}.btn-info{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#49afcd;*background-color:#2f96b4;background-image:-moz-linear-gradient(top,#5bc0de,#2f96b4);background-image:-webkit-gradient(linear,0 0,0 100%,from(#5bc0de),to(#2f96b4));background-image:-webkit-linear-gradient(top,#5bc0de,#2f96b4);background-image:-o-linear-gradient(top,#5bc0de,#2f96b4);background-image:linear-gradient(to bottom,#5bc0de,#2f96b4);background-repeat:repeat-x;border-color:#2f96b4 #2f96b4 #1f6377;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de',endColorstr='#ff2f96b4',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-info:hover,.btn-info:active,.btn-info.active,.btn-info.disabled,.btn-info[disabled]{color:#fff;background-color:#2f96b4;*background-color:#2a85a0}.btn-info:active,.btn-info.active{background-color:#24748c \9}.btn-inverse{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#363636;*background-color:#222;background-image:-moz-linear-gradient(top,#444,#222);background-image:-webkit-gradient(linear,0 0,0 100%,from(#444),to(#222));background-image:-webkit-linear-gradient(top,#444,#222);background-image:-o-linear-gradient(top,#444,#222);background-image:linear-gradient(to bottom,#444,#222);background-repeat:repeat-x;border-color:#222 #222 #000;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff444444',endColorstr='#ff222222',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-inverse:hover,.btn-inverse:active,.btn-inverse.active,.btn-inverse.disabled,.btn-inverse[disabled]{color:#fff;background-color:#222;*background-color:#151515}.btn-inverse:active,.btn-inverse.active{background-color:#080808 \9}button.btn,input[type="submit"].btn{*padding-top:3px;*padding-bottom:3px}button.btn::-moz-focus-inner,input[type="submit"].btn::-moz-focus-inner{padding:0;border:0}button.btn.btn-large,input[type="submit"].btn.btn-large{*padding-top:7px;*padding-bottom:7px}button.btn.btn-small,input[type="submit"].btn.btn-small{*padding-top:3px;*padding-bottom:3px}button.btn.btn-mini,input[type="submit"].btn.btn-mini{*padding-top:1px;*padding-bottom:1px}.btn-link,.btn-link:active,.btn-link[disabled]{background-color:transparent;background-image:none;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.btn-link{color:#08c;cursor:pointer;border-color:transparent;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.btn-link:hover{color:#005580;text-decoration:underline;background-color:transparent}.btn-link[disabled]:hover{color:#333;text-decoration:none}.btn-group{position:relative;display:inline-block;*display:inline;*margin-left:.3em;font-size:0;white-space:nowrap;vertical-align:middle;*zoom:1}.btn-group:first-child{*margin-left:0}.btn-group+.btn-group{margin-left:5px}.btn-toolbar{margin-top:10px;margin-bottom:10px;font-size:0}.btn-toolbar .btn+.btn,.btn-toolbar .btn-group+.btn,.btn-toolbar .btn+.btn-group{margin-left:5px}.btn-group>.btn{position:relative;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.btn-group>.btn+.btn{margin-left:-1px}.btn-group>.btn,.btn-group>.dropdown-menu{font-size:14px}.btn-group>.btn-mini{font-size:11px}.btn-group>.btn-small{font-size:12px}.btn-group>.btn-large{font-size:16px}.btn-group>.btn:first-child{margin-left:0;-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px;-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-bottomleft:4px;-moz-border-radius-topleft:4px}.btn-group>.btn:last-child,.btn-group>.dropdown-toggle{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px;-moz-border-radius-topright:4px;-moz-border-radius-bottomright:4px}.btn-group>.btn.large:first-child{margin-left:0;-webkit-border-bottom-left-radius:6px;border-bottom-left-radius:6px;-webkit-border-top-left-radius:6px;border-top-left-radius:6px;-moz-border-radius-bottomleft:6px;-moz-border-radius-topleft:6px}.btn-group>.btn.large:last-child,.btn-group>.large.dropdown-toggle{-webkit-border-top-right-radius:6px;border-top-right-radius:6px;-webkit-border-bottom-right-radius:6px;border-bottom-right-radius:6px;-moz-border-radius-topright:6px;-moz-border-radius-bottomright:6px}.btn-group>.btn:hover,.btn-group>.btn:focus,.btn-group>.btn:active,.btn-group>.btn.active{z-index:2}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{*padding-top:5px;padding-right:8px;*padding-bottom:5px;padding-left:8px;-webkit-box-shadow:inset 1px 0 0 rgba(255,255,255,0.125),inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:inset 1px 0 0 rgba(255,255,255,0.125),inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);box-shadow:inset 1px 0 0 rgba(255,255,255,0.125),inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05)}.btn-group>.btn-mini+.dropdown-toggle{*padding-top:2px;padding-right:5px;*padding-bottom:2px;padding-left:5px}.btn-group>.btn-small+.dropdown-toggle{*padding-top:5px;*padding-bottom:4px}.btn-group>.btn-large+.dropdown-toggle{*padding-top:7px;padding-right:12px;*padding-bottom:7px;padding-left:12px}.btn-group.open .dropdown-toggle{background-image:none;-webkit-box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05);box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05)}.btn-group.open .btn.dropdown-toggle{background-color:#e6e6e6}.btn-group.open .btn-primary.dropdown-toggle{background-color:#04c}.btn-group.open .btn-warning.dropdown-toggle{background-color:#f89406}.btn-group.open .btn-danger.dropdown-toggle{background-color:#bd362f}.btn-group.open .btn-success.dropdown-toggle{background-color:#51a351}.btn-group.open .btn-info.dropdown-toggle{background-color:#2f96b4}.btn-group.open .btn-inverse.dropdown-toggle{background-color:#222}.btn .caret{margin-top:8px;margin-left:0}.btn-mini .caret,.btn-small .caret,.btn-large .caret{margin-top:6px}.btn-large .caret{border-top-width:5px;border-right-width:5px;border-left-width:5px}.dropup .btn-large .caret{border-bottom-width:5px}.btn-primary .caret,.btn-warning .caret,.btn-danger .caret,.btn-info .caret,.btn-success .caret,.btn-inverse .caret{border-top-color:#fff;border-bottom-color:#fff}.btn-group-vertical{display:inline-block;*display:inline;*zoom:1}.btn-group-vertical .btn{display:block;float:none;width:100%;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.btn-group-vertical .btn+.btn{margin-top:-1px;margin-left:0}.btn-group-vertical .btn:first-child{-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0}.btn-group-vertical .btn:last-child{-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px}.btn-group-vertical .btn-large:first-child{-webkit-border-radius:6px 6px 0 0;-moz-border-radius:6px 6px 0 0;border-radius:6px 6px 0 0}.btn-group-vertical .btn-large:last-child{-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px}.alert{padding:8px 35px 8px 14px;margin-bottom:20px;color:#c09853;text-shadow:0 1px 0 rgba(255,255,255,0.5);background-color:#fcf8e3;border:1px solid #fbeed5;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.alert h4{margin:0}.alert .close{position:relative;top:-2px;right:-21px;line-height:20px}.alert-success{color:#468847;background-color:#dff0d8;border-color:#d6e9c6}.alert-danger,.alert-error{color:#b94a48;background-color:#f2dede;border-color:#eed3d7}.alert-info{color:#3a87ad;background-color:#d9edf7;border-color:#bce8f1}.alert-block{padding-top:14px;padding-bottom:14px}.alert-block>p,.alert-block>ul{margin-bottom:0}.alert-block p+p{margin-top:5px}.nav{margin-bottom:20px;margin-left:0;list-style:none}.nav>li>a{display:block}.nav>li>a:hover{text-decoration:none;background-color:#eee}.nav>.pull-right{float:right}.nav-header{display:block;padding:3px 15px;font-size:11px;font-weight:bold;line-height:20px;color:#999;text-shadow:0 1px 0 rgba(255,255,255,0.5);text-transform:uppercase}.nav li+.nav-header{margin-top:9px}.nav-list{padding-right:15px;padding-left:15px;margin-bottom:0}.nav-list>li>a,.nav-list .nav-header{margin-right:-15px;margin-left:-15px;text-shadow:0 1px 0 rgba(255,255,255,0.5)}.nav-list>li>a{padding:3px 15px}.nav-list>.active>a,.nav-list>.active>a:hover{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.2);background-color:#08c}.nav-list [class^="icon-"],.nav-list [class*=" icon-"]{margin-right:2px}.nav-list .divider{*width:100%;height:1px;margin:9px 1px;*margin:-5px 0 5px;overflow:hidden;background-color:#e5e5e5;border-bottom:1px solid #fff}.nav-tabs,.nav-pills{*zoom:1}.nav-tabs:before,.nav-pills:before,.nav-tabs:after,.nav-pills:after{display:table;line-height:0;content:""}.nav-tabs:after,.nav-pills:after{clear:both}.nav-tabs>li,.nav-pills>li{float:left}.nav-tabs>li>a,.nav-pills>li>a{padding-right:12px;padding-left:12px;margin-right:2px;line-height:14px}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{margin-bottom:-1px}.nav-tabs>li>a{padding-top:8px;padding-bottom:8px;line-height:20px;border:1px solid transparent;-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover{border-color:#eee #eee #ddd}.nav-tabs>.active>a,.nav-tabs>.active>a:hover{color:#555;cursor:default;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent}.nav-pills>li>a{padding-top:8px;padding-bottom:8px;margin-top:2px;margin-bottom:2px;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}.nav-pills>.active>a,.nav-pills>.active>a:hover{color:#fff;background-color:#08c}.nav-stacked>li{float:none}.nav-stacked>li>a{margin-right:0}.nav-tabs.nav-stacked{border-bottom:0}.nav-tabs.nav-stacked>li>a{border:1px solid #ddd;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.nav-tabs.nav-stacked>li:first-child>a{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-topright:4px;-moz-border-radius-topleft:4px}.nav-tabs.nav-stacked>li:last-child>a{-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px;-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px;-moz-border-radius-bottomright:4px;-moz-border-radius-bottomleft:4px}.nav-tabs.nav-stacked>li>a:hover{z-index:2;border-color:#ddd}.nav-pills.nav-stacked>li>a{margin-bottom:3px}.nav-pills.nav-stacked>li:last-child>a{margin-bottom:1px}.nav-tabs .dropdown-menu{-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px}.nav-pills .dropdown-menu{-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.nav .dropdown-toggle .caret{margin-top:6px;border-top-color:#08c;border-bottom-color:#08c}.nav .dropdown-toggle:hover .caret{border-top-color:#005580;border-bottom-color:#005580}.nav-tabs .dropdown-toggle .caret{margin-top:8px}.nav .active .dropdown-toggle .caret{border-top-color:#fff;border-bottom-color:#fff}.nav-tabs .active .dropdown-toggle .caret{border-top-color:#555;border-bottom-color:#555}.nav>.dropdown.active>a:hover{cursor:pointer}.nav-tabs .open .dropdown-toggle,.nav-pills .open .dropdown-toggle,.nav>li.dropdown.open.active>a:hover{color:#fff;background-color:#999;border-color:#999}.nav li.dropdown.open .caret,.nav li.dropdown.open.active .caret,.nav li.dropdown.open a:hover .caret{border-top-color:#fff;border-bottom-color:#fff;opacity:1;filter:alpha(opacity=100)}.tabs-stacked .open>a:hover{border-color:#999}.tabbable{*zoom:1}.tabbable:before,.tabbable:after{display:table;line-height:0;content:""}.tabbable:after{clear:both}.tab-content{overflow:auto}.tabs-below>.nav-tabs,.tabs-right>.nav-tabs,.tabs-left>.nav-tabs{border-bottom:0}.tab-content>.tab-pane,.pill-content>.pill-pane{display:none}.tab-content>.active,.pill-content>.active{display:block}.tabs-below>.nav-tabs{border-top:1px solid #ddd}.tabs-below>.nav-tabs>li{margin-top:-1px;margin-bottom:0}.tabs-below>.nav-tabs>li>a{-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px}.tabs-below>.nav-tabs>li>a:hover{border-top-color:#ddd;border-bottom-color:transparent}.tabs-below>.nav-tabs>.active>a,.tabs-below>.nav-tabs>.active>a:hover{border-color:transparent #ddd #ddd #ddd}.tabs-left>.nav-tabs>li,.tabs-right>.nav-tabs>li{float:none}.tabs-left>.nav-tabs>li>a,.tabs-right>.nav-tabs>li>a{min-width:74px;margin-right:0;margin-bottom:3px}.tabs-left>.nav-tabs{float:left;margin-right:19px;border-right:1px solid #ddd}.tabs-left>.nav-tabs>li>a{margin-right:-1px;-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px}.tabs-left>.nav-tabs>li>a:hover{border-color:#eee #ddd #eee #eee}.tabs-left>.nav-tabs .active>a,.tabs-left>.nav-tabs .active>a:hover{border-color:#ddd transparent #ddd #ddd;*border-right-color:#fff}.tabs-right>.nav-tabs{float:right;margin-left:19px;border-left:1px solid #ddd}.tabs-right>.nav-tabs>li>a{margin-left:-1px;-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.tabs-right>.nav-tabs>li>a:hover{border-color:#eee #eee #eee #ddd}.tabs-right>.nav-tabs .active>a,.tabs-right>.nav-tabs .active>a:hover{border-color:#ddd #ddd #ddd transparent;*border-left-color:#fff}.nav>.disabled>a{color:#999}.nav>.disabled>a:hover{text-decoration:none;cursor:default;background-color:transparent}.navbar{*position:relative;*z-index:2;margin-bottom:20px;overflow:visible;color:#777}.navbar-inner{min-height:40px;padding-right:20px;padding-left:20px;background-color:#fafafa;background-image:-moz-linear-gradient(top,#fff,#f2f2f2);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fff),to(#f2f2f2));background-image:-webkit-linear-gradient(top,#fff,#f2f2f2);background-image:-o-linear-gradient(top,#fff,#f2f2f2);background-image:linear-gradient(to bottom,#fff,#f2f2f2);background-repeat:repeat-x;border:1px solid #d4d4d4;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff',endColorstr='#fff2f2f2',GradientType=0);*zoom:1;-webkit-box-shadow:0 1px 4px rgba(0,0,0,0.065);-moz-box-shadow:0 1px 4px rgba(0,0,0,0.065);box-shadow:0 1px 4px rgba(0,0,0,0.065)}.navbar-inner:before,.navbar-inner:after{display:table;line-height:0;content:""}.navbar-inner:after{clear:both}.navbar .container{width:auto}.nav-collapse.collapse{height:auto;overflow:visible}.navbar .brand{display:block;float:left;padding:10px 20px 10px;margin-left:-20px;font-size:20px;font-weight:200;color:#777;text-shadow:0 1px 0 #fff}.navbar .brand:hover{text-decoration:none}.navbar-text{margin-bottom:0;line-height:40px}.navbar-link{color:#777}.navbar-link:hover{color:#333}.navbar .divider-vertical{height:40px;margin:0 9px;border-right:1px solid #fff;border-left:1px solid #f2f2f2}.navbar .btn,.navbar .btn-group{margin-top:5px}.navbar .btn-group .btn,.navbar .input-prepend .btn,.navbar .input-append .btn{margin-top:0}.navbar-form{margin-bottom:0;*zoom:1}.navbar-form:before,.navbar-form:after{display:table;line-height:0;content:""}.navbar-form:after{clear:both}.navbar-form input,.navbar-form select,.navbar-form .radio,.navbar-form .checkbox{margin-top:5px}.navbar-form input,.navbar-form select,.navbar-form .btn{display:inline-block;margin-bottom:0}.navbar-form input[type="image"],.navbar-form input[type="checkbox"],.navbar-form input[type="radio"]{margin-top:3px}.navbar-form .input-append,.navbar-form .input-prepend{margin-top:6px;white-space:nowrap}.navbar-form .input-append input,.navbar-form .input-prepend input{margin-top:0}.navbar-search{position:relative;float:left;margin-top:5px;margin-bottom:0}.navbar-search .search-query{padding:4px 14px;margin-bottom:0;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;font-weight:normal;line-height:1;-webkit-border-radius:15px;-moz-border-radius:15px;border-radius:15px}.navbar-static-top{position:static;margin-bottom:0}.navbar-static-top .navbar-inner{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.navbar-fixed-top,.navbar-fixed-bottom{position:fixed;right:0;left:0;z-index:1030;margin-bottom:0}.navbar-fixed-top .navbar-inner,.navbar-static-top .navbar-inner{border-width:0 0 1px}.navbar-fixed-bottom .navbar-inner{border-width:1px 0 0}.navbar-fixed-top .navbar-inner,.navbar-fixed-bottom .navbar-inner{padding-right:0;padding-left:0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.navbar-static-top .container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:940px}.navbar-fixed-top{top:0}.navbar-fixed-top .navbar-inner,.navbar-static-top .navbar-inner{-webkit-box-shadow:0 1px 10px rgba(0,0,0,0.1);-moz-box-shadow:0 1px 10px rgba(0,0,0,0.1);box-shadow:0 1px 10px rgba(0,0,0,0.1)}.navbar-fixed-bottom{bottom:0}.navbar-fixed-bottom .navbar-inner{-webkit-box-shadow:0 -1px 10px rgba(0,0,0,0.1);-moz-box-shadow:0 -1px 10px rgba(0,0,0,0.1);box-shadow:0 -1px 10px rgba(0,0,0,0.1)}.navbar .nav{position:relative;left:0;display:block;float:left;margin:0 10px 0 0}.navbar .nav.pull-right{float:right;margin-right:0}.navbar .nav>li{float:left}.navbar .nav>li>a{float:none;padding:10px 15px 10px;color:#777;text-decoration:none;text-shadow:0 1px 0 #fff}.navbar .nav .dropdown-toggle .caret{margin-top:8px}.navbar .nav>li>a:focus,.navbar .nav>li>a:hover{color:#333;text-decoration:none;background-color:transparent}.navbar .nav>.active>a,.navbar .nav>.active>a:hover,.navbar .nav>.active>a:focus{color:#555;text-decoration:none;background-color:#e5e5e5;-webkit-box-shadow:inset 0 3px 8px rgba(0,0,0,0.125);-moz-box-shadow:inset 0 3px 8px rgba(0,0,0,0.125);box-shadow:inset 0 3px 8px rgba(0,0,0,0.125)}.navbar .btn-navbar{display:none;float:right;padding:7px 10px;margin-right:5px;margin-left:5px;color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#ededed;*background-color:#e5e5e5;background-image:-moz-linear-gradient(top,#f2f2f2,#e5e5e5);background-image:-webkit-gradient(linear,0 0,0 100%,from(#f2f2f2),to(#e5e5e5));background-image:-webkit-linear-gradient(top,#f2f2f2,#e5e5e5);background-image:-o-linear-gradient(top,#f2f2f2,#e5e5e5);background-image:linear-gradient(to bottom,#f2f2f2,#e5e5e5);background-repeat:repeat-x;border-color:#e5e5e5 #e5e5e5 #bfbfbf;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2f2f2',endColorstr='#ffe5e5e5',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.075);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.075);box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.075)}.navbar .btn-navbar:hover,.navbar .btn-navbar:active,.navbar .btn-navbar.active,.navbar .btn-navbar.disabled,.navbar .btn-navbar[disabled]{color:#fff;background-color:#e5e5e5;*background-color:#d9d9d9}.navbar .btn-navbar:active,.navbar .btn-navbar.active{background-color:#ccc \9}.navbar .btn-navbar .icon-bar{display:block;width:18px;height:2px;background-color:#f5f5f5;-webkit-border-radius:1px;-moz-border-radius:1px;border-radius:1px;-webkit-box-shadow:0 1px 0 rgba(0,0,0,0.25);-moz-box-shadow:0 1px 0 rgba(0,0,0,0.25);box-shadow:0 1px 0 rgba(0,0,0,0.25)}.btn-navbar .icon-bar+.icon-bar{margin-top:3px}.navbar .nav>li>.dropdown-menu:before{position:absolute;top:-7px;left:9px;display:inline-block;border-right:7px solid transparent;border-bottom:7px solid #ccc;border-left:7px solid transparent;border-bottom-color:rgba(0,0,0,0.2);content:''}.navbar .nav>li>.dropdown-menu:after{position:absolute;top:-6px;left:10px;display:inline-block;border-right:6px solid transparent;border-bottom:6px solid #fff;border-left:6px solid transparent;content:''}.navbar-fixed-bottom .nav>li>.dropdown-menu:before{top:auto;bottom:-7px;border-top:7px solid #ccc;border-bottom:0;border-top-color:rgba(0,0,0,0.2)}.navbar-fixed-bottom .nav>li>.dropdown-menu:after{top:auto;bottom:-6px;border-top:6px solid #fff;border-bottom:0}.navbar .nav li.dropdown.open>.dropdown-toggle,.navbar .nav li.dropdown.active>.dropdown-toggle,.navbar .nav li.dropdown.open.active>.dropdown-toggle{color:#555;background-color:#e5e5e5}.navbar .nav li.dropdown>.dropdown-toggle .caret{border-top-color:#777;border-bottom-color:#777}.navbar .nav li.dropdown.open>.dropdown-toggle .caret,.navbar .nav li.dropdown.active>.dropdown-toggle .caret,.navbar .nav li.dropdown.open.active>.dropdown-toggle .caret{border-top-color:#555;border-bottom-color:#555}.navbar .pull-right>li>.dropdown-menu,.navbar .nav>li>.dropdown-menu.pull-right{right:0;left:auto}.navbar .pull-right>li>.dropdown-menu:before,.navbar .nav>li>.dropdown-menu.pull-right:before{right:12px;left:auto}.navbar .pull-right>li>.dropdown-menu:after,.navbar .nav>li>.dropdown-menu.pull-right:after{right:13px;left:auto}.navbar .pull-right>li>.dropdown-menu .dropdown-menu,.navbar .nav>li>.dropdown-menu.pull-right .dropdown-menu{right:100%;left:auto;margin-right:-1px;margin-left:0;-webkit-border-radius:6px 0 6px 6px;-moz-border-radius:6px 0 6px 6px;border-radius:6px 0 6px 6px}.navbar-inverse{color:#999}.navbar-inverse .navbar-inner{background-color:#1b1b1b;background-image:-moz-linear-gradient(top,#222,#111);background-image:-webkit-gradient(linear,0 0,0 100%,from(#222),to(#111));background-image:-webkit-linear-gradient(top,#222,#111);background-image:-o-linear-gradient(top,#222,#111);background-image:linear-gradient(to bottom,#222,#111);background-repeat:repeat-x;border-color:#252525;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff222222',endColorstr='#ff111111',GradientType=0)}.navbar-inverse .brand,.navbar-inverse .nav>li>a{color:#999;text-shadow:0 -1px 0 rgba(0,0,0,0.25)}.navbar-inverse .brand:hover,.navbar-inverse .nav>li>a:hover{color:#fff}.navbar-inverse .nav>li>a:focus,.navbar-inverse .nav>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .nav .active>a,.navbar-inverse .nav .active>a:hover,.navbar-inverse .nav .active>a:focus{color:#fff;background-color:#111}.navbar-inverse .navbar-link{color:#999}.navbar-inverse .navbar-link:hover{color:#fff}.navbar-inverse .divider-vertical{border-right-color:#222;border-left-color:#111}.navbar-inverse .nav li.dropdown.open>.dropdown-toggle,.navbar-inverse .nav li.dropdown.active>.dropdown-toggle,.navbar-inverse .nav li.dropdown.open.active>.dropdown-toggle{color:#fff;background-color:#111}.navbar-inverse .nav li.dropdown>.dropdown-toggle .caret{border-top-color:#999;border-bottom-color:#999}.navbar-inverse .nav li.dropdown.open>.dropdown-toggle .caret,.navbar-inverse .nav li.dropdown.active>.dropdown-toggle .caret,.navbar-inverse .nav li.dropdown.open.active>.dropdown-toggle .caret{border-top-color:#fff;border-bottom-color:#fff}.navbar-inverse .navbar-search .search-query{color:#fff;background-color:#515151;border-color:#111;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,0.1),0 1px 0 rgba(255,255,255,0.15);-moz-box-shadow:inset 0 1px 2px rgba(0,0,0,0.1),0 1px 0 rgba(255,255,255,0.15);box-shadow:inset 0 1px 2px rgba(0,0,0,0.1),0 1px 0 rgba(255,255,255,0.15);-webkit-transition:none;-moz-transition:none;-o-transition:none;transition:none}.navbar-inverse .navbar-search .search-query:-moz-placeholder{color:#ccc}.navbar-inverse .navbar-search .search-query:-ms-input-placeholder{color:#ccc}.navbar-inverse .navbar-search .search-query::-webkit-input-placeholder{color:#ccc}.navbar-inverse .navbar-search .search-query:focus,.navbar-inverse .navbar-search .search-query.focused{padding:5px 15px;color:#333;text-shadow:0 1px 0 #fff;background-color:#fff;border:0;outline:0;-webkit-box-shadow:0 0 3px rgba(0,0,0,0.15);-moz-box-shadow:0 0 3px rgba(0,0,0,0.15);box-shadow:0 0 3px rgba(0,0,0,0.15)}.navbar-inverse .btn-navbar{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#0e0e0e;*background-color:#040404;background-image:-moz-linear-gradient(top,#151515,#040404);background-image:-webkit-gradient(linear,0 0,0 100%,from(#151515),to(#040404));background-image:-webkit-linear-gradient(top,#151515,#040404);background-image:-o-linear-gradient(top,#151515,#040404);background-image:linear-gradient(to bottom,#151515,#040404);background-repeat:repeat-x;border-color:#040404 #040404 #000;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff151515',endColorstr='#ff040404',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.navbar-inverse .btn-navbar:hover,.navbar-inverse .btn-navbar:active,.navbar-inverse .btn-navbar.active,.navbar-inverse .btn-navbar.disabled,.navbar-inverse .btn-navbar[disabled]{color:#fff;background-color:#040404;*background-color:#000}.navbar-inverse .btn-navbar:active,.navbar-inverse .btn-navbar.active{background-color:#000 \9}.breadcrumb{padding:8px 15px;margin:0 0 20px;list-style:none;background-color:#f5f5f5;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.breadcrumb li{display:inline-block;*display:inline;text-shadow:0 1px 0 #fff;*zoom:1}.breadcrumb .divider{padding:0 5px;color:#ccc}.breadcrumb .active{color:#999}.pagination{margin:20px 0}.pagination ul{display:inline-block;*display:inline;margin-bottom:0;margin-left:0;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;*zoom:1;-webkit-box-shadow:0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:0 1px 2px rgba(0,0,0,0.05);box-shadow:0 1px 2px rgba(0,0,0,0.05)}.pagination ul>li{display:inline}.pagination ul>li>a,.pagination ul>li>span{float:left;padding:4px 12px;line-height:20px;text-decoration:none;background-color:#fff;border:1px solid #ddd;border-left-width:0}.pagination ul>li>a:hover,.pagination ul>.active>a,.pagination ul>.active>span{background-color:#f5f5f5}.pagination ul>.active>a,.pagination ul>.active>span{color:#999;cursor:default}.pagination ul>.disabled>span,.pagination ul>.disabled>a,.pagination ul>.disabled>a:hover{color:#999;cursor:default;background-color:transparent}.pagination ul>li:first-child>a,.pagination ul>li:first-child>span{border-left-width:1px;-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px;-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-bottomleft:4px;-moz-border-radius-topleft:4px}.pagination ul>li:last-child>a,.pagination ul>li:last-child>span{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px;-moz-border-radius-topright:4px;-moz-border-radius-bottomright:4px}.pagination-centered{text-align:center}.pagination-right{text-align:right}.pagination-large ul>li>a,.pagination-large ul>li>span{padding:11px 19px;font-size:17.5px}.pagination-large ul>li:first-child>a,.pagination-large ul>li:first-child>span{-webkit-border-bottom-left-radius:6px;border-bottom-left-radius:6px;-webkit-border-top-left-radius:6px;border-top-left-radius:6px;-moz-border-radius-bottomleft:6px;-moz-border-radius-topleft:6px}.pagination-large ul>li:last-child>a,.pagination-large ul>li:last-child>span{-webkit-border-top-right-radius:6px;border-top-right-radius:6px;-webkit-border-bottom-right-radius:6px;border-bottom-right-radius:6px;-moz-border-radius-topright:6px;-moz-border-radius-bottomright:6px}.pagination-mini ul>li:first-child>a,.pagination-small ul>li:first-child>a,.pagination-mini ul>li:first-child>span,.pagination-small ul>li:first-child>span{-webkit-border-bottom-left-radius:3px;border-bottom-left-radius:3px;-webkit-border-top-left-radius:3px;border-top-left-radius:3px;-moz-border-radius-bottomleft:3px;-moz-border-radius-topleft:3px}.pagination-mini ul>li:last-child>a,.pagination-small ul>li:last-child>a,.pagination-mini ul>li:last-child>span,.pagination-small ul>li:last-child>span{-webkit-border-top-right-radius:3px;border-top-right-radius:3px;-webkit-border-bottom-right-radius:3px;border-bottom-right-radius:3px;-moz-border-radius-topright:3px;-moz-border-radius-bottomright:3px}.pagination-small ul>li>a,.pagination-small ul>li>span{padding:2px 10px;font-size:11.9px}.pagination-mini ul>li>a,.pagination-mini ul>li>span{padding:1px 6px;font-size:10.5px}.pager{margin:20px 0;text-align:center;list-style:none;*zoom:1}.pager:before,.pager:after{display:table;line-height:0;content:""}.pager:after{clear:both}.pager li{display:inline}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;-webkit-border-radius:15px;-moz-border-radius:15px;border-radius:15px}.pager li>a:hover{text-decoration:none;background-color:#f5f5f5}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:hover,.pager .disabled>span{color:#999;cursor:default;background-color:#fff}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000}.modal-backdrop.fade{opacity:0}.modal-backdrop,.modal-backdrop.fade.in{opacity:.8;filter:alpha(opacity=80)}.modal{position:fixed;top:50%;left:50%;z-index:1050;width:560px;margin:-250px 0 0 -280px;background-color:#fff;border:1px solid #999;border:1px solid rgba(0,0,0,0.3);*border:1px solid #999;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;outline:0;-webkit-box-shadow:0 3px 7px rgba(0,0,0,0.3);-moz-box-shadow:0 3px 7px rgba(0,0,0,0.3);box-shadow:0 3px 7px rgba(0,0,0,0.3);-webkit-background-clip:padding-box;-moz-background-clip:padding-box;background-clip:padding-box}.modal.fade{top:-25%;-webkit-transition:opacity .3s linear,top .3s ease-out;-moz-transition:opacity .3s linear,top .3s ease-out;-o-transition:opacity .3s linear,top .3s ease-out;transition:opacity .3s linear,top .3s ease-out}.modal.fade.in{top:50%}.modal-header{padding:9px 15px;border-bottom:1px solid #eee}.modal-header .close{margin-top:2px}.modal-header h3{margin:0;line-height:30px}.modal-body{max-height:400px;padding:15px;overflow-y:auto}.modal-form{margin-bottom:0}.modal-footer{padding:14px 15px 15px;margin-bottom:0;text-align:right;background-color:#f5f5f5;border-top:1px solid #ddd;-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px;*zoom:1;-webkit-box-shadow:inset 0 1px 0 #fff;-moz-box-shadow:inset 0 1px 0 #fff;box-shadow:inset 0 1px 0 #fff}.modal-footer:before,.modal-footer:after{display:table;line-height:0;content:""}.modal-footer:after{clear:both}.modal-footer .btn+.btn{margin-bottom:0;margin-left:5px}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}.tooltip{position:absolute;z-index:1030;display:block;padding:5px;font-size:11px;opacity:0;filter:alpha(opacity=0);visibility:visible}.tooltip.in{opacity:.8;filter:alpha(opacity=80)}.tooltip.top{margin-top:-3px}.tooltip.right{margin-left:3px}.tooltip.bottom{margin-top:3px}.tooltip.left{margin-left:-3px}.tooltip-inner{max-width:200px;padding:3px 8px;color:#fff;text-align:center;text-decoration:none;background-color:#000;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-top-color:#000;border-width:5px 5px 0}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-right-color:#000;border-width:5px 5px 5px 0}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-left-color:#000;border-width:5px 0 5px 5px}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-bottom-color:#000;border-width:0 5px 5px}.popover{position:absolute;top:0;left:0;z-index:1010;display:none;width:236px;padding:1px;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.2);-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,0.2);-moz-box-shadow:0 5px 10px rgba(0,0,0,0.2);box-shadow:0 5px 10px rgba(0,0,0,0.2);-webkit-background-clip:padding-box;-moz-background-clip:padding;background-clip:padding-box}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{padding:8px 14px;margin:0;font-size:14px;font-weight:normal;line-height:18px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;-webkit-border-radius:5px 5px 0 0;-moz-border-radius:5px 5px 0 0;border-radius:5px 5px 0 0}.popover-content{padding:9px 14px}.popover-content p,.popover-content ul,.popover-content ol{margin-bottom:0}.popover .arrow,.popover .arrow:after{position:absolute;display:inline-block;width:0;height:0;border-color:transparent;border-style:solid}.popover .arrow:after{z-index:-1;content:""}.popover.top .arrow{bottom:-10px;left:50%;margin-left:-10px;border-top-color:#fff;border-width:10px 10px 0}.popover.top .arrow:after{bottom:-1px;left:-11px;border-top-color:rgba(0,0,0,0.25);border-width:11px 11px 0}.popover.right .arrow{top:50%;left:-10px;margin-top:-10px;border-right-color:#fff;border-width:10px 10px 10px 0}.popover.right .arrow:after{bottom:-11px;left:-1px;border-right-color:rgba(0,0,0,0.25);border-width:11px 11px 11px 0}.popover.bottom .arrow{top:-10px;left:50%;margin-left:-10px;border-bottom-color:#fff;border-width:0 10px 10px}.popover.bottom .arrow:after{top:-1px;left:-11px;border-bottom-color:rgba(0,0,0,0.25);border-width:0 11px 11px}.popover.left .arrow{top:50%;right:-10px;margin-top:-10px;border-left-color:#fff;border-width:10px 0 10px 10px}.popover.left .arrow:after{right:-1px;bottom:-11px;border-left-color:rgba(0,0,0,0.25);border-width:11px 0 11px 11px}.thumbnails{margin-left:-20px;list-style:none;*zoom:1}.thumbnails:before,.thumbnails:after{display:table;line-height:0;content:""}.thumbnails:after{clear:both}.row-fluid .thumbnails{margin-left:0}.thumbnails>li{float:left;margin-bottom:20px;margin-left:20px}.thumbnail{display:block;padding:4px;line-height:20px;border:1px solid #ddd;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:0 1px 3px rgba(0,0,0,0.055);-moz-box-shadow:0 1px 3px rgba(0,0,0,0.055);box-shadow:0 1px 3px rgba(0,0,0,0.055);-webkit-transition:all .2s ease-in-out;-moz-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out}a.thumbnail:hover{border-color:#08c;-webkit-box-shadow:0 1px 4px rgba(0,105,214,0.25);-moz-box-shadow:0 1px 4px rgba(0,105,214,0.25);box-shadow:0 1px 4px rgba(0,105,214,0.25)}.thumbnail>img{display:block;max-width:100%;margin-right:auto;margin-left:auto}.thumbnail .caption{padding:9px;color:#555}.media,.media-body{overflow:hidden;*overflow:visible;zoom:1}.media,.media .media{margin-top:15px}.media:first-child{margin-top:0}.media-object{display:block}.media-heading{margin:0 0 5px}.media .pull-left{margin-right:10px}.media .pull-right{margin-left:10px}.media-list{margin-left:0;list-style:none}.label,.badge{display:inline-block;padding:2px 4px;font-size:11.844px;font-weight:bold;line-height:14px;color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);white-space:nowrap;vertical-align:baseline;background-color:#999}.label{-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.badge{padding-right:9px;padding-left:9px;-webkit-border-radius:9px;-moz-border-radius:9px;border-radius:9px}a.label:hover,a.badge:hover{color:#fff;text-decoration:none;cursor:pointer}.label-important,.badge-important{background-color:#b94a48}.label-important[href],.badge-important[href]{background-color:#953b39}.label-warning,.badge-warning{background-color:#f89406}.label-warning[href],.badge-warning[href]{background-color:#c67605}.label-success,.badge-success{background-color:#468847}.label-success[href],.badge-success[href]{background-color:#356635}.label-info,.badge-info{background-color:#3a87ad}.label-info[href],.badge-info[href]{background-color:#2d6987}.label-inverse,.badge-inverse{background-color:#333}.label-inverse[href],.badge-inverse[href]{background-color:#1a1a1a}.btn .label,.btn .badge{position:relative;top:-1px}.btn-mini .label,.btn-mini .badge{top:0}@-webkit-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-moz-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-ms-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-o-keyframes progress-bar-stripes{from{background-position:0 0}to{background-position:40px 0}}@keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}.progress{height:20px;margin-bottom:20px;overflow:hidden;background-color:#f7f7f7;background-image:-moz-linear-gradient(top,#f5f5f5,#f9f9f9);background-image:-webkit-gradient(linear,0 0,0 100%,from(#f5f5f5),to(#f9f9f9));background-image:-webkit-linear-gradient(top,#f5f5f5,#f9f9f9);background-image:-o-linear-gradient(top,#f5f5f5,#f9f9f9);background-image:linear-gradient(to bottom,#f5f5f5,#f9f9f9);background-repeat:repeat-x;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5',endColorstr='#fff9f9f9',GradientType=0);-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,0.1);-moz-box-shadow:inset 0 1px 2px rgba(0,0,0,0.1);box-shadow:inset 0 1px 2px rgba(0,0,0,0.1)}.progress .bar{float:left;width:0;height:100%;font-size:12px;color:#fff;text-align:center;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#0e90d2;background-image:-moz-linear-gradient(top,#149bdf,#0480be);background-image:-webkit-gradient(linear,0 0,0 100%,from(#149bdf),to(#0480be));background-image:-webkit-linear-gradient(top,#149bdf,#0480be);background-image:-o-linear-gradient(top,#149bdf,#0480be);background-image:linear-gradient(to bottom,#149bdf,#0480be);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff149bdf',endColorstr='#ff0480be',GradientType=0);-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,0.15);-moz-box-shadow:inset 0 -1px 0 rgba(0,0,0,0.15);box-shadow:inset 0 -1px 0 rgba(0,0,0,0.15);-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-transition:width .6s ease;-moz-transition:width .6s ease;-o-transition:width .6s ease;transition:width .6s ease}.progress .bar+.bar{-webkit-box-shadow:inset 1px 0 0 rgba(0,0,0,0.15),inset 0 -1px 0 rgba(0,0,0,0.15);-moz-box-shadow:inset 1px 0 0 rgba(0,0,0,0.15),inset 0 -1px 0 rgba(0,0,0,0.15);box-shadow:inset 1px 0 0 rgba(0,0,0,0.15),inset 0 -1px 0 rgba(0,0,0,0.15)}.progress-striped .bar{background-color:#149bdf;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,0.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,0.15)),color-stop(0.75,rgba(255,255,255,0.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);-webkit-background-size:40px 40px;-moz-background-size:40px 40px;-o-background-size:40px 40px;background-size:40px 40px}.progress.active .bar{-webkit-animation:progress-bar-stripes 2s linear infinite;-moz-animation:progress-bar-stripes 2s linear infinite;-ms-animation:progress-bar-stripes 2s linear infinite;-o-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress-danger .bar,.progress .bar-danger{background-color:#dd514c;background-image:-moz-linear-gradient(top,#ee5f5b,#c43c35);background-image:-webkit-gradient(linear,0 0,0 100%,from(#ee5f5b),to(#c43c35));background-image:-webkit-linear-gradient(top,#ee5f5b,#c43c35);background-image:-o-linear-gradient(top,#ee5f5b,#c43c35);background-image:linear-gradient(to bottom,#ee5f5b,#c43c35);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffee5f5b',endColorstr='#ffc43c35',GradientType=0)}.progress-danger.progress-striped .bar,.progress-striped .bar-danger{background-color:#ee5f5b;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,0.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,0.15)),color-stop(0.75,rgba(255,255,255,0.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent)}.progress-success .bar,.progress .bar-success{background-color:#5eb95e;background-image:-moz-linear-gradient(top,#62c462,#57a957);background-image:-webkit-gradient(linear,0 0,0 100%,from(#62c462),to(#57a957));background-image:-webkit-linear-gradient(top,#62c462,#57a957);background-image:-o-linear-gradient(top,#62c462,#57a957);background-image:linear-gradient(to bottom,#62c462,#57a957);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff62c462',endColorstr='#ff57a957',GradientType=0)}.progress-success.progress-striped .bar,.progress-striped .bar-success{background-color:#62c462;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,0.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,0.15)),color-stop(0.75,rgba(255,255,255,0.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent)}.progress-info .bar,.progress .bar-info{background-color:#4bb1cf;background-image:-moz-linear-gradient(top,#5bc0de,#339bb9);background-image:-webkit-gradient(linear,0 0,0 100%,from(#5bc0de),to(#339bb9));background-image:-webkit-linear-gradient(top,#5bc0de,#339bb9);background-image:-o-linear-gradient(top,#5bc0de,#339bb9);background-image:linear-gradient(to bottom,#5bc0de,#339bb9);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de',endColorstr='#ff339bb9',GradientType=0)}.progress-info.progress-striped .bar,.progress-striped .bar-info{background-color:#5bc0de;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,0.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,0.15)),color-stop(0.75,rgba(255,255,255,0.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent)}.progress-warning .bar,.progress .bar-warning{background-color:#faa732;background-image:-moz-linear-gradient(top,#fbb450,#f89406);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fbb450),to(#f89406));background-image:-webkit-linear-gradient(top,#fbb450,#f89406);background-image:-o-linear-gradient(top,#fbb450,#f89406);background-image:linear-gradient(to bottom,#fbb450,#f89406);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffbb450',endColorstr='#fff89406',GradientType=0)}.progress-warning.progress-striped .bar,.progress-striped .bar-warning{background-color:#fbb450;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,0.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,0.15)),color-stop(0.75,rgba(255,255,255,0.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent)}.accordion{margin-bottom:20px}.accordion-group{margin-bottom:2px;border:1px solid #e5e5e5;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.accordion-heading{border-bottom:0}.accordion-heading .accordion-toggle{display:block;padding:8px 15px}.accordion-toggle{cursor:pointer}.accordion-inner{padding:9px 15px;border-top:1px solid #e5e5e5}.carousel{position:relative;margin-bottom:20px;line-height:1}.carousel-inner{position:relative;width:100%;overflow:hidden}.carousel .item{position:relative;display:none;-webkit-transition:.6s ease-in-out left;-moz-transition:.6s ease-in-out left;-o-transition:.6s ease-in-out left;transition:.6s ease-in-out left}.carousel .item>img{display:block;line-height:1}.carousel .active,.carousel .next,.carousel .prev{display:block}.carousel .active{left:0}.carousel .next,.carousel .prev{position:absolute;top:0;width:100%}.carousel .next{left:100%}.carousel .prev{left:-100%}.carousel .next.left,.carousel .prev.right{left:0}.carousel .active.left{left:-100%}.carousel .active.right{left:100%}.carousel-control{position:absolute;top:40%;left:15px;width:40px;height:40px;margin-top:-20px;font-size:60px;font-weight:100;line-height:30px;color:#fff;text-align:center;background:#222;border:3px solid #fff;-webkit-border-radius:23px;-moz-border-radius:23px;border-radius:23px;opacity:.5;filter:alpha(opacity=50)}.carousel-control.right{right:15px;left:auto}.carousel-control:hover{color:#fff;text-decoration:none;opacity:.9;filter:alpha(opacity=90)}.carousel-caption{position:absolute;right:0;bottom:0;left:0;padding:15px;background:#333;background:rgba(0,0,0,0.75)}.carousel-caption h4,.carousel-caption p{line-height:20px;color:#fff}.carousel-caption h4{margin:0 0 5px}.carousel-caption p{margin-bottom:0}.hero-unit{padding:60px;margin-bottom:30px;font-size:18px;font-weight:200;line-height:30px;color:inherit;background-color:#eee;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.hero-unit h1{margin-bottom:0;font-size:60px;line-height:1;letter-spacing:-1px;color:inherit}.hero-unit li{line-height:30px}.pull-right{float:right}.pull-left{float:left}.hide{display:none}.show{display:block}.invisible{visibility:hidden}.affix{position:fixed}
diff --git a/src/site/resources/css/site.css b/src/site/resources/css/site.css
index 1e70f6c..472df16 100644
--- a/src/site/resources/css/site.css
+++ b/src/site/resources/css/site.css
@@ -13,5 +13,102 @@
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
-
 */
+
+div.clear { clear:both; visibility: hidden; }
+div.clear hr { display: none; }
+
+/* Tweaks to the bootstrap theme
+--------------------------------- */
+li { line-height: 20px; }
+tt { font: 12px Menlo, Monaco, "Courier New", monospace; -webkit-border-radius: 3px; -moz-border-radius: 3px; border-radius: 3px; padding: 3px 4px; background-color: #f7f7f9; border: 1px solid #e1e1e8; }
+tt, code { color: #4e648e }
+dt { margin: 15px 0 5px 0; font-size: 1.2em }
+
+.big-red { font-weight: bold; color: #D14 }
+.big-green { font-weight: bold; color: green }
+
+.layout-table { width: 100%; }
+.sidebar { width: 250px; vertical-align: top; }
+.content { padding-left: 20px; vertical-align: top; }
+
+.sidebar-nav { padding: 9px 0; }
+
+.logo-left { margin: 10px; float: left }
+.logo-right { margin: 5px; float: right; height: 100px }
+
+.navbar .nav { margin-left: 40px; }
+
+.nav-list { margin-bottom: 15px; }
+.nav-list li { line-height: 16px; }
+.nav-list li.nav-header { color: #333; }
+.nav-list li.nav-header i { margin-right: 5px; }
+
+.nav-list li a { background: no-repeat 16px 9px; padding-left: 34px; }
+.nav-list li.collapsed > a { background-image: url(../images/collapsed.gif) }
+.nav-list li.expanded > a { background-image: url(../images/expanded.gif) }
+
+.nav-list li.expanded ul { list-style: none; margin-left: 0; }
+.nav-list li.expanded li a { display: block; padding: 3px 15px 3px 45px; margin-left: -15px; margin-right: -15px; }
+.nav-list li.expanded li a:hover { text-decoration: none; background-color: #eee; }
+.nav-list li.expanded li.active a { background-color: #08C; color: white }
+
+.nav.nav-tabs { margin-bottom: 8px; }
+
+.content .section { margin-top: 20px; }
+.content .section:first-child { margin-top: 0; }
+.section h2 { margin-bottom: 10px; }
+.section h3 { margin-bottom: 10px; }
+.section h4 { margin-bottom: 10px; }
+
+.footer { background-color: whitesmoke; padding: 15px; margin-top: 15px; text-align: center; border-top: 1px solid #eee; }
+.footer p { font-size: 12px; margin: 0 }
+
+.table-not-wide { width: inherit;}
+.alert-heading { display: block; font-size: 14px; margin-bottom: 6px; font-weight: bold; }
+
+/* Pretty printing styles. Used with prettify.js.
+---------------------------------------------------- */
+.com { color: #93a1a1; }
+.lit { color: #195f91; }
+.pun, .opn, .clo { color: #93a1a1; }
+.fun { color: #dc322f; }
+.str, .atv { color: #D14; }
+.kwd, .linenums .tag { color: #1e347b; }
+.typ, .atn, .dec, .var { color: teal; }
+.pln { color: #48484c; }
+.prettyprint { padding: 8px; background-color: #f7f7f9; border: 1px solid #e1e1e8; }
+.prettyprint.linenums {
+  -webkit-box-shadow: inset 40px 0 0 #fbfbfc, inset 41px 0 0 #ececf0;
+     -moz-box-shadow: inset 40px 0 0 #fbfbfc, inset 41px 0 0 #ececf0;
+          box-shadow: inset 40px 0 0 #fbfbfc, inset 41px 0 0 #ececf0;
+}
+ol.linenums { margin: 0 0 0 33px; }
+ol.linenums li { padding-left: 12px; color: #bebec5; line-height: 18px; text-shadow: 0 1px 0 #fff; }
+
+/* Additional styles.
+-----------------------*/
+
+/* fixed width font links (e.g., to a JavaDoc page) */
+a.javadoc, a.javadoc:hover {
+    font: 12px Menlo, Monaco, "Courier New", monospace;
+}
+/* reset code links to same color as normal links */
+a.javadoc, a tt, a code {
+    color: #0088CC;
+}
+
+/* add film icons to youtube and vimeo links (.icon-film) */
+a[href^='https://www.youtube.com/']::before,
+a[href^='https://vimeo.com/']::before {
+    display: inline-block;
+    width: 14px;
+    height: 14px;
+    margin-top: 1px;
+    margin-right: .3em;
+    line-height: 14px;
+    vertical-align: text-top;
+    content: '';
+    /* .icon-film */
+    background: url("../img/glyphicons-halflings.png") no-repeat -192px 0;
+}
diff --git a/src/site/resources/images/collapsed.gif b/src/site/resources/images/collapsed.gif
new file mode 100644
index 0000000..6e71084
--- /dev/null
+++ b/src/site/resources/images/collapsed.gif
Binary files differ
diff --git a/src/site/resources/images/expanded.gif b/src/site/resources/images/expanded.gif
new file mode 100644
index 0000000..0fef3d8
--- /dev/null
+++ b/src/site/resources/images/expanded.gif
Binary files differ
diff --git a/src/site/resources/images/logos/logo.png b/src/site/resources/images/logos/logo.png
new file mode 100644
index 0000000..c2b4b71
--- /dev/null
+++ b/src/site/resources/images/logos/logo.png
Binary files differ
diff --git a/src/site/resources/images/logos/ls-logo.jpg b/src/site/resources/images/logos/ls-logo.jpg
new file mode 100644
index 0000000..35f2f47
--- /dev/null
+++ b/src/site/resources/images/logos/ls-logo.jpg
Binary files differ
diff --git a/src/site/resources/images/logos/maven-feather.png b/src/site/resources/images/logos/maven-feather.png
new file mode 100644
index 0000000..b5ada83
--- /dev/null
+++ b/src/site/resources/images/logos/maven-feather.png
Binary files differ
diff --git a/src/site/resources/images/ls-logo.jpg b/src/site/resources/images/ls-logo.jpg
deleted file mode 100755
index 611c5c3..0000000
--- a/src/site/resources/images/ls-logo.jpg
+++ /dev/null
Binary files differ
diff --git a/src/site/resources/js/bootstrap.js b/src/site/resources/js/bootstrap.js
new file mode 100644
index 0000000..7f303eb
--- /dev/null
+++ b/src/site/resources/js/bootstrap.js
@@ -0,0 +1,2027 @@
+/* ===================================================
+ * bootstrap-transition.js v2.1.0
+ * http://twitter.github.com/bootstrap/javascript.html#transitions
+ * ===================================================
+ * Copyright 2012 Twitter, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ========================================================== */
+
+
+!function ($) {
+
+  $(function () {
+
+    "use strict"; // jshint ;_;
+
+
+    /* CSS TRANSITION SUPPORT (http://www.modernizr.com/)
+     * ======================================================= */
+
+    $.support.transition = (function () {
+
+      var transitionEnd = (function () {
+
+        var el = document.createElement('bootstrap')
+          , transEndEventNames = {
+               'WebkitTransition' : 'webkitTransitionEnd'
+            ,  'MozTransition'    : 'transitionend'
+            ,  'OTransition'      : 'oTransitionEnd otransitionend'
+            ,  'transition'       : 'transitionend'
+            }
+          , name
+
+        for (name in transEndEventNames){
+          if (el.style[name] !== undefined) {
+            return transEndEventNames[name]
+          }
+        }
+
+      }())
+
+      return transitionEnd && {
+        end: transitionEnd
+      }
+
+    })()
+
+  })
+
+}(window.jQuery);/* ==========================================================
+ * bootstrap-alert.js v2.1.0
+ * http://twitter.github.com/bootstrap/javascript.html#alerts
+ * ==========================================================
+ * Copyright 2012 Twitter, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ========================================================== */
+
+
+!function ($) {
+
+  "use strict"; // jshint ;_;
+
+
+ /* ALERT CLASS DEFINITION
+  * ====================== */
+
+  var dismiss = '[data-dismiss="alert"]'
+    , Alert = function (el) {
+        $(el).on('click', dismiss, this.close)
+      }
+
+  Alert.prototype.close = function (e) {
+    var $this = $(this)
+      , selector = $this.attr('data-target')
+      , $parent
+
+    if (!selector) {
+      selector = $this.attr('href')
+      selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
+    }
+
+    $parent = $(selector)
+
+    e && e.preventDefault()
+
+    $parent.length || ($parent = $this.hasClass('alert') ? $this : $this.parent())
+
+    $parent.trigger(e = $.Event('close'))
+
+    if (e.isDefaultPrevented()) return
+
+    $parent.removeClass('in')
+
+    function removeElement() {
+      $parent
+        .trigger('closed')
+        .remove()
+    }
+
+    $.support.transition && $parent.hasClass('fade') ?
+      $parent.on($.support.transition.end, removeElement) :
+      removeElement()
+  }
+
+
+ /* ALERT PLUGIN DEFINITION
+  * ======================= */
+
+  $.fn.alert = function (option) {
+    return this.each(function () {
+      var $this = $(this)
+        , data = $this.data('alert')
+      if (!data) $this.data('alert', (data = new Alert(this)))
+      if (typeof option == 'string') data[option].call($this)
+    })
+  }
+
+  $.fn.alert.Constructor = Alert
+
+
+ /* ALERT DATA-API
+  * ============== */
+
+  $(function () {
+    $('body').on('click.alert.data-api', dismiss, Alert.prototype.close)
+  })
+
+}(window.jQuery);/* ============================================================
+ * bootstrap-button.js v2.1.0
+ * http://twitter.github.com/bootstrap/javascript.html#buttons
+ * ============================================================
+ * Copyright 2012 Twitter, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============================================================ */
+
+
+!function ($) {
+
+  "use strict"; // jshint ;_;
+
+
+ /* BUTTON PUBLIC CLASS DEFINITION
+  * ============================== */
+
+  var Button = function (element, options) {
+    this.$element = $(element)
+    this.options = $.extend({}, $.fn.button.defaults, options)
+  }
+
+  Button.prototype.setState = function (state) {
+    var d = 'disabled'
+      , $el = this.$element
+      , data = $el.data()
+      , val = $el.is('input') ? 'val' : 'html'
+
+    state = state + 'Text'
+    data.resetText || $el.data('resetText', $el[val]())
+
+    $el[val](data[state] || this.options[state])
+
+    // push to event loop to allow forms to submit
+    setTimeout(function () {
+      state == 'loadingText' ?
+        $el.addClass(d).attr(d, d) :
+        $el.removeClass(d).removeAttr(d)
+    }, 0)
+  }
+
+  Button.prototype.toggle = function () {
+    var $parent = this.$element.parent('[data-toggle="buttons-radio"]')
+
+    $parent && $parent
+      .find('.active')
+      .removeClass('active')
+
+    this.$element.toggleClass('active')
+  }
+
+
+ /* BUTTON PLUGIN DEFINITION
+  * ======================== */
+
+  $.fn.button = function (option) {
+    return this.each(function () {
+      var $this = $(this)
+        , data = $this.data('button')
+        , options = typeof option == 'object' && option
+      if (!data) $this.data('button', (data = new Button(this, options)))
+      if (option == 'toggle') data.toggle()
+      else if (option) data.setState(option)
+    })
+  }
+
+  $.fn.button.defaults = {
+    loadingText: 'loading...'
+  }
+
+  $.fn.button.Constructor = Button
+
+
+ /* BUTTON DATA-API
+  * =============== */
+
+  $(function () {
+    $('body').on('click.button.data-api', '[data-toggle^=button]', function ( e ) {
+      var $btn = $(e.target)
+      if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn')
+      $btn.button('toggle')
+    })
+  })
+
+}(window.jQuery);/* ==========================================================
+ * bootstrap-carousel.js v2.1.0
+ * http://twitter.github.com/bootstrap/javascript.html#carousel
+ * ==========================================================
+ * Copyright 2012 Twitter, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ========================================================== */
+
+
+!function ($) {
+
+  "use strict"; // jshint ;_;
+
+
+ /* CAROUSEL CLASS DEFINITION
+  * ========================= */
+
+  var Carousel = function (element, options) {
+    this.$element = $(element)
+    this.options = options
+    this.options.slide && this.slide(this.options.slide)
+    this.options.pause == 'hover' && this.$element
+      .on('mouseenter', $.proxy(this.pause, this))
+      .on('mouseleave', $.proxy(this.cycle, this))
+  }
+
+  Carousel.prototype = {
+
+    cycle: function (e) {
+      if (!e) this.paused = false
+      this.options.interval
+        && !this.paused
+        && (this.interval = setInterval($.proxy(this.next, this), this.options.interval))
+      return this
+    }
+
+  , to: function (pos) {
+      var $active = this.$element.find('.item.active')
+        , children = $active.parent().children()
+        , activePos = children.index($active)
+        , that = this
+
+      if (pos > (children.length - 1) || pos < 0) return
+
+      if (this.sliding) {
+        return this.$element.one('slid', function () {
+          that.to(pos)
+        })
+      }
+
+      if (activePos == pos) {
+        return this.pause().cycle()
+      }
+
+      return this.slide(pos > activePos ? 'next' : 'prev', $(children[pos]))
+    }
+
+  , pause: function (e) {
+      if (!e) this.paused = true
+      if (this.$element.find('.next, .prev').length && $.support.transition.end) {
+        this.$element.trigger($.support.transition.end)
+        this.cycle()
+      }
+      clearInterval(this.interval)
+      this.interval = null
+      return this
+    }
+
+  , next: function () {
+      if (this.sliding) return
+      return this.slide('next')
+    }
+
+  , prev: function () {
+      if (this.sliding) return
+      return this.slide('prev')
+    }
+
+  , slide: function (type, next) {
+      var $active = this.$element.find('.item.active')
+        , $next = next || $active[type]()
+        , isCycling = this.interval
+        , direction = type == 'next' ? 'left' : 'right'
+        , fallback  = type == 'next' ? 'first' : 'last'
+        , that = this
+        , e = $.Event('slide', {
+            relatedTarget: $next[0]
+          })
+
+      this.sliding = true
+
+      isCycling && this.pause()
+
+      $next = $next.length ? $next : this.$element.find('.item')[fallback]()
+
+      if ($next.hasClass('active')) return
+
+      if ($.support.transition && this.$element.hasClass('slide')) {
+        this.$element.trigger(e)
+        if (e.isDefaultPrevented()) return
+        $next.addClass(type)
+        $next[0].offsetWidth // force reflow
+        $active.addClass(direction)
+        $next.addClass(direction)
+        this.$element.one($.support.transition.end, function () {
+          $next.removeClass([type, direction].join(' ')).addClass('active')
+          $active.removeClass(['active', direction].join(' '))
+          that.sliding = false
+          setTimeout(function () { that.$element.trigger('slid') }, 0)
+        })
+      } else {
+        this.$element.trigger(e)
+        if (e.isDefaultPrevented()) return
+        $active.removeClass('active')
+        $next.addClass('active')
+        this.sliding = false
+        this.$element.trigger('slid')
+      }
+
+      isCycling && this.cycle()
+
+      return this
+    }
+
+  }
+
+
+ /* CAROUSEL PLUGIN DEFINITION
+  * ========================== */
+
+  $.fn.carousel = function (option) {
+    return this.each(function () {
+      var $this = $(this)
+        , data = $this.data('carousel')
+        , options = $.extend({}, $.fn.carousel.defaults, typeof option == 'object' && option)
+        , action = typeof option == 'string' ? option : options.slide
+      if (!data) $this.data('carousel', (data = new Carousel(this, options)))
+      if (typeof option == 'number') data.to(option)
+      else if (action) data[action]()
+      else if (options.interval) data.cycle()
+    })
+  }
+
+  $.fn.carousel.defaults = {
+    interval: 5000
+  , pause: 'hover'
+  }
+
+  $.fn.carousel.Constructor = Carousel
+
+
+ /* CAROUSEL DATA-API
+  * ================= */
+
+  $(function () {
+    $('body').on('click.carousel.data-api', '[data-slide]', function ( e ) {
+      var $this = $(this), href
+        , $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
+        , options = !$target.data('modal') && $.extend({}, $target.data(), $this.data())
+      $target.carousel(options)
+      e.preventDefault()
+    })
+  })
+
+}(window.jQuery);/* =============================================================
+ * bootstrap-collapse.js v2.1.0
+ * http://twitter.github.com/bootstrap/javascript.html#collapse
+ * =============================================================
+ * Copyright 2012 Twitter, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============================================================ */
+
+
+!function ($) {
+
+  "use strict"; // jshint ;_;
+
+
+ /* COLLAPSE PUBLIC CLASS DEFINITION
+  * ================================ */
+
+  var Collapse = function (element, options) {
+    this.$element = $(element)
+    this.options = $.extend({}, $.fn.collapse.defaults, options)
+
+    if (this.options.parent) {
+      this.$parent = $(this.options.parent)
+    }
+
+    this.options.toggle && this.toggle()
+  }
+
+  Collapse.prototype = {
+
+    constructor: Collapse
+
+  , dimension: function () {
+      var hasWidth = this.$element.hasClass('width')
+      return hasWidth ? 'width' : 'height'
+    }
+
+  , show: function () {
+      var dimension
+        , scroll
+        , actives
+        , hasData
+
+      if (this.transitioning) return
+
+      dimension = this.dimension()
+      scroll = $.camelCase(['scroll', dimension].join('-'))
+      actives = this.$parent && this.$parent.find('> .accordion-group > .in')
+
+      if (actives && actives.length) {
+        hasData = actives.data('collapse')
+        if (hasData && hasData.transitioning) return
+        actives.collapse('hide')
+        hasData || actives.data('collapse', null)
+      }
+
+      this.$element[dimension](0)
+      this.transition('addClass', $.Event('show'), 'shown')
+      $.support.transition && this.$element[dimension](this.$element[0][scroll])
+    }
+
+  , hide: function () {
+      var dimension
+      if (this.transitioning) return
+      dimension = this.dimension()
+      this.reset(this.$element[dimension]())
+      this.transition('removeClass', $.Event('hide'), 'hidden')
+      this.$element[dimension](0)
+    }
+
+  , reset: function (size) {
+      var dimension = this.dimension()
+
+      this.$element
+        .removeClass('collapse')
+        [dimension](size || 'auto')
+        [0].offsetWidth
+
+      this.$element[size !== null ? 'addClass' : 'removeClass']('collapse')
+
+      return this
+    }
+
+  , transition: function (method, startEvent, completeEvent) {
+      var that = this
+        , complete = function () {
+            if (startEvent.type == 'show') that.reset()
+            that.transitioning = 0
+            that.$element.trigger(completeEvent)
+          }
+
+      this.$element.trigger(startEvent)
+
+      if (startEvent.isDefaultPrevented()) return
+
+      this.transitioning = 1
+
+      this.$element[method]('in')
+
+      $.support.transition && this.$element.hasClass('collapse') ?
+        this.$element.one($.support.transition.end, complete) :
+        complete()
+    }
+
+  , toggle: function () {
+      this[this.$element.hasClass('in') ? 'hide' : 'show']()
+    }
+
+  }
+
+
+ /* COLLAPSIBLE PLUGIN DEFINITION
+  * ============================== */
+
+  $.fn.collapse = function (option) {
+    return this.each(function () {
+      var $this = $(this)
+        , data = $this.data('collapse')
+        , options = typeof option == 'object' && option
+      if (!data) $this.data('collapse', (data = new Collapse(this, options)))
+      if (typeof option == 'string') data[option]()
+    })
+  }
+
+  $.fn.collapse.defaults = {
+    toggle: true
+  }
+
+  $.fn.collapse.Constructor = Collapse
+
+
+ /* COLLAPSIBLE DATA-API
+  * ==================== */
+
+  $(function () {
+    $('body').on('click.collapse.data-api', '[data-toggle=collapse]', function (e) {
+      var $this = $(this), href
+        , target = $this.attr('data-target')
+          || e.preventDefault()
+          || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') //strip for ie7
+        , option = $(target).data('collapse') ? 'toggle' : $this.data()
+      $this[$(target).hasClass('in') ? 'addClass' : 'removeClass']('collapsed')
+      $(target).collapse(option)
+    })
+  })
+
+}(window.jQuery);/* ============================================================
+ * bootstrap-dropdown.js v2.1.0
+ * http://twitter.github.com/bootstrap/javascript.html#dropdowns
+ * ============================================================
+ * Copyright 2012 Twitter, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============================================================ */
+
+
+!function ($) {
+
+  "use strict"; // jshint ;_;
+
+
+ /* DROPDOWN CLASS DEFINITION
+  * ========================= */
+
+  var toggle = '[data-toggle=dropdown]'
+    , Dropdown = function (element) {
+        var $el = $(element).on('click.dropdown.data-api', this.toggle)
+        $('html').on('click.dropdown.data-api', function () {
+          $el.parent().removeClass('open')
+        })
+      }
+
+  Dropdown.prototype = {
+
+    constructor: Dropdown
+
+  , toggle: function (e) {
+      var $this = $(this)
+        , $parent
+        , isActive
+
+      if ($this.is('.disabled, :disabled')) return
+
+      $parent = getParent($this)
+
+      isActive = $parent.hasClass('open')
+
+      clearMenus()
+
+      if (!isActive) {
+        $parent.toggleClass('open')
+        $this.focus()
+      }
+
+      return false
+    }
+
+  , keydown: function (e) {
+      var $this
+        , $items
+        , $active
+        , $parent
+        , isActive
+        , index
+
+      if (!/(38|40|27)/.test(e.keyCode)) return
+
+      $this = $(this)
+
+      e.preventDefault()
+      e.stopPropagation()
+
+      if ($this.is('.disabled, :disabled')) return
+
+      $parent = getParent($this)
+
+      isActive = $parent.hasClass('open')
+
+      if (!isActive || (isActive && e.keyCode == 27)) return $this.click()
+
+      $items = $('[role=menu] li:not(.divider) a', $parent)
+
+      if (!$items.length) return
+
+      index = $items.index($items.filter(':focus'))
+
+      if (e.keyCode == 38 && index > 0) index--                                        // up
+      if (e.keyCode == 40 && index < $items.length - 1) index++                        // down
+      if (!~index) index = 0
+
+      $items
+        .eq(index)
+        .focus()
+    }
+
+  }
+
+  function clearMenus() {
+    getParent($(toggle))
+      .removeClass('open')
+  }
+
+  function getParent($this) {
+    var selector = $this.attr('data-target')
+      , $parent
+
+    if (!selector) {
+      selector = $this.attr('href')
+      selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
+    }
+
+    $parent = $(selector)
+    $parent.length || ($parent = $this.parent())
+
+    return $parent
+  }
+
+
+  /* DROPDOWN PLUGIN DEFINITION
+   * ========================== */
+
+  $.fn.dropdown = function (option) {
+    return this.each(function () {
+      var $this = $(this)
+        , data = $this.data('dropdown')
+      if (!data) $this.data('dropdown', (data = new Dropdown(this)))
+      if (typeof option == 'string') data[option].call($this)
+    })
+  }
+
+  $.fn.dropdown.Constructor = Dropdown
+
+
+  /* APPLY TO STANDARD DROPDOWN ELEMENTS
+   * =================================== */
+
+  $(function () {
+    $('html')
+      .on('click.dropdown.data-api touchstart.dropdown.data-api', clearMenus)
+    $('body')
+      .on('click.dropdown touchstart.dropdown.data-api', '.dropdown', function (e) { e.stopPropagation() })
+      .on('click.dropdown.data-api touchstart.dropdown.data-api'  , toggle, Dropdown.prototype.toggle)
+      .on('keydown.dropdown.data-api touchstart.dropdown.data-api', toggle + ', [role=menu]' , Dropdown.prototype.keydown)
+  })
+
+}(window.jQuery);/* =========================================================
+ * bootstrap-modal.js v2.1.0
+ * http://twitter.github.com/bootstrap/javascript.html#modals
+ * =========================================================
+ * Copyright 2012 Twitter, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ========================================================= */
+
+
+!function ($) {
+
+  "use strict"; // jshint ;_;
+
+
+ /* MODAL CLASS DEFINITION
+  * ====================== */
+
+  var Modal = function (element, options) {
+    this.options = options
+    this.$element = $(element)
+      .delegate('[data-dismiss="modal"]', 'click.dismiss.modal', $.proxy(this.hide, this))
+    this.options.remote && this.$element.find('.modal-body').load(this.options.remote)
+  }
+
+  Modal.prototype = {
+
+      constructor: Modal
+
+    , toggle: function () {
+        return this[!this.isShown ? 'show' : 'hide']()
+      }
+
+    , show: function () {
+        var that = this
+          , e = $.Event('show')
+
+        this.$element.trigger(e)
+
+        if (this.isShown || e.isDefaultPrevented()) return
+
+        $('body').addClass('modal-open')
+
+        this.isShown = true
+
+        this.escape()
+
+        this.backdrop(function () {
+          var transition = $.support.transition && that.$element.hasClass('fade')
+
+          if (!that.$element.parent().length) {
+            that.$element.appendTo(document.body) //don't move modals dom position
+          }
+
+          that.$element
+            .show()
+
+          if (transition) {
+            that.$element[0].offsetWidth // force reflow
+          }
+
+          that.$element
+            .addClass('in')
+            .attr('aria-hidden', false)
+            .focus()
+
+          that.enforceFocus()
+
+          transition ?
+            that.$element.one($.support.transition.end, function () { that.$element.trigger('shown') }) :
+            that.$element.trigger('shown')
+
+        })
+      }
+
+    , hide: function (e) {
+        e && e.preventDefault()
+
+        var that = this
+
+        e = $.Event('hide')
+
+        this.$element.trigger(e)
+
+        if (!this.isShown || e.isDefaultPrevented()) return
+
+        this.isShown = false
+
+        $('body').removeClass('modal-open')
+
+        this.escape()
+
+        $(document).off('focusin.modal')
+
+        this.$element
+          .removeClass('in')
+          .attr('aria-hidden', true)
+
+        $.support.transition && this.$element.hasClass('fade') ?
+          this.hideWithTransition() :
+          this.hideModal()
+      }
+
+    , enforceFocus: function () {
+        var that = this
+        $(document).on('focusin.modal', function (e) {
+          if (that.$element[0] !== e.target && !that.$element.has(e.target).length) {
+            that.$element.focus()
+          }
+        })
+      }
+
+    , escape: function () {
+        var that = this
+        if (this.isShown && this.options.keyboard) {
+          this.$element.on('keyup.dismiss.modal', function ( e ) {
+            e.which == 27 && that.hide()
+          })
+        } else if (!this.isShown) {
+          this.$element.off('keyup.dismiss.modal')
+        }
+      }
+
+    , hideWithTransition: function () {
+        var that = this
+          , timeout = setTimeout(function () {
+              that.$element.off($.support.transition.end)
+              that.hideModal()
+            }, 500)
+
+        this.$element.one($.support.transition.end, function () {
+          clearTimeout(timeout)
+          that.hideModal()
+        })
+      }
+
+    , hideModal: function (that) {
+        this.$element
+          .hide()
+          .trigger('hidden')
+
+        this.backdrop()
+      }
+
+    , removeBackdrop: function () {
+        this.$backdrop.remove()
+        this.$backdrop = null
+      }
+
+    , backdrop: function (callback) {
+        var that = this
+          , animate = this.$element.hasClass('fade') ? 'fade' : ''
+
+        if (this.isShown && this.options.backdrop) {
+          var doAnimate = $.support.transition && animate
+
+          this.$backdrop = $('<div class="modal-backdrop ' + animate + '" />')
+            .appendTo(document.body)
+
+          if (this.options.backdrop != 'static') {
+            this.$backdrop.click($.proxy(this.hide, this))
+          }
+
+          if (doAnimate) this.$backdrop[0].offsetWidth // force reflow
+
+          this.$backdrop.addClass('in')
+
+          doAnimate ?
+            this.$backdrop.one($.support.transition.end, callback) :
+            callback()
+
+        } else if (!this.isShown && this.$backdrop) {
+          this.$backdrop.removeClass('in')
+
+          $.support.transition && this.$element.hasClass('fade')?
+            this.$backdrop.one($.support.transition.end, $.proxy(this.removeBackdrop, this)) :
+            this.removeBackdrop()
+
+        } else if (callback) {
+          callback()
+        }
+      }
+  }
+
+
+ /* MODAL PLUGIN DEFINITION
+  * ======================= */
+
+  $.fn.modal = function (option) {
+    return this.each(function () {
+      var $this = $(this)
+        , data = $this.data('modal')
+        , options = $.extend({}, $.fn.modal.defaults, $this.data(), typeof option == 'object' && option)
+      if (!data) $this.data('modal', (data = new Modal(this, options)))
+      if (typeof option == 'string') data[option]()
+      else if (options.show) data.show()
+    })
+  }
+
+  $.fn.modal.defaults = {
+      backdrop: true
+    , keyboard: true
+    , show: true
+  }
+
+  $.fn.modal.Constructor = Modal
+
+
+ /* MODAL DATA-API
+  * ============== */
+
+  $(function () {
+    $('body').on('click.modal.data-api', '[data-toggle="modal"]', function ( e ) {
+      var $this = $(this)
+        , href = $this.attr('href')
+        , $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) //strip for ie7
+        , option = $target.data('modal') ? 'toggle' : $.extend({ remote: !/#/.test(href) && href }, $target.data(), $this.data())
+
+      e.preventDefault()
+
+      $target
+        .modal(option)
+        .one('hide', function () {
+          $this.focus()
+        })
+    })
+  })
+
+}(window.jQuery);/* ===========================================================
+ * bootstrap-tooltip.js v2.1.0
+ * http://twitter.github.com/bootstrap/javascript.html#tooltips
+ * Inspired by the original jQuery.tipsy by Jason Frame
+ * ===========================================================
+ * Copyright 2012 Twitter, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ========================================================== */
+
+
+!function ($) {
+
+  "use strict"; // jshint ;_;
+
+
+ /* TOOLTIP PUBLIC CLASS DEFINITION
+  * =============================== */
+
+  var Tooltip = function (element, options) {
+    this.init('tooltip', element, options)
+  }
+
+  Tooltip.prototype = {
+
+    constructor: Tooltip
+
+  , init: function (type, element, options) {
+      var eventIn
+        , eventOut
+
+      this.type = type
+      this.$element = $(element)
+      this.options = this.getOptions(options)
+      this.enabled = true
+
+      if (this.options.trigger == 'click') {
+        this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this))
+      } else if (this.options.trigger != 'manual') {
+        eventIn = this.options.trigger == 'hover' ? 'mouseenter' : 'focus'
+        eventOut = this.options.trigger == 'hover' ? 'mouseleave' : 'blur'
+        this.$element.on(eventIn + '.' + this.type, this.options.selector, $.proxy(this.enter, this))
+        this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this))
+      }
+
+      this.options.selector ?
+        (this._options = $.extend({}, this.options, { trigger: 'manual', selector: '' })) :
+        this.fixTitle()
+    }
+
+  , getOptions: function (options) {
+      options = $.extend({}, $.fn[this.type].defaults, options, this.$element.data())
+
+      if (options.delay && typeof options.delay == 'number') {
+        options.delay = {
+          show: options.delay
+        , hide: options.delay
+        }
+      }
+
+      return options
+    }
+
+  , enter: function (e) {
+      var self = $(e.currentTarget)[this.type](this._options).data(this.type)
+
+      if (!self.options.delay || !self.options.delay.show) return self.show()
+
+      clearTimeout(this.timeout)
+      self.hoverState = 'in'
+      this.timeout = setTimeout(function() {
+        if (self.hoverState == 'in') self.show()
+      }, self.options.delay.show)
+    }
+
+  , leave: function (e) {
+      var self = $(e.currentTarget)[this.type](this._options).data(this.type)
+
+      if (this.timeout) clearTimeout(this.timeout)
+      if (!self.options.delay || !self.options.delay.hide) return self.hide()
+
+      self.hoverState = 'out'
+      this.timeout = setTimeout(function() {
+        if (self.hoverState == 'out') self.hide()
+      }, self.options.delay.hide)
+    }
+
+  , show: function () {
+      var $tip
+        , inside
+        , pos
+        , actualWidth
+        , actualHeight
+        , placement
+        , tp
+
+      if (this.hasContent() && this.enabled) {
+        $tip = this.tip()
+        this.setContent()
+
+        if (this.options.animation) {
+          $tip.addClass('fade')
+        }
+
+        placement = typeof this.options.placement == 'function' ?
+          this.options.placement.call(this, $tip[0], this.$element[0]) :
+          this.options.placement
+
+        inside = /in/.test(placement)
+
+        $tip
+          .remove()
+          .css({ top: 0, left: 0, display: 'block' })
+          .appendTo(inside ? this.$element : document.body)
+
+        pos = this.getPosition(inside)
+
+        actualWidth = $tip[0].offsetWidth
+        actualHeight = $tip[0].offsetHeight
+
+        switch (inside ? placement.split(' ')[1] : placement) {
+          case 'bottom':
+            tp = {top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2}
+            break
+          case 'top':
+            tp = {top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2}
+            break
+          case 'left':
+            tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth}
+            break
+          case 'right':
+            tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width}
+            break
+        }
+
+        $tip
+          .css(tp)
+          .addClass(placement)
+          .addClass('in')
+      }
+    }
+
+  , setContent: function () {
+      var $tip = this.tip()
+        , title = this.getTitle()
+
+      $tip.find('.tooltip-inner')[this.options.html ? 'html' : 'text'](title)
+      $tip.removeClass('fade in top bottom left right')
+    }
+
+  , hide: function () {
+      var that = this
+        , $tip = this.tip()
+
+      $tip.removeClass('in')
+
+      function removeWithAnimation() {
+        var timeout = setTimeout(function () {
+          $tip.off($.support.transition.end).remove()
+        }, 500)
+
+        $tip.one($.support.transition.end, function () {
+          clearTimeout(timeout)
+          $tip.remove()
+        })
+      }
+
+      $.support.transition && this.$tip.hasClass('fade') ?
+        removeWithAnimation() :
+        $tip.remove()
+
+      return this
+    }
+
+  , fixTitle: function () {
+      var $e = this.$element
+      if ($e.attr('title') || typeof($e.attr('data-original-title')) != 'string') {
+        $e.attr('data-original-title', $e.attr('title') || '').removeAttr('title')
+      }
+    }
+
+  , hasContent: function () {
+      return this.getTitle()
+    }
+
+  , getPosition: function (inside) {
+      return $.extend({}, (inside ? {top: 0, left: 0} : this.$element.offset()), {
+        width: this.$element[0].offsetWidth
+      , height: this.$element[0].offsetHeight
+      })
+    }
+
+  , getTitle: function () {
+      var title
+        , $e = this.$element
+        , o = this.options
+
+      title = $e.attr('data-original-title')
+        || (typeof o.title == 'function' ? o.title.call($e[0]) :  o.title)
+
+      return title
+    }
+
+  , tip: function () {
+      return this.$tip = this.$tip || $(this.options.template)
+    }
+
+  , validate: function () {
+      if (!this.$element[0].parentNode) {
+        this.hide()
+        this.$element = null
+        this.options = null
+      }
+    }
+
+  , enable: function () {
+      this.enabled = true
+    }
+
+  , disable: function () {
+      this.enabled = false
+    }
+
+  , toggleEnabled: function () {
+      this.enabled = !this.enabled
+    }
+
+  , toggle: function () {
+      this[this.tip().hasClass('in') ? 'hide' : 'show']()
+    }
+
+  , destroy: function () {
+      this.hide().$element.off('.' + this.type).removeData(this.type)
+    }
+
+  }
+
+
+ /* TOOLTIP PLUGIN DEFINITION
+  * ========================= */
+
+  $.fn.tooltip = function ( option ) {
+    return this.each(function () {
+      var $this = $(this)
+        , data = $this.data('tooltip')
+        , options = typeof option == 'object' && option
+      if (!data) $this.data('tooltip', (data = new Tooltip(this, options)))
+      if (typeof option == 'string') data[option]()
+    })
+  }
+
+  $.fn.tooltip.Constructor = Tooltip
+
+  $.fn.tooltip.defaults = {
+    animation: true
+  , placement: 'top'
+  , selector: false
+  , template: '<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>'
+  , trigger: 'hover'
+  , title: ''
+  , delay: 0
+  , html: true
+  }
+
+}(window.jQuery);
+/* ===========================================================
+ * bootstrap-popover.js v2.1.0
+ * http://twitter.github.com/bootstrap/javascript.html#popovers
+ * ===========================================================
+ * Copyright 2012 Twitter, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =========================================================== */
+
+
+!function ($) {
+
+  "use strict"; // jshint ;_;
+
+
+ /* POPOVER PUBLIC CLASS DEFINITION
+  * =============================== */
+
+  var Popover = function (element, options) {
+    this.init('popover', element, options)
+  }
+
+
+  /* NOTE: POPOVER EXTENDS BOOTSTRAP-TOOLTIP.js
+     ========================================== */
+
+  Popover.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype, {
+
+    constructor: Popover
+
+  , setContent: function () {
+      var $tip = this.tip()
+        , title = this.getTitle()
+        , content = this.getContent()
+
+      $tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title)
+      $tip.find('.popover-content > *')[this.options.html ? 'html' : 'text'](content)
+
+      $tip.removeClass('fade top bottom left right in')
+    }
+
+  , hasContent: function () {
+      return this.getTitle() || this.getContent()
+    }
+
+  , getContent: function () {
+      var content
+        , $e = this.$element
+        , o = this.options
+
+      content = $e.attr('data-content')
+        || (typeof o.content == 'function' ? o.content.call($e[0]) :  o.content)
+
+      return content
+    }
+
+  , tip: function () {
+      if (!this.$tip) {
+        this.$tip = $(this.options.template)
+      }
+      return this.$tip
+    }
+
+  , destroy: function () {
+      this.hide().$element.off('.' + this.type).removeData(this.type)
+    }
+
+  })
+
+
+ /* POPOVER PLUGIN DEFINITION
+  * ======================= */
+
+  $.fn.popover = function (option) {
+    return this.each(function () {
+      var $this = $(this)
+        , data = $this.data('popover')
+        , options = typeof option == 'object' && option
+      if (!data) $this.data('popover', (data = new Popover(this, options)))
+      if (typeof option == 'string') data[option]()
+    })
+  }
+
+  $.fn.popover.Constructor = Popover
+
+  $.fn.popover.defaults = $.extend({} , $.fn.tooltip.defaults, {
+    placement: 'right'
+  , trigger: 'click'
+  , content: ''
+  , template: '<div class="popover"><div class="arrow"></div><div class="popover-inner"><h3 class="popover-title"></h3><div class="popover-content"><p></p></div></div></div>'
+  })
+
+}(window.jQuery);/* =============================================================
+ * bootstrap-scrollspy.js v2.1.0
+ * http://twitter.github.com/bootstrap/javascript.html#scrollspy
+ * =============================================================
+ * Copyright 2012 Twitter, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============================================================== */
+
+
+!function ($) {
+
+  "use strict"; // jshint ;_;
+
+
+ /* SCROLLSPY CLASS DEFINITION
+  * ========================== */
+
+  function ScrollSpy(element, options) {
+    var process = $.proxy(this.process, this)
+      , $element = $(element).is('body') ? $(window) : $(element)
+      , href
+    this.options = $.extend({}, $.fn.scrollspy.defaults, options)
+    this.$scrollElement = $element.on('scroll.scroll-spy.data-api', process)
+    this.selector = (this.options.target
+      || ((href = $(element).attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
+      || '') + ' .nav li > a'
+    this.$body = $('body')
+    this.refresh()
+    this.process()
+  }
+
+  ScrollSpy.prototype = {
+
+      constructor: ScrollSpy
+
+    , refresh: function () {
+        var self = this
+          , $targets
+
+        this.offsets = $([])
+        this.targets = $([])
+
+        $targets = this.$body
+          .find(this.selector)
+          .map(function () {
+            var $el = $(this)
+              , href = $el.data('target') || $el.attr('href')
+              , $href = /^#\w/.test(href) && $(href)
+            return ( $href
+              && $href.length
+              && [[ $href.position().top, href ]] ) || null
+          })
+          .sort(function (a, b) { return a[0] - b[0] })
+          .each(function () {
+            self.offsets.push(this[0])
+            self.targets.push(this[1])
+          })
+      }
+
+    , process: function () {
+        var scrollTop = this.$scrollElement.scrollTop() + this.options.offset
+          , scrollHeight = this.$scrollElement[0].scrollHeight || this.$body[0].scrollHeight
+          , maxScroll = scrollHeight - this.$scrollElement.height()
+          , offsets = this.offsets
+          , targets = this.targets
+          , activeTarget = this.activeTarget
+          , i
+
+        if (scrollTop >= maxScroll) {
+          return activeTarget != (i = targets.last()[0])
+            && this.activate ( i )
+        }
+
+        for (i = offsets.length; i--;) {
+          activeTarget != targets[i]
+            && scrollTop >= offsets[i]
+            && (!offsets[i + 1] || scrollTop <= offsets[i + 1])
+            && this.activate( targets[i] )
+        }
+      }
+
+    , activate: function (target) {
+        var active
+          , selector
+
+        this.activeTarget = target
+
+        $(this.selector)
+          .parent('.active')
+          .removeClass('active')
+
+        selector = this.selector
+          + '[data-target="' + target + '"],'
+          + this.selector + '[href="' + target + '"]'
+
+        active = $(selector)
+          .parent('li')
+          .addClass('active')
+
+        if (active.parent('.dropdown-menu').length)  {
+          active = active.closest('li.dropdown').addClass('active')
+        }
+
+        active.trigger('activate')
+      }
+
+  }
+
+
+ /* SCROLLSPY PLUGIN DEFINITION
+  * =========================== */
+
+  $.fn.scrollspy = function (option) {
+    return this.each(function () {
+      var $this = $(this)
+        , data = $this.data('scrollspy')
+        , options = typeof option == 'object' && option
+      if (!data) $this.data('scrollspy', (data = new ScrollSpy(this, options)))
+      if (typeof option == 'string') data[option]()
+    })
+  }
+
+  $.fn.scrollspy.Constructor = ScrollSpy
+
+  $.fn.scrollspy.defaults = {
+    offset: 10
+  }
+
+
+ /* SCROLLSPY DATA-API
+  * ================== */
+
+  $(window).on('load', function () {
+    $('[data-spy="scroll"]').each(function () {
+      var $spy = $(this)
+      $spy.scrollspy($spy.data())
+    })
+  })
+
+}(window.jQuery);/* ========================================================
+ * bootstrap-tab.js v2.1.0
+ * http://twitter.github.com/bootstrap/javascript.html#tabs
+ * ========================================================
+ * Copyright 2012 Twitter, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ======================================================== */
+
+
+!function ($) {
+
+  "use strict"; // jshint ;_;
+
+
+ /* TAB CLASS DEFINITION
+  * ==================== */
+
+  var Tab = function (element) {
+    this.element = $(element)
+  }
+
+  Tab.prototype = {
+
+    constructor: Tab
+
+  , show: function () {
+      var $this = this.element
+        , $ul = $this.closest('ul:not(.dropdown-menu)')
+        , selector = $this.attr('data-target')
+        , previous
+        , $target
+        , e
+
+      if (!selector) {
+        selector = $this.attr('href')
+        selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
+      }
+
+      if ( $this.parent('li').hasClass('active') ) return
+
+      previous = $ul.find('.active a').last()[0]
+
+      e = $.Event('show', {
+        relatedTarget: previous
+      })
+
+      $this.trigger(e)
+
+      if (e.isDefaultPrevented()) return
+
+      $target = $(selector)
+
+      this.activate($this.parent('li'), $ul)
+      this.activate($target, $target.parent(), function () {
+        $this.trigger({
+          type: 'shown'
+        , relatedTarget: previous
+        })
+      })
+    }
+
+  , activate: function ( element, container, callback) {
+      var $active = container.find('> .active')
+        , transition = callback
+            && $.support.transition
+            && $active.hasClass('fade')
+
+      function next() {
+        $active
+          .removeClass('active')
+          .find('> .dropdown-menu > .active')
+          .removeClass('active')
+
+        element.addClass('active')
+
+        if (transition) {
+          element[0].offsetWidth // reflow for transition
+          element.addClass('in')
+        } else {
+          element.removeClass('fade')
+        }
+
+        if ( element.parent('.dropdown-menu') ) {
+          element.closest('li.dropdown').addClass('active')
+        }
+
+        callback && callback()
+      }
+
+      transition ?
+        $active.one($.support.transition.end, next) :
+        next()
+
+      $active.removeClass('in')
+    }
+  }
+
+
+ /* TAB PLUGIN DEFINITION
+  * ===================== */
+
+  $.fn.tab = function ( option ) {
+    return this.each(function () {
+      var $this = $(this)
+        , data = $this.data('tab')
+      if (!data) $this.data('tab', (data = new Tab(this)))
+      if (typeof option == 'string') data[option]()
+    })
+  }
+
+  $.fn.tab.Constructor = Tab
+
+
+ /* TAB DATA-API
+  * ============ */
+
+  $(function () {
+    $('body').on('click.tab.data-api', '[data-toggle="tab"], [data-toggle="pill"]', function (e) {
+      e.preventDefault()
+      $(this).tab('show')
+    })
+  })
+
+}(window.jQuery);/* =============================================================
+ * bootstrap-typeahead.js v2.1.0
+ * http://twitter.github.com/bootstrap/javascript.html#typeahead
+ * =============================================================
+ * Copyright 2012 Twitter, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============================================================ */
+
+
+!function($){
+
+  "use strict"; // jshint ;_;
+
+
+ /* TYPEAHEAD PUBLIC CLASS DEFINITION
+  * ================================= */
+
+  var Typeahead = function (element, options) {
+    this.$element = $(element)
+    this.options = $.extend({}, $.fn.typeahead.defaults, options)
+    this.matcher = this.options.matcher || this.matcher
+    this.sorter = this.options.sorter || this.sorter
+    this.highlighter = this.options.highlighter || this.highlighter
+    this.updater = this.options.updater || this.updater
+    this.$menu = $(this.options.menu).appendTo('body')
+    this.source = this.options.source
+    this.shown = false
+    this.listen()
+  }
+
+  Typeahead.prototype = {
+
+    constructor: Typeahead
+
+  , select: function () {
+      var val = this.$menu.find('.active').attr('data-value')
+      this.$element
+        .val(this.updater(val))
+        .change()
+      return this.hide()
+    }
+
+  , updater: function (item) {
+      return item
+    }
+
+  , show: function () {
+      var pos = $.extend({}, this.$element.offset(), {
+        height: this.$element[0].offsetHeight
+      })
+
+      this.$menu.css({
+        top: pos.top + pos.height
+      , left: pos.left
+      })
+
+      this.$menu.show()
+      this.shown = true
+      return this
+    }
+
+  , hide: function () {
+      this.$menu.hide()
+      this.shown = false
+      return this
+    }
+
+  , lookup: function (event) {
+      var items
+
+      this.query = this.$element.val()
+
+      if (!this.query || this.query.length < this.options.minLength) {
+        return this.shown ? this.hide() : this
+      }
+
+      items = $.isFunction(this.source) ? this.source(this.query, $.proxy(this.process, this)) : this.source
+
+      return items ? this.process(items) : this
+    }
+
+  , process: function (items) {
+      var that = this
+
+      items = $.grep(items, function (item) {
+        return that.matcher(item)
+      })
+
+      items = this.sorter(items)
+
+      if (!items.length) {
+        return this.shown ? this.hide() : this
+      }
+
+      return this.render(items.slice(0, this.options.items)).show()
+    }
+
+  , matcher: function (item) {
+      return ~item.toLowerCase().indexOf(this.query.toLowerCase())
+    }
+
+  , sorter: function (items) {
+      var beginswith = []
+        , caseSensitive = []
+        , caseInsensitive = []
+        , item
+
+      while (item = items.shift()) {
+        if (!item.toLowerCase().indexOf(this.query.toLowerCase())) beginswith.push(item)
+        else if (~item.indexOf(this.query)) caseSensitive.push(item)
+        else caseInsensitive.push(item)
+      }
+
+      return beginswith.concat(caseSensitive, caseInsensitive)
+    }
+
+  , highlighter: function (item) {
+      var query = this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, '\\$&')
+      return item.replace(new RegExp('(' + query + ')', 'ig'), function ($1, match) {
+        return '<strong>' + match + '</strong>'
+      })
+    }
+
+  , render: function (items) {
+      var that = this
+
+      items = $(items).map(function (i, item) {
+        i = $(that.options.item).attr('data-value', item)
+        i.find('a').html(that.highlighter(item))
+        return i[0]
+      })
+
+      items.first().addClass('active')
+      this.$menu.html(items)
+      return this
+    }
+
+  , next: function (event) {
+      var active = this.$menu.find('.active').removeClass('active')
+        , next = active.next()
+
+      if (!next.length) {
+        next = $(this.$menu.find('li')[0])
+      }
+
+      next.addClass('active')
+    }
+
+  , prev: function (event) {
+      var active = this.$menu.find('.active').removeClass('active')
+        , prev = active.prev()
+
+      if (!prev.length) {
+        prev = this.$menu.find('li').last()
+      }
+
+      prev.addClass('active')
+    }
+
+  , listen: function () {
+      this.$element
+        .on('blur',     $.proxy(this.blur, this))
+        .on('keypress', $.proxy(this.keypress, this))
+        .on('keyup',    $.proxy(this.keyup, this))
+
+      if ($.browser.webkit || $.browser.msie) {
+        this.$element.on('keydown', $.proxy(this.keydown, this))
+      }
+
+      this.$menu
+        .on('click', $.proxy(this.click, this))
+        .on('mouseenter', 'li', $.proxy(this.mouseenter, this))
+    }
+
+  , move: function (e) {
+      if (!this.shown) return
+
+      switch(e.keyCode) {
+        case 9: // tab
+        case 13: // enter
+        case 27: // escape
+          e.preventDefault()
+          break
+
+        case 38: // up arrow
+          e.preventDefault()
+          this.prev()
+          break
+
+        case 40: // down arrow
+          e.preventDefault()
+          this.next()
+          break
+      }
+
+      e.stopPropagation()
+    }
+
+  , keydown: function (e) {
+      this.suppressKeyPressRepeat = !~$.inArray(e.keyCode, [40,38,9,13,27])
+      this.move(e)
+    }
+
+  , keypress: function (e) {
+      if (this.suppressKeyPressRepeat) return
+      this.move(e)
+    }
+
+  , keyup: function (e) {
+      switch(e.keyCode) {
+        case 40: // down arrow
+        case 38: // up arrow
+          break
+
+        case 9: // tab
+        case 13: // enter
+          if (!this.shown) return
+          this.select()
+          break
+
+        case 27: // escape
+          if (!this.shown) return
+          this.hide()
+          break
+
+        default:
+          this.lookup()
+      }
+
+      e.stopPropagation()
+      e.preventDefault()
+  }
+
+  , blur: function (e) {
+      var that = this
+      setTimeout(function () { that.hide() }, 150)
+    }
+
+  , click: function (e) {
+      e.stopPropagation()
+      e.preventDefault()
+      this.select()
+    }
+
+  , mouseenter: function (e) {
+      this.$menu.find('.active').removeClass('active')
+      $(e.currentTarget).addClass('active')
+    }
+
+  }
+
+
+  /* TYPEAHEAD PLUGIN DEFINITION
+   * =========================== */
+
+  $.fn.typeahead = function (option) {
+    return this.each(function () {
+      var $this = $(this)
+        , data = $this.data('typeahead')
+        , options = typeof option == 'object' && option
+      if (!data) $this.data('typeahead', (data = new Typeahead(this, options)))
+      if (typeof option == 'string') data[option]()
+    })
+  }
+
+  $.fn.typeahead.defaults = {
+    source: []
+  , items: 8
+  , menu: '<ul class="typeahead dropdown-menu"></ul>'
+  , item: '<li><a href="#"></a></li>'
+  , minLength: 1
+  }
+
+  $.fn.typeahead.Constructor = Typeahead
+
+
+ /*   TYPEAHEAD DATA-API
+  * ================== */
+
+  $(function () {
+    $('body').on('focus.typeahead.data-api', '[data-provide="typeahead"]', function (e) {
+      var $this = $(this)
+      if ($this.data('typeahead')) return
+      e.preventDefault()
+      $this.typeahead($this.data())
+    })
+  })
+
+}(window.jQuery);
+/* ==========================================================
+ * bootstrap-affix.js v2.1.0
+ * http://twitter.github.com/bootstrap/javascript.html#affix
+ * ==========================================================
+ * Copyright 2012 Twitter, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ========================================================== */
+
+
+!function ($) {
+
+  "use strict"; // jshint ;_;
+
+
+ /* AFFIX CLASS DEFINITION
+  * ====================== */
+
+  var Affix = function (element, options) {
+    this.options = $.extend({}, $.fn.affix.defaults, options)
+    this.$window = $(window).on('scroll.affix.data-api', $.proxy(this.checkPosition, this))
+    this.$element = $(element)
+    this.checkPosition()
+  }
+
+  Affix.prototype.checkPosition = function () {
+    if (!this.$element.is(':visible')) return
+
+    var scrollHeight = $(document).height()
+      , scrollTop = this.$window.scrollTop()
+      , position = this.$element.offset()
+      , offset = this.options.offset
+      , offsetBottom = offset.bottom
+      , offsetTop = offset.top
+      , reset = 'affix affix-top affix-bottom'
+      , affix
+
+    if (typeof offset != 'object') offsetBottom = offsetTop = offset
+    if (typeof offsetTop == 'function') offsetTop = offset.top()
+    if (typeof offsetBottom == 'function') offsetBottom = offset.bottom()
+
+    affix = this.unpin != null && (scrollTop + this.unpin <= position.top) ?
+      false    : offsetBottom != null && (position.top + this.$element.height() >= scrollHeight - offsetBottom) ?
+      'bottom' : offsetTop != null && scrollTop <= offsetTop ?
+      'top'    : false
+
+    if (this.affixed === affix) return
+
+    this.affixed = affix
+    this.unpin = affix == 'bottom' ? position.top - scrollTop : null
+
+    this.$element.removeClass(reset).addClass('affix' + (affix ? '-' + affix : ''))
+  }
+
+
+ /* AFFIX PLUGIN DEFINITION
+  * ======================= */
+
+  $.fn.affix = function (option) {
+    return this.each(function () {
+      var $this = $(this)
+        , data = $this.data('affix')
+        , options = typeof option == 'object' && option
+      if (!data) $this.data('affix', (data = new Affix(this, options)))
+      if (typeof option == 'string') data[option]()
+    })
+  }
+
+  $.fn.affix.Constructor = Affix
+
+  $.fn.affix.defaults = {
+    offset: 0
+  }
+
+
+ /* AFFIX DATA-API
+  * ============== */
+
+  $(window).on('load', function () {
+    $('[data-spy="affix"]').each(function () {
+      var $spy = $(this)
+        , data = $spy.data()
+
+      data.offset = data.offset || {}
+
+      data.offsetBottom && (data.offset.bottom = data.offsetBottom)
+      data.offsetTop && (data.offset.top = data.offsetTop)
+
+      $spy.affix(data)
+    })
+  })
+
+
+}(window.jQuery);
\ No newline at end of file
diff --git a/src/site/resources/js/bootstrap.min.js b/src/site/resources/js/bootstrap.min.js
new file mode 100644
index 0000000..66e887b
--- /dev/null
+++ b/src/site/resources/js/bootstrap.min.js
@@ -0,0 +1,6 @@
+/*!
+* Bootstrap.js by @fat & @mdo
+* Copyright 2012 Twitter, Inc.
+* http://www.apache.org/licenses/LICENSE-2.0.txt
+*/
+!function(e){e(function(){"use strict";e.support.transition=function(){var e=function(){var e=document.createElement("bootstrap"),t={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},n;for(n in t)if(e.style[n]!==undefined)return t[n]}();return e&&{end:e}}()})}(window.jQuery),!function(e){"use strict";var t='[data-dismiss="alert"]',n=function(n){e(n).on("click",t,this.close)};n.prototype.close=function(t){function s(){i.trigger("closed").remove()}var n=e(this),r=n.attr("data-target"),i;r||(r=n.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,"")),i=e(r),t&&t.preventDefault(),i.length||(i=n.hasClass("alert")?n:n.parent()),i.trigger(t=e.Event("close"));if(t.isDefaultPrevented())return;i.removeClass("in"),e.support.transition&&i.hasClass("fade")?i.on(e.support.transition.end,s):s()},e.fn.alert=function(t){return this.each(function(){var r=e(this),i=r.data("alert");i||r.data("alert",i=new n(this)),typeof t=="string"&&i[t].call(r)})},e.fn.alert.Constructor=n,e(function(){e("body").on("click.alert.data-api",t,n.prototype.close)})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.options=e.extend({},e.fn.button.defaults,n)};t.prototype.setState=function(e){var t="disabled",n=this.$element,r=n.data(),i=n.is("input")?"val":"html";e+="Text",r.resetText||n.data("resetText",n[i]()),n[i](r[e]||this.options[e]),setTimeout(function(){e=="loadingText"?n.addClass(t).attr(t,t):n.removeClass(t).removeAttr(t)},0)},t.prototype.toggle=function(){var e=this.$element.parent('[data-toggle="buttons-radio"]');e&&e.find(".active").removeClass("active"),this.$element.toggleClass("active")},e.fn.button=function(n){return this.each(function(){var r=e(this),i=r.data("button"),s=typeof n=="object"&&n;i||r.data("button",i=new t(this,s)),n=="toggle"?i.toggle():n&&i.setState(n)})},e.fn.button.defaults={loadingText:"loading..."},e.fn.button.Constructor=t,e(function(){e("body").on("click.button.data-api","[data-toggle^=button]",function(t){var n=e(t.target);n.hasClass("btn")||(n=n.closest(".btn")),n.button("toggle")})})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.options=n,this.options.slide&&this.slide(this.options.slide),this.options.pause=="hover"&&this.$element.on("mouseenter",e.proxy(this.pause,this)).on("mouseleave",e.proxy(this.cycle,this))};t.prototype={cycle:function(t){return t||(this.paused=!1),this.options.interval&&!this.paused&&(this.interval=setInterval(e.proxy(this.next,this),this.options.interval)),this},to:function(t){var n=this.$element.find(".item.active"),r=n.parent().children(),i=r.index(n),s=this;if(t>r.length-1||t<0)return;return this.sliding?this.$element.one("slid",function(){s.to(t)}):i==t?this.pause().cycle():this.slide(t>i?"next":"prev",e(r[t]))},pause:function(t){return t||(this.paused=!0),this.$element.find(".next, .prev").length&&e.support.transition.end&&(this.$element.trigger(e.support.transition.end),this.cycle()),clearInterval(this.interval),this.interval=null,this},next:function(){if(this.sliding)return;return this.slide("next")},prev:function(){if(this.sliding)return;return this.slide("prev")},slide:function(t,n){var r=this.$element.find(".item.active"),i=n||r[t](),s=this.interval,o=t=="next"?"left":"right",u=t=="next"?"first":"last",a=this,f=e.Event("slide",{relatedTarget:i[0]});this.sliding=!0,s&&this.pause(),i=i.length?i:this.$element.find(".item")[u]();if(i.hasClass("active"))return;if(e.support.transition&&this.$element.hasClass("slide")){this.$element.trigger(f);if(f.isDefaultPrevented())return;i.addClass(t),i[0].offsetWidth,r.addClass(o),i.addClass(o),this.$element.one(e.support.transition.end,function(){i.removeClass([t,o].join(" ")).addClass("active"),r.removeClass(["active",o].join(" ")),a.sliding=!1,setTimeout(function(){a.$element.trigger("slid")},0)})}else{this.$element.trigger(f);if(f.isDefaultPrevented())return;r.removeClass("active"),i.addClass("active"),this.sliding=!1,this.$element.trigger("slid")}return s&&this.cycle(),this}},e.fn.carousel=function(n){return this.each(function(){var r=e(this),i=r.data("carousel"),s=e.extend({},e.fn.carousel.defaults,typeof n=="object"&&n),o=typeof n=="string"?n:s.slide;i||r.data("carousel",i=new t(this,s)),typeof n=="number"?i.to(n):o?i[o]():s.interval&&i.cycle()})},e.fn.carousel.defaults={interval:5e3,pause:"hover"},e.fn.carousel.Constructor=t,e(function(){e("body").on("click.carousel.data-api","[data-slide]",function(t){var n=e(this),r,i=e(n.attr("data-target")||(r=n.attr("href"))&&r.replace(/.*(?=#[^\s]+$)/,"")),s=!i.data("modal")&&e.extend({},i.data(),n.data());i.carousel(s),t.preventDefault()})})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.options=e.extend({},e.fn.collapse.defaults,n),this.options.parent&&(this.$parent=e(this.options.parent)),this.options.toggle&&this.toggle()};t.prototype={constructor:t,dimension:function(){var e=this.$element.hasClass("width");return e?"width":"height"},show:function(){var t,n,r,i;if(this.transitioning)return;t=this.dimension(),n=e.camelCase(["scroll",t].join("-")),r=this.$parent&&this.$parent.find("> .accordion-group > .in");if(r&&r.length){i=r.data("collapse");if(i&&i.transitioning)return;r.collapse("hide"),i||r.data("collapse",null)}this.$element[t](0),this.transition("addClass",e.Event("show"),"shown"),e.support.transition&&this.$element[t](this.$element[0][n])},hide:function(){var t;if(this.transitioning)return;t=this.dimension(),this.reset(this.$element[t]()),this.transition("removeClass",e.Event("hide"),"hidden"),this.$element[t](0)},reset:function(e){var t=this.dimension();return this.$element.removeClass("collapse")[t](e||"auto")[0].offsetWidth,this.$element[e!==null?"addClass":"removeClass"]("collapse"),this},transition:function(t,n,r){var i=this,s=function(){n.type=="show"&&i.reset(),i.transitioning=0,i.$element.trigger(r)};this.$element.trigger(n);if(n.isDefaultPrevented())return;this.transitioning=1,this.$element[t]("in"),e.support.transition&&this.$element.hasClass("collapse")?this.$element.one(e.support.transition.end,s):s()},toggle:function(){this[this.$element.hasClass("in")?"hide":"show"]()}},e.fn.collapse=function(n){return this.each(function(){var r=e(this),i=r.data("collapse"),s=typeof n=="object"&&n;i||r.data("collapse",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.collapse.defaults={toggle:!0},e.fn.collapse.Constructor=t,e(function(){e("body").on("click.collapse.data-api","[data-toggle=collapse]",function(t){var n=e(this),r,i=n.attr("data-target")||t.preventDefault()||(r=n.attr("href"))&&r.replace(/.*(?=#[^\s]+$)/,""),s=e(i).data("collapse")?"toggle":n.data();n[e(i).hasClass("in")?"addClass":"removeClass"]("collapsed"),e(i).collapse(s)})})}(window.jQuery),!function(e){"use strict";function r(){i(e(t)).removeClass("open")}function i(t){var n=t.attr("data-target"),r;return n||(n=t.attr("href"),n=n&&n.replace(/.*(?=#[^\s]*$)/,"")),r=e(n),r.length||(r=t.parent()),r}var t="[data-toggle=dropdown]",n=function(t){var n=e(t).on("click.dropdown.data-api",this.toggle);e("html").on("click.dropdown.data-api",function(){n.parent().removeClass("open")})};n.prototype={constructor:n,toggle:function(t){var n=e(this),s,o;if(n.is(".disabled, :disabled"))return;return s=i(n),o=s.hasClass("open"),r(),o||(s.toggleClass("open"),n.focus()),!1},keydown:function(t){var n,r,s,o,u,a;if(!/(38|40|27)/.test(t.keyCode))return;n=e(this),t.preventDefault(),t.stopPropagation();if(n.is(".disabled, :disabled"))return;o=i(n),u=o.hasClass("open");if(!u||u&&t.keyCode==27)return n.click();r=e("[role=menu] li:not(.divider) a",o);if(!r.length)return;a=r.index(r.filter(":focus")),t.keyCode==38&&a>0&&a--,t.keyCode==40&&a<r.length-1&&a++,~a||(a=0),r.eq(a).focus()}},e.fn.dropdown=function(t){return this.each(function(){var r=e(this),i=r.data("dropdown");i||r.data("dropdown",i=new n(this)),typeof t=="string"&&i[t].call(r)})},e.fn.dropdown.Constructor=n,e(function(){e("html").on("click.dropdown.data-api touchstart.dropdown.data-api",r),e("body").on("click.dropdown touchstart.dropdown.data-api",".dropdown",function(e){e.stopPropagation()}).on("click.dropdown.data-api touchstart.dropdown.data-api",t,n.prototype.toggle).on("keydown.dropdown.data-api touchstart.dropdown.data-api",t+", [role=menu]",n.prototype.keydown)})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.options=n,this.$element=e(t).delegate('[data-dismiss="modal"]',"click.dismiss.modal",e.proxy(this.hide,this)),this.options.remote&&this.$element.find(".modal-body").load(this.options.remote)};t.prototype={constructor:t,toggle:function(){return this[this.isShown?"hide":"show"]()},show:function(){var t=this,n=e.Event("show");this.$element.trigger(n);if(this.isShown||n.isDefaultPrevented())return;e("body").addClass("modal-open"),this.isShown=!0,this.escape(),this.backdrop(function(){var n=e.support.transition&&t.$element.hasClass("fade");t.$element.parent().length||t.$element.appendTo(document.body),t.$element.show(),n&&t.$element[0].offsetWidth,t.$element.addClass("in").attr("aria-hidden",!1).focus(),t.enforceFocus(),n?t.$element.one(e.support.transition.end,function(){t.$element.trigger("shown")}):t.$element.trigger("shown")})},hide:function(t){t&&t.preventDefault();var n=this;t=e.Event("hide"),this.$element.trigger(t);if(!this.isShown||t.isDefaultPrevented())return;this.isShown=!1,e("body").removeClass("modal-open"),this.escape(),e(document).off("focusin.modal"),this.$element.removeClass("in").attr("aria-hidden",!0),e.support.transition&&this.$element.hasClass("fade")?this.hideWithTransition():this.hideModal()},enforceFocus:function(){var t=this;e(document).on("focusin.modal",function(e){t.$element[0]!==e.target&&!t.$element.has(e.target).length&&t.$element.focus()})},escape:function(){var e=this;this.isShown&&this.options.keyboard?this.$element.on("keyup.dismiss.modal",function(t){t.which==27&&e.hide()}):this.isShown||this.$element.off("keyup.dismiss.modal")},hideWithTransition:function(){var t=this,n=setTimeout(function(){t.$element.off(e.support.transition.end),t.hideModal()},500);this.$element.one(e.support.transition.end,function(){clearTimeout(n),t.hideModal()})},hideModal:function(e){this.$element.hide().trigger("hidden"),this.backdrop()},removeBackdrop:function(){this.$backdrop.remove(),this.$backdrop=null},backdrop:function(t){var n=this,r=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var i=e.support.transition&&r;this.$backdrop=e('<div class="modal-backdrop '+r+'" />').appendTo(document.body),this.options.backdrop!="static"&&this.$backdrop.click(e.proxy(this.hide,this)),i&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),i?this.$backdrop.one(e.support.transition.end,t):t()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),e.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one(e.support.transition.end,e.proxy(this.removeBackdrop,this)):this.removeBackdrop()):t&&t()}},e.fn.modal=function(n){return this.each(function(){var r=e(this),i=r.data("modal"),s=e.extend({},e.fn.modal.defaults,r.data(),typeof n=="object"&&n);i||r.data("modal",i=new t(this,s)),typeof n=="string"?i[n]():s.show&&i.show()})},e.fn.modal.defaults={backdrop:!0,keyboard:!0,show:!0},e.fn.modal.Constructor=t,e(function(){e("body").on("click.modal.data-api",'[data-toggle="modal"]',function(t){var n=e(this),r=n.attr("href"),i=e(n.attr("data-target")||r&&r.replace(/.*(?=#[^\s]+$)/,"")),s=i.data("modal")?"toggle":e.extend({remote:!/#/.test(r)&&r},i.data(),n.data());t.preventDefault(),i.modal(s).one("hide",function(){n.focus()})})})}(window.jQuery),!function(e){"use strict";var t=function(e,t){this.init("tooltip",e,t)};t.prototype={constructor:t,init:function(t,n,r){var i,s;this.type=t,this.$element=e(n),this.options=this.getOptions(r),this.enabled=!0,this.options.trigger=="click"?this.$element.on("click."+this.type,this.options.selector,e.proxy(this.toggle,this)):this.options.trigger!="manual"&&(i=this.options.trigger=="hover"?"mouseenter":"focus",s=this.options.trigger=="hover"?"mouseleave":"blur",this.$element.on(i+"."+this.type,this.options.selector,e.proxy(this.enter,this)),this.$element.on(s+"."+this.type,this.options.selector,e.proxy(this.leave,this))),this.options.selector?this._options=e.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},getOptions:function(t){return t=e.extend({},e.fn[this.type].defaults,t,this.$element.data()),t.delay&&typeof t.delay=="number"&&(t.delay={show:t.delay,hide:t.delay}),t},enter:function(t){var n=e(t.currentTarget)[this.type](this._options).data(this.type);if(!n.options.delay||!n.options.delay.show)return n.show();clearTimeout(this.timeout),n.hoverState="in",this.timeout=setTimeout(function(){n.hoverState=="in"&&n.show()},n.options.delay.show)},leave:function(t){var n=e(t.currentTarget)[this.type](this._options).data(this.type);this.timeout&&clearTimeout(this.timeout);if(!n.options.delay||!n.options.delay.hide)return n.hide();n.hoverState="out",this.timeout=setTimeout(function(){n.hoverState=="out"&&n.hide()},n.options.delay.hide)},show:function(){var e,t,n,r,i,s,o;if(this.hasContent()&&this.enabled){e=this.tip(),this.setContent(),this.options.animation&&e.addClass("fade"),s=typeof this.options.placement=="function"?this.options.placement.call(this,e[0],this.$element[0]):this.options.placement,t=/in/.test(s),e.remove().css({top:0,left:0,display:"block"}).appendTo(t?this.$element:document.body),n=this.getPosition(t),r=e[0].offsetWidth,i=e[0].offsetHeight;switch(t?s.split(" ")[1]:s){case"bottom":o={top:n.top+n.height,left:n.left+n.width/2-r/2};break;case"top":o={top:n.top-i,left:n.left+n.width/2-r/2};break;case"left":o={top:n.top+n.height/2-i/2,left:n.left-r};break;case"right":o={top:n.top+n.height/2-i/2,left:n.left+n.width}}e.css(o).addClass(s).addClass("in")}},setContent:function(){var e=this.tip(),t=this.getTitle();e.find(".tooltip-inner")[this.options.html?"html":"text"](t),e.removeClass("fade in top bottom left right")},hide:function(){function r(){var t=setTimeout(function(){n.off(e.support.transition.end).remove()},500);n.one(e.support.transition.end,function(){clearTimeout(t),n.remove()})}var t=this,n=this.tip();return n.removeClass("in"),e.support.transition&&this.$tip.hasClass("fade")?r():n.remove(),this},fixTitle:function(){var e=this.$element;(e.attr("title")||typeof e.attr("data-original-title")!="string")&&e.attr("data-original-title",e.attr("title")||"").removeAttr("title")},hasContent:function(){return this.getTitle()},getPosition:function(t){return e.extend({},t?{top:0,left:0}:this.$element.offset(),{width:this.$element[0].offsetWidth,height:this.$element[0].offsetHeight})},getTitle:function(){var e,t=this.$element,n=this.options;return e=t.attr("data-original-title")||(typeof n.title=="function"?n.title.call(t[0]):n.title),e},tip:function(){return this.$tip=this.$tip||e(this.options.template)},validate:function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},toggleEnabled:function(){this.enabled=!this.enabled},toggle:function(){this[this.tip().hasClass("in")?"hide":"show"]()},destroy:function(){this.hide().$element.off("."+this.type).removeData(this.type)}},e.fn.tooltip=function(n){return this.each(function(){var r=e(this),i=r.data("tooltip"),s=typeof n=="object"&&n;i||r.data("tooltip",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.tooltip.Constructor=t,e.fn.tooltip.defaults={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover",title:"",delay:0,html:!0}}(window.jQuery),!function(e){"use strict";var t=function(e,t){this.init("popover",e,t)};t.prototype=e.extend({},e.fn.tooltip.Constructor.prototype,{constructor:t,setContent:function(){var e=this.tip(),t=this.getTitle(),n=this.getContent();e.find(".popover-title")[this.options.html?"html":"text"](t),e.find(".popover-content > *")[this.options.html?"html":"text"](n),e.removeClass("fade top bottom left right in")},hasContent:function(){return this.getTitle()||this.getContent()},getContent:function(){var e,t=this.$element,n=this.options;return e=t.attr("data-content")||(typeof n.content=="function"?n.content.call(t[0]):n.content),e},tip:function(){return this.$tip||(this.$tip=e(this.options.template)),this.$tip},destroy:function(){this.hide().$element.off("."+this.type).removeData(this.type)}}),e.fn.popover=function(n){return this.each(function(){var r=e(this),i=r.data("popover"),s=typeof n=="object"&&n;i||r.data("popover",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.popover.Constructor=t,e.fn.popover.defaults=e.extend({},e.fn.tooltip.defaults,{placement:"right",trigger:"click",content:"",template:'<div class="popover"><div class="arrow"></div><div class="popover-inner"><h3 class="popover-title"></h3><div class="popover-content"><p></p></div></div></div>'})}(window.jQuery),!function(e){"use strict";function t(t,n){var r=e.proxy(this.process,this),i=e(t).is("body")?e(window):e(t),s;this.options=e.extend({},e.fn.scrollspy.defaults,n),this.$scrollElement=i.on("scroll.scroll-spy.data-api",r),this.selector=(this.options.target||(s=e(t).attr("href"))&&s.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a",this.$body=e("body"),this.refresh(),this.process()}t.prototype={constructor:t,refresh:function(){var t=this,n;this.offsets=e([]),this.targets=e([]),n=this.$body.find(this.selector).map(function(){var t=e(this),n=t.data("target")||t.attr("href"),r=/^#\w/.test(n)&&e(n);return r&&r.length&&[[r.position().top,n]]||null}).sort(function(e,t){return e[0]-t[0]}).each(function(){t.offsets.push(this[0]),t.targets.push(this[1])})},process:function(){var e=this.$scrollElement.scrollTop()+this.options.offset,t=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight,n=t-this.$scrollElement.height(),r=this.offsets,i=this.targets,s=this.activeTarget,o;if(e>=n)return s!=(o=i.last()[0])&&this.activate(o);for(o=r.length;o--;)s!=i[o]&&e>=r[o]&&(!r[o+1]||e<=r[o+1])&&this.activate(i[o])},activate:function(t){var n,r;this.activeTarget=t,e(this.selector).parent(".active").removeClass("active"),r=this.selector+'[data-target="'+t+'"],'+this.selector+'[href="'+t+'"]',n=e(r).parent("li").addClass("active"),n.parent(".dropdown-menu").length&&(n=n.closest("li.dropdown").addClass("active")),n.trigger("activate")}},e.fn.scrollspy=function(n){return this.each(function(){var r=e(this),i=r.data("scrollspy"),s=typeof n=="object"&&n;i||r.data("scrollspy",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.scrollspy.Constructor=t,e.fn.scrollspy.defaults={offset:10},e(window).on("load",function(){e('[data-spy="scroll"]').each(function(){var t=e(this);t.scrollspy(t.data())})})}(window.jQuery),!function(e){"use strict";var t=function(t){this.element=e(t)};t.prototype={constructor:t,show:function(){var t=this.element,n=t.closest("ul:not(.dropdown-menu)"),r=t.attr("data-target"),i,s,o;r||(r=t.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,""));if(t.parent("li").hasClass("active"))return;i=n.find(".active a").last()[0],o=e.Event("show",{relatedTarget:i}),t.trigger(o);if(o.isDefaultPrevented())return;s=e(r),this.activate(t.parent("li"),n),this.activate(s,s.parent(),function(){t.trigger({type:"shown",relatedTarget:i})})},activate:function(t,n,r){function o(){i.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),t.addClass("active"),s?(t[0].offsetWidth,t.addClass("in")):t.removeClass("fade"),t.parent(".dropdown-menu")&&t.closest("li.dropdown").addClass("active"),r&&r()}var i=n.find("> .active"),s=r&&e.support.transition&&i.hasClass("fade");s?i.one(e.support.transition.end,o):o(),i.removeClass("in")}},e.fn.tab=function(n){return this.each(function(){var r=e(this),i=r.data("tab");i||r.data("tab",i=new t(this)),typeof n=="string"&&i[n]()})},e.fn.tab.Constructor=t,e(function(){e("body").on("click.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(t){t.preventDefault(),e(this).tab("show")})})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.options=e.extend({},e.fn.typeahead.defaults,n),this.matcher=this.options.matcher||this.matcher,this.sorter=this.options.sorter||this.sorter,this.highlighter=this.options.highlighter||this.highlighter,this.updater=this.options.updater||this.updater,this.$menu=e(this.options.menu).appendTo("body"),this.source=this.options.source,this.shown=!1,this.listen()};t.prototype={constructor:t,select:function(){var e=this.$menu.find(".active").attr("data-value");return this.$element.val(this.updater(e)).change(),this.hide()},updater:function(e){return e},show:function(){var t=e.extend({},this.$element.offset(),{height:this.$element[0].offsetHeight});return this.$menu.css({top:t.top+t.height,left:t.left}),this.$menu.show(),this.shown=!0,this},hide:function(){return this.$menu.hide(),this.shown=!1,this},lookup:function(t){var n;return this.query=this.$element.val(),!this.query||this.query.length<this.options.minLength?this.shown?this.hide():this:(n=e.isFunction(this.source)?this.source(this.query,e.proxy(this.process,this)):this.source,n?this.process(n):this)},process:function(t){var n=this;return t=e.grep(t,function(e){return n.matcher(e)}),t=this.sorter(t),t.length?this.render(t.slice(0,this.options.items)).show():this.shown?this.hide():this},matcher:function(e){return~e.toLowerCase().indexOf(this.query.toLowerCase())},sorter:function(e){var t=[],n=[],r=[],i;while(i=e.shift())i.toLowerCase().indexOf(this.query.toLowerCase())?~i.indexOf(this.query)?n.push(i):r.push(i):t.push(i);return t.concat(n,r)},highlighter:function(e){var t=this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&");return e.replace(new RegExp("("+t+")","ig"),function(e,t){return"<strong>"+t+"</strong>"})},render:function(t){var n=this;return t=e(t).map(function(t,r){return t=e(n.options.item).attr("data-value",r),t.find("a").html(n.highlighter(r)),t[0]}),t.first().addClass("active"),this.$menu.html(t),this},next:function(t){var n=this.$menu.find(".active").removeClass("active"),r=n.next();r.length||(r=e(this.$menu.find("li")[0])),r.addClass("active")},prev:function(e){var t=this.$menu.find(".active").removeClass("active"),n=t.prev();n.length||(n=this.$menu.find("li").last()),n.addClass("active")},listen:function(){this.$element.on("blur",e.proxy(this.blur,this)).on("keypress",e.proxy(this.keypress,this)).on("keyup",e.proxy(this.keyup,this)),(e.browser.webkit||e.browser.msie)&&this.$element.on("keydown",e.proxy(this.keydown,this)),this.$menu.on("click",e.proxy(this.click,this)).on("mouseenter","li",e.proxy(this.mouseenter,this))},move:function(e){if(!this.shown)return;switch(e.keyCode){case 9:case 13:case 27:e.preventDefault();break;case 38:e.preventDefault(),this.prev();break;case 40:e.preventDefault(),this.next()}e.stopPropagation()},keydown:function(t){this.suppressKeyPressRepeat=!~e.inArray(t.keyCode,[40,38,9,13,27]),this.move(t)},keypress:function(e){if(this.suppressKeyPressRepeat)return;this.move(e)},keyup:function(e){switch(e.keyCode){case 40:case 38:break;case 9:case 13:if(!this.shown)return;this.select();break;case 27:if(!this.shown)return;this.hide();break;default:this.lookup()}e.stopPropagation(),e.preventDefault()},blur:function(e){var t=this;setTimeout(function(){t.hide()},150)},click:function(e){e.stopPropagation(),e.preventDefault(),this.select()},mouseenter:function(t){this.$menu.find(".active").removeClass("active"),e(t.currentTarget).addClass("active")}},e.fn.typeahead=function(n){return this.each(function(){var r=e(this),i=r.data("typeahead"),s=typeof n=="object"&&n;i||r.data("typeahead",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.typeahead.defaults={source:[],items:8,menu:'<ul class="typeahead dropdown-menu"></ul>',item:'<li><a href="#"></a></li>',minLength:1},e.fn.typeahead.Constructor=t,e(function(){e("body").on("focus.typeahead.data-api",'[data-provide="typeahead"]',function(t){var n=e(this);if(n.data("typeahead"))return;t.preventDefault(),n.typeahead(n.data())})})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.options=e.extend({},e.fn.affix.defaults,n),this.$window=e(window).on("scroll.affix.data-api",e.proxy(this.checkPosition,this)),this.$element=e(t),this.checkPosition()};t.prototype.checkPosition=function(){if(!this.$element.is(":visible"))return;var t=e(document).height(),n=this.$window.scrollTop(),r=this.$element.offset(),i=this.options.offset,s=i.bottom,o=i.top,u="affix affix-top affix-bottom",a;typeof i!="object"&&(s=o=i),typeof o=="function"&&(o=i.top()),typeof s=="function"&&(s=i.bottom()),a=this.unpin!=null&&n+this.unpin<=r.top?!1:s!=null&&r.top+this.$element.height()>=t-s?"bottom":o!=null&&n<=o?"top":!1;if(this.affixed===a)return;this.affixed=a,this.unpin=a=="bottom"?r.top-n:null,this.$element.removeClass(u).addClass("affix"+(a?"-"+a:""))},e.fn.affix=function(n){return this.each(function(){var r=e(this),i=r.data("affix"),s=typeof n=="object"&&n;i||r.data("affix",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.affix.Constructor=t,e.fn.affix.defaults={offset:0},e(window).on("load",function(){e('[data-spy="affix"]').each(function(){var t=e(this),n=t.data();n.offset=n.offset||{},n.offsetBottom&&(n.offset.bottom=n.offsetBottom),n.offsetTop&&(n.offset.top=n.offsetTop),t.affix(n)})})}(window.jQuery);
\ No newline at end of file
diff --git a/src/site/resources/js/jquery.js b/src/site/resources/js/jquery.js
new file mode 100644
index 0000000..8ccd0ea
--- /dev/null
+++ b/src/site/resources/js/jquery.js
@@ -0,0 +1,9266 @@
+/*!
+ * jQuery JavaScript Library v1.7.1
+ * http://jquery.com/
+ *
+ * Copyright 2011, John Resig
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * Includes Sizzle.js
+ * http://sizzlejs.com/
+ * Copyright 2011, The Dojo Foundation
+ * Released under the MIT, BSD, and GPL Licenses.
+ *
+ * Date: Mon Nov 21 21:11:03 2011 -0500
+ */
+(function( window, undefined ) {
+
+// Use the correct document accordingly with window argument (sandbox)
+var document = window.document,
+	navigator = window.navigator,
+	location = window.location;
+var jQuery = (function() {
+
+// Define a local copy of jQuery
+var jQuery = function( selector, context ) {
+		// The jQuery object is actually just the init constructor 'enhanced'
+		return new jQuery.fn.init( selector, context, rootjQuery );
+	},
+
+	// Map over jQuery in case of overwrite
+	_jQuery = window.jQuery,
+
+	// Map over the $ in case of overwrite
+	_$ = window.$,
+
+	// A central reference to the root jQuery(document)
+	rootjQuery,
+
+	// A simple way to check for HTML strings or ID strings
+	// Prioritize #id over <tag> to avoid XSS via location.hash (#9521)
+	quickExpr = /^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,
+
+	// Check if a string has a non-whitespace character in it
+	rnotwhite = /\S/,
+
+	// Used for trimming whitespace
+	trimLeft = /^\s+/,
+	trimRight = /\s+$/,
+
+	// Match a standalone tag
+	rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>)?$/,
+
+	// JSON RegExp
+	rvalidchars = /^[\],:{}\s]*$/,
+	rvalidescape = /\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,
+	rvalidtokens = /"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,
+	rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g,
+
+	// Useragent RegExp
+	rwebkit = /(webkit)[ \/]([\w.]+)/,
+	ropera = /(opera)(?:.*version)?[ \/]([\w.]+)/,
+	rmsie = /(msie) ([\w.]+)/,
+	rmozilla = /(mozilla)(?:.*? rv:([\w.]+))?/,
+
+	// Matches dashed string for camelizing
+	rdashAlpha = /-([a-z]|[0-9])/ig,
+	rmsPrefix = /^-ms-/,
+
+	// Used by jQuery.camelCase as callback to replace()
+	fcamelCase = function( all, letter ) {
+		return ( letter + "" ).toUpperCase();
+	},
+
+	// Keep a UserAgent string for use with jQuery.browser
+	userAgent = navigator.userAgent,
+
+	// For matching the engine and version of the browser
+	browserMatch,
+
+	// The deferred used on DOM ready
+	readyList,
+
+	// The ready event handler
+	DOMContentLoaded,
+
+	// Save a reference to some core methods
+	toString = Object.prototype.toString,
+	hasOwn = Object.prototype.hasOwnProperty,
+	push = Array.prototype.push,
+	slice = Array.prototype.slice,
+	trim = String.prototype.trim,
+	indexOf = Array.prototype.indexOf,
+
+	// [[Class]] -> type pairs
+	class2type = {};
+
+jQuery.fn = jQuery.prototype = {
+	constructor: jQuery,
+	init: function( selector, context, rootjQuery ) {
+		var match, elem, ret, doc;
+
+		// Handle $(""), $(null), or $(undefined)
+		if ( !selector ) {
+			return this;
+		}
+
+		// Handle $(DOMElement)
+		if ( selector.nodeType ) {
+			this.context = this[0] = selector;
+			this.length = 1;
+			return this;
+		}
+
+		// The body element only exists once, optimize finding it
+		if ( selector === "body" && !context && document.body ) {
+			this.context = document;
+			this[0] = document.body;
+			this.selector = selector;
+			this.length = 1;
+			return this;
+		}
+
+		// Handle HTML strings
+		if ( typeof selector === "string" ) {
+			// Are we dealing with HTML string or an ID?
+			if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) {
+				// Assume that strings that start and end with <> are HTML and skip the regex check
+				match = [ null, selector, null ];
+
+			} else {
+				match = quickExpr.exec( selector );
+			}
+
+			// Verify a match, and that no context was specified for #id
+			if ( match && (match[1] || !context) ) {
+
+				// HANDLE: $(html) -> $(array)
+				if ( match[1] ) {
+					context = context instanceof jQuery ? context[0] : context;
+					doc = ( context ? context.ownerDocument || context : document );
+
+					// If a single string is passed in and it's a single tag
+					// just do a createElement and skip the rest
+					ret = rsingleTag.exec( selector );
+
+					if ( ret ) {
+						if ( jQuery.isPlainObject( context ) ) {
+							selector = [ document.createElement( ret[1] ) ];
+							jQuery.fn.attr.call( selector, context, true );
+
+						} else {
+							selector = [ doc.createElement( ret[1] ) ];
+						}
+
+					} else {
+						ret = jQuery.buildFragment( [ match[1] ], [ doc ] );
+						selector = ( ret.cacheable ? jQuery.clone(ret.fragment) : ret.fragment ).childNodes;
+					}
+
+					return jQuery.merge( this, selector );
+
+				// HANDLE: $("#id")
+				} else {
+					elem = document.getElementById( match[2] );
+
+					// Check parentNode to catch when Blackberry 4.6 returns
+					// nodes that are no longer in the document #6963
+					if ( elem && elem.parentNode ) {
+						// Handle the case where IE and Opera return items
+						// by name instead of ID
+						if ( elem.id !== match[2] ) {
+							return rootjQuery.find( selector );
+						}
+
+						// Otherwise, we inject the element directly into the jQuery object
+						this.length = 1;
+						this[0] = elem;
+					}
+
+					this.context = document;
+					this.selector = selector;
+					return this;
+				}
+
+			// HANDLE: $(expr, $(...))
+			} else if ( !context || context.jquery ) {
+				return ( context || rootjQuery ).find( selector );
+
+			// HANDLE: $(expr, context)
+			// (which is just equivalent to: $(context).find(expr)
+			} else {
+				return this.constructor( context ).find( selector );
+			}
+
+		// HANDLE: $(function)
+		// Shortcut for document ready
+		} else if ( jQuery.isFunction( selector ) ) {
+			return rootjQuery.ready( selector );
+		}
+
+		if ( selector.selector !== undefined ) {
+			this.selector = selector.selector;
+			this.context = selector.context;
+		}
+
+		return jQuery.makeArray( selector, this );
+	},
+
+	// Start with an empty selector
+	selector: "",
+
+	// The current version of jQuery being used
+	jquery: "1.7.1",
+
+	// The default length of a jQuery object is 0
+	length: 0,
+
+	// The number of elements contained in the matched element set
+	size: function() {
+		return this.length;
+	},
+
+	toArray: function() {
+		return slice.call( this, 0 );
+	},
+
+	// Get the Nth element in the matched element set OR
+	// Get the whole matched element set as a clean array
+	get: function( num ) {
+		return num == null ?
+
+			// Return a 'clean' array
+			this.toArray() :
+
+			// Return just the object
+			( num < 0 ? this[ this.length + num ] : this[ num ] );
+	},
+
+	// Take an array of elements and push it onto the stack
+	// (returning the new matched element set)
+	pushStack: function( elems, name, selector ) {
+		// Build a new jQuery matched element set
+		var ret = this.constructor();
+
+		if ( jQuery.isArray( elems ) ) {
+			push.apply( ret, elems );
+
+		} else {
+			jQuery.merge( ret, elems );
+		}
+
+		// Add the old object onto the stack (as a reference)
+		ret.prevObject = this;
+
+		ret.context = this.context;
+
+		if ( name === "find" ) {
+			ret.selector = this.selector + ( this.selector ? " " : "" ) + selector;
+		} else if ( name ) {
+			ret.selector = this.selector + "." + name + "(" + selector + ")";
+		}
+
+		// Return the newly-formed element set
+		return ret;
+	},
+
+	// Execute a callback for every element in the matched set.
+	// (You can seed the arguments with an array of args, but this is
+	// only used internally.)
+	each: function( callback, args ) {
+		return jQuery.each( this, callback, args );
+	},
+
+	ready: function( fn ) {
+		// Attach the listeners
+		jQuery.bindReady();
+
+		// Add the callback
+		readyList.add( fn );
+
+		return this;
+	},
+
+	eq: function( i ) {
+		i = +i;
+		return i === -1 ?
+			this.slice( i ) :
+			this.slice( i, i + 1 );
+	},
+
+	first: function() {
+		return this.eq( 0 );
+	},
+
+	last: function() {
+		return this.eq( -1 );
+	},
+
+	slice: function() {
+		return this.pushStack( slice.apply( this, arguments ),
+			"slice", slice.call(arguments).join(",") );
+	},
+
+	map: function( callback ) {
+		return this.pushStack( jQuery.map(this, function( elem, i ) {
+			return callback.call( elem, i, elem );
+		}));
+	},
+
+	end: function() {
+		return this.prevObject || this.constructor(null);
+	},
+
+	// For internal use only.
+	// Behaves like an Array's method, not like a jQuery method.
+	push: push,
+	sort: [].sort,
+	splice: [].splice
+};
+
+// Give the init function the jQuery prototype for later instantiation
+jQuery.fn.init.prototype = jQuery.fn;
+
+jQuery.extend = jQuery.fn.extend = function() {
+	var options, name, src, copy, copyIsArray, clone,
+		target = arguments[0] || {},
+		i = 1,
+		length = arguments.length,
+		deep = false;
+
+	// Handle a deep copy situation
+	if ( typeof target === "boolean" ) {
+		deep = target;
+		target = arguments[1] || {};
+		// skip the boolean and the target
+		i = 2;
+	}
+
+	// Handle case when target is a string or something (possible in deep copy)
+	if ( typeof target !== "object" && !jQuery.isFunction(target) ) {
+		target = {};
+	}
+
+	// extend jQuery itself if only one argument is passed
+	if ( length === i ) {
+		target = this;
+		--i;
+	}
+
+	for ( ; i < length; i++ ) {
+		// Only deal with non-null/undefined values
+		if ( (options = arguments[ i ]) != null ) {
+			// Extend the base object
+			for ( name in options ) {
+				src = target[ name ];
+				copy = options[ name ];
+
+				// Prevent never-ending loop
+				if ( target === copy ) {
+					continue;
+				}
+
+				// Recurse if we're merging plain objects or arrays
+				if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) {
+					if ( copyIsArray ) {
+						copyIsArray = false;
+						clone = src && jQuery.isArray(src) ? src : [];
+
+					} else {
+						clone = src && jQuery.isPlainObject(src) ? src : {};
+					}
+
+					// Never move original objects, clone them
+					target[ name ] = jQuery.extend( deep, clone, copy );
+
+				// Don't bring in undefined values
+				} else if ( copy !== undefined ) {
+					target[ name ] = copy;
+				}
+			}
+		}
+	}
+
+	// Return the modified object
+	return target;
+};
+
+jQuery.extend({
+	noConflict: function( deep ) {
+		if ( window.$ === jQuery ) {
+			window.$ = _$;
+		}
+
+		if ( deep && window.jQuery === jQuery ) {
+			window.jQuery = _jQuery;
+		}
+
+		return jQuery;
+	},
+
+	// Is the DOM ready to be used? Set to true once it occurs.
+	isReady: false,
+
+	// A counter to track how many items to wait for before
+	// the ready event fires. See #6781
+	readyWait: 1,
+
+	// Hold (or release) the ready event
+	holdReady: function( hold ) {
+		if ( hold ) {
+			jQuery.readyWait++;
+		} else {
+			jQuery.ready( true );
+		}
+	},
+
+	// Handle when the DOM is ready
+	ready: function( wait ) {
+		// Either a released hold or an DOMready/load event and not yet ready
+		if ( (wait === true && !--jQuery.readyWait) || (wait !== true && !jQuery.isReady) ) {
+			// Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).
+			if ( !document.body ) {
+				return setTimeout( jQuery.ready, 1 );
+			}
+
+			// Remember that the DOM is ready
+			jQuery.isReady = true;
+
+			// If a normal DOM Ready event fired, decrement, and wait if need be
+			if ( wait !== true && --jQuery.readyWait > 0 ) {
+				return;
+			}
+
+			// If there are functions bound, to execute
+			readyList.fireWith( document, [ jQuery ] );
+
+			// Trigger any bound ready events
+			if ( jQuery.fn.trigger ) {
+				jQuery( document ).trigger( "ready" ).off( "ready" );
+			}
+		}
+	},
+
+	bindReady: function() {
+		if ( readyList ) {
+			return;
+		}
+
+		readyList = jQuery.Callbacks( "once memory" );
+
+		// Catch cases where $(document).ready() is called after the
+		// browser event has already occurred.
+		if ( document.readyState === "complete" ) {
+			// Handle it asynchronously to allow scripts the opportunity to delay ready
+			return setTimeout( jQuery.ready, 1 );
+		}
+
+		// Mozilla, Opera and webkit nightlies currently support this event
+		if ( document.addEventListener ) {
+			// Use the handy event callback
+			document.addEventListener( "DOMContentLoaded", DOMContentLoaded, false );
+
+			// A fallback to window.onload, that will always work
+			window.addEventListener( "load", jQuery.ready, false );
+
+		// If IE event model is used
+		} else if ( document.attachEvent ) {
+			// ensure firing before onload,
+			// maybe late but safe also for iframes
+			document.attachEvent( "onreadystatechange", DOMContentLoaded );
+
+			// A fallback to window.onload, that will always work
+			window.attachEvent( "onload", jQuery.ready );
+
+			// If IE and not a frame
+			// continually check to see if the document is ready
+			var toplevel = false;
+
+			try {
+				toplevel = window.frameElement == null;
+			} catch(e) {}
+
+			if ( document.documentElement.doScroll && toplevel ) {
+				doScrollCheck();
+			}
+		}
+	},
+
+	// See test/unit/core.js for details concerning isFunction.
+	// Since version 1.3, DOM methods and functions like alert
+	// aren't supported. They return false on IE (#2968).
+	isFunction: function( obj ) {
+		return jQuery.type(obj) === "function";
+	},
+
+	isArray: Array.isArray || function( obj ) {
+		return jQuery.type(obj) === "array";
+	},
+
+	// A crude way of determining if an object is a window
+	isWindow: function( obj ) {
+		return obj && typeof obj === "object" && "setInterval" in obj;
+	},
+
+	isNumeric: function( obj ) {
+		return !isNaN( parseFloat(obj) ) && isFinite( obj );
+	},
+
+	type: function( obj ) {
+		return obj == null ?
+			String( obj ) :
+			class2type[ toString.call(obj) ] || "object";
+	},
+
+	isPlainObject: function( obj ) {
+		// Must be an Object.
+		// Because of IE, we also have to check the presence of the constructor property.
+		// Make sure that DOM nodes and window objects don't pass through, as well
+		if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) {
+			return false;
+		}
+
+		try {
+			// Not own constructor property must be Object
+			if ( obj.constructor &&
+				!hasOwn.call(obj, "constructor") &&
+				!hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) {
+				return false;
+			}
+		} catch ( e ) {
+			// IE8,9 Will throw exceptions on certain host objects #9897
+			return false;
+		}
+
+		// Own properties are enumerated firstly, so to speed up,
+		// if last one is own, then all properties are own.
+
+		var key;
+		for ( key in obj ) {}
+
+		return key === undefined || hasOwn.call( obj, key );
+	},
+
+	isEmptyObject: function( obj ) {
+		for ( var name in obj ) {
+			return false;
+		}
+		return true;
+	},
+
+	error: function( msg ) {
+		throw new Error( msg );
+	},
+
+	parseJSON: function( data ) {
+		if ( typeof data !== "string" || !data ) {
+			return null;
+		}
+
+		// Make sure leading/trailing whitespace is removed (IE can't handle it)
+		data = jQuery.trim( data );
+
+		// Attempt to parse using the native JSON parser first
+		if ( window.JSON && window.JSON.parse ) {
+			return window.JSON.parse( data );
+		}
+
+		// Make sure the incoming data is actual JSON
+		// Logic borrowed from http://json.org/json2.js
+		if ( rvalidchars.test( data.replace( rvalidescape, "@" )
+			.replace( rvalidtokens, "]" )
+			.replace( rvalidbraces, "")) ) {
+
+			return ( new Function( "return " + data ) )();
+
+		}
+		jQuery.error( "Invalid JSON: " + data );
+	},
+
+	// Cross-browser xml parsing
+	parseXML: function( data ) {
+		var xml, tmp;
+		try {
+			if ( window.DOMParser ) { // Standard
+				tmp = new DOMParser();
+				xml = tmp.parseFromString( data , "text/xml" );
+			} else { // IE
+				xml = new ActiveXObject( "Microsoft.XMLDOM" );
+				xml.async = "false";
+				xml.loadXML( data );
+			}
+		} catch( e ) {
+			xml = undefined;
+		}
+		if ( !xml || !xml.documentElement || xml.getElementsByTagName( "parsererror" ).length ) {
+			jQuery.error( "Invalid XML: " + data );
+		}
+		return xml;
+	},
+
+	noop: function() {},
+
+	// Evaluates a script in a global context
+	// Workarounds based on findings by Jim Driscoll
+	// http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context
+	globalEval: function( data ) {
+		if ( data && rnotwhite.test( data ) ) {
+			// We use execScript on Internet Explorer
+			// We use an anonymous function so that context is window
+			// rather than jQuery in Firefox
+			( window.execScript || function( data ) {
+				window[ "eval" ].call( window, data );
+			} )( data );
+		}
+	},
+
+	// Convert dashed to camelCase; used by the css and data modules
+	// Microsoft forgot to hump their vendor prefix (#9572)
+	camelCase: function( string ) {
+		return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase );
+	},
+
+	nodeName: function( elem, name ) {
+		return elem.nodeName && elem.nodeName.toUpperCase() === name.toUpperCase();
+	},
+
+	// args is for internal usage only
+	each: function( object, callback, args ) {
+		var name, i = 0,
+			length = object.length,
+			isObj = length === undefined || jQuery.isFunction( object );
+
+		if ( args ) {
+			if ( isObj ) {
+				for ( name in object ) {
+					if ( callback.apply( object[ name ], args ) === false ) {
+						break;
+					}
+				}
+			} else {
+				for ( ; i < length; ) {
+					if ( callback.apply( object[ i++ ], args ) === false ) {
+						break;
+					}
+				}
+			}
+
+		// A special, fast, case for the most common use of each
+		} else {
+			if ( isObj ) {
+				for ( name in object ) {
+					if ( callback.call( object[ name ], name, object[ name ] ) === false ) {
+						break;
+					}
+				}
+			} else {
+				for ( ; i < length; ) {
+					if ( callback.call( object[ i ], i, object[ i++ ] ) === false ) {
+						break;
+					}
+				}
+			}
+		}
+
+		return object;
+	},
+
+	// Use native String.trim function wherever possible
+	trim: trim ?
+		function( text ) {
+			return text == null ?
+				"" :
+				trim.call( text );
+		} :
+
+		// Otherwise use our own trimming functionality
+		function( text ) {
+			return text == null ?
+				"" :
+				text.toString().replace( trimLeft, "" ).replace( trimRight, "" );
+		},
+
+	// results is for internal usage only
+	makeArray: function( array, results ) {
+		var ret = results || [];
+
+		if ( array != null ) {
+			// The window, strings (and functions) also have 'length'
+			// Tweaked logic slightly to handle Blackberry 4.7 RegExp issues #6930
+			var type = jQuery.type( array );
+
+			if ( array.length == null || type === "string" || type === "function" || type === "regexp" || jQuery.isWindow( array ) ) {
+				push.call( ret, array );
+			} else {
+				jQuery.merge( ret, array );
+			}
+		}
+
+		return ret;
+	},
+
+	inArray: function( elem, array, i ) {
+		var len;
+
+		if ( array ) {
+			if ( indexOf ) {
+				return indexOf.call( array, elem, i );
+			}
+
+			len = array.length;
+			i = i ? i < 0 ? Math.max( 0, len + i ) : i : 0;
+
+			for ( ; i < len; i++ ) {
+				// Skip accessing in sparse arrays
+				if ( i in array && array[ i ] === elem ) {
+					return i;
+				}
+			}
+		}
+
+		return -1;
+	},
+
+	merge: function( first, second ) {
+		var i = first.length,
+			j = 0;
+
+		if ( typeof second.length === "number" ) {
+			for ( var l = second.length; j < l; j++ ) {
+				first[ i++ ] = second[ j ];
+			}
+
+		} else {
+			while ( second[j] !== undefined ) {
+				first[ i++ ] = second[ j++ ];
+			}
+		}
+
+		first.length = i;
+
+		return first;
+	},
+
+	grep: function( elems, callback, inv ) {
+		var ret = [], retVal;
+		inv = !!inv;
+
+		// Go through the array, only saving the items
+		// that pass the validator function
+		for ( var i = 0, length = elems.length; i < length; i++ ) {
+			retVal = !!callback( elems[ i ], i );
+			if ( inv !== retVal ) {
+				ret.push( elems[ i ] );
+			}
+		}
+
+		return ret;
+	},
+
+	// arg is for internal usage only
+	map: function( elems, callback, arg ) {
+		var value, key, ret = [],
+			i = 0,
+			length = elems.length,
+			// jquery objects are treated as arrays
+			isArray = elems instanceof jQuery || length !== undefined && typeof length === "number" && ( ( length > 0 && elems[ 0 ] && elems[ length -1 ] ) || length === 0 || jQuery.isArray( elems ) ) ;
+
+		// Go through the array, translating each of the items to their
+		if ( isArray ) {
+			for ( ; i < length; i++ ) {
+				value = callback( elems[ i ], i, arg );
+
+				if ( value != null ) {
+					ret[ ret.length ] = value;
+				}
+			}
+
+		// Go through every key on the object,
+		} else {
+			for ( key in elems ) {
+				value = callback( elems[ key ], key, arg );
+
+				if ( value != null ) {
+					ret[ ret.length ] = value;
+				}
+			}
+		}
+
+		// Flatten any nested arrays
+		return ret.concat.apply( [], ret );
+	},
+
+	// A global GUID counter for objects
+	guid: 1,
+
+	// Bind a function to a context, optionally partially applying any
+	// arguments.
+	proxy: function( fn, context ) {
+		if ( typeof context === "string" ) {
+			var tmp = fn[ context ];
+			context = fn;
+			fn = tmp;
+		}
+
+		// Quick check to determine if target is callable, in the spec
+		// this throws a TypeError, but we will just return undefined.
+		if ( !jQuery.isFunction( fn ) ) {
+			return undefined;
+		}
+
+		// Simulated bind
+		var args = slice.call( arguments, 2 ),
+			proxy = function() {
+				return fn.apply( context, args.concat( slice.call( arguments ) ) );
+			};
+
+		// Set the guid of unique handler to the same of original handler, so it can be removed
+		proxy.guid = fn.guid = fn.guid || proxy.guid || jQuery.guid++;
+
+		return proxy;
+	},
+
+	// Mutifunctional method to get and set values to a collection
+	// The value/s can optionally be executed if it's a function
+	access: function( elems, key, value, exec, fn, pass ) {
+		var length = elems.length;
+
+		// Setting many attributes
+		if ( typeof key === "object" ) {
+			for ( var k in key ) {
+				jQuery.access( elems, k, key[k], exec, fn, value );
+			}
+			return elems;
+		}
+
+		// Setting one attribute
+		if ( value !== undefined ) {
+			// Optionally, function values get executed if exec is true
+			exec = !pass && exec && jQuery.isFunction(value);
+
+			for ( var i = 0; i < length; i++ ) {
+				fn( elems[i], key, exec ? value.call( elems[i], i, fn( elems[i], key ) ) : value, pass );
+			}
+
+			return elems;
+		}
+
+		// Getting an attribute
+		return length ? fn( elems[0], key ) : undefined;
+	},
+
+	now: function() {
+		return ( new Date() ).getTime();
+	},
+
+	// Use of jQuery.browser is frowned upon.
+	// More details: http://docs.jquery.com/Utilities/jQuery.browser
+	uaMatch: function( ua ) {
+		ua = ua.toLowerCase();
+
+		var match = rwebkit.exec( ua ) ||
+			ropera.exec( ua ) ||
+			rmsie.exec( ua ) ||
+			ua.indexOf("compatible") < 0 && rmozilla.exec( ua ) ||
+			[];
+
+		return { browser: match[1] || "", version: match[2] || "0" };
+	},
+
+	sub: function() {
+		function jQuerySub( selector, context ) {
+			return new jQuerySub.fn.init( selector, context );
+		}
+		jQuery.extend( true, jQuerySub, this );
+		jQuerySub.superclass = this;
+		jQuerySub.fn = jQuerySub.prototype = this();
+		jQuerySub.fn.constructor = jQuerySub;
+		jQuerySub.sub = this.sub;
+		jQuerySub.fn.init = function init( selector, context ) {
+			if ( context && context instanceof jQuery && !(context instanceof jQuerySub) ) {
+				context = jQuerySub( context );
+			}
+
+			return jQuery.fn.init.call( this, selector, context, rootjQuerySub );
+		};
+		jQuerySub.fn.init.prototype = jQuerySub.fn;
+		var rootjQuerySub = jQuerySub(document);
+		return jQuerySub;
+	},
+
+	browser: {}
+});
+
+// Populate the class2type map
+jQuery.each("Boolean Number String Function Array Date RegExp Object".split(" "), function(i, name) {
+	class2type[ "[object " + name + "]" ] = name.toLowerCase();
+});
+
+browserMatch = jQuery.uaMatch( userAgent );
+if ( browserMatch.browser ) {
+	jQuery.browser[ browserMatch.browser ] = true;
+	jQuery.browser.version = browserMatch.version;
+}
+
+// Deprecated, use jQuery.browser.webkit instead
+if ( jQuery.browser.webkit ) {
+	jQuery.browser.safari = true;
+}
+
+// IE doesn't match non-breaking spaces with \s
+if ( rnotwhite.test( "\xA0" ) ) {
+	trimLeft = /^[\s\xA0]+/;
+	trimRight = /[\s\xA0]+$/;
+}
+
+// All jQuery objects should point back to these
+rootjQuery = jQuery(document);
+
+// Cleanup functions for the document ready method
+if ( document.addEventListener ) {
+	DOMContentLoaded = function() {
+		document.removeEventListener( "DOMContentLoaded", DOMContentLoaded, false );
+		jQuery.ready();
+	};
+
+} else if ( document.attachEvent ) {
+	DOMContentLoaded = function() {
+		// Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).
+		if ( document.readyState === "complete" ) {
+			document.detachEvent( "onreadystatechange", DOMContentLoaded );
+			jQuery.ready();
+		}
+	};
+}
+
+// The DOM ready check for Internet Explorer
+function doScrollCheck() {
+	if ( jQuery.isReady ) {
+		return;
+	}
+
+	try {
+		// If IE is used, use the trick by Diego Perini
+		// http://javascript.nwbox.com/IEContentLoaded/
+		document.documentElement.doScroll("left");
+	} catch(e) {
+		setTimeout( doScrollCheck, 1 );
+		return;
+	}
+
+	// and execute any waiting functions
+	jQuery.ready();
+}
+
+return jQuery;
+
+})();
+
+
+// String to Object flags format cache
+var flagsCache = {};
+
+// Convert String-formatted flags into Object-formatted ones and store in cache
+function createFlags( flags ) {
+	var object = flagsCache[ flags ] = {},
+		i, length;
+	flags = flags.split( /\s+/ );
+	for ( i = 0, length = flags.length; i < length; i++ ) {
+		object[ flags[i] ] = true;
+	}
+	return object;
+}
+
+/*
+ * Create a callback list using the following parameters:
+ *
+ *	flags:	an optional list of space-separated flags that will change how
+ *			the callback list behaves
+ *
+ * By default a callback list will act like an event callback list and can be
+ * "fired" multiple times.
+ *
+ * Possible flags:
+ *
+ *	once:			will ensure the callback list can only be fired once (like a Deferred)
+ *
+ *	memory:			will keep track of previous values and will call any callback added
+ *					after the list has been fired right away with the latest "memorized"
+ *					values (like a Deferred)
+ *
+ *	unique:			will ensure a callback can only be added once (no duplicate in the list)
+ *
+ *	stopOnFalse:	interrupt callings when a callback returns false
+ *
+ */
+jQuery.Callbacks = function( flags ) {
+
+	// Convert flags from String-formatted to Object-formatted
+	// (we check in cache first)
+	flags = flags ? ( flagsCache[ flags ] || createFlags( flags ) ) : {};
+
+	var // Actual callback list
+		list = [],
+		// Stack of fire calls for repeatable lists
+		stack = [],
+		// Last fire value (for non-forgettable lists)
+		memory,
+		// Flag to know if list is currently firing
+		firing,
+		// First callback to fire (used internally by add and fireWith)
+		firingStart,
+		// End of the loop when firing
+		firingLength,
+		// Index of currently firing callback (modified by remove if needed)
+		firingIndex,
+		// Add one or several callbacks to the list
+		add = function( args ) {
+			var i,
+				length,
+				elem,
+				type,
+				actual;
+			for ( i = 0, length = args.length; i < length; i++ ) {
+				elem = args[ i ];
+				type = jQuery.type( elem );
+				if ( type === "array" ) {
+					// Inspect recursively
+					add( elem );
+				} else if ( type === "function" ) {
+					// Add if not in unique mode and callback is not in
+					if ( !flags.unique || !self.has( elem ) ) {
+						list.push( elem );
+					}
+				}
+			}
+		},
+		// Fire callbacks
+		fire = function( context, args ) {
+			args = args || [];
+			memory = !flags.memory || [ context, args ];
+			firing = true;
+			firingIndex = firingStart || 0;
+			firingStart = 0;
+			firingLength = list.length;
+			for ( ; list && firingIndex < firingLength; firingIndex++ ) {
+				if ( list[ firingIndex ].apply( context, args ) === false && flags.stopOnFalse ) {
+					memory = true; // Mark as halted
+					break;
+				}
+			}
+			firing = false;
+			if ( list ) {
+				if ( !flags.once ) {
+					if ( stack && stack.length ) {
+						memory = stack.shift();
+						self.fireWith( memory[ 0 ], memory[ 1 ] );
+					}
+				} else if ( memory === true ) {
+					self.disable();
+				} else {
+					list = [];
+				}
+			}
+		},
+		// Actual Callbacks object
+		self = {
+			// Add a callback or a collection of callbacks to the list
+			add: function() {
+				if ( list ) {
+					var length = list.length;
+					add( arguments );
+					// Do we need to add the callbacks to the
+					// current firing batch?
+					if ( firing ) {
+						firingLength = list.length;
+					// With memory, if we're not firing then
+					// we should call right away, unless previous
+					// firing was halted (stopOnFalse)
+					} else if ( memory && memory !== true ) {
+						firingStart = length;
+						fire( memory[ 0 ], memory[ 1 ] );
+					}
+				}
+				return this;
+			},
+			// Remove a callback from the list
+			remove: function() {
+				if ( list ) {
+					var args = arguments,
+						argIndex = 0,
+						argLength = args.length;
+					for ( ; argIndex < argLength ; argIndex++ ) {
+						for ( var i = 0; i < list.length; i++ ) {
+							if ( args[ argIndex ] === list[ i ] ) {
+								// Handle firingIndex and firingLength
+								if ( firing ) {
+									if ( i <= firingLength ) {
+										firingLength--;
+										if ( i <= firingIndex ) {
+											firingIndex--;
+										}
+									}
+								}
+								// Remove the element
+								list.splice( i--, 1 );
+								// If we have some unicity property then
+								// we only need to do this once
+								if ( flags.unique ) {
+									break;
+								}
+							}
+						}
+					}
+				}
+				return this;
+			},
+			// Control if a given callback is in the list
+			has: function( fn ) {
+				if ( list ) {
+					var i = 0,
+						length = list.length;
+					for ( ; i < length; i++ ) {
+						if ( fn === list[ i ] ) {
+							return true;
+						}
+					}
+				}
+				return false;
+			},
+			// Remove all callbacks from the list
+			empty: function() {
+				list = [];
+				return this;
+			},
+			// Have the list do nothing anymore
+			disable: function() {
+				list = stack = memory = undefined;
+				return this;
+			},
+			// Is it disabled?
+			disabled: function() {
+				return !list;
+			},
+			// Lock the list in its current state
+			lock: function() {
+				stack = undefined;
+				if ( !memory || memory === true ) {
+					self.disable();
+				}
+				return this;
+			},
+			// Is it locked?
+			locked: function() {
+				return !stack;
+			},
+			// Call all callbacks with the given context and arguments
+			fireWith: function( context, args ) {
+				if ( stack ) {
+					if ( firing ) {
+						if ( !flags.once ) {
+							stack.push( [ context, args ] );
+						}
+					} else if ( !( flags.once && memory ) ) {
+						fire( context, args );
+					}
+				}
+				return this;
+			},
+			// Call all the callbacks with the given arguments
+			fire: function() {
+				self.fireWith( this, arguments );
+				return this;
+			},
+			// To know if the callbacks have already been called at least once
+			fired: function() {
+				return !!memory;
+			}
+		};
+
+	return self;
+};
+
+
+
+
+var // Static reference to slice
+	sliceDeferred = [].slice;
+
+jQuery.extend({
+
+	Deferred: function( func ) {
+		var doneList = jQuery.Callbacks( "once memory" ),
+			failList = jQuery.Callbacks( "once memory" ),
+			progressList = jQuery.Callbacks( "memory" ),
+			state = "pending",
+			lists = {
+				resolve: doneList,
+				reject: failList,
+				notify: progressList
+			},
+			promise = {
+				done: doneList.add,
+				fail: failList.add,
+				progress: progressList.add,
+
+				state: function() {
+					return state;
+				},
+
+				// Deprecated
+				isResolved: doneList.fired,
+				isRejected: failList.fired,
+
+				then: function( doneCallbacks, failCallbacks, progressCallbacks ) {
+					deferred.done( doneCallbacks ).fail( failCallbacks ).progress( progressCallbacks );
+					return this;
+				},
+				always: function() {
+					deferred.done.apply( deferred, arguments ).fail.apply( deferred, arguments );
+					return this;
+				},
+				pipe: function( fnDone, fnFail, fnProgress ) {
+					return jQuery.Deferred(function( newDefer ) {
+						jQuery.each( {
+							done: [ fnDone, "resolve" ],
+							fail: [ fnFail, "reject" ],
+							progress: [ fnProgress, "notify" ]
+						}, function( handler, data ) {
+							var fn = data[ 0 ],
+								action = data[ 1 ],
+								returned;
+							if ( jQuery.isFunction( fn ) ) {
+								deferred[ handler ](function() {
+									returned = fn.apply( this, arguments );
+									if ( returned && jQuery.isFunction( returned.promise ) ) {
+										returned.promise().then( newDefer.resolve, newDefer.reject, newDefer.notify );
+									} else {
+										newDefer[ action + "With" ]( this === deferred ? newDefer : this, [ returned ] );
+									}
+								});
+							} else {
+								deferred[ handler ]( newDefer[ action ] );
+							}
+						});
+					}).promise();
+				},
+				// Get a promise for this deferred
+				// If obj is provided, the promise aspect is added to the object
+				promise: function( obj ) {
+					if ( obj == null ) {
+						obj = promise;
+					} else {
+						for ( var key in promise ) {
+							obj[ key ] = promise[ key ];
+						}
+					}
+					return obj;
+				}
+			},
+			deferred = promise.promise({}),
+			key;
+
+		for ( key in lists ) {
+			deferred[ key ] = lists[ key ].fire;
+			deferred[ key + "With" ] = lists[ key ].fireWith;
+		}
+
+		// Handle state
+		deferred.done( function() {
+			state = "resolved";
+		}, failList.disable, progressList.lock ).fail( function() {
+			state = "rejected";
+		}, doneList.disable, progressList.lock );
+
+		// Call given func if any
+		if ( func ) {
+			func.call( deferred, deferred );
+		}
+
+		// All done!
+		return deferred;
+	},
+
+	// Deferred helper
+	when: function( firstParam ) {
+		var args = sliceDeferred.call( arguments, 0 ),
+			i = 0,
+			length = args.length,
+			pValues = new Array( length ),
+			count = length,
+			pCount = length,
+			deferred = length <= 1 && firstParam && jQuery.isFunction( firstParam.promise ) ?
+				firstParam :
+				jQuery.Deferred(),
+			promise = deferred.promise();
+		function resolveFunc( i ) {
+			return function( value ) {
+				args[ i ] = arguments.length > 1 ? sliceDeferred.call( arguments, 0 ) : value;
+				if ( !( --count ) ) {
+					deferred.resolveWith( deferred, args );
+				}
+			};
+		}
+		function progressFunc( i ) {
+			return function( value ) {
+				pValues[ i ] = arguments.length > 1 ? sliceDeferred.call( arguments, 0 ) : value;
+				deferred.notifyWith( promise, pValues );
+			};
+		}
+		if ( length > 1 ) {
+			for ( ; i < length; i++ ) {
+				if ( args[ i ] && args[ i ].promise && jQuery.isFunction( args[ i ].promise ) ) {
+					args[ i ].promise().then( resolveFunc(i), deferred.reject, progressFunc(i) );
+				} else {
+					--count;
+				}
+			}
+			if ( !count ) {
+				deferred.resolveWith( deferred, args );
+			}
+		} else if ( deferred !== firstParam ) {
+			deferred.resolveWith( deferred, length ? [ firstParam ] : [] );
+		}
+		return promise;
+	}
+});
+
+
+
+
+jQuery.support = (function() {
+
+	var support,
+		all,
+		a,
+		select,
+		opt,
+		input,
+		marginDiv,
+		fragment,
+		tds,
+		events,
+		eventName,
+		i,
+		isSupported,
+		div = document.createElement( "div" ),
+		documentElement = document.documentElement;
+
+	// Preliminary tests
+	div.setAttribute("className", "t");
+	div.innerHTML = "   <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>";
+
+	all = div.getElementsByTagName( "*" );
+	a = div.getElementsByTagName( "a" )[ 0 ];
+
+	// Can't get basic test support
+	if ( !all || !all.length || !a ) {
+		return {};
+	}
+
+	// First batch of supports tests
+	select = document.createElement( "select" );
+	opt = select.appendChild( document.createElement("option") );
+	input = div.getElementsByTagName( "input" )[ 0 ];
+
+	support = {
+		// IE strips leading whitespace when .innerHTML is used
+		leadingWhitespace: ( div.firstChild.nodeType === 3 ),
+
+		// Make sure that tbody elements aren't automatically inserted
+		// IE will insert them into empty tables
+		tbody: !div.getElementsByTagName("tbody").length,
+
+		// Make sure that link elements get serialized correctly by innerHTML
+		// This requires a wrapper element in IE
+		htmlSerialize: !!div.getElementsByTagName("link").length,
+
+		// Get the style information from getAttribute
+		// (IE uses .cssText instead)
+		style: /top/.test( a.getAttribute("style") ),
+
+		// Make sure that URLs aren't manipulated
+		// (IE normalizes it by default)
+		hrefNormalized: ( a.getAttribute("href") === "/a" ),
+
+		// Make sure that element opacity exists
+		// (IE uses filter instead)
+		// Use a regex to work around a WebKit issue. See #5145
+		opacity: /^0.55/.test( a.style.opacity ),
+
+		// Verify style float existence
+		// (IE uses styleFloat instead of cssFloat)
+		cssFloat: !!a.style.cssFloat,
+
+		// Make sure that if no value is specified for a checkbox
+		// that it defaults to "on".
+		// (WebKit defaults to "" instead)
+		checkOn: ( input.value === "on" ),
+
+		// Make sure that a selected-by-default option has a working selected property.
+		// (WebKit defaults to false instead of true, IE too, if it's in an optgroup)
+		optSelected: opt.selected,
+
+		// Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7)
+		getSetAttribute: div.className !== "t",
+
+		// Tests for enctype support on a form(#6743)
+		enctype: !!document.createElement("form").enctype,
+
+		// Makes sure cloning an html5 element does not cause problems
+		// Where outerHTML is undefined, this still works
+		html5Clone: document.createElement("nav").cloneNode( true ).outerHTML !== "<:nav></:nav>",
+
+		// Will be defined later
+		submitBubbles: true,
+		changeBubbles: true,
+		focusinBubbles: false,
+		deleteExpando: true,
+		noCloneEvent: true,
+		inlineBlockNeedsLayout: false,
+		shrinkWrapBlocks: false,
+		reliableMarginRight: true
+	};
+
+	// Make sure checked status is properly cloned
+	input.checked = true;
+	support.noCloneChecked = input.cloneNode( true ).checked;
+
+	// Make sure that the options inside disabled selects aren't marked as disabled
+	// (WebKit marks them as disabled)
+	select.disabled = true;
+	support.optDisabled = !opt.disabled;
+
+	// Test to see if it's possible to delete an expando from an element
+	// Fails in Internet Explorer
+	try {
+		delete div.test;
+	} catch( e ) {
+		support.deleteExpando = false;
+	}
+
+	if ( !div.addEventListener && div.attachEvent && div.fireEvent ) {
+		div.attachEvent( "onclick", function() {
+			// Cloning a node shouldn't copy over any
+			// bound event handlers (IE does this)
+			support.noCloneEvent = false;
+		});
+		div.cloneNode( true ).fireEvent( "onclick" );
+	}
+
+	// Check if a radio maintains its value
+	// after being appended to the DOM
+	input = document.createElement("input");
+	input.value = "t";
+	input.setAttribute("type", "radio");
+	support.radioValue = input.value === "t";
+
+	input.setAttribute("checked", "checked");
+	div.appendChild( input );
+	fragment = document.createDocumentFragment();
+	fragment.appendChild( div.lastChild );
+
+	// WebKit doesn't clone checked state correctly in fragments
+	support.checkClone = fragment.cloneNode( true ).cloneNode( true ).lastChild.checked;
+
+	// Check if a disconnected checkbox will retain its checked
+	// value of true after appended to the DOM (IE6/7)
+	support.appendChecked = input.checked;
+
+	fragment.removeChild( input );
+	fragment.appendChild( div );
+
+	div.innerHTML = "";
+
+	// Check if div with explicit width and no margin-right incorrectly
+	// gets computed margin-right based on width of container. For more
+	// info see bug #3333
+	// Fails in WebKit before Feb 2011 nightlies
+	// WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
+	if ( window.getComputedStyle ) {
+		marginDiv = document.createElement( "div" );
+		marginDiv.style.width = "0";
+		marginDiv.style.marginRight = "0";
+		div.style.width = "2px";
+		div.appendChild( marginDiv );
+		support.reliableMarginRight =
+			( parseInt( ( window.getComputedStyle( marginDiv, null ) || { marginRight: 0 } ).marginRight, 10 ) || 0 ) === 0;
+	}
+
+	// Technique from Juriy Zaytsev
+	// http://perfectionkills.com/detecting-event-support-without-browser-sniffing/
+	// We only care about the case where non-standard event systems
+	// are used, namely in IE. Short-circuiting here helps us to
+	// avoid an eval call (in setAttribute) which can cause CSP
+	// to go haywire. See: https://developer.mozilla.org/en/Security/CSP
+	if ( div.attachEvent ) {
+		for( i in {
+			submit: 1,
+			change: 1,
+			focusin: 1
+		}) {
+			eventName = "on" + i;
+			isSupported = ( eventName in div );
+			if ( !isSupported ) {
+				div.setAttribute( eventName, "return;" );
+				isSupported = ( typeof div[ eventName ] === "function" );
+			}
+			support[ i + "Bubbles" ] = isSupported;
+		}
+	}
+
+	fragment.removeChild( div );
+
+	// Null elements to avoid leaks in IE
+	fragment = select = opt = marginDiv = div = input = null;
+
+	// Run tests that need a body at doc ready
+	jQuery(function() {
+		var container, outer, inner, table, td, offsetSupport,
+			conMarginTop, ptlm, vb, style, html,
+			body = document.getElementsByTagName("body")[0];
+
+		if ( !body ) {
+			// Return for frameset docs that don't have a body
+			return;
+		}
+
+		conMarginTop = 1;
+		ptlm = "position:absolute;top:0;left:0;width:1px;height:1px;margin:0;";
+		vb = "visibility:hidden;border:0;";
+		style = "style='" + ptlm + "border:5px solid #000;padding:0;'";
+		html = "<div " + style + "><div></div></div>" +
+			"<table " + style + " cellpadding='0' cellspacing='0'>" +
+			"<tr><td></td></tr></table>";
+
+		container = document.createElement("div");
+		container.style.cssText = vb + "width:0;height:0;position:static;top:0;margin-top:" + conMarginTop + "px";
+		body.insertBefore( container, body.firstChild );
+
+		// Construct the test element
+		div = document.createElement("div");
+		container.appendChild( div );
+
+		// Check if table cells still have offsetWidth/Height when they are set
+		// to display:none and there are still other visible table cells in a
+		// table row; if so, offsetWidth/Height are not reliable for use when
+		// determining if an element has been hidden directly using
+		// display:none (it is still safe to use offsets if a parent element is
+		// hidden; don safety goggles and see bug #4512 for more information).
+		// (only IE 8 fails this test)
+		div.innerHTML = "<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>";
+		tds = div.getElementsByTagName( "td" );
+		isSupported = ( tds[ 0 ].offsetHeight === 0 );
+
+		tds[ 0 ].style.display = "";
+		tds[ 1 ].style.display = "none";
+
+		// Check if empty table cells still have offsetWidth/Height
+		// (IE <= 8 fail this test)
+		support.reliableHiddenOffsets = isSupported && ( tds[ 0 ].offsetHeight === 0 );
+
+		// Figure out if the W3C box model works as expected
+		div.innerHTML = "";
+		div.style.width = div.style.paddingLeft = "1px";
+		jQuery.boxModel = support.boxModel = div.offsetWidth === 2;
+
+		if ( typeof div.style.zoom !== "undefined" ) {
+			// Check if natively block-level elements act like inline-block
+			// elements when setting their display to 'inline' and giving
+			// them layout
+			// (IE < 8 does this)
+			div.style.display = "inline";
+			div.style.zoom = 1;
+			support.inlineBlockNeedsLayout = ( div.offsetWidth === 2 );
+
+			// Check if elements with layout shrink-wrap their children
+			// (IE 6 does this)
+			div.style.display = "";
+			div.innerHTML = "<div style='width:4px;'></div>";
+			support.shrinkWrapBlocks = ( div.offsetWidth !== 2 );
+		}
+
+		div.style.cssText = ptlm + vb;
+		div.innerHTML = html;
+
+		outer = div.firstChild;
+		inner = outer.firstChild;
+		td = outer.nextSibling.firstChild.firstChild;
+
+		offsetSupport = {
+			doesNotAddBorder: ( inner.offsetTop !== 5 ),
+			doesAddBorderForTableAndCells: ( td.offsetTop === 5 )
+		};
+
+		inner.style.position = "fixed";
+		inner.style.top = "20px";
+
+		// safari subtracts parent border width here which is 5px
+		offsetSupport.fixedPosition = ( inner.offsetTop === 20 || inner.offsetTop === 15 );
+		inner.style.position = inner.style.top = "";
+
+		outer.style.overflow = "hidden";
+		outer.style.position = "relative";
+
+		offsetSupport.subtractsBorderForOverflowNotVisible = ( inner.offsetTop === -5 );
+		offsetSupport.doesNotIncludeMarginInBodyOffset = ( body.offsetTop !== conMarginTop );
+
+		body.removeChild( container );
+		div  = container = null;
+
+		jQuery.extend( support, offsetSupport );
+	});
+
+	return support;
+})();
+
+
+
+
+var rbrace = /^(?:\{.*\}|\[.*\])$/,
+	rmultiDash = /([A-Z])/g;
+
+jQuery.extend({
+	cache: {},
+
+	// Please use with caution
+	uuid: 0,
+
+	// Unique for each copy of jQuery on the page
+	// Non-digits removed to match rinlinejQuery
+	expando: "jQuery" + ( jQuery.fn.jquery + Math.random() ).replace( /\D/g, "" ),
+
+	// The following elements throw uncatchable exceptions if you
+	// attempt to add expando properties to them.
+	noData: {
+		"embed": true,
+		// Ban all objects except for Flash (which handle expandos)
+		"object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",
+		"applet": true
+	},
+
+	hasData: function( elem ) {
+		elem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ];
+		return !!elem && !isEmptyDataObject( elem );
+	},
+
+	data: function( elem, name, data, pvt /* Internal Use Only */ ) {
+		if ( !jQuery.acceptData( elem ) ) {
+			return;
+		}
+
+		var privateCache, thisCache, ret,
+			internalKey = jQuery.expando,
+			getByName = typeof name === "string",
+
+			// We have to handle DOM nodes and JS objects differently because IE6-7
+			// can't GC object references properly across the DOM-JS boundary
+			isNode = elem.nodeType,
+
+			// Only DOM nodes need the global jQuery cache; JS object data is
+			// attached directly to the object so GC can occur automatically
+			cache = isNode ? jQuery.cache : elem,
+
+			// Only defining an ID for JS objects if its cache already exists allows
+			// the code to shortcut on the same path as a DOM node with no cache
+			id = isNode ? elem[ internalKey ] : elem[ internalKey ] && internalKey,
+			isEvents = name === "events";
+
+		// Avoid doing any more work than we need to when trying to get data on an
+		// object that has no data at all
+		if ( (!id || !cache[id] || (!isEvents && !pvt && !cache[id].data)) && getByName && data === undefined ) {
+			return;
+		}
+
+		if ( !id ) {
+			// Only DOM nodes need a new unique ID for each element since their data
+			// ends up in the global cache
+			if ( isNode ) {
+				elem[ internalKey ] = id = ++jQuery.uuid;
+			} else {
+				id = internalKey;
+			}
+		}
+
+		if ( !cache[ id ] ) {
+			cache[ id ] = {};
+
+			// Avoids exposing jQuery metadata on plain JS objects when the object
+			// is serialized using JSON.stringify
+			if ( !isNode ) {
+				cache[ id ].toJSON = jQuery.noop;
+			}
+		}
+
+		// An object can be passed to jQuery.data instead of a key/value pair; this gets
+		// shallow copied over onto the existing cache
+		if ( typeof name === "object" || typeof name === "function" ) {
+			if ( pvt ) {
+				cache[ id ] = jQuery.extend( cache[ id ], name );
+			} else {
+				cache[ id ].data = jQuery.extend( cache[ id ].data, name );
+			}
+		}
+
+		privateCache = thisCache = cache[ id ];
+
+		// jQuery data() is stored in a separate object inside the object's internal data
+		// cache in order to avoid key collisions between internal data and user-defined
+		// data.
+		if ( !pvt ) {
+			if ( !thisCache.data ) {
+				thisCache.data = {};
+			}
+
+			thisCache = thisCache.data;
+		}
+
+		if ( data !== undefined ) {
+			thisCache[ jQuery.camelCase( name ) ] = data;
+		}
+
+		// Users should not attempt to inspect the internal events object using jQuery.data,
+		// it is undocumented and subject to change. But does anyone listen? No.
+		if ( isEvents && !thisCache[ name ] ) {
+			return privateCache.events;
+		}
+
+		// Check for both converted-to-camel and non-converted data property names
+		// If a data property was specified
+		if ( getByName ) {
+
+			// First Try to find as-is property data
+			ret = thisCache[ name ];
+
+			// Test for null|undefined property data
+			if ( ret == null ) {
+
+				// Try to find the camelCased property
+				ret = thisCache[ jQuery.camelCase( name ) ];
+			}
+		} else {
+			ret = thisCache;
+		}
+
+		return ret;
+	},
+
+	removeData: function( elem, name, pvt /* Internal Use Only */ ) {
+		if ( !jQuery.acceptData( elem ) ) {
+			return;
+		}
+
+		var thisCache, i, l,
+
+			// Reference to internal data cache key
+			internalKey = jQuery.expando,
+
+			isNode = elem.nodeType,
+
+			// See jQuery.data for more information
+			cache = isNode ? jQuery.cache : elem,
+
+			// See jQuery.data for more information
+			id = isNode ? elem[ internalKey ] : internalKey;
+
+		// If there is already no cache entry for this object, there is no
+		// purpose in continuing
+		if ( !cache[ id ] ) {
+			return;
+		}
+
+		if ( name ) {
+
+			thisCache = pvt ? cache[ id ] : cache[ id ].data;
+
+			if ( thisCache ) {
+
+				// Support array or space separated string names for data keys
+				if ( !jQuery.isArray( name ) ) {
+
+					// try the string as a key before any manipulation
+					if ( name in thisCache ) {
+						name = [ name ];
+					} else {
+
+						// split the camel cased version by spaces unless a key with the spaces exists
+						name = jQuery.camelCase( name );
+						if ( name in thisCache ) {
+							name = [ name ];
+						} else {
+							name = name.split( " " );
+						}
+					}
+				}
+
+				for ( i = 0, l = name.length; i < l; i++ ) {
+					delete thisCache[ name[i] ];
+				}
+
+				// If there is no data left in the cache, we want to continue
+				// and let the cache object itself get destroyed
+				if ( !( pvt ? isEmptyDataObject : jQuery.isEmptyObject )( thisCache ) ) {
+					return;
+				}
+			}
+		}
+
+		// See jQuery.data for more information
+		if ( !pvt ) {
+			delete cache[ id ].data;
+
+			// Don't destroy the parent cache unless the internal data object
+			// had been the only thing left in it
+			if ( !isEmptyDataObject(cache[ id ]) ) {
+				return;
+			}
+		}
+
+		// Browsers that fail expando deletion also refuse to delete expandos on
+		// the window, but it will allow it on all other JS objects; other browsers
+		// don't care
+		// Ensure that `cache` is not a window object #10080
+		if ( jQuery.support.deleteExpando || !cache.setInterval ) {
+			delete cache[ id ];
+		} else {
+			cache[ id ] = null;
+		}
+
+		// We destroyed the cache and need to eliminate the expando on the node to avoid
+		// false lookups in the cache for entries that no longer exist
+		if ( isNode ) {
+			// IE does not allow us to delete expando properties from nodes,
+			// nor does it have a removeAttribute function on Document nodes;
+			// we must handle all of these cases
+			if ( jQuery.support.deleteExpando ) {
+				delete elem[ internalKey ];
+			} else if ( elem.removeAttribute ) {
+				elem.removeAttribute( internalKey );
+			} else {
+				elem[ internalKey ] = null;
+			}
+		}
+	},
+
+	// For internal use only.
+	_data: function( elem, name, data ) {
+		return jQuery.data( elem, name, data, true );
+	},
+
+	// A method for determining if a DOM node can handle the data expando
+	acceptData: function( elem ) {
+		if ( elem.nodeName ) {
+			var match = jQuery.noData[ elem.nodeName.toLowerCase() ];
+
+			if ( match ) {
+				return !(match === true || elem.getAttribute("classid") !== match);
+			}
+		}
+
+		return true;
+	}
+});
+
+jQuery.fn.extend({
+	data: function( key, value ) {
+		var parts, attr, name,
+			data = null;
+
+		if ( typeof key === "undefined" ) {
+			if ( this.length ) {
+				data = jQuery.data( this[0] );
+
+				if ( this[0].nodeType === 1 && !jQuery._data( this[0], "parsedAttrs" ) ) {
+					attr = this[0].attributes;
+					for ( var i = 0, l = attr.length; i < l; i++ ) {
+						name = attr[i].name;
+
+						if ( name.indexOf( "data-" ) === 0 ) {
+							name = jQuery.camelCase( name.substring(5) );
+
+							dataAttr( this[0], name, data[ name ] );
+						}
+					}
+					jQuery._data( this[0], "parsedAttrs", true );
+				}
+			}
+
+			return data;
+
+		} else if ( typeof key === "object" ) {
+			return this.each(function() {
+				jQuery.data( this, key );
+			});
+		}
+
+		parts = key.split(".");
+		parts[1] = parts[1] ? "." + parts[1] : "";
+
+		if ( value === undefined ) {
+			data = this.triggerHandler("getData" + parts[1] + "!", [parts[0]]);
+
+			// Try to fetch any internally stored data first
+			if ( data === undefined && this.length ) {
+				data = jQuery.data( this[0], key );
+				data = dataAttr( this[0], key, data );
+			}
+
+			return data === undefined && parts[1] ?
+				this.data( parts[0] ) :
+				data;
+
+		} else {
+			return this.each(function() {
+				var self = jQuery( this ),
+					args = [ parts[0], value ];
+
+				self.triggerHandler( "setData" + parts[1] + "!", args );
+				jQuery.data( this, key, value );
+				self.triggerHandler( "changeData" + parts[1] + "!", args );
+			});
+		}
+	},
+
+	removeData: function( key ) {
+		return this.each(function() {
+			jQuery.removeData( this, key );
+		});
+	}
+});
+
+function dataAttr( elem, key, data ) {
+	// If nothing was found internally, try to fetch any
+	// data from the HTML5 data-* attribute
+	if ( data === undefined && elem.nodeType === 1 ) {
+
+		var name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase();
+
+		data = elem.getAttribute( name );
+
+		if ( typeof data === "string" ) {
+			try {
+				data = data === "true" ? true :
+				data === "false" ? false :
+				data === "null" ? null :
+				jQuery.isNumeric( data ) ? parseFloat( data ) :
+					rbrace.test( data ) ? jQuery.parseJSON( data ) :
+					data;
+			} catch( e ) {}
+
+			// Make sure we set the data so it isn't changed later
+			jQuery.data( elem, key, data );
+
+		} else {
+			data = undefined;
+		}
+	}
+
+	return data;
+}
+
+// checks a cache object for emptiness
+function isEmptyDataObject( obj ) {
+	for ( var name in obj ) {
+
+		// if the public data object is empty, the private is still empty
+		if ( name === "data" && jQuery.isEmptyObject( obj[name] ) ) {
+			continue;
+		}
+		if ( name !== "toJSON" ) {
+			return false;
+		}
+	}
+
+	return true;
+}
+
+
+
+
+function handleQueueMarkDefer( elem, type, src ) {
+	var deferDataKey = type + "defer",
+		queueDataKey = type + "queue",
+		markDataKey = type + "mark",
+		defer = jQuery._data( elem, deferDataKey );
+	if ( defer &&
+		( src === "queue" || !jQuery._data(elem, queueDataKey) ) &&
+		( src === "mark" || !jQuery._data(elem, markDataKey) ) ) {
+		// Give room for hard-coded callbacks to fire first
+		// and eventually mark/queue something else on the element
+		setTimeout( function() {
+			if ( !jQuery._data( elem, queueDataKey ) &&
+				!jQuery._data( elem, markDataKey ) ) {
+				jQuery.removeData( elem, deferDataKey, true );
+				defer.fire();
+			}
+		}, 0 );
+	}
+}
+
+jQuery.extend({
+
+	_mark: function( elem, type ) {
+		if ( elem ) {
+			type = ( type || "fx" ) + "mark";
+			jQuery._data( elem, type, (jQuery._data( elem, type ) || 0) + 1 );
+		}
+	},
+
+	_unmark: function( force, elem, type ) {
+		if ( force !== true ) {
+			type = elem;
+			elem = force;
+			force = false;
+		}
+		if ( elem ) {
+			type = type || "fx";
+			var key = type + "mark",
+				count = force ? 0 : ( (jQuery._data( elem, key ) || 1) - 1 );
+			if ( count ) {
+				jQuery._data( elem, key, count );
+			} else {
+				jQuery.removeData( elem, key, true );
+				handleQueueMarkDefer( elem, type, "mark" );
+			}
+		}
+	},
+
+	queue: function( elem, type, data ) {
+		var q;
+		if ( elem ) {
+			type = ( type || "fx" ) + "queue";
+			q = jQuery._data( elem, type );
+
+			// Speed up dequeue by getting out quickly if this is just a lookup
+			if ( data ) {
+				if ( !q || jQuery.isArray(data) ) {
+					q = jQuery._data( elem, type, jQuery.makeArray(data) );
+				} else {
+					q.push( data );
+				}
+			}
+			return q || [];
+		}
+	},
+
+	dequeue: function( elem, type ) {
+		type = type || "fx";
+
+		var queue = jQuery.queue( elem, type ),
+			fn = queue.shift(),
+			hooks = {};
+
+		// If the fx queue is dequeued, always remove the progress sentinel
+		if ( fn === "inprogress" ) {
+			fn = queue.shift();
+		}
+
+		if ( fn ) {
+			// Add a progress sentinel to prevent the fx queue from being
+			// automatically dequeued
+			if ( type === "fx" ) {
+				queue.unshift( "inprogress" );
+			}
+
+			jQuery._data( elem, type + ".run", hooks );
+			fn.call( elem, function() {
+				jQuery.dequeue( elem, type );
+			}, hooks );
+		}
+
+		if ( !queue.length ) {
+			jQuery.removeData( elem, type + "queue " + type + ".run", true );
+			handleQueueMarkDefer( elem, type, "queue" );
+		}
+	}
+});
+
+jQuery.fn.extend({
+	queue: function( type, data ) {
+		if ( typeof type !== "string" ) {
+			data = type;
+			type = "fx";
+		}
+
+		if ( data === undefined ) {
+			return jQuery.queue( this[0], type );
+		}
+		return this.each(function() {
+			var queue = jQuery.queue( this, type, data );
+
+			if ( type === "fx" && queue[0] !== "inprogress" ) {
+				jQuery.dequeue( this, type );
+			}
+		});
+	},
+	dequeue: function( type ) {
+		return this.each(function() {
+			jQuery.dequeue( this, type );
+		});
+	},
+	// Based off of the plugin by Clint Helfers, with permission.
+	// http://blindsignals.com/index.php/2009/07/jquery-delay/
+	delay: function( time, type ) {
+		time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;
+		type = type || "fx";
+
+		return this.queue( type, function( next, hooks ) {
+			var timeout = setTimeout( next, time );
+			hooks.stop = function() {
+				clearTimeout( timeout );
+			};
+		});
+	},
+	clearQueue: function( type ) {
+		return this.queue( type || "fx", [] );
+	},
+	// Get a promise resolved when queues of a certain type
+	// are emptied (fx is the type by default)
+	promise: function( type, object ) {
+		if ( typeof type !== "string" ) {
+			object = type;
+			type = undefined;
+		}
+		type = type || "fx";
+		var defer = jQuery.Deferred(),
+			elements = this,
+			i = elements.length,
+			count = 1,
+			deferDataKey = type + "defer",
+			queueDataKey = type + "queue",
+			markDataKey = type + "mark",
+			tmp;
+		function resolve() {
+			if ( !( --count ) ) {
+				defer.resolveWith( elements, [ elements ] );
+			}
+		}
+		while( i-- ) {
+			if (( tmp = jQuery.data( elements[ i ], deferDataKey, undefined, true ) ||
+					( jQuery.data( elements[ i ], queueDataKey, undefined, true ) ||
+						jQuery.data( elements[ i ], markDataKey, undefined, true ) ) &&
+					jQuery.data( elements[ i ], deferDataKey, jQuery.Callbacks( "once memory" ), true ) )) {
+				count++;
+				tmp.add( resolve );
+			}
+		}
+		resolve();
+		return defer.promise();
+	}
+});
+
+
+
+
+var rclass = /[\n\t\r]/g,
+	rspace = /\s+/,
+	rreturn = /\r/g,
+	rtype = /^(?:button|input)$/i,
+	rfocusable = /^(?:button|input|object|select|textarea)$/i,
+	rclickable = /^a(?:rea)?$/i,
+	rboolean = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,
+	getSetAttribute = jQuery.support.getSetAttribute,
+	nodeHook, boolHook, fixSpecified;
+
+jQuery.fn.extend({
+	attr: function( name, value ) {
+		return jQuery.access( this, name, value, true, jQuery.attr );
+	},
+
+	removeAttr: function( name ) {
+		return this.each(function() {
+			jQuery.removeAttr( this, name );
+		});
+	},
+
+	prop: function( name, value ) {
+		return jQuery.access( this, name, value, true, jQuery.prop );
+	},
+
+	removeProp: function( name ) {
+		name = jQuery.propFix[ name ] || name;
+		return this.each(function() {
+			// try/catch handles cases where IE balks (such as removing a property on window)
+			try {
+				this[ name ] = undefined;
+				delete this[ name ];
+			} catch( e ) {}
+		});
+	},
+
+	addClass: function( value ) {
+		var classNames, i, l, elem,
+			setClass, c, cl;
+
+		if ( jQuery.isFunction( value ) ) {
+			return this.each(function( j ) {
+				jQuery( this ).addClass( value.call(this, j, this.className) );
+			});
+		}
+
+		if ( value && typeof value === "string" ) {
+			classNames = value.split( rspace );
+
+			for ( i = 0, l = this.length; i < l; i++ ) {
+				elem = this[ i ];
+
+				if ( elem.nodeType === 1 ) {
+					if ( !elem.className && classNames.length === 1 ) {
+						elem.className = value;
+
+					} else {
+						setClass = " " + elem.className + " ";
+
+						for ( c = 0, cl = classNames.length; c < cl; c++ ) {
+							if ( !~setClass.indexOf( " " + classNames[ c ] + " " ) ) {
+								setClass += classNames[ c ] + " ";
+							}
+						}
+						elem.className = jQuery.trim( setClass );
+					}
+				}
+			}
+		}
+
+		return this;
+	},
+
+	removeClass: function( value ) {
+		var classNames, i, l, elem, className, c, cl;
+
+		if ( jQuery.isFunction( value ) ) {
+			return this.each(function( j ) {
+				jQuery( this ).removeClass( value.call(this, j, this.className) );
+			});
+		}
+
+		if ( (value && typeof value === "string") || value === undefined ) {
+			classNames = ( value || "" ).split( rspace );
+
+			for ( i = 0, l = this.length; i < l; i++ ) {
+				elem = this[ i ];
+
+				if ( elem.nodeType === 1 && elem.className ) {
+					if ( value ) {
+						className = (" " + elem.className + " ").replace( rclass, " " );
+						for ( c = 0, cl = classNames.length; c < cl; c++ ) {
+							className = className.replace(" " + classNames[ c ] + " ", " ");
+						}
+						elem.className = jQuery.trim( className );
+
+					} else {
+						elem.className = "";
+					}
+				}
+			}
+		}
+
+		return this;
+	},
+
+	toggleClass: function( value, stateVal ) {
+		var type = typeof value,
+			isBool = typeof stateVal === "boolean";
+
+		if ( jQuery.isFunction( value ) ) {
+			return this.each(function( i ) {
+				jQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal );
+			});
+		}
+
+		return this.each(function() {
+			if ( type === "string" ) {
+				// toggle individual class names
+				var className,
+					i = 0,
+					self = jQuery( this ),
+					state = stateVal,
+					classNames = value.split( rspace );
+
+				while ( (className = classNames[ i++ ]) ) {
+					// check each className given, space seperated list
+					state = isBool ? state : !self.hasClass( className );
+					self[ state ? "addClass" : "removeClass" ]( className );
+				}
+
+			} else if ( type === "undefined" || type === "boolean" ) {
+				if ( this.className ) {
+					// store className if set
+					jQuery._data( this, "__className__", this.className );
+				}
+
+				// toggle whole className
+				this.className = this.className || value === false ? "" : jQuery._data( this, "__className__" ) || "";
+			}
+		});
+	},
+
+	hasClass: function( selector ) {
+		var className = " " + selector + " ",
+			i = 0,
+			l = this.length;
+		for ( ; i < l; i++ ) {
+			if ( this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) > -1 ) {
+				return true;
+			}
+		}
+
+		return false;
+	},
+
+	val: function( value ) {
+		var hooks, ret, isFunction,
+			elem = this[0];
+
+		if ( !arguments.length ) {
+			if ( elem ) {
+				hooks = jQuery.valHooks[ elem.nodeName.toLowerCase() ] || jQuery.valHooks[ elem.type ];
+
+				if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) {
+					return ret;
+				}
+
+				ret = elem.value;
+
+				return typeof ret === "string" ?
+					// handle most common string cases
+					ret.replace(rreturn, "") :
+					// handle cases where value is null/undef or number
+					ret == null ? "" : ret;
+			}
+
+			return;
+		}
+
+		isFunction = jQuery.isFunction( value );
+
+		return this.each(function( i ) {
+			var self = jQuery(this), val;
+
+			if ( this.nodeType !== 1 ) {
+				return;
+			}
+
+			if ( isFunction ) {
+				val = value.call( this, i, self.val() );
+			} else {
+				val = value;
+			}
+
+			// Treat null/undefined as ""; convert numbers to string
+			if ( val == null ) {
+				val = "";
+			} else if ( typeof val === "number" ) {
+				val += "";
+			} else if ( jQuery.isArray( val ) ) {
+				val = jQuery.map(val, function ( value ) {
+					return value == null ? "" : value + "";
+				});
+			}
+
+			hooks = jQuery.valHooks[ this.nodeName.toLowerCase() ] || jQuery.valHooks[ this.type ];
+
+			// If set returns undefined, fall back to normal setting
+			if ( !hooks || !("set" in hooks) || hooks.set( this, val, "value" ) === undefined ) {
+				this.value = val;
+			}
+		});
+	}
+});
+
+jQuery.extend({
+	valHooks: {
+		option: {
+			get: function( elem ) {
+				// attributes.value is undefined in Blackberry 4.7 but
+				// uses .value. See #6932
+				var val = elem.attributes.value;
+				return !val || val.specified ? elem.value : elem.text;
+			}
+		},
+		select: {
+			get: function( elem ) {
+				var value, i, max, option,
+					index = elem.selectedIndex,
+					values = [],
+					options = elem.options,
+					one = elem.type === "select-one";
+
+				// Nothing was selected
+				if ( index < 0 ) {
+					return null;
+				}
+
+				// Loop through all the selected options
+				i = one ? index : 0;
+				max = one ? index + 1 : options.length;
+				for ( ; i < max; i++ ) {
+					option = options[ i ];
+
+					// Don't return options that are disabled or in a disabled optgroup
+					if ( option.selected && (jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null) &&
+							(!option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" )) ) {
+
+						// Get the specific value for the option
+						value = jQuery( option ).val();
+
+						// We don't need an array for one selects
+						if ( one ) {
+							return value;
+						}
+
+						// Multi-Selects return an array
+						values.push( value );
+					}
+				}
+
+				// Fixes Bug #2551 -- select.val() broken in IE after form.reset()
+				if ( one && !values.length && options.length ) {
+					return jQuery( options[ index ] ).val();
+				}
+
+				return values;
+			},
+
+			set: function( elem, value ) {
+				var values = jQuery.makeArray( value );
+
+				jQuery(elem).find("option").each(function() {
+					this.selected = jQuery.inArray( jQuery(this).val(), values ) >= 0;
+				});
+
+				if ( !values.length ) {
+					elem.selectedIndex = -1;
+				}
+				return values;
+			}
+		}
+	},
+
+	attrFn: {
+		val: true,
+		css: true,
+		html: true,
+		text: true,
+		data: true,
+		width: true,
+		height: true,
+		offset: true
+	},
+
+	attr: function( elem, name, value, pass ) {
+		var ret, hooks, notxml,
+			nType = elem.nodeType;
+
+		// don't get/set attributes on text, comment and attribute nodes
+		if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
+			return;
+		}
+
+		if ( pass && name in jQuery.attrFn ) {
+			return jQuery( elem )[ name ]( value );
+		}
+
+		// Fallback to prop when attributes are not supported
+		if ( typeof elem.getAttribute === "undefined" ) {
+			return jQuery.prop( elem, name, value );
+		}
+
+		notxml = nType !== 1 || !jQuery.isXMLDoc( elem );
+
+		// All attributes are lowercase
+		// Grab necessary hook if one is defined
+		if ( notxml ) {
+			name = name.toLowerCase();
+			hooks = jQuery.attrHooks[ name ] || ( rboolean.test( name ) ? boolHook : nodeHook );
+		}
+
+		if ( value !== undefined ) {
+
+			if ( value === null ) {
+				jQuery.removeAttr( elem, name );
+				return;
+
+			} else if ( hooks && "set" in hooks && notxml && (ret = hooks.set( elem, value, name )) !== undefined ) {
+				return ret;
+
+			} else {
+				elem.setAttribute( name, "" + value );
+				return value;
+			}
+
+		} else if ( hooks && "get" in hooks && notxml && (ret = hooks.get( elem, name )) !== null ) {
+			return ret;
+
+		} else {
+
+			ret = elem.getAttribute( name );
+
+			// Non-existent attributes return null, we normalize to undefined
+			return ret === null ?
+				undefined :
+				ret;
+		}
+	},
+
+	removeAttr: function( elem, value ) {
+		var propName, attrNames, name, l,
+			i = 0;
+
+		if ( value && elem.nodeType === 1 ) {
+			attrNames = value.toLowerCase().split( rspace );
+			l = attrNames.length;
+
+			for ( ; i < l; i++ ) {
+				name = attrNames[ i ];
+
+				if ( name ) {
+					propName = jQuery.propFix[ name ] || name;
+
+					// See #9699 for explanation of this approach (setting first, then removal)
+					jQuery.attr( elem, name, "" );
+					elem.removeAttribute( getSetAttribute ? name : propName );
+
+					// Set corresponding property to false for boolean attributes
+					if ( rboolean.test( name ) && propName in elem ) {
+						elem[ propName ] = false;
+					}
+				}
+			}
+		}
+	},
+
+	attrHooks: {
+		type: {
+			set: function( elem, value ) {
+				// We can't allow the type property to be changed (since it causes problems in IE)
+				if ( rtype.test( elem.nodeName ) && elem.parentNode ) {
+					jQuery.error( "type property can't be changed" );
+				} else if ( !jQuery.support.radioValue && value === "radio" && jQuery.nodeName(elem, "input") ) {
+					// Setting the type on a radio button after the value resets the value in IE6-9
+					// Reset value to it's default in case type is set after value
+					// This is for element creation
+					var val = elem.value;
+					elem.setAttribute( "type", value );
+					if ( val ) {
+						elem.value = val;
+					}
+					return value;
+				}
+			}
+		},
+		// Use the value property for back compat
+		// Use the nodeHook for button elements in IE6/7 (#1954)
+		value: {
+			get: function( elem, name ) {
+				if ( nodeHook && jQuery.nodeName( elem, "button" ) ) {
+					return nodeHook.get( elem, name );
+				}
+				return name in elem ?
+					elem.value :
+					null;
+			},
+			set: function( elem, value, name ) {
+				if ( nodeHook && jQuery.nodeName( elem, "button" ) ) {
+					return nodeHook.set( elem, value, name );
+				}
+				// Does not return so that setAttribute is also used
+				elem.value = value;
+			}
+		}
+	},
+
+	propFix: {
+		tabindex: "tabIndex",
+		readonly: "readOnly",
+		"for": "htmlFor",
+		"class": "className",
+		maxlength: "maxLength",
+		cellspacing: "cellSpacing",
+		cellpadding: "cellPadding",
+		rowspan: "rowSpan",
+		colspan: "colSpan",
+		usemap: "useMap",
+		frameborder: "frameBorder",
+		contenteditable: "contentEditable"
+	},
+
+	prop: function( elem, name, value ) {
+		var ret, hooks, notxml,
+			nType = elem.nodeType;
+
+		// don't get/set properties on text, comment and attribute nodes
+		if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
+			return;
+		}
+
+		notxml = nType !== 1 || !jQuery.isXMLDoc( elem );
+
+		if ( notxml ) {
+			// Fix name and attach hooks
+			name = jQuery.propFix[ name ] || name;
+			hooks = jQuery.propHooks[ name ];
+		}
+
+		if ( value !== undefined ) {
+			if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) {
+				return ret;
+
+			} else {
+				return ( elem[ name ] = value );
+			}
+
+		} else {
+			if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) {
+				return ret;
+
+			} else {
+				return elem[ name ];
+			}
+		}
+	},
+
+	propHooks: {
+		tabIndex: {
+			get: function( elem ) {
+				// elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set
+				// http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/
+				var attributeNode = elem.getAttributeNode("tabindex");
+
+				return attributeNode && attributeNode.specified ?
+					parseInt( attributeNode.value, 10 ) :
+					rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ?
+						0 :
+						undefined;
+			}
+		}
+	}
+});
+
+// Add the tabIndex propHook to attrHooks for back-compat (different case is intentional)
+jQuery.attrHooks.tabindex = jQuery.propHooks.tabIndex;
+
+// Hook for boolean attributes
+boolHook = {
+	get: function( elem, name ) {
+		// Align boolean attributes with corresponding properties
+		// Fall back to attribute presence where some booleans are not supported
+		var attrNode,
+			property = jQuery.prop( elem, name );
+		return property === true || typeof property !== "boolean" && ( attrNode = elem.getAttributeNode(name) ) && attrNode.nodeValue !== false ?
+			name.toLowerCase() :
+			undefined;
+	},
+	set: function( elem, value, name ) {
+		var propName;
+		if ( value === false ) {
+			// Remove boolean attributes when set to false
+			jQuery.removeAttr( elem, name );
+		} else {
+			// value is true since we know at this point it's type boolean and not false
+			// Set boolean attributes to the same name and set the DOM property
+			propName = jQuery.propFix[ name ] || name;
+			if ( propName in elem ) {
+				// Only set the IDL specifically if it already exists on the element
+				elem[ propName ] = true;
+			}
+
+			elem.setAttribute( name, name.toLowerCase() );
+		}
+		return name;
+	}
+};
+
+// IE6/7 do not support getting/setting some attributes with get/setAttribute
+if ( !getSetAttribute ) {
+
+	fixSpecified = {
+		name: true,
+		id: true
+	};
+
+	// Use this for any attribute in IE6/7
+	// This fixes almost every IE6/7 issue
+	nodeHook = jQuery.valHooks.button = {
+		get: function( elem, name ) {
+			var ret;
+			ret = elem.getAttributeNode( name );
+			return ret && ( fixSpecified[ name ] ? ret.nodeValue !== "" : ret.specified ) ?
+				ret.nodeValue :
+				undefined;
+		},
+		set: function( elem, value, name ) {
+			// Set the existing or create a new attribute node
+			var ret = elem.getAttributeNode( name );
+			if ( !ret ) {
+				ret = document.createAttribute( name );
+				elem.setAttributeNode( ret );
+			}
+			return ( ret.nodeValue = value + "" );
+		}
+	};
+
+	// Apply the nodeHook to tabindex
+	jQuery.attrHooks.tabindex.set = nodeHook.set;
+
+	// Set width and height to auto instead of 0 on empty string( Bug #8150 )
+	// This is for removals
+	jQuery.each([ "width", "height" ], function( i, name ) {
+		jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], {
+			set: function( elem, value ) {
+				if ( value === "" ) {
+					elem.setAttribute( name, "auto" );
+					return value;
+				}
+			}
+		});
+	});
+
+	// Set contenteditable to false on removals(#10429)
+	// Setting to empty string throws an error as an invalid value
+	jQuery.attrHooks.contenteditable = {
+		get: nodeHook.get,
+		set: function( elem, value, name ) {
+			if ( value === "" ) {
+				value = "false";
+			}
+			nodeHook.set( elem, value, name );
+		}
+	};
+}
+
+
+// Some attributes require a special call on IE
+if ( !jQuery.support.hrefNormalized ) {
+	jQuery.each([ "href", "src", "width", "height" ], function( i, name ) {
+		jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], {
+			get: function( elem ) {
+				var ret = elem.getAttribute( name, 2 );
+				return ret === null ? undefined : ret;
+			}
+		});
+	});
+}
+
+if ( !jQuery.support.style ) {
+	jQuery.attrHooks.style = {
+		get: function( elem ) {
+			// Return undefined in the case of empty string
+			// Normalize to lowercase since IE uppercases css property names
+			return elem.style.cssText.toLowerCase() || undefined;
+		},
+		set: function( elem, value ) {
+			return ( elem.style.cssText = "" + value );
+		}
+	};
+}
+
+// Safari mis-reports the default selected property of an option
+// Accessing the parent's selectedIndex property fixes it
+if ( !jQuery.support.optSelected ) {
+	jQuery.propHooks.selected = jQuery.extend( jQuery.propHooks.selected, {
+		get: function( elem ) {
+			var parent = elem.parentNode;
+
+			if ( parent ) {
+				parent.selectedIndex;
+
+				// Make sure that it also works with optgroups, see #5701
+				if ( parent.parentNode ) {
+					parent.parentNode.selectedIndex;
+				}
+			}
+			return null;
+		}
+	});
+}
+
+// IE6/7 call enctype encoding
+if ( !jQuery.support.enctype ) {
+	jQuery.propFix.enctype = "encoding";
+}
+
+// Radios and checkboxes getter/setter
+if ( !jQuery.support.checkOn ) {
+	jQuery.each([ "radio", "checkbox" ], function() {
+		jQuery.valHooks[ this ] = {
+			get: function( elem ) {
+				// Handle the case where in Webkit "" is returned instead of "on" if a value isn't specified
+				return elem.getAttribute("value") === null ? "on" : elem.value;
+			}
+		};
+	});
+}
+jQuery.each([ "radio", "checkbox" ], function() {
+	jQuery.valHooks[ this ] = jQuery.extend( jQuery.valHooks[ this ], {
+		set: function( elem, value ) {
+			if ( jQuery.isArray( value ) ) {
+				return ( elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0 );
+			}
+		}
+	});
+});
+
+
+
+
+var rformElems = /^(?:textarea|input|select)$/i,
+	rtypenamespace = /^([^\.]*)?(?:\.(.+))?$/,
+	rhoverHack = /\bhover(\.\S+)?\b/,
+	rkeyEvent = /^key/,
+	rmouseEvent = /^(?:mouse|contextmenu)|click/,
+	rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,
+	rquickIs = /^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,
+	quickParse = function( selector ) {
+		var quick = rquickIs.exec( selector );
+		if ( quick ) {
+			//   0  1    2   3
+			// [ _, tag, id, class ]
+			quick[1] = ( quick[1] || "" ).toLowerCase();
+			quick[3] = quick[3] && new RegExp( "(?:^|\\s)" + quick[3] + "(?:\\s|$)" );
+		}
+		return quick;
+	},
+	quickIs = function( elem, m ) {
+		var attrs = elem.attributes || {};
+		return (
+			(!m[1] || elem.nodeName.toLowerCase() === m[1]) &&
+			(!m[2] || (attrs.id || {}).value === m[2]) &&
+			(!m[3] || m[3].test( (attrs[ "class" ] || {}).value ))
+		);
+	},
+	hoverHack = function( events ) {
+		return jQuery.event.special.hover ? events : events.replace( rhoverHack, "mouseenter$1 mouseleave$1" );
+	};
+
+/*
+ * Helper functions for managing events -- not part of the public interface.
+ * Props to Dean Edwards' addEvent library for many of the ideas.
+ */
+jQuery.event = {
+
+	add: function( elem, types, handler, data, selector ) {
+
+		var elemData, eventHandle, events,
+			t, tns, type, namespaces, handleObj,
+			handleObjIn, quick, handlers, special;
+
+		// Don't attach events to noData or text/comment nodes (allow plain objects tho)
+		if ( elem.nodeType === 3 || elem.nodeType === 8 || !types || !handler || !(elemData = jQuery._data( elem )) ) {
+			return;
+		}
+
+		// Caller can pass in an object of custom data in lieu of the handler
+		if ( handler.handler ) {
+			handleObjIn = handler;
+			handler = handleObjIn.handler;
+		}
+
+		// Make sure that the handler has a unique ID, used to find/remove it later
+		if ( !handler.guid ) {
+			handler.guid = jQuery.guid++;
+		}
+
+		// Init the element's event structure and main handler, if this is the first
+		events = elemData.events;
+		if ( !events ) {
+			elemData.events = events = {};
+		}
+		eventHandle = elemData.handle;
+		if ( !eventHandle ) {
+			elemData.handle = eventHandle = function( e ) {
+				// Discard the second event of a jQuery.event.trigger() and
+				// when an event is called after a page has unloaded
+				return typeof jQuery !== "undefined" && (!e || jQuery.event.triggered !== e.type) ?
+					jQuery.event.dispatch.apply( eventHandle.elem, arguments ) :
+					undefined;
+			};
+			// Add elem as a property of the handle fn to prevent a memory leak with IE non-native events
+			eventHandle.elem = elem;
+		}
+
+		// Handle multiple events separated by a space
+		// jQuery(...).bind("mouseover mouseout", fn);
+		types = jQuery.trim( hoverHack(types) ).split( " " );
+		for ( t = 0; t < types.length; t++ ) {
+
+			tns = rtypenamespace.exec( types[t] ) || [];
+			type = tns[1];
+			namespaces = ( tns[2] || "" ).split( "." ).sort();
+
+			// If event changes its type, use the special event handlers for the changed type
+			special = jQuery.event.special[ type ] || {};
+
+			// If selector defined, determine special event api type, otherwise given type
+			type = ( selector ? special.delegateType : special.bindType ) || type;
+
+			// Update special based on newly reset type
+			special = jQuery.event.special[ type ] || {};
+
+			// handleObj is passed to all event handlers
+			handleObj = jQuery.extend({
+				type: type,
+				origType: tns[1],
+				data: data,
+				handler: handler,
+				guid: handler.guid,
+				selector: selector,
+				quick: quickParse( selector ),
+				namespace: namespaces.join(".")
+			}, handleObjIn );
+
+			// Init the event handler queue if we're the first
+			handlers = events[ type ];
+			if ( !handlers ) {
+				handlers = events[ type ] = [];
+				handlers.delegateCount = 0;
+
+				// Only use addEventListener/attachEvent if the special events handler returns false
+				if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) {
+					// Bind the global event handler to the element
+					if ( elem.addEventListener ) {
+						elem.addEventListener( type, eventHandle, false );
+
+					} else if ( elem.attachEvent ) {
+						elem.attachEvent( "on" + type, eventHandle );
+					}
+				}
+			}
+
+			if ( special.add ) {
+				special.add.call( elem, handleObj );
+
+				if ( !handleObj.handler.guid ) {
+					handleObj.handler.guid = handler.guid;
+				}
+			}
+
+			// Add to the element's handler list, delegates in front
+			if ( selector ) {
+				handlers.splice( handlers.delegateCount++, 0, handleObj );
+			} else {
+				handlers.push( handleObj );
+			}
+
+			// Keep track of which events have ever been used, for event optimization
+			jQuery.event.global[ type ] = true;
+		}
+
+		// Nullify elem to prevent memory leaks in IE
+		elem = null;
+	},
+
+	global: {},
+
+	// Detach an event or set of events from an element
+	remove: function( elem, types, handler, selector, mappedTypes ) {
+
+		var elemData = jQuery.hasData( elem ) && jQuery._data( elem ),
+			t, tns, type, origType, namespaces, origCount,
+			j, events, special, handle, eventType, handleObj;
+
+		if ( !elemData || !(events = elemData.events) ) {
+			return;
+		}
+
+		// Once for each type.namespace in types; type may be omitted
+		types = jQuery.trim( hoverHack( types || "" ) ).split(" ");
+		for ( t = 0; t < types.length; t++ ) {
+			tns = rtypenamespace.exec( types[t] ) || [];
+			type = origType = tns[1];
+			namespaces = tns[2];
+
+			// Unbind all events (on this namespace, if provided) for the element
+			if ( !type ) {
+				for ( type in events ) {
+					jQuery.event.remove( elem, type + types[ t ], handler, selector, true );
+				}
+				continue;
+			}
+
+			special = jQuery.event.special[ type ] || {};
+			type = ( selector? special.delegateType : special.bindType ) || type;
+			eventType = events[ type ] || [];
+			origCount = eventType.length;
+			namespaces = namespaces ? new RegExp("(^|\\.)" + namespaces.split(".").sort().join("\\.(?:.*\\.)?") + "(\\.|$)") : null;
+
+			// Remove matching events
+			for ( j = 0; j < eventType.length; j++ ) {
+				handleObj = eventType[ j ];
+
+				if ( ( mappedTypes || origType === handleObj.origType ) &&
+					 ( !handler || handler.guid === handleObj.guid ) &&
+					 ( !namespaces || namespaces.test( handleObj.namespace ) ) &&
+					 ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) {
+					eventType.splice( j--, 1 );
+
+					if ( handleObj.selector ) {
+						eventType.delegateCount--;
+					}
+					if ( special.remove ) {
+						special.remove.call( elem, handleObj );
+					}
+				}
+			}
+
+			// Remove generic event handler if we removed something and no more handlers exist
+			// (avoids potential for endless recursion during removal of special event handlers)
+			if ( eventType.length === 0 && origCount !== eventType.length ) {
+				if ( !special.teardown || special.teardown.call( elem, namespaces ) === false ) {
+					jQuery.removeEvent( elem, type, elemData.handle );
+				}
+
+				delete events[ type ];
+			}
+		}
+
+		// Remove the expando if it's no longer used
+		if ( jQuery.isEmptyObject( events ) ) {
+			handle = elemData.handle;
+			if ( handle ) {
+				handle.elem = null;
+			}
+
+			// removeData also checks for emptiness and clears the expando if empty
+			// so use it instead of delete
+			jQuery.removeData( elem, [ "events", "handle" ], true );
+		}
+	},
+
+	// Events that are safe to short-circuit if no handlers are attached.
+	// Native DOM events should not be added, they may have inline handlers.
+	customEvent: {
+		"getData": true,
+		"setData": true,
+		"changeData": true
+	},
+
+	trigger: function( event, data, elem, onlyHandlers ) {
+		// Don't do events on text and comment nodes
+		if ( elem && (elem.nodeType === 3 || elem.nodeType === 8) ) {
+			return;
+		}
+
+		// Event object or event type
+		var type = event.type || event,
+			namespaces = [],
+			cache, exclusive, i, cur, old, ontype, special, handle, eventPath, bubbleType;
+
+		// focus/blur morphs to focusin/out; ensure we're not firing them right now
+		if ( rfocusMorph.test( type + jQuery.event.triggered ) ) {
+			return;
+		}
+
+		if ( type.indexOf( "!" ) >= 0 ) {
+			// Exclusive events trigger only for the exact event (no namespaces)
+			type = type.slice(0, -1);
+			exclusive = true;
+		}
+
+		if ( type.indexOf( "." ) >= 0 ) {
+			// Namespaced trigger; create a regexp to match event type in handle()
+			namespaces = type.split(".");
+			type = namespaces.shift();
+			namespaces.sort();
+		}
+
+		if ( (!elem || jQuery.event.customEvent[ type ]) && !jQuery.event.global[ type ] ) {
+			// No jQuery handlers for this event type, and it can't have inline handlers
+			return;
+		}
+
+		// Caller can pass in an Event, Object, or just an event type string
+		event = typeof event === "object" ?
+			// jQuery.Event object
+			event[ jQuery.expando ] ? event :
+			// Object literal
+			new jQuery.Event( type, event ) :
+			// Just the event type (string)
+			new jQuery.Event( type );
+
+		event.type = type;
+		event.isTrigger = true;
+		event.exclusive = exclusive;
+		event.namespace = namespaces.join( "." );
+		event.namespace_re = event.namespace? new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.)?") + "(\\.|$)") : null;
+		ontype = type.indexOf( ":" ) < 0 ? "on" + type : "";
+
+		// Handle a global trigger
+		if ( !elem ) {
+
+			// TODO: Stop taunting the data cache; remove global events and always attach to document
+			cache = jQuery.cache;
+			for ( i in cache ) {
+				if ( cache[ i ].events && cache[ i ].events[ type ] ) {
+					jQuery.event.trigger( event, data, cache[ i ].handle.elem, true );
+				}
+			}
+			return;
+		}
+
+		// Clean up the event in case it is being reused
+		event.result = undefined;
+		if ( !event.target ) {
+			event.target = elem;
+		}
+
+		// Clone any incoming data and prepend the event, creating the handler arg list
+		data = data != null ? jQuery.makeArray( data ) : [];
+		data.unshift( event );
+
+		// Allow special events to draw outside the lines
+		special = jQuery.event.special[ type ] || {};
+		if ( special.trigger && special.trigger.apply( elem, data ) === false ) {
+			return;
+		}
+
+		// Determine event propagation path in advance, per W3C events spec (#9951)
+		// Bubble up to document, then to window; watch for a global ownerDocument var (#9724)
+		eventPath = [[ elem, special.bindType || type ]];
+		if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) {
+
+			bubbleType = special.delegateType || type;
+			cur = rfocusMorph.test( bubbleType + type ) ? elem : elem.parentNode;
+			old = null;
+			for ( ; cur; cur = cur.parentNode ) {
+				eventPath.push([ cur, bubbleType ]);
+				old = cur;
+			}
+
+			// Only add window if we got to document (e.g., not plain obj or detached DOM)
+			if ( old && old === elem.ownerDocument ) {
+				eventPath.push([ old.defaultView || old.parentWindow || window, bubbleType ]);
+			}
+		}
+
+		// Fire handlers on the event path
+		for ( i = 0; i < eventPath.length && !event.isPropagationStopped(); i++ ) {
+
+			cur = eventPath[i][0];
+			event.type = eventPath[i][1];
+
+			handle = ( jQuery._data( cur, "events" ) || {} )[ event.type ] && jQuery._data( cur, "handle" );
+			if ( handle ) {
+				handle.apply( cur, data );
+			}
+			// Note that this is a bare JS function and not a jQuery handler
+			handle = ontype && cur[ ontype ];
+			if ( handle && jQuery.acceptData( cur ) && handle.apply( cur, data ) === false ) {
+				event.preventDefault();
+			}
+		}
+		event.type = type;
+
+		// If nobody prevented the default action, do it now
+		if ( !onlyHandlers && !event.isDefaultPrevented() ) {
+
+			if ( (!special._default || special._default.apply( elem.ownerDocument, data ) === false) &&
+				!(type === "click" && jQuery.nodeName( elem, "a" )) && jQuery.acceptData( elem ) ) {
+
+				// Call a native DOM method on the target with the same name name as the event.
+				// Can't use an .isFunction() check here because IE6/7 fails that test.
+				// Don't do default actions on window, that's where global variables be (#6170)
+				// IE<9 dies on focus/blur to hidden element (#1486)
+				if ( ontype && elem[ type ] && ((type !== "focus" && type !== "blur") || event.target.offsetWidth !== 0) && !jQuery.isWindow( elem ) ) {
+
+					// Don't re-trigger an onFOO event when we call its FOO() method
+					old = elem[ ontype ];
+
+					if ( old ) {
+						elem[ ontype ] = null;
+					}
+
+					// Prevent re-triggering of the same event, since we already bubbled it above
+					jQuery.event.triggered = type;
+					elem[ type ]();
+					jQuery.event.triggered = undefined;
+
+					if ( old ) {
+						elem[ ontype ] = old;
+					}
+				}
+			}
+		}
+
+		return event.result;
+	},
+
+	dispatch: function( event ) {
+
+		// Make a writable jQuery.Event from the native event object
+		event = jQuery.event.fix( event || window.event );
+
+		var handlers = ( (jQuery._data( this, "events" ) || {} )[ event.type ] || []),
+			delegateCount = handlers.delegateCount,
+			args = [].slice.call( arguments, 0 ),
+			run_all = !event.exclusive && !event.namespace,
+			handlerQueue = [],
+			i, j, cur, jqcur, ret, selMatch, matched, matches, handleObj, sel, related;
+
+		// Use the fix-ed jQuery.Event rather than the (read-only) native event
+		args[0] = event;
+		event.delegateTarget = this;
+
+		// Determine handlers that should run if there are delegated events
+		// Avoid disabled elements in IE (#6911) and non-left-click bubbling in Firefox (#3861)
+		if ( delegateCount && !event.target.disabled && !(event.button && event.type === "click") ) {
+
+			// Pregenerate a single jQuery object for reuse with .is()
+			jqcur = jQuery(this);
+			jqcur.context = this.ownerDocument || this;
+
+			for ( cur = event.target; cur != this; cur = cur.parentNode || this ) {
+				selMatch = {};
+				matches = [];
+				jqcur[0] = cur;
+				for ( i = 0; i < delegateCount; i++ ) {
+					handleObj = handlers[ i ];
+					sel = handleObj.selector;
+
+					if ( selMatch[ sel ] === undefined ) {
+						selMatch[ sel ] = (
+							handleObj.quick ? quickIs( cur, handleObj.quick ) : jqcur.is( sel )
+						);
+					}
+					if ( selMatch[ sel ] ) {
+						matches.push( handleObj );
+					}
+				}
+				if ( matches.length ) {
+					handlerQueue.push({ elem: cur, matches: matches });
+				}
+			}
+		}
+
+		// Add the remaining (directly-bound) handlers
+		if ( handlers.length > delegateCount ) {
+			handlerQueue.push({ elem: this, matches: handlers.slice( delegateCount ) });
+		}
+
+		// Run delegates first; they may want to stop propagation beneath us
+		for ( i = 0; i < handlerQueue.length && !event.isPropagationStopped(); i++ ) {
+			matched = handlerQueue[ i ];
+			event.currentTarget = matched.elem;
+
+			for ( j = 0; j < matched.matches.length && !event.isImmediatePropagationStopped(); j++ ) {
+				handleObj = matched.matches[ j ];
+
+				// Triggered event must either 1) be non-exclusive and have no namespace, or
+				// 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace).
+				if ( run_all || (!event.namespace && !handleObj.namespace) || event.namespace_re && event.namespace_re.test( handleObj.namespace ) ) {
+
+					event.data = handleObj.data;
+					event.handleObj = handleObj;
+
+					ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler )
+							.apply( matched.elem, args );
+
+					if ( ret !== undefined ) {
+						event.result = ret;
+						if ( ret === false ) {
+							event.preventDefault();
+							event.stopPropagation();
+						}
+					}
+				}
+			}
+		}
+
+		return event.result;
+	},
+
+	// Includes some event props shared by KeyEvent and MouseEvent
+	// *** attrChange attrName relatedNode srcElement  are not normalized, non-W3C, deprecated, will be removed in 1.8 ***
+	props: "attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),
+
+	fixHooks: {},
+
+	keyHooks: {
+		props: "char charCode key keyCode".split(" "),
+		filter: function( event, original ) {
+
+			// Add which for key events
+			if ( event.which == null ) {
+				event.which = original.charCode != null ? original.charCode : original.keyCode;
+			}
+
+			return event;
+		}
+	},
+
+	mouseHooks: {
+		props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),
+		filter: function( event, original ) {
+			var eventDoc, doc, body,
+				button = original.button,
+				fromElement = original.fromElement;
+
+			// Calculate pageX/Y if missing and clientX/Y available
+			if ( event.pageX == null && original.clientX != null ) {
+				eventDoc = event.target.ownerDocument || document;
+				doc = eventDoc.documentElement;
+				body = eventDoc.body;
+
+				event.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 );
+				event.pageY = original.clientY + ( doc && doc.scrollTop  || body && body.scrollTop  || 0 ) - ( doc && doc.clientTop  || body && body.clientTop  || 0 );
+			}
+
+			// Add relatedTarget, if necessary
+			if ( !event.relatedTarget && fromElement ) {
+				event.relatedTarget = fromElement === event.target ? original.toElement : fromElement;
+			}
+
+			// Add which for click: 1 === left; 2 === middle; 3 === right
+			// Note: button is not normalized, so don't use it
+			if ( !event.which && button !== undefined ) {
+				event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) );
+			}
+
+			return event;
+		}
+	},
+
+	fix: function( event ) {
+		if ( event[ jQuery.expando ] ) {
+			return event;
+		}
+
+		// Create a writable copy of the event object and normalize some properties
+		var i, prop,
+			originalEvent = event,
+			fixHook = jQuery.event.fixHooks[ event.type ] || {},
+			copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props;
+
+		event = jQuery.Event( originalEvent );
+
+		for ( i = copy.length; i; ) {
+			prop = copy[ --i ];
+			event[ prop ] = originalEvent[ prop ];
+		}
+
+		// Fix target property, if necessary (#1925, IE 6/7/8 & Safari2)
+		if ( !event.target ) {
+			event.target = originalEvent.srcElement || document;
+		}
+
+		// Target should not be a text node (#504, Safari)
+		if ( event.target.nodeType === 3 ) {
+			event.target = event.target.parentNode;
+		}
+
+		// For mouse/key events; add metaKey if it's not there (#3368, IE6/7/8)
+		if ( event.metaKey === undefined ) {
+			event.metaKey = event.ctrlKey;
+		}
+
+		return fixHook.filter? fixHook.filter( event, originalEvent ) : event;
+	},
+
+	special: {
+		ready: {
+			// Make sure the ready event is setup
+			setup: jQuery.bindReady
+		},
+
+		load: {
+			// Prevent triggered image.load events from bubbling to window.load
+			noBubble: true
+		},
+
+		focus: {
+			delegateType: "focusin"
+		},
+		blur: {
+			delegateType: "focusout"
+		},
+
+		beforeunload: {
+			setup: function( data, namespaces, eventHandle ) {
+				// We only want to do this special case on windows
+				if ( jQuery.isWindow( this ) ) {
+					this.onbeforeunload = eventHandle;
+				}
+			},
+
+			teardown: function( namespaces, eventHandle ) {
+				if ( this.onbeforeunload === eventHandle ) {
+					this.onbeforeunload = null;
+				}
+			}
+		}
+	},
+
+	simulate: function( type, elem, event, bubble ) {
+		// Piggyback on a donor event to simulate a different one.
+		// Fake originalEvent to avoid donor's stopPropagation, but if the
+		// simulated event prevents default then we do the same on the donor.
+		var e = jQuery.extend(
+			new jQuery.Event(),
+			event,
+			{ type: type,
+				isSimulated: true,
+				originalEvent: {}
+			}
+		);
+		if ( bubble ) {
+			jQuery.event.trigger( e, null, elem );
+		} else {
+			jQuery.event.dispatch.call( elem, e );
+		}
+		if ( e.isDefaultPrevented() ) {
+			event.preventDefault();
+		}
+	}
+};
+
+// Some plugins are using, but it's undocumented/deprecated and will be removed.
+// The 1.7 special event interface should provide all the hooks needed now.
+jQuery.event.handle = jQuery.event.dispatch;
+
+jQuery.removeEvent = document.removeEventListener ?
+	function( elem, type, handle ) {
+		if ( elem.removeEventListener ) {
+			elem.removeEventListener( type, handle, false );
+		}
+	} :
+	function( elem, type, handle ) {
+		if ( elem.detachEvent ) {
+			elem.detachEvent( "on" + type, handle );
+		}
+	};
+
+jQuery.Event = function( src, props ) {
+	// Allow instantiation without the 'new' keyword
+	if ( !(this instanceof jQuery.Event) ) {
+		return new jQuery.Event( src, props );
+	}
+
+	// Event object
+	if ( src && src.type ) {
+		this.originalEvent = src;
+		this.type = src.type;
+
+		// Events bubbling up the document may have been marked as prevented
+		// by a handler lower down the tree; reflect the correct value.
+		this.isDefaultPrevented = ( src.defaultPrevented || src.returnValue === false ||
+			src.getPreventDefault && src.getPreventDefault() ) ? returnTrue : returnFalse;
+
+	// Event type
+	} else {
+		this.type = src;
+	}
+
+	// Put explicitly provided properties onto the event object
+	if ( props ) {
+		jQuery.extend( this, props );
+	}
+
+	// Create a timestamp if incoming event doesn't have one
+	this.timeStamp = src && src.timeStamp || jQuery.now();
+
+	// Mark it as fixed
+	this[ jQuery.expando ] = true;
+};
+
+function returnFalse() {
+	return false;
+}
+function returnTrue() {
+	return true;
+}
+
+// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding
+// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html
+jQuery.Event.prototype = {
+	preventDefault: function() {
+		this.isDefaultPrevented = returnTrue;
+
+		var e = this.originalEvent;
+		if ( !e ) {
+			return;
+		}
+
+		// if preventDefault exists run it on the original event
+		if ( e.preventDefault ) {
+			e.preventDefault();
+
+		// otherwise set the returnValue property of the original event to false (IE)
+		} else {
+			e.returnValue = false;
+		}
+	},
+	stopPropagation: function() {
+		this.isPropagationStopped = returnTrue;
+
+		var e = this.originalEvent;
+		if ( !e ) {
+			return;
+		}
+		// if stopPropagation exists run it on the original event
+		if ( e.stopPropagation ) {
+			e.stopPropagation();
+		}
+		// otherwise set the cancelBubble property of the original event to true (IE)
+		e.cancelBubble = true;
+	},
+	stopImmediatePropagation: function() {
+		this.isImmediatePropagationStopped = returnTrue;
+		this.stopPropagation();
+	},
+	isDefaultPrevented: returnFalse,
+	isPropagationStopped: returnFalse,
+	isImmediatePropagationStopped: returnFalse
+};
+
+// Create mouseenter/leave events using mouseover/out and event-time checks
+jQuery.each({
+	mouseenter: "mouseover",
+	mouseleave: "mouseout"
+}, function( orig, fix ) {
+	jQuery.event.special[ orig ] = {
+		delegateType: fix,
+		bindType: fix,
+
+		handle: function( event ) {
+			var target = this,
+				related = event.relatedTarget,
+				handleObj = event.handleObj,
+				selector = handleObj.selector,
+				ret;
+
+			// For mousenter/leave call the handler if related is outside the target.
+			// NB: No relatedTarget if the mouse left/entered the browser window
+			if ( !related || (related !== target && !jQuery.contains( target, related )) ) {
+				event.type = handleObj.origType;
+				ret = handleObj.handler.apply( this, arguments );
+				event.type = fix;
+			}
+			return ret;
+		}
+	};
+});
+
+// IE submit delegation
+if ( !jQuery.support.submitBubbles ) {
+
+	jQuery.event.special.submit = {
+		setup: function() {
+			// Only need this for delegated form submit events
+			if ( jQuery.nodeName( this, "form" ) ) {
+				return false;
+			}
+
+			// Lazy-add a submit handler when a descendant form may potentially be submitted
+			jQuery.event.add( this, "click._submit keypress._submit", function( e ) {
+				// Node name check avoids a VML-related crash in IE (#9807)
+				var elem = e.target,
+					form = jQuery.nodeName( elem, "input" ) || jQuery.nodeName( elem, "button" ) ? elem.form : undefined;
+				if ( form && !form._submit_attached ) {
+					jQuery.event.add( form, "submit._submit", function( event ) {
+						// If form was submitted by the user, bubble the event up the tree
+						if ( this.parentNode && !event.isTrigger ) {
+							jQuery.event.simulate( "submit", this.parentNode, event, true );
+						}
+					});
+					form._submit_attached = true;
+				}
+			});
+			// return undefined since we don't need an event listener
+		},
+
+		teardown: function() {
+			// Only need this for delegated form submit events
+			if ( jQuery.nodeName( this, "form" ) ) {
+				return false;
+			}
+
+			// Remove delegated handlers; cleanData eventually reaps submit handlers attached above
+			jQuery.event.remove( this, "._submit" );
+		}
+	};
+}
+
+// IE change delegation and checkbox/radio fix
+if ( !jQuery.support.changeBubbles ) {
+
+	jQuery.event.special.change = {
+
+		setup: function() {
+
+			if ( rformElems.test( this.nodeName ) ) {
+				// IE doesn't fire change on a check/radio until blur; trigger it on click
+				// after a propertychange. Eat the blur-change in special.change.handle.
+				// This still fires onchange a second time for check/radio after blur.
+				if ( this.type === "checkbox" || this.type === "radio" ) {
+					jQuery.event.add( this, "propertychange._change", function( event ) {
+						if ( event.originalEvent.propertyName === "checked" ) {
+							this._just_changed = true;
+						}
+					});
+					jQuery.event.add( this, "click._change", function( event ) {
+						if ( this._just_changed && !event.isTrigger ) {
+							this._just_changed = false;
+							jQuery.event.simulate( "change", this, event, true );
+						}
+					});
+				}
+				return false;
+			}
+			// Delegated event; lazy-add a change handler on descendant inputs
+			jQuery.event.add( this, "beforeactivate._change", function( e ) {
+				var elem = e.target;
+
+				if ( rformElems.test( elem.nodeName ) && !elem._change_attached ) {
+					jQuery.event.add( elem, "change._change", function( event ) {
+						if ( this.parentNode && !event.isSimulated && !event.isTrigger ) {
+							jQuery.event.simulate( "change", this.parentNode, event, true );
+						}
+					});
+					elem._change_attached = true;
+				}
+			});
+		},
+
+		handle: function( event ) {
+			var elem = event.target;
+
+			// Swallow native change events from checkbox/radio, we already triggered them above
+			if ( this !== elem || event.isSimulated || event.isTrigger || (elem.type !== "radio" && elem.type !== "checkbox") ) {
+				return event.handleObj.handler.apply( this, arguments );
+			}
+		},
+
+		teardown: function() {
+			jQuery.event.remove( this, "._change" );
+
+			return rformElems.test( this.nodeName );
+		}
+	};
+}
+
+// Create "bubbling" focus and blur events
+if ( !jQuery.support.focusinBubbles ) {
+	jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) {
+
+		// Attach a single capturing handler while someone wants focusin/focusout
+		var attaches = 0,
+			handler = function( event ) {
+				jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true );
+			};
+
+		jQuery.event.special[ fix ] = {
+			setup: function() {
+				if ( attaches++ === 0 ) {
+					document.addEventListener( orig, handler, true );
+				}
+			},
+			teardown: function() {
+				if ( --attaches === 0 ) {
+					document.removeEventListener( orig, handler, true );
+				}
+			}
+		};
+	});
+}
+
+jQuery.fn.extend({
+
+	on: function( types, selector, data, fn, /*INTERNAL*/ one ) {
+		var origFn, type;
+
+		// Types can be a map of types/handlers
+		if ( typeof types === "object" ) {
+			// ( types-Object, selector, data )
+			if ( typeof selector !== "string" ) {
+				// ( types-Object, data )
+				data = selector;
+				selector = undefined;
+			}
+			for ( type in types ) {
+				this.on( type, selector, data, types[ type ], one );
+			}
+			return this;
+		}
+
+		if ( data == null && fn == null ) {
+			// ( types, fn )
+			fn = selector;
+			data = selector = undefined;
+		} else if ( fn == null ) {
+			if ( typeof selector === "string" ) {
+				// ( types, selector, fn )
+				fn = data;
+				data = undefined;
+			} else {
+				// ( types, data, fn )
+				fn = data;
+				data = selector;
+				selector = undefined;
+			}
+		}
+		if ( fn === false ) {
+			fn = returnFalse;
+		} else if ( !fn ) {
+			return this;
+		}
+
+		if ( one === 1 ) {
+			origFn = fn;
+			fn = function( event ) {
+				// Can use an empty set, since event contains the info
+				jQuery().off( event );
+				return origFn.apply( this, arguments );
+			};
+			// Use same guid so caller can remove using origFn
+			fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );
+		}
+		return this.each( function() {
+			jQuery.event.add( this, types, fn, data, selector );
+		});
+	},
+	one: function( types, selector, data, fn ) {
+		return this.on.call( this, types, selector, data, fn, 1 );
+	},
+	off: function( types, selector, fn ) {
+		if ( types && types.preventDefault && types.handleObj ) {
+			// ( event )  dispatched jQuery.Event
+			var handleObj = types.handleObj;
+			jQuery( types.delegateTarget ).off(
+				handleObj.namespace? handleObj.type + "." + handleObj.namespace : handleObj.type,
+				handleObj.selector,
+				handleObj.handler
+			);
+			return this;
+		}
+		if ( typeof types === "object" ) {
+			// ( types-object [, selector] )
+			for ( var type in types ) {
+				this.off( type, selector, types[ type ] );
+			}
+			return this;
+		}
+		if ( selector === false || typeof selector === "function" ) {
+			// ( types [, fn] )
+			fn = selector;
+			selector = undefined;
+		}
+		if ( fn === false ) {
+			fn = returnFalse;
+		}
+		return this.each(function() {
+			jQuery.event.remove( this, types, fn, selector );
+		});
+	},
+
+	bind: function( types, data, fn ) {
+		return this.on( types, null, data, fn );
+	},
+	unbind: function( types, fn ) {
+		return this.off( types, null, fn );
+	},
+
+	live: function( types, data, fn ) {
+		jQuery( this.context ).on( types, this.selector, data, fn );
+		return this;
+	},
+	die: function( types, fn ) {
+		jQuery( this.context ).off( types, this.selector || "**", fn );
+		return this;
+	},
+
+	delegate: function( selector, types, data, fn ) {
+		return this.on( types, selector, data, fn );
+	},
+	undelegate: function( selector, types, fn ) {
+		// ( namespace ) or ( selector, types [, fn] )
+		return arguments.length == 1? this.off( selector, "**" ) : this.off( types, selector, fn );
+	},
+
+	trigger: function( type, data ) {
+		return this.each(function() {
+			jQuery.event.trigger( type, data, this );
+		});
+	},
+	triggerHandler: function( type, data ) {
+		if ( this[0] ) {
+			return jQuery.event.trigger( type, data, this[0], true );
+		}
+	},
+
+	toggle: function( fn ) {
+		// Save reference to arguments for access in closure
+		var args = arguments,
+			guid = fn.guid || jQuery.guid++,
+			i = 0,
+			toggler = function( event ) {
+				// Figure out which function to execute
+				var lastToggle = ( jQuery._data( this, "lastToggle" + fn.guid ) || 0 ) % i;
+				jQuery._data( this, "lastToggle" + fn.guid, lastToggle + 1 );
+
+				// Make sure that clicks stop
+				event.preventDefault();
+
+				// and execute the function
+				return args[ lastToggle ].apply( this, arguments ) || false;
+			};
+
+		// link all the functions, so any of them can unbind this click handler
+		toggler.guid = guid;
+		while ( i < args.length ) {
+			args[ i++ ].guid = guid;
+		}
+
+		return this.click( toggler );
+	},
+
+	hover: function( fnOver, fnOut ) {
+		return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );
+	}
+});
+
+jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " +
+	"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " +
+	"change select submit keydown keypress keyup error contextmenu").split(" "), function( i, name ) {
+
+	// Handle event binding
+	jQuery.fn[ name ] = function( data, fn ) {
+		if ( fn == null ) {
+			fn = data;
+			data = null;
+		}
+
+		return arguments.length > 0 ?
+			this.on( name, null, data, fn ) :
+			this.trigger( name );
+	};
+
+	if ( jQuery.attrFn ) {
+		jQuery.attrFn[ name ] = true;
+	}
+
+	if ( rkeyEvent.test( name ) ) {
+		jQuery.event.fixHooks[ name ] = jQuery.event.keyHooks;
+	}
+
+	if ( rmouseEvent.test( name ) ) {
+		jQuery.event.fixHooks[ name ] = jQuery.event.mouseHooks;
+	}
+});
+
+
+
+/*!
+ * Sizzle CSS Selector Engine
+ *  Copyright 2011, The Dojo Foundation
+ *  Released under the MIT, BSD, and GPL Licenses.
+ *  More information: http://sizzlejs.com/
+ */
+(function(){
+
+var chunker = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,
+	expando = "sizcache" + (Math.random() + '').replace('.', ''),
+	done = 0,
+	toString = Object.prototype.toString,
+	hasDuplicate = false,
+	baseHasDuplicate = true,
+	rBackslash = /\\/g,
+	rReturn = /\r\n/g,
+	rNonWord = /\W/;
+
+// Here we check if the JavaScript engine is using some sort of
+// optimization where it does not always call our comparision
+// function. If that is the case, discard the hasDuplicate value.
+//   Thus far that includes Google Chrome.
+[0, 0].sort(function() {
+	baseHasDuplicate = false;
+	return 0;
+});
+
+var Sizzle = function( selector, context, results, seed ) {
+	results = results || [];
+	context = context || document;
+
+	var origContext = context;
+
+	if ( context.nodeType !== 1 && context.nodeType !== 9 ) {
+		return [];
+	}
+	
+	if ( !selector || typeof selector !== "string" ) {
+		return results;
+	}
+
+	var m, set, checkSet, extra, ret, cur, pop, i,
+		prune = true,
+		contextXML = Sizzle.isXML( context ),
+		parts = [],
+		soFar = selector;
+	
+	// Reset the position of the chunker regexp (start from head)
+	do {
+		chunker.exec( "" );
+		m = chunker.exec( soFar );
+
+		if ( m ) {
+			soFar = m[3];
+		
+			parts.push( m[1] );
+		
+			if ( m[2] ) {
+				extra = m[3];
+				break;
+			}
+		}
+	} while ( m );
+
+	if ( parts.length > 1 && origPOS.exec( selector ) ) {
+
+		if ( parts.length === 2 && Expr.relative[ parts[0] ] ) {
+			set = posProcess( parts[0] + parts[1], context, seed );
+
+		} else {
+			set = Expr.relative[ parts[0] ] ?
+				[ context ] :
+				Sizzle( parts.shift(), context );
+
+			while ( parts.length ) {
+				selector = parts.shift();
+
+				if ( Expr.relative[ selector ] ) {
+					selector += parts.shift();
+				}
+				
+				set = posProcess( selector, set, seed );
+			}
+		}
+
+	} else {
+		// Take a shortcut and set the context if the root selector is an ID
+		// (but not if it'll be faster if the inner selector is an ID)
+		if ( !seed && parts.length > 1 && context.nodeType === 9 && !contextXML &&
+				Expr.match.ID.test(parts[0]) && !Expr.match.ID.test(parts[parts.length - 1]) ) {
+
+			ret = Sizzle.find( parts.shift(), context, contextXML );
+			context = ret.expr ?
+				Sizzle.filter( ret.expr, ret.set )[0] :
+				ret.set[0];
+		}
+
+		if ( context ) {
+			ret = seed ?
+				{ expr: parts.pop(), set: makeArray(seed) } :
+				Sizzle.find( parts.pop(), parts.length === 1 && (parts[0] === "~" || parts[0] === "+") && context.parentNode ? context.parentNode : context, contextXML );
+
+			set = ret.expr ?
+				Sizzle.filter( ret.expr, ret.set ) :
+				ret.set;
+
+			if ( parts.length > 0 ) {
+				checkSet = makeArray( set );
+
+			} else {
+				prune = false;
+			}
+
+			while ( parts.length ) {
+				cur = parts.pop();
+				pop = cur;
+
+				if ( !Expr.relative[ cur ] ) {
+					cur = "";
+				} else {
+					pop = parts.pop();
+				}
+
+				if ( pop == null ) {
+					pop = context;
+				}
+
+				Expr.relative[ cur ]( checkSet, pop, contextXML );
+			}
+
+		} else {
+			checkSet = parts = [];
+		}
+	}
+
+	if ( !checkSet ) {
+		checkSet = set;
+	}
+
+	if ( !checkSet ) {
+		Sizzle.error( cur || selector );
+	}
+
+	if ( toString.call(checkSet) === "[object Array]" ) {
+		if ( !prune ) {
+			results.push.apply( results, checkSet );
+
+		} else if ( context && context.nodeType === 1 ) {
+			for ( i = 0; checkSet[i] != null; i++ ) {
+				if ( checkSet[i] && (checkSet[i] === true || checkSet[i].nodeType === 1 && Sizzle.contains(context, checkSet[i])) ) {
+					results.push( set[i] );
+				}
+			}
+
+		} else {
+			for ( i = 0; checkSet[i] != null; i++ ) {
+				if ( checkSet[i] && checkSet[i].nodeType === 1 ) {
+					results.push( set[i] );
+				}
+			}
+		}
+
+	} else {
+		makeArray( checkSet, results );
+	}
+
+	if ( extra ) {
+		Sizzle( extra, origContext, results, seed );
+		Sizzle.uniqueSort( results );
+	}
+
+	return results;
+};
+
+Sizzle.uniqueSort = function( results ) {
+	if ( sortOrder ) {
+		hasDuplicate = baseHasDuplicate;
+		results.sort( sortOrder );
+
+		if ( hasDuplicate ) {
+			for ( var i = 1; i < results.length; i++ ) {
+				if ( results[i] === results[ i - 1 ] ) {
+					results.splice( i--, 1 );
+				}
+			}
+		}
+	}
+
+	return results;
+};
+
+Sizzle.matches = function( expr, set ) {
+	return Sizzle( expr, null, null, set );
+};
+
+Sizzle.matchesSelector = function( node, expr ) {
+	return Sizzle( expr, null, null, [node] ).length > 0;
+};
+
+Sizzle.find = function( expr, context, isXML ) {
+	var set, i, len, match, type, left;
+
+	if ( !expr ) {
+		return [];
+	}
+
+	for ( i = 0, len = Expr.order.length; i < len; i++ ) {
+		type = Expr.order[i];
+		
+		if ( (match = Expr.leftMatch[ type ].exec( expr )) ) {
+			left = match[1];
+			match.splice( 1, 1 );
+
+			if ( left.substr( left.length - 1 ) !== "\\" ) {
+				match[1] = (match[1] || "").replace( rBackslash, "" );
+				set = Expr.find[ type ]( match, context, isXML );
+
+				if ( set != null ) {
+					expr = expr.replace( Expr.match[ type ], "" );
+					break;
+				}
+			}
+		}
+	}
+
+	if ( !set ) {
+		set = typeof context.getElementsByTagName !== "undefined" ?
+			context.getElementsByTagName( "*" ) :
+			[];
+	}
+
+	return { set: set, expr: expr };
+};
+
+Sizzle.filter = function( expr, set, inplace, not ) {
+	var match, anyFound,
+		type, found, item, filter, left,
+		i, pass,
+		old = expr,
+		result = [],
+		curLoop = set,
+		isXMLFilter = set && set[0] && Sizzle.isXML( set[0] );
+
+	while ( expr && set.length ) {
+		for ( type in Expr.filter ) {
+			if ( (match = Expr.leftMatch[ type ].exec( expr )) != null && match[2] ) {
+				filter = Expr.filter[ type ];
+				left = match[1];
+
+				anyFound = false;
+
+				match.splice(1,1);
+
+				if ( left.substr( left.length - 1 ) === "\\" ) {
+					continue;
+				}
+
+				if ( curLoop === result ) {
+					result = [];
+				}
+
+				if ( Expr.preFilter[ type ] ) {
+					match = Expr.preFilter[ type ]( match, curLoop, inplace, result, not, isXMLFilter );
+
+					if ( !match ) {
+						anyFound = found = true;
+
+					} else if ( match === true ) {
+						continue;
+					}
+				}
+
+				if ( match ) {
+					for ( i = 0; (item = curLoop[i]) != null; i++ ) {
+						if ( item ) {
+							found = filter( item, match, i, curLoop );
+							pass = not ^ found;
+
+							if ( inplace && found != null ) {
+								if ( pass ) {
+									anyFound = true;
+
+								} else {
+									curLoop[i] = false;
+								}
+
+							} else if ( pass ) {
+								result.push( item );
+								anyFound = true;
+							}
+						}
+					}
+				}
+
+				if ( found !== undefined ) {
+					if ( !inplace ) {
+						curLoop = result;
+					}
+
+					expr = expr.replace( Expr.match[ type ], "" );
+
+					if ( !anyFound ) {
+						return [];
+					}
+
+					break;
+				}
+			}
+		}
+
+		// Improper expression
+		if ( expr === old ) {
+			if ( anyFound == null ) {
+				Sizzle.error( expr );
+
+			} else {
+				break;
+			}
+		}
+
+		old = expr;
+	}
+
+	return curLoop;
+};
+
+Sizzle.error = function( msg ) {
+	throw new Error( "Syntax error, unrecognized expression: " + msg );
+};
+
+/**
+ * Utility function for retreiving the text value of an array of DOM nodes
+ * @param {Array|Element} elem
+ */
+var getText = Sizzle.getText = function( elem ) {
+    var i, node,
+		nodeType = elem.nodeType,
+		ret = "";
+
+	if ( nodeType ) {
+		if ( nodeType === 1 || nodeType === 9 ) {
+			// Use textContent || innerText for elements
+			if ( typeof elem.textContent === 'string' ) {
+				return elem.textContent;
+			} else if ( typeof elem.innerText === 'string' ) {
+				// Replace IE's carriage returns
+				return elem.innerText.replace( rReturn, '' );
+			} else {
+				// Traverse it's children
+				for ( elem = elem.firstChild; elem; elem = elem.nextSibling) {
+					ret += getText( elem );
+				}
+			}
+		} else if ( nodeType === 3 || nodeType === 4 ) {
+			return elem.nodeValue;
+		}
+	} else {
+
+		// If no nodeType, this is expected to be an array
+		for ( i = 0; (node = elem[i]); i++ ) {
+			// Do not traverse comment nodes
+			if ( node.nodeType !== 8 ) {
+				ret += getText( node );
+			}
+		}
+	}
+	return ret;
+};
+
+var Expr = Sizzle.selectors = {
+	order: [ "ID", "NAME", "TAG" ],
+
+	match: {
+		ID: /#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,
+		CLASS: /\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,
+		NAME: /\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,
+		ATTR: /\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,
+		TAG: /^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,
+		CHILD: /:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,
+		POS: /:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,
+		PSEUDO: /:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/
+	},
+
+	leftMatch: {},
+
+	attrMap: {
+		"class": "className",
+		"for": "htmlFor"
+	},
+
+	attrHandle: {
+		href: function( elem ) {
+			return elem.getAttribute( "href" );
+		},
+		type: function( elem ) {
+			return elem.getAttribute( "type" );
+		}
+	},
+
+	relative: {
+		"+": function(checkSet, part){
+			var isPartStr = typeof part === "string",
+				isTag = isPartStr && !rNonWord.test( part ),
+				isPartStrNotTag = isPartStr && !isTag;
+
+			if ( isTag ) {
+				part = part.toLowerCase();
+			}
+
+			for ( var i = 0, l = checkSet.length, elem; i < l; i++ ) {
+				if ( (elem = checkSet[i]) ) {
+					while ( (elem = elem.previousSibling) && elem.nodeType !== 1 ) {}
+
+					checkSet[i] = isPartStrNotTag || elem && elem.nodeName.toLowerCase() === part ?
+						elem || false :
+						elem === part;
+				}
+			}
+
+			if ( isPartStrNotTag ) {
+				Sizzle.filter( part, checkSet, true );
+			}
+		},
+
+		">": function( checkSet, part ) {
+			var elem,
+				isPartStr = typeof part === "string",
+				i = 0,
+				l = checkSet.length;
+
+			if ( isPartStr && !rNonWord.test( part ) ) {
+				part = part.toLowerCase();
+
+				for ( ; i < l; i++ ) {
+					elem = checkSet[i];
+
+					if ( elem ) {
+						var parent = elem.parentNode;
+						checkSet[i] = parent.nodeName.toLowerCase() === part ? parent : false;
+					}
+				}
+
+			} else {
+				for ( ; i < l; i++ ) {
+					elem = checkSet[i];
+
+					if ( elem ) {
+						checkSet[i] = isPartStr ?
+							elem.parentNode :
+							elem.parentNode === part;
+					}
+				}
+
+				if ( isPartStr ) {
+					Sizzle.filter( part, checkSet, true );
+				}
+			}
+		},
+
+		"": function(checkSet, part, isXML){
+			var nodeCheck,
+				doneName = done++,
+				checkFn = dirCheck;
+
+			if ( typeof part === "string" && !rNonWord.test( part ) ) {
+				part = part.toLowerCase();
+				nodeCheck = part;
+				checkFn = dirNodeCheck;
+			}
+
+			checkFn( "parentNode", part, doneName, checkSet, nodeCheck, isXML );
+		},
+
+		"~": function( checkSet, part, isXML ) {
+			var nodeCheck,
+				doneName = done++,
+				checkFn = dirCheck;
+
+			if ( typeof part === "string" && !rNonWord.test( part ) ) {
+				part = part.toLowerCase();
+				nodeCheck = part;
+				checkFn = dirNodeCheck;
+			}
+
+			checkFn( "previousSibling", part, doneName, checkSet, nodeCheck, isXML );
+		}
+	},
+
+	find: {
+		ID: function( match, context, isXML ) {
+			if ( typeof context.getElementById !== "undefined" && !isXML ) {
+				var m = context.getElementById(match[1]);
+				// Check parentNode to catch when Blackberry 4.6 returns
+				// nodes that are no longer in the document #6963
+				return m && m.parentNode ? [m] : [];
+			}
+		},
+
+		NAME: function( match, context ) {
+			if ( typeof context.getElementsByName !== "undefined" ) {
+				var ret = [],
+					results = context.getElementsByName( match[1] );
+
+				for ( var i = 0, l = results.length; i < l; i++ ) {
+					if ( results[i].getAttribute("name") === match[1] ) {
+						ret.push( results[i] );
+					}
+				}
+
+				return ret.length === 0 ? null : ret;
+			}
+		},
+
+		TAG: function( match, context ) {
+			if ( typeof context.getElementsByTagName !== "undefined" ) {
+				return context.getElementsByTagName( match[1] );
+			}
+		}
+	},
+	preFilter: {
+		CLASS: function( match, curLoop, inplace, result, not, isXML ) {
+			match = " " + match[1].replace( rBackslash, "" ) + " ";
+
+			if ( isXML ) {
+				return match;
+			}
+
+			for ( var i = 0, elem; (elem = curLoop[i]) != null; i++ ) {
+				if ( elem ) {
+					if ( not ^ (elem.className && (" " + elem.className + " ").replace(/[\t\n\r]/g, " ").indexOf(match) >= 0) ) {
+						if ( !inplace ) {
+							result.push( elem );
+						}
+
+					} else if ( inplace ) {
+						curLoop[i] = false;
+					}
+				}
+			}
+
+			return false;
+		},
+
+		ID: function( match ) {
+			return match[1].replace( rBackslash, "" );
+		},
+
+		TAG: function( match, curLoop ) {
+			return match[1].replace( rBackslash, "" ).toLowerCase();
+		},
+
+		CHILD: function( match ) {
+			if ( match[1] === "nth" ) {
+				if ( !match[2] ) {
+					Sizzle.error( match[0] );
+				}
+
+				match[2] = match[2].replace(/^\+|\s*/g, '');
+
+				// parse equations like 'even', 'odd', '5', '2n', '3n+2', '4n-1', '-n+6'
+				var test = /(-?)(\d*)(?:n([+\-]?\d*))?/.exec(
+					match[2] === "even" && "2n" || match[2] === "odd" && "2n+1" ||
+					!/\D/.test( match[2] ) && "0n+" + match[2] || match[2]);
+
+				// calculate the numbers (first)n+(last) including if they are negative
+				match[2] = (test[1] + (test[2] || 1)) - 0;
+				match[3] = test[3] - 0;
+			}
+			else if ( match[2] ) {
+				Sizzle.error( match[0] );
+			}
+
+			// TODO: Move to normal caching system
+			match[0] = done++;
+
+			return match;
+		},
+
+		ATTR: function( match, curLoop, inplace, result, not, isXML ) {
+			var name = match[1] = match[1].replace( rBackslash, "" );
+			
+			if ( !isXML && Expr.attrMap[name] ) {
+				match[1] = Expr.attrMap[name];
+			}
+
+			// Handle if an un-quoted value was used
+			match[4] = ( match[4] || match[5] || "" ).replace( rBackslash, "" );
+
+			if ( match[2] === "~=" ) {
+				match[4] = " " + match[4] + " ";
+			}
+
+			return match;
+		},
+
+		PSEUDO: function( match, curLoop, inplace, result, not ) {
+			if ( match[1] === "not" ) {
+				// If we're dealing with a complex expression, or a simple one
+				if ( ( chunker.exec(match[3]) || "" ).length > 1 || /^\w/.test(match[3]) ) {
+					match[3] = Sizzle(match[3], null, null, curLoop);
+
+				} else {
+					var ret = Sizzle.filter(match[3], curLoop, inplace, true ^ not);
+
+					if ( !inplace ) {
+						result.push.apply( result, ret );
+					}
+
+					return false;
+				}
+
+			} else if ( Expr.match.POS.test( match[0] ) || Expr.match.CHILD.test( match[0] ) ) {
+				return true;
+			}
+			
+			return match;
+		},
+
+		POS: function( match ) {
+			match.unshift( true );
+
+			return match;
+		}
+	},
+	
+	filters: {
+		enabled: function( elem ) {
+			return elem.disabled === false && elem.type !== "hidden";
+		},
+
+		disabled: function( elem ) {
+			return elem.disabled === true;
+		},
+
+		checked: function( elem ) {
+			return elem.checked === true;
+		},
+		
+		selected: function( elem ) {
+			// Accessing this property makes selected-by-default
+			// options in Safari work properly
+			if ( elem.parentNode ) {
+				elem.parentNode.selectedIndex;
+			}
+			
+			return elem.selected === true;
+		},
+
+		parent: function( elem ) {
+			return !!elem.firstChild;
+		},
+
+		empty: function( elem ) {
+			return !elem.firstChild;
+		},
+
+		has: function( elem, i, match ) {
+			return !!Sizzle( match[3], elem ).length;
+		},
+
+		header: function( elem ) {
+			return (/h\d/i).test( elem.nodeName );
+		},
+
+		text: function( elem ) {
+			var attr = elem.getAttribute( "type" ), type = elem.type;
+			// IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc) 
+			// use getAttribute instead to test this case
+			return elem.nodeName.toLowerCase() === "input" && "text" === type && ( attr === type || attr === null );
+		},
+
+		radio: function( elem ) {
+			return elem.nodeName.toLowerCase() === "input" && "radio" === elem.type;
+		},
+
+		checkbox: function( elem ) {
+			return elem.nodeName.toLowerCase() === "input" && "checkbox" === elem.type;
+		},
+
+		file: function( elem ) {
+			return elem.nodeName.toLowerCase() === "input" && "file" === elem.type;
+		},
+
+		password: function( elem ) {
+			return elem.nodeName.toLowerCase() === "input" && "password" === elem.type;
+		},
+
+		submit: function( elem ) {
+			var name = elem.nodeName.toLowerCase();
+			return (name === "input" || name === "button") && "submit" === elem.type;
+		},
+
+		image: function( elem ) {
+			return elem.nodeName.toLowerCase() === "input" && "image" === elem.type;
+		},
+
+		reset: function( elem ) {
+			var name = elem.nodeName.toLowerCase();
+			return (name === "input" || name === "button") && "reset" === elem.type;
+		},
+
+		button: function( elem ) {
+			var name = elem.nodeName.toLowerCase();
+			return name === "input" && "button" === elem.type || name === "button";
+		},
+
+		input: function( elem ) {
+			return (/input|select|textarea|button/i).test( elem.nodeName );
+		},
+
+		focus: function( elem ) {
+			return elem === elem.ownerDocument.activeElement;
+		}
+	},
+	setFilters: {
+		first: function( elem, i ) {
+			return i === 0;
+		},
+
+		last: function( elem, i, match, array ) {
+			return i === array.length - 1;
+		},
+
+		even: function( elem, i ) {
+			return i % 2 === 0;
+		},
+
+		odd: function( elem, i ) {
+			return i % 2 === 1;
+		},
+
+		lt: function( elem, i, match ) {
+			return i < match[3] - 0;
+		},
+
+		gt: function( elem, i, match ) {
+			return i > match[3] - 0;
+		},
+
+		nth: function( elem, i, match ) {
+			return match[3] - 0 === i;
+		},
+
+		eq: function( elem, i, match ) {
+			return match[3] - 0 === i;
+		}
+	},
+	filter: {
+		PSEUDO: function( elem, match, i, array ) {
+			var name = match[1],
+				filter = Expr.filters[ name ];
+
+			if ( filter ) {
+				return filter( elem, i, match, array );
+
+			} else if ( name === "contains" ) {
+				return (elem.textContent || elem.innerText || getText([ elem ]) || "").indexOf(match[3]) >= 0;
+
+			} else if ( name === "not" ) {
+				var not = match[3];
+
+				for ( var j = 0, l = not.length; j < l; j++ ) {
+					if ( not[j] === elem ) {
+						return false;
+					}
+				}
+
+				return true;
+
+			} else {
+				Sizzle.error( name );
+			}
+		},
+
+		CHILD: function( elem, match ) {
+			var first, last,
+				doneName, parent, cache,
+				count, diff,
+				type = match[1],
+				node = elem;
+
+			switch ( type ) {
+				case "only":
+				case "first":
+					while ( (node = node.previousSibling) )	 {
+						if ( node.nodeType === 1 ) { 
+							return false; 
+						}
+					}
+
+					if ( type === "first" ) { 
+						return true; 
+					}
+
+					node = elem;
+
+				case "last":
+					while ( (node = node.nextSibling) )	 {
+						if ( node.nodeType === 1 ) { 
+							return false; 
+						}
+					}
+
+					return true;
+
+				case "nth":
+					first = match[2];
+					last = match[3];
+
+					if ( first === 1 && last === 0 ) {
+						return true;
+					}
+					
+					doneName = match[0];
+					parent = elem.parentNode;
+	
+					if ( parent && (parent[ expando ] !== doneName || !elem.nodeIndex) ) {
+						count = 0;
+						
+						for ( node = parent.firstChild; node; node = node.nextSibling ) {
+							if ( node.nodeType === 1 ) {
+								node.nodeIndex = ++count;
+							}
+						} 
+
+						parent[ expando ] = doneName;
+					}
+					
+					diff = elem.nodeIndex - last;
+
+					if ( first === 0 ) {
+						return diff === 0;
+
+					} else {
+						return ( diff % first === 0 && diff / first >= 0 );
+					}
+			}
+		},
+
+		ID: function( elem, match ) {
+			return elem.nodeType === 1 && elem.getAttribute("id") === match;
+		},
+
+		TAG: function( elem, match ) {
+			return (match === "*" && elem.nodeType === 1) || !!elem.nodeName && elem.nodeName.toLowerCase() === match;
+		},
+		
+		CLASS: function( elem, match ) {
+			return (" " + (elem.className || elem.getAttribute("class")) + " ")
+				.indexOf( match ) > -1;
+		},
+
+		ATTR: function( elem, match ) {
+			var name = match[1],
+				result = Sizzle.attr ?
+					Sizzle.attr( elem, name ) :
+					Expr.attrHandle[ name ] ?
+					Expr.attrHandle[ name ]( elem ) :
+					elem[ name ] != null ?
+						elem[ name ] :
+						elem.getAttribute( name ),
+				value = result + "",
+				type = match[2],
+				check = match[4];
+
+			return result == null ?
+				type === "!=" :
+				!type && Sizzle.attr ?
+				result != null :
+				type === "=" ?
+				value === check :
+				type === "*=" ?
+				value.indexOf(check) >= 0 :
+				type === "~=" ?
+				(" " + value + " ").indexOf(check) >= 0 :
+				!check ?
+				value && result !== false :
+				type === "!=" ?
+				value !== check :
+				type === "^=" ?
+				value.indexOf(check) === 0 :
+				type === "$=" ?
+				value.substr(value.length - check.length) === check :
+				type === "|=" ?
+				value === check || value.substr(0, check.length + 1) === check + "-" :
+				false;
+		},
+
+		POS: function( elem, match, i, array ) {
+			var name = match[2],
+				filter = Expr.setFilters[ name ];
+
+			if ( filter ) {
+				return filter( elem, i, match, array );
+			}
+		}
+	}
+};
+
+var origPOS = Expr.match.POS,
+	fescape = function(all, num){
+		return "\\" + (num - 0 + 1);
+	};
+
+for ( var type in Expr.match ) {
+	Expr.match[ type ] = new RegExp( Expr.match[ type ].source + (/(?![^\[]*\])(?![^\(]*\))/.source) );
+	Expr.leftMatch[ type ] = new RegExp( /(^(?:.|\r|\n)*?)/.source + Expr.match[ type ].source.replace(/\\(\d+)/g, fescape) );
+}
+
+var makeArray = function( array, results ) {
+	array = Array.prototype.slice.call( array, 0 );
+
+	if ( results ) {
+		results.push.apply( results, array );
+		return results;
+	}
+	
+	return array;
+};
+
+// Perform a simple check to determine if the browser is capable of
+// converting a NodeList to an array using builtin methods.
+// Also verifies that the returned array holds DOM nodes
+// (which is not the case in the Blackberry browser)
+try {
+	Array.prototype.slice.call( document.documentElement.childNodes, 0 )[0].nodeType;
+
+// Provide a fallback method if it does not work
+} catch( e ) {
+	makeArray = function( array, results ) {
+		var i = 0,
+			ret = results || [];
+
+		if ( toString.call(array) === "[object Array]" ) {
+			Array.prototype.push.apply( ret, array );
+
+		} else {
+			if ( typeof array.length === "number" ) {
+				for ( var l = array.length; i < l; i++ ) {
+					ret.push( array[i] );
+				}
+
+			} else {
+				for ( ; array[i]; i++ ) {
+					ret.push( array[i] );
+				}
+			}
+		}
+
+		return ret;
+	};
+}
+
+var sortOrder, siblingCheck;
+
+if ( document.documentElement.compareDocumentPosition ) {
+	sortOrder = function( a, b ) {
+		if ( a === b ) {
+			hasDuplicate = true;
+			return 0;
+		}
+
+		if ( !a.compareDocumentPosition || !b.compareDocumentPosition ) {
+			return a.compareDocumentPosition ? -1 : 1;
+		}
+
+		return a.compareDocumentPosition(b) & 4 ? -1 : 1;
+	};
+
+} else {
+	sortOrder = function( a, b ) {
+		// The nodes are identical, we can exit early
+		if ( a === b ) {
+			hasDuplicate = true;
+			return 0;
+
+		// Fallback to using sourceIndex (in IE) if it's available on both nodes
+		} else if ( a.sourceIndex && b.sourceIndex ) {
+			return a.sourceIndex - b.sourceIndex;
+		}
+
+		var al, bl,
+			ap = [],
+			bp = [],
+			aup = a.parentNode,
+			bup = b.parentNode,
+			cur = aup;
+
+		// If the nodes are siblings (or identical) we can do a quick check
+		if ( aup === bup ) {
+			return siblingCheck( a, b );
+
+		// If no parents were found then the nodes are disconnected
+		} else if ( !aup ) {
+			return -1;
+
+		} else if ( !bup ) {
+			return 1;
+		}
+
+		// Otherwise they're somewhere else in the tree so we need
+		// to build up a full list of the parentNodes for comparison
+		while ( cur ) {
+			ap.unshift( cur );
+			cur = cur.parentNode;
+		}
+
+		cur = bup;
+
+		while ( cur ) {
+			bp.unshift( cur );
+			cur = cur.parentNode;
+		}
+
+		al = ap.length;
+		bl = bp.length;
+
+		// Start walking down the tree looking for a discrepancy
+		for ( var i = 0; i < al && i < bl; i++ ) {
+			if ( ap[i] !== bp[i] ) {
+				return siblingCheck( ap[i], bp[i] );
+			}
+		}
+
+		// We ended someplace up the tree so do a sibling check
+		return i === al ?
+			siblingCheck( a, bp[i], -1 ) :
+			siblingCheck( ap[i], b, 1 );
+	};
+
+	siblingCheck = function( a, b, ret ) {
+		if ( a === b ) {
+			return ret;
+		}
+
+		var cur = a.nextSibling;
+
+		while ( cur ) {
+			if ( cur === b ) {
+				return -1;
+			}
+
+			cur = cur.nextSibling;
+		}
+
+		return 1;
+	};
+}
+
+// Check to see if the browser returns elements by name when
+// querying by getElementById (and provide a workaround)
+(function(){
+	// We're going to inject a fake input element with a specified name
+	var form = document.createElement("div"),
+		id = "script" + (new Date()).getTime(),
+		root = document.documentElement;
+
+	form.innerHTML = "<a name='" + id + "'/>";
+
+	// Inject it into the root element, check its status, and remove it quickly
+	root.insertBefore( form, root.firstChild );
+
+	// The workaround has to do additional checks after a getElementById
+	// Which slows things down for other browsers (hence the branching)
+	if ( document.getElementById( id ) ) {
+		Expr.find.ID = function( match, context, isXML ) {
+			if ( typeof context.getElementById !== "undefined" && !isXML ) {
+				var m = context.getElementById(match[1]);
+
+				return m ?
+					m.id === match[1] || typeof m.getAttributeNode !== "undefined" && m.getAttributeNode("id").nodeValue === match[1] ?
+						[m] :
+						undefined :
+					[];
+			}
+		};
+
+		Expr.filter.ID = function( elem, match ) {
+			var node = typeof elem.getAttributeNode !== "undefined" && elem.getAttributeNode("id");
+
+			return elem.nodeType === 1 && node && node.nodeValue === match;
+		};
+	}
+
+	root.removeChild( form );
+
+	// release memory in IE
+	root = form = null;
+})();
+
+(function(){
+	// Check to see if the browser returns only elements
+	// when doing getElementsByTagName("*")
+
+	// Create a fake element
+	var div = document.createElement("div");
+	div.appendChild( document.createComment("") );
+
+	// Make sure no comments are found
+	if ( div.getElementsByTagName("*").length > 0 ) {
+		Expr.find.TAG = function( match, context ) {
+			var results = context.getElementsByTagName( match[1] );
+
+			// Filter out possible comments
+			if ( match[1] === "*" ) {
+				var tmp = [];
+
+				for ( var i = 0; results[i]; i++ ) {
+					if ( results[i].nodeType === 1 ) {
+						tmp.push( results[i] );
+					}
+				}
+
+				results = tmp;
+			}
+
+			return results;
+		};
+	}
+
+	// Check to see if an attribute returns normalized href attributes
+	div.innerHTML = "<a href='#'></a>";
+
+	if ( div.firstChild && typeof div.firstChild.getAttribute !== "undefined" &&
+			div.firstChild.getAttribute("href") !== "#" ) {
+
+		Expr.attrHandle.href = function( elem ) {
+			return elem.getAttribute( "href", 2 );
+		};
+	}
+
+	// release memory in IE
+	div = null;
+})();
+
+if ( document.querySelectorAll ) {
+	(function(){
+		var oldSizzle = Sizzle,
+			div = document.createElement("div"),
+			id = "__sizzle__";
+
+		div.innerHTML = "<p class='TEST'></p>";
+
+		// Safari can't handle uppercase or unicode characters when
+		// in quirks mode.
+		if ( div.querySelectorAll && div.querySelectorAll(".TEST").length === 0 ) {
+			return;
+		}
+	
+		Sizzle = function( query, context, extra, seed ) {
+			context = context || document;
+
+			// Only use querySelectorAll on non-XML documents
+			// (ID selectors don't work in non-HTML documents)
+			if ( !seed && !Sizzle.isXML(context) ) {
+				// See if we find a selector to speed up
+				var match = /^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec( query );
+				
+				if ( match && (context.nodeType === 1 || context.nodeType === 9) ) {
+					// Speed-up: Sizzle("TAG")
+					if ( match[1] ) {
+						return makeArray( context.getElementsByTagName( query ), extra );
+					
+					// Speed-up: Sizzle(".CLASS")
+					} else if ( match[2] && Expr.find.CLASS && context.getElementsByClassName ) {
+						return makeArray( context.getElementsByClassName( match[2] ), extra );
+					}
+				}
+				
+				if ( context.nodeType === 9 ) {
+					// Speed-up: Sizzle("body")
+					// The body element only exists once, optimize finding it
+					if ( query === "body" && context.body ) {
+						return makeArray( [ context.body ], extra );
+						
+					// Speed-up: Sizzle("#ID")
+					} else if ( match && match[3] ) {
+						var elem = context.getElementById( match[3] );
+
+						// Check parentNode to catch when Blackberry 4.6 returns
+						// nodes that are no longer in the document #6963
+						if ( elem && elem.parentNode ) {
+							// Handle the case where IE and Opera return items
+							// by name instead of ID
+							if ( elem.id === match[3] ) {
+								return makeArray( [ elem ], extra );
+							}
+							
+						} else {
+							return makeArray( [], extra );
+						}
+					}
+					
+					try {
+						return makeArray( context.querySelectorAll(query), extra );
+					} catch(qsaError) {}
+
+				// qSA works strangely on Element-rooted queries
+				// We can work around this by specifying an extra ID on the root
+				// and working up from there (Thanks to Andrew Dupont for the technique)
+				// IE 8 doesn't work on object elements
+				} else if ( context.nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) {
+					var oldContext = context,
+						old = context.getAttribute( "id" ),
+						nid = old || id,
+						hasParent = context.parentNode,
+						relativeHierarchySelector = /^\s*[+~]/.test( query );
+
+					if ( !old ) {
+						context.setAttribute( "id", nid );
+					} else {
+						nid = nid.replace( /'/g, "\\$&" );
+					}
+					if ( relativeHierarchySelector && hasParent ) {
+						context = context.parentNode;
+					}
+
+					try {
+						if ( !relativeHierarchySelector || hasParent ) {
+							return makeArray( context.querySelectorAll( "[id='" + nid + "'] " + query ), extra );
+						}
+
+					} catch(pseudoError) {
+					} finally {
+						if ( !old ) {
+							oldContext.removeAttribute( "id" );
+						}
+					}
+				}
+			}
+		
+			return oldSizzle(query, context, extra, seed);
+		};
+
+		for ( var prop in oldSizzle ) {
+			Sizzle[ prop ] = oldSizzle[ prop ];
+		}
+
+		// release memory in IE
+		div = null;
+	})();
+}
+
+(function(){
+	var html = document.documentElement,
+		matches = html.matchesSelector || html.mozMatchesSelector || html.webkitMatchesSelector || html.msMatchesSelector;
+
+	if ( matches ) {
+		// Check to see if it's possible to do matchesSelector
+		// on a disconnected node (IE 9 fails this)
+		var disconnectedMatch = !matches.call( document.createElement( "div" ), "div" ),
+			pseudoWorks = false;
+
+		try {
+			// This should fail with an exception
+			// Gecko does not error, returns false instead
+			matches.call( document.documentElement, "[test!='']:sizzle" );
+	
+		} catch( pseudoError ) {
+			pseudoWorks = true;
+		}
+
+		Sizzle.matchesSelector = function( node, expr ) {
+			// Make sure that attribute selectors are quoted
+			expr = expr.replace(/\=\s*([^'"\]]*)\s*\]/g, "='$1']");
+
+			if ( !Sizzle.isXML( node ) ) {
+				try { 
+					if ( pseudoWorks || !Expr.match.PSEUDO.test( expr ) && !/!=/.test( expr ) ) {
+						var ret = matches.call( node, expr );
+
+						// IE 9's matchesSelector returns false on disconnected nodes
+						if ( ret || !disconnectedMatch ||
+								// As well, disconnected nodes are said to be in a document
+								// fragment in IE 9, so check for that
+								node.document && node.document.nodeType !== 11 ) {
+							return ret;
+						}
+					}
+				} catch(e) {}
+			}
+
+			return Sizzle(expr, null, null, [node]).length > 0;
+		};
+	}
+})();
+
+(function(){
+	var div = document.createElement("div");
+
+	div.innerHTML = "<div class='test e'></div><div class='test'></div>";
+
+	// Opera can't find a second classname (in 9.6)
+	// Also, make sure that getElementsByClassName actually exists
+	if ( !div.getElementsByClassName || div.getElementsByClassName("e").length === 0 ) {
+		return;
+	}
+
+	// Safari caches class attributes, doesn't catch changes (in 3.2)
+	div.lastChild.className = "e";
+
+	if ( div.getElementsByClassName("e").length === 1 ) {
+		return;
+	}
+	
+	Expr.order.splice(1, 0, "CLASS");
+	Expr.find.CLASS = function( match, context, isXML ) {
+		if ( typeof context.getElementsByClassName !== "undefined" && !isXML ) {
+			return context.getElementsByClassName(match[1]);
+		}
+	};
+
+	// release memory in IE
+	div = null;
+})();
+
+function dirNodeCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) {
+	for ( var i = 0, l = checkSet.length; i < l; i++ ) {
+		var elem = checkSet[i];
+
+		if ( elem ) {
+			var match = false;
+
+			elem = elem[dir];
+
+			while ( elem ) {
+				if ( elem[ expando ] === doneName ) {
+					match = checkSet[elem.sizset];
+					break;
+				}
+
+				if ( elem.nodeType === 1 && !isXML ){
+					elem[ expando ] = doneName;
+					elem.sizset = i;
+				}
+
+				if ( elem.nodeName.toLowerCase() === cur ) {
+					match = elem;
+					break;
+				}
+
+				elem = elem[dir];
+			}
+
+			checkSet[i] = match;
+		}
+	}
+}
+
+function dirCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) {
+	for ( var i = 0, l = checkSet.length; i < l; i++ ) {
+		var elem = checkSet[i];
+
+		if ( elem ) {
+			var match = false;
+			
+			elem = elem[dir];
+
+			while ( elem ) {
+				if ( elem[ expando ] === doneName ) {
+					match = checkSet[elem.sizset];
+					break;
+				}
+
+				if ( elem.nodeType === 1 ) {
+					if ( !isXML ) {
+						elem[ expando ] = doneName;
+						elem.sizset = i;
+					}
+
+					if ( typeof cur !== "string" ) {
+						if ( elem === cur ) {
+							match = true;
+							break;
+						}
+
+					} else if ( Sizzle.filter( cur, [elem] ).length > 0 ) {
+						match = elem;
+						break;
+					}
+				}
+
+				elem = elem[dir];
+			}
+
+			checkSet[i] = match;
+		}
+	}
+}
+
+if ( document.documentElement.contains ) {
+	Sizzle.contains = function( a, b ) {
+		return a !== b && (a.contains ? a.contains(b) : true);
+	};
+
+} else if ( document.documentElement.compareDocumentPosition ) {
+	Sizzle.contains = function( a, b ) {
+		return !!(a.compareDocumentPosition(b) & 16);
+	};
+
+} else {
+	Sizzle.contains = function() {
+		return false;
+	};
+}
+
+Sizzle.isXML = function( elem ) {
+	// documentElement is verified for cases where it doesn't yet exist
+	// (such as loading iframes in IE - #4833) 
+	var documentElement = (elem ? elem.ownerDocument || elem : 0).documentElement;
+
+	return documentElement ? documentElement.nodeName !== "HTML" : false;
+};
+
+var posProcess = function( selector, context, seed ) {
+	var match,
+		tmpSet = [],
+		later = "",
+		root = context.nodeType ? [context] : context;
+
+	// Position selectors must be done after the filter
+	// And so must :not(positional) so we move all PSEUDOs to the end
+	while ( (match = Expr.match.PSEUDO.exec( selector )) ) {
+		later += match[0];
+		selector = selector.replace( Expr.match.PSEUDO, "" );
+	}
+
+	selector = Expr.relative[selector] ? selector + "*" : selector;
+
+	for ( var i = 0, l = root.length; i < l; i++ ) {
+		Sizzle( selector, root[i], tmpSet, seed );
+	}
+
+	return Sizzle.filter( later, tmpSet );
+};
+
+// EXPOSE
+// Override sizzle attribute retrieval
+Sizzle.attr = jQuery.attr;
+Sizzle.selectors.attrMap = {};
+jQuery.find = Sizzle;
+jQuery.expr = Sizzle.selectors;
+jQuery.expr[":"] = jQuery.expr.filters;
+jQuery.unique = Sizzle.uniqueSort;
+jQuery.text = Sizzle.getText;
+jQuery.isXMLDoc = Sizzle.isXML;
+jQuery.contains = Sizzle.contains;
+
+
+})();
+
+
+var runtil = /Until$/,
+	rparentsprev = /^(?:parents|prevUntil|prevAll)/,
+	// Note: This RegExp should be improved, or likely pulled from Sizzle
+	rmultiselector = /,/,
+	isSimple = /^.[^:#\[\.,]*$/,
+	slice = Array.prototype.slice,
+	POS = jQuery.expr.match.POS,
+	// methods guaranteed to produce a unique set when starting from a unique set
+	guaranteedUnique = {
+		children: true,
+		contents: true,
+		next: true,
+		prev: true
+	};
+
+jQuery.fn.extend({
+	find: function( selector ) {
+		var self = this,
+			i, l;
+
+		if ( typeof selector !== "string" ) {
+			return jQuery( selector ).filter(function() {
+				for ( i = 0, l = self.length; i < l; i++ ) {
+					if ( jQuery.contains( self[ i ], this ) ) {
+						return true;
+					}
+				}
+			});
+		}
+
+		var ret = this.pushStack( "", "find", selector ),
+			length, n, r;
+
+		for ( i = 0, l = this.length; i < l; i++ ) {
+			length = ret.length;
+			jQuery.find( selector, this[i], ret );
+
+			if ( i > 0 ) {
+				// Make sure that the results are unique
+				for ( n = length; n < ret.length; n++ ) {
+					for ( r = 0; r < length; r++ ) {
+						if ( ret[r] === ret[n] ) {
+							ret.splice(n--, 1);
+							break;
+						}
+					}
+				}
+			}
+		}
+
+		return ret;
+	},
+
+	has: function( target ) {
+		var targets = jQuery( target );
+		return this.filter(function() {
+			for ( var i = 0, l = targets.length; i < l; i++ ) {
+				if ( jQuery.contains( this, targets[i] ) ) {
+					return true;
+				}
+			}
+		});
+	},
+
+	not: function( selector ) {
+		return this.pushStack( winnow(this, selector, false), "not", selector);
+	},
+
+	filter: function( selector ) {
+		return this.pushStack( winnow(this, selector, true), "filter", selector );
+	},
+
+	is: function( selector ) {
+		return !!selector && ( 
+			typeof selector === "string" ?
+				// If this is a positional selector, check membership in the returned set
+				// so $("p:first").is("p:last") won't return true for a doc with two "p".
+				POS.test( selector ) ? 
+					jQuery( selector, this.context ).index( this[0] ) >= 0 :
+					jQuery.filter( selector, this ).length > 0 :
+				this.filter( selector ).length > 0 );
+	},
+
+	closest: function( selectors, context ) {
+		var ret = [], i, l, cur = this[0];
+		
+		// Array (deprecated as of jQuery 1.7)
+		if ( jQuery.isArray( selectors ) ) {
+			var level = 1;
+
+			while ( cur && cur.ownerDocument && cur !== context ) {
+				for ( i = 0; i < selectors.length; i++ ) {
+
+					if ( jQuery( cur ).is( selectors[ i ] ) ) {
+						ret.push({ selector: selectors[ i ], elem: cur, level: level });
+					}
+				}
+
+				cur = cur.parentNode;
+				level++;
+			}
+
+			return ret;
+		}
+
+		// String
+		var pos = POS.test( selectors ) || typeof selectors !== "string" ?
+				jQuery( selectors, context || this.context ) :
+				0;
+
+		for ( i = 0, l = this.length; i < l; i++ ) {
+			cur = this[i];
+
+			while ( cur ) {
+				if ( pos ? pos.index(cur) > -1 : jQuery.find.matchesSelector(cur, selectors) ) {
+					ret.push( cur );
+					break;
+
+				} else {
+					cur = cur.parentNode;
+					if ( !cur || !cur.ownerDocument || cur === context || cur.nodeType === 11 ) {
+						break;
+					}
+				}
+			}
+		}
+
+		ret = ret.length > 1 ? jQuery.unique( ret ) : ret;
+
+		return this.pushStack( ret, "closest", selectors );
+	},
+
+	// Determine the position of an element within
+	// the matched set of elements
+	index: function( elem ) {
+
+		// No argument, return index in parent
+		if ( !elem ) {
+			return ( this[0] && this[0].parentNode ) ? this.prevAll().length : -1;
+		}
+
+		// index in selector
+		if ( typeof elem === "string" ) {
+			return jQuery.inArray( this[0], jQuery( elem ) );
+		}
+
+		// Locate the position of the desired element
+		return jQuery.inArray(
+			// If it receives a jQuery object, the first element is used
+			elem.jquery ? elem[0] : elem, this );
+	},
+
+	add: function( selector, context ) {
+		var set = typeof selector === "string" ?
+				jQuery( selector, context ) :
+				jQuery.makeArray( selector && selector.nodeType ? [ selector ] : selector ),
+			all = jQuery.merge( this.get(), set );
+
+		return this.pushStack( isDisconnected( set[0] ) || isDisconnected( all[0] ) ?
+			all :
+			jQuery.unique( all ) );
+	},
+
+	andSelf: function() {
+		return this.add( this.prevObject );
+	}
+});
+
+// A painfully simple check to see if an element is disconnected
+// from a document (should be improved, where feasible).
+function isDisconnected( node ) {
+	return !node || !node.parentNode || node.parentNode.nodeType === 11;
+}
+
+jQuery.each({
+	parent: function( elem ) {
+		var parent = elem.parentNode;
+		return parent && parent.nodeType !== 11 ? parent : null;
+	},
+	parents: function( elem ) {
+		return jQuery.dir( elem, "parentNode" );
+	},
+	parentsUntil: function( elem, i, until ) {
+		return jQuery.dir( elem, "parentNode", until );
+	},
+	next: function( elem ) {
+		return jQuery.nth( elem, 2, "nextSibling" );
+	},
+	prev: function( elem ) {
+		return jQuery.nth( elem, 2, "previousSibling" );
+	},
+	nextAll: function( elem ) {
+		return jQuery.dir( elem, "nextSibling" );
+	},
+	prevAll: function( elem ) {
+		return jQuery.dir( elem, "previousSibling" );
+	},
+	nextUntil: function( elem, i, until ) {
+		return jQuery.dir( elem, "nextSibling", until );
+	},
+	prevUntil: function( elem, i, until ) {
+		return jQuery.dir( elem, "previousSibling", until );
+	},
+	siblings: function( elem ) {
+		return jQuery.sibling( elem.parentNode.firstChild, elem );
+	},
+	children: function( elem ) {
+		return jQuery.sibling( elem.firstChild );
+	},
+	contents: function( elem ) {
+		return jQuery.nodeName( elem, "iframe" ) ?
+			elem.contentDocument || elem.contentWindow.document :
+			jQuery.makeArray( elem.childNodes );
+	}
+}, function( name, fn ) {
+	jQuery.fn[ name ] = function( until, selector ) {
+		var ret = jQuery.map( this, fn, until );
+
+		if ( !runtil.test( name ) ) {
+			selector = until;
+		}
+
+		if ( selector && typeof selector === "string" ) {
+			ret = jQuery.filter( selector, ret );
+		}
+
+		ret = this.length > 1 && !guaranteedUnique[ name ] ? jQuery.unique( ret ) : ret;
+
+		if ( (this.length > 1 || rmultiselector.test( selector )) && rparentsprev.test( name ) ) {
+			ret = ret.reverse();
+		}
+
+		return this.pushStack( ret, name, slice.call( arguments ).join(",") );
+	};
+});
+
+jQuery.extend({
+	filter: function( expr, elems, not ) {
+		if ( not ) {
+			expr = ":not(" + expr + ")";
+		}
+
+		return elems.length === 1 ?
+			jQuery.find.matchesSelector(elems[0], expr) ? [ elems[0] ] : [] :
+			jQuery.find.matches(expr, elems);
+	},
+
+	dir: function( elem, dir, until ) {
+		var matched = [],
+			cur = elem[ dir ];
+
+		while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) {
+			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 && n !== elem ) {
+				r.push( n );
+			}
+		}
+
+		return r;
+	}
+});
+
+// Implement the identical functionality for filter and not
+function winnow( elements, qualifier, keep ) {
+
+	// Can't pass null or undefined to indexOf in Firefox 4
+	// Set to 0 to skip string check
+	qualifier = qualifier || 0;
+
+	if ( jQuery.isFunction( qualifier ) ) {
+		return jQuery.grep(elements, function( elem, i ) {
+			var retVal = !!qualifier.call( elem, i, elem );
+			return retVal === keep;
+		});
+
+	} else if ( qualifier.nodeType ) {
+		return jQuery.grep(elements, function( elem, i ) {
+			return ( elem === qualifier ) === keep;
+		});
+
+	} else if ( typeof qualifier === "string" ) {
+		var filtered = jQuery.grep(elements, function( elem ) {
+			return elem.nodeType === 1;
+		});
+
+		if ( isSimple.test( qualifier ) ) {
+			return jQuery.filter(qualifier, filtered, !keep);
+		} else {
+			qualifier = jQuery.filter( qualifier, filtered );
+		}
+	}
+
+	return jQuery.grep(elements, function( elem, i ) {
+		return ( jQuery.inArray( elem, qualifier ) >= 0 ) === keep;
+	});
+}
+
+
+
+
+function createSafeFragment( document ) {
+	var list = nodeNames.split( "|" ),
+	safeFrag = document.createDocumentFragment();
+
+	if ( safeFrag.createElement ) {
+		while ( list.length ) {
+			safeFrag.createElement(
+				list.pop()
+			);
+		}
+	}
+	return safeFrag;
+}
+
+var nodeNames = "abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|" +
+		"header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",
+	rinlinejQuery = / jQuery\d+="(?:\d+|null)"/g,
+	rleadingWhitespace = /^\s+/,
+	rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,
+	rtagName = /<([\w:]+)/,
+	rtbody = /<tbody/i,
+	rhtml = /<|&#?\w+;/,
+	rnoInnerhtml = /<(?:script|style)/i,
+	rnocache = /<(?:script|object|embed|option|style)/i,
+	rnoshimcache = new RegExp("<(?:" + nodeNames + ")", "i"),
+	// checked="checked" or checked
+	rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i,
+	rscriptType = /\/(java|ecma)script/i,
+	rcleanScript = /^\s*<!(?:\[CDATA\[|\-\-)/,
+	wrapMap = {
+		option: [ 1, "<select multiple='multiple'>", "</select>" ],
+		legend: [ 1, "<fieldset>", "</fieldset>" ],
+		thead: [ 1, "<table>", "</table>" ],
+		tr: [ 2, "<table><tbody>", "</tbody></table>" ],
+		td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ],
+		col: [ 2, "<table><tbody></tbody><colgroup>", "</colgroup></table>" ],
+		area: [ 1, "<map>", "</map>" ],
+		_default: [ 0, "", "" ]
+	},
+	safeFragment = createSafeFragment( document );
+
+wrapMap.optgroup = wrapMap.option;
+wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
+wrapMap.th = wrapMap.td;
+
+// IE can't serialize <link> and <script> tags normally
+if ( !jQuery.support.htmlSerialize ) {
+	wrapMap._default = [ 1, "div<div>", "</div>" ];
+}
+
+jQuery.fn.extend({
+	text: function( text ) {
+		if ( jQuery.isFunction(text) ) {
+			return this.each(function(i) {
+				var self = jQuery( this );
+
+				self.text( text.call(this, i, self.text()) );
+			});
+		}
+
+		if ( typeof text !== "object" && text !== undefined ) {
+			return this.empty().append( (this[0] && this[0].ownerDocument || document).createTextNode( text ) );
+		}
+
+		return jQuery.text( this );
+	},
+
+	wrapAll: function( html ) {
+		if ( jQuery.isFunction( html ) ) {
+			return this.each(function(i) {
+				jQuery(this).wrapAll( html.call(this, i) );
+			});
+		}
+
+		if ( this[0] ) {
+			// The elements to wrap the target around
+			var wrap = jQuery( html, this[0].ownerDocument ).eq(0).clone(true);
+
+			if ( this[0].parentNode ) {
+				wrap.insertBefore( this[0] );
+			}
+
+			wrap.map(function() {
+				var elem = this;
+
+				while ( elem.firstChild && elem.firstChild.nodeType === 1 ) {
+					elem = elem.firstChild;
+				}
+
+				return elem;
+			}).append( this );
+		}
+
+		return this;
+	},
+
+	wrapInner: function( html ) {
+		if ( jQuery.isFunction( html ) ) {
+			return this.each(function(i) {
+				jQuery(this).wrapInner( html.call(this, i) );
+			});
+		}
+
+		return this.each(function() {
+			var self = jQuery( this ),
+				contents = self.contents();
+
+			if ( contents.length ) {
+				contents.wrapAll( html );
+
+			} else {
+				self.append( html );
+			}
+		});
+	},
+
+	wrap: function( html ) {
+		var isFunction = jQuery.isFunction( html );
+
+		return this.each(function(i) {
+			jQuery( this ).wrapAll( isFunction ? html.call(this, i) : html );
+		});
+	},
+
+	unwrap: function() {
+		return this.parent().each(function() {
+			if ( !jQuery.nodeName( this, "body" ) ) {
+				jQuery( this ).replaceWith( this.childNodes );
+			}
+		}).end();
+	},
+
+	append: function() {
+		return this.domManip(arguments, true, function( elem ) {
+			if ( this.nodeType === 1 ) {
+				this.appendChild( elem );
+			}
+		});
+	},
+
+	prepend: function() {
+		return this.domManip(arguments, true, function( elem ) {
+			if ( this.nodeType === 1 ) {
+				this.insertBefore( elem, this.firstChild );
+			}
+		});
+	},
+
+	before: function() {
+		if ( this[0] && this[0].parentNode ) {
+			return this.domManip(arguments, false, function( elem ) {
+				this.parentNode.insertBefore( elem, this );
+			});
+		} else if ( arguments.length ) {
+			var set = jQuery.clean( arguments );
+			set.push.apply( set, this.toArray() );
+			return this.pushStack( set, "before", arguments );
+		}
+	},
+
+	after: function() {
+		if ( this[0] && this[0].parentNode ) {
+			return this.domManip(arguments, false, function( elem ) {
+				this.parentNode.insertBefore( elem, this.nextSibling );
+			});
+		} else if ( arguments.length ) {
+			var set = this.pushStack( this, "after", arguments );
+			set.push.apply( set, jQuery.clean(arguments) );
+			return set;
+		}
+	},
+
+	// keepData is for internal use only--do not document
+	remove: function( selector, keepData ) {
+		for ( var i = 0, elem; (elem = this[i]) != null; i++ ) {
+			if ( !selector || jQuery.filter( selector, [ elem ] ).length ) {
+				if ( !keepData && elem.nodeType === 1 ) {
+					jQuery.cleanData( elem.getElementsByTagName("*") );
+					jQuery.cleanData( [ elem ] );
+				}
+
+				if ( elem.parentNode ) {
+					elem.parentNode.removeChild( elem );
+				}
+			}
+		}
+
+		return this;
+	},
+
+	empty: function() {
+		for ( var i = 0, elem; (elem = this[i]) != null; i++ ) {
+			// Remove element nodes and prevent memory leaks
+			if ( elem.nodeType === 1 ) {
+				jQuery.cleanData( elem.getElementsByTagName("*") );
+			}
+
+			// Remove any remaining nodes
+			while ( elem.firstChild ) {
+				elem.removeChild( elem.firstChild );
+			}
+		}
+
+		return this;
+	},
+
+	clone: function( dataAndEvents, deepDataAndEvents ) {
+		dataAndEvents = dataAndEvents == null ? false : dataAndEvents;
+		deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;
+
+		return this.map( function () {
+			return jQuery.clone( this, dataAndEvents, deepDataAndEvents );
+		});
+	},
+
+	html: function( value ) {
+		if ( value === undefined ) {
+			return this[0] && this[0].nodeType === 1 ?
+				this[0].innerHTML.replace(rinlinejQuery, "") :
+				null;
+
+		// See if we can take a shortcut and just use innerHTML
+		} else if ( typeof value === "string" && !rnoInnerhtml.test( value ) &&
+			(jQuery.support.leadingWhitespace || !rleadingWhitespace.test( value )) &&
+			!wrapMap[ (rtagName.exec( value ) || ["", ""])[1].toLowerCase() ] ) {
+
+			value = value.replace(rxhtmlTag, "<$1></$2>");
+
+			try {
+				for ( var i = 0, l = this.length; i < l; i++ ) {
+					// Remove element nodes and prevent memory leaks
+					if ( this[i].nodeType === 1 ) {
+						jQuery.cleanData( this[i].getElementsByTagName("*") );
+						this[i].innerHTML = value;
+					}
+				}
+
+			// If using innerHTML throws an exception, use the fallback method
+			} catch(e) {
+				this.empty().append( value );
+			}
+
+		} else if ( jQuery.isFunction( value ) ) {
+			this.each(function(i){
+				var self = jQuery( this );
+
+				self.html( value.call(this, i, self.html()) );
+			});
+
+		} else {
+			this.empty().append( value );
+		}
+
+		return this;
+	},
+
+	replaceWith: function( value ) {
+		if ( this[0] && this[0].parentNode ) {
+			// Make sure that the elements are removed from the DOM before they are inserted
+			// this can help fix replacing a parent with child elements
+			if ( jQuery.isFunction( value ) ) {
+				return this.each(function(i) {
+					var self = jQuery(this), old = self.html();
+					self.replaceWith( value.call( this, i, old ) );
+				});
+			}
+
+			if ( typeof value !== "string" ) {
+				value = jQuery( value ).detach();
+			}
+
+			return this.each(function() {
+				var next = this.nextSibling,
+					parent = this.parentNode;
+
+				jQuery( this ).remove();
+
+				if ( next ) {
+					jQuery(next).before( value );
+				} else {
+					jQuery(parent).append( value );
+				}
+			});
+		} else {
+			return this.length ?
+				this.pushStack( jQuery(jQuery.isFunction(value) ? value() : value), "replaceWith", value ) :
+				this;
+		}
+	},
+
+	detach: function( selector ) {
+		return this.remove( selector, true );
+	},
+
+	domManip: function( args, table, callback ) {
+		var results, first, fragment, parent,
+			value = args[0],
+			scripts = [];
+
+		// We can't cloneNode fragments that contain checked, in WebKit
+		if ( !jQuery.support.checkClone && arguments.length === 3 && typeof value === "string" && rchecked.test( value ) ) {
+			return this.each(function() {
+				jQuery(this).domManip( args, table, callback, true );
+			});
+		}
+
+		if ( jQuery.isFunction(value) ) {
+			return this.each(function(i) {
+				var self = jQuery(this);
+				args[0] = value.call(this, i, table ? self.html() : undefined);
+				self.domManip( args, table, callback );
+			});
+		}
+
+		if ( this[0] ) {
+			parent = value && value.parentNode;
+
+			// If we're in a fragment, just use that instead of building a new one
+			if ( jQuery.support.parentNode && parent && parent.nodeType === 11 && parent.childNodes.length === this.length ) {
+				results = { fragment: parent };
+
+			} else {
+				results = jQuery.buildFragment( args, this, scripts );
+			}
+
+			fragment = results.fragment;
+
+			if ( fragment.childNodes.length === 1 ) {
+				first = fragment = fragment.firstChild;
+			} else {
+				first = fragment.firstChild;
+			}
+
+			if ( first ) {
+				table = table && jQuery.nodeName( first, "tr" );
+
+				for ( var i = 0, l = this.length, lastIndex = l - 1; i < l; i++ ) {
+					callback.call(
+						table ?
+							root(this[i], first) :
+							this[i],
+						// Make sure that we do not leak memory by inadvertently discarding
+						// the original fragment (which might have attached data) instead of
+						// using it; in addition, use the original fragment object for the last
+						// item instead of first because it can end up being emptied incorrectly
+						// in certain situations (Bug #8070).
+						// Fragments from the fragment cache must always be cloned and never used
+						// in place.
+						results.cacheable || ( l > 1 && i < lastIndex ) ?
+							jQuery.clone( fragment, true, true ) :
+							fragment
+					);
+				}
+			}
+
+			if ( scripts.length ) {
+				jQuery.each( scripts, evalScript );
+			}
+		}
+
+		return this;
+	}
+});
+
+function root( elem, cur ) {
+	return jQuery.nodeName(elem, "table") ?
+		(elem.getElementsByTagName("tbody")[0] ||
+		elem.appendChild(elem.ownerDocument.createElement("tbody"))) :
+		elem;
+}
+
+function cloneCopyEvent( src, dest ) {
+
+	if ( dest.nodeType !== 1 || !jQuery.hasData( src ) ) {
+		return;
+	}
+
+	var type, i, l,
+		oldData = jQuery._data( src ),
+		curData = jQuery._data( dest, oldData ),
+		events = oldData.events;
+
+	if ( events ) {
+		delete curData.handle;
+		curData.events = {};
+
+		for ( type in events ) {
+			for ( i = 0, l = events[ type ].length; i < l; i++ ) {
+				jQuery.event.add( dest, type + ( events[ type ][ i ].namespace ? "." : "" ) + events[ type ][ i ].namespace, events[ type ][ i ], events[ type ][ i ].data );
+			}
+		}
+	}
+
+	// make the cloned public data object a copy from the original
+	if ( curData.data ) {
+		curData.data = jQuery.extend( {}, curData.data );
+	}
+}
+
+function cloneFixAttributes( src, dest ) {
+	var nodeName;
+
+	// We do not need to do anything for non-Elements
+	if ( dest.nodeType !== 1 ) {
+		return;
+	}
+
+	// clearAttributes removes the attributes, which we don't want,
+	// but also removes the attachEvent events, which we *do* want
+	if ( dest.clearAttributes ) {
+		dest.clearAttributes();
+	}
+
+	// mergeAttributes, in contrast, only merges back on the
+	// original attributes, not the events
+	if ( dest.mergeAttributes ) {
+		dest.mergeAttributes( src );
+	}
+
+	nodeName = dest.nodeName.toLowerCase();
+
+	// IE6-8 fail to clone children inside object elements that use
+	// the proprietary classid attribute value (rather than the type
+	// attribute) to identify the type of content to display
+	if ( nodeName === "object" ) {
+		dest.outerHTML = src.outerHTML;
+
+	} else if ( nodeName === "input" && (src.type === "checkbox" || src.type === "radio") ) {
+		// IE6-8 fails to persist the checked state of a cloned checkbox
+		// or radio button. Worse, IE6-7 fail to give the cloned element
+		// a checked appearance if the defaultChecked value isn't also set
+		if ( src.checked ) {
+			dest.defaultChecked = dest.checked = src.checked;
+		}
+
+		// IE6-7 get confused and end up setting the value of a cloned
+		// checkbox/radio button to an empty string instead of "on"
+		if ( dest.value !== src.value ) {
+			dest.value = src.value;
+		}
+
+	// IE6-8 fails to return the selected option to the default selected
+	// state when cloning options
+	} else if ( nodeName === "option" ) {
+		dest.selected = src.defaultSelected;
+
+	// IE6-8 fails to set the defaultValue to the correct value when
+	// cloning other types of input fields
+	} else if ( nodeName === "input" || nodeName === "textarea" ) {
+		dest.defaultValue = src.defaultValue;
+	}
+
+	// Event data gets referenced instead of copied if the expando
+	// gets copied too
+	dest.removeAttribute( jQuery.expando );
+}
+
+jQuery.buildFragment = function( args, nodes, scripts ) {
+	var fragment, cacheable, cacheresults, doc,
+	first = args[ 0 ];
+
+	// nodes may contain either an explicit document object,
+	// a jQuery collection or context object.
+	// If nodes[0] contains a valid object to assign to doc
+	if ( nodes && nodes[0] ) {
+		doc = nodes[0].ownerDocument || nodes[0];
+	}
+
+	// Ensure that an attr object doesn't incorrectly stand in as a document object
+	// Chrome and Firefox seem to allow this to occur and will throw exception
+	// Fixes #8950
+	if ( !doc.createDocumentFragment ) {
+		doc = document;
+	}
+
+	// Only cache "small" (1/2 KB) HTML strings that are associated with the main document
+	// Cloning options loses the selected state, so don't cache them
+	// IE 6 doesn't like it when you put <object> or <embed> elements in a fragment
+	// Also, WebKit does not clone 'checked' attributes on cloneNode, so don't cache
+	// Lastly, IE6,7,8 will not correctly reuse cached fragments that were created from unknown elems #10501
+	if ( args.length === 1 && typeof first === "string" && first.length < 512 && doc === document &&
+		first.charAt(0) === "<" && !rnocache.test( first ) &&
+		(jQuery.support.checkClone || !rchecked.test( first )) &&
+		(jQuery.support.html5Clone || !rnoshimcache.test( first )) ) {
+
+		cacheable = true;
+
+		cacheresults = jQuery.fragments[ first ];
+		if ( cacheresults && cacheresults !== 1 ) {
+			fragment = cacheresults;
+		}
+	}
+
+	if ( !fragment ) {
+		fragment = doc.createDocumentFragment();
+		jQuery.clean( args, doc, fragment, scripts );
+	}
+
+	if ( cacheable ) {
+		jQuery.fragments[ first ] = cacheresults ? fragment : 1;
+	}
+
+	return { fragment: fragment, cacheable: cacheable };
+};
+
+jQuery.fragments = {};
+
+jQuery.each({
+	appendTo: "append",
+	prependTo: "prepend",
+	insertBefore: "before",
+	insertAfter: "after",
+	replaceAll: "replaceWith"
+}, function( name, original ) {
+	jQuery.fn[ name ] = function( selector ) {
+		var ret = [],
+			insert = jQuery( selector ),
+			parent = this.length === 1 && this[0].parentNode;
+
+		if ( parent && parent.nodeType === 11 && parent.childNodes.length === 1 && insert.length === 1 ) {
+			insert[ original ]( this[0] );
+			return this;
+
+		} else {
+			for ( var i = 0, l = insert.length; i < l; i++ ) {
+				var elems = ( i > 0 ? this.clone(true) : this ).get();
+				jQuery( insert[i] )[ original ]( elems );
+				ret = ret.concat( elems );
+			}
+
+			return this.pushStack( ret, name, insert.selector );
+		}
+	};
+});
+
+function getAll( elem ) {
+	if ( typeof elem.getElementsByTagName !== "undefined" ) {
+		return elem.getElementsByTagName( "*" );
+
+	} else if ( typeof elem.querySelectorAll !== "undefined" ) {
+		return elem.querySelectorAll( "*" );
+
+	} else {
+		return [];
+	}
+}
+
+// Used in clean, fixes the defaultChecked property
+function fixDefaultChecked( elem ) {
+	if ( elem.type === "checkbox" || elem.type === "radio" ) {
+		elem.defaultChecked = elem.checked;
+	}
+}
+// Finds all inputs and passes them to fixDefaultChecked
+function findInputs( elem ) {
+	var nodeName = ( elem.nodeName || "" ).toLowerCase();
+	if ( nodeName === "input" ) {
+		fixDefaultChecked( elem );
+	// Skip scripts, get other children
+	} else if ( nodeName !== "script" && typeof elem.getElementsByTagName !== "undefined" ) {
+		jQuery.grep( elem.getElementsByTagName("input"), fixDefaultChecked );
+	}
+}
+
+// Derived From: http://www.iecss.com/shimprove/javascript/shimprove.1-0-1.js
+function shimCloneNode( elem ) {
+	var div = document.createElement( "div" );
+	safeFragment.appendChild( div );
+
+	div.innerHTML = elem.outerHTML;
+	return div.firstChild;
+}
+
+jQuery.extend({
+	clone: function( elem, dataAndEvents, deepDataAndEvents ) {
+		var srcElements,
+			destElements,
+			i,
+			// IE<=8 does not properly clone detached, unknown element nodes
+			clone = jQuery.support.html5Clone || !rnoshimcache.test( "<" + elem.nodeName ) ?
+				elem.cloneNode( true ) :
+				shimCloneNode( elem );
+
+		if ( (!jQuery.support.noCloneEvent || !jQuery.support.noCloneChecked) &&
+				(elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem) ) {
+			// IE copies events bound via attachEvent when using cloneNode.
+			// Calling detachEvent on the clone will also remove the events
+			// from the original. In order to get around this, we use some
+			// proprietary methods to clear the events. Thanks to MooTools
+			// guys for this hotness.
+
+			cloneFixAttributes( elem, clone );
+
+			// Using Sizzle here is crazy slow, so we use getElementsByTagName instead
+			srcElements = getAll( elem );
+			destElements = getAll( clone );
+
+			// Weird iteration because IE will replace the length property
+			// with an element if you are cloning the body and one of the
+			// elements on the page has a name or id of "length"
+			for ( i = 0; srcElements[i]; ++i ) {
+				// Ensure that the destination node is not null; Fixes #9587
+				if ( destElements[i] ) {
+					cloneFixAttributes( srcElements[i], destElements[i] );
+				}
+			}
+		}
+
+		// Copy the events from the original to the clone
+		if ( dataAndEvents ) {
+			cloneCopyEvent( elem, clone );
+
+			if ( deepDataAndEvents ) {
+				srcElements = getAll( elem );
+				destElements = getAll( clone );
+
+				for ( i = 0; srcElements[i]; ++i ) {
+					cloneCopyEvent( srcElements[i], destElements[i] );
+				}
+			}
+		}
+
+		srcElements = destElements = null;
+
+		// Return the cloned set
+		return clone;
+	},
+
+	clean: function( elems, context, fragment, scripts ) {
+		var checkScriptType;
+
+		context = context || document;
+
+		// !context.createElement fails in IE with an error but returns typeof 'object'
+		if ( typeof context.createElement === "undefined" ) {
+			context = context.ownerDocument || context[0] && context[0].ownerDocument || document;
+		}
+
+		var ret = [], j;
+
+		for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) {
+			if ( typeof elem === "number" ) {
+				elem += "";
+			}
+
+			if ( !elem ) {
+				continue;
+			}
+
+			// Convert html string into DOM nodes
+			if ( typeof elem === "string" ) {
+				if ( !rhtml.test( elem ) ) {
+					elem = context.createTextNode( elem );
+				} else {
+					// Fix "XHTML"-style tags in all browsers
+					elem = elem.replace(rxhtmlTag, "<$1></$2>");
+
+					// Trim whitespace, otherwise indexOf won't work as expected
+					var tag = ( rtagName.exec( elem ) || ["", ""] )[1].toLowerCase(),
+						wrap = wrapMap[ tag ] || wrapMap._default,
+						depth = wrap[0],
+						div = context.createElement("div");
+
+					// Append wrapper element to unknown element safe doc fragment
+					if ( context === document ) {
+						// Use the fragment we've already created for this document
+						safeFragment.appendChild( div );
+					} else {
+						// Use a fragment created with the owner document
+						createSafeFragment( context ).appendChild( div );
+					}
+
+					// Go to html and back, then peel off extra wrappers
+					div.innerHTML = wrap[1] + elem + wrap[2];
+
+					// Move to the right depth
+					while ( depth-- ) {
+						div = div.lastChild;
+					}
+
+					// Remove IE's autoinserted <tbody> from table fragments
+					if ( !jQuery.support.tbody ) {
+
+						// String was a <table>, *may* have spurious <tbody>
+						var hasBody = rtbody.test(elem),
+							tbody = tag === "table" && !hasBody ?
+								div.firstChild && div.firstChild.childNodes :
+
+								// String was a bare <thead> or <tfoot>
+								wrap[1] === "<table>" && !hasBody ?
+									div.childNodes :
+									[];
+
+						for ( j = tbody.length - 1; j >= 0 ; --j ) {
+							if ( jQuery.nodeName( tbody[ j ], "tbody" ) && !tbody[ j ].childNodes.length ) {
+								tbody[ j ].parentNode.removeChild( tbody[ j ] );
+							}
+						}
+					}
+
+					// IE completely kills leading whitespace when innerHTML is used
+					if ( !jQuery.support.leadingWhitespace && rleadingWhitespace.test( elem ) ) {
+						div.insertBefore( context.createTextNode( rleadingWhitespace.exec(elem)[0] ), div.firstChild );
+					}
+
+					elem = div.childNodes;
+				}
+			}
+
+			// Resets defaultChecked for any radios and checkboxes
+			// about to be appended to the DOM in IE 6/7 (#8060)
+			var len;
+			if ( !jQuery.support.appendChecked ) {
+				if ( elem[0] && typeof (len = elem.length) === "number" ) {
+					for ( j = 0; j < len; j++ ) {
+						findInputs( elem[j] );
+					}
+				} else {
+					findInputs( elem );
+				}
+			}
+
+			if ( elem.nodeType ) {
+				ret.push( elem );
+			} else {
+				ret = jQuery.merge( ret, elem );
+			}
+		}
+
+		if ( fragment ) {
+			checkScriptType = function( elem ) {
+				return !elem.type || rscriptType.test( elem.type );
+			};
+			for ( i = 0; ret[i]; i++ ) {
+				if ( scripts && jQuery.nodeName( ret[i], "script" ) && (!ret[i].type || ret[i].type.toLowerCase() === "text/javascript") ) {
+					scripts.push( ret[i].parentNode ? ret[i].parentNode.removeChild( ret[i] ) : ret[i] );
+
+				} else {
+					if ( ret[i].nodeType === 1 ) {
+						var jsTags = jQuery.grep( ret[i].getElementsByTagName( "script" ), checkScriptType );
+
+						ret.splice.apply( ret, [i + 1, 0].concat( jsTags ) );
+					}
+					fragment.appendChild( ret[i] );
+				}
+			}
+		}
+
+		return ret;
+	},
+
+	cleanData: function( elems ) {
+		var data, id,
+			cache = jQuery.cache,
+			special = jQuery.event.special,
+			deleteExpando = jQuery.support.deleteExpando;
+
+		for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) {
+			if ( elem.nodeName && jQuery.noData[elem.nodeName.toLowerCase()] ) {
+				continue;
+			}
+
+			id = elem[ jQuery.expando ];
+
+			if ( id ) {
+				data = cache[ id ];
+
+				if ( data && data.events ) {
+					for ( var type in data.events ) {
+						if ( special[ type ] ) {
+							jQuery.event.remove( elem, type );
+
+						// This is a shortcut to avoid jQuery.event.remove's overhead
+						} else {
+							jQuery.removeEvent( elem, type, data.handle );
+						}
+					}
+
+					// Null the DOM reference to avoid IE6/7/8 leak (#7054)
+					if ( data.handle ) {
+						data.handle.elem = null;
+					}
+				}
+
+				if ( deleteExpando ) {
+					delete elem[ jQuery.expando ];
+
+				} else if ( elem.removeAttribute ) {
+					elem.removeAttribute( jQuery.expando );
+				}
+
+				delete cache[ id ];
+			}
+		}
+	}
+});
+
+function evalScript( i, elem ) {
+	if ( elem.src ) {
+		jQuery.ajax({
+			url: elem.src,
+			async: false,
+			dataType: "script"
+		});
+	} else {
+		jQuery.globalEval( ( elem.text || elem.textContent || elem.innerHTML || "" ).replace( rcleanScript, "/*$0*/" ) );
+	}
+
+	if ( elem.parentNode ) {
+		elem.parentNode.removeChild( elem );
+	}
+}
+
+
+
+
+var ralpha = /alpha\([^)]*\)/i,
+	ropacity = /opacity=([^)]*)/,
+	// fixed for IE9, see #8346
+	rupper = /([A-Z]|^ms)/g,
+	rnumpx = /^-?\d+(?:px)?$/i,
+	rnum = /^-?\d/,
+	rrelNum = /^([\-+])=([\-+.\de]+)/,
+
+	cssShow = { position: "absolute", visibility: "hidden", display: "block" },
+	cssWidth = [ "Left", "Right" ],
+	cssHeight = [ "Top", "Bottom" ],
+	curCSS,
+
+	getComputedStyle,
+	currentStyle;
+
+jQuery.fn.css = function( name, value ) {
+	// Setting 'undefined' is a no-op
+	if ( arguments.length === 2 && value === undefined ) {
+		return this;
+	}
+
+	return jQuery.access( this, name, value, true, function( elem, name, value ) {
+		return value !== undefined ?
+			jQuery.style( elem, name, value ) :
+			jQuery.css( elem, name );
+	});
+};
+
+jQuery.extend({
+	// Add in style property hooks for overriding the default
+	// behavior of getting and setting a style property
+	cssHooks: {
+		opacity: {
+			get: function( elem, computed ) {
+				if ( computed ) {
+					// We should always get a number back from opacity
+					var ret = curCSS( elem, "opacity", "opacity" );
+					return ret === "" ? "1" : ret;
+
+				} else {
+					return elem.style.opacity;
+				}
+			}
+		}
+	},
+
+	// Exclude the following css properties to add px
+	cssNumber: {
+		"fillOpacity": true,
+		"fontWeight": true,
+		"lineHeight": true,
+		"opacity": true,
+		"orphans": true,
+		"widows": true,
+		"zIndex": true,
+		"zoom": true
+	},
+
+	// Add in properties whose names you wish to fix before
+	// setting or getting the value
+	cssProps: {
+		// normalize float css property
+		"float": jQuery.support.cssFloat ? "cssFloat" : "styleFloat"
+	},
+
+	// Get and set the style property on a DOM Node
+	style: function( elem, name, value, extra ) {
+		// Don't set styles on text and comment nodes
+		if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {
+			return;
+		}
+
+		// Make sure that we're working with the right name
+		var ret, type, origName = jQuery.camelCase( name ),
+			style = elem.style, hooks = jQuery.cssHooks[ origName ];
+
+		name = jQuery.cssProps[ origName ] || origName;
+
+		// Check if we're setting a value
+		if ( value !== undefined ) {
+			type = typeof value;
+
+			// convert relative number strings (+= or -=) to relative numbers. #7345
+			if ( type === "string" && (ret = rrelNum.exec( value )) ) {
+				value = ( +( ret[1] + 1) * +ret[2] ) + parseFloat( jQuery.css( elem, name ) );
+				// Fixes bug #9237
+				type = "number";
+			}
+
+			// Make sure that NaN and null values aren't set. See: #7116
+			if ( value == null || type === "number" && isNaN( value ) ) {
+				return;
+			}
+
+			// If a number was passed in, add 'px' to the (except for certain CSS properties)
+			if ( type === "number" && !jQuery.cssNumber[ origName ] ) {
+				value += "px";
+			}
+
+			// If a hook was provided, use that value, otherwise just set the specified value
+			if ( !hooks || !("set" in hooks) || (value = hooks.set( elem, value )) !== undefined ) {
+				// Wrapped to prevent IE from throwing errors when 'invalid' values are provided
+				// Fixes bug #5509
+				try {
+					style[ name ] = value;
+				} catch(e) {}
+			}
+
+		} else {
+			// If a hook was provided get the non-computed value from there
+			if ( hooks && "get" in hooks && (ret = hooks.get( elem, false, extra )) !== undefined ) {
+				return ret;
+			}
+
+			// Otherwise just get the value from the style object
+			return style[ name ];
+		}
+	},
+
+	css: function( elem, name, extra ) {
+		var ret, hooks;
+
+		// Make sure that we're working with the right name
+		name = jQuery.camelCase( name );
+		hooks = jQuery.cssHooks[ name ];
+		name = jQuery.cssProps[ name ] || name;
+
+		// cssFloat needs a special treatment
+		if ( name === "cssFloat" ) {
+			name = "float";
+		}
+
+		// If a hook was provided get the computed value from there
+		if ( hooks && "get" in hooks && (ret = hooks.get( elem, true, extra )) !== undefined ) {
+			return ret;
+
+		// Otherwise, if a way to get the computed value exists, use that
+		} else if ( curCSS ) {
+			return curCSS( elem, name );
+		}
+	},
+
+	// A method for quickly swapping in/out CSS properties to get correct calculations
+	swap: function( elem, options, callback ) {
+		var old = {};
+
+		// Remember the old values, and insert the new ones
+		for ( var name in options ) {
+			old[ name ] = elem.style[ name ];
+			elem.style[ name ] = options[ name ];
+		}
+
+		callback.call( elem );
+
+		// Revert the old values
+		for ( name in options ) {
+			elem.style[ name ] = old[ name ];
+		}
+	}
+});
+
+// DEPRECATED, Use jQuery.css() instead
+jQuery.curCSS = jQuery.css;
+
+jQuery.each(["height", "width"], function( i, name ) {
+	jQuery.cssHooks[ name ] = {
+		get: function( elem, computed, extra ) {
+			var val;
+
+			if ( computed ) {
+				if ( elem.offsetWidth !== 0 ) {
+					return getWH( elem, name, extra );
+				} else {
+					jQuery.swap( elem, cssShow, function() {
+						val = getWH( elem, name, extra );
+					});
+				}
+
+				return val;
+			}
+		},
+
+		set: function( elem, value ) {
+			if ( rnumpx.test( value ) ) {
+				// ignore negative width and height values #1599
+				value = parseFloat( value );
+
+				if ( value >= 0 ) {
+					return value + "px";
+				}
+
+			} else {
+				return value;
+			}
+		}
+	};
+});
+
+if ( !jQuery.support.opacity ) {
+	jQuery.cssHooks.opacity = {
+		get: function( elem, computed ) {
+			// IE uses filters for opacity
+			return ropacity.test( (computed && elem.currentStyle ? elem.currentStyle.filter : elem.style.filter) || "" ) ?
+				( parseFloat( RegExp.$1 ) / 100 ) + "" :
+				computed ? "1" : "";
+		},
+
+		set: function( elem, value ) {
+			var style = elem.style,
+				currentStyle = elem.currentStyle,
+				opacity = jQuery.isNumeric( value ) ? "alpha(opacity=" + value * 100 + ")" : "",
+				filter = currentStyle && currentStyle.filter || style.filter || "";
+
+			// IE has trouble with opacity if it does not have layout
+			// Force it by setting the zoom level
+			style.zoom = 1;
+
+			// if setting opacity to 1, and no other filters exist - attempt to remove filter attribute #6652
+			if ( value >= 1 && jQuery.trim( filter.replace( ralpha, "" ) ) === "" ) {
+
+				// Setting style.filter to null, "" & " " still leave "filter:" in the cssText
+				// if "filter:" is present at all, clearType is disabled, we want to avoid this
+				// style.removeAttribute is IE Only, but so apparently is this code path...
+				style.removeAttribute( "filter" );
+
+				// if there there is no filter style applied in a css rule, we are done
+				if ( currentStyle && !currentStyle.filter ) {
+					return;
+				}
+			}
+
+			// otherwise, set new filter values
+			style.filter = ralpha.test( filter ) ?
+				filter.replace( ralpha, opacity ) :
+				filter + " " + opacity;
+		}
+	};
+}
+
+jQuery(function() {
+	// This hook cannot be added until DOM ready because the support test
+	// for it is not run until after DOM ready
+	if ( !jQuery.support.reliableMarginRight ) {
+		jQuery.cssHooks.marginRight = {
+			get: function( elem, computed ) {
+				// WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
+				// Work around by temporarily setting element display to inline-block
+				var ret;
+				jQuery.swap( elem, { "display": "inline-block" }, function() {
+					if ( computed ) {
+						ret = curCSS( elem, "margin-right", "marginRight" );
+					} else {
+						ret = elem.style.marginRight;
+					}
+				});
+				return ret;
+			}
+		};
+	}
+});
+
+if ( document.defaultView && document.defaultView.getComputedStyle ) {
+	getComputedStyle = function( elem, name ) {
+		var ret, defaultView, computedStyle;
+
+		name = name.replace( rupper, "-$1" ).toLowerCase();
+
+		if ( (defaultView = elem.ownerDocument.defaultView) &&
+				(computedStyle = defaultView.getComputedStyle( elem, null )) ) {
+			ret = computedStyle.getPropertyValue( name );
+			if ( ret === "" && !jQuery.contains( elem.ownerDocument.documentElement, elem ) ) {
+				ret = jQuery.style( elem, name );
+			}
+		}
+
+		return ret;
+	};
+}
+
+if ( document.documentElement.currentStyle ) {
+	currentStyle = function( elem, name ) {
+		var left, rsLeft, uncomputed,
+			ret = elem.currentStyle && elem.currentStyle[ name ],
+			style = elem.style;
+
+		// Avoid setting ret to empty string here
+		// so we don't default to auto
+		if ( ret === null && style && (uncomputed = style[ name ]) ) {
+			ret = uncomputed;
+		}
+
+		// From the awesome hack by Dean Edwards
+		// http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291
+
+		// If we're not dealing with a regular pixel number
+		// but a number that has a weird ending, we need to convert it to pixels
+		if ( !rnumpx.test( ret ) && rnum.test( ret ) ) {
+
+			// Remember the original values
+			left = style.left;
+			rsLeft = elem.runtimeStyle && elem.runtimeStyle.left;
+
+			// Put in the new values to get a computed value out
+			if ( rsLeft ) {
+				elem.runtimeStyle.left = elem.currentStyle.left;
+			}
+			style.left = name === "fontSize" ? "1em" : ( ret || 0 );
+			ret = style.pixelLeft + "px";
+
+			// Revert the changed values
+			style.left = left;
+			if ( rsLeft ) {
+				elem.runtimeStyle.left = rsLeft;
+			}
+		}
+
+		return ret === "" ? "auto" : ret;
+	};
+}
+
+curCSS = getComputedStyle || currentStyle;
+
+function getWH( elem, name, extra ) {
+
+	// Start with offset property
+	var val = name === "width" ? elem.offsetWidth : elem.offsetHeight,
+		which = name === "width" ? cssWidth : cssHeight,
+		i = 0,
+		len = which.length;
+
+	if ( val > 0 ) {
+		if ( extra !== "border" ) {
+			for ( ; i < len; i++ ) {
+				if ( !extra ) {
+					val -= parseFloat( jQuery.css( elem, "padding" + which[ i ] ) ) || 0;
+				}
+				if ( extra === "margin" ) {
+					val += parseFloat( jQuery.css( elem, extra + which[ i ] ) ) || 0;
+				} else {
+					val -= parseFloat( jQuery.css( elem, "border" + which[ i ] + "Width" ) ) || 0;
+				}
+			}
+		}
+
+		return val + "px";
+	}
+
+	// Fall back to computed then uncomputed css if necessary
+	val = curCSS( elem, name, name );
+	if ( val < 0 || val == null ) {
+		val = elem.style[ name ] || 0;
+	}
+	// Normalize "", auto, and prepare for extra
+	val = parseFloat( val ) || 0;
+
+	// Add padding, border, margin
+	if ( extra ) {
+		for ( ; i < len; i++ ) {
+			val += parseFloat( jQuery.css( elem, "padding" + which[ i ] ) ) || 0;
+			if ( extra !== "padding" ) {
+				val += parseFloat( jQuery.css( elem, "border" + which[ i ] + "Width" ) ) || 0;
+			}
+			if ( extra === "margin" ) {
+				val += parseFloat( jQuery.css( elem, extra + which[ i ] ) ) || 0;
+			}
+		}
+	}
+
+	return val + "px";
+}
+
+if ( jQuery.expr && jQuery.expr.filters ) {
+	jQuery.expr.filters.hidden = function( elem ) {
+		var width = elem.offsetWidth,
+			height = elem.offsetHeight;
+
+		return ( width === 0 && height === 0 ) || (!jQuery.support.reliableHiddenOffsets && ((elem.style && elem.style.display) || jQuery.css( elem, "display" )) === "none");
+	};
+
+	jQuery.expr.filters.visible = function( elem ) {
+		return !jQuery.expr.filters.hidden( elem );
+	};
+}
+
+
+
+
+var r20 = /%20/g,
+	rbracket = /\[\]$/,
+	rCRLF = /\r?\n/g,
+	rhash = /#.*$/,
+	rheaders = /^(.*?):[ \t]*([^\r\n]*)\r?$/mg, // IE leaves an \r character at EOL
+	rinput = /^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,
+	// #7653, #8125, #8152: local protocol detection
+	rlocalProtocol = /^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,
+	rnoContent = /^(?:GET|HEAD)$/,
+	rprotocol = /^\/\//,
+	rquery = /\?/,
+	rscript = /<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,
+	rselectTextarea = /^(?:select|textarea)/i,
+	rspacesAjax = /\s+/,
+	rts = /([?&])_=[^&]*/,
+	rurl = /^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,
+
+	// Keep a copy of the old load method
+	_load = jQuery.fn.load,
+
+	/* Prefilters
+	 * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)
+	 * 2) These are called:
+	 *    - BEFORE asking for a transport
+	 *    - AFTER param serialization (s.data is a string if s.processData is true)
+	 * 3) key is the dataType
+	 * 4) the catchall symbol "*" can be used
+	 * 5) execution will start with transport dataType and THEN continue down to "*" if needed
+	 */
+	prefilters = {},
+
+	/* Transports bindings
+	 * 1) key is the dataType
+	 * 2) the catchall symbol "*" can be used
+	 * 3) selection will start with transport dataType and THEN go to "*" if needed
+	 */
+	transports = {},
+
+	// Document location
+	ajaxLocation,
+
+	// Document location segments
+	ajaxLocParts,
+
+	// Avoid comment-prolog char sequence (#10098); must appease lint and evade compression
+	allTypes = ["*/"] + ["*"];
+
+// #8138, IE may throw an exception when accessing
+// a field from window.location if document.domain has been set
+try {
+	ajaxLocation = location.href;
+} catch( e ) {
+	// Use the href attribute of an A element
+	// since IE will modify it given document.location
+	ajaxLocation = document.createElement( "a" );
+	ajaxLocation.href = "";
+	ajaxLocation = ajaxLocation.href;
+}
+
+// Segment location into parts
+ajaxLocParts = rurl.exec( ajaxLocation.toLowerCase() ) || [];
+
+// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport
+function addToPrefiltersOrTransports( structure ) {
+
+	// dataTypeExpression is optional and defaults to "*"
+	return function( dataTypeExpression, func ) {
+
+		if ( typeof dataTypeExpression !== "string" ) {
+			func = dataTypeExpression;
+			dataTypeExpression = "*";
+		}
+
+		if ( jQuery.isFunction( func ) ) {
+			var dataTypes = dataTypeExpression.toLowerCase().split( rspacesAjax ),
+				i = 0,
+				length = dataTypes.length,
+				dataType,
+				list,
+				placeBefore;
+
+			// For each dataType in the dataTypeExpression
+			for ( ; i < length; i++ ) {
+				dataType = dataTypes[ i ];
+				// We control if we're asked to add before
+				// any existing element
+				placeBefore = /^\+/.test( dataType );
+				if ( placeBefore ) {
+					dataType = dataType.substr( 1 ) || "*";
+				}
+				list = structure[ dataType ] = structure[ dataType ] || [];
+				// then we add to the structure accordingly
+				list[ placeBefore ? "unshift" : "push" ]( func );
+			}
+		}
+	};
+}
+
+// Base inspection function for prefilters and transports
+function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR,
+		dataType /* internal */, inspected /* internal */ ) {
+
+	dataType = dataType || options.dataTypes[ 0 ];
+	inspected = inspected || {};
+
+	inspected[ dataType ] = true;
+
+	var list = structure[ dataType ],
+		i = 0,
+		length = list ? list.length : 0,
+		executeOnly = ( structure === prefilters ),
+		selection;
+
+	for ( ; i < length && ( executeOnly || !selection ); i++ ) {
+		selection = list[ i ]( options, originalOptions, jqXHR );
+		// If we got redirected to another dataType
+		// we try there if executing only and not done already
+		if ( typeof selection === "string" ) {
+			if ( !executeOnly || inspected[ selection ] ) {
+				selection = undefined;
+			} else {
+				options.dataTypes.unshift( selection );
+				selection = inspectPrefiltersOrTransports(
+						structure, options, originalOptions, jqXHR, selection, inspected );
+			}
+		}
+	}
+	// If we're only executing or nothing was selected
+	// we try the catchall dataType if not done already
+	if ( ( executeOnly || !selection ) && !inspected[ "*" ] ) {
+		selection = inspectPrefiltersOrTransports(
+				structure, options, originalOptions, jqXHR, "*", inspected );
+	}
+	// unnecessary when only executing (prefilters)
+	// but it'll be ignored by the caller in that case
+	return selection;
+}
+
+// A special extend for ajax options
+// that takes "flat" options (not to be deep extended)
+// Fixes #9887
+function ajaxExtend( target, src ) {
+	var key, deep,
+		flatOptions = jQuery.ajaxSettings.flatOptions || {};
+	for ( key in src ) {
+		if ( src[ key ] !== undefined ) {
+			( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];
+		}
+	}
+	if ( deep ) {
+		jQuery.extend( true, target, deep );
+	}
+}
+
+jQuery.fn.extend({
+	load: function( url, params, callback ) {
+		if ( typeof url !== "string" && _load ) {
+			return _load.apply( this, arguments );
+
+		// Don't do a request if no elements are being requested
+		} else if ( !this.length ) {
+			return this;
+		}
+
+		var off = url.indexOf( " " );
+		if ( off >= 0 ) {
+			var selector = url.slice( off, url.length );
+			url = url.slice( 0, off );
+		}
+
+		// Default to a GET request
+		var type = "GET";
+
+		// If the second parameter was provided
+		if ( params ) {
+			// If it's a function
+			if ( jQuery.isFunction( params ) ) {
+				// We assume that it's the callback
+				callback = params;
+				params = undefined;
+
+			// Otherwise, build a param string
+			} else if ( typeof params === "object" ) {
+				params = jQuery.param( params, jQuery.ajaxSettings.traditional );
+				type = "POST";
+			}
+		}
+
+		var self = this;
+
+		// Request the remote document
+		jQuery.ajax({
+			url: url,
+			type: type,
+			dataType: "html",
+			data: params,
+			// Complete callback (responseText is used internally)
+			complete: function( jqXHR, status, responseText ) {
+				// Store the response as specified by the jqXHR object
+				responseText = jqXHR.responseText;
+				// If successful, inject the HTML into all the matched elements
+				if ( jqXHR.isResolved() ) {
+					// #4825: Get the actual response in case
+					// a dataFilter is present in ajaxSettings
+					jqXHR.done(function( r ) {
+						responseText = r;
+					});
+					// See if a selector was specified
+					self.html( selector ?
+						// Create a dummy div to hold the results
+						jQuery("<div>")
+							// inject the contents of the document in, removing the scripts
+							// to avoid any 'Permission Denied' errors in IE
+							.append(responseText.replace(rscript, ""))
+
+							// Locate the specified elements
+							.find(selector) :
+
+						// If not, just inject the full result
+						responseText );
+				}
+
+				if ( callback ) {
+					self.each( callback, [ responseText, status, jqXHR ] );
+				}
+			}
+		});
+
+		return this;
+	},
+
+	serialize: function() {
+		return jQuery.param( this.serializeArray() );
+	},
+
+	serializeArray: function() {
+		return this.map(function(){
+			return this.elements ? jQuery.makeArray( this.elements ) : this;
+		})
+		.filter(function(){
+			return this.name && !this.disabled &&
+				( this.checked || rselectTextarea.test( this.nodeName ) ||
+					rinput.test( this.type ) );
+		})
+		.map(function( i, elem ){
+			var val = jQuery( this ).val();
+
+			return val == null ?
+				null :
+				jQuery.isArray( val ) ?
+					jQuery.map( val, function( val, i ){
+						return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
+					}) :
+					{ name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
+		}).get();
+	}
+});
+
+// Attach a bunch of functions for handling common AJAX events
+jQuery.each( "ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split( " " ), function( i, o ){
+	jQuery.fn[ o ] = function( f ){
+		return this.on( o, f );
+	};
+});
+
+jQuery.each( [ "get", "post" ], function( i, method ) {
+	jQuery[ method ] = function( url, data, callback, type ) {
+		// shift arguments if data argument was omitted
+		if ( jQuery.isFunction( data ) ) {
+			type = type || callback;
+			callback = data;
+			data = undefined;
+		}
+
+		return jQuery.ajax({
+			type: method,
+			url: url,
+			data: data,
+			success: callback,
+			dataType: type
+		});
+	};
+});
+
+jQuery.extend({
+
+	getScript: function( url, callback ) {
+		return jQuery.get( url, undefined, callback, "script" );
+	},
+
+	getJSON: function( url, data, callback ) {
+		return jQuery.get( url, data, callback, "json" );
+	},
+
+	// Creates a full fledged settings object into target
+	// with both ajaxSettings and settings fields.
+	// If target is omitted, writes into ajaxSettings.
+	ajaxSetup: function( target, settings ) {
+		if ( settings ) {
+			// Building a settings object
+			ajaxExtend( target, jQuery.ajaxSettings );
+		} else {
+			// Extending ajaxSettings
+			settings = target;
+			target = jQuery.ajaxSettings;
+		}
+		ajaxExtend( target, settings );
+		return target;
+	},
+
+	ajaxSettings: {
+		url: ajaxLocation,
+		isLocal: rlocalProtocol.test( ajaxLocParts[ 1 ] ),
+		global: true,
+		type: "GET",
+		contentType: "application/x-www-form-urlencoded",
+		processData: true,
+		async: true,
+		/*
+		timeout: 0,
+		data: null,
+		dataType: null,
+		username: null,
+		password: null,
+		cache: null,
+		traditional: false,
+		headers: {},
+		*/
+
+		accepts: {
+			xml: "application/xml, text/xml",
+			html: "text/html",
+			text: "text/plain",
+			json: "application/json, text/javascript",
+			"*": allTypes
+		},
+
+		contents: {
+			xml: /xml/,
+			html: /html/,
+			json: /json/
+		},
+
+		responseFields: {
+			xml: "responseXML",
+			text: "responseText"
+		},
+
+		// List of data converters
+		// 1) key format is "source_type destination_type" (a single space in-between)
+		// 2) the catchall symbol "*" can be used for source_type
+		converters: {
+
+			// Convert anything to text
+			"* text": window.String,
+
+			// Text to html (true = no transformation)
+			"text html": true,
+
+			// Evaluate text as a json expression
+			"text json": jQuery.parseJSON,
+
+			// Parse text as xml
+			"text xml": jQuery.parseXML
+		},
+
+		// For options that shouldn't be deep extended:
+		// you can add your own custom options here if
+		// and when you create one that shouldn't be
+		// deep extended (see ajaxExtend)
+		flatOptions: {
+			context: true,
+			url: true
+		}
+	},
+
+	ajaxPrefilter: addToPrefiltersOrTransports( prefilters ),
+	ajaxTransport: addToPrefiltersOrTransports( transports ),
+
+	// Main method
+	ajax: function( url, options ) {
+
+		// If url is an object, simulate pre-1.5 signature
+		if ( typeof url === "object" ) {
+			options = url;
+			url = undefined;
+		}
+
+		// Force options to be an object
+		options = options || {};
+
+		var // Create the final options object
+			s = jQuery.ajaxSetup( {}, options ),
+			// Callbacks context
+			callbackContext = s.context || s,
+			// Context for global events
+			// It's the callbackContext if one was provided in the options
+			// and if it's a DOM node or a jQuery collection
+			globalEventContext = callbackContext !== s &&
+				( callbackContext.nodeType || callbackContext instanceof jQuery ) ?
+						jQuery( callbackContext ) : jQuery.event,
+			// Deferreds
+			deferred = jQuery.Deferred(),
+			completeDeferred = jQuery.Callbacks( "once memory" ),
+			// Status-dependent callbacks
+			statusCode = s.statusCode || {},
+			// ifModified key
+			ifModifiedKey,
+			// Headers (they are sent all at once)
+			requestHeaders = {},
+			requestHeadersNames = {},
+			// Response headers
+			responseHeadersString,
+			responseHeaders,
+			// transport
+			transport,
+			// timeout handle
+			timeoutTimer,
+			// Cross-domain detection vars
+			parts,
+			// The jqXHR state
+			state = 0,
+			// To know if global events are to be dispatched
+			fireGlobals,
+			// Loop variable
+			i,
+			// Fake xhr
+			jqXHR = {
+
+				readyState: 0,
+
+				// Caches the header
+				setRequestHeader: function( name, value ) {
+					if ( !state ) {
+						var lname = name.toLowerCase();
+						name = requestHeadersNames[ lname ] = requestHeadersNames[ lname ] || name;
+						requestHeaders[ name ] = value;
+					}
+					return this;
+				},
+
+				// Raw string
+				getAllResponseHeaders: function() {
+					return state === 2 ? responseHeadersString : null;
+				},
+
+				// Builds headers hashtable if needed
+				getResponseHeader: function( key ) {
+					var match;
+					if ( state === 2 ) {
+						if ( !responseHeaders ) {
+							responseHeaders = {};
+							while( ( match = rheaders.exec( responseHeadersString ) ) ) {
+								responseHeaders[ match[1].toLowerCase() ] = match[ 2 ];
+							}
+						}
+						match = responseHeaders[ key.toLowerCase() ];
+					}
+					return match === undefined ? null : match;
+				},
+
+				// Overrides response content-type header
+				overrideMimeType: function( type ) {
+					if ( !state ) {
+						s.mimeType = type;
+					}
+					return this;
+				},
+
+				// Cancel the request
+				abort: function( statusText ) {
+					statusText = statusText || "abort";
+					if ( transport ) {
+						transport.abort( statusText );
+					}
+					done( 0, statusText );
+					return this;
+				}
+			};
+
+		// Callback for when everything is done
+		// It is defined here because jslint complains if it is declared
+		// at the end of the function (which would be more logical and readable)
+		function done( status, nativeStatusText, responses, headers ) {
+
+			// Called once
+			if ( state === 2 ) {
+				return;
+			}
+
+			// State is "done" now
+			state = 2;
+
+			// Clear timeout if it exists
+			if ( timeoutTimer ) {
+				clearTimeout( timeoutTimer );
+			}
+
+			// Dereference transport for early garbage collection
+			// (no matter how long the jqXHR object will be used)
+			transport = undefined;
+
+			// Cache response headers
+			responseHeadersString = headers || "";
+
+			// Set readyState
+			jqXHR.readyState = status > 0 ? 4 : 0;
+
+			var isSuccess,
+				success,
+				error,
+				statusText = nativeStatusText,
+				response = responses ? ajaxHandleResponses( s, jqXHR, responses ) : undefined,
+				lastModified,
+				etag;
+
+			// If successful, handle type chaining
+			if ( status >= 200 && status < 300 || status === 304 ) {
+
+				// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
+				if ( s.ifModified ) {
+
+					if ( ( lastModified = jqXHR.getResponseHeader( "Last-Modified" ) ) ) {
+						jQuery.lastModified[ ifModifiedKey ] = lastModified;
+					}
+					if ( ( etag = jqXHR.getResponseHeader( "Etag" ) ) ) {
+						jQuery.etag[ ifModifiedKey ] = etag;
+					}
+				}
+
+				// If not modified
+				if ( status === 304 ) {
+
+					statusText = "notmodified";
+					isSuccess = true;
+
+				// If we have data
+				} else {
+
+					try {
+						success = ajaxConvert( s, response );
+						statusText = "success";
+						isSuccess = true;
+					} catch(e) {
+						// We have a parsererror
+						statusText = "parsererror";
+						error = e;
+					}
+				}
+			} else {
+				// We extract error from statusText
+				// then normalize statusText and status for non-aborts
+				error = statusText;
+				if ( !statusText || status ) {
+					statusText = "error";
+					if ( status < 0 ) {
+						status = 0;
+					}
+				}
+			}
+
+			// Set data for the fake xhr object
+			jqXHR.status = status;
+			jqXHR.statusText = "" + ( nativeStatusText || statusText );
+
+			// Success/Error
+			if ( isSuccess ) {
+				deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );
+			} else {
+				deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );
+			}
+
+			// Status-dependent callbacks
+			jqXHR.statusCode( statusCode );
+			statusCode = undefined;
+
+			if ( fireGlobals ) {
+				globalEventContext.trigger( "ajax" + ( isSuccess ? "Success" : "Error" ),
+						[ jqXHR, s, isSuccess ? success : error ] );
+			}
+
+			// Complete
+			completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] );
+
+			if ( fireGlobals ) {
+				globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] );
+				// Handle the global AJAX counter
+				if ( !( --jQuery.active ) ) {
+					jQuery.event.trigger( "ajaxStop" );
+				}
+			}
+		}
+
+		// Attach deferreds
+		deferred.promise( jqXHR );
+		jqXHR.success = jqXHR.done;
+		jqXHR.error = jqXHR.fail;
+		jqXHR.complete = completeDeferred.add;
+
+		// Status-dependent callbacks
+		jqXHR.statusCode = function( map ) {
+			if ( map ) {
+				var tmp;
+				if ( state < 2 ) {
+					for ( tmp in map ) {
+						statusCode[ tmp ] = [ statusCode[tmp], map[tmp] ];
+					}
+				} else {
+					tmp = map[ jqXHR.status ];
+					jqXHR.then( tmp, tmp );
+				}
+			}
+			return this;
+		};
+
+		// Remove hash character (#7531: and string promotion)
+		// Add protocol if not provided (#5866: IE7 issue with protocol-less urls)
+		// We also use the url parameter if available
+		s.url = ( ( url || s.url ) + "" ).replace( rhash, "" ).replace( rprotocol, ajaxLocParts[ 1 ] + "//" );
+
+		// Extract dataTypes list
+		s.dataTypes = jQuery.trim( s.dataType || "*" ).toLowerCase().split( rspacesAjax );
+
+		// Determine if a cross-domain request is in order
+		if ( s.crossDomain == null ) {
+			parts = rurl.exec( s.url.toLowerCase() );
+			s.crossDomain = !!( parts &&
+				( parts[ 1 ] != ajaxLocParts[ 1 ] || parts[ 2 ] != ajaxLocParts[ 2 ] ||
+					( parts[ 3 ] || ( parts[ 1 ] === "http:" ? 80 : 443 ) ) !=
+						( ajaxLocParts[ 3 ] || ( ajaxLocParts[ 1 ] === "http:" ? 80 : 443 ) ) )
+			);
+		}
+
+		// Convert data if not already a string
+		if ( s.data && s.processData && typeof s.data !== "string" ) {
+			s.data = jQuery.param( s.data, s.traditional );
+		}
+
+		// Apply prefilters
+		inspectPrefiltersOrTransports( prefilters, s, options, jqXHR );
+
+		// If request was aborted inside a prefiler, stop there
+		if ( state === 2 ) {
+			return false;
+		}
+
+		// We can fire global events as of now if asked to
+		fireGlobals = s.global;
+
+		// Uppercase the type
+		s.type = s.type.toUpperCase();
+
+		// Determine if request has content
+		s.hasContent = !rnoContent.test( s.type );
+
+		// Watch for a new set of requests
+		if ( fireGlobals && jQuery.active++ === 0 ) {
+			jQuery.event.trigger( "ajaxStart" );
+		}
+
+		// More options handling for requests with no content
+		if ( !s.hasContent ) {
+
+			// If data is available, append data to url
+			if ( s.data ) {
+				s.url += ( rquery.test( s.url ) ? "&" : "?" ) + s.data;
+				// #9682: remove data so that it's not used in an eventual retry
+				delete s.data;
+			}
+
+			// Get ifModifiedKey before adding the anti-cache parameter
+			ifModifiedKey = s.url;
+
+			// Add anti-cache in url if needed
+			if ( s.cache === false ) {
+
+				var ts = jQuery.now(),
+					// try replacing _= if it is there
+					ret = s.url.replace( rts, "$1_=" + ts );
+
+				// if nothing was replaced, add timestamp to the end
+				s.url = ret + ( ( ret === s.url ) ? ( rquery.test( s.url ) ? "&" : "?" ) + "_=" + ts : "" );
+			}
+		}
+
+		// Set the correct header, if data is being sent
+		if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {
+			jqXHR.setRequestHeader( "Content-Type", s.contentType );
+		}
+
+		// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
+		if ( s.ifModified ) {
+			ifModifiedKey = ifModifiedKey || s.url;
+			if ( jQuery.lastModified[ ifModifiedKey ] ) {
+				jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ ifModifiedKey ] );
+			}
+			if ( jQuery.etag[ ifModifiedKey ] ) {
+				jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ ifModifiedKey ] );
+			}
+		}
+
+		// Set the Accepts header for the server, depending on the dataType
+		jqXHR.setRequestHeader(
+			"Accept",
+			s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[0] ] ?
+				s.accepts[ s.dataTypes[0] ] + ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) :
+				s.accepts[ "*" ]
+		);
+
+		// Check for headers option
+		for ( i in s.headers ) {
+			jqXHR.setRequestHeader( i, s.headers[ i ] );
+		}
+
+		// Allow custom headers/mimetypes and early abort
+		if ( s.beforeSend && ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) {
+				// Abort if not done already
+				jqXHR.abort();
+				return false;
+
+		}
+
+		// Install callbacks on deferreds
+		for ( i in { success: 1, error: 1, complete: 1 } ) {
+			jqXHR[ i ]( s[ i ] );
+		}
+
+		// Get transport
+		transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );
+
+		// If no transport, we auto-abort
+		if ( !transport ) {
+			done( -1, "No Transport" );
+		} else {
+			jqXHR.readyState = 1;
+			// Send global event
+			if ( fireGlobals ) {
+				globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] );
+			}
+			// Timeout
+			if ( s.async && s.timeout > 0 ) {
+				timeoutTimer = setTimeout( function(){
+					jqXHR.abort( "timeout" );
+				}, s.timeout );
+			}
+
+			try {
+				state = 1;
+				transport.send( requestHeaders, done );
+			} catch (e) {
+				// Propagate exception as error if not done
+				if ( state < 2 ) {
+					done( -1, e );
+				// Simply rethrow otherwise
+				} else {
+					throw e;
+				}
+			}
+		}
+
+		return jqXHR;
+	},
+
+	// Serialize an array of form elements or a set of
+	// key/values into a query string
+	param: function( a, traditional ) {
+		var s = [],
+			add = function( key, value ) {
+				// If value is a function, invoke it and return its value
+				value = jQuery.isFunction( value ) ? value() : value;
+				s[ s.length ] = encodeURIComponent( key ) + "=" + encodeURIComponent( value );
+			};
+
+		// Set traditional to true for jQuery <= 1.3.2 behavior.
+		if ( traditional === undefined ) {
+			traditional = jQuery.ajaxSettings.traditional;
+		}
+
+		// If an array was passed in, assume that it is an array of form elements.
+		if ( jQuery.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {
+			// Serialize the form elements
+			jQuery.each( a, function() {
+				add( this.name, this.value );
+			});
+
+		} else {
+			// If traditional, encode the "old" way (the way 1.3.2 or older
+			// did it), otherwise encode params recursively.
+			for ( var prefix in a ) {
+				buildParams( prefix, a[ prefix ], traditional, add );
+			}
+		}
+
+		// Return the resulting serialization
+		return s.join( "&" ).replace( r20, "+" );
+	}
+});
+
+function buildParams( prefix, obj, traditional, add ) {
+	if ( jQuery.isArray( obj ) ) {
+		// Serialize array item.
+		jQuery.each( obj, function( i, v ) {
+			if ( traditional || rbracket.test( prefix ) ) {
+				// Treat each array item as a scalar.
+				add( prefix, v );
+
+			} else {
+				// If array item is non-scalar (array or object), encode its
+				// numeric index to resolve deserialization ambiguity issues.
+				// Note that rack (as of 1.0.0) can't currently deserialize
+				// nested arrays properly, and attempting to do so may cause
+				// a server error. Possible fixes are to modify rack's
+				// deserialization algorithm or to provide an option or flag
+				// to force array serialization to be shallow.
+				buildParams( prefix + "[" + ( typeof v === "object" || jQuery.isArray(v) ? i : "" ) + "]", v, traditional, add );
+			}
+		});
+
+	} else if ( !traditional && obj != null && typeof obj === "object" ) {
+		// Serialize object item.
+		for ( var name in obj ) {
+			buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add );
+		}
+
+	} else {
+		// Serialize scalar item.
+		add( prefix, obj );
+	}
+}
+
+// This is still on the jQuery object... for now
+// Want to move this to jQuery.ajax some day
+jQuery.extend({
+
+	// Counter for holding the number of active queries
+	active: 0,
+
+	// Last-Modified header cache for next request
+	lastModified: {},
+	etag: {}
+
+});
+
+/* Handles responses to an ajax request:
+ * - sets all responseXXX fields accordingly
+ * - finds the right dataType (mediates between content-type and expected dataType)
+ * - returns the corresponding response
+ */
+function ajaxHandleResponses( s, jqXHR, responses ) {
+
+	var contents = s.contents,
+		dataTypes = s.dataTypes,
+		responseFields = s.responseFields,
+		ct,
+		type,
+		finalDataType,
+		firstDataType;
+
+	// Fill responseXXX fields
+	for ( type in responseFields ) {
+		if ( type in responses ) {
+			jqXHR[ responseFields[type] ] = responses[ type ];
+		}
+	}
+
+	// Remove auto dataType and get content-type in the process
+	while( dataTypes[ 0 ] === "*" ) {
+		dataTypes.shift();
+		if ( ct === undefined ) {
+			ct = s.mimeType || jqXHR.getResponseHeader( "content-type" );
+		}
+	}
+
+	// Check if we're dealing with a known content-type
+	if ( ct ) {
+		for ( type in contents ) {
+			if ( contents[ type ] && contents[ type ].test( ct ) ) {
+				dataTypes.unshift( type );
+				break;
+			}
+		}
+	}
+
+	// Check to see if we have a response for the expected dataType
+	if ( dataTypes[ 0 ] in responses ) {
+		finalDataType = dataTypes[ 0 ];
+	} else {
+		// Try convertible dataTypes
+		for ( type in responses ) {
+			if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[0] ] ) {
+				finalDataType = type;
+				break;
+			}
+			if ( !firstDataType ) {
+				firstDataType = type;
+			}
+		}
+		// Or just use first one
+		finalDataType = finalDataType || firstDataType;
+	}
+
+	// If we found a dataType
+	// We add the dataType to the list if needed
+	// and return the corresponding response
+	if ( finalDataType ) {
+		if ( finalDataType !== dataTypes[ 0 ] ) {
+			dataTypes.unshift( finalDataType );
+		}
+		return responses[ finalDataType ];
+	}
+}
+
+// Chain conversions given the request and the original response
+function ajaxConvert( s, response ) {
+
+	// Apply the dataFilter if provided
+	if ( s.dataFilter ) {
+		response = s.dataFilter( response, s.dataType );
+	}
+
+	var dataTypes = s.dataTypes,
+		converters = {},
+		i,
+		key,
+		length = dataTypes.length,
+		tmp,
+		// Current and previous dataTypes
+		current = dataTypes[ 0 ],
+		prev,
+		// Conversion expression
+		conversion,
+		// Conversion function
+		conv,
+		// Conversion functions (transitive conversion)
+		conv1,
+		conv2;
+
+	// For each dataType in the chain
+	for ( i = 1; i < length; i++ ) {
+
+		// Create converters map
+		// with lowercased keys
+		if ( i === 1 ) {
+			for ( key in s.converters ) {
+				if ( typeof key === "string" ) {
+					converters[ key.toLowerCase() ] = s.converters[ key ];
+				}
+			}
+		}
+
+		// Get the dataTypes
+		prev = current;
+		current = dataTypes[ i ];
+
+		// If current is auto dataType, update it to prev
+		if ( current === "*" ) {
+			current = prev;
+		// If no auto and dataTypes are actually different
+		} else if ( prev !== "*" && prev !== current ) {
+
+			// Get the converter
+			conversion = prev + " " + current;
+			conv = converters[ conversion ] || converters[ "* " + current ];
+
+			// If there is no direct converter, search transitively
+			if ( !conv ) {
+				conv2 = undefined;
+				for ( conv1 in converters ) {
+					tmp = conv1.split( " " );
+					if ( tmp[ 0 ] === prev || tmp[ 0 ] === "*" ) {
+						conv2 = converters[ tmp[1] + " " + current ];
+						if ( conv2 ) {
+							conv1 = converters[ conv1 ];
+							if ( conv1 === true ) {
+								conv = conv2;
+							} else if ( conv2 === true ) {
+								conv = conv1;
+							}
+							break;
+						}
+					}
+				}
+			}
+			// If we found no converter, dispatch an error
+			if ( !( conv || conv2 ) ) {
+				jQuery.error( "No conversion from " + conversion.replace(" "," to ") );
+			}
+			// If found converter is not an equivalence
+			if ( conv !== true ) {
+				// Convert with 1 or 2 converters accordingly
+				response = conv ? conv( response ) : conv2( conv1(response) );
+			}
+		}
+	}
+	return response;
+}
+
+
+
+
+var jsc = jQuery.now(),
+	jsre = /(\=)\?(&|$)|\?\?/i;
+
+// Default jsonp settings
+jQuery.ajaxSetup({
+	jsonp: "callback",
+	jsonpCallback: function() {
+		return jQuery.expando + "_" + ( jsc++ );
+	}
+});
+
+// Detect, normalize options and install callbacks for jsonp requests
+jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) {
+
+	var inspectData = s.contentType === "application/x-www-form-urlencoded" &&
+		( typeof s.data === "string" );
+
+	if ( s.dataTypes[ 0 ] === "jsonp" ||
+		s.jsonp !== false && ( jsre.test( s.url ) ||
+				inspectData && jsre.test( s.data ) ) ) {
+
+		var responseContainer,
+			jsonpCallback = s.jsonpCallback =
+				jQuery.isFunction( s.jsonpCallback ) ? s.jsonpCallback() : s.jsonpCallback,
+			previous = window[ jsonpCallback ],
+			url = s.url,
+			data = s.data,
+			replace = "$1" + jsonpCallback + "$2";
+
+		if ( s.jsonp !== false ) {
+			url = url.replace( jsre, replace );
+			if ( s.url === url ) {
+				if ( inspectData ) {
+					data = data.replace( jsre, replace );
+				}
+				if ( s.data === data ) {
+					// Add callback manually
+					url += (/\?/.test( url ) ? "&" : "?") + s.jsonp + "=" + jsonpCallback;
+				}
+			}
+		}
+
+		s.url = url;
+		s.data = data;
+
+		// Install callback
+		window[ jsonpCallback ] = function( response ) {
+			responseContainer = [ response ];
+		};
+
+		// Clean-up function
+		jqXHR.always(function() {
+			// Set callback back to previous value
+			window[ jsonpCallback ] = previous;
+			// Call if it was a function and we have a response
+			if ( responseContainer && jQuery.isFunction( previous ) ) {
+				window[ jsonpCallback ]( responseContainer[ 0 ] );
+			}
+		});
+
+		// Use data converter to retrieve json after script execution
+		s.converters["script json"] = function() {
+			if ( !responseContainer ) {
+				jQuery.error( jsonpCallback + " was not called" );
+			}
+			return responseContainer[ 0 ];
+		};
+
+		// force json dataType
+		s.dataTypes[ 0 ] = "json";
+
+		// Delegate to script
+		return "script";
+	}
+});
+
+
+
+
+// Install script dataType
+jQuery.ajaxSetup({
+	accepts: {
+		script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"
+	},
+	contents: {
+		script: /javascript|ecmascript/
+	},
+	converters: {
+		"text script": function( text ) {
+			jQuery.globalEval( text );
+			return text;
+		}
+	}
+});
+
+// Handle cache's special case and global
+jQuery.ajaxPrefilter( "script", function( s ) {
+	if ( s.cache === undefined ) {
+		s.cache = false;
+	}
+	if ( s.crossDomain ) {
+		s.type = "GET";
+		s.global = false;
+	}
+});
+
+// Bind script tag hack transport
+jQuery.ajaxTransport( "script", function(s) {
+
+	// This transport only deals with cross domain requests
+	if ( s.crossDomain ) {
+
+		var script,
+			head = document.head || document.getElementsByTagName( "head" )[0] || document.documentElement;
+
+		return {
+
+			send: function( _, callback ) {
+
+				script = document.createElement( "script" );
+
+				script.async = "async";
+
+				if ( s.scriptCharset ) {
+					script.charset = s.scriptCharset;
+				}
+
+				script.src = s.url;
+
+				// Attach handlers for all browsers
+				script.onload = script.onreadystatechange = function( _, isAbort ) {
+
+					if ( isAbort || !script.readyState || /loaded|complete/.test( script.readyState ) ) {
+
+						// Handle memory leak in IE
+						script.onload = script.onreadystatechange = null;
+
+						// Remove the script
+						if ( head && script.parentNode ) {
+							head.removeChild( script );
+						}
+
+						// Dereference the script
+						script = undefined;
+
+						// Callback if not abort
+						if ( !isAbort ) {
+							callback( 200, "success" );
+						}
+					}
+				};
+				// Use insertBefore instead of appendChild  to circumvent an IE6 bug.
+				// This arises when a base node is used (#2709 and #4378).
+				head.insertBefore( script, head.firstChild );
+			},
+
+			abort: function() {
+				if ( script ) {
+					script.onload( 0, 1 );
+				}
+			}
+		};
+	}
+});
+
+
+
+
+var // #5280: Internet Explorer will keep connections alive if we don't abort on unload
+	xhrOnUnloadAbort = window.ActiveXObject ? function() {
+		// Abort all pending requests
+		for ( var key in xhrCallbacks ) {
+			xhrCallbacks[ key ]( 0, 1 );
+		}
+	} : false,
+	xhrId = 0,
+	xhrCallbacks;
+
+// Functions to create xhrs
+function createStandardXHR() {
+	try {
+		return new window.XMLHttpRequest();
+	} catch( e ) {}
+}
+
+function createActiveXHR() {
+	try {
+		return new window.ActiveXObject( "Microsoft.XMLHTTP" );
+	} catch( e ) {}
+}
+
+// Create the request object
+// (This is still attached to ajaxSettings for backward compatibility)
+jQuery.ajaxSettings.xhr = window.ActiveXObject ?
+	/* Microsoft failed to properly
+	 * implement the XMLHttpRequest in IE7 (can't request local files),
+	 * so we use the ActiveXObject when it is available
+	 * Additionally XMLHttpRequest can be disabled in IE7/IE8 so
+	 * we need a fallback.
+	 */
+	function() {
+		return !this.isLocal && createStandardXHR() || createActiveXHR();
+	} :
+	// For all other browsers, use the standard XMLHttpRequest object
+	createStandardXHR;
+
+// Determine support properties
+(function( xhr ) {
+	jQuery.extend( jQuery.support, {
+		ajax: !!xhr,
+		cors: !!xhr && ( "withCredentials" in xhr )
+	});
+})( jQuery.ajaxSettings.xhr() );
+
+// Create transport if the browser can provide an xhr
+if ( jQuery.support.ajax ) {
+
+	jQuery.ajaxTransport(function( s ) {
+		// Cross domain only allowed if supported through XMLHttpRequest
+		if ( !s.crossDomain || jQuery.support.cors ) {
+
+			var callback;
+
+			return {
+				send: function( headers, complete ) {
+
+					// Get a new xhr
+					var xhr = s.xhr(),
+						handle,
+						i;
+
+					// Open the socket
+					// Passing null username, generates a login popup on Opera (#2865)
+					if ( s.username ) {
+						xhr.open( s.type, s.url, s.async, s.username, s.password );
+					} else {
+						xhr.open( s.type, s.url, s.async );
+					}
+
+					// Apply custom fields if provided
+					if ( s.xhrFields ) {
+						for ( i in s.xhrFields ) {
+							xhr[ i ] = s.xhrFields[ i ];
+						}
+					}
+
+					// Override mime type if needed
+					if ( s.mimeType && xhr.overrideMimeType ) {
+						xhr.overrideMimeType( s.mimeType );
+					}
+
+					// X-Requested-With header
+					// For cross-domain requests, seeing as conditions for a preflight are
+					// akin to a jigsaw puzzle, we simply never set it to be sure.
+					// (it can always be set on a per-request basis or even using ajaxSetup)
+					// For same-domain requests, won't change header if already provided.
+					if ( !s.crossDomain && !headers["X-Requested-With"] ) {
+						headers[ "X-Requested-With" ] = "XMLHttpRequest";
+					}
+
+					// Need an extra try/catch for cross domain requests in Firefox 3
+					try {
+						for ( i in headers ) {
+							xhr.setRequestHeader( i, headers[ i ] );
+						}
+					} catch( _ ) {}
+
+					// Do send the request
+					// This may raise an exception which is actually
+					// handled in jQuery.ajax (so no try/catch here)
+					xhr.send( ( s.hasContent && s.data ) || null );
+
+					// Listener
+					callback = function( _, isAbort ) {
+
+						var status,
+							statusText,
+							responseHeaders,
+							responses,
+							xml;
+
+						// Firefox throws exceptions when accessing properties
+						// of an xhr when a network error occured
+						// http://helpful.knobs-dials.com/index.php/Component_returned_failure_code:_0x80040111_(NS_ERROR_NOT_AVAILABLE)
+						try {
+
+							// Was never called and is aborted or complete
+							if ( callback && ( isAbort || xhr.readyState === 4 ) ) {
+
+								// Only called once
+								callback = undefined;
+
+								// Do not keep as active anymore
+								if ( handle ) {
+									xhr.onreadystatechange = jQuery.noop;
+									if ( xhrOnUnloadAbort ) {
+										delete xhrCallbacks[ handle ];
+									}
+								}
+
+								// If it's an abort
+								if ( isAbort ) {
+									// Abort it manually if needed
+									if ( xhr.readyState !== 4 ) {
+										xhr.abort();
+									}
+								} else {
+									status = xhr.status;
+									responseHeaders = xhr.getAllResponseHeaders();
+									responses = {};
+									xml = xhr.responseXML;
+
+									// Construct response list
+									if ( xml && xml.documentElement /* #4958 */ ) {
+										responses.xml = xml;
+									}
+									responses.text = xhr.responseText;
+
+									// Firefox throws an exception when accessing
+									// statusText for faulty cross-domain requests
+									try {
+										statusText = xhr.statusText;
+									} catch( e ) {
+										// We normalize with Webkit giving an empty statusText
+										statusText = "";
+									}
+
+									// Filter status for non standard behaviors
+
+									// If the request is local and we have data: assume a success
+									// (success with no data won't get notified, that's the best we
+									// can do given current implementations)
+									if ( !status && s.isLocal && !s.crossDomain ) {
+										status = responses.text ? 200 : 404;
+									// IE - #1450: sometimes returns 1223 when it should be 204
+									} else if ( status === 1223 ) {
+										status = 204;
+									}
+								}
+							}
+						} catch( firefoxAccessException ) {
+							if ( !isAbort ) {
+								complete( -1, firefoxAccessException );
+							}
+						}
+
+						// Call complete if needed
+						if ( responses ) {
+							complete( status, statusText, responses, responseHeaders );
+						}
+					};
+
+					// if we're in sync mode or it's in cache
+					// and has been retrieved directly (IE6 & IE7)
+					// we need to manually fire the callback
+					if ( !s.async || xhr.readyState === 4 ) {
+						callback();
+					} else {
+						handle = ++xhrId;
+						if ( xhrOnUnloadAbort ) {
+							// Create the active xhrs callbacks list if needed
+							// and attach the unload handler
+							if ( !xhrCallbacks ) {
+								xhrCallbacks = {};
+								jQuery( window ).unload( xhrOnUnloadAbort );
+							}
+							// Add to list of active xhrs callbacks
+							xhrCallbacks[ handle ] = callback;
+						}
+						xhr.onreadystatechange = callback;
+					}
+				},
+
+				abort: function() {
+					if ( callback ) {
+						callback(0,1);
+					}
+				}
+			};
+		}
+	});
+}
+
+
+
+
+var elemdisplay = {},
+	iframe, iframeDoc,
+	rfxtypes = /^(?:toggle|show|hide)$/,
+	rfxnum = /^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,
+	timerId,
+	fxAttrs = [
+		// height animations
+		[ "height", "marginTop", "marginBottom", "paddingTop", "paddingBottom" ],
+		// width animations
+		[ "width", "marginLeft", "marginRight", "paddingLeft", "paddingRight" ],
+		// opacity animations
+		[ "opacity" ]
+	],
+	fxNow;
+
+jQuery.fn.extend({
+	show: function( speed, easing, callback ) {
+		var elem, display;
+
+		if ( speed || speed === 0 ) {
+			return this.animate( genFx("show", 3), speed, easing, callback );
+
+		} else {
+			for ( var i = 0, j = this.length; i < j; i++ ) {
+				elem = this[ i ];
+
+				if ( elem.style ) {
+					display = elem.style.display;
+
+					// Reset the inline display of this element to learn if it is
+					// being hidden by cascaded rules or not
+					if ( !jQuery._data(elem, "olddisplay") && display === "none" ) {
+						display = elem.style.display = "";
+					}
+
+					// Set elements which have been overridden with display: none
+					// in a stylesheet to whatever the default browser style is
+					// for such an element
+					if ( display === "" && jQuery.css(elem, "display") === "none" ) {
+						jQuery._data( elem, "olddisplay", defaultDisplay(elem.nodeName) );
+					}
+				}
+			}
+
+			// Set the display of most of the elements in a second loop
+			// to avoid the constant reflow
+			for ( i = 0; i < j; i++ ) {
+				elem = this[ i ];
+
+				if ( elem.style ) {
+					display = elem.style.display;
+
+					if ( display === "" || display === "none" ) {
+						elem.style.display = jQuery._data( elem, "olddisplay" ) || "";
+					}
+				}
+			}
+
+			return this;
+		}
+	},
+
+	hide: function( speed, easing, callback ) {
+		if ( speed || speed === 0 ) {
+			return this.animate( genFx("hide", 3), speed, easing, callback);
+
+		} else {
+			var elem, display,
+				i = 0,
+				j = this.length;
+
+			for ( ; i < j; i++ ) {
+				elem = this[i];
+				if ( elem.style ) {
+					display = jQuery.css( elem, "display" );
+
+					if ( display !== "none" && !jQuery._data( elem, "olddisplay" ) ) {
+						jQuery._data( elem, "olddisplay", display );
+					}
+				}
+			}
+
+			// Set the display of the elements in a second loop
+			// to avoid the constant reflow
+			for ( i = 0; i < j; i++ ) {
+				if ( this[i].style ) {
+					this[i].style.display = "none";
+				}
+			}
+
+			return this;
+		}
+	},
+
+	// Save the old toggle function
+	_toggle: jQuery.fn.toggle,
+
+	toggle: function( fn, fn2, callback ) {
+		var bool = typeof fn === "boolean";
+
+		if ( jQuery.isFunction(fn) && jQuery.isFunction(fn2) ) {
+			this._toggle.apply( this, arguments );
+
+		} else if ( fn == null || bool ) {
+			this.each(function() {
+				var state = bool ? fn : jQuery(this).is(":hidden");
+				jQuery(this)[ state ? "show" : "hide" ]();
+			});
+
+		} else {
+			this.animate(genFx("toggle", 3), fn, fn2, callback);
+		}
+
+		return this;
+	},
+
+	fadeTo: function( speed, to, easing, callback ) {
+		return this.filter(":hidden").css("opacity", 0).show().end()
+					.animate({opacity: to}, speed, easing, callback);
+	},
+
+	animate: function( prop, speed, easing, callback ) {
+		var optall = jQuery.speed( speed, easing, callback );
+
+		if ( jQuery.isEmptyObject( prop ) ) {
+			return this.each( optall.complete, [ false ] );
+		}
+
+		// Do not change referenced properties as per-property easing will be lost
+		prop = jQuery.extend( {}, prop );
+
+		function doAnimation() {
+			// XXX 'this' does not always have a nodeName when running the
+			// test suite
+
+			if ( optall.queue === false ) {
+				jQuery._mark( this );
+			}
+
+			var opt = jQuery.extend( {}, optall ),
+				isElement = this.nodeType === 1,
+				hidden = isElement && jQuery(this).is(":hidden"),
+				name, val, p, e,
+				parts, start, end, unit,
+				method;
+
+			// will store per property easing and be used to determine when an animation is complete
+			opt.animatedProperties = {};
+
+			for ( p in prop ) {
+
+				// property name normalization
+				name = jQuery.camelCase( p );
+				if ( p !== name ) {
+					prop[ name ] = prop[ p ];
+					delete prop[ p ];
+				}
+
+				val = prop[ name ];
+
+				// easing resolution: per property > opt.specialEasing > opt.easing > 'swing' (default)
+				if ( jQuery.isArray( val ) ) {
+					opt.animatedProperties[ name ] = val[ 1 ];
+					val = prop[ name ] = val[ 0 ];
+				} else {
+					opt.animatedProperties[ name ] = opt.specialEasing && opt.specialEasing[ name ] || opt.easing || 'swing';
+				}
+
+				if ( val === "hide" && hidden || val === "show" && !hidden ) {
+					return opt.complete.call( this );
+				}
+
+				if ( isElement && ( name === "height" || name === "width" ) ) {
+					// Make sure that nothing sneaks out
+					// Record all 3 overflow attributes because IE does not
+					// change the overflow attribute when overflowX and
+					// overflowY are set to the same value
+					opt.overflow = [ this.style.overflow, this.style.overflowX, this.style.overflowY ];
+
+					// Set display property to inline-block for height/width
+					// animations on inline elements that are having width/height animated
+					if ( jQuery.css( this, "display" ) === "inline" &&
+							jQuery.css( this, "float" ) === "none" ) {
+
+						// inline-level elements accept inline-block;
+						// block-level elements need to be inline with layout
+						if ( !jQuery.support.inlineBlockNeedsLayout || defaultDisplay( this.nodeName ) === "inline" ) {
+							this.style.display = "inline-block";
+
+						} else {
+							this.style.zoom = 1;
+						}
+					}
+				}
+			}
+
+			if ( opt.overflow != null ) {
+				this.style.overflow = "hidden";
+			}
+
+			for ( p in prop ) {
+				e = new jQuery.fx( this, opt, p );
+				val = prop[ p ];
+
+				if ( rfxtypes.test( val ) ) {
+
+					// Tracks whether to show or hide based on private
+					// data attached to the element
+					method = jQuery._data( this, "toggle" + p ) || ( val === "toggle" ? hidden ? "show" : "hide" : 0 );
+					if ( method ) {
+						jQuery._data( this, "toggle" + p, method === "show" ? "hide" : "show" );
+						e[ method ]();
+					} else {
+						e[ val ]();
+					}
+
+				} else {
+					parts = rfxnum.exec( val );
+					start = e.cur();
+
+					if ( parts ) {
+						end = parseFloat( parts[2] );
+						unit = parts[3] || ( jQuery.cssNumber[ p ] ? "" : "px" );
+
+						// We need to compute starting value
+						if ( unit !== "px" ) {
+							jQuery.style( this, p, (end || 1) + unit);
+							start = ( (end || 1) / e.cur() ) * start;
+							jQuery.style( this, p, start + unit);
+						}
+
+						// If a +=/-= token was provided, we're doing a relative animation
+						if ( parts[1] ) {
+							end = ( (parts[ 1 ] === "-=" ? -1 : 1) * end ) + start;
+						}
+
+						e.custom( start, end, unit );
+
+					} else {
+						e.custom( start, val, "" );
+					}
+				}
+			}
+
+			// For JS strict compliance
+			return true;
+		}
+
+		return optall.queue === false ?
+			this.each( doAnimation ) :
+			this.queue( optall.queue, doAnimation );
+	},
+
+	stop: function( type, clearQueue, gotoEnd ) {
+		if ( typeof type !== "string" ) {
+			gotoEnd = clearQueue;
+			clearQueue = type;
+			type = undefined;
+		}
+		if ( clearQueue && type !== false ) {
+			this.queue( type || "fx", [] );
+		}
+
+		return this.each(function() {
+			var index,
+				hadTimers = false,
+				timers = jQuery.timers,
+				data = jQuery._data( this );
+
+			// clear marker counters if we know they won't be
+			if ( !gotoEnd ) {
+				jQuery._unmark( true, this );
+			}
+
+			function stopQueue( elem, data, index ) {
+				var hooks = data[ index ];
+				jQuery.removeData( elem, index, true );
+				hooks.stop( gotoEnd );
+			}
+
+			if ( type == null ) {
+				for ( index in data ) {
+					if ( data[ index ] && data[ index ].stop && index.indexOf(".run") === index.length - 4 ) {
+						stopQueue( this, data, index );
+					}
+				}
+			} else if ( data[ index = type + ".run" ] && data[ index ].stop ){
+				stopQueue( this, data, index );
+			}
+
+			for ( index = timers.length; index--; ) {
+				if ( timers[ index ].elem === this && (type == null || timers[ index ].queue === type) ) {
+					if ( gotoEnd ) {
+
+						// force the next step to be the last
+						timers[ index ]( true );
+					} else {
+						timers[ index ].saveState();
+					}
+					hadTimers = true;
+					timers.splice( index, 1 );
+				}
+			}
+
+			// start the next in the queue if the last step wasn't forced
+			// timers currently will call their complete callbacks, which will dequeue
+			// but only if they were gotoEnd
+			if ( !( gotoEnd && hadTimers ) ) {
+				jQuery.dequeue( this, type );
+			}
+		});
+	}
+
+});
+
+// Animations created synchronously will run synchronously
+function createFxNow() {
+	setTimeout( clearFxNow, 0 );
+	return ( fxNow = jQuery.now() );
+}
+
+function clearFxNow() {
+	fxNow = undefined;
+}
+
+// Generate parameters to create a standard animation
+function genFx( type, num ) {
+	var obj = {};
+
+	jQuery.each( fxAttrs.concat.apply([], fxAttrs.slice( 0, num )), function() {
+		obj[ this ] = type;
+	});
+
+	return obj;
+}
+
+// Generate shortcuts for custom animations
+jQuery.each({
+	slideDown: genFx( "show", 1 ),
+	slideUp: genFx( "hide", 1 ),
+	slideToggle: genFx( "toggle", 1 ),
+	fadeIn: { opacity: "show" },
+	fadeOut: { opacity: "hide" },
+	fadeToggle: { opacity: "toggle" }
+}, function( name, props ) {
+	jQuery.fn[ name ] = function( speed, easing, callback ) {
+		return this.animate( props, speed, easing, callback );
+	};
+});
+
+jQuery.extend({
+	speed: function( speed, easing, fn ) {
+		var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : {
+			complete: fn || !fn && easing ||
+				jQuery.isFunction( speed ) && speed,
+			duration: speed,
+			easing: fn && easing || easing && !jQuery.isFunction( easing ) && easing
+		};
+
+		opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration :
+			opt.duration in jQuery.fx.speeds ? jQuery.fx.speeds[ opt.duration ] : jQuery.fx.speeds._default;
+
+		// normalize opt.queue - true/undefined/null -> "fx"
+		if ( opt.queue == null || opt.queue === true ) {
+			opt.queue = "fx";
+		}
+
+		// Queueing
+		opt.old = opt.complete;
+
+		opt.complete = function( noUnmark ) {
+			if ( jQuery.isFunction( opt.old ) ) {
+				opt.old.call( this );
+			}
+
+			if ( opt.queue ) {
+				jQuery.dequeue( this, opt.queue );
+			} else if ( noUnmark !== false ) {
+				jQuery._unmark( 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;
+
+		options.orig = options.orig || {};
+	}
+
+});
+
+jQuery.fx.prototype = {
+	// Simple function for setting a style value
+	update: function() {
+		if ( this.options.step ) {
+			this.options.step.call( this.elem, this.now, this );
+		}
+
+		( jQuery.fx.step[ this.prop ] || jQuery.fx.step._default )( this );
+	},
+
+	// Get the current size
+	cur: function() {
+		if ( this.elem[ this.prop ] != null && (!this.elem.style || this.elem.style[ this.prop ] == null) ) {
+			return this.elem[ this.prop ];
+		}
+
+		var parsed,
+			r = jQuery.css( this.elem, this.prop );
+		// Empty strings, null, undefined and "auto" are converted to 0,
+		// complex values such as "rotate(1rad)" are returned as is,
+		// simple values such as "10px" are parsed to Float.
+		return isNaN( parsed = parseFloat( r ) ) ? !r || r === "auto" ? 0 : r : parsed;
+	},
+
+	// Start an animation from one number to another
+	custom: function( from, to, unit ) {
+		var self = this,
+			fx = jQuery.fx;
+
+		this.startTime = fxNow || createFxNow();
+		this.end = to;
+		this.now = this.start = from;
+		this.pos = this.state = 0;
+		this.unit = unit || this.unit || ( jQuery.cssNumber[ this.prop ] ? "" : "px" );
+
+		function t( gotoEnd ) {
+			return self.step( gotoEnd );
+		}
+
+		t.queue = this.options.queue;
+		t.elem = this.elem;
+		t.saveState = function() {
+			if ( self.options.hide && jQuery._data( self.elem, "fxshow" + self.prop ) === undefined ) {
+				jQuery._data( self.elem, "fxshow" + self.prop, self.start );
+			}
+		};
+
+		if ( t() && jQuery.timers.push(t) && !timerId ) {
+			timerId = setInterval( fx.tick, fx.interval );
+		}
+	},
+
+	// Simple 'show' function
+	show: function() {
+		var dataShow = jQuery._data( this.elem, "fxshow" + this.prop );
+
+		// Remember where we started, so that we can go back to it later
+		this.options.orig[ this.prop ] = dataShow || jQuery.style( this.elem, this.prop );
+		this.options.show = true;
+
+		// Begin the animation
+		// Make sure that we start at a small width/height to avoid any flash of content
+		if ( dataShow !== undefined ) {
+			// This show is picking up where a previous hide or show left off
+			this.custom( this.cur(), dataShow );
+		} else {
+			this.custom( this.prop === "width" || this.prop === "height" ? 1 : 0, this.cur() );
+		}
+
+		// Start by showing the element
+		jQuery( this.elem ).show();
+	},
+
+	// Simple 'hide' function
+	hide: function() {
+		// Remember where we started, so that we can go back to it later
+		this.options.orig[ this.prop ] = jQuery._data( this.elem, "fxshow" + this.prop ) || jQuery.style( this.elem, this.prop );
+		this.options.hide = true;
+
+		// Begin the animation
+		this.custom( this.cur(), 0 );
+	},
+
+	// Each step of an animation
+	step: function( gotoEnd ) {
+		var p, n, complete,
+			t = fxNow || createFxNow(),
+			done = true,
+			elem = this.elem,
+			options = this.options;
+
+		if ( gotoEnd || t >= options.duration + this.startTime ) {
+			this.now = this.end;
+			this.pos = this.state = 1;
+			this.update();
+
+			options.animatedProperties[ this.prop ] = true;
+
+			for ( p in options.animatedProperties ) {
+				if ( options.animatedProperties[ p ] !== true ) {
+					done = false;
+				}
+			}
+
+			if ( done ) {
+				// Reset the overflow
+				if ( options.overflow != null && !jQuery.support.shrinkWrapBlocks ) {
+
+					jQuery.each( [ "", "X", "Y" ], function( index, value ) {
+						elem.style[ "overflow" + value ] = options.overflow[ index ];
+					});
+				}
+
+				// Hide the element if the "hide" operation was done
+				if ( options.hide ) {
+					jQuery( elem ).hide();
+				}
+
+				// Reset the properties, if the item has been hidden or shown
+				if ( options.hide || options.show ) {
+					for ( p in options.animatedProperties ) {
+						jQuery.style( elem, p, options.orig[ p ] );
+						jQuery.removeData( elem, "fxshow" + p, true );
+						// Toggle data is no longer needed
+						jQuery.removeData( elem, "toggle" + p, true );
+					}
+				}
+
+				// Execute the complete function
+				// in the event that the complete function throws an exception
+				// we must ensure it won't be called twice. #5684
+
+				complete = options.complete;
+				if ( complete ) {
+
+					options.complete = false;
+					complete.call( elem );
+				}
+			}
+
+			return false;
+
+		} else {
+			// classical easing cannot be used with an Infinity duration
+			if ( options.duration == Infinity ) {
+				this.now = t;
+			} else {
+				n = t - this.startTime;
+				this.state = n / options.duration;
+
+				// Perform the easing function, defaults to swing
+				this.pos = jQuery.easing[ options.animatedProperties[this.prop] ]( this.state, n, 0, 1, options.duration );
+				this.now = this.start + ( (this.end - this.start) * this.pos );
+			}
+			// Perform the next step of the animation
+			this.update();
+		}
+
+		return true;
+	}
+};
+
+jQuery.extend( jQuery.fx, {
+	tick: function() {
+		var timer,
+			timers = jQuery.timers,
+			i = 0;
+
+		for ( ; i < timers.length; i++ ) {
+			timer = timers[ i ];
+			// Checks the timer has not already been removed
+			if ( !timer() && timers[ i ] === timer ) {
+				timers.splice( i--, 1 );
+			}
+		}
+
+		if ( !timers.length ) {
+			jQuery.fx.stop();
+		}
+	},
+
+	interval: 13,
+
+	stop: function() {
+		clearInterval( timerId );
+		timerId = null;
+	},
+
+	speeds: {
+		slow: 600,
+		fast: 200,
+		// Default speed
+		_default: 400
+	},
+
+	step: {
+		opacity: function( fx ) {
+			jQuery.style( fx.elem, "opacity", fx.now );
+		},
+
+		_default: function( fx ) {
+			if ( fx.elem.style && fx.elem.style[ fx.prop ] != null ) {
+				fx.elem.style[ fx.prop ] = fx.now + fx.unit;
+			} else {
+				fx.elem[ fx.prop ] = fx.now;
+			}
+		}
+	}
+});
+
+// Adds width/height step functions
+// Do not set anything below 0
+jQuery.each([ "width", "height" ], function( i, prop ) {
+	jQuery.fx.step[ prop ] = function( fx ) {
+		jQuery.style( fx.elem, prop, Math.max(0, fx.now) + fx.unit );
+	};
+});
+
+if ( jQuery.expr && jQuery.expr.filters ) {
+	jQuery.expr.filters.animated = function( elem ) {
+		return jQuery.grep(jQuery.timers, function( fn ) {
+			return elem === fn.elem;
+		}).length;
+	};
+}
+
+// Try to restore the default display value of an element
+function defaultDisplay( nodeName ) {
+
+	if ( !elemdisplay[ nodeName ] ) {
+
+		var body = document.body,
+			elem = jQuery( "<" + nodeName + ">" ).appendTo( body ),
+			display = elem.css( "display" );
+		elem.remove();
+
+		// If the simple way fails,
+		// get element's real default display by attaching it to a temp iframe
+		if ( display === "none" || display === "" ) {
+			// No iframe to use yet, so create it
+			if ( !iframe ) {
+				iframe = document.createElement( "iframe" );
+				iframe.frameBorder = iframe.width = iframe.height = 0;
+			}
+
+			body.appendChild( iframe );
+
+			// Create a cacheable copy of the iframe document on first call.
+			// IE and Opera will allow us to reuse the iframeDoc without re-writing the fake HTML
+			// document to it; WebKit & Firefox won't allow reusing the iframe document.
+			if ( !iframeDoc || !iframe.createElement ) {
+				iframeDoc = ( iframe.contentWindow || iframe.contentDocument ).document;
+				iframeDoc.write( ( document.compatMode === "CSS1Compat" ? "<!doctype html>" : "" ) + "<html><body>" );
+				iframeDoc.close();
+			}
+
+			elem = iframeDoc.createElement( nodeName );
+
+			iframeDoc.body.appendChild( elem );
+
+			display = jQuery.css( elem, "display" );
+			body.removeChild( iframe );
+		}
+
+		// Store the correct default display
+		elemdisplay[ nodeName ] = display;
+	}
+
+	return elemdisplay[ nodeName ];
+}
+
+
+
+
+var rtable = /^t(?:able|d|h)$/i,
+	rroot = /^(?:body|html)$/i;
+
+if ( "getBoundingClientRect" in document.documentElement ) {
+	jQuery.fn.offset = function( options ) {
+		var elem = this[0], box;
+
+		if ( options ) {
+			return this.each(function( i ) {
+				jQuery.offset.setOffset( this, options, i );
+			});
+		}
+
+		if ( !elem || !elem.ownerDocument ) {
+			return null;
+		}
+
+		if ( elem === elem.ownerDocument.body ) {
+			return jQuery.offset.bodyOffset( elem );
+		}
+
+		try {
+			box = elem.getBoundingClientRect();
+		} catch(e) {}
+
+		var doc = elem.ownerDocument,
+			docElem = doc.documentElement;
+
+		// Make sure we're not dealing with a disconnected DOM node
+		if ( !box || !jQuery.contains( docElem, elem ) ) {
+			return box ? { top: box.top, left: box.left } : { top: 0, left: 0 };
+		}
+
+		var body = doc.body,
+			win = getWindow(doc),
+			clientTop  = docElem.clientTop  || body.clientTop  || 0,
+			clientLeft = docElem.clientLeft || body.clientLeft || 0,
+			scrollTop  = win.pageYOffset || jQuery.support.boxModel && docElem.scrollTop  || body.scrollTop,
+			scrollLeft = win.pageXOffset || jQuery.support.boxModel && docElem.scrollLeft || body.scrollLeft,
+			top  = box.top  + scrollTop  - clientTop,
+			left = box.left + scrollLeft - clientLeft;
+
+		return { top: top, left: left };
+	};
+
+} else {
+	jQuery.fn.offset = function( options ) {
+		var elem = this[0];
+
+		if ( options ) {
+			return this.each(function( i ) {
+				jQuery.offset.setOffset( this, options, i );
+			});
+		}
+
+		if ( !elem || !elem.ownerDocument ) {
+			return null;
+		}
+
+		if ( elem === elem.ownerDocument.body ) {
+			return jQuery.offset.bodyOffset( elem );
+		}
+
+		var computedStyle,
+			offsetParent = elem.offsetParent,
+			prevOffsetParent = elem,
+			doc = elem.ownerDocument,
+			docElem = doc.documentElement,
+			body = doc.body,
+			defaultView = doc.defaultView,
+			prevComputedStyle = defaultView ? defaultView.getComputedStyle( elem, null ) : elem.currentStyle,
+			top = elem.offsetTop,
+			left = elem.offsetLeft;
+
+		while ( (elem = elem.parentNode) && elem !== body && elem !== docElem ) {
+			if ( jQuery.support.fixedPosition && prevComputedStyle.position === "fixed" ) {
+				break;
+			}
+
+			computedStyle = defaultView ? defaultView.getComputedStyle(elem, null) : elem.currentStyle;
+			top  -= elem.scrollTop;
+			left -= elem.scrollLeft;
+
+			if ( elem === offsetParent ) {
+				top  += elem.offsetTop;
+				left += elem.offsetLeft;
+
+				if ( jQuery.support.doesNotAddBorder && !(jQuery.support.doesAddBorderForTableAndCells && rtable.test(elem.nodeName)) ) {
+					top  += parseFloat( computedStyle.borderTopWidth  ) || 0;
+					left += parseFloat( computedStyle.borderLeftWidth ) || 0;
+				}
+
+				prevOffsetParent = offsetParent;
+				offsetParent = elem.offsetParent;
+			}
+
+			if ( jQuery.support.subtractsBorderForOverflowNotVisible && computedStyle.overflow !== "visible" ) {
+				top  += parseFloat( computedStyle.borderTopWidth  ) || 0;
+				left += parseFloat( computedStyle.borderLeftWidth ) || 0;
+			}
+
+			prevComputedStyle = computedStyle;
+		}
+
+		if ( prevComputedStyle.position === "relative" || prevComputedStyle.position === "static" ) {
+			top  += body.offsetTop;
+			left += body.offsetLeft;
+		}
+
+		if ( jQuery.support.fixedPosition && prevComputedStyle.position === "fixed" ) {
+			top  += Math.max( docElem.scrollTop, body.scrollTop );
+			left += Math.max( docElem.scrollLeft, body.scrollLeft );
+		}
+
+		return { top: top, left: left };
+	};
+}
+
+jQuery.offset = {
+
+	bodyOffset: function( body ) {
+		var top = body.offsetTop,
+			left = body.offsetLeft;
+
+		if ( jQuery.support.doesNotIncludeMarginInBodyOffset ) {
+			top  += parseFloat( jQuery.css(body, "marginTop") ) || 0;
+			left += parseFloat( jQuery.css(body, "marginLeft") ) || 0;
+		}
+
+		return { top: top, left: left };
+	},
+
+	setOffset: function( elem, options, i ) {
+		var position = jQuery.css( elem, "position" );
+
+		// set position first, in-case top/left are set even on static elem
+		if ( position === "static" ) {
+			elem.style.position = "relative";
+		}
+
+		var curElem = jQuery( elem ),
+			curOffset = curElem.offset(),
+			curCSSTop = jQuery.css( elem, "top" ),
+			curCSSLeft = jQuery.css( elem, "left" ),
+			calculatePosition = ( position === "absolute" || position === "fixed" ) && jQuery.inArray("auto", [curCSSTop, curCSSLeft]) > -1,
+			props = {}, curPosition = {}, curTop, curLeft;
+
+		// need to be able to calculate position if either top or left is auto and position is either absolute or fixed
+		if ( calculatePosition ) {
+			curPosition = curElem.position();
+			curTop = curPosition.top;
+			curLeft = curPosition.left;
+		} else {
+			curTop = parseFloat( curCSSTop ) || 0;
+			curLeft = parseFloat( curCSSLeft ) || 0;
+		}
+
+		if ( jQuery.isFunction( options ) ) {
+			options = options.call( elem, i, curOffset );
+		}
+
+		if ( options.top != null ) {
+			props.top = ( options.top - curOffset.top ) + curTop;
+		}
+		if ( options.left != null ) {
+			props.left = ( options.left - curOffset.left ) + curLeft;
+		}
+
+		if ( "using" in options ) {
+			options.using.call( elem, props );
+		} else {
+			curElem.css( props );
+		}
+	}
+};
+
+
+jQuery.fn.extend({
+
+	position: function() {
+		if ( !this[0] ) {
+			return null;
+		}
+
+		var elem = this[0],
+
+		// Get *real* offsetParent
+		offsetParent = this.offsetParent(),
+
+		// Get correct offsets
+		offset       = this.offset(),
+		parentOffset = rroot.test(offsetParent[0].nodeName) ? { top: 0, left: 0 } : offsetParent.offset();
+
+		// Subtract element margins
+		// note: when an element has margin: auto the offsetLeft and marginLeft
+		// are the same in Safari causing offset.left to incorrectly be 0
+		offset.top  -= parseFloat( jQuery.css(elem, "marginTop") ) || 0;
+		offset.left -= parseFloat( jQuery.css(elem, "marginLeft") ) || 0;
+
+		// Add offsetParent borders
+		parentOffset.top  += parseFloat( jQuery.css(offsetParent[0], "borderTopWidth") ) || 0;
+		parentOffset.left += parseFloat( jQuery.css(offsetParent[0], "borderLeftWidth") ) || 0;
+
+		// Subtract the two offsets
+		return {
+			top:  offset.top  - parentOffset.top,
+			left: offset.left - parentOffset.left
+		};
+	},
+
+	offsetParent: function() {
+		return this.map(function() {
+			var offsetParent = this.offsetParent || document.body;
+			while ( offsetParent && (!rroot.test(offsetParent.nodeName) && jQuery.css(offsetParent, "position") === "static") ) {
+				offsetParent = offsetParent.offsetParent;
+			}
+			return offsetParent;
+		});
+	}
+});
+
+
+// Create scrollLeft and scrollTop methods
+jQuery.each( ["Left", "Top"], function( i, name ) {
+	var method = "scroll" + name;
+
+	jQuery.fn[ method ] = function( val ) {
+		var elem, win;
+
+		if ( val === undefined ) {
+			elem = this[ 0 ];
+
+			if ( !elem ) {
+				return null;
+			}
+
+			win = getWindow( elem );
+
+			// Return the scroll offset
+			return win ? ("pageXOffset" in win) ? win[ i ? "pageYOffset" : "pageXOffset" ] :
+				jQuery.support.boxModel && win.document.documentElement[ method ] ||
+					win.document.body[ method ] :
+				elem[ method ];
+		}
+
+		// Set the scroll offset
+		return this.each(function() {
+			win = getWindow( this );
+
+			if ( win ) {
+				win.scrollTo(
+					!i ? val : jQuery( win ).scrollLeft(),
+					 i ? val : jQuery( win ).scrollTop()
+				);
+
+			} else {
+				this[ method ] = val;
+			}
+		});
+	};
+});
+
+function getWindow( elem ) {
+	return jQuery.isWindow( elem ) ?
+		elem :
+		elem.nodeType === 9 ?
+			elem.defaultView || elem.parentWindow :
+			false;
+}
+
+
+
+
+// Create width, height, innerHeight, innerWidth, outerHeight and outerWidth methods
+jQuery.each([ "Height", "Width" ], function( i, name ) {
+
+	var type = name.toLowerCase();
+
+	// innerHeight and innerWidth
+	jQuery.fn[ "inner" + name ] = function() {
+		var elem = this[0];
+		return elem ?
+			elem.style ?
+			parseFloat( jQuery.css( elem, type, "padding" ) ) :
+			this[ type ]() :
+			null;
+	};
+
+	// outerHeight and outerWidth
+	jQuery.fn[ "outer" + name ] = function( margin ) {
+		var elem = this[0];
+		return elem ?
+			elem.style ?
+			parseFloat( jQuery.css( elem, type, margin ? "margin" : "border" ) ) :
+			this[ type ]() :
+			null;
+	};
+
+	jQuery.fn[ type ] = function( size ) {
+		// Get window width or height
+		var elem = this[0];
+		if ( !elem ) {
+			return size == null ? null : this;
+		}
+
+		if ( jQuery.isFunction( size ) ) {
+			return this.each(function( i ) {
+				var self = jQuery( this );
+				self[ type ]( size.call( this, i, self[ type ]() ) );
+			});
+		}
+
+		if ( jQuery.isWindow( elem ) ) {
+			// Everyone else use document.documentElement or document.body depending on Quirks vs Standards mode
+			// 3rd condition allows Nokia support, as it supports the docElem prop but not CSS1Compat
+			var docElemProp = elem.document.documentElement[ "client" + name ],
+				body = elem.document.body;
+			return elem.document.compatMode === "CSS1Compat" && docElemProp ||
+				body && body[ "client" + name ] || docElemProp;
+
+		// Get document width or height
+		} else if ( elem.nodeType === 9 ) {
+			// Either scroll[Width/Height] or offset[Width/Height], whichever is greater
+			return Math.max(
+				elem.documentElement["client" + name],
+				elem.body["scroll" + name], elem.documentElement["scroll" + name],
+				elem.body["offset" + name], elem.documentElement["offset" + name]
+			);
+
+		// Get or set width or height on the element
+		} else if ( size === undefined ) {
+			var orig = jQuery.css( elem, type ),
+				ret = parseFloat( orig );
+
+			return jQuery.isNumeric( ret ) ? ret : orig;
+
+		// Set the width or height on the element (default to pixels if value is unitless)
+		} else {
+			return this.css( type, typeof size === "string" ? size : size + "px" );
+		}
+	};
+
+});
+
+
+
+
+// Expose jQuery to the global object
+window.jQuery = window.$ = jQuery;
+
+// Expose jQuery as an AMD module, but only for AMD loaders that
+// understand the issues with loading multiple versions of jQuery
+// in a page that all might call define(). The loader will indicate
+// they have special allowances for multiple jQuery versions by
+// specifying define.amd.jQuery = true. Register as a named module,
+// since jQuery can be concatenated with other files that may use define,
+// but not use a proper concatenation script that understands anonymous
+// AMD modules. A named AMD is safest and most robust way to register.
+// Lowercase jquery is used because AMD module names are derived from
+// file names, and jQuery is normally delivered in a lowercase file name.
+// Do this after creating the global so that if an AMD module wants to call
+// noConflict to hide this version of jQuery, it will work.
+if ( typeof define === "function" && define.amd && define.amd.jQuery ) {
+	define( "jquery", [], function () { return jQuery; } );
+}
+
+
+
+})( window );
diff --git a/src/site/resources/js/jquery.min.js b/src/site/resources/js/jquery.min.js
new file mode 100644
index 0000000..198b3ff
--- /dev/null
+++ b/src/site/resources/js/jquery.min.js
@@ -0,0 +1,4 @@
+/*! jQuery v1.7.1 jquery.com | jquery.org/license */
+(function(a,b){function cy(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cv(a){if(!ck[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){cl||(cl=c.createElement("iframe"),cl.frameBorder=cl.width=cl.height=0),b.appendChild(cl);if(!cm||!cl.createElement)cm=(cl.contentWindow||cl.contentDocument).document,cm.write((c.compatMode==="CSS1Compat"?"<!doctype html>":"")+"<html><body>"),cm.close();d=cm.createElement(a),cm.body.appendChild(d),e=f.css(d,"display"),b.removeChild(cl)}ck[a]=e}return ck[a]}function cu(a,b){var c={};f.each(cq.concat.apply([],cq.slice(0,b)),function(){c[this]=a});return c}function ct(){cr=b}function cs(){setTimeout(ct,0);return cr=f.now()}function cj(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ci(){try{return new a.XMLHttpRequest}catch(b){}}function cc(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g<i;g++){if(g===1)for(h in a.converters)typeof h=="string"&&(e[h.toLowerCase()]=a.converters[h]);l=k,k=d[g];if(k==="*")k=l;else if(l!=="*"&&l!==k){m=l+" "+k,n=e[m]||e["* "+k];if(!n){p=b;for(o in e){j=o.split(" ");if(j[0]===l||j[0]==="*"){p=e[j[1]+" "+k];if(p){o=e[o],o===!0?n=p:p===!0&&(n=o);break}}}}!n&&!p&&f.error("No conversion from "+m.replace(" "," to ")),n!==!0&&(c=n?n(c):p(o(c)))}}return c}function cb(a,c,d){var e=a.contents,f=a.dataTypes,g=a.responseFields,h,i,j,k;for(i in g)i in d&&(c[g[i]]=d[i]);while(f[0]==="*")f.shift(),h===b&&(h=a.mimeType||c.getResponseHeader("content-type"));if(h)for(i in e)if(e[i]&&e[i].test(h)){f.unshift(i);break}if(f[0]in d)j=f[0];else{for(i in d){if(!f[0]||a.converters[i+" "+f[0]]){j=i;break}k||(k=i)}j=j||k}if(j){j!==f[0]&&f.unshift(j);return d[j]}}function ca(a,b,c,d){if(f.isArray(b))f.each(b,function(b,e){c||bE.test(a)?d(a,e):ca(a+"["+(typeof e=="object"||f.isArray(e)?b:"")+"]",e,c,d)});else if(!c&&b!=null&&typeof b=="object")for(var e in b)ca(a+"["+e+"]",b[e],c,d);else d(a,b)}function b_(a,c){var d,e,g=f.ajaxSettings.flatOptions||{};for(d in c)c[d]!==b&&((g[d]?a:e||(e={}))[d]=c[d]);e&&f.extend(!0,a,e)}function b$(a,c,d,e,f,g){f=f||c.dataTypes[0],g=g||{},g[f]=!0;var h=a[f],i=0,j=h?h.length:0,k=a===bT,l;for(;i<j&&(k||!l);i++)l=h[i](c,d,e),typeof l=="string"&&(!k||g[l]?l=b:(c.dataTypes.unshift(l),l=b$(a,c,d,e,l,g)));(k||!l)&&!g["*"]&&(l=b$(a,c,d,e,"*",g));return l}function bZ(a){return function(b,c){typeof b!="string"&&(c=b,b="*");if(f.isFunction(c)){var d=b.toLowerCase().split(bP),e=0,g=d.length,h,i,j;for(;e<g;e++)h=d[e],j=/^\+/.test(h),j&&(h=h.substr(1)||"*"),i=a[h]=a[h]||[],i[j?"unshift":"push"](c)}}}function bC(a,b,c){var d=b==="width"?a.offsetWidth:a.offsetHeight,e=b==="width"?bx:by,g=0,h=e.length;if(d>0){if(c!=="border")for(;g<h;g++)c||(d-=parseFloat(f.css(a,"padding"+e[g]))||0),c==="margin"?d+=parseFloat(f.css(a,c+e[g]))||0:d-=parseFloat(f.css(a,"border"+e[g]+"Width"))||0;return d+"px"}d=bz(a,b,b);if(d<0||d==null)d=a.style[b]||0;d=parseFloat(d)||0;if(c)for(;g<h;g++)d+=parseFloat(f.css(a,"padding"+e[g]))||0,c!=="padding"&&(d+=parseFloat(f.css(a,"border"+e[g]+"Width"))||0),c==="margin"&&(d+=parseFloat(f.css(a,c+e[g]))||0);return d+"px"}function bp(a,b){b.src?f.ajax({url:b.src,async:!1,dataType:"script"}):f.globalEval((b.text||b.textContent||b.innerHTML||"").replace(bf,"/*$0*/")),b.parentNode&&b.parentNode.removeChild(b)}function bo(a){var b=c.createElement("div");bh.appendChild(b),b.innerHTML=a.outerHTML;return b.firstChild}function bn(a){var b=(a.nodeName||"").toLowerCase();b==="input"?bm(a):b!=="script"&&typeof a.getElementsByTagName!="undefined"&&f.grep(a.getElementsByTagName("input"),bm)}function bm(a){if(a.type==="checkbox"||a.type==="radio")a.defaultChecked=a.checked}function bl(a){return typeof a.getElementsByTagName!="undefined"?a.getElementsByTagName("*"):typeof a.querySelectorAll!="undefined"?a.querySelectorAll("*"):[]}function bk(a,b){var c;if(b.nodeType===1){b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase();if(c==="object")b.outerHTML=a.outerHTML;else if(c!=="input"||a.type!=="checkbox"&&a.type!=="radio"){if(c==="option")b.selected=a.defaultSelected;else if(c==="input"||c==="textarea")b.defaultValue=a.defaultValue}else a.checked&&(b.defaultChecked=b.checked=a.checked),b.value!==a.value&&(b.value=a.value);b.removeAttribute(f.expando)}}function bj(a,b){if(b.nodeType===1&&!!f.hasData(a)){var c,d,e,g=f._data(a),h=f._data(b,g),i=g.events;if(i){delete h.handle,h.events={};for(c in i)for(d=0,e=i[c].length;d<e;d++)f.event.add(b,c+(i[c][d].namespace?".":"")+i[c][d].namespace,i[c][d],i[c][d].data)}h.data&&(h.data=f.extend({},h.data))}}function bi(a,b){return f.nodeName(a,"table")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function U(a){var b=V.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}function T(a,b,c){b=b||0;if(f.isFunction(b))return f.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return f.grep(a,function(a,d){return a===b===c});if(typeof b=="string"){var d=f.grep(a,function(a){return a.nodeType===1});if(O.test(b))return f.filter(b,d,!c);b=f.filter(b,d)}return f.grep(a,function(a,d){return f.inArray(a,b)>=0===c})}function S(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function K(){return!0}function J(){return!1}function n(a,b,c){var d=b+"defer",e=b+"queue",g=b+"mark",h=f._data(a,d);h&&(c==="queue"||!f._data(a,e))&&(c==="mark"||!f._data(a,g))&&setTimeout(function(){!f._data(a,e)&&!f._data(a,g)&&(f.removeData(a,d,!0),h.fire())},0)}function m(a){for(var b in a){if(b==="data"&&f.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function l(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(k,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNumeric(d)?parseFloat(d):j.test(d)?f.parseJSON(d):d}catch(g){}f.data(a,c,d)}else d=b}return d}function h(a){var b=g[a]={},c,d;a=a.split(/\s+/);for(c=0,d=a.length;c<d;c++)b[a[c]]=!0;return b}var c=a.document,d=a.navigator,e=a.location,f=function(){function J(){if(!e.isReady){try{c.documentElement.doScroll("left")}catch(a){setTimeout(J,1);return}e.ready()}}var e=function(a,b){return new e.fn.init(a,b,h)},f=a.jQuery,g=a.$,h,i=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,n=/^[\],:{}\s]*$/,o=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,p=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,q=/(?:^|:|,)(?:\s*\[)+/g,r=/(webkit)[ \/]([\w.]+)/,s=/(opera)(?:.*version)?[ \/]([\w.]+)/,t=/(msie) ([\w.]+)/,u=/(mozilla)(?:.*? rv:([\w.]+))?/,v=/-([a-z]|[0-9])/ig,w=/^-ms-/,x=function(a,b){return(b+"").toUpperCase()},y=d.userAgent,z,A,B,C=Object.prototype.toString,D=Object.prototype.hasOwnProperty,E=Array.prototype.push,F=Array.prototype.slice,G=String.prototype.trim,H=Array.prototype.indexOf,I={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=m.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.7.1",length:0,size:function(){return this.length},toArray:function(){return F.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?E.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),A.add(a);return this},eq:function(a){a=+a;return a===-1?this.slice(a):this.slice(a,a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(F.apply(this,arguments),"slice",F.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:E,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j<k;j++)if((a=arguments[j])!=null)for(c in a){d=i[c],f=a[c];if(i===f)continue;l&&f&&(e.isPlainObject(f)||(g=e.isArray(f)))?(g?(g=!1,h=d&&e.isArray(d)?d:[]):h=d&&e.isPlainObject(d)?d:{},i[c]=e.extend(l,h,f)):f!==b&&(i[c]=f)}return i},e.extend({noConflict:function(b){a.$===e&&(a.$=g),b&&a.jQuery===e&&(a.jQuery=f);return e},isReady:!1,readyWait:1,holdReady:function(a){a?e.readyWait++:e.ready(!0)},ready:function(a){if(a===!0&&!--e.readyWait||a!==!0&&!e.isReady){if(!c.body)return setTimeout(e.ready,1);e.isReady=!0;if(a!==!0&&--e.readyWait>0)return;A.fireWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").off("ready")}},bindReady:function(){if(!A){A=e.Callbacks("once memory");if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",B,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",B),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&J()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a&&typeof a=="object"&&"setInterval"in a},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return a==null?String(a):I[C.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;try{if(a.constructor&&!D.call(a,"constructor")&&!D.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||D.call(a,d)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw new Error(a)},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(n.test(b.replace(o,"@").replace(p,"]").replace(q,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(c){var d,f;try{a.DOMParser?(f=new DOMParser,d=f.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(g){d=b}(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&e.error("Invalid XML: "+c);return d},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(w,"ms-").replace(v,x)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g<h;)if(c.apply(a[g++],d)===!1)break}else if(i){for(f in a)if(c.call(a[f],f,a[f])===!1)break}else for(;g<h;)if(c.call(a[g],g,a[g++])===!1)break;return a},trim:G?function(a){return a==null?"":G.call(a)}:function(a){return a==null?"":(a+"").replace(k,"").replace(l,"")},makeArray:function(a,b){var c=b||[];if(a!=null){var d=e.type(a);a.length==null||d==="string"||d==="function"||d==="regexp"||e.isWindow(a)?E.call(c,a):e.merge(c,a)}return c},inArray:function(a,b,c){var d;if(b){if(H)return H.call(b,a,c);d=b.length,c=c?c<0?Math.max(0,d+c):c:0;for(;c<d;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,c){var d=a.length,e=0;if(typeof c.length=="number")for(var f=c.length;e<f;e++)a[d++]=c[e];else while(c[e]!==b)a[d++]=c[e++];a.length=d;return a},grep:function(a,b,c){var d=[],e;c=!!c;for(var f=0,g=a.length;f<g;f++)e=!!b(a[f],f),c!==e&&d.push(a[f]);return d},map:function(a,c,d){var f,g,h=[],i=0,j=a.length,k=a instanceof e||j!==b&&typeof j=="number"&&(j>0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i<j;i++)f=c(a[i],i,d),f!=null&&(h[h.length]=f);else for(g in a)f=c(a[g],g,d),f!=null&&(h[h.length]=f);return h.concat.apply([],h)},guid:1,proxy:function(a,c){if(typeof c=="string"){var d=a[c];c=a,a=d}if(!e.isFunction(a))return b;var f=F.call(arguments,2),g=function(){return a.apply(c,f.concat(F.call(arguments)))};g.guid=a.guid=a.guid||g.guid||e.guid++;return g},access:function(a,c,d,f,g,h){var i=a.length;if(typeof c=="object"){for(var j in c)e.access(a,j,c[j],f,g,d);return a}if(d!==b){f=!h&&f&&e.isFunction(d);for(var k=0;k<i;k++)g(a[k],c,f?d.call(a[k],k,g(a[k],c)):d,h);return a}return i?g(a[0],c):b},now:function(){return(new Date).getTime()},uaMatch:function(a){a=a.toLowerCase();var b=r.exec(a)||s.exec(a)||t.exec(a)||a.indexOf("compatible")<0&&u.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},sub:function(){function a(b,c){return new a.fn.init(b,c)}e.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.sub=this.sub,a.fn.init=function(d,f){f&&f instanceof e&&!(f instanceof a)&&(f=a(f));return e.fn.init.call(this,d,f,b)},a.fn.init.prototype=a.fn;var b=a(c);return a},browser:{}}),e.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(a,b){I["[object "+b+"]"]=b.toLowerCase()}),z=e.uaMatch(y),z.browser&&(e.browser[z.browser]=!0,e.browser.version=z.version),e.browser.webkit&&(e.browser.safari=!0),j.test(" ")&&(k=/^[\s\xA0]+/,l=/[\s\xA0]+$/),h=e(c),c.addEventListener?B=function(){c.removeEventListener("DOMContentLoaded",B,!1),e.ready()}:c.attachEvent&&(B=function(){c.readyState==="complete"&&(c.detachEvent("onreadystatechange",B),e.ready())});return e}(),g={};f.Callbacks=function(a){a=a?g[a]||h(a):{};var c=[],d=[],e,i,j,k,l,m=function(b){var d,e,g,h,i;for(d=0,e=b.length;d<e;d++)g=b[d],h=f.type(g),h==="array"?m(g):h==="function"&&(!a.unique||!o.has(g))&&c.push(g)},n=function(b,f){f=f||[],e=!a.memory||[b,f],i=!0,l=j||0,j=0,k=c.length;for(;c&&l<k;l++)if(c[l].apply(b,f)===!1&&a.stopOnFalse){e=!0;break}i=!1,c&&(a.once?e===!0?o.disable():c=[]:d&&d.length&&(e=d.shift(),o.fireWith(e[0],e[1])))},o={add:function(){if(c){var a=c.length;m(arguments),i?k=c.length:e&&e!==!0&&(j=a,n(e[0],e[1]))}return this},remove:function(){if(c){var b=arguments,d=0,e=b.length;for(;d<e;d++)for(var f=0;f<c.length;f++)if(b[d]===c[f]){i&&f<=k&&(k--,f<=l&&l--),c.splice(f--,1);if(a.unique)break}}return this},has:function(a){if(c){var b=0,d=c.length;for(;b<d;b++)if(a===c[b])return!0}return!1},empty:function(){c=[];return this},disable:function(){c=d=e=b;return this},disabled:function(){return!c},lock:function(){d=b,(!e||e===!0)&&o.disable();return this},locked:function(){return!d},fireWith:function(b,c){d&&(i?a.once||d.push([b,c]):(!a.once||!e)&&n(b,c));return this},fire:function(){o.fireWith(this,arguments);return this},fired:function(){return!!e}};return o};var i=[].slice;f.extend({Deferred:function(a){var b=f.Callbacks("once memory"),c=f.Callbacks("once memory"),d=f.Callbacks("memory"),e="pending",g={resolve:b,reject:c,notify:d},h={done:b.add,fail:c.add,progress:d.add,state:function(){return e},isResolved:b.fired,isRejected:c.fired,then:function(a,b,c){i.done(a).fail(b).progress(c);return this},always:function(){i.done.apply(i,arguments).fail.apply(i,arguments);return this},pipe:function(a,b,c){return f.Deferred(function(d){f.each({done:[a,"resolve"],fail:[b,"reject"],progress:[c,"notify"]},function(a,b){var c=b[0],e=b[1],g;f.isFunction(c)?i[a](function(){g=c.apply(this,arguments),g&&f.isFunction(g.promise)?g.promise().then(d.resolve,d.reject,d.notify):d[e+"With"](this===i?d:this,[g])}):i[a](d[e])})}).promise()},promise:function(a){if(a==null)a=h;else for(var b in h)a[b]=h[b];return a}},i=h.promise({}),j;for(j in g)i[j]=g[j].fire,i[j+"With"]=g[j].fireWith;i.done(function(){e="resolved"},c.disable,d.lock).fail(function(){e="rejected"},b.disable,d.lock),a&&a.call(i,i);return i},when:function(a){function m(a){return function(b){e[a]=arguments.length>1?i.call(arguments,0):b,j.notifyWith(k,e)}}function l(a){return function(c){b[a]=arguments.length>1?i.call(arguments,0):c,--g||j.resolveWith(j,b)}}var b=i.call(arguments,0),c=0,d=b.length,e=Array(d),g=d,h=d,j=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred(),k=j.promise();if(d>1){for(;c<d;c++)b[c]&&b[c].promise&&f.isFunction(b[c].promise)?b[c].promise().then(l(c),j.reject,m(c)):--g;g||j.resolveWith(j,b)}else j!==a&&j.resolveWith(j,d?[a]:[]);return k}}),f.support=function(){var b,d,e,g,h,i,j,k,l,m,n,o,p,q=c.createElement("div"),r=c.documentElement;q.setAttribute("className","t"),q.innerHTML="   <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>",d=q.getElementsByTagName("*"),e=q.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=q.getElementsByTagName("input")[0],b={leadingWhitespace:q.firstChild.nodeType===3,tbody:!q.getElementsByTagName("tbody").length,htmlSerialize:!!q.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:q.className!=="t",enctype:!!c.createElement("form").enctype,html5Clone:c.createElement("nav").cloneNode(!0).outerHTML!=="<:nav></:nav>",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0},i.checked=!0,b.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,b.optDisabled=!h.disabled;try{delete q.test}catch(s){b.deleteExpando=!1}!q.addEventListener&&q.attachEvent&&q.fireEvent&&(q.attachEvent("onclick",function(){b.noCloneEvent=!1}),q.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),b.radioValue=i.value==="t",i.setAttribute("checked","checked"),q.appendChild(i),k=c.createDocumentFragment(),k.appendChild(q.lastChild),b.checkClone=k.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecked=i.checked,k.removeChild(i),k.appendChild(q),q.innerHTML="",a.getComputedStyle&&(j=c.createElement("div"),j.style.width="0",j.style.marginRight="0",q.style.width="2px",q.appendChild(j),b.reliableMarginRight=(parseInt((a.getComputedStyle(j,null)||{marginRight:0}).marginRight,10)||0)===0);if(q.attachEvent)for(o in{submit:1,change:1,focusin:1})n="on"+o,p=n in q,p||(q.setAttribute(n,"return;"),p=typeof q[n]=="function"),b[o+"Bubbles"]=p;k.removeChild(q),k=g=h=j=q=i=null,f(function(){var a,d,e,g,h,i,j,k,m,n,o,r=c.getElementsByTagName("body")[0];!r||(j=1,k="position:absolute;top:0;left:0;width:1px;height:1px;margin:0;",m="visibility:hidden;border:0;",n="style='"+k+"border:5px solid #000;padding:0;'",o="<div "+n+"><div></div></div>"+"<table "+n+" cellpadding='0' cellspacing='0'>"+"<tr><td></td></tr></table>",a=c.createElement("div"),a.style.cssText=m+"width:0;height:0;position:static;top:0;margin-top:"+j+"px",r.insertBefore(a,r.firstChild),q=c.createElement("div"),a.appendChild(q),q.innerHTML="<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>",l=q.getElementsByTagName("td"),p=l[0].offsetHeight===0,l[0].style.display="",l[1].style.display="none",b.reliableHiddenOffsets=p&&l[0].offsetHeight===0,q.innerHTML="",q.style.width=q.style.paddingLeft="1px",f.boxModel=b.boxModel=q.offsetWidth===2,typeof q.style.zoom!="undefined"&&(q.style.display="inline",q.style.zoom=1,b.inlineBlockNeedsLayout=q.offsetWidth===2,q.style.display="",q.innerHTML="<div style='width:4px;'></div>",b.shrinkWrapBlocks=q.offsetWidth!==2),q.style.cssText=k+m,q.innerHTML=o,d=q.firstChild,e=d.firstChild,h=d.nextSibling.firstChild.firstChild,i={doesNotAddBorder:e.offsetTop!==5,doesAddBorderForTableAndCells:h.offsetTop===5},e.style.position="fixed",e.style.top="20px",i.fixedPosition=e.offsetTop===20||e.offsetTop===15,e.style.position=e.style.top="",d.style.overflow="hidden",d.style.position="relative",i.subtractsBorderForOverflowNotVisible=e.offsetTop===-5,i.doesNotIncludeMarginInBodyOffset=r.offsetTop!==j,r.removeChild(a),q=a=null,f.extend(b,i))});return b}();var j=/^(?:\{.*\}|\[.*\])$/,k=/([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!m(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g,h,i,j=f.expando,k=typeof c=="string",l=a.nodeType,m=l?f.cache:a,n=l?a[j]:a[j]&&j,o=c==="events";if((!n||!m[n]||!o&&!e&&!m[n].data)&&k&&d===b)return;n||(l?a[j]=n=++f.uuid:n=j),m[n]||(m[n]={},l||(m[n].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?m[n]=f.extend(m[n],c):m[n].data=f.extend(m[n].data,c);g=h=m[n],e||(h.data||(h.data={}),h=h.data),d!==b&&(h[f.camelCase(c)]=d);if(o&&!h[c])return g.events;k?(i=h[c],i==null&&(i=h[f.camelCase(c)])):i=h;return i}},removeData:function(a,b,c){if(!!f.acceptData(a)){var d,e,g,h=f.expando,i=a.nodeType,j=i?f.cache:a,k=i?a[h]:h;if(!j[k])return;if(b){d=c?j[k]:j[k].data;if(d){f.isArray(b)||(b in d?b=[b]:(b=f.camelCase(b),b in d?b=[b]:b=b.split(" ")));for(e=0,g=b.length;e<g;e++)delete d[b[e]];if(!(c?m:f.isEmptyObject)(d))return}}if(!c){delete j[k].data;if(!m(j[k]))return}f.support.deleteExpando||!j.setInterval?delete j[k]:j[k]=null,i&&(f.support.deleteExpando?delete a[h]:a.removeAttribute?a.removeAttribute(h):a[h]=null)}},_data:function(a,b,c){return f.data(a,b,c,!0)},acceptData:function(a){if(a.nodeName){var b=f.noData[a.nodeName.toLowerCase()];if(b)return b!==!0&&a.getAttribute("classid")===b}return!0}}),f.fn.extend({data:function(a,c){var d,e,g,h=null;if(typeof a=="undefined"){if(this.length){h=f.data(this[0]);if(this[0].nodeType===1&&!f._data(this[0],"parsedAttrs")){e=this[0].attributes;for(var i=0,j=e.length;i<j;i++)g=e[i].name,g.indexOf("data-")===0&&(g=f.camelCase(g.substring(5)),l(this[0],g,h[g]));f._data(this[0],"parsedAttrs",!0)}}return h}if(typeof a=="object")return this.each(function(){f.data(this,a)});d=a.split("."),d[1]=d[1]?"."+d[1]:"";if(c===b){h=this.triggerHandler("getData"+d[1]+"!",[d[0]]),h===b&&this.length&&(h=f.data(this[0],a),h=l(this[0],a,h));return h===b&&d[1]?this.data(d[0]):h}return this.each(function(){var b=f(this),e=[d[0],c];b.triggerHandler("setData"+d[1]+"!",e),f.data(this,a,c),b.triggerHandler("changeData"+d[1]+"!",e)})},removeData:function(a){return this.each(function(){f.removeData(this,a)})}}),f.extend({_mark:function(a,b){a&&(b=(b||"fx")+"mark",f._data(a,b,(f._data(a,b)||0)+1))},_unmark:function(a,b,c){a!==!0&&(c=b,b=a,a=!1);if(b){c=c||"fx";var d=c+"mark",e=a?0:(f._data(b,d)||1)-1;e?f._data(b,d,e):(f.removeData(b,d,!0),n(b,c,"mark"))}},queue:function(a,b,c){var d;if(a){b=(b||"fx")+"queue",d=f._data(a,b),c&&(!d||f.isArray(c)?d=f._data(a,b,f.makeArray(c)):d.push(c));return d||[]}},dequeue:function(a,b){b=b||"fx";var c=f.queue(a,b),d=c.shift(),e={};d==="inprogress"&&(d=c.shift()),d&&(b==="fx"&&c.unshift("inprogress"),f._data(a,b+".run",e),d.call(a,function(){f.dequeue(a,b)},e)),c.length||(f.removeData(a,b+"queue "+b+".run",!0),n(a,b,"queue"))}}),f.fn.extend({queue:function(a,c){typeof a!="string"&&(c=a,a="fx");if(c===b)return f.queue(this[0],a);return this.each(function(){var b=f.queue(this,a,c);a==="fx"&&b[0]!=="inprogress"&&f.dequeue(this,a)})},dequeue:function(a){return this.each(function(){f.dequeue(this,a)})},delay:function(a,b){a=f.fx?f.fx.speeds[a]||a:a,b=b||"fx";return this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,c){function m(){--h||d.resolveWith(e,[e])}typeof a!="string"&&(c=a,a=b),a=a||"fx";var d=f.Deferred(),e=this,g=e.length,h=1,i=a+"defer",j=a+"queue",k=a+"mark",l;while(g--)if(l=f.data(e[g],i,b,!0)||(f.data(e[g],j,b,!0)||f.data(e[g],k,b,!0))&&f.data(e[g],i,f.Callbacks("once memory"),!0))h++,l.add(m);m();return d.promise()}});var o=/[\n\t\r]/g,p=/\s+/,q=/\r/g,r=/^(?:button|input)$/i,s=/^(?:button|input|object|select|textarea)$/i,t=/^a(?:rea)?$/i,u=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,v=f.support.getSetAttribute,w,x,y;f.fn.extend({attr:function(a,b){return f.access(this,a,b,!0,f.attr)},removeAttr:function(a){return this.each(function(){f.removeAttr(this,a)})},prop:function(a,b){return f.access(this,a,b,!0,f.prop)},removeProp:function(a){a=f.propFix[a]||a;return this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,g,h,i;if(f.isFunction(a))return this.each(function(b){f(this).addClass(a.call(this,b,this.className))});if(a&&typeof a=="string"){b=a.split(p);for(c=0,d=this.length;c<d;c++){e=this[c];if(e.nodeType===1)if(!e.className&&b.length===1)e.className=a;else{g=" "+e.className+" ";for(h=0,i=b.length;h<i;h++)~g.indexOf(" "+b[h]+" ")||(g+=b[h]+" ");e.className=f.trim(g)}}}return this},removeClass:function(a){var c,d,e,g,h,i,j;if(f.isFunction(a))return this.each(function(b){f(this).removeClass(a.call(this,b,this.className))});if(a&&typeof a=="string"||a===b){c=(a||"").split(p);for(d=0,e=this.length;d<e;d++){g=this[d];if(g.nodeType===1&&g.className)if(a){h=(" "+g.className+" ").replace(o," ");for(i=0,j=c.length;i<j;i++)h=h.replace(" "+c[i]+" "," ");g.className=f.trim(h)}else g.className=""}}return this},toggleClass:function(a,b){var c=typeof a,d=typeof b=="boolean";if(f.isFunction(a))return this.each(function(c){f(this).toggleClass(a.call(this,c,this.className,b),b)});return this.each(function(){if(c==="string"){var e,g=0,h=f(this),i=b,j=a.split(p);while(e=j[g++])i=d?i:!h.hasClass(e),h[i?"addClass":"removeClass"](e)}else if(c==="undefined"||c==="boolean")this.className&&f._data(this,"__className__",this.className),this.className=this.className||a===!1?"":f._data(this,"__className__")||""})},hasClass:function(a){var b=" "+a+" ",c=0,d=this.length;for(;c<d;c++)if(this[c].nodeType===1&&(" "+this[c].className+" ").replace(o," ").indexOf(b)>-1)return!0;return!1},val:function(a){var c,d,e,g=this[0];{if(!!arguments.length){e=f.isFunction(a);return this.each(function(d){var g=f(this),h;if(this.nodeType===1){e?h=a.call(this,d,g.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.nodeName.toLowerCase()]||f.valHooks[this.type];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}if(g){c=f.valHooks[g.nodeName.toLowerCase()]||f.valHooks[g.type];if(c&&"get"in c&&(d=c.get(g,"value"))!==b)return d;d=g.value;return typeof d=="string"?d.replace(q,""):d==null?"":d}}}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,g=a.selectedIndex,h=[],i=a.options,j=a.type==="select-one";if(g<0)return null;c=j?g:0,d=j?g+1:i.length;for(;c<d;c++){e=i[c];if(e.selected&&(f.support.optDisabled?!e.disabled:e.getAttribute("disabled")===null)&&(!e.parentNode.disabled||!f.nodeName(e.parentNode,"optgroup"))){b=f(e).val();if(j)return b;h.push(b)}}if(j&&!h.length&&i.length)return f(i[g]).val();return h},set:function(a,b){var c=f.makeArray(b);f(a).find("option").each(function(){this.selected=f.inArray(f(this).val(),c)>=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,d,e){var g,h,i,j=a.nodeType;if(!!a&&j!==3&&j!==8&&j!==2){if(e&&c in f.attrFn)return f(a)[c](d);if(typeof a.getAttribute=="undefined")return f.prop(a,c,d);i=j!==1||!f.isXMLDoc(a),i&&(c=c.toLowerCase(),h=f.attrHooks[c]||(u.test(c)?x:w));if(d!==b){if(d===null){f.removeAttr(a,c);return}if(h&&"set"in h&&i&&(g=h.set(a,d,c))!==b)return g;a.setAttribute(c,""+d);return d}if(h&&"get"in h&&i&&(g=h.get(a,c))!==null)return g;g=a.getAttribute(c);return g===null?b:g}},removeAttr:function(a,b){var c,d,e,g,h=0;if(b&&a.nodeType===1){d=b.toLowerCase().split(p),g=d.length;for(;h<g;h++)e=d[h],e&&(c=f.propFix[e]||e,f.attr(a,e,""),a.removeAttribute(v?e:c),u.test(e)&&c in a&&(a[c]=!1))}},attrHooks:{type:{set:function(a,b){if(r.test(a.nodeName)&&a.parentNode)f.error("type property can't be changed");else if(!f.support.radioValue&&b==="radio"&&f.nodeName(a,"input")){var c=a.value;a.setAttribute("type",b),c&&(a.value=c);return b}}},value:{get:function(a,b){if(w&&f.nodeName(a,"button"))return w.get(a,b);return b in a?a.value:null},set:function(a,b,c){if(w&&f.nodeName(a,"button"))return w.set(a,b,c);a.value=b}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(a,c,d){var e,g,h,i=a.nodeType;if(!!a&&i!==3&&i!==8&&i!==2){h=i!==1||!f.isXMLDoc(a),h&&(c=f.propFix[c]||c,g=f.propHooks[c]);return d!==b?g&&"set"in g&&(e=g.set(a,d,c))!==b?e:a[c]=d:g&&"get"in g&&(e=g.get(a,c))!==null?e:a[c]}},propHooks:{tabIndex:{get:function(a){var c=a.getAttributeNode("tabindex");return c&&c.specified?parseInt(c.value,10):s.test(a.nodeName)||t.test(a.nodeName)&&a.href?0:b}}}}),f.attrHooks.tabindex=f.propHooks.tabIndex,x={get:function(a,c){var d,e=f.prop(a,c);return e===!0||typeof e!="boolean"&&(d=a.getAttributeNode(c))&&d.nodeValue!==!1?c.toLowerCase():b},set:function(a,b,c){var d;b===!1?f.removeAttr(a,c):(d=f.propFix[c]||c,d in a&&(a[d]=!0),a.setAttribute(c,c.toLowerCase()));return c}},v||(y={name:!0,id:!0},w=f.valHooks.button={get:function(a,c){var d;d=a.getAttributeNode(c);return d&&(y[c]?d.nodeValue!=="":d.specified)?d.nodeValue:b},set:function(a,b,d){var e=a.getAttributeNode(d);e||(e=c.createAttribute(d),a.setAttributeNode(e));return e.nodeValue=b+""}},f.attrHooks.tabindex.set=w.set,f.each(["width","height"],function(a,b){f.attrHooks[b]=f.extend(f.attrHooks[b],{set:function(a,c){if(c===""){a.setAttribute(b,"auto");return c}}})}),f.attrHooks.contenteditable={get:w.get,set:function(a,b,c){b===""&&(b="false"),w.set(a,b,c)}}),f.support.hrefNormalized||f.each(["href","src","width","height"],function(a,c){f.attrHooks[c]=f.extend(f.attrHooks[c],{get:function(a){var d=a.getAttribute(c,2);return d===null?b:d}})}),f.support.style||(f.attrHooks.style={get:function(a){return a.style.cssText.toLowerCase()||b},set:function(a,b){return a.style.cssText=""+b}}),f.support.optSelected||(f.propHooks.selected=f.extend(f.propHooks.selected,{get:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex);return null}})),f.support.enctype||(f.propFix.enctype="encoding"),f.support.checkOn||f.each(["radio","checkbox"],function(){f.valHooks[this]={get:function(a){return a.getAttribute("value")===null?"on":a.value}}}),f.each(["radio","checkbox"],function(){f.valHooks[this]=f.extend(f.valHooks[this],{set:function(a,b){if(f.isArray(b))return a.checked=f.inArray(f(a).val(),b)>=0}})});var z=/^(?:textarea|input|select)$/i,A=/^([^\.]*)?(?:\.(.+))?$/,B=/\bhover(\.\S+)?\b/,C=/^key/,D=/^(?:mouse|contextmenu)|click/,E=/^(?:focusinfocus|focusoutblur)$/,F=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,G=function(a){var b=F.exec(a);b&&(b[1]=(b[1]||"").toLowerCase(),b[3]=b[3]&&new RegExp("(?:^|\\s)"+b[3]+"(?:\\s|$)"));return b},H=function(a,b){var c=a.attributes||{};return(!b[1]||a.nodeName.toLowerCase()===b[1])&&(!b[2]||(c.id||{}).value===b[2])&&(!b[3]||b[3].test((c["class"]||{}).value))},I=function(a){return f.event.special.hover?a:a.replace(B,"mouseenter$1 mouseleave$1")};
+f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(!(a.nodeType===3||a.nodeType===8||!c||!d||!(h=f._data(a)))){d.handler&&(p=d,d=p.handler),d.guid||(d.guid=f.guid++),j=h.events,j||(h.events=j={}),i=h.handle,i||(h.handle=i=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.dispatch.apply(i.elem,arguments):b},i.elem=a),c=f.trim(I(c)).split(" ");for(k=0;k<c.length;k++){l=A.exec(c[k])||[],m=l[1],n=(l[2]||"").split(".").sort(),s=f.event.special[m]||{},m=(g?s.delegateType:s.bindType)||m,s=f.event.special[m]||{},o=f.extend({type:m,origType:l[1],data:e,handler:d,guid:d.guid,selector:g,quick:G(g),namespace:n.join(".")},p),r=j[m];if(!r){r=j[m]=[],r.delegateCount=0;if(!s.setup||s.setup.call(a,e,n,i)===!1)a.addEventListener?a.addEventListener(m,i,!1):a.attachEvent&&a.attachEvent("on"+m,i)}s.add&&(s.add.call(a,o),o.handler.guid||(o.handler.guid=d.guid)),g?r.splice(r.delegateCount++,0,o):r.push(o),f.event.global[m]=!0}a=null}},global:{},remove:function(a,b,c,d,e){var g=f.hasData(a)&&f._data(a),h,i,j,k,l,m,n,o,p,q,r,s;if(!!g&&!!(o=g.events)){b=f.trim(I(b||"")).split(" ");for(h=0;h<b.length;h++){i=A.exec(b[h])||[],j=k=i[1],l=i[2];if(!j){for(j in o)f.event.remove(a,j+b[h],c,d,!0);continue}p=f.event.special[j]||{},j=(d?p.delegateType:p.bindType)||j,r=o[j]||[],m=r.length,l=l?new RegExp("(^|\\.)"+l.split(".").sort().join("\\.(?:.*\\.)?")+"(\\.|$)"):null;for(n=0;n<r.length;n++)s=r[n],(e||k===s.origType)&&(!c||c.guid===s.guid)&&(!l||l.test(s.namespace))&&(!d||d===s.selector||d==="**"&&s.selector)&&(r.splice(n--,1),s.selector&&r.delegateCount--,p.remove&&p.remove.call(a,s));r.length===0&&m!==r.length&&((!p.teardown||p.teardown.call(a,l)===!1)&&f.removeEvent(a,j,g.handle),delete o[j])}f.isEmptyObject(o)&&(q=g.handle,q&&(q.elem=null),f.removeData(a,["events","handle"],!0))}},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(c,d,e,g){if(!e||e.nodeType!==3&&e.nodeType!==8){var h=c.type||c,i=[],j,k,l,m,n,o,p,q,r,s;if(E.test(h+f.event.triggered))return;h.indexOf("!")>=0&&(h=h.slice(0,-1),k=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if((!e||f.event.customEvent[h])&&!f.event.global[h])return;c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.isTrigger=!0,c.exclusive=k,c.namespace=i.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)"):null,o=h.indexOf(":")<0?"on"+h:"";if(!e){j=f.cache;for(l in j)j[l].events&&j[l].events[h]&&f.event.trigger(c,d,j[l].handle.elem,!0);return}c.result=b,c.target||(c.target=e),d=d!=null?f.makeArray(d):[],d.unshift(c),p=f.event.special[h]||{};if(p.trigger&&p.trigger.apply(e,d)===!1)return;r=[[e,p.bindType||h]];if(!g&&!p.noBubble&&!f.isWindow(e)){s=p.delegateType||h,m=E.test(s+h)?e:e.parentNode,n=null;for(;m;m=m.parentNode)r.push([m,s]),n=m;n&&n===e.ownerDocument&&r.push([n.defaultView||n.parentWindow||a,s])}for(l=0;l<r.length&&!c.isPropagationStopped();l++)m=r[l][0],c.type=r[l][1],q=(f._data(m,"events")||{})[c.type]&&f._data(m,"handle"),q&&q.apply(m,d),q=o&&m[o],q&&f.acceptData(m)&&q.apply(m,d)===!1&&c.preventDefault();c.type=h,!g&&!c.isDefaultPrevented()&&(!p._default||p._default.apply(e.ownerDocument,d)===!1)&&(h!=="click"||!f.nodeName(e,"a"))&&f.acceptData(e)&&o&&e[h]&&(h!=="focus"&&h!=="blur"||c.target.offsetWidth!==0)&&!f.isWindow(e)&&(n=e[o],n&&(e[o]=null),f.event.triggered=h,e[h](),f.event.triggered=b,n&&(e[o]=n));return c.result}},dispatch:function(c){c=f.event.fix(c||a.event);var d=(f._data(this,"events")||{})[c.type]||[],e=d.delegateCount,g=[].slice.call(arguments,0),h=!c.exclusive&&!c.namespace,i=[],j,k,l,m,n,o,p,q,r,s,t;g[0]=c,c.delegateTarget=this;if(e&&!c.target.disabled&&(!c.button||c.type!=="click")){m=f(this),m.context=this.ownerDocument||this;for(l=c.target;l!=this;l=l.parentNode||this){o={},q=[],m[0]=l;for(j=0;j<e;j++)r=d[j],s=r.selector,o[s]===b&&(o[s]=r.quick?H(l,r.quick):m.is(s)),o[s]&&q.push(r);q.length&&i.push({elem:l,matches:q})}}d.length>e&&i.push({elem:this,matches:d.slice(e)});for(j=0;j<i.length&&!c.isPropagationStopped();j++){p=i[j],c.currentTarget=p.elem;for(k=0;k<p.matches.length&&!c.isImmediatePropagationStopped();k++){r=p.matches[k];if(h||!c.namespace&&!r.namespace||c.namespace_re&&c.namespace_re.test(r.namespace))c.data=r.data,c.handleObj=r,n=((f.event.special[r.origType]||{}).handle||r.handler).apply(p.elem,g),n!==b&&(c.result=n,n===!1&&(c.preventDefault(),c.stopPropagation()))}}return c.result},props:"attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){a.which==null&&(a.which=b.charCode!=null?b.charCode:b.keyCode);return a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,d){var e,f,g,h=d.button,i=d.fromElement;a.pageX==null&&d.clientX!=null&&(e=a.target.ownerDocument||c,f=e.documentElement,g=e.body,a.pageX=d.clientX+(f&&f.scrollLeft||g&&g.scrollLeft||0)-(f&&f.clientLeft||g&&g.clientLeft||0),a.pageY=d.clientY+(f&&f.scrollTop||g&&g.scrollTop||0)-(f&&f.clientTop||g&&g.clientTop||0)),!a.relatedTarget&&i&&(a.relatedTarget=i===a.target?d.toElement:i),!a.which&&h!==b&&(a.which=h&1?1:h&2?3:h&4?2:0);return a}},fix:function(a){if(a[f.expando])return a;var d,e,g=a,h=f.event.fixHooks[a.type]||{},i=h.props?this.props.concat(h.props):this.props;a=f.Event(g);for(d=i.length;d;)e=i[--d],a[e]=g[e];a.target||(a.target=g.srcElement||c),a.target.nodeType===3&&(a.target=a.target.parentNode),a.metaKey===b&&(a.metaKey=a.ctrlKey);return h.filter?h.filter(a,g):a},special:{ready:{setup:f.bindReady},load:{noBubble:!0},focus:{delegateType:"focusin"},blur:{delegateType:"focusout"},beforeunload:{setup:function(a,b,c){f.isWindow(this)&&(this.onbeforeunload=c)},teardown:function(a,b){this.onbeforeunload===b&&(this.onbeforeunload=null)}}},simulate:function(a,b,c,d){var e=f.extend(new f.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?f.event.trigger(e,null,b):f.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},f.event.handle=f.event.dispatch,f.removeEvent=c.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){a.detachEvent&&a.detachEvent("on"+b,c)},f.Event=function(a,b){if(!(this instanceof f.Event))return new f.Event(a,b);a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault()?K:J):this.type=a,b&&f.extend(this,b),this.timeStamp=a&&a.timeStamp||f.now(),this[f.expando]=!0},f.Event.prototype={preventDefault:function(){this.isDefaultPrevented=K;var a=this.originalEvent;!a||(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){this.isPropagationStopped=K;var a=this.originalEvent;!a||(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=K,this.stopPropagation()},isDefaultPrevented:J,isPropagationStopped:J,isImmediatePropagationStopped:J},f.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){f.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c=this,d=a.relatedTarget,e=a.handleObj,g=e.selector,h;if(!d||d!==c&&!f.contains(c,d))a.type=e.origType,h=e.handler.apply(this,arguments),a.type=b;return h}}}),f.support.submitBubbles||(f.event.special.submit={setup:function(){if(f.nodeName(this,"form"))return!1;f.event.add(this,"click._submit keypress._submit",function(a){var c=a.target,d=f.nodeName(c,"input")||f.nodeName(c,"button")?c.form:b;d&&!d._submit_attached&&(f.event.add(d,"submit._submit",function(a){this.parentNode&&!a.isTrigger&&f.event.simulate("submit",this.parentNode,a,!0)}),d._submit_attached=!0)})},teardown:function(){if(f.nodeName(this,"form"))return!1;f.event.remove(this,"._submit")}}),f.support.changeBubbles||(f.event.special.change={setup:function(){if(z.test(this.nodeName)){if(this.type==="checkbox"||this.type==="radio")f.event.add(this,"propertychange._change",function(a){a.originalEvent.propertyName==="checked"&&(this._just_changed=!0)}),f.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1,f.event.simulate("change",this,a,!0))});return!1}f.event.add(this,"beforeactivate._change",function(a){var b=a.target;z.test(b.nodeName)&&!b._change_attached&&(f.event.add(b,"change._change",function(a){this.parentNode&&!a.isSimulated&&!a.isTrigger&&f.event.simulate("change",this.parentNode,a,!0)}),b._change_attached=!0)})},handle:function(a){var b=a.target;if(this!==b||a.isSimulated||a.isTrigger||b.type!=="radio"&&b.type!=="checkbox")return a.handleObj.handler.apply(this,arguments)},teardown:function(){f.event.remove(this,"._change");return z.test(this.nodeName)}}),f.support.focusinBubbles||f.each({focus:"focusin",blur:"focusout"},function(a,b){var d=0,e=function(a){f.event.simulate(b,a.target,f.event.fix(a),!0)};f.event.special[b]={setup:function(){d++===0&&c.addEventListener(a,e,!0)},teardown:function(){--d===0&&c.removeEventListener(a,e,!0)}}}),f.fn.extend({on:function(a,c,d,e,g){var h,i;if(typeof a=="object"){typeof c!="string"&&(d=c,c=b);for(i in a)this.on(i,c,d,a[i],g);return this}d==null&&e==null?(e=c,d=c=b):e==null&&(typeof c=="string"?(e=d,d=b):(e=d,d=c,c=b));if(e===!1)e=J;else if(!e)return this;g===1&&(h=e,e=function(a){f().off(a);return h.apply(this,arguments)},e.guid=h.guid||(h.guid=f.guid++));return this.each(function(){f.event.add(this,a,e,d,c)})},one:function(a,b,c,d){return this.on.call(this,a,b,c,d,1)},off:function(a,c,d){if(a&&a.preventDefault&&a.handleObj){var e=a.handleObj;f(a.delegateTarget).off(e.namespace?e.type+"."+e.namespace:e.type,e.selector,e.handler);return this}if(typeof a=="object"){for(var g in a)this.off(g,c,a[g]);return this}if(c===!1||typeof c=="function")d=c,c=b;d===!1&&(d=J);return this.each(function(){f.event.remove(this,a,d,c)})},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},live:function(a,b,c){f(this.context).on(a,this.selector,b,c);return this},die:function(a,b){f(this.context).off(a,this.selector||"**",b);return this},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return arguments.length==1?this.off(a,"**"):this.off(b,a,c)},trigger:function(a,b){return this.each(function(){f.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0])return f.event.trigger(a,b,this[0],!0)},toggle:function(a){var b=arguments,c=a.guid||f.guid++,d=0,e=function(c){var e=(f._data(this,"lastToggle"+a.guid)||0)%d;f._data(this,"lastToggle"+a.guid,e+1),c.preventDefault();return b[e].apply(this,arguments)||!1};e.guid=c;while(d<b.length)b[d++].guid=c;return this.click(e)},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}}),f.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){f.fn[b]=function(a,c){c==null&&(c=a,a=null);return arguments.length>0?this.on(b,null,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0),C.test(b)&&(f.event.fixHooks[b]=f.event.keyHooks),D.test(b)&&(f.event.fixHooks[b]=f.event.mouseHooks)}),function(){function x(a,b,c,e,f,g){for(var h=0,i=e.length;h<i;h++){var j=e[h];if(j){var k=!1;j=j[a];while(j){if(j[d]===c){k=e[j.sizset];break}if(j.nodeType===1){g||(j[d]=c,j.sizset=h);if(typeof b!="string"){if(j===b){k=!0;break}}else if(m.filter(b,[j]).length>0){k=j;break}}j=j[a]}e[h]=k}}}function w(a,b,c,e,f,g){for(var h=0,i=e.length;h<i;h++){var j=e[h];if(j){var k=!1;j=j[a];while(j){if(j[d]===c){k=e[j.sizset];break}j.nodeType===1&&!g&&(j[d]=c,j.sizset=h);if(j.nodeName.toLowerCase()===b){k=j;break}j=j[a]}e[h]=k}}}var a=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d="sizcache"+(Math.random()+"").replace(".",""),e=0,g=Object.prototype.toString,h=!1,i=!0,j=/\\/g,k=/\r\n/g,l=/\W/;[0,0].sort(function(){i=!1;return 0});var m=function(b,d,e,f){e=e||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return e;var i,j,k,l,n,q,r,t,u=!0,v=m.isXML(d),w=[],x=b;do{a.exec(""),i=a.exec(x);if(i){x=i[3],w.push(i[1]);if(i[2]){l=i[3];break}}}while(i);if(w.length>1&&p.exec(b))if(w.length===2&&o.relative[w[0]])j=y(w[0]+w[1],d,f);else{j=o.relative[w[0]]?[d]:m(w.shift(),d);while(w.length)b=w.shift(),o.relative[b]&&(b+=w.shift()),j=y(b,j,f)}else{!f&&w.length>1&&d.nodeType===9&&!v&&o.match.ID.test(w[0])&&!o.match.ID.test(w[w.length-1])&&(n=m.find(w.shift(),d,v),d=n.expr?m.filter(n.expr,n.set)[0]:n.set[0]);if(d){n=f?{expr:w.pop(),set:s(f)}:m.find(w.pop(),w.length===1&&(w[0]==="~"||w[0]==="+")&&d.parentNode?d.parentNode:d,v),j=n.expr?m.filter(n.expr,n.set):n.set,w.length>0?k=s(j):u=!1;while(w.length)q=w.pop(),r=q,o.relative[q]?r=w.pop():q="",r==null&&(r=d),o.relative[q](k,r,v)}else k=w=[]}k||(k=j),k||m.error(q||b);if(g.call(k)==="[object Array]")if(!u)e.push.apply(e,k);else if(d&&d.nodeType===1)for(t=0;k[t]!=null;t++)k[t]&&(k[t]===!0||k[t].nodeType===1&&m.contains(d,k[t]))&&e.push(j[t]);else for(t=0;k[t]!=null;t++)k[t]&&k[t].nodeType===1&&e.push(j[t]);else s(k,e);l&&(m(l,h,e,f),m.uniqueSort(e));return e};m.uniqueSort=function(a){if(u){h=i,a.sort(u);if(h)for(var b=1;b<a.length;b++)a[b]===a[b-1]&&a.splice(b--,1)}return a},m.matches=function(a,b){return m(a,null,null,b)},m.matchesSelector=function(a,b){return m(b,null,null,[a]).length>0},m.find=function(a,b,c){var d,e,f,g,h,i;if(!a)return[];for(e=0,f=o.order.length;e<f;e++){h=o.order[e];if(g=o.leftMatch[h].exec(a)){i=g[1],g.splice(1,1);if(i.substr(i.length-1)!=="\\"){g[1]=(g[1]||"").replace(j,""),d=o.find[h](g,b,c);if(d!=null){a=a.replace(o.match[h],"");break}}}}d||(d=typeof b.getElementsByTagName!="undefined"?b.getElementsByTagName("*"):[]);return{set:d,expr:a}},m.filter=function(a,c,d,e){var f,g,h,i,j,k,l,n,p,q=a,r=[],s=c,t=c&&c[0]&&m.isXML(c[0]);while(a&&c.length){for(h in o.filter)if((f=o.leftMatch[h].exec(a))!=null&&f[2]){k=o.filter[h],l=f[1],g=!1,f.splice(1,1);if(l.substr(l.length-1)==="\\")continue;s===r&&(r=[]);if(o.preFilter[h]){f=o.preFilter[h](f,s,d,r,e,t);if(!f)g=i=!0;else if(f===!0)continue}if(f)for(n=0;(j=s[n])!=null;n++)j&&(i=k(j,f,n,s),p=e^i,d&&i!=null?p?g=!0:s[n]=!1:p&&(r.push(j),g=!0));if(i!==b){d||(s=r),a=a.replace(o.match[h],"");if(!g)return[];break}}if(a===q)if(g==null)m.error(a);else break;q=a}return s},m.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)};var n=m.getText=function(a){var b,c,d=a.nodeType,e="";if(d){if(d===1||d===9){if(typeof a.textContent=="string")return a.textContent;if(typeof a.innerText=="string")return a.innerText.replace(k,"");for(a=a.firstChild;a;a=a.nextSibling)e+=n(a)}else if(d===3||d===4)return a.nodeValue}else for(b=0;c=a[b];b++)c.nodeType!==8&&(e+=n(c));return e},o=m.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(a){return a.getAttribute("href")},type:function(a){return a.getAttribute("type")}},relative:{"+":function(a,b){var c=typeof b=="string",d=c&&!l.test(b),e=c&&!d;d&&(b=b.toLowerCase());for(var f=0,g=a.length,h;f<g;f++)if(h=a[f]){while((h=h.previousSibling)&&h.nodeType!==1);a[f]=e||h&&h.nodeName.toLowerCase()===b?h||!1:h===b}e&&m.filter(b,a,!0)},">":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!l.test(b)){b=b.toLowerCase();for(;e<f;e++){c=a[e];if(c){var g=c.parentNode;a[e]=g.nodeName.toLowerCase()===b?g:!1}}}else{for(;e<f;e++)c=a[e],c&&(a[e]=d?c.parentNode:c.parentNode===b);d&&m.filter(b,a,!0)}},"":function(a,b,c){var d,f=e++,g=x;typeof b=="string"&&!l.test(b)&&(b=b.toLowerCase(),d=b,g=w),g("parentNode",b,f,a,d,c)},"~":function(a,b,c){var d,f=e++,g=x;typeof b=="string"&&!l.test(b)&&(b=b.toLowerCase(),d=b,g=w),g("previousSibling",b,f,a,d,c)}},find:{ID:function(a,b,c){if(typeof b.getElementById!="undefined"&&!c){var d=b.getElementById(a[1]);return d&&d.parentNode?[d]:[]}},NAME:function(a,b){if(typeof b.getElementsByName!="undefined"){var c=[],d=b.getElementsByName(a[1]);for(var e=0,f=d.length;e<f;e++)d[e].getAttribute("name")===a[1]&&c.push(d[e]);return c.length===0?null:c}},TAG:function(a,b){if(typeof b.getElementsByTagName!="undefined")return b.getElementsByTagName(a[1])}},preFilter:{CLASS:function(a,b,c,d,e,f){a=" "+a[1].replace(j,"")+" ";if(f)return a;for(var g=0,h;(h=b[g])!=null;g++)h&&(e^(h.className&&(" "+h.className+" ").replace(/[\t\n\r]/g," ").indexOf(a)>=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(j,"")},TAG:function(a,b){return a[1].replace(j,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||m.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&m.error(a[0]);a[0]=e++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(j,"");!f&&o.attrMap[g]&&(a[1]=o.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(j,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=m(b[3],null,null,c);else{var g=m.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(o.match.POS.test(b[0])||o.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!m(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return b<c[3]-0},gt:function(a,b,c){return b>c[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=o.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||n([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h<i;h++)if(g[h]===a)return!1;return!0}m.error(e)},CHILD:function(a,b){var c,e,f,g,h,i,j,k=b[1],l=a;switch(k){case"only":case"first":while(l=l.previousSibling)if(l.nodeType===1)return!1;if(k==="first")return!0;l=a;case"last":while(l=l.nextSibling)if(l.nodeType===1)return!1;return!0;case"nth":c=b[2],e=b[3];if(c===1&&e===0)return!0;f=b[0],g=a.parentNode;if(g&&(g[d]!==f||!a.nodeIndex)){i=0;for(l=g.firstChild;l;l=l.nextSibling)l.nodeType===1&&(l.nodeIndex=++i);g[d]=f}j=a.nodeIndex-e;return c===0?j===0:j%c===0&&j/c>=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||!!a.nodeName&&a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=m.attr?m.attr(a,c):o.attrHandle[c]?o.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":!f&&m.attr?d!=null:f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=o.setFilters[e];if(f)return f(a,c,b,d)}}},p=o.match.POS,q=function(a,b){return"\\"+(b-0+1)};for(var r in o.match)o.match[r]=new RegExp(o.match[r].source+/(?![^\[]*\])(?![^\(]*\))/.source),o.leftMatch[r]=new RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[r].source.replace(/\\(\d+)/g,q));var s=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(t){s=function(a,b){var c=0,d=b||[];if(g.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var e=a.length;c<e;c++)d.push(a[c]);else for(;a[c];c++)d.push(a[c]);return d}}var u,v;c.documentElement.compareDocumentPosition?u=function(a,b){if(a===b){h=!0;return 0}if(!a.compareDocumentPosition||!b.compareDocumentPosition)return a.compareDocumentPosition?-1:1;return a.compareDocumentPosition(b)&4?-1:1}:(u=function(a,b){if(a===b){h=!0;return 0}if(a.sourceIndex&&b.sourceIndex)return a.sourceIndex-b.sourceIndex;var c,d,e=[],f=[],g=a.parentNode,i=b.parentNode,j=g;if(g===i)return v(a,b);if(!g)return-1;if(!i)return 1;while(j)e.unshift(j),j=j.parentNode;j=i;while(j)f.unshift(j),j=j.parentNode;c=e.length,d=f.length;for(var k=0;k<c&&k<d;k++)if(e[k]!==f[k])return v(e[k],f[k]);return k===c?v(a,f[k],-1):v(e[k],b,1)},v=function(a,b,c){if(a===b)return c;var d=a.nextSibling;while(d){if(d===b)return-1;d=d.nextSibling}return 1}),function(){var a=c.createElement("div"),d="script"+(new Date).getTime(),e=c.documentElement;a.innerHTML="<a name='"+d+"'/>",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(o.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},o.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(o.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="<a href='#'></a>",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(o.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=m,b=c.createElement("div"),d="__sizzle__";b.innerHTML="<p class='TEST'></p>";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){m=function(b,e,f,g){e=e||c;if(!g&&!m.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return s(e.getElementsByTagName(b),f);if(h[2]&&o.find.CLASS&&e.getElementsByClassName)return s(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return s([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return s([],f);if(i.id===h[3])return s([i],f)}try{return s(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var k=e,l=e.getAttribute("id"),n=l||d,p=e.parentNode,q=/^\s*[+~]/.test(b);l?n=n.replace(/'/g,"\\$&"):e.setAttribute("id",n),q&&p&&(e=e.parentNode);try{if(!q||p)return s(e.querySelectorAll("[id='"+n+"'] "+b),f)}catch(r){}finally{l||k.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)m[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}m.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!m.isXML(a))try{if(e||!o.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return m(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="<div class='test e'></div><div class='test'></div>";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;o.order.splice(1,0,"CLASS"),o.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?m.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?m.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:m.contains=function(){return!1},m.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var y=function(a,b,c){var d,e=[],f="",g=b.nodeType?[b]:b;while(d=o.match.PSEUDO.exec(a))f+=d[0],a=a.replace(o.match.PSEUDO,"");a=o.relative[a]?a+"*":a;for(var h=0,i=g.length;h<i;h++)m(a,g[h],e,c);return m.filter(f,e)};m.attr=f.attr,m.selectors.attrMap={},f.find=m,f.expr=m.selectors,f.expr[":"]=f.expr.filters,f.unique=m.uniqueSort,f.text=m.getText,f.isXMLDoc=m.isXML,f.contains=m.contains}();var L=/Until$/,M=/^(?:parents|prevUntil|prevAll)/,N=/,/,O=/^.[^:#\[\.,]*$/,P=Array.prototype.slice,Q=f.expr.match.POS,R={children:!0,contents:!0,next:!0,prev:!0};f.fn.extend({find:function(a){var b=this,c,d;if(typeof a!="string")return f(a).filter(function(){for(c=0,d=b.length;c<d;c++)if(f.contains(b[c],this))return!0});var e=this.pushStack("","find",a),g,h,i;for(c=0,d=this.length;c<d;c++){g=e.length,f.find(a,this[c],e);if(c>0)for(h=g;h<e.length;h++)for(i=0;i<g;i++)if(e[i]===e[h]){e.splice(h--,1);break}}return e},has:function(a){var b=f(a);return this.filter(function(){for(var a=0,c=b.length;a<c;a++)if(f.contains(this,b[a]))return!0})},not:function(a){return this.pushStack(T(this,a,!1),"not",a)},filter:function(a){return this.pushStack(T(this,a,!0),"filter",a)},is:function(a){return!!a&&(typeof a=="string"?Q.test(a)?f(a,this.context).index(this[0])>=0:f.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h=1;while(g&&g.ownerDocument&&g!==b){for(d=0;d<a.length;d++)f(g).is(a[d])&&c.push({selector:a[d],elem:g,level:h});g=g.parentNode,h++}return c}var i=Q.test(a)||typeof a!="string"?f(a,b||this.context):0;for(d=0,e=this.length;d<e;d++){g=this[d];while(g){if(i?i.index(g)>-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a)return this[0]&&this[0].parentNode?this.prevAll().length:-1;if(typeof a=="string")return f.inArray(this[0],f(a));return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(S(c[0])||S(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling(a.parentNode.firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c);L.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!R[a]?f.unique(e):e,(this.length>1||N.test(d))&&M.test(a)&&(e=e.reverse());return this.pushStack(e,a,P.call(arguments).join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var V="abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",W=/ jQuery\d+="(?:\d+|null)"/g,X=/^\s+/,Y=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Z=/<([\w:]+)/,$=/<tbody/i,_=/<|&#?\w+;/,ba=/<(?:script|style)/i,bb=/<(?:script|object|embed|option|style)/i,bc=new RegExp("<(?:"+V+")","i"),bd=/checked\s*(?:[^=]|=\s*.checked.)/i,be=/\/(java|ecma)script/i,bf=/^\s*<!(?:\[CDATA\[|\-\-)/,bg={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]},bh=U(c);bg.optgroup=bg.option,bg.tbody=bg.tfoot=bg.colgroup=bg.caption=bg.thead,bg.th=bg.td,f.support.htmlSerialize||(bg._default=[1,"div<div>","</div>"]),f.fn.extend({text:function(a){if(f.isFunction(a))return this.each(function(b){var c=f(this);c.text(a.call(this,b,c.text()))});if(typeof a!="object"&&a!==b)return this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a));return f.text(this)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=f.isFunction(a);return this.each(function(c){f(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f.clean(arguments);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f.clean(arguments));return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function()
+{for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(W,""):null;if(typeof a=="string"&&!ba.test(a)&&(f.support.leadingWhitespace||!X.test(a))&&!bg[(Z.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Y,"<$1></$2>");try{for(var c=0,d=this.length;c<d;c++)this[c].nodeType===1&&(f.cleanData(this[c].getElementsByTagName("*")),this[c].innerHTML=a)}catch(e){this.empty().append(a)}}else f.isFunction(a)?this.each(function(b){var c=f(this);c.html(a.call(this,b,c.html()))}):this.empty().append(a);return this},replaceWith:function(a){if(this[0]&&this[0].parentNode){if(f.isFunction(a))return this.each(function(b){var c=f(this),d=c.html();c.replaceWith(a.call(this,b,d))});typeof a!="string"&&(a=f(a).detach());return this.each(function(){var b=this.nextSibling,c=this.parentNode;f(this).remove(),b?f(b).before(a):f(c).append(a)})}return this.length?this.pushStack(f(f.isFunction(a)?a():a),"replaceWith",a):this},detach:function(a){return this.remove(a,!0)},domManip:function(a,c,d){var e,g,h,i,j=a[0],k=[];if(!f.support.checkClone&&arguments.length===3&&typeof j=="string"&&bd.test(j))return this.each(function(){f(this).domManip(a,c,d,!0)});if(f.isFunction(j))return this.each(function(e){var g=f(this);a[0]=j.call(this,e,c?g.html():b),g.domManip(a,c,d)});if(this[0]){i=j&&j.parentNode,f.support.parentNode&&i&&i.nodeType===11&&i.childNodes.length===this.length?e={fragment:i}:e=f.buildFragment(a,this,k),h=e.fragment,h.childNodes.length===1?g=h=h.firstChild:g=h.firstChild;if(g){c=c&&f.nodeName(g,"tr");for(var l=0,m=this.length,n=m-1;l<m;l++)d.call(c?bi(this[l],g):this[l],e.cacheable||m>1&&l<n?f.clone(h,!0,!0):h)}k.length&&f.each(k,bp)}return this}}),f.buildFragment=function(a,b,d){var e,g,h,i,j=a[0];b&&b[0]&&(i=b[0].ownerDocument||b[0]),i.createDocumentFragment||(i=c),a.length===1&&typeof j=="string"&&j.length<512&&i===c&&j.charAt(0)==="<"&&!bb.test(j)&&(f.support.checkClone||!bd.test(j))&&(f.support.html5Clone||!bc.test(j))&&(g=!0,h=f.fragments[j],h&&h!==1&&(e=h)),e||(e=i.createDocumentFragment(),f.clean(a,i,e,d)),g&&(f.fragments[j]=h?e:1);return{fragment:e,cacheable:g}},f.fragments={},f.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){f.fn[a]=function(c){var d=[],e=f(c),g=this.length===1&&this[0].parentNode;if(g&&g.nodeType===11&&g.childNodes.length===1&&e.length===1){e[b](this[0]);return this}for(var h=0,i=e.length;h<i;h++){var j=(h>0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d,e,g,h=f.support.html5Clone||!bc.test("<"+a.nodeName)?a.cloneNode(!0):bo(a);if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bk(a,h),d=bl(a),e=bl(h);for(g=0;d[g];++g)e[g]&&bk(d[g],e[g])}if(b){bj(a,h);if(c){d=bl(a),e=bl(h);for(g=0;d[g];++g)bj(d[g],e[g])}}d=e=null;return h},clean:function(a,b,d,e){var g;b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);var h=[],i;for(var j=0,k;(k=a[j])!=null;j++){typeof k=="number"&&(k+="");if(!k)continue;if(typeof k=="string")if(!_.test(k))k=b.createTextNode(k);else{k=k.replace(Y,"<$1></$2>");var l=(Z.exec(k)||["",""])[1].toLowerCase(),m=bg[l]||bg._default,n=m[0],o=b.createElement("div");b===c?bh.appendChild(o):U(b).appendChild(o),o.innerHTML=m[1]+k+m[2];while(n--)o=o.lastChild;if(!f.support.tbody){var p=$.test(k),q=l==="table"&&!p?o.firstChild&&o.firstChild.childNodes:m[1]==="<table>"&&!p?o.childNodes:[];for(i=q.length-1;i>=0;--i)f.nodeName(q[i],"tbody")&&!q[i].childNodes.length&&q[i].parentNode.removeChild(q[i])}!f.support.leadingWhitespace&&X.test(k)&&o.insertBefore(b.createTextNode(X.exec(k)[0]),o.firstChild),k=o.childNodes}var r;if(!f.support.appendChecked)if(k[0]&&typeof (r=k.length)=="number")for(i=0;i<r;i++)bn(k[i]);else bn(k);k.nodeType?h.push(k):h=f.merge(h,k)}if(d){g=function(a){return!a.type||be.test(a.type)};for(j=0;h[j];j++)if(e&&f.nodeName(h[j],"script")&&(!h[j].type||h[j].type.toLowerCase()==="text/javascript"))e.push(h[j].parentNode?h[j].parentNode.removeChild(h[j]):h[j]);else{if(h[j].nodeType===1){var s=f.grep(h[j].getElementsByTagName("script"),g);h.splice.apply(h,[j+1,0].concat(s))}d.appendChild(h[j])}}return h},cleanData:function(a){var b,c,d=f.cache,e=f.event.special,g=f.support.deleteExpando;for(var h=0,i;(i=a[h])!=null;h++){if(i.nodeName&&f.noData[i.nodeName.toLowerCase()])continue;c=i[f.expando];if(c){b=d[c];if(b&&b.events){for(var j in b.events)e[j]?f.event.remove(i,j):f.removeEvent(i,j,b.handle);b.handle&&(b.handle.elem=null)}g?delete i[f.expando]:i.removeAttribute&&i.removeAttribute(f.expando),delete d[c]}}}});var bq=/alpha\([^)]*\)/i,br=/opacity=([^)]*)/,bs=/([A-Z]|^ms)/g,bt=/^-?\d+(?:px)?$/i,bu=/^-?\d/,bv=/^([\-+])=([\-+.\de]+)/,bw={position:"absolute",visibility:"hidden",display:"block"},bx=["Left","Right"],by=["Top","Bottom"],bz,bA,bB;f.fn.css=function(a,c){if(arguments.length===2&&c===b)return this;return f.access(this,a,c,!0,function(a,c,d){return d!==b?f.style(a,c,d):f.css(a,c)})},f.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=bz(a,"opacity","opacity");return c===""?"1":c}return a.style.opacity}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":f.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(!!a&&a.nodeType!==3&&a.nodeType!==8&&!!a.style){var g,h,i=f.camelCase(c),j=a.style,k=f.cssHooks[i];c=f.cssProps[i]||i;if(d===b){if(k&&"get"in k&&(g=k.get(a,!1,e))!==b)return g;return j[c]}h=typeof d,h==="string"&&(g=bv.exec(d))&&(d=+(g[1]+1)*+g[2]+parseFloat(f.css(a,c)),h="number");if(d==null||h==="number"&&isNaN(d))return;h==="number"&&!f.cssNumber[i]&&(d+="px");if(!k||!("set"in k)||(d=k.set(a,d))!==b)try{j[c]=d}catch(l){}}},css:function(a,c,d){var e,g;c=f.camelCase(c),g=f.cssHooks[c],c=f.cssProps[c]||c,c==="cssFloat"&&(c="float");if(g&&"get"in g&&(e=g.get(a,!0,d))!==b)return e;if(bz)return bz(a,c)},swap:function(a,b,c){var d={};for(var e in b)d[e]=a.style[e],a.style[e]=b[e];c.call(a);for(e in b)a.style[e]=d[e]}}),f.curCSS=f.css,f.each(["height","width"],function(a,b){f.cssHooks[b]={get:function(a,c,d){var e;if(c){if(a.offsetWidth!==0)return bC(a,b,d);f.swap(a,bw,function(){e=bC(a,b,d)});return e}},set:function(a,b){if(!bt.test(b))return b;b=parseFloat(b);if(b>=0)return b+"px"}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return br.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=f.isNumeric(b)?"alpha(opacity="+b*100+")":"",g=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&f.trim(g.replace(bq,""))===""){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bq.test(g)?g.replace(bq,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){var c;f.swap(a,{display:"inline-block"},function(){b?c=bz(a,"margin-right","marginRight"):c=a.style.marginRight});return c}})}),c.defaultView&&c.defaultView.getComputedStyle&&(bA=function(a,b){var c,d,e;b=b.replace(bs,"-$1").toLowerCase(),(d=a.ownerDocument.defaultView)&&(e=d.getComputedStyle(a,null))&&(c=e.getPropertyValue(b),c===""&&!f.contains(a.ownerDocument.documentElement,a)&&(c=f.style(a,b)));return c}),c.documentElement.currentStyle&&(bB=function(a,b){var c,d,e,f=a.currentStyle&&a.currentStyle[b],g=a.style;f===null&&g&&(e=g[b])&&(f=e),!bt.test(f)&&bu.test(f)&&(c=g.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),g.left=b==="fontSize"?"1em":f||0,f=g.pixelLeft+"px",g.left=c,d&&(a.runtimeStyle.left=d));return f===""?"auto":f}),bz=bA||bB,f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style&&a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)});var bD=/%20/g,bE=/\[\]$/,bF=/\r?\n/g,bG=/#.*$/,bH=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bI=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bJ=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bK=/^(?:GET|HEAD)$/,bL=/^\/\//,bM=/\?/,bN=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,bO=/^(?:select|textarea)/i,bP=/\s+/,bQ=/([?&])_=[^&]*/,bR=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bS=f.fn.load,bT={},bU={},bV,bW,bX=["*/"]+["*"];try{bV=e.href}catch(bY){bV=c.createElement("a"),bV.href="",bV=bV.href}bW=bR.exec(bV.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bS)return bS.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("<div>").append(c.replace(bN,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bO.test(this.nodeName)||bI.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bF,"\r\n")}}):{name:b.name,value:c.replace(bF,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.on(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?b_(a,f.ajaxSettings):(b=a,a=f.ajaxSettings),b_(a,b);return a},ajaxSettings:{url:bV,isLocal:bJ.test(bW[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":bX},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:bZ(bT),ajaxTransport:bZ(bU),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a>0?4:0;var o,r,u,w=c,x=l?cb(d,v,l):b,y,z;if(a>=200&&a<300||a===304){if(d.ifModified){if(y=v.getResponseHeader("Last-Modified"))f.lastModified[k]=y;if(z=v.getResponseHeader("Etag"))f.etag[k]=z}if(a===304)w="notmodified",o=!0;else try{r=cc(d,x),w="success",o=!0}catch(A){w="parsererror",u=A}}else{u=w;if(!w||a)w="error",a<0&&(a=0)}v.status=a,v.statusText=""+(c||w),o?h.resolveWith(e,[r,w,v]):h.rejectWith(e,[v,w,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.fireWith(e,[v,w]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f.Callbacks("once memory"),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bH.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.add,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bG,"").replace(bL,bW[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bP),d.crossDomain==null&&(r=bR.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bW[1]&&r[2]==bW[2]&&(r[3]||(r[1]==="http:"?80:443))==(bW[3]||(bW[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),b$(bT,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bK.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bM.test(d.url)?"&":"?")+d.data,delete d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bQ,"$1_="+x);d.url=y+(y===d.url?(bM.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", "+bX+"; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=b$(bU,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){if(s<2)w(-1,z);else throw z}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)ca(g,a[g],c,e);return d.join("&").replace(bD,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var cd=f.now(),ce=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+cd++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=b.contentType==="application/x-www-form-urlencoded"&&typeof b.data=="string";if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(ce.test(b.url)||e&&ce.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.jsonp!==!1&&(j=j.replace(ce,l),b.url===j&&(e&&(k=k.replace(ce,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var cf=a.ActiveXObject?function(){for(var a in ch)ch[a](0,1)}:!1,cg=0,ch;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ci()||cj()}:ci,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,cf&&delete ch[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n),m.text=h.responseText;try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++cg,cf&&(ch||(ch={},f(a).unload(cf)),ch[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var ck={},cl,cm,cn=/^(?:toggle|show|hide)$/,co=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,cp,cq=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cr;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(cu("show",3),a,b,c);for(var g=0,h=this.length;g<h;g++)d=this[g],d.style&&(e=d.style.display,!f._data(d,"olddisplay")&&e==="none"&&(e=d.style.display=""),e===""&&f.css(d,"display")==="none"&&f._data(d,"olddisplay",cv(d.nodeName)));for(g=0;g<h;g++){d=this[g];if(d.style){e=d.style.display;if(e===""||e==="none")d.style.display=f._data(d,"olddisplay")||""}}return this},hide:function(a,b,c){if(a||a===0)return this.animate(cu("hide",3),a,b,c);var d,e,g=0,h=this.length;for(;g<h;g++)d=this[g],d.style&&(e=f.css(d,"display"),e!=="none"&&!f._data(d,"olddisplay")&&f._data(d,"olddisplay",e));for(g=0;g<h;g++)this[g].style&&(this[g].style.display="none");return this},_toggle:f.fn.toggle,toggle:function(a,b,c){var d=typeof a=="boolean";f.isFunction(a)&&f.isFunction(b)?this._toggle.apply(this,arguments):a==null||d?this.each(function(){var b=d?a:f(this).is(":hidden");f(this)[b?"show":"hide"]()}):this.animate(cu("toggle",3),a,b,c);return this},fadeTo:function(a,b,c,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){function g(){e.queue===!1&&f._mark(this);var b=f.extend({},e),c=this.nodeType===1,d=c&&f(this).is(":hidden"),g,h,i,j,k,l,m,n,o;b.animatedProperties={};for(i in a){g=f.camelCase(i),i!==g&&(a[g]=a[i],delete a[i]),h=a[g],f.isArray(h)?(b.animatedProperties[g]=h[1],h=a[g]=h[0]):b.animatedProperties[g]=b.specialEasing&&b.specialEasing[g]||b.easing||"swing";if(h==="hide"&&d||h==="show"&&!d)return b.complete.call(this);c&&(g==="height"||g==="width")&&(b.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY],f.css(this,"display")==="inline"&&f.css(this,"float")==="none"&&(!f.support.inlineBlockNeedsLayout||cv(this.nodeName)==="inline"?this.style.display="inline-block":this.style.zoom=1))}b.overflow!=null&&(this.style.overflow="hidden");for(i in a)j=new f.fx(this,b,i),h=a[i],cn.test(h)?(o=f._data(this,"toggle"+i)||(h==="toggle"?d?"show":"hide":0),o?(f._data(this,"toggle"+i,o==="show"?"hide":"show"),j[o]()):j[h]()):(k=co.exec(h),l=j.cur(),k?(m=parseFloat(k[2]),n=k[3]||(f.cssNumber[i]?"":"px"),n!=="px"&&(f.style(this,i,(m||1)+n),l=(m||1)/j.cur()*l,f.style(this,i,l+n)),k[1]&&(m=(k[1]==="-="?-1:1)*m+l),j.custom(l,m,n)):j.custom(l,h,""));return!0}var e=f.speed(b,c,d);if(f.isEmptyObject(a))return this.each(e.complete,[!1]);a=f.extend({},a);return e.queue===!1?this.each(g):this.queue(e.queue,g)},stop:function(a,c,d){typeof a!="string"&&(d=c,c=a,a=b),c&&a!==!1&&this.queue(a||"fx",[]);return this.each(function(){function h(a,b,c){var e=b[c];f.removeData(a,c,!0),e.stop(d)}var b,c=!1,e=f.timers,g=f._data(this);d||f._unmark(!0,this);if(a==null)for(b in g)g[b]&&g[b].stop&&b.indexOf(".run")===b.length-4&&h(this,g,b);else g[b=a+".run"]&&g[b].stop&&h(this,g,b);for(b=e.length;b--;)e[b].elem===this&&(a==null||e[b].queue===a)&&(d?e[b](!0):e[b].saveState(),c=!0,e.splice(b,1));(!d||!c)&&f.dequeue(this,a)})}}),f.each({slideDown:cu("show",1),slideUp:cu("hide",1),slideToggle:cu("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){f.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),f.extend({speed:function(a,b,c){var d=a&&typeof a=="object"?f.extend({},a):{complete:c||!c&&b||f.isFunction(a)&&a,duration:a,easing:c&&b||b&&!f.isFunction(b)&&b};d.duration=f.fx.off?0:typeof d.duration=="number"?d.duration:d.duration in f.fx.speeds?f.fx.speeds[d.duration]:f.fx.speeds._default;if(d.queue==null||d.queue===!0)d.queue="fx";d.old=d.complete,d.complete=function(a){f.isFunction(d.old)&&d.old.call(this),d.queue?f.dequeue(this,d.queue):a!==!1&&f._unmark(this)};return d},easing:{linear:function(a,b,c,d){return c+d*a},swing:function(a,b,c,d){return(-Math.cos(a*Math.PI)/2+.5)*d+c}},timers:[],fx:function(a,b,c){this.options=b,this.elem=a,this.prop=c,b.orig=b.orig||{}}}),f.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this),(f.fx.step[this.prop]||f.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];var a,b=f.css(this.elem,this.prop);return isNaN(a=parseFloat(b))?!b||b==="auto"?0:b:a},custom:function(a,c,d){function h(a){return e.step(a)}var e=this,g=f.fx;this.startTime=cr||cs(),this.end=c,this.now=this.start=a,this.pos=this.state=0,this.unit=d||this.unit||(f.cssNumber[this.prop]?"":"px"),h.queue=this.options.queue,h.elem=this.elem,h.saveState=function(){e.options.hide&&f._data(e.elem,"fxshow"+e.prop)===b&&f._data(e.elem,"fxshow"+e.prop,e.start)},h()&&f.timers.push(h)&&!cp&&(cp=setInterval(g.tick,g.interval))},show:function(){var a=f._data(this.elem,"fxshow"+this.prop);this.options.orig[this.prop]=a||f.style(this.elem,this.prop),this.options.show=!0,a!==b?this.custom(this.cur(),a):this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur()),f(this.elem).show()},hide:function(){this.options.orig[this.prop]=f._data(this.elem,"fxshow"+this.prop)||f.style(this.elem,this.prop),this.options.hide=!0,this.custom(this.cur(),0)},step:function(a){var b,c,d,e=cr||cs(),g=!0,h=this.elem,i=this.options;if(a||e>=i.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),i.animatedProperties[this.prop]=!0;for(b in i.animatedProperties)i.animatedProperties[b]!==!0&&(g=!1);if(g){i.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){h.style["overflow"+b]=i.overflow[a]}),i.hide&&f(h).hide();if(i.hide||i.show)for(b in i.animatedProperties)f.style(h,b,i.orig[b]),f.removeData(h,"fxshow"+b,!0),f.removeData(h,"toggle"+b,!0);d=i.complete,d&&(i.complete=!1,d.call(h))}return!1}i.duration==Infinity?this.now=e:(c=e-this.startTime,this.state=c/i.duration,this.pos=f.easing[i.animatedProperties[this.prop]](this.state,c,0,1,i.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){var a,b=f.timers,c=0;for(;c<b.length;c++)a=b[c],!a()&&b[c]===a&&b.splice(c--,1);b.length||f.fx.stop()},interval:13,stop:function(){clearInterval(cp),cp=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){f.style(a.elem,"opacity",a.now)},_default:function(a){a.elem.style&&a.elem.style[a.prop]!=null?a.elem.style[a.prop]=a.now+a.unit:a.elem[a.prop]=a.now}}}),f.each(["width","height"],function(a,b){f.fx.step[b]=function(a){f.style(a.elem,b,Math.max(0,a.now)+a.unit)}}),f.expr&&f.expr.filters&&(f.expr.filters.animated=function(a){return f.grep(f.timers,function(b){return a===b.elem}).length});var cw=/^t(?:able|d|h)$/i,cx=/^(?:body|html)$/i;"getBoundingClientRect"in c.documentElement?f.fn.offset=function(a){var b=this[0],c;if(a)return this.each(function(b){f.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return f.offset.bodyOffset(b);try{c=b.getBoundingClientRect()}catch(d){}var e=b.ownerDocument,g=e.documentElement;if(!c||!f.contains(g,b))return c?{top:c.top,left:c.left}:{top:0,left:0};var h=e.body,i=cy(e),j=g.clientTop||h.clientTop||0,k=g.clientLeft||h.clientLeft||0,l=i.pageYOffset||f.support.boxModel&&g.scrollTop||h.scrollTop,m=i.pageXOffset||f.support.boxModel&&g.scrollLeft||h.scrollLeft,n=c.top+l-j,o=c.left+m-k;return{top:n,left:o}}:f.fn.offset=function(a){var b=this[0];if(a)return this.each(function(b){f.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return f.offset.bodyOffset(b);var c,d=b.offsetParent,e=b,g=b.ownerDocument,h=g.documentElement,i=g.body,j=g.defaultView,k=j?j.getComputedStyle(b,null):b.currentStyle,l=b.offsetTop,m=b.offsetLeft;while((b=b.parentNode)&&b!==i&&b!==h){if(f.support.fixedPosition&&k.position==="fixed")break;c=j?j.getComputedStyle(b,null):b.currentStyle,l-=b.scrollTop,m-=b.scrollLeft,b===d&&(l+=b.offsetTop,m+=b.offsetLeft,f.support.doesNotAddBorder&&(!f.support.doesAddBorderForTableAndCells||!cw.test(b.nodeName))&&(l+=parseFloat(c.borderTopWidth)||0,m+=parseFloat(c.borderLeftWidth)||0),e=d,d=b.offsetParent),f.support.subtractsBorderForOverflowNotVisible&&c.overflow!=="visible"&&(l+=parseFloat(c.borderTopWidth)||0,m+=parseFloat(c.borderLeftWidth)||0),k=c}if(k.position==="relative"||k.position==="static")l+=i.offsetTop,m+=i.offsetLeft;f.support.fixedPosition&&k.position==="fixed"&&(l+=Math.max(h.scrollTop,i.scrollTop),m+=Math.max(h.scrollLeft,i.scrollLeft));return{top:l,left:m}},f.offset={bodyOffset:function(a){var b=a.offsetTop,c=a.offsetLeft;f.support.doesNotIncludeMarginInBodyOffset&&(b+=parseFloat(f.css(a,"marginTop"))||0,c+=parseFloat(f.css(a,"marginLeft"))||0);return{top:b,left:c}},setOffset:function(a,b,c){var d=f.css(a,"position");d==="static"&&(a.style.position="relative");var e=f(a),g=e.offset(),h=f.css(a,"top"),i=f.css(a,"left"),j=(d==="absolute"||d==="fixed")&&f.inArray("auto",[h,i])>-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=cx.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!cx.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each(["Left","Top"],function(a,c){var d="scroll"+c;f.fn[d]=function(c){var e,g;if(c===b){e=this[0];if(!e)return null;g=cy(e);return g?"pageXOffset"in g?g[a?"pageYOffset":"pageXOffset"]:f.support.boxModel&&g.document.documentElement[d]||g.document.body[d]:e[d]}return this.each(function(){g=cy(this),g?g.scrollTo(a?f(g).scrollLeft():c,a?c:f(g).scrollTop()):this[d]=c})}}),f.each(["Height","Width"],function(a,c){var d=c.toLowerCase();f.fn["inner"+c]=function(){var a=this[0];return a?a.style?parseFloat(f.css(a,d,"padding")):this[d]():null},f.fn["outer"+c]=function(a){var b=this[0];return b?b.style?parseFloat(f.css(b,d,a?"margin":"border")):this[d]():null},f.fn[d]=function(a){var e=this[0];if(!e)return a==null?null:this;if(f.isFunction(a))return this.each(function(b){var c=f(this);c[d](a.call(this,b,c[d]()))});if(f.isWindow(e)){var g=e.document.documentElement["client"+c],h=e.document.body;return e.document.compatMode==="CSS1Compat"&&g||h&&h["client"+c]||g}if(e.nodeType===9)return Math.max(e.documentElement["client"+c],e.body["scroll"+c],e.documentElement["scroll"+c],e.body["offset"+c],e.documentElement["offset"+c]);if(a===b){var i=f.css(e,d),j=parseFloat(i);return f.isNumeric(j)?j:i}return this.css(d,typeof a=="string"?a:a+"px")}}),a.jQuery=a.$=f,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return f})})(window);
\ No newline at end of file
diff --git a/src/site/resources/js/prettify.js b/src/site/resources/js/prettify.js
new file mode 100644
index 0000000..037c26d
--- /dev/null
+++ b/src/site/resources/js/prettify.js
@@ -0,0 +1,1477 @@
+// Copyright (C) 2006 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+
+/**
+ * @fileoverview
+ * some functions for browser-side pretty printing of code contained in html.
+ *
+ * <p>
+ * For a fairly comprehensive set of languages see the
+ * <a href="http://google-code-prettify.googlecode.com/svn/trunk/README.html#langs">README</a>
+ * file that came with this source.  At a minimum, the lexer should work on a
+ * number of languages including C and friends, Java, Python, Bash, SQL, HTML,
+ * XML, CSS, Javascript, and Makefiles.  It works passably on Ruby, PHP and Awk
+ * and a subset of Perl, but, because of commenting conventions, doesn't work on
+ * Smalltalk, Lisp-like, or CAML-like languages without an explicit lang class.
+ * <p>
+ * Usage: <ol>
+ * <li> include this source file in an html page via
+ *   {@code <script type="text/javascript" src="/path/to/prettify.js"></script>}
+ * <li> define style rules.  See the example page for examples.
+ * <li> mark the {@code <pre>} and {@code <code>} tags in your source with
+ *    {@code class=prettyprint.}
+ *    You can also use the (html deprecated) {@code <xmp>} tag, but the pretty
+ *    printer needs to do more substantial DOM manipulations to support that, so
+ *    some css styles may not be preserved.
+ * </ol>
+ * That's it.  I wanted to keep the API as simple as possible, so there's no
+ * need to specify which language the code is in, but if you wish, you can add
+ * another class to the {@code <pre>} or {@code <code>} element to specify the
+ * language, as in {@code <pre class="prettyprint lang-java">}.  Any class that
+ * starts with "lang-" followed by a file extension, specifies the file type.
+ * See the "lang-*.js" files in this directory for code that implements
+ * per-language file handlers.
+ * <p>
+ * Change log:<br>
+ * cbeust, 2006/08/22
+ * <blockquote>
+ *   Java annotations (start with "@") are now captured as literals ("lit")
+ * </blockquote>
+ * @requires console
+ */
+
+// JSLint declarations
+/*global console, document, navigator, setTimeout, window */
+
+/**
+ * Split {@code prettyPrint} into multiple timeouts so as not to interfere with
+ * UI events.
+ * If set to {@code false}, {@code prettyPrint()} is synchronous.
+ */
+window['PR_SHOULD_USE_CONTINUATION'] = true;
+
+(function () {
+  // Keyword lists for various languages.
+  // We use things that coerce to strings to make them compact when minified
+  // and to defeat aggressive optimizers that fold large string constants.
+  var FLOW_CONTROL_KEYWORDS = ["break,continue,do,else,for,if,return,while"];
+  var C_KEYWORDS = [FLOW_CONTROL_KEYWORDS,"auto,case,char,const,default," + 
+      "double,enum,extern,float,goto,int,long,register,short,signed,sizeof," +
+      "static,struct,switch,typedef,union,unsigned,void,volatile"];
+  var COMMON_KEYWORDS = [C_KEYWORDS,"catch,class,delete,false,import," +
+      "new,operator,private,protected,public,this,throw,true,try,typeof"];
+  var CPP_KEYWORDS = [COMMON_KEYWORDS,"alignof,align_union,asm,axiom,bool," +
+      "concept,concept_map,const_cast,constexpr,decltype," +
+      "dynamic_cast,explicit,export,friend,inline,late_check," +
+      "mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast," +
+      "template,typeid,typename,using,virtual,where"];
+  var JAVA_KEYWORDS = [COMMON_KEYWORDS,
+      "abstract,boolean,byte,extends,final,finally,implements,import," +
+      "instanceof,null,native,package,strictfp,super,synchronized,throws," +
+      "transient"];
+  var CSHARP_KEYWORDS = [JAVA_KEYWORDS,
+      "as,base,by,checked,decimal,delegate,descending,dynamic,event," +
+      "fixed,foreach,from,group,implicit,in,interface,internal,into,is,lock," +
+      "object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed," +
+      "stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var"];
+  var COFFEE_KEYWORDS = "all,and,by,catch,class,else,extends,false,finally," +
+      "for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then," +
+      "true,try,unless,until,when,while,yes";
+  var JSCRIPT_KEYWORDS = [COMMON_KEYWORDS,
+      "debugger,eval,export,function,get,null,set,undefined,var,with," +
+      "Infinity,NaN"];
+  var PERL_KEYWORDS = "caller,delete,die,do,dump,elsif,eval,exit,foreach,for," +
+      "goto,if,import,last,local,my,next,no,our,print,package,redo,require," +
+      "sub,undef,unless,until,use,wantarray,while,BEGIN,END";
+  var PYTHON_KEYWORDS = [FLOW_CONTROL_KEYWORDS, "and,as,assert,class,def,del," +
+      "elif,except,exec,finally,from,global,import,in,is,lambda," +
+      "nonlocal,not,or,pass,print,raise,try,with,yield," +
+      "False,True,None"];
+  var RUBY_KEYWORDS = [FLOW_CONTROL_KEYWORDS, "alias,and,begin,case,class," +
+      "def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo," +
+      "rescue,retry,self,super,then,true,undef,unless,until,when,yield," +
+      "BEGIN,END"];
+  var SH_KEYWORDS = [FLOW_CONTROL_KEYWORDS, "case,done,elif,esac,eval,fi," +
+      "function,in,local,set,then,until"];
+  var ALL_KEYWORDS = [
+      CPP_KEYWORDS, CSHARP_KEYWORDS, JSCRIPT_KEYWORDS, PERL_KEYWORDS +
+      PYTHON_KEYWORDS, RUBY_KEYWORDS, SH_KEYWORDS];
+  var C_TYPES = /^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/;
+
+  // token style names.  correspond to css classes
+  /**
+   * token style for a string literal
+   * @const
+   */
+  var PR_STRING = 'str';
+  /**
+   * token style for a keyword
+   * @const
+   */
+  var PR_KEYWORD = 'kwd';
+  /**
+   * token style for a comment
+   * @const
+   */
+  var PR_COMMENT = 'com';
+  /**
+   * token style for a type
+   * @const
+   */
+  var PR_TYPE = 'typ';
+  /**
+   * token style for a literal value.  e.g. 1, null, true.
+   * @const
+   */
+  var PR_LITERAL = 'lit';
+  /**
+   * token style for a punctuation string.
+   * @const
+   */
+  var PR_PUNCTUATION = 'pun';
+  /**
+   * token style for a punctuation string.
+   * @const
+   */
+  var PR_PLAIN = 'pln';
+
+  /**
+   * token style for an sgml tag.
+   * @const
+   */
+  var PR_TAG = 'tag';
+  /**
+   * token style for a markup declaration such as a DOCTYPE.
+   * @const
+   */
+  var PR_DECLARATION = 'dec';
+  /**
+   * token style for embedded source.
+   * @const
+   */
+  var PR_SOURCE = 'src';
+  /**
+   * token style for an sgml attribute name.
+   * @const
+   */
+  var PR_ATTRIB_NAME = 'atn';
+  /**
+   * token style for an sgml attribute value.
+   * @const
+   */
+  var PR_ATTRIB_VALUE = 'atv';
+
+  /**
+   * A class that indicates a section of markup that is not code, e.g. to allow
+   * embedding of line numbers within code listings.
+   * @const
+   */
+  var PR_NOCODE = 'nocode';
+
+
+
+/**
+ * A set of tokens that can precede a regular expression literal in
+ * javascript
+ * http://web.archive.org/web/20070717142515/http://www.mozilla.org/js/language/js20/rationale/syntax.html
+ * has the full list, but I've removed ones that might be problematic when
+ * seen in languages that don't support regular expression literals.
+ *
+ * <p>Specifically, I've removed any keywords that can't precede a regexp
+ * literal in a syntactically legal javascript program, and I've removed the
+ * "in" keyword since it's not a keyword in many languages, and might be used
+ * as a count of inches.
+ *
+ * <p>The link a above does not accurately describe EcmaScript rules since
+ * it fails to distinguish between (a=++/b/i) and (a++/b/i) but it works
+ * very well in practice.
+ *
+ * @private
+ * @const
+ */
+var REGEXP_PRECEDER_PATTERN = '(?:^^\\.?|[+-]|\\!|\\!=|\\!==|\\#|\\%|\\%=|&|&&|&&=|&=|\\(|\\*|\\*=|\\+=|\\,|\\-=|\\->|\\/|\\/=|:|::|\\;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|\\?|\\@|\\[|\\^|\\^=|\\^\\^|\\^\\^=|\\{|\\||\\|=|\\|\\||\\|\\|=|\\~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*';
+
+// CAVEAT: this does not properly handle the case where a regular
+// expression immediately follows another since a regular expression may
+// have flags for case-sensitivity and the like.  Having regexp tokens
+// adjacent is not valid in any language I'm aware of, so I'm punting.
+// TODO: maybe style special characters inside a regexp as punctuation.
+
+
+  /**
+   * Given a group of {@link RegExp}s, returns a {@code RegExp} that globally
+   * matches the union of the sets of strings matched by the input RegExp.
+   * Since it matches globally, if the input strings have a start-of-input
+   * anchor (/^.../), it is ignored for the purposes of unioning.
+   * @param {Array.<RegExp>} regexs non multiline, non-global regexs.
+   * @return {RegExp} a global regex.
+   */
+  function combinePrefixPatterns(regexs) {
+    var capturedGroupIndex = 0;
+  
+    var needToFoldCase = false;
+    var ignoreCase = false;
+    for (var i = 0, n = regexs.length; i < n; ++i) {
+      var regex = regexs[i];
+      if (regex.ignoreCase) {
+        ignoreCase = true;
+      } else if (/[a-z]/i.test(regex.source.replace(
+                     /\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi, ''))) {
+        needToFoldCase = true;
+        ignoreCase = false;
+        break;
+      }
+    }
+  
+    var escapeCharToCodeUnit = {
+      'b': 8,
+      't': 9,
+      'n': 0xa,
+      'v': 0xb,
+      'f': 0xc,
+      'r': 0xd
+    };
+  
+    function decodeEscape(charsetPart) {
+      var cc0 = charsetPart.charCodeAt(0);
+      if (cc0 !== 92 /* \\ */) {
+        return cc0;
+      }
+      var c1 = charsetPart.charAt(1);
+      cc0 = escapeCharToCodeUnit[c1];
+      if (cc0) {
+        return cc0;
+      } else if ('0' <= c1 && c1 <= '7') {
+        return parseInt(charsetPart.substring(1), 8);
+      } else if (c1 === 'u' || c1 === 'x') {
+        return parseInt(charsetPart.substring(2), 16);
+      } else {
+        return charsetPart.charCodeAt(1);
+      }
+    }
+  
+    function encodeEscape(charCode) {
+      if (charCode < 0x20) {
+        return (charCode < 0x10 ? '\\x0' : '\\x') + charCode.toString(16);
+      }
+      var ch = String.fromCharCode(charCode);
+      if (ch === '\\' || ch === '-' || ch === '[' || ch === ']') {
+        ch = '\\' + ch;
+      }
+      return ch;
+    }
+  
+    function caseFoldCharset(charSet) {
+      var charsetParts = charSet.substring(1, charSet.length - 1).match(
+          new RegExp(
+              '\\\\u[0-9A-Fa-f]{4}'
+              + '|\\\\x[0-9A-Fa-f]{2}'
+              + '|\\\\[0-3][0-7]{0,2}'
+              + '|\\\\[0-7]{1,2}'
+              + '|\\\\[\\s\\S]'
+              + '|-'
+              + '|[^-\\\\]',
+              'g'));
+      var groups = [];
+      var ranges = [];
+      var inverse = charsetParts[0] === '^';
+      for (var i = inverse ? 1 : 0, n = charsetParts.length; i < n; ++i) {
+        var p = charsetParts[i];
+        if (/\\[bdsw]/i.test(p)) {  // Don't muck with named groups.
+          groups.push(p);
+        } else {
+          var start = decodeEscape(p);
+          var end;
+          if (i + 2 < n && '-' === charsetParts[i + 1]) {
+            end = decodeEscape(charsetParts[i + 2]);
+            i += 2;
+          } else {
+            end = start;
+          }
+          ranges.push([start, end]);
+          // If the range might intersect letters, then expand it.
+          // This case handling is too simplistic.
+          // It does not deal with non-latin case folding.
+          // It works for latin source code identifiers though.
+          if (!(end < 65 || start > 122)) {
+            if (!(end < 65 || start > 90)) {
+              ranges.push([Math.max(65, start) | 32, Math.min(end, 90) | 32]);
+            }
+            if (!(end < 97 || start > 122)) {
+              ranges.push([Math.max(97, start) & ~32, Math.min(end, 122) & ~32]);
+            }
+          }
+        }
+      }
+  
+      // [[1, 10], [3, 4], [8, 12], [14, 14], [16, 16], [17, 17]]
+      // -> [[1, 12], [14, 14], [16, 17]]
+      ranges.sort(function (a, b) { return (a[0] - b[0]) || (b[1]  - a[1]); });
+      var consolidatedRanges = [];
+      var lastRange = [NaN, NaN];
+      for (var i = 0; i < ranges.length; ++i) {
+        var range = ranges[i];
+        if (range[0] <= lastRange[1] + 1) {
+          lastRange[1] = Math.max(lastRange[1], range[1]);
+        } else {
+          consolidatedRanges.push(lastRange = range);
+        }
+      }
+  
+      var out = ['['];
+      if (inverse) { out.push('^'); }
+      out.push.apply(out, groups);
+      for (var i = 0; i < consolidatedRanges.length; ++i) {
+        var range = consolidatedRanges[i];
+        out.push(encodeEscape(range[0]));
+        if (range[1] > range[0]) {
+          if (range[1] + 1 > range[0]) { out.push('-'); }
+          out.push(encodeEscape(range[1]));
+        }
+      }
+      out.push(']');
+      return out.join('');
+    }
+  
+    function allowAnywhereFoldCaseAndRenumberGroups(regex) {
+      // Split into character sets, escape sequences, punctuation strings
+      // like ('(', '(?:', ')', '^'), and runs of characters that do not
+      // include any of the above.
+      var parts = regex.source.match(
+          new RegExp(
+              '(?:'
+              + '\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]'  // a character set
+              + '|\\\\u[A-Fa-f0-9]{4}'  // a unicode escape
+              + '|\\\\x[A-Fa-f0-9]{2}'  // a hex escape
+              + '|\\\\[0-9]+'  // a back-reference or octal escape
+              + '|\\\\[^ux0-9]'  // other escape sequence
+              + '|\\(\\?[:!=]'  // start of a non-capturing group
+              + '|[\\(\\)\\^]'  // start/emd of a group, or line start
+              + '|[^\\x5B\\x5C\\(\\)\\^]+'  // run of other characters
+              + ')',
+              'g'));
+      var n = parts.length;
+  
+      // Maps captured group numbers to the number they will occupy in
+      // the output or to -1 if that has not been determined, or to
+      // undefined if they need not be capturing in the output.
+      var capturedGroups = [];
+  
+      // Walk over and identify back references to build the capturedGroups
+      // mapping.
+      for (var i = 0, groupIndex = 0; i < n; ++i) {
+        var p = parts[i];
+        if (p === '(') {
+          // groups are 1-indexed, so max group index is count of '('
+          ++groupIndex;
+        } else if ('\\' === p.charAt(0)) {
+          var decimalValue = +p.substring(1);
+          if (decimalValue && decimalValue <= groupIndex) {
+            capturedGroups[decimalValue] = -1;
+          }
+        }
+      }
+  
+      // Renumber groups and reduce capturing groups to non-capturing groups
+      // where possible.
+      for (var i = 1; i < capturedGroups.length; ++i) {
+        if (-1 === capturedGroups[i]) {
+          capturedGroups[i] = ++capturedGroupIndex;
+        }
+      }
+      for (var i = 0, groupIndex = 0; i < n; ++i) {
+        var p = parts[i];
+        if (p === '(') {
+          ++groupIndex;
+          if (capturedGroups[groupIndex] === undefined) {
+            parts[i] = '(?:';
+          }
+        } else if ('\\' === p.charAt(0)) {
+          var decimalValue = +p.substring(1);
+          if (decimalValue && decimalValue <= groupIndex) {
+            parts[i] = '\\' + capturedGroups[groupIndex];
+          }
+        }
+      }
+  
+      // Remove any prefix anchors so that the output will match anywhere.
+      // ^^ really does mean an anchored match though.
+      for (var i = 0, groupIndex = 0; i < n; ++i) {
+        if ('^' === parts[i] && '^' !== parts[i + 1]) { parts[i] = ''; }
+      }
+  
+      // Expand letters to groups to handle mixing of case-sensitive and
+      // case-insensitive patterns if necessary.
+      if (regex.ignoreCase && needToFoldCase) {
+        for (var i = 0; i < n; ++i) {
+          var p = parts[i];
+          var ch0 = p.charAt(0);
+          if (p.length >= 2 && ch0 === '[') {
+            parts[i] = caseFoldCharset(p);
+          } else if (ch0 !== '\\') {
+            // TODO: handle letters in numeric escapes.
+            parts[i] = p.replace(
+                /[a-zA-Z]/g,
+                function (ch) {
+                  var cc = ch.charCodeAt(0);
+                  return '[' + String.fromCharCode(cc & ~32, cc | 32) + ']';
+                });
+          }
+        }
+      }
+  
+      return parts.join('');
+    }
+  
+    var rewritten = [];
+    for (var i = 0, n = regexs.length; i < n; ++i) {
+      var regex = regexs[i];
+      if (regex.global || regex.multiline) { throw new Error('' + regex); }
+      rewritten.push(
+          '(?:' + allowAnywhereFoldCaseAndRenumberGroups(regex) + ')');
+    }
+  
+    return new RegExp(rewritten.join('|'), ignoreCase ? 'gi' : 'g');
+  }
+
+
+  /**
+   * Split markup into a string of source code and an array mapping ranges in
+   * that string to the text nodes in which they appear.
+   *
+   * <p>
+   * The HTML DOM structure:</p>
+   * <pre>
+   * (Element   "p"
+   *   (Element "b"
+   *     (Text  "print "))       ; #1
+   *   (Text    "'Hello '")      ; #2
+   *   (Element "br")            ; #3
+   *   (Text    "  + 'World';")) ; #4
+   * </pre>
+   * <p>
+   * corresponds to the HTML
+   * {@code <p><b>print </b>'Hello '<br>  + 'World';</p>}.</p>
+   *
+   * <p>
+   * It will produce the output:</p>
+   * <pre>
+   * {
+   *   sourceCode: "print 'Hello '\n  + 'World';",
+   *   //                 1         2
+   *   //       012345678901234 5678901234567
+   *   spans: [0, #1, 6, #2, 14, #3, 15, #4]
+   * }
+   * </pre>
+   * <p>
+   * where #1 is a reference to the {@code "print "} text node above, and so
+   * on for the other text nodes.
+   * </p>
+   *
+   * <p>
+   * The {@code} spans array is an array of pairs.  Even elements are the start
+   * indices of substrings, and odd elements are the text nodes (or BR elements)
+   * that contain the text for those substrings.
+   * Substrings continue until the next index or the end of the source.
+   * </p>
+   *
+   * @param {Node} node an HTML DOM subtree containing source-code.
+   * @return {Object} source code and the text nodes in which they occur.
+   */
+  function extractSourceSpans(node) {
+    var nocode = /(?:^|\s)nocode(?:\s|$)/;
+  
+    var chunks = [];
+    var length = 0;
+    var spans = [];
+    var k = 0;
+  
+    var whitespace;
+    if (node.currentStyle) {
+      whitespace = node.currentStyle.whiteSpace;
+    } else if (window.getComputedStyle) {
+      whitespace = document.defaultView.getComputedStyle(node, null)
+          .getPropertyValue('white-space');
+    }
+    var isPreformatted = whitespace && 'pre' === whitespace.substring(0, 3);
+  
+    function walk(node) {
+      switch (node.nodeType) {
+        case 1:  // Element
+          if (nocode.test(node.className)) { return; }
+          for (var child = node.firstChild; child; child = child.nextSibling) {
+            walk(child);
+          }
+          var nodeName = node.nodeName;
+          if ('BR' === nodeName || 'LI' === nodeName) {
+            chunks[k] = '\n';
+            spans[k << 1] = length++;
+            spans[(k++ << 1) | 1] = node;
+          }
+          break;
+        case 3: case 4:  // Text
+          var text = node.nodeValue;
+          if (text.length) {
+            if (!isPreformatted) {
+              text = text.replace(/[ \t\r\n]+/g, ' ');
+            } else {
+              text = text.replace(/\r\n?/g, '\n');  // Normalize newlines.
+            }
+            // TODO: handle tabs here?
+            chunks[k] = text;
+            spans[k << 1] = length;
+            length += text.length;
+            spans[(k++ << 1) | 1] = node;
+          }
+          break;
+      }
+    }
+  
+    walk(node);
+  
+    return {
+      sourceCode: chunks.join('').replace(/\n$/, ''),
+      spans: spans
+    };
+  }
+
+
+  /**
+   * Apply the given language handler to sourceCode and add the resulting
+   * decorations to out.
+   * @param {number} basePos the index of sourceCode within the chunk of source
+   *    whose decorations are already present on out.
+   */
+  function appendDecorations(basePos, sourceCode, langHandler, out) {
+    if (!sourceCode) { return; }
+    var job = {
+      sourceCode: sourceCode,
+      basePos: basePos
+    };
+    langHandler(job);
+    out.push.apply(out, job.decorations);
+  }
+
+  var notWs = /\S/;
+
+  /**
+   * Given an element, if it contains only one child element and any text nodes
+   * it contains contain only space characters, return the sole child element.
+   * Otherwise returns undefined.
+   * <p>
+   * This is meant to return the CODE element in {@code <pre><code ...>} when
+   * there is a single child element that contains all the non-space textual
+   * content, but not to return anything where there are multiple child elements
+   * as in {@code <pre><code>...</code><code>...</code></pre>} or when there
+   * is textual content.
+   */
+  function childContentWrapper(element) {
+    var wrapper = undefined;
+    for (var c = element.firstChild; c; c = c.nextSibling) {
+      var type = c.nodeType;
+      wrapper = (type === 1)  // Element Node
+          ? (wrapper ? element : c)
+          : (type === 3)  // Text Node
+          ? (notWs.test(c.nodeValue) ? element : wrapper)
+          : wrapper;
+    }
+    return wrapper === element ? undefined : wrapper;
+  }
+
+  /** Given triples of [style, pattern, context] returns a lexing function,
+    * The lexing function interprets the patterns to find token boundaries and
+    * returns a decoration list of the form
+    * [index_0, style_0, index_1, style_1, ..., index_n, style_n]
+    * where index_n is an index into the sourceCode, and style_n is a style
+    * constant like PR_PLAIN.  index_n-1 <= index_n, and style_n-1 applies to
+    * all characters in sourceCode[index_n-1:index_n].
+    *
+    * The stylePatterns is a list whose elements have the form
+    * [style : string, pattern : RegExp, DEPRECATED, shortcut : string].
+    *
+    * Style is a style constant like PR_PLAIN, or can be a string of the
+    * form 'lang-FOO', where FOO is a language extension describing the
+    * language of the portion of the token in $1 after pattern executes.
+    * E.g., if style is 'lang-lisp', and group 1 contains the text
+    * '(hello (world))', then that portion of the token will be passed to the
+    * registered lisp handler for formatting.
+    * The text before and after group 1 will be restyled using this decorator
+    * so decorators should take care that this doesn't result in infinite
+    * recursion.  For example, the HTML lexer rule for SCRIPT elements looks
+    * something like ['lang-js', /<[s]cript>(.+?)<\/script>/].  This may match
+    * '<script>foo()<\/script>', which would cause the current decorator to
+    * be called with '<script>' which would not match the same rule since
+    * group 1 must not be empty, so it would be instead styled as PR_TAG by
+    * the generic tag rule.  The handler registered for the 'js' extension would
+    * then be called with 'foo()', and finally, the current decorator would
+    * be called with '<\/script>' which would not match the original rule and
+    * so the generic tag rule would identify it as a tag.
+    *
+    * Pattern must only match prefixes, and if it matches a prefix, then that
+    * match is considered a token with the same style.
+    *
+    * Context is applied to the last non-whitespace, non-comment token
+    * recognized.
+    *
+    * Shortcut is an optional string of characters, any of which, if the first
+    * character, gurantee that this pattern and only this pattern matches.
+    *
+    * @param {Array} shortcutStylePatterns patterns that always start with
+    *   a known character.  Must have a shortcut string.
+    * @param {Array} fallthroughStylePatterns patterns that will be tried in
+    *   order if the shortcut ones fail.  May have shortcuts.
+    *
+    * @return {function (Object)} a
+    *   function that takes source code and returns a list of decorations.
+    */
+  function createSimpleLexer(shortcutStylePatterns, fallthroughStylePatterns) {
+    var shortcuts = {};
+    var tokenizer;
+    (function () {
+      var allPatterns = shortcutStylePatterns.concat(fallthroughStylePatterns);
+      var allRegexs = [];
+      var regexKeys = {};
+      for (var i = 0, n = allPatterns.length; i < n; ++i) {
+        var patternParts = allPatterns[i];
+        var shortcutChars = patternParts[3];
+        if (shortcutChars) {
+          for (var c = shortcutChars.length; --c >= 0;) {
+            shortcuts[shortcutChars.charAt(c)] = patternParts;
+          }
+        }
+        var regex = patternParts[1];
+        var k = '' + regex;
+        if (!regexKeys.hasOwnProperty(k)) {
+          allRegexs.push(regex);
+          regexKeys[k] = null;
+        }
+      }
+      allRegexs.push(/[\0-\uffff]/);
+      tokenizer = combinePrefixPatterns(allRegexs);
+    })();
+
+    var nPatterns = fallthroughStylePatterns.length;
+
+    /**
+     * Lexes job.sourceCode and produces an output array job.decorations of
+     * style classes preceded by the position at which they start in
+     * job.sourceCode in order.
+     *
+     * @param {Object} job an object like <pre>{
+     *    sourceCode: {string} sourceText plain text,
+     *    basePos: {int} position of job.sourceCode in the larger chunk of
+     *        sourceCode.
+     * }</pre>
+     */
+    var decorate = function (job) {
+      var sourceCode = job.sourceCode, basePos = job.basePos;
+      /** Even entries are positions in source in ascending order.  Odd enties
+        * are style markers (e.g., PR_COMMENT) that run from that position until
+        * the end.
+        * @type {Array.<number|string>}
+        */
+      var decorations = [basePos, PR_PLAIN];
+      var pos = 0;  // index into sourceCode
+      var tokens = sourceCode.match(tokenizer) || [];
+      var styleCache = {};
+
+      for (var ti = 0, nTokens = tokens.length; ti < nTokens; ++ti) {
+        var token = tokens[ti];
+        var style = styleCache[token];
+        var match = void 0;
+
+        var isEmbedded;
+        if (typeof style === 'string') {
+          isEmbedded = false;
+        } else {
+          var patternParts = shortcuts[token.charAt(0)];
+          if (patternParts) {
+            match = token.match(patternParts[1]);
+            style = patternParts[0];
+          } else {
+            for (var i = 0; i < nPatterns; ++i) {
+              patternParts = fallthroughStylePatterns[i];
+              match = token.match(patternParts[1]);
+              if (match) {
+                style = patternParts[0];
+                break;
+              }
+            }
+
+            if (!match) {  // make sure that we make progress
+              style = PR_PLAIN;
+            }
+          }
+
+          isEmbedded = style.length >= 5 && 'lang-' === style.substring(0, 5);
+          if (isEmbedded && !(match && typeof match[1] === 'string')) {
+            isEmbedded = false;
+            style = PR_SOURCE;
+          }
+
+          if (!isEmbedded) { styleCache[token] = style; }
+        }
+
+        var tokenStart = pos;
+        pos += token.length;
+
+        if (!isEmbedded) {
+          decorations.push(basePos + tokenStart, style);
+        } else {  // Treat group 1 as an embedded block of source code.
+          var embeddedSource = match[1];
+          var embeddedSourceStart = token.indexOf(embeddedSource);
+          var embeddedSourceEnd = embeddedSourceStart + embeddedSource.length;
+          if (match[2]) {
+            // If embeddedSource can be blank, then it would match at the
+            // beginning which would cause us to infinitely recurse on the
+            // entire token, so we catch the right context in match[2].
+            embeddedSourceEnd = token.length - match[2].length;
+            embeddedSourceStart = embeddedSourceEnd - embeddedSource.length;
+          }
+          var lang = style.substring(5);
+          // Decorate the left of the embedded source
+          appendDecorations(
+              basePos + tokenStart,
+              token.substring(0, embeddedSourceStart),
+              decorate, decorations);
+          // Decorate the embedded source
+          appendDecorations(
+              basePos + tokenStart + embeddedSourceStart,
+              embeddedSource,
+              langHandlerForExtension(lang, embeddedSource),
+              decorations);
+          // Decorate the right of the embedded section
+          appendDecorations(
+              basePos + tokenStart + embeddedSourceEnd,
+              token.substring(embeddedSourceEnd),
+              decorate, decorations);
+        }
+      }
+      job.decorations = decorations;
+    };
+    return decorate;
+  }
+
+  /** returns a function that produces a list of decorations from source text.
+    *
+    * This code treats ", ', and ` as string delimiters, and \ as a string
+    * escape.  It does not recognize perl's qq() style strings.
+    * It has no special handling for double delimiter escapes as in basic, or
+    * the tripled delimiters used in python, but should work on those regardless
+    * although in those cases a single string literal may be broken up into
+    * multiple adjacent string literals.
+    *
+    * It recognizes C, C++, and shell style comments.
+    *
+    * @param {Object} options a set of optional parameters.
+    * @return {function (Object)} a function that examines the source code
+    *     in the input job and builds the decoration list.
+    */
+  function sourceDecorator(options) {
+    var shortcutStylePatterns = [], fallthroughStylePatterns = [];
+    if (options['tripleQuotedStrings']) {
+      // '''multi-line-string''', 'single-line-string', and double-quoted
+      shortcutStylePatterns.push(
+          [PR_STRING,  /^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,
+           null, '\'"']);
+    } else if (options['multiLineStrings']) {
+      // 'multi-line-string', "multi-line-string"
+      shortcutStylePatterns.push(
+          [PR_STRING,  /^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,
+           null, '\'"`']);
+    } else {
+      // 'single-line-string', "single-line-string"
+      shortcutStylePatterns.push(
+          [PR_STRING,
+           /^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,
+           null, '"\'']);
+    }
+    if (options['verbatimStrings']) {
+      // verbatim-string-literal production from the C# grammar.  See issue 93.
+      fallthroughStylePatterns.push(
+          [PR_STRING, /^@\"(?:[^\"]|\"\")*(?:\"|$)/, null]);
+    }
+    var hc = options['hashComments'];
+    if (hc) {
+      if (options['cStyleComments']) {
+        if (hc > 1) {  // multiline hash comments
+          shortcutStylePatterns.push(
+              [PR_COMMENT, /^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/, null, '#']);
+        } else {
+          // Stop C preprocessor declarations at an unclosed open comment
+          shortcutStylePatterns.push(
+              [PR_COMMENT, /^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\r\n]*)/,
+               null, '#']);
+        }
+        fallthroughStylePatterns.push(
+            [PR_STRING,
+             /^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,
+             null]);
+      } else {
+        shortcutStylePatterns.push([PR_COMMENT, /^#[^\r\n]*/, null, '#']);
+      }
+    }
+    if (options['cStyleComments']) {
+      fallthroughStylePatterns.push([PR_COMMENT, /^\/\/[^\r\n]*/, null]);
+      fallthroughStylePatterns.push(
+          [PR_COMMENT, /^\/\*[\s\S]*?(?:\*\/|$)/, null]);
+    }
+    if (options['regexLiterals']) {
+      /**
+       * @const
+       */
+      var REGEX_LITERAL = (
+          // A regular expression literal starts with a slash that is
+          // not followed by * or / so that it is not confused with
+          // comments.
+          '/(?=[^/*])'
+          // and then contains any number of raw characters,
+          + '(?:[^/\\x5B\\x5C]'
+          // escape sequences (\x5C),
+          +    '|\\x5C[\\s\\S]'
+          // or non-nesting character sets (\x5B\x5D);
+          +    '|\\x5B(?:[^\\x5C\\x5D]|\\x5C[\\s\\S])*(?:\\x5D|$))+'
+          // finally closed by a /.
+          + '/');
+      fallthroughStylePatterns.push(
+          ['lang-regex',
+           new RegExp('^' + REGEXP_PRECEDER_PATTERN + '(' + REGEX_LITERAL + ')')
+           ]);
+    }
+
+    var types = options['types'];
+    if (types) {
+      fallthroughStylePatterns.push([PR_TYPE, types]);
+    }
+
+    var keywords = ("" + options['keywords']).replace(/^ | $/g, '');
+    if (keywords.length) {
+      fallthroughStylePatterns.push(
+          [PR_KEYWORD,
+           new RegExp('^(?:' + keywords.replace(/[\s,]+/g, '|') + ')\\b'),
+           null]);
+    }
+
+    shortcutStylePatterns.push([PR_PLAIN,       /^\s+/, null, ' \r\n\t\xA0']);
+    fallthroughStylePatterns.push(
+        // TODO(mikesamuel): recognize non-latin letters and numerals in idents
+        [PR_LITERAL,     /^@[a-z_$][a-z_$@0-9]*/i, null],
+        [PR_TYPE,        /^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/, null],
+        [PR_PLAIN,       /^[a-z_$][a-z_$@0-9]*/i, null],
+        [PR_LITERAL,
+         new RegExp(
+             '^(?:'
+             // A hex number
+             + '0x[a-f0-9]+'
+             // or an octal or decimal number,
+             + '|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)'
+             // possibly in scientific notation
+             + '(?:e[+\\-]?\\d+)?'
+             + ')'
+             // with an optional modifier like UL for unsigned long
+             + '[a-z]*', 'i'),
+         null, '0123456789'],
+        // Don't treat escaped quotes in bash as starting strings.  See issue 144.
+        [PR_PLAIN,       /^\\[\s\S]?/, null],
+        [PR_PUNCTUATION, /^.[^\s\w\.$@\'\"\`\/\#\\]*/, null]);
+
+    return createSimpleLexer(shortcutStylePatterns, fallthroughStylePatterns);
+  }
+
+  var decorateSource = sourceDecorator({
+        'keywords': ALL_KEYWORDS,
+        'hashComments': true,
+        'cStyleComments': true,
+        'multiLineStrings': true,
+        'regexLiterals': true
+      });
+
+  /**
+   * Given a DOM subtree, wraps it in a list, and puts each line into its own
+   * list item.
+   *
+   * @param {Node} node modified in place.  Its content is pulled into an
+   *     HTMLOListElement, and each line is moved into a separate list item.
+   *     This requires cloning elements, so the input might not have unique
+   *     IDs after numbering.
+   */
+  function numberLines(node, opt_startLineNum) {
+    var nocode = /(?:^|\s)nocode(?:\s|$)/;
+    var lineBreak = /\r\n?|\n/;
+  
+    var document = node.ownerDocument;
+  
+    var whitespace;
+    if (node.currentStyle) {
+      whitespace = node.currentStyle.whiteSpace;
+    } else if (window.getComputedStyle) {
+      whitespace = document.defaultView.getComputedStyle(node, null)
+          .getPropertyValue('white-space');
+    }
+    // If it's preformatted, then we need to split lines on line breaks
+    // in addition to <BR>s.
+    var isPreformatted = whitespace && 'pre' === whitespace.substring(0, 3);
+  
+    var li = document.createElement('LI');
+    while (node.firstChild) {
+      li.appendChild(node.firstChild);
+    }
+    // An array of lines.  We split below, so this is initialized to one
+    // un-split line.
+    var listItems = [li];
+  
+    function walk(node) {
+      switch (node.nodeType) {
+        case 1:  // Element
+          if (nocode.test(node.className)) { break; }
+          if ('BR' === node.nodeName) {
+            breakAfter(node);
+            // Discard the <BR> since it is now flush against a </LI>.
+            if (node.parentNode) {
+              node.parentNode.removeChild(node);
+            }
+          } else {
+            for (var child = node.firstChild; child; child = child.nextSibling) {
+              walk(child);
+            }
+          }
+          break;
+        case 3: case 4:  // Text
+          if (isPreformatted) {
+            var text = node.nodeValue;
+            var match = text.match(lineBreak);
+            if (match) {
+              var firstLine = text.substring(0, match.index);
+              node.nodeValue = firstLine;
+              var tail = text.substring(match.index + match[0].length);
+              if (tail) {
+                var parent = node.parentNode;
+                parent.insertBefore(
+                    document.createTextNode(tail), node.nextSibling);
+              }
+              breakAfter(node);
+              if (!firstLine) {
+                // Don't leave blank text nodes in the DOM.
+                node.parentNode.removeChild(node);
+              }
+            }
+          }
+          break;
+      }
+    }
+  
+    // Split a line after the given node.
+    function breakAfter(lineEndNode) {
+      // If there's nothing to the right, then we can skip ending the line
+      // here, and move root-wards since splitting just before an end-tag
+      // would require us to create a bunch of empty copies.
+      while (!lineEndNode.nextSibling) {
+        lineEndNode = lineEndNode.parentNode;
+        if (!lineEndNode) { return; }
+      }
+  
+      function breakLeftOf(limit, copy) {
+        // Clone shallowly if this node needs to be on both sides of the break.
+        var rightSide = copy ? limit.cloneNode(false) : limit;
+        var parent = limit.parentNode;
+        if (parent) {
+          // We clone the parent chain.
+          // This helps us resurrect important styling elements that cross lines.
+          // E.g. in <i>Foo<br>Bar</i>
+          // should be rewritten to <li><i>Foo</i></li><li><i>Bar</i></li>.
+          var parentClone = breakLeftOf(parent, 1);
+          // Move the clone and everything to the right of the original
+          // onto the cloned parent.
+          var next = limit.nextSibling;
+          parentClone.appendChild(rightSide);
+          for (var sibling = next; sibling; sibling = next) {
+            next = sibling.nextSibling;
+            parentClone.appendChild(sibling);
+          }
+        }
+        return rightSide;
+      }
+  
+      var copiedListItem = breakLeftOf(lineEndNode.nextSibling, 0);
+  
+      // Walk the parent chain until we reach an unattached LI.
+      for (var parent;
+           // Check nodeType since IE invents document fragments.
+           (parent = copiedListItem.parentNode) && parent.nodeType === 1;) {
+        copiedListItem = parent;
+      }
+      // Put it on the list of lines for later processing.
+      listItems.push(copiedListItem);
+    }
+  
+    // Split lines while there are lines left to split.
+    for (var i = 0;  // Number of lines that have been split so far.
+         i < listItems.length;  // length updated by breakAfter calls.
+         ++i) {
+      walk(listItems[i]);
+    }
+  
+    // Make sure numeric indices show correctly.
+    if (opt_startLineNum === (opt_startLineNum|0)) {
+      listItems[0].setAttribute('value', opt_startLineNum);
+    }
+  
+    var ol = document.createElement('OL');
+    ol.className = 'linenums';
+    var offset = Math.max(0, ((opt_startLineNum - 1 /* zero index */)) | 0) || 0;
+    for (var i = 0, n = listItems.length; i < n; ++i) {
+      li = listItems[i];
+      // Stick a class on the LIs so that stylesheets can
+      // color odd/even rows, or any other row pattern that
+      // is co-prime with 10.
+      li.className = 'L' + ((i + offset) % 10);
+      if (!li.firstChild) {
+        li.appendChild(document.createTextNode('\xA0'));
+      }
+      ol.appendChild(li);
+    }
+  
+    node.appendChild(ol);
+  }
+
+  /**
+   * Breaks {@code job.sourceCode} around style boundaries in
+   * {@code job.decorations} and modifies {@code job.sourceNode} in place.
+   * @param {Object} job like <pre>{
+   *    sourceCode: {string} source as plain text,
+   *    spans: {Array.<number|Node>} alternating span start indices into source
+   *       and the text node or element (e.g. {@code <BR>}) corresponding to that
+   *       span.
+   *    decorations: {Array.<number|string} an array of style classes preceded
+   *       by the position at which they start in job.sourceCode in order
+   * }</pre>
+   * @private
+   */
+  function recombineTagsAndDecorations(job) {
+    var isIE = /\bMSIE\b/.test(navigator.userAgent);
+    var newlineRe = /\n/g;
+  
+    var source = job.sourceCode;
+    var sourceLength = source.length;
+    // Index into source after the last code-unit recombined.
+    var sourceIndex = 0;
+  
+    var spans = job.spans;
+    var nSpans = spans.length;
+    // Index into spans after the last span which ends at or before sourceIndex.
+    var spanIndex = 0;
+  
+    var decorations = job.decorations;
+    var nDecorations = decorations.length;
+    // Index into decorations after the last decoration which ends at or before
+    // sourceIndex.
+    var decorationIndex = 0;
+  
+    // Remove all zero-length decorations.
+    decorations[nDecorations] = sourceLength;
+    var decPos, i;
+    for (i = decPos = 0; i < nDecorations;) {
+      if (decorations[i] !== decorations[i + 2]) {
+        decorations[decPos++] = decorations[i++];
+        decorations[decPos++] = decorations[i++];
+      } else {
+        i += 2;
+      }
+    }
+    nDecorations = decPos;
+  
+    // Simplify decorations.
+    for (i = decPos = 0; i < nDecorations;) {
+      var startPos = decorations[i];
+      // Conflate all adjacent decorations that use the same style.
+      var startDec = decorations[i + 1];
+      var end = i + 2;
+      while (end + 2 <= nDecorations && decorations[end + 1] === startDec) {
+        end += 2;
+      }
+      decorations[decPos++] = startPos;
+      decorations[decPos++] = startDec;
+      i = end;
+    }
+  
+    nDecorations = decorations.length = decPos;
+  
+    var decoration = null;
+    while (spanIndex < nSpans) {
+      var spanStart = spans[spanIndex];
+      var spanEnd = spans[spanIndex + 2] || sourceLength;
+  
+      var decStart = decorations[decorationIndex];
+      var decEnd = decorations[decorationIndex + 2] || sourceLength;
+  
+      var end = Math.min(spanEnd, decEnd);
+  
+      var textNode = spans[spanIndex + 1];
+      var styledText;
+      if (textNode.nodeType !== 1  // Don't muck with <BR>s or <LI>s
+          // Don't introduce spans around empty text nodes.
+          && (styledText = source.substring(sourceIndex, end))) {
+        // This may seem bizarre, and it is.  Emitting LF on IE causes the
+        // code to display with spaces instead of line breaks.
+        // Emitting Windows standard issue linebreaks (CRLF) causes a blank
+        // space to appear at the beginning of every line but the first.
+        // Emitting an old Mac OS 9 line separator makes everything spiffy.
+        if (isIE) { styledText = styledText.replace(newlineRe, '\r'); }
+        textNode.nodeValue = styledText;
+        var document = textNode.ownerDocument;
+        var span = document.createElement('SPAN');
+        span.className = decorations[decorationIndex + 1];
+        var parentNode = textNode.parentNode;
+        parentNode.replaceChild(span, textNode);
+        span.appendChild(textNode);
+        if (sourceIndex < spanEnd) {  // Split off a text node.
+          spans[spanIndex + 1] = textNode
+              // TODO: Possibly optimize by using '' if there's no flicker.
+              = document.createTextNode(source.substring(end, spanEnd));
+          parentNode.insertBefore(textNode, span.nextSibling);
+        }
+      }
+  
+      sourceIndex = end;
+  
+      if (sourceIndex >= spanEnd) {
+        spanIndex += 2;
+      }
+      if (sourceIndex >= decEnd) {
+        decorationIndex += 2;
+      }
+    }
+  }
+
+
+  /** Maps language-specific file extensions to handlers. */
+  var langHandlerRegistry = {};
+  /** Register a language handler for the given file extensions.
+    * @param {function (Object)} handler a function from source code to a list
+    *      of decorations.  Takes a single argument job which describes the
+    *      state of the computation.   The single parameter has the form
+    *      {@code {
+    *        sourceCode: {string} as plain text.
+    *        decorations: {Array.<number|string>} an array of style classes
+    *                     preceded by the position at which they start in
+    *                     job.sourceCode in order.
+    *                     The language handler should assigned this field.
+    *        basePos: {int} the position of source in the larger source chunk.
+    *                 All positions in the output decorations array are relative
+    *                 to the larger source chunk.
+    *      } }
+    * @param {Array.<string>} fileExtensions
+    */
+  function registerLangHandler(handler, fileExtensions) {
+    for (var i = fileExtensions.length; --i >= 0;) {
+      var ext = fileExtensions[i];
+      if (!langHandlerRegistry.hasOwnProperty(ext)) {
+        langHandlerRegistry[ext] = handler;
+      } else if (window['console']) {
+        console['warn']('cannot override language handler %s', ext);
+      }
+    }
+  }
+  function langHandlerForExtension(extension, source) {
+    if (!(extension && langHandlerRegistry.hasOwnProperty(extension))) {
+      // Treat it as markup if the first non whitespace character is a < and
+      // the last non-whitespace character is a >.
+      extension = /^\s*</.test(source)
+          ? 'default-markup'
+          : 'default-code';
+    }
+    return langHandlerRegistry[extension];
+  }
+  registerLangHandler(decorateSource, ['default-code']);
+  registerLangHandler(
+      createSimpleLexer(
+          [],
+          [
+           [PR_PLAIN,       /^[^<?]+/],
+           [PR_DECLARATION, /^<!\w[^>]*(?:>|$)/],
+           [PR_COMMENT,     /^<\!--[\s\S]*?(?:-\->|$)/],
+           // Unescaped content in an unknown language
+           ['lang-',        /^<\?([\s\S]+?)(?:\?>|$)/],
+           ['lang-',        /^<%([\s\S]+?)(?:%>|$)/],
+           [PR_PUNCTUATION, /^(?:<[%?]|[%?]>)/],
+           ['lang-',        /^<xmp\b[^>]*>([\s\S]+?)<\/xmp\b[^>]*>/i],
+           // Unescaped content in javascript.  (Or possibly vbscript).
+           ['lang-js',      /^<script\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],
+           // Contains unescaped stylesheet content
+           ['lang-css',     /^<style\b[^>]*>([\s\S]*?)(<\/style\b[^>]*>)/i],
+           ['lang-in.tag',  /^(<\/?[a-z][^<>]*>)/i]
+          ]),
+      ['default-markup', 'htm', 'html', 'mxml', 'xhtml', 'xml', 'xsl']);
+  registerLangHandler(
+      createSimpleLexer(
+          [
+           [PR_PLAIN,        /^[\s]+/, null, ' \t\r\n'],
+           [PR_ATTRIB_VALUE, /^(?:\"[^\"]*\"?|\'[^\']*\'?)/, null, '\"\'']
+           ],
+          [
+           [PR_TAG,          /^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],
+           [PR_ATTRIB_NAME,  /^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],
+           ['lang-uq.val',   /^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],
+           [PR_PUNCTUATION,  /^[=<>\/]+/],
+           ['lang-js',       /^on\w+\s*=\s*\"([^\"]+)\"/i],
+           ['lang-js',       /^on\w+\s*=\s*\'([^\']+)\'/i],
+           ['lang-js',       /^on\w+\s*=\s*([^\"\'>\s]+)/i],
+           ['lang-css',      /^style\s*=\s*\"([^\"]+)\"/i],
+           ['lang-css',      /^style\s*=\s*\'([^\']+)\'/i],
+           ['lang-css',      /^style\s*=\s*([^\"\'>\s]+)/i]
+           ]),
+      ['in.tag']);
+  registerLangHandler(
+      createSimpleLexer([], [[PR_ATTRIB_VALUE, /^[\s\S]+/]]), ['uq.val']);
+  registerLangHandler(sourceDecorator({
+          'keywords': CPP_KEYWORDS,
+          'hashComments': true,
+          'cStyleComments': true,
+          'types': C_TYPES
+        }), ['c', 'cc', 'cpp', 'cxx', 'cyc', 'm']);
+  registerLangHandler(sourceDecorator({
+          'keywords': 'null,true,false'
+        }), ['json']);
+  registerLangHandler(sourceDecorator({
+          'keywords': CSHARP_KEYWORDS,
+          'hashComments': true,
+          'cStyleComments': true,
+          'verbatimStrings': true,
+          'types': C_TYPES
+        }), ['cs']);
+  registerLangHandler(sourceDecorator({
+          'keywords': JAVA_KEYWORDS,
+          'cStyleComments': true
+        }), ['java']);
+  registerLangHandler(sourceDecorator({
+          'keywords': SH_KEYWORDS,
+          'hashComments': true,
+          'multiLineStrings': true
+        }), ['bsh', 'csh', 'sh']);
+  registerLangHandler(sourceDecorator({
+          'keywords': PYTHON_KEYWORDS,
+          'hashComments': true,
+          'multiLineStrings': true,
+          'tripleQuotedStrings': true
+        }), ['cv', 'py']);
+  registerLangHandler(sourceDecorator({
+          'keywords': PERL_KEYWORDS,
+          'hashComments': true,
+          'multiLineStrings': true,
+          'regexLiterals': true
+        }), ['perl', 'pl', 'pm']);
+  registerLangHandler(sourceDecorator({
+          'keywords': RUBY_KEYWORDS,
+          'hashComments': true,
+          'multiLineStrings': true,
+          'regexLiterals': true
+        }), ['rb']);
+  registerLangHandler(sourceDecorator({
+          'keywords': JSCRIPT_KEYWORDS,
+          'cStyleComments': true,
+          'regexLiterals': true
+        }), ['js']);
+  registerLangHandler(sourceDecorator({
+          'keywords': COFFEE_KEYWORDS,
+          'hashComments': 3,  // ### style block comments
+          'cStyleComments': true,
+          'multilineStrings': true,
+          'tripleQuotedStrings': true,
+          'regexLiterals': true
+        }), ['coffee']);
+  registerLangHandler(createSimpleLexer([], [[PR_STRING, /^[\s\S]+/]]), ['regex']);
+
+  function applyDecorator(job) {
+    var opt_langExtension = job.langExtension;
+
+    try {
+      // Extract tags, and convert the source code to plain text.
+      var sourceAndSpans = extractSourceSpans(job.sourceNode);
+      /** Plain text. @type {string} */
+      var source = sourceAndSpans.sourceCode;
+      job.sourceCode = source;
+      job.spans = sourceAndSpans.spans;
+      job.basePos = 0;
+
+      // Apply the appropriate language handler
+      langHandlerForExtension(opt_langExtension, source)(job);
+
+      // Integrate the decorations and tags back into the source code,
+      // modifying the sourceNode in place.
+      recombineTagsAndDecorations(job);
+    } catch (e) {
+      if ('console' in window) {
+        console['log'](e && e['stack'] ? e['stack'] : e);
+      }
+    }
+  }
+
+  /**
+   * @param sourceCodeHtml {string} The HTML to pretty print.
+   * @param opt_langExtension {string} The language name to use.
+   *     Typically, a filename extension like 'cpp' or 'java'.
+   * @param opt_numberLines {number|boolean} True to number lines,
+   *     or the 1-indexed number of the first line in sourceCodeHtml.
+   */
+  function prettyPrintOne(sourceCodeHtml, opt_langExtension, opt_numberLines) {
+    var container = document.createElement('PRE');
+    // This could cause images to load and onload listeners to fire.
+    // E.g. <img onerror="alert(1337)" src="nosuchimage.png">.
+    // We assume that the inner HTML is from a trusted source.
+    container.innerHTML = sourceCodeHtml;
+    if (opt_numberLines) {
+      numberLines(container, opt_numberLines);
+    }
+
+    var job = {
+      langExtension: opt_langExtension,
+      numberLines: opt_numberLines,
+      sourceNode: container
+    };
+    applyDecorator(job);
+    return container.innerHTML;
+  }
+
+  function prettyPrint(opt_whenDone) {
+    function byTagName(tn) { return document.getElementsByTagName(tn); }
+    // fetch a list of nodes to rewrite
+    var codeSegments = [byTagName('pre'), byTagName('code'), byTagName('xmp')];
+    var elements = [];
+    for (var i = 0; i < codeSegments.length; ++i) {
+      for (var j = 0, n = codeSegments[i].length; j < n; ++j) {
+        elements.push(codeSegments[i][j]);
+      }
+    }
+    codeSegments = null;
+
+    var clock = Date;
+    if (!clock['now']) {
+      clock = { 'now': function () { return +(new Date); } };
+    }
+
+    // The loop is broken into a series of continuations to make sure that we
+    // don't make the browser unresponsive when rewriting a large page.
+    var k = 0;
+    var prettyPrintingJob;
+
+    var langExtensionRe = /\blang(?:uage)?-([\w.]+)(?!\S)/;
+    var prettyPrintRe = /\bprettyprint\b/;
+
+    function doWork() {
+      var endTime = (window['PR_SHOULD_USE_CONTINUATION'] ?
+                     clock['now']() + 250 /* ms */ :
+                     Infinity);
+      for (; k < elements.length && clock['now']() < endTime; k++) {
+        var cs = elements[k];
+        var className = cs.className;
+        if (className.indexOf('prettyprint') >= 0) {
+          // If the classes includes a language extensions, use it.
+          // Language extensions can be specified like
+          //     <pre class="prettyprint lang-cpp">
+          // the language extension "cpp" is used to find a language handler as
+          // passed to PR.registerLangHandler.
+          // HTML5 recommends that a language be specified using "language-"
+          // as the prefix instead.  Google Code Prettify supports both.
+          // http://dev.w3.org/html5/spec-author-view/the-code-element.html
+          var langExtension = className.match(langExtensionRe);
+          // Support <pre class="prettyprint"><code class="language-c">
+          var wrapper;
+          if (!langExtension && (wrapper = childContentWrapper(cs))
+              && "CODE" === wrapper.tagName) {
+            langExtension = wrapper.className.match(langExtensionRe);
+          }
+
+          if (langExtension) {
+            langExtension = langExtension[1];
+          }
+
+          // make sure this is not nested in an already prettified element
+          var nested = false;
+          for (var p = cs.parentNode; p; p = p.parentNode) {
+            if ((p.tagName === 'pre' || p.tagName === 'code' ||
+                 p.tagName === 'xmp') &&
+                p.className && p.className.indexOf('prettyprint') >= 0) {
+              nested = true;
+              break;
+            }
+          }
+          if (!nested) {
+            // Look for a class like linenums or linenums:<n> where <n> is the
+            // 1-indexed number of the first line.
+            var lineNums = cs.className.match(/\blinenums\b(?::(\d+))?/);
+            lineNums = lineNums
+                  ? lineNums[1] && lineNums[1].length ? +lineNums[1] : true
+                  : false;
+            if (lineNums) { numberLines(cs, lineNums); }
+
+            // do the pretty printing
+            prettyPrintingJob = {
+              langExtension: langExtension,
+              sourceNode: cs,
+              numberLines: lineNums
+            };
+            applyDecorator(prettyPrintingJob);
+          }
+        }
+      }
+      if (k < elements.length) {
+        // finish up in a continuation
+        setTimeout(doWork, 250);
+      } else if (opt_whenDone) {
+        opt_whenDone();
+      }
+    }
+
+    doWork();
+  }
+
+   /**
+    * Find all the {@code <pre>} and {@code <code>} tags in the DOM with
+    * {@code class=prettyprint} and prettify them.
+    *
+    * @param {Function?} opt_whenDone if specified, called when the last entry
+    *     has been finished.
+    */
+  window['prettyPrintOne'] = prettyPrintOne;
+   /**
+    * Pretty print a chunk of code.
+    *
+    * @param {string} sourceCodeHtml code as html
+    * @return {string} code as html, but prettier
+    */
+  window['prettyPrint'] = prettyPrint;
+   /**
+    * Contains functions for creating and registering new language handlers.
+    * @type {Object}
+    */
+  window['PR'] = {
+        'createSimpleLexer': createSimpleLexer,
+        'registerLangHandler': registerLangHandler,
+        'sourceDecorator': sourceDecorator,
+        'PR_ATTRIB_NAME': PR_ATTRIB_NAME,
+        'PR_ATTRIB_VALUE': PR_ATTRIB_VALUE,
+        'PR_COMMENT': PR_COMMENT,
+        'PR_DECLARATION': PR_DECLARATION,
+        'PR_KEYWORD': PR_KEYWORD,
+        'PR_LITERAL': PR_LITERAL,
+        'PR_NOCODE': PR_NOCODE,
+        'PR_PLAIN': PR_PLAIN,
+        'PR_PUNCTUATION': PR_PUNCTUATION,
+        'PR_SOURCE': PR_SOURCE,
+        'PR_STRING': PR_STRING,
+        'PR_TAG': PR_TAG,
+        'PR_TYPE': PR_TYPE
+      };
+})();
diff --git a/src/site/resources/js/prettify.min.js b/src/site/resources/js/prettify.min.js
new file mode 100644
index 0000000..6623601
--- /dev/null
+++ b/src/site/resources/js/prettify.min.js
@@ -0,0 +1,41 @@
+// Copyright (C) 2006 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+var q=null;window.PR_SHOULD_USE_CONTINUATION=!0;
+(function(){function L(a){function m(a){var f=a.charCodeAt(0);if(f!==92)return f;var b=a.charAt(1);return(f=r[b])?f:"0"<=b&&b<="7"?parseInt(a.substring(1),8):b==="u"||b==="x"?parseInt(a.substring(2),16):a.charCodeAt(1)}function e(a){if(a<32)return(a<16?"\\x0":"\\x")+a.toString(16);a=String.fromCharCode(a);if(a==="\\"||a==="-"||a==="["||a==="]")a="\\"+a;return a}function h(a){for(var f=a.substring(1,a.length-1).match(/\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\[0-3][0-7]{0,2}|\\[0-7]{1,2}|\\[\S\s]|[^\\]/g),a=
+[],b=[],o=f[0]==="^",c=o?1:0,i=f.length;c<i;++c){var j=f[c];if(/\\[bdsw]/i.test(j))a.push(j);else{var j=m(j),d;c+2<i&&"-"===f[c+1]?(d=m(f[c+2]),c+=2):d=j;b.push([j,d]);d<65||j>122||(d<65||j>90||b.push([Math.max(65,j)|32,Math.min(d,90)|32]),d<97||j>122||b.push([Math.max(97,j)&-33,Math.min(d,122)&-33]))}}b.sort(function(a,f){return a[0]-f[0]||f[1]-a[1]});f=[];j=[NaN,NaN];for(c=0;c<b.length;++c)i=b[c],i[0]<=j[1]+1?j[1]=Math.max(j[1],i[1]):f.push(j=i);b=["["];o&&b.push("^");b.push.apply(b,a);for(c=0;c<
+f.length;++c)i=f[c],b.push(e(i[0])),i[1]>i[0]&&(i[1]+1>i[0]&&b.push("-"),b.push(e(i[1])));b.push("]");return b.join("")}function y(a){for(var f=a.source.match(/\[(?:[^\\\]]|\\[\S\s])*]|\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\\d+|\\[^\dux]|\(\?[!:=]|[()^]|[^()[\\^]+/g),b=f.length,d=[],c=0,i=0;c<b;++c){var j=f[c];j==="("?++i:"\\"===j.charAt(0)&&(j=+j.substring(1))&&j<=i&&(d[j]=-1)}for(c=1;c<d.length;++c)-1===d[c]&&(d[c]=++t);for(i=c=0;c<b;++c)j=f[c],j==="("?(++i,d[i]===void 0&&(f[c]="(?:")):"\\"===j.charAt(0)&&
+(j=+j.substring(1))&&j<=i&&(f[c]="\\"+d[i]);for(i=c=0;c<b;++c)"^"===f[c]&&"^"!==f[c+1]&&(f[c]="");if(a.ignoreCase&&s)for(c=0;c<b;++c)j=f[c],a=j.charAt(0),j.length>=2&&a==="["?f[c]=h(j):a!=="\\"&&(f[c]=j.replace(/[A-Za-z]/g,function(a){a=a.charCodeAt(0);return"["+String.fromCharCode(a&-33,a|32)+"]"}));return f.join("")}for(var t=0,s=!1,l=!1,p=0,d=a.length;p<d;++p){var g=a[p];if(g.ignoreCase)l=!0;else if(/[a-z]/i.test(g.source.replace(/\\u[\da-f]{4}|\\x[\da-f]{2}|\\[^UXux]/gi,""))){s=!0;l=!1;break}}for(var r=
+{b:8,t:9,n:10,v:11,f:12,r:13},n=[],p=0,d=a.length;p<d;++p){g=a[p];if(g.global||g.multiline)throw Error(""+g);n.push("(?:"+y(g)+")")}return RegExp(n.join("|"),l?"gi":"g")}function M(a){function m(a){switch(a.nodeType){case 1:if(e.test(a.className))break;for(var g=a.firstChild;g;g=g.nextSibling)m(g);g=a.nodeName;if("BR"===g||"LI"===g)h[s]="\n",t[s<<1]=y++,t[s++<<1|1]=a;break;case 3:case 4:g=a.nodeValue,g.length&&(g=p?g.replace(/\r\n?/g,"\n"):g.replace(/[\t\n\r ]+/g," "),h[s]=g,t[s<<1]=y,y+=g.length,
+t[s++<<1|1]=a)}}var e=/(?:^|\s)nocode(?:\s|$)/,h=[],y=0,t=[],s=0,l;a.currentStyle?l=a.currentStyle.whiteSpace:window.getComputedStyle&&(l=document.defaultView.getComputedStyle(a,q).getPropertyValue("white-space"));var p=l&&"pre"===l.substring(0,3);m(a);return{a:h.join("").replace(/\n$/,""),c:t}}function B(a,m,e,h){m&&(a={a:m,d:a},e(a),h.push.apply(h,a.e))}function x(a,m){function e(a){for(var l=a.d,p=[l,"pln"],d=0,g=a.a.match(y)||[],r={},n=0,z=g.length;n<z;++n){var f=g[n],b=r[f],o=void 0,c;if(typeof b===
+"string")c=!1;else{var i=h[f.charAt(0)];if(i)o=f.match(i[1]),b=i[0];else{for(c=0;c<t;++c)if(i=m[c],o=f.match(i[1])){b=i[0];break}o||(b="pln")}if((c=b.length>=5&&"lang-"===b.substring(0,5))&&!(o&&typeof o[1]==="string"))c=!1,b="src";c||(r[f]=b)}i=d;d+=f.length;if(c){c=o[1];var j=f.indexOf(c),k=j+c.length;o[2]&&(k=f.length-o[2].length,j=k-c.length);b=b.substring(5);B(l+i,f.substring(0,j),e,p);B(l+i+j,c,C(b,c),p);B(l+i+k,f.substring(k),e,p)}else p.push(l+i,b)}a.e=p}var h={},y;(function(){for(var e=a.concat(m),
+l=[],p={},d=0,g=e.length;d<g;++d){var r=e[d],n=r[3];if(n)for(var k=n.length;--k>=0;)h[n.charAt(k)]=r;r=r[1];n=""+r;p.hasOwnProperty(n)||(l.push(r),p[n]=q)}l.push(/[\S\s]/);y=L(l)})();var t=m.length;return e}function u(a){var m=[],e=[];a.tripleQuotedStrings?m.push(["str",/^(?:'''(?:[^'\\]|\\[\S\s]|''?(?=[^']))*(?:'''|$)|"""(?:[^"\\]|\\[\S\s]|""?(?=[^"]))*(?:"""|$)|'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$))/,q,"'\""]):a.multiLineStrings?m.push(["str",/^(?:'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$)|`(?:[^\\`]|\\[\S\s])*(?:`|$))/,
+q,"'\"`"]):m.push(["str",/^(?:'(?:[^\n\r'\\]|\\.)*(?:'|$)|"(?:[^\n\r"\\]|\\.)*(?:"|$))/,q,"\"'"]);a.verbatimStrings&&e.push(["str",/^@"(?:[^"]|"")*(?:"|$)/,q]);var h=a.hashComments;h&&(a.cStyleComments?(h>1?m.push(["com",/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,q,"#"]):m.push(["com",/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\n\r]*)/,q,"#"]),e.push(["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,q])):m.push(["com",/^#[^\n\r]*/,
+q,"#"]));a.cStyleComments&&(e.push(["com",/^\/\/[^\n\r]*/,q]),e.push(["com",/^\/\*[\S\s]*?(?:\*\/|$)/,q]));a.regexLiterals&&e.push(["lang-regex",/^(?:^^\.?|[!+-]|!=|!==|#|%|%=|&|&&|&&=|&=|\(|\*|\*=|\+=|,|-=|->|\/|\/=|:|::|;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|[?@[^]|\^=|\^\^|\^\^=|{|\||\|=|\|\||\|\|=|~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\s*(\/(?=[^*/])(?:[^/[\\]|\\[\S\s]|\[(?:[^\\\]]|\\[\S\s])*(?:]|$))+\/)/]);(h=a.types)&&e.push(["typ",h]);a=(""+a.keywords).replace(/^ | $/g,
+"");a.length&&e.push(["kwd",RegExp("^(?:"+a.replace(/[\s,]+/g,"|")+")\\b"),q]);m.push(["pln",/^\s+/,q," \r\n\t\xa0"]);e.push(["lit",/^@[$_a-z][\w$@]*/i,q],["typ",/^(?:[@_]?[A-Z]+[a-z][\w$@]*|\w+_t\b)/,q],["pln",/^[$_a-z][\w$@]*/i,q],["lit",/^(?:0x[\da-f]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+-]?\d+)?)[a-z]*/i,q,"0123456789"],["pln",/^\\[\S\s]?/,q],["pun",/^.[^\s\w"-$'./@\\`]*/,q]);return x(m,e)}function D(a,m){function e(a){switch(a.nodeType){case 1:if(k.test(a.className))break;if("BR"===a.nodeName)h(a),
+a.parentNode&&a.parentNode.removeChild(a);else for(a=a.firstChild;a;a=a.nextSibling)e(a);break;case 3:case 4:if(p){var b=a.nodeValue,d=b.match(t);if(d){var c=b.substring(0,d.index);a.nodeValue=c;(b=b.substring(d.index+d[0].length))&&a.parentNode.insertBefore(s.createTextNode(b),a.nextSibling);h(a);c||a.parentNode.removeChild(a)}}}}function h(a){function b(a,d){var e=d?a.cloneNode(!1):a,f=a.parentNode;if(f){var f=b(f,1),g=a.nextSibling;f.appendChild(e);for(var h=g;h;h=g)g=h.nextSibling,f.appendChild(h)}return e}
+for(;!a.nextSibling;)if(a=a.parentNode,!a)return;for(var a=b(a.nextSibling,0),e;(e=a.parentNode)&&e.nodeType===1;)a=e;d.push(a)}var k=/(?:^|\s)nocode(?:\s|$)/,t=/\r\n?|\n/,s=a.ownerDocument,l;a.currentStyle?l=a.currentStyle.whiteSpace:window.getComputedStyle&&(l=s.defaultView.getComputedStyle(a,q).getPropertyValue("white-space"));var p=l&&"pre"===l.substring(0,3);for(l=s.createElement("LI");a.firstChild;)l.appendChild(a.firstChild);for(var d=[l],g=0;g<d.length;++g)e(d[g]);m===(m|0)&&d[0].setAttribute("value",
+m);var r=s.createElement("OL");r.className="linenums";for(var n=Math.max(0,m-1|0)||0,g=0,z=d.length;g<z;++g)l=d[g],l.className="L"+(g+n)%10,l.firstChild||l.appendChild(s.createTextNode("\xa0")),r.appendChild(l);a.appendChild(r)}function k(a,m){for(var e=m.length;--e>=0;){var h=m[e];A.hasOwnProperty(h)?window.console&&console.warn("cannot override language handler %s",h):A[h]=a}}function C(a,m){if(!a||!A.hasOwnProperty(a))a=/^\s*</.test(m)?"default-markup":"default-code";return A[a]}function E(a){var m=
+a.g;try{var e=M(a.h),h=e.a;a.a=h;a.c=e.c;a.d=0;C(m,h)(a);var k=/\bMSIE\b/.test(navigator.userAgent),m=/\n/g,t=a.a,s=t.length,e=0,l=a.c,p=l.length,h=0,d=a.e,g=d.length,a=0;d[g]=s;var r,n;for(n=r=0;n<g;)d[n]!==d[n+2]?(d[r++]=d[n++],d[r++]=d[n++]):n+=2;g=r;for(n=r=0;n<g;){for(var z=d[n],f=d[n+1],b=n+2;b+2<=g&&d[b+1]===f;)b+=2;d[r++]=z;d[r++]=f;n=b}for(d.length=r;h<p;){var o=l[h+2]||s,c=d[a+2]||s,b=Math.min(o,c),i=l[h+1],j;if(i.nodeType!==1&&(j=t.substring(e,b))){k&&(j=j.replace(m,"\r"));i.nodeValue=
+j;var u=i.ownerDocument,v=u.createElement("SPAN");v.className=d[a+1];var x=i.parentNode;x.replaceChild(v,i);v.appendChild(i);e<o&&(l[h+1]=i=u.createTextNode(t.substring(b,o)),x.insertBefore(i,v.nextSibling))}e=b;e>=o&&(h+=2);e>=c&&(a+=2)}}catch(w){"console"in window&&console.log(w&&w.stack?w.stack:w)}}var v=["break,continue,do,else,for,if,return,while"],w=[[v,"auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],
+"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],F=[w,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,dynamic_cast,explicit,export,friend,inline,late_check,mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],G=[w,"abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient"],
+H=[G,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,interface,internal,into,is,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var"],w=[w,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"],I=[v,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"],
+J=[v,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],v=[v,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],K=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/,N=/\S/,O=u({keywords:[F,H,w,"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END"+
+I,J,v],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0}),A={};k(O,["default-code"]);k(x([],[["pln",/^[^<?]+/],["dec",/^<!\w[^>]*(?:>|$)/],["com",/^<\!--[\S\s]*?(?:--\>|$)/],["lang-",/^<\?([\S\s]+?)(?:\?>|$)/],["lang-",/^<%([\S\s]+?)(?:%>|$)/],["pun",/^(?:<[%?]|[%?]>)/],["lang-",/^<xmp\b[^>]*>([\S\s]+?)<\/xmp\b[^>]*>/i],["lang-js",/^<script\b[^>]*>([\S\s]*?)(<\/script\b[^>]*>)/i],["lang-css",/^<style\b[^>]*>([\S\s]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),
+["default-markup","htm","html","mxml","xhtml","xml","xsl"]);k(x([["pln",/^\s+/,q," \t\r\n"],["atv",/^(?:"[^"]*"?|'[^']*'?)/,q,"\"'"]],[["tag",/^^<\/?[a-z](?:[\w-.:]*\w)?|\/?>$/i],["atn",/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^\s"'>]*(?:[^\s"'/>]|\/(?=\s)))/],["pun",/^[/<->]+/],["lang-js",/^on\w+\s*=\s*"([^"]+)"/i],["lang-js",/^on\w+\s*=\s*'([^']+)'/i],["lang-js",/^on\w+\s*=\s*([^\s"'>]+)/i],["lang-css",/^style\s*=\s*"([^"]+)"/i],["lang-css",/^style\s*=\s*'([^']+)'/i],["lang-css",
+/^style\s*=\s*([^\s"'>]+)/i]]),["in.tag"]);k(x([],[["atv",/^[\S\s]+/]]),["uq.val"]);k(u({keywords:F,hashComments:!0,cStyleComments:!0,types:K}),["c","cc","cpp","cxx","cyc","m"]);k(u({keywords:"null,true,false"}),["json"]);k(u({keywords:H,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:K}),["cs"]);k(u({keywords:G,cStyleComments:!0}),["java"]);k(u({keywords:v,hashComments:!0,multiLineStrings:!0}),["bsh","csh","sh"]);k(u({keywords:I,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),
+["cv","py"]);k(u({keywords:"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["perl","pl","pm"]);k(u({keywords:J,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb"]);k(u({keywords:w,cStyleComments:!0,regexLiterals:!0}),["js"]);k(u({keywords:"all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,true,try,unless,until,when,while,yes",
+hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]);k(x([],[["str",/^[\S\s]+/]]),["regex"]);window.prettyPrintOne=function(a,m,e){var h=document.createElement("PRE");h.innerHTML=a;e&&D(h,e);E({g:m,i:e,h:h});return h.innerHTML};window.prettyPrint=function(a){function m(){for(var e=window.PR_SHOULD_USE_CONTINUATION?l.now()+250:Infinity;p<h.length&&l.now()<e;p++){var n=h[p],k=n.className;if(k.indexOf("prettyprint")>=0){var k=k.match(g),f,b;if(b=
+!k){b=n;for(var o=void 0,c=b.firstChild;c;c=c.nextSibling)var i=c.nodeType,o=i===1?o?b:c:i===3?N.test(c.nodeValue)?b:o:o;b=(f=o===b?void 0:o)&&"CODE"===f.tagName}b&&(k=f.className.match(g));k&&(k=k[1]);b=!1;for(o=n.parentNode;o;o=o.parentNode)if((o.tagName==="pre"||o.tagName==="code"||o.tagName==="xmp")&&o.className&&o.className.indexOf("prettyprint")>=0){b=!0;break}b||((b=(b=n.className.match(/\blinenums\b(?::(\d+))?/))?b[1]&&b[1].length?+b[1]:!0:!1)&&D(n,b),d={g:k,h:n,i:b},E(d))}}p<h.length?setTimeout(m,
+250):a&&a()}for(var e=[document.getElementsByTagName("pre"),document.getElementsByTagName("code"),document.getElementsByTagName("xmp")],h=[],k=0;k<e.length;++k)for(var t=0,s=e[k].length;t<s;++t)h.push(e[k][t]);var e=q,l=Date;l.now||(l={now:function(){return+new Date}});var p=0,d,g=/\blang(?:uage)?-([\w.]+)(?!\S)/;m()};window.PR={createSimpleLexer:x,registerLangHandler:k,sourceDecorator:u,PR_ATTRIB_NAME:"atn",PR_ATTRIB_VALUE:"atv",PR_COMMENT:"com",PR_DECLARATION:"dec",PR_KEYWORD:"kwd",PR_LITERAL:"lit",
+PR_NOCODE:"nocode",PR_PLAIN:"pln",PR_PUNCTUATION:"pun",PR_SOURCE:"src",PR_STRING:"str",PR_TAG:"tag",PR_TYPE:"typ"}})();
diff --git a/src/site/resources/js/site.js b/src/site/resources/js/site.js
new file mode 100644
index 0000000..e645f25
--- /dev/null
+++ b/src/site/resources/js/site.js
@@ -0,0 +1,113 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+/* Executed on page load. */
+$(document).ready(function() {
+
+	//
+	// This is a hack to enable google-code-prettify to work with maven.
+	//
+	// The problem is that maven, when building the site, replaces:
+	// <pre class="prettyprint">...</pre>
+	// with:
+	// <div class="prettyprint"><pre>...</pre></div>
+	//
+	// Effectively, it removes the class parameter from the <pre> element, which
+	// is required for google-code-prettify to work.
+	// 
+	// This hack restores the class of all <pre> elements which are the child of 
+	// a <div class="prettyprint">.
+	//
+	$('pre').each(function() {
+		var parent = $(this).parent();
+		
+		if (parent.hasClass('prettyprint')) {
+			parent.removeClass('prettyprint');
+			$(this).addClass('prettyprint');
+		}
+		
+		if (parent.hasClass('linenums')) {
+			parent.removeClass('linenums');
+			$(this).addClass('linenums');
+		}
+
+		// markdown adds the "source" class instead
+		if (parent.hasClass('source')) {
+			parent.removeClass('source');
+			$(this).addClass('prettyprint');
+			$(this).addClass('linenums');
+		}
+	});
+	
+	// Hack to add default visuals to tables
+	$('table').each(function() {
+		if ($(this).hasClass('bodyTable')) {
+			
+			// Remove border="1" which is added by maven
+			this.border = 0;
+			
+			// Add bootstrap table styling
+			$(this).addClass('table table-striped table-bordered');
+		}
+	});
+	
+	// Render tabs
+	$('.auto-tabs').each(function(groupid) {
+
+		// Find tab bar
+		$(this).find('ul').each(function() {
+
+			// Add styling
+			$(this).addClass('nav nav-tabs');
+
+			// Go tab bar items
+			$(this).find('li').each(function(itemid) {
+			
+				// Set first tab as active
+				if (itemid == 0) {
+					$(this).addClass('active');
+				}
+				
+				// Replace text with a link to tab contents
+				var name = $(this).html();
+				var link = $('<a>')
+					.attr('href', '#' + 'tab-' + groupid + '-' + itemid)
+					.attr('data-toggle', 'tab')
+					.html(name);
+				$(this).html(link);
+			});
+		});
+		
+		// Find tab contents
+		$(this).find('.tab-content .tab-pane').each(function(itemid) {
+			
+			// Set first tab as active
+			if (itemid == 0) {
+				$(this).addClass('active');
+			}
+			
+			// Set the tab id
+			$(this).attr('id', 'tab-' + groupid + '-' + itemid);
+		});
+	});
+	
+	// Make external links open in new tab
+	$('a.external').attr('target', '_blank');
+
+	// Trigger prettyprint
+	prettyPrint();
+});
diff --git a/src/site/site.vm b/src/site/site.vm
new file mode 100644
index 0000000..d6aeca9
--- /dev/null
+++ b/src/site/site.vm
@@ -0,0 +1,518 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<!--
+   Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed with
+   this work for additional information regarding copyright ownership.
+   The ASF licenses this file to You under the Apache License, Version 2.0
+   (the "License"); you may not use this file except in compliance with
+   the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+-->
+<!-- Generated by Apache Maven Doxia at $dateFormat.format( $currentDate ) -->
+#macro ( link $href $name $target $img $position $alt $border $width $height )
+	#set ( $linkTitle = ' title="' + $name + '"' )
+	#if( $target )
+		#set ( $linkTarget = ' target="' + $target + '"' )
+	#else
+		#set ( $linkTarget = "" )
+	#end
+	#if ( $href.toLowerCase().startsWith("http:/") || $href.toLowerCase().startsWith("https:/") ||
+		$href.toLowerCase().startsWith("ftp:/") || $href.toLowerCase().startsWith("mailto:/") ||
+		$href.toLowerCase().startsWith("file:/") || ($href.toLowerCase().indexOf("://") != -1) )
+		#set ( $linkClass = ' class="external" target="_blank"' )
+
+		#if ( $linkTarget )
+		#else
+			#set ( $linkTarget = "_blank" )
+		#end
+
+	#else
+		#set ( $linkClass = "" )
+	#end
+	#if ( $img )
+		#if ( $position == "left" )
+			<a href="$href"$linkClass$linkTarget$linkTitle>#image($img $alt $border $width $height)$name</a>
+		#else
+			<a href="$href"$linkClass$linkTarget$linkTitle>$name #image($img $alt $border $width $height)</a>
+		#end
+	#else
+		<a href="$href"$linkClass$linkTarget$linkTitle>$name</a>
+	#end
+#end
+##
+#macro ( image $img $alt $border $width $height )
+	#if( $img )
+		#if ( ! ( $img.toLowerCase().startsWith("http:/") || $img.toLowerCase().startsWith("https:/") ||
+						$img.toLowerCase().startsWith("ftp:/") || $img.toLowerCase().startsWith("mailto:/") ||
+						$img.toLowerCase().startsWith("file:/") || ($img.toLowerCase().indexOf("://") != -1) ) )
+			#set ( $imgSrc = $PathTool.calculateLink( $img, $relativePath ) )
+			#set ( $imgSrc = $imgSrc.replaceAll( '\\', '/' ) )
+			#set ( $imgSrc = ' src="' + $imgSrc + '"' )
+		#else
+			#set ( $imgSrc = ' src="' + $img + '"' )
+		#end
+		#if( $alt )
+			#set ( $imgAlt = ' alt="' + $alt + '"' )
+		#else
+			#set ( $imgAlt = ' alt=""' )
+		#end
+		#if( $border )
+			#set ( $imgBorder = ' border="' + $border + '"' )
+		#else
+			#set ( $imgBorder = "" )
+		#end
+		#if( $width )
+			#set ( $imgWidth = ' width="' + $width + '"' )
+		#else
+			#set ( $imgWidth = "" )
+		#end
+		#if( $height )
+			#set ( $imgHeight = ' height="' + $height + '"' )
+		#else
+			#set ( $imgHeight = "" )
+		#end
+		<img class="imageLink"$imgSrc$imgAlt$imgBorder$imgWidth$imgHeight/>
+	#end
+#end
+#macro ( banner $banner $id )
+	#if ( $banner )
+		#if( $banner.href )
+			#set ( $hrf = $banner.href )
+			#if ( ! ( $hrf.toLowerCase().startsWith("http:/") || $hrf.toLowerCase().startsWith("https:/") ||
+				$hrf.toLowerCase().startsWith("ftp:/") || $hrf.toLowerCase().startsWith("mailto:/") ||
+				$hrf.toLowerCase().startsWith("file:/") || ($hrf.toLowerCase().indexOf("://") != -1) ) )
+				#set ( $hrf = $PathTool.calculateLink( $hrf, $relativePath ) )
+				#set ( $hrf = $hrf.replaceAll( '\\', '/' ) )
+				#if ( ( $hrf == '' ) )
+					#set ( $hrf = './' )
+				#end
+			#end
+			<a href="$hrf" id="$id"#if( $banner.alt ) title="$banner.alt"#end>
+		#else
+				<div id="$id">
+		#end
+##
+		#if( $banner.src )
+				#set ( $src = $banner.src )
+				#if ( ! ( $src.toLowerCase().startsWith("http:/") || $src.toLowerCase().startsWith("https:/") ||
+								$src.toLowerCase().startsWith("ftp:/") || $src.toLowerCase().startsWith("mailto:/") ||
+								$src.toLowerCase().startsWith("file:/") || ($src.toLowerCase().indexOf("://") != -1) ) )
+						#set ( $src = $PathTool.calculateLink( $src, $relativePath ) )
+						#set ( $src = $src.replaceAll( '\\', '/' ) )
+				#end
+				#if ( $banner.alt )
+						#set ( $alt = $banner.alt )
+				#else
+						#set ( $alt = $banner.name )
+				#end
+				<img src="$src" alt="$alt" />
+		#else
+				$banner.name
+		#end
+##
+		#if( $banner.href )
+				</a>
+		#else
+				</div>
+		#end
+	#end
+#end
+##
+#macro ( links $links )
+	<ul class="nav">
+	#set ( $counter = 0 )
+	#foreach( $item in $links )
+		#set ( $counter = $counter + 1 )
+		#set ( $currentItemHref = $PathTool.calculateLink( $item.href, $relativePath ) )
+		#set ( $currentItemHref = $currentItemHref.replaceAll( '\\', '/' ) )
+		#set ( $activeClass = "" )
+		#if ( $alignedFileName == $currentItemHref)
+			#set ( $activeClass = ' class="active"' )
+		#end
+		<li$activeClass>
+		#link( $currentItemHref $item.name $item.target $item.img $item.position $item.alt $item.border $item.width $item.height )
+		</li>
+	#end
+	</ul>
+#end
+##
+#macro ( breadcrumbs $breadcrumbs )
+	#foreach( $item in $breadcrumbs )
+		#set ( $currentItemHref = $PathTool.calculateLink( $item.href, $relativePath ) )
+		#set ( $currentItemHref = $currentItemHref.replaceAll( '\\', '/' ) )
+		#if ( ( $currentItemHref == '' ) )
+			#set ( $currentItemHref = './' )
+		#end
+##
+			#link( $currentItemHref $item.name $item.target $item.img $item.position $item.alt $item.border $item.width $item.height )
+			<span class="divider">&gt;</span>
+	#end
+	$title
+#end
+##
+#macro ( displayTree $display $item )
+	#if ( $item && $item.items && $item.items.size() > 0 )
+		#foreach( $subitem in $item.items )
+			#set ( $subitemHref = $PathTool.calculateLink( $subitem.href, $relativePath ) )
+			#set ( $subitemHref = $subitemHref.replaceAll( '\\', '/' ) )
+##
+			#if ( $alignedFileName == $subitemHref )
+				#set ( $display = true )
+			#end
+##
+			#displayTree( $display $subitem )
+		#end
+	#end
+#end
+##
+#macro ( menuItem $item $isComponentDocumentation )
+	#set ( $collapse = "none" )
+	#set ( $currentItemHref = $PathTool.calculateLink( $item.href, $relativePath ) )
+	#set ( $currentItemHref = $currentItemHref.replaceAll( '\\', '/' ) )
+##
+	#if ( $item && $item.items && $item.items.size() > 0 )
+		#if ( $item.collapse == false )
+			#set ( $collapse = "expanded" )
+		#else
+			## By default collapsed
+			#set ( $collapse = "collapsed" )
+		#end
+##
+		#set ( $display = false )
+		#displayTree( $display $item )
+##
+		#if ( $alignedFileName == $currentItemHref || $display )
+			#set ( $collapse = "expanded" )
+		#end
+	#end
+	#set ( $active = "" )
+	#if ( $alignedFileName == $currentItemHref )
+	#set ($active = " active")
+	#end
+	#set ( $thisProjectDir = "../${project.artifactId}" )
+	#if ($thisProjectDir == $PathTool.getDirectoryComponent( $item.href ))
+	#set ($active = " active")
+	#end
+	#if (${project.artifactId} != "apache-log4cxx" && $isComponentDocumentation &&
+				($item.href == "team-list.html" || $item.href == "mail-lists.html"
+				|| $item.href == "issue-tracking.html" || $item.href == "license.html"
+				|| $item.href == "source-repository.html"))
+	<!-- Removing overall project item $item.name from component-specific menu -->
+	#else
+		#set ($thisItemName = $item.name)
+		#if (${project.artifactId} != "apache-log4cxx" && $isComponentDocumentation )
+		#set ($thisItemName = $item.name.replace("Project Information", "Component Project"))
+		#set ($thisItemName = $item.name.replace("Project", "Component"))
+		#end
+		<li class="$collapse$active">
+		#link($currentItemHref $thisItemName $item.target $item.img $item.position $item.alt $item.border $item.width $item.height )
+		#if ( $item && $item.items && $item.items.size() > 0 )
+			#if ( $collapse == "expanded" )
+				<ul>
+					#foreach( $subitem in $item.items )
+						#menuItem( $subitem $isComponentDocumentation )
+					#end
+				</ul>
+			#end
+		#end
+		</li>
+ 	#end
+#end
+##
+#macro ( mainMenu $menus )
+	#foreach( $menu in $menus )
+		<ul class="nav nav-list">
+		#set ($isComponentDocumentation = false)
+ 		#if ( $menu.name )
+			#set ( $menuName = $menu.name )
+			#if ( $menuName == "Project Documentation" )
+			#set ( $menuName = "Component Documentation" )
+			#set ($isComponentDocumentation = true)
+			#end
+			#if ( $menu.img )
+			 <li class="nav-header"><i class="$menu.img"></i>$menuName</li>
+			#else
+			 <li class="nav-header">$menuName</li>
+			#end
+		#end
+		#if ( $menu.items && $menu.items.size() > 0 )
+			#foreach( $item in $menu.items )
+				#menuItem( $item $isComponentDocumentation )
+			#end
+		#end
+		</ul>
+	#end
+#end
+##
+#macro ( copyright )
+	#if ( $project )
+		#if ( ${project.organization} && ${project.organization.name} )
+			#set ( $period = "" )
+		#else
+			#set ( $period = "." )
+	 #end
+##
+	 #set ( $currentYear = ${currentDate.year} + 1900 )
+##
+		#if ( ${project.inceptionYear} && ( ${project.inceptionYear} != ${currentYear.toString()} ) )
+			${project.inceptionYear}-${currentYear}${period}
+		#else
+			${currentYear}${period}
+		#end
+##
+		#if ( ${project.organization} )
+			#if ( ${project.organization.name} && ${project.organization.url} )
+					<a href="$project.organization.url">${project.organization.name}</a>.
+			#elseif ( ${project.organization.name} )
+				${project.organization.name}.
+			#end
+		#end
+	#end
+#end
+##
+#macro ( publishDate $position $publishDate $version )
+	#if ( $publishDate && $publishDate.format )
+		#set ( $format = $publishDate.format )
+	#else
+		#set ( $format = "yyyy-MM-dd" )
+	#end
+##
+	$dateFormat.applyPattern( $format )
+##
+	#set ( $dateToday = $dateFormat.format( $currentDate ) )
+##
+	#if ( $publishDate && $publishDate.position )
+		#set ( $datePosition = $publishDate.position )
+	#else
+		#set ( $datePosition = "left" )
+	#end
+##
+	#if ( $version )
+		#if ( $version.position )
+			#set ( $versionPosition = $version.position )
+		#else
+			#set ( $versionPosition = "left" )
+		#end
+	#else
+		#set ( $version = "" )
+		#set ( $versionPosition = "left" )
+	#end
+##
+	#set ( $breadcrumbs = $decoration.body.breadcrumbs )
+	#set ( $links = $decoration.body.links )
+
+	#if ( $datePosition.equalsIgnoreCase( $position ) )
+		#if ( ( $datePosition.equalsIgnoreCase( "right" ) ) || ( $datePosition.equalsIgnoreCase( "bottom" ) ) )
+			<span id="publishDate">$i18n.getString( "site-renderer", $locale, "template.lastpublished" ): $dateToday</span>
+			#if ( $versionPosition.equalsIgnoreCase( $position ) )
+				<span class="divider">|</span> <span id="projectVersion">$i18n.getString( "site-renderer", $locale, "template.version" ): ${project.version}</span>
+			#end
+		#elseif ( ( $datePosition.equalsIgnoreCase( "navigation-bottom" ) ) || ( $datePosition.equalsIgnoreCase( "navigation-top" ) ) )
+			<div id="lastPublished">
+				<span id="publishDate">$i18n.getString( "site-renderer", $locale, "template.lastpublished" ): $dateToday</span>
+				#if ( $versionPosition.equalsIgnoreCase( $position ) )
+					<span class="divider">|</span> <span id="projectVersion">$i18n.getString( "site-renderer", $locale, "template.version" ): ${project.version}</span>
+				#end
+			</div>
+		#elseif ( $datePosition.equalsIgnoreCase("left") )
+			<div class="pull-left">
+				<span id="publishDate">$i18n.getString( "site-renderer", $locale, "template.lastpublished" ): $dateToday</span>
+				#if ( $versionPosition.equalsIgnoreCase( $position ) )
+					<span class="divider">|</span> <span id="projectVersion">$i18n.getString( "site-renderer", $locale, "template.version" ): ${project.version}</span>
+				#end
+				#if ( $breadcrumbs && $breadcrumbs.size() > 0 )
+					<span class="divider">|</span> #breadcrumbs( $breadcrumbs )
+				#end
+			</div>
+		#end
+	#elseif ( $versionPosition.equalsIgnoreCase( $position ) )
+		#if ( ( $versionPosition.equalsIgnoreCase( "right" ) ) || ( $versionPosition.equalsIgnoreCase( "bottom" ) ) )
+			$prefix <span id="projectVersion">$i18n.getString( "site-renderer", $locale, "template.version" ): ${project.version}</span>
+		#elseif ( ( $versionPosition.equalsIgnoreCase( "navigation-bottom" ) ) || ( $versionPosition.equalsIgnoreCase( "navigation-top" ) ) )
+			<div id="lastPublished">
+				<span id="projectVersion">$i18n.getString( "site-renderer", $locale, "template.version" ): ${project.version}</span>
+			</div>
+		#elseif ( $versionPosition.equalsIgnoreCase("left") )
+			<div class="pull-left">
+				<span id="projectVersion">$i18n.getString( "site-renderer", $locale, "template.version" ): ${project.version}</span>
+				#if ( $breadcrumbs && $breadcrumbs.size() > 0 )
+					<span class="divider">|</span> #breadcrumbs( $breadcrumbs )
+				#end
+			</div>
+		#end
+	#elseif ( $position.equalsIgnoreCase( "left" ) )
+		#if ( $breadcrumbs && $breadcrumbs.size() > 0 )
+			<div class="pull-left">
+				#breadcrumbs( $breadcrumbs )
+			</div>
+		#end
+	#end
+#end
+##
+#macro ( poweredByLogo $poweredBy )
+	#if( $poweredBy )
+		#foreach ($item in $poweredBy)
+			#if( $item.href )
+				#set ( $href = $PathTool.calculateLink( $item.href, $relativePath ) )
+				#set ( $href = $href.replaceAll( '\\', '/' ) )
+			#else
+				#set ( $href="https://maven.apache.org/" )
+			#end
+##
+			#if( $item.name )
+				#set ( $name = $item.name )
+			#else
+				#set ( $name = $i18n.getString( "site-renderer", $locale, "template.builtby" )	)
+				#set ( $name = "${name} Maven"	)
+			#end
+##
+			#if( $item.img )
+				#set ( $img = $item.img )
+			#else
+				#set ( $img = "images/maven-feather.png" )
+			#end
+##
+			#if ( ! ( $img.toLowerCase().startsWith("http:/") || $img.toLowerCase().startsWith("https:/") ||
+						$img.toLowerCase().startsWith("ftp:/") || $img.toLowerCase().startsWith("mailto:/") ||
+						$img.toLowerCase().startsWith("file:/") || ($img.toLowerCase().indexOf("://") != -1) ) )
+				#set ( $img = $PathTool.calculateLink( $img, $relativePath ) )
+				#set ( $img = $img.replaceAll( '\\', '/' ) )
+			#end
+##
+			#if( $item.alt )
+				#set ( $alt = ' alt="' + $item.alt + '"' )
+			#else
+				#set ( $alt = ' alt="' + $name + '"' )
+			#end
+##
+			#if( $item.border )
+				#set ( $border = ' border="' + $item.border + '"' )
+			#else
+				#set ( $border = "" )
+			#end
+##
+			#if( $item.width )
+				#set ( $width = ' width="' + $item.width + '"' )
+			#else
+				#set ( $width = "" )
+			#end
+			#if( $item.height )
+				#set ( $height = ' height="' + $item.height + '"' )
+			#else
+				#set ( $height = "" )
+			#end
+##
+			<a href="$href" title="$name" class="poweredBy">
+				<img class="poweredBy" $alt src="$img" $border $width $height />
+			</a>
+		#end
+		#if( $poweredBy.isEmpty() )
+			<a href="https://maven.apache.org/" title="$i18n.getString( "site-renderer", $locale, "template.builtby" ) Maven" class="poweredBy">
+				<img class="poweredBy" alt="$i18n.getString( "site-renderer", $locale, "template.builtby" ) Maven" src="$relativePath/images/logos/maven-feather.png" />
+			</a>
+		#end
+	#else
+		<a href="https://maven.apache.org/" title="$i18n.getString( "site-renderer", $locale, "template.builtby" ) Maven" class="poweredBy">
+			<img class="poweredBy" alt="$i18n.getString( "site-renderer", $locale, "template.builtby" ) Maven" src="$relativePath/images/logos/maven-feather.png" />
+		</a>
+	#end
+#end
+##
+#macro ( googleAnalytics $accountId )
+	#if( $accountId && $accountId != "" )
+		<!-- Google Analytics -->
+		<script type="text/javascript">
+
+			var _gaq = _gaq || [];
+			_gaq.push(['_setAccount', '$accountId']);
+			_gaq.push (['_gat._anonymizeIp']);
+			_gaq.push(['_trackPageview']);
+
+			(function() {
+				var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+				ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+				var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+			})();
+
+		</script>
+	#end
+#end
+##
+<html xmlns="http://www.w3.org/1999/xhtml"#if ( $locale ) xml:lang="$locale.language" lang="$locale.language"#end>
+	<head>
+		<meta http-equiv="Content-Type" content="text/html; charset=${outputEncoding}" />
+		<title>$title - $project.name</title>
+		<link rel="stylesheet" href="$relativePath/css/bootstrap.min.css" type="text/css" />
+		<link rel="stylesheet" href="$relativePath/css/site.css" type="text/css" />
+		<script type="text/javascript" src="$relativePath/js/jquery.min.js"></script>
+		<script type="text/javascript" src="$relativePath/js/bootstrap.min.js"></script>
+		<script type="text/javascript" src="$relativePath/js/prettify.min.js"></script>
+		<script type="text/javascript" src="$relativePath/js/site.js"></script>
+#foreach( $author in $authors )
+			<meta name="author" content="$author" />
+#end
+#if ( $dateCreation )
+		<meta name="Date-Creation-yyyymmdd" content="$dateCreation" />
+#end
+#if ( $dateRevision )
+		<meta name="Date-Revision-yyyymmdd" content="$dateRevision" />
+#end
+#if ( $locale )
+		<meta http-equiv="Content-Language" content="$locale.language" />
+#end
+		$headContent
+		#googleAnalytics( $decoration.googleAnalyticsAccountId )
+	</head>
+	<body class="composite">
+		<a href="https://logging.apache.org/">
+			<img class="logo-left" src="$relativePath/images/logos/ls-logo.jpg" alt="Apache logging services logo" />
+		</a>
+		<img class="logo-right" src="$relativePath/images/logos/logo.png" alt="Apache log4j logo" />
+		<div class="clear"></div>
+
+		<div class="navbar">
+			<div class="navbar-inner">
+				<div class="container-fluid">
+					<a class="brand" href="$project.url">$project.name &#8482;</a>
+					#links( $decoration.body.links )
+
+					<div class="pull-right">
+						#publishDate( "right" $decoration.publishDate $decoration.version )
+					</div>
+				</div>
+			</div>
+		</div>
+
+		<div class="container-fluid">
+			<table class="layout-table">
+				<tr>
+					<td class="sidebar">
+						<div class="well sidebar-nav">
+							#mainMenu( $decoration.body.menus )
+						</div>
+						<div id="poweredBy">
+							#poweredByLogo( $decoration.poweredBy )
+						</div>
+					</td>
+					<td class="content">
+						$bodyContent
+					</td>
+				</tr>
+			</table>
+		</div>
+
+		<div class="footer">
+			#set ( $currentYear = ${currentDate.year} + 1900 )
+				<p>Copyright © ${project.inceptionYear}-${currentYear} <a class="external" href="$project.organization.url">${project.organization.name}</a>. All Rights Reserved.</p>
+				<p>Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, and the Apache Logging project logo are trademarks of The Apache Software Foundation.</p>
+				<p>Site powered by <a class="external" href="https://getbootstrap.com/">Twitter Bootstrap</a>. Icons from <a class="external" href="https://glyphicons.com/">Glyphicons Free</a>.</p>
+		</div>
+	</body>
+</html>
\ No newline at end of file
diff --git a/src/site/site.xml b/src/site/site.xml
index 55f3d77..c33ae73 100644
--- a/src/site/site.xml
+++ b/src/site/site.xml
@@ -15,55 +15,131 @@
  limitations under the License.
 
 -->
-<project name="log4cxx">
-  <bannerLeft>
-    <name>Logging Services</name>
-    <src>images/ls-logo.jpg</src>
-    <href>http://logging.apache.org/</href>
-  </bannerLeft>
-  <body>
-    <breadcrumbs>
-      <item name="Apache" href="http://www.apache.org/"/>
-      <item name="Logging Services" href="http://logging.apache.org/"/>
-      <item name="log4cxx" href="http://logging.apache.org:80/log4cxx/"/>
-    </breadcrumbs>
-  
-        <menu name="Get log4cxx">
-           <item name="Download" href="/download.html"/>
-           <item name="Changes" href="/changes-report.html"/>
-           <item name="License" href="/license.html"/>
-        </menu>
+<project	xmlns="http://maven.apache.org/DECORATION/1.4.0"
+			xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+			xsi:schemaLocation="http://maven.apache.org/DECORATION/1.4.0 https://maven.apache.org/xsd/decoration-1.4.0.xsd"
+			name="log4cxx">
 
-	<menu name="About log4cxx">
-	   <item name="What is log4cxx?" href="/index.html"/>
-		<item name="API Documentation" href="/apidocs/index.html"/>
-	   <item name="FAQ" href="/faq.html"/>
-	</menu>
+	<publishDate	position="right" />
+	<version		position="right" />
 
-        <menu name="Community">
-                <item name="Mailing Lists" href="/mail-lists.html"/>
-                <item name="Issue Tracking" href="/issue-tracking.html"/>
-                <item name="Wiki" href="http://wiki.apache.org/logging-log4cxx"/>
-        </menu>
-        
-        <menu name="Development">
-                <item name="Repository" href="/source-repository.html"/>
-        
-    <item name="Building">
-        <item name="autotools" href="/building/autotools.html"/>
-        <item name="Apache Ant" href="/building/ant.html"/>
-        <item name="Apache Maven 2" href="/building/maven.html"/>
-        <item name="Microsoft Visual Studio" href="/building/vstudio.html"/>
-        <item name="Apple Xcode" href="/building/xcode.html"/>
-    </item>
-    </menu>
+	<bannerLeft>
+		<name>Logging Services</name>
+		<src>images/logos/ls-logo.jpg</src>
+		<href>https://logging.apache.org</href>
+		<title>Open the Apache Logging homepage</title>
+	</bannerLeft>
 
-	<menu name="Apache">
-		<item name="Home" href="http://www.apache.org"/>	
-		<item name="Sponsorship" href="http://www.apache.org/foundation/sponsorship.html"/>
-		<item name="Thanks" href="http://www.apache.org/foundation/thanks.html"/>
-		<item name="Conferences" href="http://www.apachecon.com"/>
-	</menu>
+	<body>
+		<links>
+			<item	name="Logging Wiki"
+					href="https://wiki.apache.org/logging"
+			/>
+			<item	name="Apache"
+					href="https://www.apache.org/"
+			/>
+			<item	name="Logging Services"
+					href="https://logging.apache.org/"
+			/>
+			<item	name="GitHub"
+					href="https://github.com/apache/logging-log4cxx"
+			/>
+		</links>
 
-  </body>
+		<menu	name="About"
+				img="icon-home">
+			<item	name="What is log4cxx?"
+					href="/index.html"
+			/>
+			<item	name="Project Information"
+					href="project-info.html"
+			/>
+			<item	name="Generated Reports"
+					href="project-reports.html"
+			/>
+		</menu>
+
+		<menu	name="Usage"
+				img="icon-book">
+			<item	name="How to use log4cxx?"
+					href="/usage.html"
+			/>
+			<item	name="API Documentation"
+					href="/apidocs/index.html"
+			/>
+			<item	name="FAQ"
+					href="/faq.html"
+			/>
+		</menu>
+
+		<menu	name="Get"
+				img="icon-cog">
+			<item	name="Download"
+					href="/download.html"
+			/>
+			<item	name="Changes"
+					href="/changes-report.html"
+			/>
+			<item	name="License"
+					href="/license.html"
+			/>
+		</menu>
+
+		<menu	name="Community"
+				img="icon-pencil">
+			<item	name="Mailing Lists"
+					href="/mail-lists.html"
+			/>
+			<item	name="Issue Tracking"
+					href="/community/issue-tracking.html"
+			/>
+			<item	name="Wiki"
+					href="https://wiki.apache.org/logging-log4cxx"
+			/>
+		</menu>
+
+		<menu	name="Development"
+				img="icon-pencil">
+			<item	name="Repository"
+					href="/source-repository.html"
+			/>
+			<item	name="Dependencies"
+					href="dependencies.html"
+			/>
+			<item	name="Building"
+					href="/building/index.html">
+				<item	name="autotools"
+						href="/building/autotools.html"
+				/>
+				<item	name="Apache Ant"
+						href="/building/ant.html"
+				/>
+				<item	name="Apache Maven 2"
+						href="/building/maven.html"
+				/>
+				<item	name="Microsoft Visual Studio"
+						href="/building/vstudio.html"
+				/>
+				<item	name="Apple Xcode"
+						href="/building/xcode.html"
+				/>
+			</item>
+		</menu>
+
+		<menu	name="Apache"
+				img="icon-info-sign">
+			<item	name="Home"
+					href="https://www.apache.org"
+			/>
+			<item	name="Sponsorship"
+					href="https://www.apache.org/foundation/sponsorship.html"
+			/>
+			<item	name="Thanks"
+					href="https://www.apache.org/foundation/thanks.html"
+			/>
+			<item	name="Conferences"
+					href="https://www.apachecon.com"
+			/>
+		</menu>
+	</body>
 </project>
diff --git a/src/site/xdoc/building/index.xml b/src/site/xdoc/building/index.xml
new file mode 100644
index 0000000..1a28ce1
--- /dev/null
+++ b/src/site/xdoc/building/index.xml
@@ -0,0 +1,187 @@
+<!--

+ Licensed to the Apache Software Foundation (ASF) under one or more

+ contributor license agreements.  See the NOTICE file distributed with

+ this work for additional information regarding copyright ownership.

+ The ASF licenses this file to You under the Apache License, Version 2.0

+ (the "License"); you may not use this file except in compliance with

+ the License.  You may obtain a copy of the License at

+

+      http://www.apache.org/licenses/LICENSE-2.0

+

+ Unless required by applicable law or agreed to in writing, software

+ distributed under the License is distributed on an "AS IS" BASIS,

+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ See the License for the specific language governing permissions and

+ limitations under the License.

+

+-->

+<document>

+	<properties>

+		<title>Building Apache log4cxx</title>

+	</properties>

+

+	<body>

+		<section name="Building Apache log4cxx">

+			<p>

+				The project supports different build tools on different platforms, have a look at

+				the menu to find the platform you need. If your environment is not covered already,

+				feel free to ask about it on one of the <a href="../mail-lists.html">Mailing Lists</a>

+				or leave a bug in our <a href="../issue-tracking.html">Issue Tracker</a>. In this

+				case it would be very helpful of course if you could already provide some patches

+				to support your environment or at least provide some technical details about the

+				build tools, compiler etc. you use.

+			</p>

+		</section>

+

+		<section name="Covered by the team">

+			<p>

+				The following table provides an overview about the environments some of the team

+				members have access to and therefore normally should work out of the box or at

+				least were used sometimes in the past. This list by no means tells something about

+				how good the support on each platform is, it's just a guide.

+			</p>

+

+			<table>

+				<caption>Environments in use</caption>

+				<thead>

+					<tr>

+						<th id="os">OS</th>

+						<th id="os_x86_x64">x86 vs. x64</th>

+						<th id="environment">Environment</th>

+						<th id="compiler">Compiler</th>

+						<th id="compiler_x86_x64">x86 vs. x64</th>

+					</tr>

+				</thead>

+				<tbody>

+					<!-- Windows -->

+					<tr>

+						<td	headers="os"

+							rowspan="9">

+							Windows 7

+						</td>

+						<td	headers="os_x86_x64"

+							rowspan="9">

+							x64

+						</td>

+						<td	headers="environment"

+							rowspan="6">

+							Win32

+						</td>

+						<td	headers="compiler">

+							MS Visual Studio 2008

+						</td>

+						<td	headers="compiler_x86_x64"

+							rowspan="5">

+							both

+						</td>

+					</tr>

+					<tr>

+						<td headers="compiler">MS Visual Studio 2010 (Pro)</td>

+					</tr>

+					<tr>

+						<td headers="compiler">MS Visual Studio 2010 (Express)</td>

+					</tr>

+					<tr>

+						<td headers="compiler">MS Visual Studio 2012</td>

+					</tr>

+					<tr>

+						<td headers="compiler">MS Visual Studio 2013 (Express)</td>

+					</tr>

+					<tr>

+						<td headers="compiler">Embarcadero C++ Builder XE 4</td>

+						<td headers="compiler_x86_x64">x86</td>

+					</tr>

+					<tr>

+						<td	headers="environment"

+							rowspan="2">

+							MinGW

+						</td>

+						<td	headers="compiler">

+							gcc 4.5.4

+						</td>

+						<td	headers="compiler_x86_x64"

+							rowspan="3">

+							both

+						</td>

+					</tr>

+					<tr>

+						<td headers="compiler">gcc 4.6.4</td>

+					</tr>

+					<tr>

+						<td headers="environment">Cygwin</td>

+						<td headers="compiler">gcc 4.8.2</td>

+					</tr>

+					<!-- Linux -->

+					<tr>

+						<td	headers="os"

+							rowspan="2">

+							Debian

+						</td>

+						<td	headers="os_x86_x64"

+							rowspan="2">

+							x86

+						</td>

+						<td	headers="environment"

+							rowspan="11">

+							Posix

+						</td>

+						<td	headers="compiler">

+							gcc

+						</td>

+						<td	headers="compiler_x86_x64"

+							rowspan="2">

+							x86

+						</td>

+					</tr>

+					<tr>

+						<td headers="compiler">clang</td>

+					</tr>

+					<tr>

+						<td	headers="os" rowspan="7">

+							Ubuntu and Scientific Linux

+						</td>

+						<td	headers="os_x86_x64"

+							rowspan="9">

+							x64

+						</td>

+						<td	headers="compiler">

+							gcc 4.5

+						</td>

+						<td	headers="compiler_x86_x64"

+							rowspan="8">

+							both

+						</td>

+					</tr>

+					<tr>

+						<td headers="compiler">gcc 4.6</td>

+					</tr>

+					<tr>

+						<td headers="compiler">gcc 4.7</td>

+					</tr>

+					<tr>

+						<td headers="compiler">gcc 4.8</td>

+					</tr>

+					<tr>

+						<td headers="compiler">Intel 11.1</td>

+					</tr>

+					<tr>

+						<td headers="compiler">Intel 12.1</td>

+					</tr>

+					<tr>

+						<td headers="compiler">Intel 13.1</td>

+					</tr>

+					<tr>

+						<td headers="os">Red Hat</td>

+						<td headers="compiler">gcc</td>

+					</tr>

+					<!-- Mac OS X -->

+					<tr>

+						<td headers="os">Mac OS X 10.9 Mavericks</td>

+						<td headers="compiler">Xcode 5.0.2</td>

+						<td headers="compiler_x86_x64">x64</td>

+					</tr>

+				</tbody>

+			</table>

+		</section>

+	</body>

+</document>
\ No newline at end of file
diff --git a/src/site/xdoc/index.xml b/src/site/xdoc/index.xml
deleted file mode 100644
index 929cd96..0000000
--- a/src/site/xdoc/index.xml
+++ /dev/null
@@ -1,936 +0,0 @@
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements.  See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License.  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
--->
-<document>
-
-  <properties>
-    <title>Short introduction to Apache log4cxx</title>
-  </properties>
-  <body>
-<section name="Short introduction to Apache log4cxx">
-
-<h2>Introduction</h2>
-
-Apache log4cxx is a logging framework for C++ patterned after 
-<a href="http://logging.apache.org/log4j">Apache log4j</a>.
-Apache log4cxx uses <a href="http://apr.apache.org">Apache Portable Runtime</a>
-for most platform-specific code and should be usable on any
-platform supported by APR.  Apache log4cxx is licensed under the 
-<a href="http://www.apache.org/licenses/">Apache License</a>,
-an open source license certified by the 
-<a href="http://www.opensource.org/">Open Source Initiative</a>.
-
-<p>Almost every large application includes its own logging or tracing
-API.   Inserting log statements into code is a low-tech method for
-debugging it. It may also be the only way because debuggers are not
-always available or applicable. This is usually the case for
-multithreaded applications and distributed applications at large.</p>
-
-<p>Experience indicates that logging is an important component of the
-development cycle. It offeres several advantages. It provides precise
-<em>context</em> about a run of the application. Once inserted into
-the code, the generation of logging output requires no human
-intervention.  Moreover, log output can be saved in persistent medium
-to be studied at a later time. In addition to its use in the
-development cycle, a sufficiently rich logging package can also be
-viewed as an auditing tool.</p>
-
-<p>Logging does have its drawbacks. It can slow down an
-application. If too verbose, it can cause scrolling blindness. To
-alleviate these concerns, log4cxx is designed to be reliable, fast and
-extensible. Since logging is rarely the main focus of an application,
-the log4cxx API strives to be simple to understand and to use.</p>
-
-<h2>Loggers, Appenders and Layouts</h2>
-
-<p>Log4cxx has three main components: <em>loggers</em>,
-<em>appenders</em> and <em>layouts</em>. These three types of
-components work together to enable developers to log messages according
-to message type and level, and to control at runtime how these
-messages are formatted and where they are reported.</p>
-
-<h3>Logger hierarchy</h3>
-
-<p>The first and foremost advantage of any logging API over plain
-<code>std::cout</code> resides in its ability to disable
-certain log statements while allowing others to print unhindered. This
-capability assumes that the logging space, that is, the space of all
-possible logging statements, is categorized according to some
-developer-chosen criteria.</p>
-
-<p>Loggers are named entities. Logger names are case-sensitive and
-they follow the hierarchical naming rule:</p>
-
-<p>
-<table bgcolor="#EEEE99">
- <tr>
-  <td>
-   <dl>
-     <dt><b>Named Hierarchy</b></dt>
-
-     <dd>A logger is said to be an <em>ancestor</em> of another
-     logger if its name followed by a dot is a prefix of the
-     <em>descendant</em> logger name. A logger is said to be a
-     <em>parent</em> of a <em>child</em> logger if there are no
-     ancestors between itself and the descendant logger.</dd>
-
-
-   </dl>
-</td></tr></table></p>
-
-
-<p>For example, the logger named <code>"com.foo"</code> is a parent
-of the logger named <code>"com.foo.Bar"</code>.  Similarly,
-<code>"java"</code> is a parent of <code>"java.util"</code> and an
-ancestor of <code>"java.util.Vector"</code>.  This naming scheme
-should be familiar to most developers.</p>
-
-<p>The root logger resides at the top of the logger hierarchy. It
-is exceptional in two ways:
-
-<ol>
-<li> it always exists,</li>
-<li> it cannot be retrieved by name.</li>
-</ol></p>
-<p>Invoking the class static <a
-href="apidocs/classlog4cxx_1_1Logger.html#e3">log4cxx::Logger::getRootLogger</a>
-method retrieves it. All other loggers are instantiated and
-retrieved with the class static <a
-href="apidocs/classlog4cxx_1_1Logger.html#e0">log4cxx::Logger::getLogger</a>
-method. This method takes the name of the desired logger as a
-parameter. Some of the basic methods in the Logger class are listed
-below.</p>
-
-<p><table>
-<tr bgcolor="CCCCCC">
-<td>
-<pre>
-  namespace log4cxx {
-
-    class <b>Logger</b> {
-       public:
-       // Creation &amp; retrieval methods:
-       static LoggerPtr getRootLogger();
-       static LoggerPtr getLogger(const std::string&amp; name);
-       static LoggerPtr getLogger(const std::wstring&amp; name);
-
-     }
-   }
-//
-//   Use these macros instead of calling Logger methods directly.
-//   Macros will handle char or wchar_t pointers or strings
-//   or most right-hand side expressions of an 
-//   std::basic_string::operator&lt;&lt;.
-//   
-#define LOG4CXX_TRACE(logger, expression) ...   
-#define LOG4CXX_DEBUG(logger, expression) ...   
-#define LOG4CXX_INFO(logger, expression) ...   
-#define LOG4CXX_WARN(logger, expression) ...   
-#define LOG4CXX_ERROR(logger, expression) ...   
-#define LOG4CXX_FATAL(logger, expression) ...   
-</pre>
-</td>
-</tr>
-</table></p>
-
-<p>Loggers <em>may</em> be assigned levels. The pre-defined
-levels: TRACE, DEBUG, INFO, WARN, ERROR and FATAL are defined in the <code><a
-href="apidocs/classlog4cxx_1_1Level.html">log4cxx::Level</a></code>
-class which provides accessor functions.</p>
-
-<p>If a given logger is not assigned a level, then it inherits
-one from its closest ancestor with an assigned level. More
-formally:</p>
-
-
-<p>
-<table bgcolor="#EEEE99">
-  <tr>
-  <td>
-   <dl>
-     <dt><b>Level Inheritance</b></dt>
-
-     <dd><p>The <em>inherited level</em> for a given logger
-<i>C</i>, is equal to the first non-null level in the logger
-hierarchy, starting at <i>C</i> and proceeding upwards in the
-hierarchy towards the <code>root</code> logger.</p></dd>
-
-   </dl>
-   </td>
-   </tr>
-</table></p>
-
-<p>To ensure that all loggers can eventually inherit a level,
-the root logger always has an assigned level.</p>
-
-<p>Below are four tables with various assigned level values and the
-resulting inherited levels according to the above rule.</p>
-
-<p>
-<table border="1" >
-  <tr><th>Logger<br/>name</th><th>Assigned<br/>level</th>
-    <th>Inherited<br/>level</th></tr>
-    <tr align="left"><td>root</td>    <td>Proot</td> <td>Proot</td></tr>
-    <tr align="left"><td>X </td>      <td>none</td>  <td>Proot</td></tr>
-    <tr align="left"><td>X.Y </td>    <td>none</td>  <td>Proot</td></tr>
-    <tr align="left"><td>X.Y.Z</td>   <td>none</td>  <td>Proot</td></tr>
-    <caption align="bottom">Example 1</caption>
-</table></p>
-
-<p>In example 1 above, only the root logger is assigned a
-level. This level value, <code>Proot</code>, is inherited by the
-other loggers <code>X</code>, <code>X.Y</code> and
-<code>X.Y.Z</code>.</p>
-
-
-<p>
-<table border="1">
-    <tr><th>Logger<br/>name</th><th>Assigned<br/>level</th>
-    <th>Inherited<br/>level</th></tr>
-    <tr align="left"><td>root</td>    <td>Proot</td> <td>Proot</td></tr>
-    <tr align="left"><td>X </td>      <td>Px</td>    <td>Px</td></tr>
-    <tr align="left"><td>X.Y </td>    <td>Pxy</td>   <td>Pxy</td></tr>
-    <tr align="left"><td>X.Y.Z</td>   <td>Pxyz</td>  <td>Pxyz</td></tr>
-    <caption align="bottom">Example 2</caption>
-  </table></p>
-
-<p>In example 2, all loggers have an assigned level value. There
-is no need for level inheritence.</p>
-
-<p><table border="1">
-    <tr><th>Logger<br/>name</th><th>Assigned<br/>level</th>
-    <th>Inherited<br/>level</th></tr>
-    <tr align="left"><td>root</td>    <td>Proot</td> <td>Proot</td></tr>
-    <tr align="left"><td>X </td>      <td>Px</td>    <td>Px</td></tr>
-    <tr align="left"><td>X.Y </td>    <td>none</td>  <td>Px</td></tr>
-    <tr align="left"><td>X.Y.Z</td>   <td>Pxyz</td>  <td>Pxyz</td></tr>
-    <caption align="bottom">Example 3</caption>
-</table></p>
-
-<p>In example 3, the loggers <code>root</code>, <code>X</code> and
-<code>X.Y.Z</code> are assigned the levels <code>Proot</code>,
-<code>Px</code> and <code>Pxyz</code> respectively. The logger
-<code>X.Y</code> inherits its level value from its parent
-<code>X</code>.</p>
-
-<table border="1">
-    <tr><th>Logger<br/>name</th><th>Assigned<br/>level</th>
-    <th>Inherited<br/>level</th></tr>
-    <tr align="left"><td>root</td>    <td>Proot</td> <td>Proot</td></tr>
-    <tr align="left"><td>X </td>      <td>Px</td>    <td>Px</td></tr>
-    <tr align="left"><td>X.Y </td>    <td>none</td>  <td>Px</td></tr>
-    <tr align="left"><td>X.Y.Z</td>   <td>none</td>  <td>Px</td></tr>
-    <caption align="bottom">Example 4</caption>
-</table>
-
-<p>In example 4, the loggers <code>root</code> and <code>X</code>
-and are assigned the levels <code>Proot</code> and <code>Px</code>
-respectively. The loggers <code>X.Y</code> and <code>X.Y.Z</code>
-inherits their level value from their nearest parent <code>X</code>
-having an assigned level.</p>
-
-
-<p>Logging requests are made by invoking a method of
-a logger instance, preferrably through the use of LOG4CXX_INFO or similar
-macros which support short-circuiting if the threshold is not satisfied
-and use of the insertion operator (&lt;&lt;) in the message parameter.</p>
-
-<p><table bgcolor="CCCCCC"><tr><td><pre>
-   log4cxx::LoggerPtr logger(log4cxx::Logger::getLogger(<strong>"com.foo"</strong>));
-   const char* region = "World";
-   LOG4CXX_INFO(logger, "Simple message text.");
-   LOG4CXX_INFO(logger, "Hello, " &lt;&lt; region);
-   LOG4CXX_DEBUG(logger, L"Iteration " &lt;&lt; i);
-   LOG4CXX_DEBUG(logger, "e^10 = " &lt;&lt; std::scientific &lt;&lt; exp(10.0));
-   //
-   //  Use a wchar_t first operand to force use of wchar_t based stream.    
-   //
-   LOG4CXX_WARN(logger, L"" &lt;&lt; i &lt;&lt; L" is the number of the iteration.");
-</pre></td></tr></table></p>
-
-<p>A logging request is said to be <em>enabled</em> if its level is
-higher than or equal to the level of its logger. Otherwise, the
-request is said to be <em>disabled</em>. A logger without an
-assigned level will inherit one from the hierarchy. This rule is
-summarized below.</p>
-
-
-<p>
-<a name="selectionRule"/><table bgcolor="#EEEE99">
-  <tr>
-  <td>
-      <dl>
-	<dt><b>Basic Selection Rule</b></dt>
-
-	<dd><p>A log request of level <i>p</i> in a logger with
-	(either assigned or inherited, whichever is appropriate) level <i>q</i>, is enabled if <i> p &gt;=
-	q</i>.</p></dd>
-      </dl>
-</td></tr></table></p>
-
-<p>This rule is at the heart of log4cxx. It assumes that levels are
-ordered. For the standard levels, we have <code>TRACE &lt; DEBUG &lt; INFO
-&lt; WARN &lt; ERROR &lt; FATAL</code>.</p>
-
-<p>Here is an example of this rule.</p>
-
-<p><table bgcolor="CCCCCC">
-<tr><td>
-<pre>
-
-   // get a logger instance named "com.foo"
-   log4cxx::LoggerPtr  logger(log4cxx::Logger::getLogger(<strong>"com.foo"</strong>));
-
-   // Now set its level. Normally you do not need to set the
-   // level of a logger programmatically. This is usually done
-   // in configuration files.
-   <strong>logger</strong>->setLevel(<font
-   color="0000AA"><strong>log4cxx::Level::getInfo()</strong></font>);
-
-   log4cxx::LoggerPtr barlogger(log4cxx::Logger::getLogger(<strong>"com.foo.Bar"</strong>);
-
-   // This request is enabled, because <font color="00AA00"><strong>WARN</strong></font> &gt;= <font color="0000AA"><strong>INFO</strong></font>.
-   LOG4CXX_WARN(logger, "Low fuel level.");
-
-   // This request is disabled, because <font color="00AA00"><strong>DEBUG</strong></font> &lt; <font color="0000AA"><strong>INFO</strong></font>.
-   LOG4CXX_DEBUG(logger, "Starting search for nearest gas station.");
-
-   // The logger instance barlogger, named "com.foo.Bar",
-   // will inherit its level from the logger named
-   // "com.foo" Thus, the following request is enabled
-   // because <font color="00AA00"><strong>INFO</strong></font> &gt;= <font color="0000AA"><strong>INFO</strong></font>.
-   LOG4CXX_INFO(barlogger. "Located nearest gas station.");
-
-   // This request is disabled, because <font color="00AA00"><strong>DEBUG</strong></font> &lt; <font color="0000AA"><strong>INFO</strong></font>.
-   LOG4CXX_DEBUG(barlogger, "Exiting gas station search");
-</pre>
-</td></tr>
-</table></p>
-
-<p>Calling the <code>getLogger</code> method with the same name will
-always return a reference to the exact same logger object.</p>
-
-<p>For example, in
-
-<table bgcolor="CCCCCC">
-<tr><td>
-<pre>
-   log4cxx::LoggerPtr x = log4cxx::Logger::getLogger("wombat");
-   log4cxx::LoggerPtr y = log4cxx::Logger::getLogger("wombat");</pre>
-</td></tr>
-</table>
-<code>x</code> and <code>y</code> refer to <em>exactly</em> the same
-logger object.</p>
-
-<p>Thus, it is possible to configure a logger and then to retrieve
-the same instance somewhere else in the code without passing around
-references. In fundamental contradiction to biological parenthood,
-where parents always preceed their children, log4cxx loggers can be
-created and configured in any order. In particular, a "parent"
-logger will find and link to its descendants even if it is
-instantiated after them.</p>
-
-<p>Configuration of the log4cxx environment is typically done at
-application initialization. The preferred way is by reading a
-configuration file. This approach will be discussed shortly.</p>
-
-<p>Log4cxx makes it easy to name loggers by <em>software
-component</em>.  This can be accomplished by statically instantiating
-a logger in each class, with the logger name equal to the fully
-qualified name of the class. This is a useful and straightforward
-method of defining loggers. As the log output bears the name of the
-generating logger, this naming strategy makes it easy to identify
-the origin of a log message.  However, this is only one possible,
-albeit common, strategy for naming loggers. Log4cxx does not restrict
-the possible set of loggers. The developer is free to name the
-loggers as desired.</p>
-
-<p>Nevertheless, naming loggers after the class where they are
-located seems to be the best strategy known so far.</p>
-
-<h2>Appenders and Layouts</h2>
-
-<p>The ability to selectively enable or disable logging requests based
-on their logger is only part of the picture. Log4cxx allows logging
-requests to print to multiple destinations. In log4cxx speak, an output
-destination is called an <em>appender</em>. Currently, appenders exist
-for the <a href="apidocs/classlog4cxx_1_1ConsoleAppender.html">console</a>, <a
-href="apidocs/classlog4cxx_1_1FileAppender.html">files</a>, GUI
-components, <a
-href="apidocs/classlog4cxx_1_1net_1_1SocketAppender.html">remote socket</a>
-servers,  <a href="apidocs/classlog4cxx_1_1nt_1_1NTEventLogAppender.html"> NT
-Event Loggers</a>, and remote UNIX <a
-href="apidocs/classlog4cxx_1_1net_1_1SyslogAppender.html">Syslog</a>
-daemons. It is also possible to log <a href="apidocs/classlog4cxx_1_1AsyncAppender.html">asynchronously</a>.</p>
-
-<p>More than one appender can be attached to a logger.</p>
-
-<p>The <a
-href="apidocs/classlog4cxx_1_1Logger.html#a3">addAppender</a>
-method adds an appender to a given logger.
-
-<b>Each enabled logging
-request for a given logger will be forwarded to all the appenders in
-that logger as well as the appenders higher in the hierarchy.</b> In
-other words, appenders are inherited additively from the logger
-hierarchy. For example, if a console appender is added to the root
-logger, then all enabled logging requests will at least print on the
-console. If in addition a file appender is added to a logger, say
-<em>C</em>, then enabled logging requests for <em>C</em> and
-<em>C</em>'s children will print on a file <em>and</em> on the
-console. It is possible to override this default behavior so that
-appender accumulation is no longer additive by <a
-href="apidocs/classlog4cxx_1_1Logger.html#a46">setting
-the additivity flag</a> to <code>false</code>.</p>
-
-<p>The rules governing appender additivity are summarized below.</p>
-
-<p>
-<a name="additivity"/><table bgcolor="#EEEE99">
-  <tr>
-  <td>
-      <dl>
-	<dt><b>Appender Additivity</b></dt>
-
-	<dd><p>The output of a log statement of logger <i>C</i> will
-	go to all the appenders in <i>C</i> and its ancestors. This is
-	the meaning of the term "appender additivity".</p>
-
-	<p>However, if an ancestor of logger <i>C</i>, say <i>P</i>,
-	has the additivity flag set to <code>false</code>, then
-	<i>C</i>'s output will be directed to all the appenders in
-	<i>C</i> and it's ancestors upto and including <i>P</i> but
-	not the appenders in any of the ancestors of <i>P</i>.</p>
-
-	<p>Loggers have their additivity flag set to
-	<code>true</code> by default.</p></dd>
-      </dl></td></tr>
-</table></p>
-
-
-<p>The table below shows an example:</p>
-
-<p><table align="center" border="3" cellpadding="10">
-  <tr rowspan="2">
-  <th>Logger<br/>Name </th><th>Added<br/>Appenders</th> <th>Additivity<br/>Flag</th> <th>Output Targets</th> <th>Comment</th>
-  </tr>
-<tr><td>root    </td><td>A1         </td><td>not applicable </td><td>A1</td>
-
-    <td>The root logger is anonymous but can be accessed with the
-        log4cxx::Logger::getRootLogger() method. There is no default appender
-        attached to root.</td></tr>
-
-<tr><td>x       </td><td>A-x1, A-x2 </td><td>true </td><td>A1, A-x1, A-x2</td>
-    <td>Appenders of "x" and root.</td></tr>
-
-<tr><td>x.y     </td><td>none       </td><td>true </td><td>A1, A-x1, A-x2</td>
-    <td>Appenders of "x" and root.</td></tr>
-
-<tr><td>x.y.z   </td><td>A-xyz1     </td><td>true </td><td>A1, A-x1, A-x2, A-xyz1</td>
-    <td>Appenders in "x.y.z", "x" and root.</td></tr>
-
-<tr><td>security        </td><td>A-sec	   </td><td><font color="blue">false</font></td>
-                                           <td>A-sec</td>
-
-    <td>No appender accumulation since the additivity flag is set to
-        <code>false</code>.</td></tr>
-
-<tr><td>security.access </td><td>none </td><td> true </td><td> A-sec </td><td>Only
-    appenders of "security" because the additivity flag in "security" is
-    set to <code>false</code>.</td></tr>
-
-</table>
-
-
-<p>More often than not, users wish to customize not only the output
-destination but also the output format. This is accomplished by
-associating a <em>layout</em> with an appender. The layout is
-responsible for formatting the logging request according to the user's
-wishes, whereas an appender takes care of sending the formatted output
-to its destination.</p>
-
-The <a
-href="apidocs/classlog4cxx_1_1PatternLayout.html">PatternLayout</a>, part
-of the standard log4cxx distribution, lets the user specify the output
-format according to conversion patterns similar to the C language
-<code>printf</code> function.</p>
-
-<p>For example, the PatternLayout with the conversion pattern "%r [%t]
-%-5p %c - %m%n" will output something akin to:<br/>
-
-<pre>
-176 [main] INFO  org.foo.Bar - Located nearest gas station.
-</pre></p>
-
-<p>The first field is the number of milliseconds elapsed since the
-start of the program.  The second field is the thread making the log
-request.  The third field is the level of the log statement. The
-fourth field is the name of the logger associated with the log
-request. The text after the '-' is the message of the statement.</p>
-
-
-<h2>Configuration</h2>
-
-<p>Inserting log requests into the application code requires a fair
-amount of planning and effort. Observation shows that approximately 4
-percent of code is dedicated to logging. Consequently, even moderately
-sized applications will have thousands of logging statements embedded
-within their code.  Given their number, it becomes imperative to
-manage these log statements without the need to modify them manually.</p>
-
-<p>The log4cxx environment is fully configurable programmatically.
-However, it is far more flexible to configure log4cxx using
-configuration files.  Currently, configuration files can be written in
-XML or in Java properties (key=value) format.</p>
-
-<p>Let us give a taste of how this is done with the help of an
-imaginary application <code>MyApp</code> that uses log4cxx.</p>
-
-<p><table bgcolor="CCCCCC"><tr><td>
-<pre>
-#include "com/foo/bar.h"
-using namespace com::foo;
-
-// include log4cxx header files.
-#include "log4cxx/logger.h"
-#include "log4cxx/basicconfigurator.h"
-#include "log4cxx/helpers/exception.h"
-
-using namespace log4cxx;
-using namespace log4cxx::helpers;
-
-LoggerPtr logger(Logger::getLogger("MyApp"));
-
-int main(int argc, char **argv)
-{
-        int result = EXIT_SUCCESS;
-        try
-        {
-                // Set up a simple configuration that logs on the console.
-                BasicConfigurator::configure();
-
-                LOG4CXX_INFO(logger, "Entering application.");
-                Bar bar;
-                bar.doIt();
-                LOG4CXX_INFO(logger, "Exiting application.");
-        }
-        catch(Exception&amp;)
-        {
-                result = EXIT_FAILURE;
-        }
-
-        return result;
-}
-</pre>
-</td></tr>
-</table></p>
-
-<p><code>MyApp</code> begins by including log4cxx headers.  It
-then defines a static logger variable with the name
-<code>MyApp</code> which happens to be the fully qualified name of the
-class.</p>
-
-<p><code>MyApp</code> uses the <code>Bar</code> class defined in header
-file <code>com/foo/bar.h</code>.</p>
-
-<p><table bgcolor="CCCCCC"><tr><td>
-<pre>
-//  file com/foo/bar.h
-#include "log4cxx/logger.h"
-
-namespace com {
-   namespace foo {
-      class Bar {
-          static log4cxx::LoggerPtr logger;
-          
-      public:
-          void doIt();
-       }
-    }
-}
-</pre>
-
-<pre>
-// file bar.cpp
-#include "com/foo/bar.h"
-
-using namespace com::foo;
-using namespace log4cxx;
-
-LoggerPtr Bar::logger(Logger::getLogger("com.foo.bar"));
-
-void Bar::doIt() {
-   LOG4CXX_DEBUG(logger, "Did it again!");
-}
-</pre>
-</td></tr>
-</table></p>
-
-<p>The invocation of the <a
-href="apidocs/classlog4cxx_1_1BasicConfigurator.html#e0">BasicConfigurator::configure</a>
-method creates a rather simple log4cxx setup. This method is hardwired
-to add to the root logger a <a
-href="apidocs/classlog4cxx_1_1ConsoleAppender.html">
-ConsoleAppender</a>. The output will be formatted using a <a
-href="apidocs/classlog4cxx_1_1PatternLayout.html">PatternLayout</a> set
-to the pattern "%-4r [%t] %-5p %c %x - %m%n".</p>
-
-<p>Note that by default, the root logger is assigned to
-<code>Level::getDebug()</code>.</p>
-
-<p>The output of MyApp is:
-<pre>
-0    [12345] INFO  MyApp  - Entering application.
-36   [12345] DEBUG com.foo.Bar  - Did it again!
-51   [12345] INFO  MyApp  - Exiting application.
-</pre></p>
-
-<p>The previous example always outputs the same log information.
-Fortunately, it is easy to modify <code>MyApp</code> so that the log
-output can be controlled at run-time. Here is a slightly modified
-version.</p>
-
-<p><table bgcolor="CCCCCC"><tr><td>
-<pre>
-// file MyApp2.cpp
-
-#include "com/foo/bar.h"
-using namespace com::foo;
-
-// include log4cxx header files.
-#include "log4cxx/logger.h"
-#include "log4cxx/basicconfigurator.h"
-#include "log4cxx/propertyconfigurator.h"
-#include "log4cxx/helpers/exception.h"
-
-using namespace log4cxx;
-using namespace log4cxx::helpers;
-// Define a static logger variable so that it references the
-// Logger instance named "MyApp".
-LoggerPtr logger(Logger::getLogger("MyApp"));
-
-int main(int argc, char **argv)
-{
-        int result = EXIT_SUCCESS;
-        try
-        {
-                if (argc > 1)
-                {
-                        // BasicConfigurator replaced with PropertyConfigurator.
-                        PropertyConfigurator::configure(argv[1]);
-                }
-                else
-                {
-                        BasicConfigurator::configure();
-                }
-
-                LOG4CXX_INFO(logger, "Entering application.");
-                Bar bar
-                bar.doIt();
-                LOG4CXX_INFO(logger, "Exiting application.");
-        }
-        catch(Exception&amp;)
-        {
-                result = EXIT_FAILURE;
-        }
-
-        return result;
-}
-</pre>
-</td></tr>
-</table>
-
-<p>This version of <code>MyApp</code> instructs
-<code>PropertyConfigurator</code> to parse a configuration file and
-set up logging accordingly.</p>
-
-<p>Here is a sample configuration file that results in exactly same
-output as the previous <code>BasicConfigurator</code> based example.</p>
-
-<p><table bgcolor="CCAAAA"><tr><td>
-<pre>
-# Set root logger level to DEBUG and its only appender to A1.
-log4j.rootLogger=DEBUG, A1
-
-# A1 is set to be a ConsoleAppender.
-log4j.appender.A1=org.apache.log4j.ConsoleAppender
-
-# A1 uses PatternLayout.
-log4j.appender.A1.layout=org.apache.log4j.PatternLayout
-log4j.appender.A1.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n
-</pre>
-</td></tr></table></p>
-
-<p>It can be noticed that the PropertyConfigurator file format is the same as log4j.</p>
-
-<p>Suppose we are no longer interested in seeing the output of any
-component belonging to the <code>com::foo</code> package. The following
-configuration file shows one possible way of achieving this.</p>
-
-<p><table bgcolor="CCAAAA"><tr><td>
-<pre>
-log4j.rootLogger=DEBUG, A1
-log4j.appender.A1=org.apache.log4j.ConsoleAppender
-log4j.appender.A1.layout=org.apache.log4j.PatternLayout
-
-# <strong>Print the date in ISO 8601 format</strong>
-log4j.appender.A1.layout.ConversionPattern=<strong>%d</strong> [%t] %-5p %c - %m%n
-
-# Print only messages of level WARN or above in the package com.foo.
-<strong>log4j.logger.com.foo=WARN</strong>
-</pre>
-</td></tr></table></p>
-
-<p>The output of <code>MyApp</code> configured with this file is shown below.</p>
-
-<pre>
-<strong>2000-09-07 14:07:41,508</strong> [12345] INFO  MyApp - Entering application.
-<strong>2000-09-07 14:07:41,529</strong> [12345] INFO  MyApp - Exiting application.
-</pre>
-
-<p>As the logger <code>com.foo.Bar</code> does not have an assigned
-level, it inherits its level from <code>com.foo</code>, which
-was set to WARN in the configuration file. The log statement from the
-<code>Bar::doIt</code> method has the level DEBUG, lower than the
-logger level WARN. Consequently, <code>doIt()</code> method's log
-request is suppressed.</p>
-
-<p>Here is another configuration file that uses multiple appenders.</p>
-
-<p><table bgcolor="CCAAAA"><tr><td>
-<pre>
-log4j.rootLogger=debug, <strong>stdout, R</strong>
-
-log4j.appender.<strong>stdout</strong>=org.apache.log4j.ConsoleAppender
-log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
-
-# Pattern to output the caller's file name and line number.
-log4j.appender.stdout.layout.ConversionPattern=%5p [%t] <strong>(%F:%L)</strong> - %m%n
-
-log4j.appender.<strong>R</strong>=org.apache.log4j.RollingFileAppender
-log4j.appender.R.File=example.log
-
-log4j.appender.R.MaxFileSize=<strong>100KB</strong>
-# Keep one backup file
-log4j.appender.R.MaxBackupIndex=1
-
-log4j.appender.R.layout=org.apache.log4j.PatternLayout
-log4j.appender.R.layout.ConversionPattern=%p %t %c - %m%n
-</pre>
-</td></tr></table></p>
-
-<p>Calling the enhanced MyApp with the this configuration file will
-output the following on the console.</p>
-
-<pre>
- INFO [12345] <strong>(MyApp2.cpp:31)</strong> - Entering application.
-DEBUG [12345] (Bar.h:16) - Doing it again!
- INFO [12345] (MyApp2.cpp:34) - Exiting application.
-</pre></p>
-
-<p>In addition, as the root logger has been allocated a second
-appender, output will also be directed to the <code>example.log</code>
-file. This file will be rolled over when it reaches 100KB. When
-roll-over occurs, the old version of <code>example.log</code> is
-automatically moved to <code>example.log.1</code>.</p>
-
-<p>Note that to obtain these different logging behaviors we did not
-need to recompile code. We could just as easily have logged to a UNIX
-Syslog daemon, redirected all <code>com.foo</code> output to an NT
-Event logger, or forwarded logging events to a remote log4cxx server,
-which would log according to local server policy, for example by
-forwarding the log event to a second log4cxx server.</p>
-
-<a name="defaultInit"/><h2>Default Initialization Procedure</h2>
-
-<p>The log4cxx library does not make any assumptions about its
-environment. In particular, there are no default log4cxx
-appenders. Under certain well-defined circumstances however, the
-static inializer of the <code>Logger</code> class will attempt to
-automatically configure log4cxx.</p>
-
-<p>The exact default initialization algorithm is defined as follows:</p>
-
-<ol>
-
-  <li><p>Set the configurationOptionStr string variable to the value of the 
-  <b>LOG4CXX_CONFIGURATION</b> environment variable if set, otherwise 
-  the value of the <b>log4j.configuration</b> or <b>LOG4CXX_CONFIGURATION</b>
-  environment variable if set, 
-  otherwise the first of the following file names which exist in the 
-  current working directory, "log4cxx.xml", "log4cxx.properties", 
-  "log4j.xml" and "log4j.properties". 
-  If configurationOptionStr has not been set, then disable logging.</p></li> 
-
-  <li><p>Unless a custom configurator is specified using the 
-  <b>LOG4CXX_CONFIGURATOR_CLASS</b> or <b>log4j.configuratorClass</b>
-  environment variable, the PropertyConfigurator will be used to configure
-  log4cxx unless the file name ends with the ".xml" extension, 
-  in which case the DOMConfigurator will be used. 
-  If a custom configurator is specified, the environment variable 
-  should contain a fully qualified class name of a class that 
-  implements the Configurator interface.</p>
-  </li>
-
-</ol>
-
-
-<h2> Nested Diagnostic Contexts</h2>
-
-<p>Most real-world systems have to deal with multiple clients
-simultaneously. In a typical multithreaded implementation of such a
-system, different threads will handle different clients. Logging is
-especially well suited to trace and debug complex distributed
-applications. A common approach to differentiate the logging output of
-one client from another is to instantiate a new separate logger for
-each client. This promotes the proliferation of loggers and
-increases the management overhead of logging.</p>
-
-<p>A lighter technique is to uniquely stamp each log request initiated
-from the same client interaction. Neil Harrison described this method
-in the book "Patterns for Logging Diagnostic Messages," in <em>Pattern
-Languages of Program Design 3</em>, edited by R. Martin, D.  Riehle,
-and F. Buschmann (Addison-Wesley, 1997).</p>
-
-
-
-<p> To uniquely stamp each request, the
-user pushes contextual information into the NDC, the abbreviation of
-<em>Nested Diagnostic Context</em>. The NDC class is shown below.
-
-<pre>
-namespace log4cxx {
-  class NDC {
-  public:
-    //  pushes the value on construction and pops on destruction.
-    NDC(const std::string&amp; value);
-    NDC(const std::wstring&amp; value);
-
-    // Remove the top of the context from the NDC.
-    <strong>static</strong> LogString pop();
-
-    // Add diagnostic context for the current thread.
-    <strong>static</strong> void push(const std::string&amp; message);
-    <strong>static</strong> void push(const std::wstring&amp; message);
-  }
-</pre></p>
-
-<p>The NDC is managed per thread as a <em>stack</em> of contextual
-information. Note that all methods of the <code>log4cxx::NDC</code>
-class are static. Assuming that NDC printing is turned on, every time
-a log request is made, the appropriate log4cxx component will include
-the <em>entire</em> NDC stack for the current thread in the log
-output. This is done without the intervention of the user, who is
-responsible only for placing the correct information in the NDC by
-using the <code>push</code> and <code>pop</code> methods at a few
-well-defined points in the code.  In contrast, the per-client logger
-approach commands extensive changes in the code.</p>
-
-<p>To illustrate this point, let us take the example of a servlet
-delivering content to numerous clients. The servlet can build the NDC
-at the very beginning of the request before executing other code. The
-contextual information can be the client's host name and other
-information inherent to the request, typically information contained
-in cookies. Hence, even if the servlet is serving multiple clients
-simultaneously, the logs initiated by the same code, i.e. belonging to
-the same logger, can still be distinguished because each client
-request will have a different NDC stack. Contrast this with the
-complexity of passing a freshly instantiated logger to all code
-exercised during the client's request.</p>
-
-<p>Nevertheless, some sophisticated applications, such as virtual
-hosting web servers, must log differently depending on the virtual
-host context and also depending on the software component issuing the
-request. Recent log4cxx releases support multiple hierarchy trees. This
-enhancement allows each virtual host to possess its own copy of the
-logger hierarchy.</p>
-
-
-<a name="performance"/><h2>Performance</h2>
-
-<p>One of the often-cited arguments against logging is its
-computational cost. This is a legitimate concern as even moderately
-sized applications can generate thousands of log requests.  Much
-effort was spent measuring and tweaking logging performance. Log4cxx
-claims to be fast and flexible: speed first, flexibility second.</p>
-
-<p>The user should be aware of the following performance issues.</p>
-
-<ol>
-  <li><b>Logging performance when logging is turned off.</b><br/>
-
-   <p>When logging is turned
-   off entirely or just for a set
-   of levels, the cost of a log request consists of a method
-   invocation plus an integer comparison.  The LOG4CXX_DEBUG and similar
-   macros suppress unnecessary expression evaluation if the
-   request is not enabled.</p></li>
-
-   <li><b>The performance of deciding whether to log or not to log when
-       logging is turned on.</b><br/>
-
-   <p>This is essentially the performance of walking the logger
-   hierarchy. When logging is turned on, log4cxx still needs to compare
-       the level of the log request with the level of the request
-   logger. However, loggers may not have an assigned
-   level; they can inherit them from the logger hierarchy. Thus,
-   before inheriting a level, the logger may need to search its
-   ancestors.</p>
-
-   <p>There has been a serious effort to make this hierarchy walk to
-be as fast as possible. For example, child loggers link only to
-their existing ancestors. In the <code>BasicConfigurator</code>
-example shown earlier, the logger named <code>com.foo.Bar</code> is
-linked directly to the root logger, thereby circumventing the
-nonexistent <code>com</code> or <code>com.foo</code> loggers. This
-significantly improves the speed of the walk, especially in "sparse"
-hierarchies.</p>
-
-       <p>The cost of walking the hierarchy is typically 3
-       times slower than when logging is turned off entirely.</p></li>
-
-   <li><b>Actually outputting log messages</b><br/>
-
-   <p>This is the cost of formatting the log output and sending it to
-   its target destination. Here again, a serious effort was made to
-   make layouts (formatters) perform as quickly as possible. The same
-   is true for appenders.</p>
-
-   </li>
-
-</ol>
-
-
-<h2>Conclusions</h2>
-
-<p>Apache Log4cxx is a popular logging package written in C++.  One of its
-distinctive features is the notion of inheritance in loggers. Using
-a logger hierarchy it is possible to control which log statements
-are output at arbitrary granularity. This helps reduce the volume of
-logged output and minimize the cost of logging.</p>
-
-<p>One of the advantages of the log4cxx API is its manageability. Once
-the log statements have been inserted into the code, they can be
-controlled with configuration files. They can be selectively enabled
-or disabled, and sent to different and multiple output targets in
-user-chosen formats. The log4cxx package is designed so that log
-statements can remain in shipped code without incurring a heavy
-performance cost.</p>
-
-</section>
-</body>
-</document>
\ No newline at end of file
diff --git a/src/site/xdoc/stylesheets/project.xml b/src/site/xdoc/stylesheets/project.xml
deleted file mode 100755
index 29d68e8..0000000
--- a/src/site/xdoc/stylesheets/project.xml
+++ /dev/null
@@ -1,43 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements.  See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License.  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
--->
-<project name="Logging Services"
-         href="http://logging.apache.org/">
-
-  <title>log4cxx</title>
-  <!-- <logo href="images/logo.jpg">Apache Logging Services</logo> -->
-  <copyright year="2004-2006" />
-  
-  <body>
-    
-    <menu name="Apache">
-     <item name="Apache Home" href="http://www.apache.org" />
-     <item name="Logging Services" href="http://logging.apache.org/" />
-    </menu>
-
-   <menu name="log4cxx project">
-     <item name="Introduction" href="/index.html"/>
-     <item name="Download" href="/download.html"/>
-     <item name="Documentation" href="/manual/Introduction.html"/>
-     <item name="SVN Repositories" href="http://logging.apache.org/site/cvs-repositories.html"/>
-     <item name="Mailing Lists" href="http://logging.apache.org/site/mailing-lists.html"/>
-     <item name="Bug Reporting" href="http://logging.apache.org/site/bugreport.html"/>
-   </menu>
-
-   </body>
-</project>
diff --git a/src/site/xdoc/stylesheets/site.css b/src/site/xdoc/stylesheets/site.css
deleted file mode 100644
index 73cd1bb..0000000
--- a/src/site/xdoc/stylesheets/site.css
+++ /dev/null
@@ -1,156 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-H1, H2, H3 {
- color: #101099;
-}
-
-A:link, A:visited {
-  text-decoration: none;
-  color: #006699;
-}
-
-A:link:hover {
-  text-decoration: underline;
-}
-
-.centercol {
-  margin-top: 120px;
-  margin-left: 210px;
-  margin-right:210px;
-  max-width: 800px;
-}
-
-.leftcol {
-  position: absolute;
-  left:  10px;
-  top:   130px; 
-  width: 190px;
-}
-
-.banner {
-  position: absolute;
-  left:  10px;
-  top:   10px; 
-  height: 130px;
-  width: 1000px;
-}
-
-.menu_header, .menu_item {
-/*  width: 190px; */
-  font-family: "trebuchet MS", Arial, Helvetica, sans-serif;
-  font-size: smaller;
-}
-
-.menu_header {
-  border:1px solid #AAAAAA;
-  background: #CCCCCC; 
-  padding-left: 1ex;
-}
-
-.menu_item:hover {
-  background: #DDD; 
-}
-
-.menu_item {
-  background: #EEEEEE;
-  padding-left: 2ex;
-  border-top:   0px solid #AAAAAA;
-  border-right: 1px solid #AAAAAA;
-  border-bottom:1px solid #AAAAAA;
-  border-left:  1px solid #AAAAAA;
-}
-
-.source {
-  border-top: 1px solid #DDDDDD;
-  border-bottom: 1px solid #DDDDDD;
-  background:#eee;
-  font-family: Courier, "MS Courier New", Prestige, Everson Monocourrier, monospace;
-  font-size: smaller;
-  padding-bottom: 0.5ex;
-  padding-top: 0.5ex;
-  padding-left: 2ex;
-}
-
-table.ls {
-  background: #FFFFFF;
-}
-table.ls td {
-  background: #f4f4f4; 
-  vertical-align: top;
-  padding-bottom: 1ex;
-}
-
-table.ls th {
-  background: #E4E4E4;
-}
-
-.index-faqSection {
-   font-size: larger;
-   padding-left: 0em;
-   font-weight: bolder;
-}
-.index-question {
-   padding-left: 1em;
-}
-
-.faqSection {
-  font-size: larger;
-  font-weight: bolder;
-}
-
-.question {
-  font-weight: bolder;
-}
-
-/* this class is used for screen output placed in <pre></pre> tags */
-.screen_output {
-  padding-left:  1em;
-  padding-right: 1em;
-  border-top:   1px solid #AAAAAA;
-  border-right: 1px solid #AAAAAA;
-  border-bottom:1px solid #AAAAAA;
-  border-left:  1px solid #AAAAAA;
-}
-
-
-.big {
-  font-size: larger;
-  font-weight: bold;
-}
-
-.small {
-  font-size: smaller;
-}
-
-.red {
-  color: #AA0000;
-}
-
-.msg_title {
-  padding-left:  1ex;
-  padding-right: 1ex;
-  font-family: Courier, "MS Courier New", Prestige, Everson Monocourrier, monospace;
-  border:   1px solid #AAAAAA;
-  background: #DDDDFF;
-
-}
-
-.msg_meaning {
-  padding-left:  1em;
-  padding-right: 1em;
-}
diff --git a/src/site/xdoc/stylesheets/site.vsl b/src/site/xdoc/stylesheets/site.vsl
deleted file mode 100755
index 04cf801..0000000
--- a/src/site/xdoc/stylesheets/site.vsl
+++ /dev/null
@@ -1,357 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-
-<!-- Content Stylesheet for Site -->
-
-    ## Defined variables
-    #set ($bodybg = "#ffffff")
-    #set ($bodyfg = "#000000")
-    #set ($bodylink = "#525D76")
-
-    #set ($titlebg = "#FFFFFF")
-    #set ($titlefg = "#2222AA")
-
-##    #set ($bannerbg = "#525D76")
-    #set ($bannerbg = "#FFFFFF")
-    #set ($bannerfg = "#2222AA")
-
-    #set ($subbannerbg = "#828DA6")
-    #set ($subbannerfg = "#ffffff")
-    #set ($tablethbg = "#039acc")
-    #set ($tabletdbg = "#a0ddf0")
-
-<!-- start the processing -->
-#document()
-<!-- end the processing -->
-
-## This is where the macro's live
-
-#macro ( table $table)
-<table>
-    #foreach ( $items in $table.getChildren() )
-        #if ($items.getName().equals("tr"))
-            #tr ($items)
-        #end
-    #end
-</table>
-#end
-
-#macro ( tr $tr)
-<tr>
-    #foreach ( $items in $tr.getChildren() )
-        #if ($items.getName().equals("td"))
-            #td ($items)
-        #elseif ($items.getName().equals("th"))
-            #th ($items)
-        #end
-    #end
-</tr>
-#end
-
-#macro ( td $value)
-#if ($value.getAttributeValue("colspan"))
-#set ($colspan = $value.getAttributeValue("colspan"))
-#end
-#if ($value.getAttributeValue("rowspan"))
-#set ($rowspan = $value.getAttributeValue("rowspan"))
-#end
-<td bgcolor="$tabletdbg" colspan="$!colspan" rowspan="$!rowspan" valign="top" align="left">
-    <font color="#000000" size="-1" face="arial,helvetica,sanserif">
-        #if ($value.getText().length() != 0 || $value.hasChildren())
-        $value.getContent()
-        #else
-        &nbsp;
-        #end
-    </font>
-</td>
-#end
-
-#macro ( th $value)
-#if ($value.getAttributeValue("colspan"))
-#set ($colspan = $value.getAttributeValue("colspan"))
-#end
-#if ($value.getAttributeValue("rowspan"))
-#set ($rowspan = $value.getAttributeValue("rowspan"))
-#end
-<th bgcolor="$tablethbg" colspan="$!colspan" rowspan="$!rowspan" valign="top" align="left">
-    <font color="#000000" size="-1" face="arial,helvetica,sanserif">
-        #if ($value.getText().length() != 0 || $value.hasChildren())
-        $value.getContent()
-        #else
-        &nbsp;
-        #end
-    </font>
-</th>
-#end
-
-#macro ( projectanchor $name $value )
-#if ($value.startsWith("http://"))
-    <a href="$value">$name</a>
-## #elseif ($value.startsWith("/site"))
-##    <a href="http://logging.apache.org/site/$value">$name</a>
-#else
-    <a href="$relativePath$value">$name</a>
-#end
-#end
-
-#macro ( metaauthor $author $email )
-            <meta name="author" value="$author">
-            <meta name="email" value="$email">
-#end
-
-#macro ( image $value )
-#if ($value.getAttributeValue("width"))
-#set ($width=$value.getAttributeValue("width"))
-#end
-#if ($value.getAttributeValue("height"))
-#set ($height=$value.getAttributeValue("height"))
-#end
-#if ($value.getAttributeValue("align"))
-#set ($align=$value.getAttributeValue("align"))
-#end
-<img src="$relativePath$value.getAttributeValue("src")" width="$!width" height="$!height" align="$!align">
-#end
-
-#macro ( source $value)
-    <div align="left">
-    <table cellspacing="4" cellpadding="0" border="0">
-    <tr>
-      <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
-      <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
-      <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
-    </tr>
-    <tr>
-      <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
-      <td bgcolor="#ffffff"><pre>$escape.getText($value.getText())</pre></td>
-      <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
-    </tr>
-    <tr>
-      <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
-      <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
-      <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
-    </tr>
-    </table>
-    </div>
-#end
-
-## ============================================
-##  subsection macro
-## ============================================
-#macro ( subsection $subsection)
-        <h3>$subsection.getAttributeValue("name")</strong></h3>
-        #foreach ( $items in $subsection.getChildren() )
-            #if ($items.getName().equals("img"))
-                #image ($items)
-            #elseif ($items.getName().equals("source"))
-                #source ($items)
-            #elseif ($items.getName().equals("table"))
-                #table ($items)
-            #else
-                $items
-            #end
-        #end
-#end
-
-## ===================================
-##          titleSection macro
-## ===================================
-#macro ( titleSection $titleSection)
-  <font size="+2" color="$titlefg"><b>$titleSection.getAttributeValue("name")</b></font>
-#end
-
-## ================================
-##          section macro
-## ================================
-#macro ( section $section)
-  <h1>$section.getAttributeValue("name")</strong></h1>
-        #foreach ( $items in $section.getChildren() )
-            #if ($items.getName().equals("img"))
-                #image ($items)
-            #elseif ($items.getName().equals("source"))
-                #source ($items)
-            #elseif ($items.getName().equals("table"))
-                #table ($items)
-            #elseif ($items.getName().equals("subsection"))
-                #subsection ($items)
-            #else
-                $items
-            #end
-        #end
-#end
-
-## ===================================
-##  make navigation bar
-## ===================================
-
-#macro ( makeNavigationBar )
-  <!-- ============================================================ -->
-  <table id="navbar" border="0" cellspacing="0" cellpadding="0">
-    #set ($menus = $project.getChild("body").getChildren("menu"))
-    #foreach ( $menu in $menus )
-       #if ( $velocityCount != 1 )
-##         <tr bgcolor="#999999">
-##                 <td><html:img page="/images/space2.gif" height="1"></html:img></td>
-##         </tr>
-       #end
-       <tr >
-         <td class="navbarHeader" nowrap="true">
-           <strong>$menu.getAttributeValue("name")</strong>
-         </td>
-       </tr>
-       #foreach ( $item in $menu.getChildren() )
-         #set ($name = $item.getAttributeValue("name"))
-         <tr><td class="navbarItem"><small>#projectanchor($name $item.getAttributeValue("href"))</small></td></tr>
-       #end
-    #end
-  </table>
-
-#end
-
-## ====================================
-##      getProjectImage
-## ====================================
-#macro (getProjectImage)
-  #if ($project.getChild("logo"))
-    <td align="left">
-       <a href="http://logging.apache.org">
-           <img src="http://logging.apache.org/images/ls-logo.jpg" border="0"/></a>
-    </td>
-    <td align="right">
-      #set ( $logoString = $project.getChild("logo").getAttributeValue("href") )
-      #if ( $logoString.startsWith("/") )
-        <a href="$project.getAttributeValue("href")">
-          <img src="$relativePath$logoString"
-               alt="$project.getChild("logo").getText()" border="0"/>
-        </a>
-      #else
-        <a href="$project.getAttributeValue("href")">
-          <img src="$relativePath/$logoString" alt="$project.getChild("logo").getText()" border="0"/>
-        </a>
-      #end
-    </td>
-
-  #else
-    <td colspan="2">
-      <a href="http://logging.apache.org">
-        <img src="http://logging.apache.org/images/ls-logo.jpg" align="left" border="0"/>
-      </a>
-    </td>
-  #end
-
-#end
-
-#macro (printMeta $metaElement)
-<meta #set ($attribs = $metaElement.getAttributes())
-#foreach ($a in $attribs) $a.getName()="$a.getValue()" #end />
-#end
-
-#macro (document)
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements.  See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License.  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-    <!-- ====================================================================== -->
-    <!-- GENERATED FILE, DO NOT EDIT, EDIT THE XML FILE IN xdocs INSTEAD! -->
-    <!-- Main Page Section -->
-    <!-- ====================================================================== -->
-    <html>
-        <head>
-            <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
-
-            #set ($authors = $root.getChild("properties").getChildren("author"))
-            #foreach ( $au in $authors )
-                #metaauthor ( $au.getText() $au.getAttributeValue("email") )
-            #end
-
-           #set ($metas = $root.getChildren("meta"))
-
-            ##    Parse meta directives such as
-            ##    <meta name="keyword" content="jakarta, java"/>
-            #foreach ($meta in $metas) #printMeta($meta) #end
-
-            ##    Support for <base> tags.
-            #if ($root.getChild("properties").getChild("base"))
-              #set ($url = $root.getChild("properties").getChild("base").getAttributeValue("href"))
-              <base href="$url"/>
-            #end
-
-            <link href="$relativePath/css/site.css" rel="stylesheet" type="text/css"/>
-
-            <title>$project.getChild("title").getText() - $root.getChild("properties").getChild("title").getText()</title>
-        </head>
-
-        <body bgcolor="$bodybg" text="$bodyfg" link="$bodylink">
-           <!-- START Header table -->
-           <table border="0" cellspacing="0" width="90%">
-                <!-- TOP IMAGE -->
-                <tr>
-                    #getProjectImage()
-                </tr>
-            </table>
-           <!-- END Header table -->
-
-           <!-- START main table -->
-            <table id="main" border="0" width="90%" cellspacing="2" cellpadding="0">
-                <tr><td colspan="2">
-                    <hr noshade="" size="1"/>
-                </td></tr>
-
-                <tr>
-                    <!-- LEFT SIDE NAVIGATION -->
-                    <td id="navbar" valign="top">
-                    #makeNavigationBar()
-                    </td>
-                    <td id="mainContents" align="left" valign="top">
-                       #foreach ( $item in $root.getChild("body").getChildren() )
-                         #if ($item.getName().equals("img"))
-                           #image ($item)
-                         #elseif ($item.getName().equals("section"))
-                           #section ($item)
-                         #elseif ($item.getName().equals("source"))
-                           #source ($item)
-                         #elseif ($item.getName().equals("table"))
-                           #table ($item)
-                         #elseif ($item.getName().equals("subsection"))
-                           #subsection ($item)
-                         #else
-                          $item
-                         #end
-                       #end
-
-##                    #if ($root.getChild("body").getChild("titleSection"))
-##                      #set ($titleSection = $root.getChild("body").getChild("titleSection"))
-##                      #titleSection($titleSection)
-##                    #end
-##
-##                    #set ($allSections = $root.getChild("body").getChildren("section"))
-##                    #foreach ( $section in $allSections )
-##                       #section ($section)
-##                    #end
-                    </td>
-                </tr>
-
-                <!-- FOOTER -->
-                <tr><td colspan="2">
-                    <hr noshade="" size="1"/>
-                </td></tr>
-            </table>
-           <!-- END main table -->
-        </body>
-    </html>
-#end
-
-
-
-
-
diff --git a/src/site/xdoc/usage.xml b/src/site/xdoc/usage.xml
new file mode 100644
index 0000000..ad272ca
--- /dev/null
+++ b/src/site/xdoc/usage.xml
@@ -0,0 +1,1062 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+<document>
+	<properties>
+		<title>How to use Apache log4cxx</title>
+	</properties>
+
+	<body>
+		<section name="Loggers">
+			<p>
+				Log4cxx has three main components: <em>loggers</em>,
+				<em>appenders</em> and <em>layouts</em>. These three types of
+				components work together to enable developers to log messages according
+				to message type and level, and to control at runtime how these
+				messages are formatted and where they are reported.
+			</p>
+
+			<subsection name="Hierarchy">
+				<p>
+					The first and foremost advantage of any logging API over plain
+					<code>std::cout</code> resides in its ability to disable
+					certain log statements while allowing others to print unhindered. This
+					capability assumes that the logging space, that is, the space of all
+					possible logging statements, is categorized according to some
+					developer-chosen criteria.
+				</p>
+
+				<p>
+					Loggers are named entities. Logger names are case-sensitive and
+					they follow the hierarchical naming rule:
+				</p>
+
+				<dl>
+					<dt><strong>Named Hierarchy</strong></dt>
+					<dd>
+						A logger is said to be an <em>ancestor</em> of another
+						logger if its name followed by a dot is a prefix of the
+						<em>descendant</em> logger name. A logger is said to be a
+						<em>parent</em> of a <em>child</em> logger if there are no
+						ancestors between itself and the descendant logger.
+					</dd>
+				</dl>
+
+				<p>
+					For example, the logger named <code>"com.foo"</code> is a parent
+					of the logger named <code>"com.foo.Bar"</code>.  Similarly,
+					<code>"java"</code> is a parent of <code>"java.util"</code> and an
+					ancestor of <code>"java.util.Vector"</code>. This naming scheme
+					should be familiar to most developers.
+				</p>
+
+				<p>
+					The root logger resides at the top of the logger hierarchy. It
+					is exceptional in two ways:
+				</p>
+
+				<ol>
+					<li> it always exists,</li>
+					<li> it cannot be retrieved by name.</li>
+				</ol>
+
+				<p>
+					Invoking the class static <a href="apidocs/classlog4cxx_1_1_logger.html#afc0e4d99cab7c38a2851d41e6edc1dee">log4cxx::Logger::getRootLogger</a>
+					method retrieves it. All other loggers are instantiated and retrieved with the class static
+					<a href="apidocs/classlog4cxx_1_1_logger.html#a76017df17da02bc11bfe50e47de703a3">log4cxx::Logger::getLogger</a>
+					method. This method takes the name of the desired logger as a parameter. Some of the basic methods in the Logger
+					class are listed below.
+				</p>
+
+				<pre class="prettyprint linenums">
+namespace log4cxx {
+	class <strong>Logger</strong> {
+		public:
+			// Creation &amp; retrieval methods:
+			static LoggerPtr getRootLogger();
+			static LoggerPtr getLogger(const std::string&amp; name);
+			static LoggerPtr getLogger(const std::wstring&amp; name);
+	}
+}
+
+//
+// Use these macros instead of calling Logger methods directly.
+// Macros will handle char or wchar_t pointers or strings
+// or most right-hand side expressions of an
+// std::basic_string::operator&lt;&lt;.
+//
+#define LOG4CXX_TRACE(logger, expression) ...
+#define LOG4CXX_DEBUG(logger, expression) ...
+#define LOG4CXX_INFO(logger, expression) ...
+#define LOG4CXX_WARN(logger, expression) ...
+#define LOG4CXX_ERROR(logger, expression) ...
+#define LOG4CXX_FATAL(logger, expression) ...</pre>
+			</subsection>
+
+			<subsection name="Levels">
+				<p>
+					Loggers <em>may</em> be assigned levels. The pre-defined
+					levels: TRACE, DEBUG, INFO, WARN, ERROR and FATAL are defined in the
+					<code><a href="apidocs/classlog4cxx_1_1_level.html">log4cxx::Level</a></code>
+					class which provides accessor functions.
+				</p>
+
+				<p>
+					If a given logger is not assigned a level, then it inherits
+					one from its closest ancestor with an assigned level. More
+					formally:
+				</p>
+
+				<dl>
+					<dt><strong>Level Inheritance</strong></dt>
+
+					<dd>
+						The <em>inherited level</em> for a given logger <i>C</i>, is equal to the
+						first non-null level in the logger hierarchy, starting at <i>C</i> and
+						proceeding upwards in the hierarchy towards the <code>root</code> logger.
+					</dd>
+				</dl>
+
+				<p>
+					To ensure that all loggers can eventually inherit a level,
+					the root logger always has an assigned level.
+				</p>
+
+				<p>
+					Below are four tables with various assigned level values and the
+					resulting inherited levels according to the above rule.
+				</p>
+
+				<table border="1">
+					<tr>
+						<th>Logger name</th>
+						<th>Assigned level</th>
+						<th>Inherited level</th>
+					</tr>
+					<tr align="left">
+						<td>root</td>
+						<td>Proot</td>
+						<td>Proot</td>
+					</tr>
+					<tr align="left">
+						<td>X </td>
+						<td>none</td>
+						<td>Proot</td>
+					</tr>
+					<tr align="left">
+						<td>X.Y </td>
+						<td>none</td>
+						<td>Proot</td>
+					</tr>
+					<tr align="left">
+						<td>X.Y.Z</td>
+						<td>none</td>
+						<td>Proot</td>
+					</tr>
+					<caption align="bottom">Example 1</caption>
+				</table>
+
+				<p>
+					In example 1 above, only the root logger is assigned a
+					level. This level value, <code>Proot</code>, is inherited by the
+					other loggers <code>X</code>, <code>X.Y</code> and
+					<code>X.Y.Z</code>.
+				</p>
+
+				<table border="1">
+					<tr>
+						<th>Logger name</th>
+						<th>Assigned level</th>
+						<th>Inherited level</th>
+					</tr>
+					<tr align="left">
+						<td>root</td>
+						<td>Proot</td>
+						<td>Proot</td>
+					</tr>
+					<tr align="left">
+						<td>X </td>
+						<td>Px</td>
+						<td>Px</td>
+					</tr>
+					<tr align="left">
+						<td>X.Y </td>
+						<td>Pxy</td>
+						<td>Pxy</td>
+					</tr>
+					<tr align="left">
+						<td>X.Y.Z</td>
+						<td>Pxyz</td>
+						<td>Pxyz</td>
+					</tr>
+					<caption align="bottom">Example 2</caption>
+				</table>
+
+				<p>
+					In example 2, all loggers have an assigned level value. There
+					is no need for level inheritence.
+				</p>
+
+				<table border="1">
+					<tr>
+						<th>Logger name</th>
+						<th>Assigned level</th>
+						<th>Inherited level</th>
+					</tr>
+					<tr align="left">
+						<td>root</td>
+						<td>Proot</td>
+						<td>Proot</td>
+					</tr>
+					<tr align="left">
+						<td>X </td>
+						<td>Px</td>
+						<td>Px</td>
+					</tr>
+					<tr align="left">
+						<td>X.Y </td>
+						<td>none</td>
+						<td>Px</td>
+					</tr>
+					<tr align="left">
+						<td>X.Y.Z</td>
+						<td>Pxyz</td>
+						<td>Pxyz</td>
+					</tr>
+					<caption align="bottom">Example 3</caption>
+				</table>
+
+				<p>
+					In example 3, the loggers <code>root</code>, <code>X</code> and
+					<code>X.Y.Z</code> are assigned the levels <code>Proot</code>,
+					<code>Px</code> and <code>Pxyz</code> respectively. The logger
+					<code>X.Y</code> inherits its level value from its parent
+					<code>X</code>.
+				</p>
+
+				<table border="1">
+					<tr>
+						<th>Logger name</th>
+						<th>Assigned level</th>
+						<th>Inherited level</th>
+					</tr>
+					<tr align="left">
+						<td>root</td>
+						<td>Proot</td>
+						<td>Proot</td>
+						</tr>
+					<tr align="left">
+						<td>X </td>
+						<td>Px</td>
+						<td>Px</td>
+					</tr>
+					<tr align="left">
+						<td>X.Y </td>
+						<td>none</td>
+						<td>Px</td>
+					</tr>
+					<tr align="left">
+						<td>X.Y.Z</td>
+						<td>none</td>
+						<td>Px</td>
+					</tr>
+					<caption align="bottom">Example 4</caption>
+				</table>
+
+				<p>
+					In example 4, the loggers <code>root</code> and <code>X</code>
+					and are assigned the levels <code>Proot</code> and <code>Px</code>
+					respectively. The loggers <code>X.Y</code> and <code>X.Y.Z</code>
+					inherits their level value from their nearest parent <code>X</code>
+					having an assigned level.
+				</p>
+			</subsection>
+
+			<subsection name="Requests">
+				<p>
+					Logging requests are made by invoking a method of
+					a logger instance, preferrably through the use of LOG4CXX_INFO or similar
+					macros which support short-circuiting if the threshold is not satisfied
+					and use of the insertion operator (&lt;&lt;) in the message parameter.
+				</p>
+
+				<pre class="prettyprint linenums">
+log4cxx::LoggerPtr logger(log4cxx::Logger::getLogger(<strong>"com.foo"</strong>));
+const char* region = "World";
+LOG4CXX_INFO(logger, "Simple message text.")
+LOG4CXX_INFO(logger, "Hello, " &lt;&lt; region)
+LOG4CXX_DEBUG(logger, L"Iteration " &lt;&lt; i)
+LOG4CXX_DEBUG(logger, "e^10 = " &lt;&lt; std::scientific &lt;&lt; exp(10.0))
+//
+// Use a wchar_t first operand to force use of wchar_t based stream.
+//
+LOG4CXX_WARN(logger, L"" &lt;&lt; i &lt;&lt; L" is the number of the iteration.")</pre>
+
+				<p>
+					A logging request is said to be <em>enabled</em> if its level is
+					higher than or equal to the level of its logger. Otherwise, the
+					request is said to be <em>disabled</em>. A logger without an
+					assigned level will inherit one from the hierarchy. This rule is
+					summarized below.
+				</p>
+
+				<dl>
+					<dt><strong>Basic Selection Rule</strong></dt>
+
+					<dd>
+						A log request of level <i>p</i> in a logger with (either assigned or
+						inherited, whichever is appropriate) level <i>q</i>, is enabled if
+						<i>p &gt;= q</i>.
+					</dd>
+				</dl>
+
+				<p>
+					This rule is at the heart of log4cxx. It assumes that levels are
+					ordered. For the standard levels, we have <code>TRACE &lt; DEBUG &lt; INFO
+					&lt; WARN &lt; ERROR &lt; FATAL</code>.
+				</p>
+
+				<p>
+					Here is an example of this rule.
+				</p>
+
+				<pre class="prettyprint linenums">
+// get a logger instance named "com.foo"
+log4cxx::LoggerPtr  logger(log4cxx::Logger::getLogger(<strong>"com.foo"</strong>));
+
+// Now set its level. Normally you do not need to set the
+// level of a logger programmatically. This is usually done
+// in configuration files.
+<strong>logger</strong>->setLevel(<strong class="set-level-highlight">log4cxx::Level::getInfo()</strong>);
+
+log4cxx::LoggerPtr barlogger(log4cxx::Logger::getLogger(<strong>"com.foo.Bar"</strong>));
+
+// This request is enabled, because <strong class="log-level compare-a">WARN</strong> &gt;= <strong class="log-level compare-b">INFO</strong>.
+LOG4CXX_WARN(logger, "Low fuel level.")
+
+// This request is disabled, because <strong class="log-level compare-a">DEBUG</strong> &lt; <strong class="log-level compare-b">INFO</strong>.
+LOG4CXX_DEBUG(logger, "Starting search for nearest gas station.")
+
+// The logger instance barlogger, named "com.foo.Bar",
+// will inherit its level from the logger named
+// "com.foo" Thus, the following request is enabled
+// because <strong class="log-level compare-a">INFO</strong> &gt;= <strong class="log-level compare-b">INFO</strong>.
+LOG4CXX_INFO(barlogger. "Located nearest gas station.")
+
+// This request is disabled, because <strong class="log-level compare-a">DEBUG</strong> &lt; <strong class="log-level compare-b">INFO</strong>.
+LOG4CXX_DEBUG(barlogger, "Exiting gas station search")</pre>
+
+				<p>
+					Calling the <code>getLogger</code> method with the same name will
+					always return a reference to the exact same logger object.
+				</p>
+
+				<p>
+					For example, in
+				</p>
+
+				<pre class="prettyprint linenums">
+log4cxx::LoggerPtr x = log4cxx::Logger::getLogger("wombat");
+log4cxx::LoggerPtr y = log4cxx::Logger::getLogger("wombat");</pre>
+				<p>
+					<code>x</code> and <code>y</code> refer to <em>exactly</em> the same logger object.
+				</p>
+
+				<p>
+					Thus, it is possible to configure a logger and then to retrieve
+					the same instance somewhere else in the code without passing around
+					references. In fundamental contradiction to biological parenthood,
+					where parents always preceed their children, log4cxx loggers can be
+					created and configured in any order. In particular, a "parent"
+					logger will find and link to its descendants even if it is
+					instantiated after them.
+				</p>
+
+				<p>
+					Configuration of the log4cxx environment is typically done at
+					application initialization. The preferred way is by reading a
+					configuration file. This approach will be discussed shortly.
+				</p>
+
+				<p>
+					Log4cxx makes it easy to name loggers by <em>software
+					component</em>.  This can be accomplished by statically instantiating
+					a logger in each class, with the logger name equal to the fully
+					qualified name of the class. This is a useful and straightforward
+					method of defining loggers. As the log output bears the name of the
+					generating logger, this naming strategy makes it easy to identify
+					the origin of a log message.  However, this is only one possible,
+					albeit common, strategy for naming loggers. Log4cxx does not restrict
+					the possible set of loggers. The developer is free to name the
+					loggers as desired.
+				</p>
+
+				<p>
+					Nevertheless, naming loggers after the class where they are
+					located seems to be the best strategy known so far.
+				</p>
+			</subsection>
+		</section>
+
+		<section name="Appenders and Layouts">
+			<p>
+				The ability to selectively enable or disable logging requests based
+				on their logger is only part of the picture. Log4cxx allows logging
+				requests to print to multiple destinations. In log4cxx speak, an output
+				destination is called an <em>appender</em>. Currently, appenders exist
+				for the <a href="apidocs/classlog4cxx_1_1_console_appender.html">console</a>,
+				<a href="apidocs/classlog4cxx_1_1_file_appender.html">files</a>, GUI
+				components, <a href="apidocs/classlog4cxx_1_1net_1_1_socket_appender.html">remote socket</a>
+				servers, <a href="apidocs/classlog4cxx_1_1nt_1_1_n_t_event_log_appender.html"> NT Event Loggers</a>, and remote UNIX
+				<a href="apidocs/classlog4cxx_1_1net_1_1_syslog_appender.html">Syslog</a>
+				daemons. It is also possible to log <a href="apidocs/classlog4cxx_1_1_async_appender.html">asynchronously</a>.
+			</p>
+
+			<p>More than one appender can be attached to a logger.</p>
+
+			<p>
+				The <a href="apidocs/classlog4cxx_1_1_logger.html#a7c0629acee8dbd1251474bea15d7c9e2">addAppender</a>
+				method adds an appender to a given logger.
+
+				<strong>
+					Each enabled logging request for a given logger will be forwarded to all the
+					appenders in that logger as well as the appenders higher in the hierarchy.
+				</strong>
+				In other words, appenders are inherited additively from the logger hierarchy.
+				For example, if a console appender is added to the root logger, then all enabled
+				logging requests will at least print on the console. If in addition a file appender
+				is added to a logger, say <em>C</em>, then enabled logging requests for <em>C</em> and
+				<em>C</em>'s children will print on a file <em>and</em> on the console. It is possible
+				to override this default behavior so that appender accumulation is no longer additive
+				by <a href="apidocs/classlog4cxx_1_1_logger.html#a80f9397947dba9071ad485f178257c17">setting the additivity flag</a> to
+				<code>false</code>.
+			</p>
+
+			<p>The rules governing appender additivity are summarized below.</p>
+
+			<dl>
+				<dt><strong>Appender Additivity</strong></dt>
+
+				<dd>
+					The output of a log statement of logger <i>C</i> will go to all the appenders
+					in <i>C</i> and its ancestors. This is the meaning of the term "appender
+					additivity". However, if an ancestor of logger <i>C</i>, say <i>P</i>, has the
+					additivity flag set to <code>false</code>, then <i>C</i>'s output will be
+					directed to all the appenders in <i>C</i> and it's ancestors up to and
+					including <i>P</i> but, not the appenders in any of the ancestors of <i>P</i>.
+					<br /><br />
+					Loggers have their additivity flag set to <code>true</code> by default.
+				</dd>
+			</dl>
+
+			<p>The table below shows an example:</p>
+
+			<table align="center" border="3" cellpadding="10">
+				<tr rowspan="2">
+					<th>Logger Name </th>
+					<th>Added Appenders</th>
+					<th>Additivity Flag</th>
+					<th>Output Targets</th>
+					<th>Comment</th>
+				</tr>
+				<tr>
+					<td>root</td>
+					<td>A1</td>
+					<td>not applicable</td>
+					<td>A1</td>
+					<td>
+						The root logger is anonymous but can be accessed with the
+						log4cxx::Logger::getRootLogger() method. There is no default appender
+						attached to root.
+					</td>
+				</tr>
+				<tr>
+					<td>x</td>
+					<td>A-x1, A-x2</td>
+					<td>true</td>
+					<td>A1, A-x1, A-x2</td>
+					<td>Appenders of "x" and root.</td>
+				</tr>
+				<tr>
+					<td>x.y</td>
+					<td>none</td>
+					<td>true</td>
+					<td>A1, A-x1, A-x2</td>
+					<td>Appenders of "x" and root.</td>
+				</tr>
+				<tr>
+					<td>x.y.z</td>
+					<td>A-xyz1</td>
+					<td>true</td>
+					<td>A1, A-x1, A-x2, A-xyz1</td>
+					<td>Appenders in "x.y.z", "x" and root.</td>
+				</tr>
+				<tr>
+					<td>security</td>
+					<td>A-sec</td>
+					<td>
+						<span class="activity-flag-highlight">false</span>
+					</td>
+					<td>A-sec</td>
+					<td>
+						No appender accumulation since the additivity flag is set to <code>false</code>.
+					</td>
+				</tr>
+				<tr>
+					<td>security.access</td>
+					<td>none</td>
+					<td>true</td>
+					<td>A-sec</td>
+					<td>
+						Only appenders of "security" because the additivity flag in "security" is
+						set to <code>false</code>.
+					</td>
+				</tr>
+			</table>
+
+			<p>
+				More often than not, users wish to customize not only the output
+				destination but also the output format. This is accomplished by
+				associating a <em>layout</em> with an appender. The layout is
+				responsible for formatting the logging request according to the user's
+				wishes, whereas an appender takes care of sending the formatted output
+				to its destination.
+			</p>
+
+			<p>
+				The <a href="apidocs/classlog4cxx_1_1_pattern_layout.html">PatternLayout</a>, part
+				of the standard log4cxx distribution, lets the user specify the output
+				format according to conversion patterns similar to the C language
+				<code>printf</code> function.
+			</p>
+
+			<p>
+				For example, the PatternLayout with the conversion pattern "%r [%t]
+				%-5p %c - %m%n" will output something akin to:
+			</p>
+
+			<pre class="prettyprint linenums">
+176 [main] INFO org.foo.Bar - Located nearest gas station.</pre>
+
+			<p>
+				The first field is the number of milliseconds elapsed since the
+				start of the program.  The second field is the thread making the log
+				request.  The third field is the level of the log statement. The
+				fourth field is the name of the logger associated with the log
+				request. The text after the '-' is the message of the statement.
+			</p>
+		</section>
+
+		<section name="Configuration">
+			<p>
+				Inserting log requests into the application code requires a fair
+				amount of planning and effort. Observation shows that approximately 4
+				percent of code is dedicated to logging. Consequently, even moderately
+				sized applications will have thousands of logging statements embedded
+				within their code.  Given their number, it becomes imperative to
+				manage these log statements without the need to modify them manually.
+			</p>
+
+			<p>
+				The log4cxx environment is fully configurable programmatically.
+				However, it is far more flexible to configure log4cxx using
+				configuration files.  Currently, configuration files can be written in
+				XML or in Java properties (key=value) format.
+			</p>
+
+			<p>
+				Let us give a taste of how this is done with the help of an
+				imaginary application <code>MyApp</code> that uses log4cxx.
+			</p>
+
+			<pre class="prettyprint linenums">
+#include "com/foo/bar.h"
+using namespace com::foo;
+
+// include log4cxx header files.
+#include "log4cxx/logger.h"
+#include "log4cxx/basicconfigurator.h"
+#include "log4cxx/helpers/exception.h"
+
+using namespace log4cxx;
+using namespace log4cxx::helpers;
+
+LoggerPtr logger(Logger::getLogger("MyApp"));
+
+int main(int argc, char **argv)
+{
+	int result = EXIT_SUCCESS;
+	try
+	{
+		// Set up a simple configuration that logs on the console.
+		BasicConfigurator::configure();
+
+		LOG4CXX_INFO(logger, "Entering application.")
+		Bar bar;
+		bar.doIt();
+		LOG4CXX_INFO(logger, "Exiting application.")
+	}
+	catch(Exception&amp;)
+	{
+		result = EXIT_FAILURE;
+	}
+
+	return result;
+}</pre>
+
+			<p>
+				<code>MyApp</code> begins by including log4cxx headers. It
+				then defines a static logger variable with the name <code>MyApp</code>
+				which happens to be the fully qualified name of the
+				class.
+			</p>
+
+			<p>
+				<code>MyApp</code> uses the <code>Bar</code> class defined in header
+				file <code>com/foo/bar.h</code>.
+			</p>
+
+				<pre class="prettyprint linenums">
+// file com/foo/bar.h
+#include "log4cxx/logger.h"
+
+namespace com {
+	namespace foo {
+		class Bar {
+			static log4cxx::LoggerPtr logger;
+
+			public:
+				void doIt();
+		}
+	}
+}</pre>
+
+				<pre class="prettyprint linenums">
+// file bar.cpp
+#include "com/foo/bar.h"
+
+using namespace com::foo;
+using namespace log4cxx;
+
+LoggerPtr Bar::logger(Logger::getLogger("com.foo.bar"));
+
+void Bar::doIt() {
+	LOG4CXX_DEBUG(logger, "Did it again!")
+}</pre>
+
+			<p>
+				The invocation of the <a href="apidocs/classlog4cxx_1_1_basic_configurator.html#a4f96a09e1372664e3556ce94ace4a70c">BasicConfigurator::configure</a>
+				method creates a rather simple log4cxx setup. This method is hardwired
+				to add to the root logger a <a href="apidocs/classlog4cxx_1_1_console_appender.html">
+				ConsoleAppender</a>. The output will be formatted using a
+				<a href="apidocs/classlog4cxx_1_1_pattern_layout.html">PatternLayout</a> set
+				to the pattern "%-4r [%t] %-5p %c %x - %m%n".
+			</p>
+
+			<p>
+				Note that by default, the root logger is assigned to
+				<code>Level::getDebug()</code>.
+			</p>
+
+			<p>
+				The output of MyApp is:
+			</p>
+
+			<pre class="prettyprint linenums">
+0    [12345] INFO  MyApp  - Entering application.
+36   [12345] DEBUG com.foo.Bar  - Did it again!
+51   [12345] INFO  MyApp  - Exiting application.</pre>
+
+			<p>
+				The previous example always outputs the same log information.
+				Fortunately, it is easy to modify <code>MyApp</code> so that the log
+				output can be controlled at run-time. Here is a slightly modified
+				version.
+			</p>
+
+			<pre class="prettyprint linenums">
+// file MyApp2.cpp
+
+#include "com/foo/bar.h"
+using namespace com::foo;
+
+// include log4cxx header files.
+#include "log4cxx/logger.h"
+#include "log4cxx/basicconfigurator.h"
+#include "log4cxx/propertyconfigurator.h"
+#include "log4cxx/helpers/exception.h"
+
+using namespace log4cxx;
+using namespace log4cxx::helpers;
+// Define a static logger variable so that it references the
+// Logger instance named "MyApp".
+LoggerPtr logger(Logger::getLogger("MyApp"));
+
+int main(int argc, char **argv)
+{
+	int result = EXIT_SUCCESS;
+	try
+	{
+		if (argc > 1)
+		{
+			// BasicConfigurator replaced with PropertyConfigurator.
+			PropertyConfigurator::configure(argv[1]);
+		}
+		else
+		{
+			BasicConfigurator::configure();
+		}
+
+		LOG4CXX_INFO(logger, "Entering application.")
+		Bar bar
+		bar.doIt();
+		LOG4CXX_INFO(logger, "Exiting application.")
+	}
+	catch(Exception&amp;)
+	{
+		result = EXIT_FAILURE;
+	}
+
+	return result;
+}</pre>
+
+			<p>
+				This version of <code>MyApp</code> instructs
+				<code>PropertyConfigurator</code> to parse a configuration file and
+				set up logging accordingly.
+			</p>
+
+			<p>
+				Here is a sample configuration file that results in exactly same
+				output as the previous <code>BasicConfigurator</code> based example.
+			</p>
+
+			<pre class="prettyprint linenums">
+# Set root logger level to DEBUG and its only appender to A1.
+log4j.rootLogger=DEBUG, A1
+
+# A1 is set to be a ConsoleAppender.
+log4j.appender.A1=org.apache.log4j.ConsoleAppender
+
+# A1 uses PatternLayout.
+log4j.appender.A1.layout=org.apache.log4j.PatternLayout
+log4j.appender.A1.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n</pre>
+
+			<p>
+				It can be noticed that the PropertyConfigurator file format is the same as log4j.
+			</p>
+
+			<p>
+				Suppose we are no longer interested in seeing the output of any
+				component belonging to the <code>com::foo</code> package. The following
+				configuration file shows one possible way of achieving this.
+			</p>
+
+			<pre class="prettyprint linenums">
+log4j.rootLogger=DEBUG, A1
+log4j.appender.A1=org.apache.log4j.ConsoleAppender
+log4j.appender.A1.layout=org.apache.log4j.PatternLayout
+
+# <strong>Print the date in ISO 8601 format</strong>
+log4j.appender.A1.layout.ConversionPattern=<strong>%d</strong> [%t] %-5p %c - %m%n
+
+# Print only messages of level WARN or above in the package com.foo.
+<strong>log4j.logger.com.foo=WARN</strong></pre>
+
+			<p>
+				The output of <code>MyApp</code> configured with this file is shown below.
+			</p>
+
+			<pre class="prettyprint linenums">
+<strong>2000-09-07 14:07:41,508</strong> [12345] INFO  MyApp - Entering application.
+<strong>2000-09-07 14:07:41,529</strong> [12345] INFO  MyApp - Exiting application.</pre>
+
+			<p>
+				As the logger <code>com.foo.Bar</code> does not have an assigned
+				level, it inherits its level from <code>com.foo</code>, which
+				was set to WARN in the configuration file. The log statement from the
+				<code>Bar::doIt</code> method has the level DEBUG, lower than the
+				logger level WARN. Consequently, <code>doIt()</code> method's log
+				request is suppressed.
+			</p>
+
+			<p>
+				Here is another configuration file that uses multiple appenders.
+			</p>
+
+			<pre class="prettyprint linenums">
+log4j.rootLogger=debug, <strong>stdout, R</strong>
+
+log4j.appender.<strong>stdout</strong>=org.apache.log4j.ConsoleAppender
+log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
+
+# Pattern to output the caller's file name and line number.
+log4j.appender.stdout.layout.ConversionPattern=%5p [%t] <strong>(%F:%L)</strong> - %m%n
+
+log4j.appender.<strong>R</strong>=org.apache.log4j.RollingFileAppender
+log4j.appender.R.File=example.log
+
+log4j.appender.R.MaxFileSize=<strong>100KB</strong>
+# Keep one backup file
+log4j.appender.R.MaxBackupIndex=1
+
+log4j.appender.R.layout=org.apache.log4j.PatternLayout
+log4j.appender.R.layout.ConversionPattern=%p %t %c - %m%n</pre>
+
+			<p>
+				Calling the enhanced MyApp with the this configuration file will
+				output the following on the console.
+			</p>
+
+			<pre class="prettyprint linenums">
+INFO [12345] <strong>(MyApp2.cpp:31)</strong> - Entering application.
+DEBUG [12345] (Bar.h:16) - Doing it again!
+INFO [12345] (MyApp2.cpp:34) - Exiting application.</pre>
+
+			<p>
+				In addition, as the root logger has been allocated a second
+				appender, output will also be directed to the <code>example.log</code>
+				file. This file will be rolled over when it reaches 100KB. When
+				roll-over occurs, the old version of <code>example.log</code> is
+				automatically moved to <code>example.log.1</code>.
+			</p>
+
+			<p>
+				Note that to obtain these different logging behaviors we did not
+				need to recompile code. We could just as easily have logged to a UNIX
+				Syslog daemon, redirected all <code>com.foo</code> output to an NT
+				Event logger, or forwarded logging events to a remote log4cxx server,
+				which would log according to local server policy, for example by
+				forwarding the log event to a second log4cxx server.
+			</p>
+		</section>
+
+		<section name="Default Initialization Procedure">
+			<p>
+				The log4cxx library does not make any assumptions about its
+				environment. In particular, there are no default log4cxx
+				appenders. Under certain well-defined circumstances however, the
+				static inializer of the <code>Logger</code> class will attempt to
+				automatically configure log4cxx.
+			</p>
+
+			<p>
+				The exact default initialization algorithm is defined as follows:
+			</p>
+
+			<ol>
+				<li>
+					<p>
+						Set the configurationOptionStr string variable to the value of the
+						<strong>LOG4CXX_CONFIGURATION</strong> environment variable if set, otherwise
+						the value of the <strong>log4j.configuration</strong> environment variable
+						if set, otherwise the first of the following file names which exist in the
+						current working directory, "log4cxx.xml", "log4cxx.properties",
+						"log4j.xml" and "log4j.properties". If configurationOptionStr has not been
+						set, then disable logging.
+					</p>
+				</li>
+				<li>
+					<p>
+						Unless a custom configurator is specified using the
+						<strong>LOG4CXX_CONFIGURATOR_CLASS</strong> or <strong>log4j.configuratorClass</strong>
+						environment variable, the PropertyConfigurator will be used to configure
+						log4cxx unless the file name ends with the ".xml" extension,
+						in which case the DOMConfigurator will be used.
+						If a custom configurator is specified, the environment variable
+						should contain a fully qualified class name of a class that
+						implements the Configurator interface.
+					</p>
+				</li>
+			</ol>
+		</section>
+
+		<section name="Nested Diagnostic Contexts">
+			<p>
+				Most real-world systems have to deal with multiple clients
+				simultaneously. In a typical multithreaded implementation of such a
+				system, different threads will handle different clients. Logging is
+				especially well suited to trace and debug complex distributed
+				applications. A common approach to differentiate the logging output of
+				one client from another is to instantiate a new separate logger for
+				each client. This promotes the proliferation of loggers and
+				increases the management overhead of logging.
+			</p>
+
+			<p>
+				A lighter technique is to uniquely stamp each log request initiated
+				from the same client interaction. Neil Harrison described this method
+				in the book "Patterns for Logging Diagnostic Messages," in <em>Pattern
+				Languages of Program Design 3</em>, edited by R. Martin, D.  Riehle,
+				and F. Buschmann (Addison-Wesley, 1997).
+			</p>
+
+			<p>
+				To uniquely stamp each request, the
+				user pushes contextual information into the NDC, the abbreviation of
+				<em>Nested Diagnostic Context</em>. The NDC class is shown below.
+			</p>
+
+			<pre class="prettyprint linenums">
+namespace log4cxx {
+	class NDC {
+		public:
+			// pushes the value on construction and pops on destruction.
+			NDC(const std::string&amp; value);
+			NDC(const std::wstring&amp; value);
+
+			// Remove the top of the context from the NDC.
+			<strong>static</strong> LogString pop();
+
+			// Add diagnostic context for the current thread.
+			<strong>static</strong> void push(const std::string&amp; message);
+			<strong>static</strong> void push(const std::wstring&amp; message);
+	}
+}</pre>
+
+			<p>
+				The NDC is managed per thread as a <em>stack</em> of contextual
+				information. Note that all methods of the <code>log4cxx::NDC</code>
+				class are static. Assuming that NDC printing is turned on, every time
+				a log request is made, the appropriate log4cxx component will include
+				the <em>entire</em> NDC stack for the current thread in the log
+				output. This is done without the intervention of the user, who is
+				responsible only for placing the correct information in the NDC by
+				using the <code>push</code> and <code>pop</code> methods at a few
+				well-defined points in the code.  In contrast, the per-client logger
+				approach commands extensive changes in the code.
+			</p>
+
+			<p>
+				To illustrate this point, let us take the example of a servlet
+				delivering content to numerous clients. The servlet can build the NDC
+				at the very beginning of the request before executing other code. The
+				contextual information can be the client's host name and other
+				information inherent to the request, typically information contained
+				in cookies. Hence, even if the servlet is serving multiple clients
+				simultaneously, the logs initiated by the same code, i.e. belonging to
+				the same logger, can still be distinguished because each client
+				request will have a different NDC stack. Contrast this with the
+				complexity of passing a freshly instantiated logger to all code
+				exercised during the client's request.
+			</p>
+
+			<p>
+				Nevertheless, some sophisticated applications, such as virtual
+				hosting web servers, must log differently depending on the virtual
+				host context and also depending on the software component issuing the
+				request. Recent log4cxx releases support multiple hierarchy trees. This
+				enhancement allows each virtual host to possess its own copy of the
+				logger hierarchy.
+			</p>
+		</section>
+
+		<section name="Performance">
+			<p>
+				One of the often-cited arguments against logging is its
+				computational cost. This is a legitimate concern as even moderately
+				sized applications can generate thousands of log requests. Much
+				effort was spent measuring and tweaking logging performance. Log4cxx
+				claims to be fast and flexible: speed first, flexibility second.
+			</p>
+
+			<p>
+				The user should be aware of the following performance issues.
+			</p>
+
+			<ol>
+				<li>
+					<p>
+						<strong>Logging performance when logging is turned off.</strong>
+					</p>
+
+					<p>
+						When logging is turned off entirely or just for a set
+						of levels, the cost of a log request consists of a method
+						invocation plus an integer comparison.  The LOG4CXX_DEBUG and similar
+						macros suppress unnecessary expression evaluation if the
+						request is not enabled.
+					</p>
+				</li>
+
+				<li>
+					<p>
+						<strong>The performance of deciding whether to log or not to log when logging is turned on.</strong>
+					</p>
+
+					<p>
+						This is essentially the performance of walking the logger
+						hierarchy. When logging is turned on, log4cxx still needs to compare
+						the level of the log request with the level of the request
+						logger. However, loggers may not have an assigned
+						level; they can inherit them from the logger hierarchy. Thus,
+						before inheriting a level, the logger may need to search its
+						ancestors.
+					</p>
+
+					<p>
+						There has been a serious effort to make this hierarchy walk to
+						be as fast as possible. For example, child loggers link only to
+						their existing ancestors. In the <code>BasicConfigurator</code>
+						example shown earlier, the logger named <code>com.foo.Bar</code> is
+						linked directly to the root logger, thereby circumventing the
+						nonexistent <code>com</code> or <code>com.foo</code> loggers. This
+						significantly improves the speed of the walk, especially in "sparse"
+						hierarchies.
+					</p>
+
+					<p>
+						The cost of walking the hierarchy is typically 3
+						times slower than when logging is turned off entirely.
+					</p>
+				</li>
+				<li>
+					<p>
+						<strong>Actually outputting log messages</strong>
+					</p>
+
+					<p>
+						This is the cost of formatting the log output and sending it to
+						its target destination. Here again, a serious effort was made to
+						make layouts (formatters) perform as quickly as possible. The same
+						is true for appenders.
+					</p>
+				</li>
+			</ol>
+		</section>
+
+		<section name="Conclusions">
+			<p>
+				Apache Log4cxx is a popular logging package written in C++.  One of its
+				distinctive features is the notion of inheritance in loggers. Using
+				a logger hierarchy it is possible to control which log statements
+				are output at arbitrary granularity. This helps reduce the volume of
+				logged output and minimize the cost of logging.
+			</p>
+
+			<p>
+				One of the advantages of the log4cxx API is its manageability. Once
+				the log statements have been inserted into the code, they can be
+				controlled with configuration files. They can be selectively enabled
+				or disabled, and sent to different and multiple output targets in
+				user-chosen formats. The log4cxx package is designed so that log
+				statements can remain in shipped code without incurring a heavy
+				performance cost.
+			</p>
+		</section>
+	</body>
+</document>
\ No newline at end of file
diff --git a/src/test/cpp/Makefile.am b/src/test/cpp/Makefile.am
index 626a7f7..13b82ac 100644
--- a/src/test/cpp/Makefile.am
+++ b/src/test/cpp/Makefile.am
@@ -14,147 +14,181 @@
 # limitations under the License.
 #
 noinst_HEADERS = \
-	$(top_srcdir)/src/test/cpp/customlogger/*.h \
-	$(top_srcdir)/src/test/cpp/helpers/*.h \
-	$(top_srcdir)/src/test/cpp/net/*.h \
-	$(top_srcdir)/src/test/cpp/pattern/*.h \
-	$(top_srcdir)/src/test/cpp/util/*.h \
-	$(top_srcdir)/src/test/cpp/xml/*.h \
-	$(top_srcdir)/src/test/cpp/*.h
+    $(top_srcdir)/src/test/cpp/abts.h \
+    $(top_srcdir)/src/test/cpp/abts_tests.h \
+    $(top_srcdir)/src/test/cpp/appenderskeletontestcase.h \
+    $(top_srcdir)/src/test/cpp/customlogger/xlogger.h \
+    $(top_srcdir)/src/test/cpp/fileappendertestcase.h \
+    $(top_srcdir)/src/test/cpp/helpers/localechanger.h \
+    $(top_srcdir)/src/test/cpp/insertwide.h \
+    $(top_srcdir)/src/test/cpp/logunit.h \
+    $(top_srcdir)/src/test/cpp/net/socketservertestcase.h \
+    $(top_srcdir)/src/test/cpp/pattern/num343patternconverter.h \
+    $(top_srcdir)/src/test/cpp/testchar.h \
+    $(top_srcdir)/src/test/cpp/testutil.h \
+    $(top_srcdir)/src/test/cpp/util/absolutedateandtimefilter.h \
+    $(top_srcdir)/src/test/cpp/util/absolutetimefilter.h \
+    $(top_srcdir)/src/test/cpp/util/binarycompare.h \
+    $(top_srcdir)/src/test/cpp/util/compare.h \
+    $(top_srcdir)/src/test/cpp/util/controlfilter.h \
+    $(top_srcdir)/src/test/cpp/util/filenamefilter.h \
+    $(top_srcdir)/src/test/cpp/util/filter.h \
+    $(top_srcdir)/src/test/cpp/util/iso8601filter.h \
+    $(top_srcdir)/src/test/cpp/util/linenumberfilter.h \
+    $(top_srcdir)/src/test/cpp/util/relativetimefilter.h \
+    $(top_srcdir)/src/test/cpp/util/serializationtesthelper.h \
+    $(top_srcdir)/src/test/cpp/util/threadfilter.h \
+    $(top_srcdir)/src/test/cpp/util/transformer.h \
+    $(top_srcdir)/src/test/cpp/util/xmlfilenamefilter.h \
+    $(top_srcdir)/src/test/cpp/util/xmllineattributefilter.h \
+    $(top_srcdir)/src/test/cpp/util/xmlthreadfilter.h \
+    $(top_srcdir)/src/test/cpp/util/xmltimestampfilter.h \
+    $(top_srcdir)/src/test/cpp/vectorappender.h \
+    $(top_srcdir)/src/test/cpp/writerappendertestcase.h \
+    $(top_srcdir)/src/test/cpp/xml/xlevel.h
 
-INCLUDES = -I$(top_srcdir)/src/main/include -I$(top_builddir)/src/main/include
+AM_CPPFLAGS = -I$(top_srcdir)/src/main/include -I$(top_builddir)/src/main/include
 
-noinst_PROGRAMS = testsuite
+check_PROGRAMS = testsuite
 
 customlogger_tests = \
-	customlogger/xlogger.cpp\
-	customlogger/xloggertestcase.cpp
+    customlogger/xlogger.cpp \
+    customlogger/xloggertestcase.cpp
 
 defaultinit_tests = \
-	defaultinit/testcase1.cpp\
-	defaultinit/testcase2.cpp\
-	defaultinit/testcase3.cpp\
-	defaultinit/testcase4.cpp
+    defaultinit/testcase1.cpp \
+    defaultinit/testcase2.cpp \
+    defaultinit/testcase3.cpp \
+    defaultinit/testcase4.cpp
+
+filter_tests = \
+    filter/andfiltertest.cpp \
+    filter/denyallfiltertest.cpp \
+    filter/levelmatchfiltertest.cpp \
+    filter/levelrangefiltertest.cpp \
+    filter/loggermatchfiltertest.cpp \
+    filter/stringmatchfiltertest.cpp
 
 helpers = \
-        helpers/absolutetimedateformattestcase.cpp \
-        helpers/cacheddateformattestcase.cpp \
-        helpers/charsetdecodertestcase.cpp \
-        helpers/charsetencodertestcase.cpp \
-        helpers/cyclicbuffertestcase.cpp\
-        helpers/datetimedateformattestcase.cpp \
-        helpers/inetaddresstestcase.cpp \
-        helpers/iso8601dateformattestcase.cpp \
-        helpers/localechanger.cpp\
-        helpers/messagebuffertest.cpp \
-        helpers/optionconvertertestcase.cpp       \
-        helpers/propertiestestcase.cpp \
-        helpers/relativetimedateformattestcase.cpp \
-        helpers/stringtokenizertestcase.cpp \
-        helpers/stringhelpertestcase.cpp \
-        helpers/syslogwritertest.cpp \
-        helpers/timezonetestcase.cpp \
-        helpers/transcodertestcase.cpp
+    helpers/absolutetimedateformattestcase.cpp \
+    helpers/cacheddateformattestcase.cpp \
+    helpers/charsetdecodertestcase.cpp \
+    helpers/charsetencodertestcase.cpp \
+    helpers/cyclicbuffertestcase.cpp \
+    helpers/datetimedateformattestcase.cpp \
+    helpers/inetaddresstestcase.cpp \
+    helpers/iso8601dateformattestcase.cpp \
+    helpers/localechanger.cpp \
+    helpers/messagebuffertest.cpp \
+    helpers/optionconvertertestcase.cpp       \
+    helpers/propertiestestcase.cpp \
+    helpers/relativetimedateformattestcase.cpp \
+    helpers/stringtokenizertestcase.cpp \
+    helpers/stringhelpertestcase.cpp \
+    helpers/syslogwritertest.cpp \
+    helpers/threadtestcase.cpp \
+    helpers/timezonetestcase.cpp \
+    helpers/transcodertestcase.cpp
 
 net_tests = \
-	net/smtpappendertestcase.cpp \
-	net/socketappendertestcase.cpp \
-	net/sockethubappendertestcase.cpp \
-	net/socketservertestcase.cpp \
-	net/syslogappendertestcase.cpp \
-	net/telnetappendertestcase.cpp \
-	net/xmlsocketappendertestcase.cpp
+    net/smtpappendertestcase.cpp \
+    net/socketappendertestcase.cpp \
+    net/sockethubappendertestcase.cpp \
+    net/socketservertestcase.cpp \
+    net/syslogappendertestcase.cpp \
+    net/telnetappendertestcase.cpp \
+    net/xmlsocketappendertestcase.cpp
 
 pattern_tests = \
-	pattern/num343patternconverter.cpp \
-	pattern/patternparsertestcase.cpp
+    pattern/num343patternconverter.cpp \
+    pattern/patternparsertestcase.cpp
 
 rolling_tests = \
-        rolling/filenamepatterntestcase.cpp \
-        rolling/filterbasedrollingtest.cpp \
-        rolling/manualrollingtest.cpp \
-        rolling/obsoletedailyrollingfileappendertest.cpp \
-        rolling/obsoleterollingfileappendertest.cpp \
-        rolling/sizebasedrollingtest.cpp \
-        rolling/timebasedrollingtest.cpp
+    rolling/filenamepatterntestcase.cpp \
+    rolling/filterbasedrollingtest.cpp \
+    rolling/manualrollingtest.cpp \
+    rolling/obsoletedailyrollingfileappendertest.cpp \
+    rolling/obsoleterollingfileappendertest.cpp \
+    rolling/sizebasedrollingtest.cpp \
+    rolling/timebasedrollingtest.cpp
 
 util = \
-	util/absolutetimefilter.cpp\
-	util/absolutedateandtimefilter.cpp\
-	util/binarycompare.cpp\
-	util/compare.cpp\
-	util/controlfilter.cpp\
-	util/filenamefilter.cpp \
-	util/utilfilter.cpp\
-	util/iso8601filter.cpp\
-	util/linenumberfilter.cpp\
-	util/relativetimefilter.cpp\
+    util/absolutetimefilter.cpp \
+    util/absolutedateandtimefilter.cpp \
+    util/binarycompare.cpp \
+    util/compare.cpp \
+    util/controlfilter.cpp \
+    util/filenamefilter.cpp \
+    util/utilfilter.cpp \
+    util/iso8601filter.cpp \
+    util/linenumberfilter.cpp \
+    util/relativetimefilter.cpp \
     util/serializationtesthelper.cpp \
-	util/threadfilter.cpp\
-	util/transformer.cpp\
-	util/xmlfilenamefilter.cpp \
-	util/xmllineattributefilter.cpp\
-	util/xmltimestampfilter.cpp \
-	util/xmlthreadfilter.cpp
+    util/threadfilter.cpp \
+    util/transformer.cpp \
+    util/xmlfilenamefilter.cpp \
+    util/xmllineattributefilter.cpp \
+    util/xmltimestampfilter.cpp \
+    util/xmlthreadfilter.cpp
 
 varia_tests = \
-	varia/errorhandlertestcase.cpp \
-	varia/levelmatchfiltertestcase.cpp \
-	varia/levelrangefiltertestcase.cpp
+    varia/errorhandlertestcase.cpp \
+    varia/levelmatchfiltertestcase.cpp \
+    varia/levelrangefiltertestcase.cpp
 
 db_tests = \
-	db/odbcappendertestcase.cpp
+    db/odbcappendertestcase.cpp
 
 xml_tests = \
-	xml/customleveltestcase.cpp \
-	xml/domtestcase.cpp \
-	xml/xlevel.cpp \
-	xml/xmllayouttestcase.cpp \
+    xml/customleveltestcase.cpp \
+    xml/domtestcase.cpp \
+    xml/xlevel.cpp \
+    xml/xmllayouttestcase.cpp \
     xml/xmllayouttest.cpp
 
 nt_tests = \
-	nt/nteventlogappendertestcase.cpp
+    nt/nteventlogappendertestcase.cpp
 
 testsuite_SOURCES = \
-        $(customlogger_tests) \
-        $(defaultinit_tests) \
-        $(helpers) \
-        $(net_tests) \
-        $(pattern_tests) \
-        $(rolling_tests) \
-        $(util) \
-        $(varia_tests) \
-        $(db_tests) \
-        $(xml_tests) \
-        $(nt_tests) \
-        abts.cpp \
-        asyncappendertestcase.cpp\
-        encodingtest.cpp\
-        filetestcase.cpp \
-        hierarchytest.cpp\
-        hierarchythresholdtestcase.cpp\
-        l7dtestcase.cpp\
-        leveltestcase.cpp \
-        logunit.cpp \
-        loggertestcase.cpp\
-        minimumtestcase.cpp\
-        patternlayouttest.cpp\
-        vectorappender.cpp\
-        appenderskeletontestcase.cpp\
-        consoleappendertestcase.cpp\
-        fileappendertestcase.cpp\
-        rollingfileappendertestcase.cpp\
-        streamtestcase.cpp\
-        writerappendertestcase.cpp \
-        ndctestcase.cpp \
-        propertyconfiguratortest.cpp 
+    $(customlogger_tests) \
+    $(defaultinit_tests) \
+    $(filter_tests) \
+    $(helpers) \
+    $(net_tests) \
+    $(pattern_tests) \
+    $(rolling_tests) \
+    $(util) \
+    $(varia_tests) \
+    $(db_tests) \
+    $(xml_tests) \
+    $(nt_tests) \
+    abts.cpp \
+    asyncappendertestcase.cpp \
+    encodingtest.cpp \
+    filetestcase.cpp \
+    hierarchytest.cpp \
+    hierarchythresholdtestcase.cpp \
+    l7dtestcase.cpp \
+    leveltestcase.cpp \
+    logunit.cpp \
+    loggertestcase.cpp \
+    minimumtestcase.cpp \
+    patternlayouttest.cpp \
+    vectorappender.cpp \
+    appenderskeletontestcase.cpp \
+    consoleappendertestcase.cpp \
+    fileappendertestcase.cpp \
+    rollingfileappendertestcase.cpp \
+    streamtestcase.cpp \
+    writerappendertestcase.cpp \
+    ndctestcase.cpp \
+    propertyconfiguratortest.cpp \
+    mdctestcase.cpp
 
 testsuite_LDADD = \
-        $(top_builddir)/src/main/cpp/liblog4cxx.la
-
+    $(top_builddir)/src/main/cpp/liblog4cxx.la
 
 testsuite_DEPENDENCIES = \
-        $(top_builddir)/src/main/cpp/liblog4cxx.la
+    $(top_builddir)/src/main/cpp/liblog4cxx.la
 
 check: testsuite
-
diff --git a/src/test/cpp/abts.h b/src/test/cpp/abts.h
index 4d6470a..340ab8a 100644
--- a/src/test/cpp/abts.h
+++ b/src/test/cpp/abts.h
@@ -13,14 +13,13 @@
  * limitations under the License.
  */
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 #include <stdarg.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+
+#include <apr.h>
+
 #ifdef WIN32
 #include <io.h>
 #else
@@ -101,7 +100,4 @@
 
 #endif
 
-#ifdef __cplusplus
-}
-#endif
 
diff --git a/src/test/cpp/consoleappendertestcase.cpp b/src/test/cpp/consoleappendertestcase.cpp
index 230bbca..2e7522e 100644
--- a/src/test/cpp/consoleappendertestcase.cpp
+++ b/src/test/cpp/consoleappendertestcase.cpp
@@ -23,7 +23,7 @@
 using namespace log4cxx::helpers;
 
 /**
-   Unit tests of log4cxx::nt::NTEventLogAppender
+   Unit tests of ConsoleAppender.
  */
 class ConsoleAppenderTestCase : public WriterAppenderTestCase
 {
@@ -33,7 +33,7 @@
                 //
                 LOGUNIT_TEST(testDefaultThreshold);
                 LOGUNIT_TEST(testSetOptionThreshold);
-
+                LOGUNIT_TEST(testNoLayout);
    LOGUNIT_TEST_SUITE_END();
 
 
@@ -42,6 +42,16 @@
         WriterAppender* createWriterAppender() const {
           return new log4cxx::ConsoleAppender();
         }
+        
+        void testNoLayout() {
+            Pool p;
+            ConsoleAppenderPtr appender(new ConsoleAppender());
+            appender->activateOptions(p);
+            LoggerPtr logger(Logger::getRootLogger());
+            logger->addAppender(appender);
+            LOG4CXX_INFO(logger, "No layout specified for ConsoleAppender");
+            logger->removeAppender(appender);
+        }
 };
 
 LOGUNIT_TEST_SUITE_REGISTRATION(ConsoleAppenderTestCase);
diff --git a/src/test/cpp/decodingtest.cpp b/src/test/cpp/decodingtest.cpp
new file mode 100644
index 0000000..61f90b7
--- /dev/null
+++ b/src/test/cpp/decodingtest.cpp
@@ -0,0 +1,151 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#include <string>
+
+#include <log4cxx/helpers/charsetdecoder.h>
+#include <log4cxx/helpers/exception.h>
+#include <log4cxx/helpers/fileinputstream.h>
+#include <log4cxx/helpers/inputstreamreader.h>
+#include <log4cxx/helpers/pool.h>
+#include <log4cxx/helpers/transcoder.h>
+#include <log4cxx/logstring.h>
+
+#include "logunit.h"
+//
+// If there is no support for wchar_t logging then
+// there is not a consistent way to get the test characters compared.
+//
+#if LOG4CXX_WCHAR_T_API
+
+using namespace log4cxx;
+using namespace log4cxx::helpers;
+
+/**
+ * Tests support for decoding specification.
+ *
+ * The lib provides multiple different decoders and decides which to use by default on compile time.
+ * This test uses the same checks like {@link CharsetDecoder#createDefaultDecoder} to decide which
+ * checks to run actually, so that some input file with some encoded text according to the decoder
+ * in use is read and the contents compared to some witness. Because of different decoders not all
+ * files have the same content, e.g. the ASCII-only decoder can't deal with Unicode chars obviously.
+ *
+ * This test is based on encodingtest and uses that witnesses, especially the hard coded strings for
+ * greeting and pi. We only combine it into one in the former mentioned order, divided by a space.
+ *
+ * @see LOGCXX-369
+ * @see LOGCXX-399
+ */
+LOGUNIT_CLASS(DecodingTest) {
+  LOGUNIT_TEST_SUITE(DecodingTest);
+#if LOG4CXX_CHARSET_USASCII
+          LOGUNIT_TEST(testASCII);
+#elif LOG4CXX_CHARSET_ISO88591 || defined(_WIN32_WCE)
+          LOGUNIT_TEST(testLatin1);
+#elif LOG4CXX_CHARSET_UTF8
+          LOGUNIT_TEST(testUtf8);
+#elif LOG4CXX_LOGCHAR_IS_WCHAR && LOG4CXX_HAS_MBSRTOWCS
+          LOGUNIT_TEST(testUtf16);
+          LOGUNIT_TEST(testUtf16LE);
+          LOGUNIT_TEST(testUtf16BE);
+#else
+          // LocaleCharsetDecoder, so it's difficult to provide a file working for e.g. windows-1252
+          // as well as something completely different.
+          LOGUNIT_TEST(testASCII);
+#endif
+  LOGUNIT_TEST_SUITE_END();
+public:
+    /**
+     * Test us-ascii decoding.
+     */
+  void testASCII() {
+      const wchar_t witness[] = { L'A', 0x003F, 0x003F, 0x003F, 0x003F, 0x003F, 0x0020, 0x003F, 0 };
+
+      testImpl(LOG4CXX_STR("ascii.txt"), witness);
+
+  }
+
+    /**
+     * Test iso-8859-1 decoding.
+     */
+    void testLatin1() {
+      const wchar_t witness[] = { L'A', 0x003F, 0x003F, 0x003F, 0x003F, 0x003F, 0x0020, 0x00B9, 0 };
+
+        testImpl(LOG4CXX_STR("latin1.txt"), witness);
+    }
+
+    /**
+     * Test utf-8 decoding.
+     */
+    void testUtf8() {
+        const wchar_t witness[] = { L'A', 0x0605, 0x0530, 0x986, 0x4E03, 0x0400, 0x0020, 0x00B9, 0 };
+
+        testImpl(LOG4CXX_STR("UTF-8.txt"), witness);
+    }
+
+    /**
+     * Test utf-16 decoding.
+     */
+    void testUtf16() {
+        const wchar_t witness[] = { L'A', 0x0605, 0x0530, 0x986, 0x4E03, 0x0400, 0x0020, 0x00B9, 0 };
+
+        testImpl(LOG4CXX_STR("UTF-16.txt"), witness);
+    }
+
+    /**
+     * Test utf-16be decoding.
+     */
+    void testUtf16BE() {
+        const wchar_t witness[] = { L'A', 0x0605, 0x0530, 0x986, 0x4E03, 0x0400, 0x0020, 0x00B9, 0 };
+
+        testImpl(LOG4CXX_STR("UTF-16BE.txt"), witness);
+    }
+
+    /**
+     * Test utf16-le decoding.
+     */
+    void testUtf16LE() {
+        const wchar_t witness[] = { L'A', 0x0605, 0x0530, 0x986, 0x4E03, 0x0400, 0x0020, 0x00B9, 0 };
+
+        testImpl(LOG4CXX_STR("UTF-16LE.txt"), witness);
+    }
+
+    private:
+      void testImpl(
+               const LogString& fileName,
+               const wchar_t*   witness) {
+          CharsetDecoderPtr decoder(CharsetDecoder::getDefaultDecoder());
+          LogString         lsContent;
+          std::wstring      wsContent;
+          LogString         path(LOG4CXX_STR("input/decoding/") + fileName);
+          Pool              pool;
+
+          FileInputStreamPtr   fis(     new FileInputStream(path));
+          InputStreamReaderPtr isReader(new InputStreamReader(fis, decoder));
+
+          lsContent.assign(isReader->read(pool));
+          Transcoder::encode(lsContent, wsContent);
+
+          LOGUNIT_ASSERT_EQUAL((std::wstring) witness, wsContent);
+      }
+};
+
+LOGUNIT_TEST_SUITE_REGISTRATION(DecodingTest);
+
+#endif
+
diff --git a/src/test/cpp/encodingtest.cpp b/src/test/cpp/encodingtest.cpp
index ce0ab54..3b04011 100644
--- a/src/test/cpp/encodingtest.cpp
+++ b/src/test/cpp/encodingtest.cpp
@@ -39,8 +39,8 @@
 
 /**
  * Tests support for encoding specification.
- * 
- * 
+ *
+ *
  */
 LOGUNIT_CLASS(EncodingTest) {
   LOGUNIT_TEST_SUITE(EncodingTest);
@@ -65,9 +65,13 @@
      */
   void testASCII() {
       LoggerPtr root(Logger::getRootLogger());
-      configure(root, LOG4CXX_STR("output/ascii.log"), LOG4CXX_STR("US-ASCII"));
+
+      configure(root, LOG4CXX_STR("output/encoding/ascii.log"),
+                      LOG4CXX_STR("US-ASCII"));
       common(root);
-      BinaryCompare::compare("output/ascii.log", "witness/encoding/ascii.log");
+
+      BinaryCompare::compare( "output/encoding/ascii.log",
+                              "witness/encoding/ascii.log");
   }
 
     /**
@@ -75,9 +79,13 @@
      */
     void testLatin1() {
         LoggerPtr root(Logger::getRootLogger());
-        configure(root, LOG4CXX_STR("output/latin1.log"), LOG4CXX_STR("iso-8859-1"));
+
+        configure(root, LOG4CXX_STR("output/encoding/latin1.log"),
+                        LOG4CXX_STR("iso-8859-1"));
         common(root);
-        BinaryCompare::compare("output/latin1.log", "witness/encoding/latin1.log");
+
+        BinaryCompare::compare( "output/encoding/latin1.log",
+                                "witness/encoding/latin1.log");
     }
 
     /**
@@ -85,9 +93,13 @@
      */
     void testUtf8() {
         LoggerPtr root(Logger::getRootLogger());
-        configure(root, LOG4CXX_STR("output/UTF-8.log"), LOG4CXX_STR("UTF-8"));
+
+        configure(root, LOG4CXX_STR("output/encoding/UTF-8.log"),
+                        LOG4CXX_STR("UTF-8"));
         common(root);
-        BinaryCompare::compare("output/UTF-8.log", "witness/encoding/UTF-8.log");
+
+        BinaryCompare::compare( "output/encoding/UTF-8.log",
+                                "witness/encoding/UTF-8.log");
     }
 
     /**
@@ -95,9 +107,13 @@
      */
     void testUtf16() {
         LoggerPtr root(Logger::getRootLogger());
-        configure(root, LOG4CXX_STR("output/UTF-16.log"), LOG4CXX_STR("UTF-16"));
+
+        configure(root, LOG4CXX_STR("output/encoding/UTF-16.log"),
+                        LOG4CXX_STR("UTF-16"));
         common(root);
-        BinaryCompare::compare("output/UTF-16.log", "witness/encoding/UTF-16.log");
+
+        BinaryCompare::compare( "output/encoding/UTF-16.log",
+                                "witness/encoding/UTF-16.log");
     }
 
     /**
@@ -105,9 +121,13 @@
      */
     void testUtf16BE() {
         LoggerPtr root(Logger::getRootLogger());
-        configure(root, LOG4CXX_STR("output/UTF-16BE.log"), LOG4CXX_STR("UTF-16BE"));
+
+        configure(root, LOG4CXX_STR("output/encoding/UTF-16BE.log"),
+                        LOG4CXX_STR("UTF-16BE"));
         common(root);
-        BinaryCompare::compare("output/UTF-16BE.log", "witness/encoding/UTF-16BE.log");
+
+        BinaryCompare::compare( "output/encoding/UTF-16BE.log",
+                                "witness/encoding/UTF-16BE.log");
     }
 
     /**
@@ -115,9 +135,13 @@
      */
     void testUtf16LE() {
         LoggerPtr root(Logger::getRootLogger());
-        configure(root, LOG4CXX_STR("output/UTF-16LE.log"), LOG4CXX_STR("UTF-16LE"));
+
+        configure(root, LOG4CXX_STR("output/encoding/UTF-16LE.log"),
+                        LOG4CXX_STR("UTF-16LE"));
         common(root);
-        BinaryCompare::compare("output/UTF-16LE.log", "witness/encoding/UTF-16LE.log");
+
+        BinaryCompare::compare( "output/encoding/UTF-16LE.log",
+                                "witness/encoding/UTF-16LE.log");
     }
 
     /**
@@ -127,18 +151,22 @@
      * @param encoding encoding
      */
     private:
-    void configure(LoggerPtr& logger,
-        const LogString& filename, const LogString& encoding) {
+    void configure(      LoggerPtr& logger,
+                   const LogString& filename,
+                   const LogString& encoding) {
+        FileAppenderPtr  appender(new FileAppender());
         PatternLayoutPtr layout(new PatternLayout());
+        Pool             p;
+
         layout->setConversionPattern(LOG4CXX_STR("%p - %m\n"));
-        Pool p;
         layout->activateOptions(p);
-        FileAppenderPtr appender(new FileAppender());
-        appender->setFile(filename);
-        appender->setEncoding(encoding);
+
         appender->setAppend(false);
+        appender->setEncoding(encoding);
+        appender->setFile(filename);
         appender->setLayout(layout);
         appender->activateOptions(p);
+
         logger->addAppender(appender);
         logger->setLevel(Level::getInfo());
     }
@@ -149,14 +177,15 @@
      */
     void common(LoggerPtr& logger) {
         logger->info("Hello, World");
+
         // pi can be encoded in iso-8859-1
         const wchar_t pi[] = { 0x00B9, 0 };
         logger->info(pi);
+
         //   arbitrary, hopefully meaningless, characters from
         //     Latin, Arabic, Armenian, Bengali, CJK and Cyrillic
         const wchar_t greeting[] = { L'A', 0x0605, 0x0530, 0x986, 0x4E03, 0x400, 0 };
         logger->info(greeting);
-
     }
 };
 
diff --git a/src/test/cpp/filetestcase.cpp b/src/test/cpp/filetestcase.cpp
old mode 100755
new mode 100644
diff --git a/src/test/cpp/filter/andfiltertest.cpp b/src/test/cpp/filter/andfiltertest.cpp
new file mode 100644
index 0000000..aaee1cb
--- /dev/null
+++ b/src/test/cpp/filter/andfiltertest.cpp
@@ -0,0 +1,179 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ 
+#include <log4cxx/filter/andfilter.h>
+#include <log4cxx/logger.h>
+#include <log4cxx/spi/filter.h>
+#include <log4cxx/spi/loggingevent.h>
+#include <log4cxx/filter/levelmatchfilter.h>
+#include <log4cxx/filter/denyallfilter.h>
+#include <log4cxx/filter/stringmatchfilter.h>
+#include "../logunit.h"
+
+using namespace log4cxx;
+using namespace log4cxx::filter;
+using namespace log4cxx::spi; 
+using namespace log4cxx::helpers;
+
+
+/**
+ * Unit tests for AndFilter.
+ */
+LOGUNIT_CLASS(AndFilterTest) {
+    LOGUNIT_TEST_SUITE(AndFilterTest);
+       LOGUNIT_TEST(test1);
+       LOGUNIT_TEST(test2);
+       LOGUNIT_TEST(test3);
+       LOGUNIT_TEST(test4);
+       LOGUNIT_TEST(test5);
+       LOGUNIT_TEST(test6);
+    LOGUNIT_TEST_SUITE_END();
+    
+public:
+    
+
+    /**
+     * Check that AndFilter.decide() returns Filter.ACCEPT if no filters added.
+     */
+    void test1() {
+        LoggingEventPtr event(new LoggingEvent(
+                LOG4CXX_STR("org.apache.log4j.filter.AndFilterTest"),
+                Level::getInfo(), 
+                LOG4CXX_STR("Hello, World"), 
+                LOG4CXX_LOCATION));
+        FilterPtr filter(new AndFilter());
+        Pool p;
+        filter->activateOptions(p);
+        LOGUNIT_ASSERT_EQUAL(Filter::ACCEPT, filter->decide(event));
+    }
+    
+    /**
+     * Check that AndFilter.decide() returns Filter.ACCEPT if
+     *    only nested filter returns Filter.ACCEPT.
+     */
+    void test2() {
+        LoggingEventPtr event(new LoggingEvent(
+                LOG4CXX_STR("org.apache.log4j.filter.AndFilterTest"),
+                Level::getInfo(), 
+                LOG4CXX_STR("Hello, World"), 
+                LOG4CXX_LOCATION));
+        AndFilterPtr filter(new AndFilter());
+        LevelMatchFilterPtr filter1(new LevelMatchFilter());
+        filter1->setLevelToMatch(LOG4CXX_STR("info"));
+        Pool p;
+        filter1->activateOptions(p);
+        filter->addFilter(filter1);
+        filter->activateOptions(p);
+        LOGUNIT_ASSERT_EQUAL(Filter::ACCEPT, filter->decide(event));
+    }
+
+    /**
+     * Check that AndFilter.decide() returns Filter.ACCEPT if
+     *    two nested filters return Filter.ACCEPT.
+     */
+    void test3() {
+        LoggingEventPtr event(new LoggingEvent(
+                LOG4CXX_STR("org.apache.log4j.filter.AndFilterTest"),
+                Level::getInfo(), 
+                LOG4CXX_STR("Hello, World"), 
+                LOG4CXX_LOCATION));
+        AndFilterPtr filter(new AndFilter());
+        LevelMatchFilterPtr filter1(new LevelMatchFilter());
+        filter1->setLevelToMatch(LOG4CXX_STR("info"));
+        Pool p;
+        filter1->activateOptions(p);
+        filter->addFilter(filter1);
+        LevelMatchFilterPtr filter2(new LevelMatchFilter());
+        filter2->setLevelToMatch(LOG4CXX_STR("info"));
+        filter2->activateOptions(p);
+        filter->addFilter(filter2);
+        filter->activateOptions(p);
+        LOGUNIT_ASSERT_EQUAL(Filter::ACCEPT, filter->decide(event));
+    }
+
+    /**
+     * Check that AndFilter.decide() returns Filter.DENY if
+     *    only nested filter returns Filter.ACCEPT
+     *    and acceptOnMatch is false.
+     */
+    void test4() {
+        LoggingEventPtr event(new LoggingEvent(
+                LOG4CXX_STR("org.apache.log4j.filter.AndFilterTest"),
+                Level::getInfo(), 
+                LOG4CXX_STR("Hello, World"), 
+                LOG4CXX_LOCATION));
+        AndFilterPtr filter(new AndFilter());
+        LevelMatchFilterPtr filter1(new LevelMatchFilter());
+        filter1->setLevelToMatch(LOG4CXX_STR("info"));
+        Pool p;
+        filter1->activateOptions(p);
+        filter->addFilter(filter1);
+        filter->setAcceptOnMatch(false);
+        filter->activateOptions(p);
+        LOGUNIT_ASSERT_EQUAL(Filter::DENY, filter->decide(event));
+    }
+
+    /**
+     * Check that AndFilter.decide() returns Filter.NEUTRAL if
+     *    nested filters return Filter.ACCEPT and Filter.DENY.
+     */
+    void test5() {
+        LoggingEventPtr event(new LoggingEvent(
+                LOG4CXX_STR("org.apache.log4j.filter.AndFilterTest"),
+                Level::getInfo(), 
+                LOG4CXX_STR("Hello, World"), 
+                LOG4CXX_LOCATION));
+        AndFilterPtr filter(new AndFilter());
+        LevelMatchFilterPtr filter1(new LevelMatchFilter());
+        filter1->setLevelToMatch(LOG4CXX_STR("info"));
+        Pool p;
+        filter1->activateOptions(p);
+        filter->addFilter(filter1);
+        FilterPtr filter2(new DenyAllFilter());
+        filter2->activateOptions(p);
+        filter->addFilter(filter2);
+        filter->activateOptions(p);
+        LOGUNIT_ASSERT_EQUAL(Filter::NEUTRAL, filter->decide(event));
+    }
+
+    /**
+     * Check that AndFilter.decide() returns Filter.NEUTRAL if
+     *    nested filters return Filter.ACCEPT and Filter.NEUTRAL.
+     */
+    void test6() {
+        LoggingEventPtr event(new LoggingEvent(
+                LOG4CXX_STR("org.apache.log4j.filter.AndFilterTest"),
+                Level::getInfo(), 
+                LOG4CXX_STR("Hello, World"), 
+                LOG4CXX_LOCATION));
+        AndFilterPtr filter(new AndFilter());
+        LevelMatchFilterPtr filter1(new LevelMatchFilter());
+        filter1->setLevelToMatch(LOG4CXX_STR("info"));
+        Pool p;
+        filter1->activateOptions(p);
+        filter->addFilter(filter1);
+        FilterPtr filter2(new StringMatchFilter());
+        filter2->activateOptions(p);
+        filter->addFilter(filter2);
+        filter->activateOptions(p);
+        LOGUNIT_ASSERT_EQUAL(Filter::NEUTRAL, filter->decide(event));
+    }
+};
+
+
+LOGUNIT_TEST_SUITE_REGISTRATION(AndFilterTest);
+
diff --git a/src/test/cpp/filter/denyallfiltertest.cpp b/src/test/cpp/filter/denyallfiltertest.cpp
new file mode 100644
index 0000000..785310f
--- /dev/null
+++ b/src/test/cpp/filter/denyallfiltertest.cpp
@@ -0,0 +1,57 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#include <log4cxx/filter/denyallfilter.h>
+#include <log4cxx/logger.h>
+#include <log4cxx/spi/filter.h>
+#include <log4cxx/spi/loggingevent.h>
+#include "../logunit.h"
+
+using namespace log4cxx;
+using namespace log4cxx::filter;
+using namespace log4cxx::spi; 
+using namespace log4cxx::helpers;
+
+
+/**
+ * Unit tests for DenyAllFilter.
+ */
+LOGUNIT_CLASS(DenyAllFilterTest) {
+    LOGUNIT_TEST_SUITE(DenyAllFilterTest);
+       LOGUNIT_TEST(test1);
+    LOGUNIT_TEST_SUITE_END();
+

+public:
+    /**
+     * Check that DenyAllFilter.decide() returns Filter.DENY.
+     */
+    void test1() {
+        LoggingEventPtr event(new LoggingEvent(
+                LOG4CXX_STR("org.apache.log4j.filter.DenyAllFilterTest"),
+                Level::getInfo(), 
+                LOG4CXX_STR("Hello, World"), 
+                LOG4CXX_LOCATION));
+        FilterPtr filter(new DenyAllFilter());
+        Pool p;
+        filter->activateOptions(p);
+        LOGUNIT_ASSERT_EQUAL(Filter::DENY, filter->decide(event));
+    }
+
+};
+
+LOGUNIT_TEST_SUITE_REGISTRATION(DenyAllFilterTest);
+
+
diff --git a/src/test/cpp/filter/levelmatchfiltertest.cpp b/src/test/cpp/filter/levelmatchfiltertest.cpp
new file mode 100644
index 0000000..6dfb685
--- /dev/null
+++ b/src/test/cpp/filter/levelmatchfiltertest.cpp
@@ -0,0 +1,129 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#include <log4cxx/filter/levelmatchfilter.h>
+#include <log4cxx/logger.h>
+#include <log4cxx/spi/filter.h>
+#include <log4cxx/spi/loggingevent.h>
+#include "../logunit.h"
+
+using namespace log4cxx;
+using namespace log4cxx::filter;
+using namespace log4cxx::spi; 
+using namespace log4cxx::helpers;
+
+
+/**
+ * Unit tests for LevelMatchFilter.
+ */
+LOGUNIT_CLASS(LevelMatchFilterTest) {
+    LOGUNIT_TEST_SUITE(LevelMatchFilterTest);
+       LOGUNIT_TEST(test1);
+       LOGUNIT_TEST(test2);
+       LOGUNIT_TEST(test3);
+       LOGUNIT_TEST(test4);
+       LOGUNIT_TEST(test5);
+    LOGUNIT_TEST_SUITE_END();
+    
+public:
+    /**
+     * Check that LevelMatchFilter.decide() returns Filter.ACCEPT when level matches.
+     */
+    void test1() {
+        LoggingEventPtr event(new LoggingEvent(
+                LOG4CXX_STR("org.apache.log4j.filter.LevelMatchFilterTest"),
+                Level::getInfo(), 
+                LOG4CXX_STR("Hello, World"), 
+                LOG4CXX_LOCATION));
+        LevelMatchFilterPtr filter(new LevelMatchFilter());
+        filter->setLevelToMatch(LOG4CXX_STR("info"));
+        Pool p;
+        filter->activateOptions(p);
+        LOGUNIT_ASSERT_EQUAL(Filter::ACCEPT, filter->decide(event));
+    }
+
+    /**
+     * Check that LevelMatchFilter.decide() returns Filter.DENY
+     *    when level matches and acceptOnMatch = false.
+     */
+    void test2() {
+        LoggingEventPtr event(new LoggingEvent(
+                LOG4CXX_STR("org.apache.log4j.filter.LevelMatchFilterTest"),
+                Level::getInfo(), 
+                LOG4CXX_STR("Hello, World"), 
+                LOG4CXX_LOCATION));
+        LevelMatchFilterPtr filter(new LevelMatchFilter());
+        filter->setLevelToMatch(LOG4CXX_STR("info"));
+        filter->setAcceptOnMatch(false);
+        Pool p;
+        filter->activateOptions(p);
+        LOGUNIT_ASSERT_EQUAL(Filter::DENY, filter->decide(event));
+    }
+
+    /**
+     * Check that LevelMatchFilter.decide() returns Filter.NEUTRAL
+     *    when levelToMatch is unspecified.
+     */
+    void test3() {
+        LoggingEventPtr event(new LoggingEvent(
+                LOG4CXX_STR("org.apache.log4j.filter.LevelMatchFilterTest"),
+                Level::getInfo(), 
+                LOG4CXX_STR("Hello, World"), 
+                LOG4CXX_LOCATION));
+        LevelMatchFilterPtr filter(new LevelMatchFilter());
+        Pool p;
+        filter->activateOptions(p);
+        LOGUNIT_ASSERT_EQUAL(Filter::NEUTRAL, filter->decide(event));
+    }
+
+    /**
+     * Check that LevelMatchFilter.decide() returns Filter.NEUTRAL
+     *    when event level is higher than level to match.
+     */
+    void test4() {
+        LoggingEventPtr event(new LoggingEvent(
+                LOG4CXX_STR("org.apache.log4j.filter.LevelMatchFilterTest"),
+                Level::getInfo(), 
+                LOG4CXX_STR("Hello, World"), 
+                LOG4CXX_LOCATION));
+        LevelMatchFilterPtr filter(new LevelMatchFilter());
+        filter->setLevelToMatch(LOG4CXX_STR("debug"));
+        Pool p;
+        filter->activateOptions(p);
+        LOGUNIT_ASSERT_EQUAL(Filter::NEUTRAL, filter->decide(event));
+    }
+
+    /**
+     * Check that LevelMatchFilter.decide() returns Filter.NEUTRAL
+     *    when event level is lower than level to match.
+     */
+    void test5() {
+        LoggingEventPtr event(new LoggingEvent(
+                LOG4CXX_STR("org.apache.log4j.filter.LevelMatchFilterTest"),
+                Level::getInfo(), 
+                LOG4CXX_STR("Hello, World"), 
+                LOG4CXX_LOCATION));
+        LevelMatchFilterPtr filter(new LevelMatchFilter());
+        filter->setLevelToMatch(LOG4CXX_STR("warn"));
+        Pool p;
+        filter->activateOptions(p);
+        LOGUNIT_ASSERT_EQUAL(Filter::NEUTRAL, filter->decide(event));
+    }
+};
+
+LOGUNIT_TEST_SUITE_REGISTRATION(LevelMatchFilterTest);
+
+
diff --git a/src/test/cpp/filter/levelrangefiltertest.cpp b/src/test/cpp/filter/levelrangefiltertest.cpp
new file mode 100644
index 0000000..a5c413f
--- /dev/null
+++ b/src/test/cpp/filter/levelrangefiltertest.cpp
@@ -0,0 +1,149 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#include <log4cxx/filter/levelrangefilter.h>
+#include <log4cxx/logger.h>
+#include <log4cxx/spi/filter.h>
+#include <log4cxx/spi/loggingevent.h>
+#include "../logunit.h"
+
+using namespace log4cxx;
+using namespace log4cxx::filter;
+using namespace log4cxx::spi; 
+using namespace log4cxx::helpers;
+
+
+/**
+ * Unit tests for LevelRangeFilter.
+ */
+LOGUNIT_CLASS(LevelRangeFilterTest) {
+    LOGUNIT_TEST_SUITE(LevelRangeFilterTest);
+       LOGUNIT_TEST(test1);
+       LOGUNIT_TEST(test2);
+       LOGUNIT_TEST(test3);
+       LOGUNIT_TEST(test4);
+       LOGUNIT_TEST(test5);
+       LOGUNIT_TEST(test6);
+    LOGUNIT_TEST_SUITE_END();
+    
+public:
+    /**
+     * Check that LevelRangefilter->decide() returns Filter::DENY
+     *     when event level is below min level.
+     */
+    void test1() {
+        LoggingEventPtr event(new LoggingEvent(
+                LOG4CXX_STR("org.apache.log4j.Filter::LevelRangeFilterTest"),
+                Level::getInfo(), 
+                LOG4CXX_STR("Hello, World"), 
+                LOG4CXX_LOCATION));
+        LevelRangeFilterPtr filter(new LevelRangeFilter());
+        filter->setLevelMin(Level::getWarn());
+        Pool p;
+        filter->activateOptions(p);
+        LOGUNIT_ASSERT_EQUAL(Filter::DENY, filter->decide(event));
+    }
+
+    /**
+     * Check that LevelRangefilter->decide() returns Filter::DENY
+     *    when event level is above max level.
+     */
+    void test2() {
+        LoggingEventPtr event(new LoggingEvent(
+                LOG4CXX_STR("org.apache.log4j.Filter::LevelRangeFilterTest"),
+                Level::getInfo(), 
+                LOG4CXX_STR("Hello, World"), 
+                LOG4CXX_LOCATION));
+        LevelRangeFilterPtr filter(new LevelRangeFilter());
+        filter->setLevelMax(Level::getDebug());
+        Pool p;
+        filter->activateOptions(p);
+        LOGUNIT_ASSERT_EQUAL(Filter::DENY, filter->decide(event));
+    }
+
+    /**
+     * Check that LevelRangefilter->decide() returns Filter::ACCEPT
+     *    when event level is above min level.
+     */
+    void test3() {
+        LoggingEventPtr event(new LoggingEvent(
+                LOG4CXX_STR("org.apache.log4j.Filter::LevelRangeFilterTest"),
+                Level::getInfo(), 
+                LOG4CXX_STR("Hello, World"), 
+                LOG4CXX_LOCATION));
+        LevelRangeFilterPtr filter(new LevelRangeFilter());
+        filter->setLevelMin(Level::getDebug());
+        filter->setAcceptOnMatch(true);
+        Pool p;
+        filter->activateOptions(p);
+        LOGUNIT_ASSERT_EQUAL(Filter::ACCEPT, filter->decide(event));
+    }
+
+    /**
+     * Check that LevelRangefilter->decide() returns Filter::ACCEPT
+     *    when event level is below max level.
+     */
+    void test4() {
+        LoggingEventPtr event(new LoggingEvent(
+                LOG4CXX_STR("org.apache.log4j.Filter::LevelRangeFilterTest"),
+                Level::getInfo(), 
+                LOG4CXX_STR("Hello, World"), 
+                LOG4CXX_LOCATION));
+        LevelRangeFilterPtr filter(new LevelRangeFilter());
+        filter->setLevelMax(Level::getError());
+        filter->setAcceptOnMatch(true);
+        Pool p;
+        filter->activateOptions(p);
+        LOGUNIT_ASSERT_EQUAL(Filter::ACCEPT, filter->decide(event));
+    }
+
+    /**
+     * Check that LevelRangeFilter::decide() returns Filter::NEUTRAL
+     *    when event level is above min level and accept on match is false.
+     */
+    void test5() {
+        LoggingEventPtr event(new LoggingEvent(
+                LOG4CXX_STR("org.apache.log4j.Filter::LevelRangeFilterTest"),
+                Level::getInfo(), 
+                LOG4CXX_STR("Hello, World"), 
+                LOG4CXX_LOCATION));
+        LevelRangeFilterPtr filter(new LevelRangeFilter());
+        filter->setLevelMin(Level::getDebug());
+        Pool p;
+        filter->activateOptions(p);
+        LOGUNIT_ASSERT_EQUAL(Filter::NEUTRAL, filter->decide(event));
+    }
+
+    /**
+     * Check that LevelRangeFilter::decide() returns Filter::NEUTRAL
+     *    when event level is below max level and accept on match is false.
+     */
+    void test6() {
+        LoggingEventPtr event(new LoggingEvent(
+                LOG4CXX_STR("org.apache.log4j.Filter::LevelRangeFilterTest"),
+                Level::getInfo(), 
+                LOG4CXX_STR("Hello, World"), 
+                LOG4CXX_LOCATION));
+        LevelRangeFilterPtr filter(new LevelRangeFilter());
+        filter->setLevelMax(Level::getError());
+        Pool p;
+        filter->activateOptions(p);
+        LOGUNIT_ASSERT_EQUAL(Filter::NEUTRAL, filter->decide(event));
+    }
+};
+
+LOGUNIT_TEST_SUITE_REGISTRATION(LevelRangeFilterTest);
+
diff --git a/src/test/cpp/filter/loggermatchfiltertest.cpp b/src/test/cpp/filter/loggermatchfiltertest.cpp
new file mode 100644
index 0000000..03d7768
--- /dev/null
+++ b/src/test/cpp/filter/loggermatchfiltertest.cpp
@@ -0,0 +1,109 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#include <log4cxx/filter/loggermatchfilter.h>
+#include <log4cxx/logger.h>
+#include <log4cxx/spi/filter.h>
+#include <log4cxx/spi/loggingevent.h>
+#include "../logunit.h"
+
+using namespace log4cxx;
+using namespace log4cxx::filter;
+using namespace log4cxx::spi; 
+using namespace log4cxx::helpers;
+
+
+/**
+ * Unit tests for LoggerMatchFilter.
+ */
+LOGUNIT_CLASS(LoggerMatchFilterTest) {
+    LOGUNIT_TEST_SUITE(LoggerMatchFilterTest);
+       LOGUNIT_TEST(test1);
+       LOGUNIT_TEST(test2);
+       LOGUNIT_TEST(test3);
+       LOGUNIT_TEST(test4);
+    LOGUNIT_TEST_SUITE_END();
+    
+public:
+    /**
+     * Check that LoggerMatchFilter::decide() with unspecified level
+     *    returns Filter::ACCEPT for root logger.
+     */
+    void test1() {
+        LoggingEventPtr event(new LoggingEvent(
+                LOG4CXX_STR("root"),
+                Level::getInfo(), 
+                LOG4CXX_STR("Hello, World"), 
+                LOG4CXX_LOCATION));
+        FilterPtr filter(new LoggerMatchFilter());
+        Pool p; 
+        filter->activateOptions(p);
+        LOGUNIT_ASSERT_EQUAL(Filter::ACCEPT, filter->decide(event));
+    }
+
+    /**
+     * Check that LoggerMatchFilter::decide() with unspecified level
+     *    returns Filter::DENY for root logger when accept on match is false.
+     */
+    void test2() {
+        LoggingEventPtr event(new LoggingEvent(
+                LOG4CXX_STR("root"),
+                Level::getInfo(), 
+                LOG4CXX_STR("Hello, World"), 
+                LOG4CXX_LOCATION));
+        LoggerMatchFilterPtr filter(new LoggerMatchFilter());
+        filter->setAcceptOnMatch(false);
+        Pool p; 
+        filter->activateOptions(p);
+        LOGUNIT_ASSERT_EQUAL(Filter::DENY, filter->decide(event));
+    }
+
+    /**
+     * Check that LoggerMatchFilter::decide() with unspecified level
+     *    returns Filter::NEUTRAL for non-root logger.
+     */
+    void test3() {
+        LoggingEventPtr event(new LoggingEvent(
+                LOG4CXX_STR("org.apache.log4j.filter.LoggerMatchFilterTest"),
+                Level::getInfo(), 
+                LOG4CXX_STR("Hello, World"), 
+                LOG4CXX_LOCATION));
+        FilterPtr filter(new LoggerMatchFilter());
+        Pool p; 
+        filter->activateOptions(p);
+        LOGUNIT_ASSERT_EQUAL(Filter::NEUTRAL, filter->decide(event));
+    }
+
+    /**
+     * Check that LoggerMatchFilter::decide()
+     *    returns Filter::ACCEPT for matching logger.
+     */
+    void test4() {
+        LoggingEventPtr event(new LoggingEvent(
+                LOG4CXX_STR("org.apache.log4j.filter.LoggerMatchFilterTest"),
+                Level::getInfo(), 
+                LOG4CXX_STR("Hello, World"), 
+                LOG4CXX_LOCATION));
+        LoggerMatchFilterPtr filter(new LoggerMatchFilter());
+        filter->setLoggerToMatch(LOG4CXX_STR("org.apache.log4j.filter.LoggerMatchFilterTest"));
+        Pool p; 
+        filter->activateOptions(p);
+        LOGUNIT_ASSERT_EQUAL(Filter::ACCEPT, filter->decide(event));
+    }
+
+};
+
+LOGUNIT_TEST_SUITE_REGISTRATION(LoggerMatchFilterTest);
diff --git a/src/test/cpp/filter/stringmatchfiltertest.cpp b/src/test/cpp/filter/stringmatchfiltertest.cpp
new file mode 100644
index 0000000..e3a81f5
--- /dev/null
+++ b/src/test/cpp/filter/stringmatchfiltertest.cpp
@@ -0,0 +1,133 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#include <log4cxx/filter/stringmatchfilter.h>
+#include <log4cxx/logger.h>
+#include <log4cxx/spi/filter.h>
+#include <log4cxx/spi/loggingevent.h>
+#include "../logunit.h"
+
+using namespace log4cxx;
+using namespace log4cxx::filter;
+using namespace log4cxx::spi; 
+using namespace log4cxx::helpers;
+
+
+/**
+ * Unit tests for StringMatchFilter.
+ */
+LOGUNIT_CLASS(StringMatchFilterTest) {
+    LOGUNIT_TEST_SUITE(StringMatchFilterTest);
+       LOGUNIT_TEST(test1);
+       LOGUNIT_TEST(test2);
+       LOGUNIT_TEST(test3);
+       LOGUNIT_TEST(test4);
+    LOGUNIT_TEST_SUITE_END();
+    
+public:
+
+    /**
+     * Check that StringMatchFilter.decide() returns Filter.NEUTRAL
+     *   when string to match is unspecified.
+     */
+    void test1() {
+        LoggingEventPtr event(new LoggingEvent(
+                LOG4CXX_STR("org.apache.log4j.filter.StringMatchFilterTest"),
+                Level::getInfo(), 
+                LOG4CXX_STR("Hello, World"), 
+                LOG4CXX_LOCATION));
+        FilterPtr filter(new StringMatchFilter());
+        Pool p; 
+        filter->activateOptions(p);
+        LOGUNIT_ASSERT_EQUAL(Filter::NEUTRAL, filter->decide(event));
+    }
+
+    /**
+     * Check that StringMatchFilter.decide() returns Filter.NEUTRAL
+     *   when string to match does not appear in message.
+     */
+    void test2() {
+        LoggingEventPtr event(new LoggingEvent(
+                LOG4CXX_STR("org.apache.log4j.filter.StringMatchFilterTest"),
+                Level::getInfo(), 
+                LOG4CXX_STR("Hello, World"), 
+                LOG4CXX_LOCATION));
+        StringMatchFilterPtr filter(new StringMatchFilter());
+        filter->setStringToMatch(LOG4CXX_STR("Monde"));
+        Pool p; 
+        filter->activateOptions(p);
+        LOGUNIT_ASSERT_EQUAL(Filter::NEUTRAL, filter->decide(event));
+    }
+
+    /**
+     * Check that StringMatchFilter.decide() returns Filter.ACCEPT
+     *   when string to match does appear in message.
+     */
+    void test3() {
+        LoggingEventPtr event(new LoggingEvent(
+                LOG4CXX_STR("org.apache.log4j.filter.StringMatchFilterTest"),
+                Level::getInfo(), 
+                LOG4CXX_STR("Hello, World"), 
+                LOG4CXX_LOCATION));
+        StringMatchFilterPtr filter(new StringMatchFilter());
+        filter->setStringToMatch(LOG4CXX_STR("World"));
+        Pool p; 
+        filter->activateOptions(p);
+        LOGUNIT_ASSERT_EQUAL(Filter::ACCEPT, filter->decide(event));
+    }
+
+    /**
+     * Check that StringMatchFilter.decide() returns Filter.DENY
+     *   when string to match does appear in message and
+     *   accept on match is false.
+     */
+    void test4() {
+        LoggingEventPtr event(new LoggingEvent(
+                LOG4CXX_STR("org.apache.log4j.filter.StringMatchFilterTest"),
+                Level::getInfo(), 
+                LOG4CXX_STR("Hello, World"), 
+                LOG4CXX_LOCATION));
+        StringMatchFilterPtr filter(new StringMatchFilter());
+        filter->setStringToMatch(LOG4CXX_STR("World"));
+        filter->setAcceptOnMatch(false);
+        Pool p; 
+        filter->activateOptions(p);
+        LOGUNIT_ASSERT_EQUAL(Filter::DENY, filter->decide(event));
+    }
+
+    /**
+     * Check that StringMatchFilter.decide() returns Filter.NEUTRAL
+     *   when string to match does appear in message but differs in case.
+     */
+    void test5() {
+        LoggingEventPtr event(new LoggingEvent(
+                LOG4CXX_STR("org.apache.log4j.filter.StringMatchFilterTest"),
+                Level::getInfo(), 
+                LOG4CXX_STR("Hello, World"), 
+                LOG4CXX_LOCATION));
+        StringMatchFilterPtr filter(new StringMatchFilter());
+        filter->setStringToMatch(LOG4CXX_STR("world"));
+        Pool p; 
+        filter->activateOptions(p);
+        LOGUNIT_ASSERT_EQUAL(Filter::NEUTRAL, filter->decide(event));
+    }
+
+};
+
+
+LOGUNIT_TEST_SUITE_REGISTRATION(StringMatchFilterTest);
+
+
diff --git a/src/test/cpp/helpers/cacheddateformattestcase.cpp b/src/test/cpp/helpers/cacheddateformattestcase.cpp
index 4f68924..777680d 100644
--- a/src/test/cpp/helpers/cacheddateformattestcase.cpp
+++ b/src/test/cpp/helpers/cacheddateformattestcase.cpp
@@ -48,38 +48,36 @@
 
 
 /**
-   Unit test {@link CachedDateFormat}.
-   
-   */
+ * Unit test {@link CachedDateFormat}.
+ */
 LOGUNIT_CLASS(CachedDateFormatTestCase)
    {
      LOGUNIT_TEST_SUITE( CachedDateFormatTestCase );
-     LOGUNIT_TEST( test1 );
-     LOGUNIT_TEST( test2 );
-     LOGUNIT_TEST( test3 );
-     LOGUNIT_TEST( test4 );
+     LOGUNIT_TEST(test1);
+     LOGUNIT_TEST(test2);
+     LOGUNIT_TEST(test3);
+     LOGUNIT_TEST(test4);
 #if LOG4CXX_HAS_STD_LOCALE
-     LOGUNIT_TEST( test5 );
+     LOGUNIT_TEST(test5);
 #endif
-     LOGUNIT_TEST( test6 );
-     LOGUNIT_TEST( test8 );
+     LOGUNIT_TEST(test6);
+     LOGUNIT_TEST(test8);
 //   Gump doesn't like this test
-//     LOGUNIT_TEST( test9 );
-     LOGUNIT_TEST( test10 );
-     LOGUNIT_TEST( test11);
-     LOGUNIT_TEST( test12 );
-     LOGUNIT_TEST( test13 );
-     LOGUNIT_TEST( test14 );
-     LOGUNIT_TEST( test15 );
-     LOGUNIT_TEST( test16 );
-     LOGUNIT_TEST( test17);
-     LOGUNIT_TEST( test18);
-     LOGUNIT_TEST( test19);
-     LOGUNIT_TEST( test20);
-     LOGUNIT_TEST( test21);
+//     LOGUNIT_TEST(test9);
+     LOGUNIT_TEST(test10);
+     LOGUNIT_TEST(test11);
+     LOGUNIT_TEST(test12);
+     LOGUNIT_TEST(test13);
+     LOGUNIT_TEST(test14);
+     LOGUNIT_TEST(test15);
+     LOGUNIT_TEST(test16);
+     LOGUNIT_TEST(test17);
+     LOGUNIT_TEST(test18);
+     LOGUNIT_TEST(test19);
+     LOGUNIT_TEST(test20);
+     LOGUNIT_TEST(test21);
      LOGUNIT_TEST_SUITE_END();
 
-
 #define MICROSECONDS_PER_DAY APR_INT64_C(86400000000)
 
    public:
@@ -145,9 +143,9 @@
      chicagoFormat.format(actual, jul2, p);
      LOGUNIT_ASSERT_EQUAL((LogString) LOG4CXX_STR("19:00:00,000"), actual);
 
-      actual.erase(actual.begin(), actual.end());
-      gmtFormat.format(actual, jul2, p);
-      LOGUNIT_ASSERT_EQUAL((LogString) LOG4CXX_STR("00:00:00,000"), actual);
+     actual.erase(actual.begin(), actual.end());
+     gmtFormat.format(actual, jul2, p);
+     LOGUNIT_ASSERT_EQUAL((LogString) LOG4CXX_STR("00:00:00,000"), actual);
   }
 
   /**
@@ -450,17 +448,40 @@
  * Check pattern location for ISO8601
  */
 void test12() {
-   DateFormatPtr df = new SimpleDateFormat(LOG4CXX_STR("yyyy-MM-dd HH:mm:ss,SSS"));
-   apr_time_t ticks = 11142L * MICROSECONDS_PER_DAY;
-
+   DateFormatPtr df    = new SimpleDateFormat(LOG4CXX_STR("yyyy-MM-dd HH:mm:ss,SSS"));
+   apr_time_t    ticks = 11142L * MICROSECONDS_PER_DAY;
    Pool p;
-
    LogString formatted;
-   df->format(formatted, ticks, p);
 
-   int millisecondStart = CachedDateFormat::findMillisecondStart(ticks,
-       formatted, df, p);
-   LOGUNIT_ASSERT_EQUAL(20, millisecondStart);
+   df->format(formatted, ticks, p);
+   int msStart = CachedDateFormat::findMillisecondStart(ticks, formatted, df, p);
+   LOGUNIT_ASSERT_EQUAL(20, msStart);
+
+   // Test for for milliseconds overlapping with the magic ones as per LOGCXX-420.
+   apr_time_exp_t c;
+   memset(&c, 0, sizeof(c));
+   c.tm_year = 110;
+   c.tm_mon  = 7;
+   c.tm_mday = 12;
+   c.tm_hour = 9;
+   c.tm_min  = 4;
+   c.tm_sec  = 50;
+   c.tm_usec = 406000;
+
+   LOGUNIT_ASSERT_EQUAL(0, apr_time_exp_gmt_get(&ticks, &c));
+
+   formatted.clear();
+   df->format(formatted, ticks, p);
+   msStart = CachedDateFormat::findMillisecondStart(ticks, formatted, df, p);
+   LOGUNIT_ASSERT_EQUAL(20, msStart);
+
+   c.tm_usec = 609000;
+   LOGUNIT_ASSERT_EQUAL(0, apr_time_exp_gmt_get(&ticks, &c));
+
+   formatted.clear();
+   df->format(formatted, ticks, p);
+   msStart = CachedDateFormat::findMillisecondStart(ticks, formatted, df, p);
+   LOGUNIT_ASSERT_EQUAL(20, msStart);
 }
 
 /**
@@ -528,7 +549,6 @@
    LOGUNIT_ASSERT_EQUAL((int) CachedDateFormat::UNRECOGNIZED_MILLISECONDS, millisecondStart);
 }
 
-
 /**
  * Check caching when multiple SSS appear in pattern
  */
@@ -551,12 +571,27 @@
     LOGUNIT_ASSERT_EQUAL((LogString) LOG4CXX_STR("00:00:00,120 00:00:00,120"), s);
 
     s.erase(s.begin(), s.end());
-    cachedFormat->format(s, jul2, p);
+    int msStart = CachedDateFormat::findMillisecondStart(jul2, s, simpleFormat, p);
+    LOGUNIT_ASSERT_EQUAL((int) CachedDateFormat::UNRECOGNIZED_MILLISECONDS, msStart);
 
+    cachedFormat->format(s, jul2, p);
     LOGUNIT_ASSERT_EQUAL((LogString) LOG4CXX_STR("00:00:00,120 00:00:00,120"), s) ;
 
     int maxValid = CachedDateFormat::getMaximumCacheValidity(badPattern);
     LOGUNIT_ASSERT_EQUAL(1000, maxValid);
+
+    // Test overlapping millis with a magic string from CachedDateFormat for LOGCXX-420.
+    s.clear();
+    jul2 += 286000;
+    cachedFormat->format(s, jul2, p);
+    msStart = CachedDateFormat::findMillisecondStart(jul2, s, simpleFormat, p);
+    LOGUNIT_ASSERT_EQUAL((int) CachedDateFormat::UNRECOGNIZED_MILLISECONDS, msStart);
+
+    s.clear();
+    jul2 += 203000;
+    cachedFormat->format(s, jul2, p);
+    msStart = CachedDateFormat::findMillisecondStart(jul2, s, simpleFormat, p);
+    LOGUNIT_ASSERT_EQUAL((int) CachedDateFormat::UNRECOGNIZED_MILLISECONDS, msStart);
 }
 
 /**
@@ -609,5 +644,4 @@
 
 };
 
-
 LOGUNIT_TEST_SUITE_REGISTRATION(CachedDateFormatTestCase);
diff --git a/src/test/cpp/helpers/datetimedateformattestcase.cpp b/src/test/cpp/helpers/datetimedateformattestcase.cpp
index e1183d5..0897bc1 100644
--- a/src/test/cpp/helpers/datetimedateformattestcase.cpp
+++ b/src/test/cpp/helpers/datetimedateformattestcase.cpp
@@ -181,7 +181,7 @@
         //  output the using STL
         //
         std::basic_ostringstream<logchar> buffer;
-#if defined(_USEFAC)
+#if defined(_MSC_VER) && _MSC_VER < 1300
          _USEFAC(locale, std::time_put<logchar>)
              .put(buffer, buffer, &date, fmt.c_str(), fmt.c_str() + fmt.length());
 #else
diff --git a/src/test/cpp/helpers/filewatchdogtest.cpp b/src/test/cpp/helpers/filewatchdogtest.cpp
new file mode 100644
index 0000000..87a972a
--- /dev/null
+++ b/src/test/cpp/helpers/filewatchdogtest.cpp
@@ -0,0 +1,66 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#include <log4cxx/helpers/pool.h>
+#include <log4cxx/helpers/filewatchdog.h>
+#include "../logunit.h"
+#include "apr_time.h"
+
+using namespace log4cxx;
+using namespace log4cxx::helpers;
+
+
+/**
+ *
+ * FileWatchdog tests.
+ */
+LOGUNIT_CLASS(FileWatchdogTest) {
+  LOGUNIT_TEST_SUITE(FileWatchdogTest);
+          LOGUNIT_TEST(testShutdownDelay);
+  LOGUNIT_TEST_SUITE_END();
+  
+private:
+    class MockWatchdog : public FileWatchdog {
+    public:
+        MockWatchdog(const File& file) : FileWatchdog(file) {
+        }
+        
+        void doOnChange() {
+        }
+    };
+    
+public:
+  
+  /**
+   *  Tests that FileWatchdog will respond to a shutdown request more rapidly
+   *     than waiting out its delay. 
+   */
+  void testShutdownDelay() {
+      apr_time_t start = apr_time_now();
+      {
+        MockWatchdog dog(File(LOG4CXX_STR("input/patternlayout1.properties")));
+        dog.start();
+        //   wait 50 ms for thread to get rolling 
+        apr_sleep(50000);
+      }
+      apr_time_t delta = apr_time_now() - start;
+      LOGUNIT_ASSERT(delta < 30000000);
+  }
+
+};
+
+LOGUNIT_TEST_SUITE_REGISTRATION(FileWatchdogTest);
+
diff --git a/src/test/cpp/helpers/propertiestestcase.cpp b/src/test/cpp/helpers/propertiestestcase.cpp
index 7a288d3..07ded38 100644
--- a/src/test/cpp/helpers/propertiestestcase.cpp
+++ b/src/test/cpp/helpers/propertiestestcase.cpp
@@ -28,6 +28,20 @@
 {
         LOGUNIT_TEST_SUITE(PropertiesTestCase);
                 LOGUNIT_TEST(testLoad1);
+                LOGUNIT_TEST(testTab1);
+                LOGUNIT_TEST(testTab2);
+                LOGUNIT_TEST(testTab3);
+                LOGUNIT_TEST(testTab4);
+                LOGUNIT_TEST(testTab5);
+                LOGUNIT_TEST(testTab6);
+                LOGUNIT_TEST(testTab7);
+                LOGUNIT_TEST(testCRLF1);
+                LOGUNIT_TEST(testEscT1);
+                LOGUNIT_TEST(testEscT2);
+                LOGUNIT_TEST(testEscN1);
+                LOGUNIT_TEST(testEscN2);
+                LOGUNIT_TEST(testEscR1);
+                LOGUNIT_TEST(testEscR2);
         LOGUNIT_TEST_SUITE_END();
 
 public:
@@ -41,6 +55,198 @@
           LogString pattern(properties.getProperty(LOG4CXX_STR("log4j.appender.testAppender.layout.ConversionPattern")));
           LOGUNIT_ASSERT_EQUAL((LogString) LOG4CXX_STR("%-5p - %m%n"), pattern);
         }
+        
+        /**
+         *  Test tab as separator between key and value, see LOGCXX-291.
+        */
+        void testTab1() {
+          FileInputStreamPtr propFile(
+            new FileInputStream(LOG4CXX_STR("input/propertiestestcase.properties")));
+          Properties properties;
+          properties.load(propFile);
+          LogString actual(properties.getProperty(LOG4CXX_STR("propertiestestcase.tab1")));
+          LOGUNIT_ASSERT_EQUAL(LogString(LOG4CXX_STR("tab delimited")), actual);
+        }
+
+        /**
+         *  Test tab as whitespace before key, see LOGCXX-291.
+        */
+        void testTab2() {
+          FileInputStreamPtr propFile(
+            new FileInputStream(LOG4CXX_STR("input/propertiestestcase.properties")));
+          Properties properties;
+          properties.load(propFile);
+          LogString actual(properties.getProperty(LOG4CXX_STR("propertiestestcase.tab2")));
+          LOGUNIT_ASSERT_EQUAL(LogString(LOG4CXX_STR("tab before key")), actual);
+        }
+
+        /**
+         *  Test tab as escaped within key, see LOGCXX-291.
+        */
+        void testTab3() {
+          FileInputStreamPtr propFile(
+            new FileInputStream(LOG4CXX_STR("input/propertiestestcase.properties")));
+          Properties properties;
+          properties.load(propFile);
+          LogString key(LOG4CXX_STR("propertiestestcase.tab3"));
+          key.append(1, 0x09);
+          LogString actual(properties.getProperty(key));
+          LOGUNIT_ASSERT_EQUAL(LogString(LOG4CXX_STR("key contains tab")), actual);
+        }
+
+        /**
+         *  Test tab after delimitor, see LOGCXX-291.
+        */
+        void testTab4() {
+          FileInputStreamPtr propFile(
+            new FileInputStream(LOG4CXX_STR("input/propertiestestcase.properties")));
+          Properties properties;
+          properties.load(propFile);
+          LogString actual(properties.getProperty(LOG4CXX_STR("propertiestestcase.tab4")));
+          LOGUNIT_ASSERT_EQUAL(LogString(LOG4CXX_STR("tab after equals")), actual);
+        }
+
+        /**
+         *  Test tab after continuation in key, see LOGCXX-291.
+        */
+        void testTab5() {
+          FileInputStreamPtr propFile(
+            new FileInputStream(LOG4CXX_STR("input/propertiestestcase.properties")));
+          Properties properties;
+          properties.load(propFile);
+          LogString actual(properties.getProperty(LOG4CXX_STR("propertiestestcase.tab5")));
+          LOGUNIT_ASSERT_EQUAL(LogString(LOG4CXX_STR("tab after continue")), actual);
+        }
+
+        /**
+         *  Test tab escaped in value, see LOGCXX-291.
+        */
+        void testTab6() {
+          FileInputStreamPtr propFile(
+            new FileInputStream(LOG4CXX_STR("input/propertiestestcase.properties")));
+          Properties properties;
+          properties.load(propFile);
+          LogString actual(properties.getProperty(LOG4CXX_STR("propertiestestcase.tab6")));
+          LogString expected(1, 0x09);
+          expected.append(LOG4CXX_STR(" in value"));
+          LOGUNIT_ASSERT_EQUAL(expected, actual);
+        }
+
+        /**
+         *  Test tab in value continuation, see LOGCXX-291.
+        */
+        void testTab7() {
+          FileInputStreamPtr propFile(
+            new FileInputStream(LOG4CXX_STR("input/propertiestestcase.properties")));
+          Properties properties;
+          properties.load(propFile);
+          LogString actual(properties.getProperty(LOG4CXX_STR("propertiestestcase.tab7")));
+          LOGUNIT_ASSERT_EQUAL(LogString(LOG4CXX_STR("continuedvalue")), actual);
+        }
+
+        /**
+         *  Test tab in value continuation, see LOGCXX-292.
+        */
+        void testCRLF1() {
+          FileInputStreamPtr propFile(
+            new FileInputStream(LOG4CXX_STR("input/propertiestestcase.properties")));
+          Properties properties;
+          properties.load(propFile);
+          LogString actual(properties.getProperty(LOG4CXX_STR("propertiestestcase.crlf1")));
+          LOGUNIT_ASSERT_EQUAL(LogString(LOG4CXX_STR("continuedvalue")), actual);
+        }
+
+    /**
+     *  Test tab as escaped within key, see LOGCXX-293.
+    */
+    void testEscT1()  {
+      FileInputStreamPtr propFile(
+        new FileInputStream(LOG4CXX_STR("input/propertiestestcase.properties")));
+      Properties properties;
+      properties.load(propFile);
+      LogString key(LOG4CXX_STR("propertiestestcase.esct1"));
+      key.append(1, 0x09);
+      LogString actual(properties.getProperty(key));
+      LOGUNIT_ASSERT_EQUAL(LogString(LOG4CXX_STR("key contains tab")), actual);
+    }
+
+
+
+    /**
+     *  Test tab escaped in value, see LOGCXX-293.
+    */
+    void testEscT2()  {
+      FileInputStreamPtr propFile(
+        new FileInputStream(LOG4CXX_STR("input/propertiestestcase.properties")));
+      Properties properties;
+      properties.load(propFile);
+      LogString actual(properties.getProperty(LOG4CXX_STR("propertiestestcase.esct2")));
+      LogString expected(1, 0x09);
+      expected.append(LOG4CXX_STR(" in value"));
+      LOGUNIT_ASSERT_EQUAL(expected, actual);
+    }
+
+    /**
+     *  Test \n within key, see LOGCXX-293.
+    */
+    void testEscN1()  {
+      FileInputStreamPtr propFile(
+        new FileInputStream(LOG4CXX_STR("input/propertiestestcase.properties")));
+      Properties properties;;
+      properties.load(propFile);
+      LogString key(LOG4CXX_STR("propertiestestcase.escn1"));
+      key.append(1, 0x0A);
+      LogString actual(properties.getProperty(key));
+      LOGUNIT_ASSERT_EQUAL(LogString(LOG4CXX_STR("key contains lf")), actual);
+    }
+
+
+
+    /**
+     *  Test \n in value, see LOGCXX-293.
+    */
+    void testEscN2()  {
+      FileInputStreamPtr propFile(
+        new FileInputStream(LOG4CXX_STR("input/propertiestestcase.properties")));
+      Properties properties;
+      properties.load(propFile);
+      LogString actual(properties.getProperty(LOG4CXX_STR("propertiestestcase.escn2")));
+      LogString expected(1, 0x0A);
+      expected.append(LOG4CXX_STR(" in value"));
+      LOGUNIT_ASSERT_EQUAL(expected, actual);
+    }
+
+    /**
+     *  Test \r within key, see LOGCXX-293.
+    */
+    void testEscR1()  {
+      FileInputStreamPtr propFile(
+        new FileInputStream(LOG4CXX_STR("input/propertiestestcase.properties")));
+      Properties properties;
+      properties.load(propFile);
+      LogString key(LOG4CXX_STR("propertiestestcase.escr1"));
+      key.append(1, 0x0D);
+      LogString actual(properties.getProperty(key));
+      LOGUNIT_ASSERT_EQUAL(LogString(LOG4CXX_STR("key contains cr")), actual);
+    }
+
+
+
+    /**
+     *  Test \r in value, see LOGCXX-293.
+    */
+    void testEscR2()  {
+      FileInputStreamPtr propFile(
+        new FileInputStream(LOG4CXX_STR("input/propertiestestcase.properties")));
+      Properties properties;
+      properties.load(propFile);
+      LogString actual(properties.getProperty(LOG4CXX_STR("propertiestestcase.escr2")));
+      LogString expected(1, 0x0D);
+      expected.append(LOG4CXX_STR(" in value"));
+      LOGUNIT_ASSERT_EQUAL(expected, actual);
+    }
+
+
 };
 
 
diff --git a/src/test/cpp/helpers/threadtestcase.cpp b/src/test/cpp/helpers/threadtestcase.cpp
new file mode 100644
index 0000000..c7df2c0
--- /dev/null
+++ b/src/test/cpp/helpers/threadtestcase.cpp
@@ -0,0 +1,66 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#include <log4cxx/helpers/thread.h>
+#include "../insertwide.h"
+#include "../logunit.h"
+#include <apr_time.h>
+#include <log4cxx/helpers/exception.h>
+
+using namespace log4cxx;
+using namespace log4cxx::helpers;
+
+
+/**
+   Unit test for Thread.
+   
+   */
+LOGUNIT_CLASS(ThreadTestCase) {
+  LOGUNIT_TEST_SUITE(ThreadTestCase);
+          LOGUNIT_TEST(testInterrupt);
+  LOGUNIT_TEST_SUITE_END();
+
+  public:
+  /**
+   * Start a thread that will wait for a minute, then interrupt it.
+   */
+  void testInterrupt() {
+    Thread thread1;
+    bool interrupted = false;
+    thread1.run(sleep, &interrupted);
+    apr_sleep(100000);
+    apr_time_t start = apr_time_now();
+    thread1.interrupt();
+    thread1.join();
+    LOGUNIT_ASSERT_EQUAL(true, interrupted);
+    apr_time_t elapsed = apr_time_now() - start;
+    LOGUNIT_ASSERT(elapsed < 1000000); 
+  }
+
+private:
+  static void* LOG4CXX_THREAD_FUNC sleep(apr_thread_t* thread, void* data) {
+      try {
+        Thread::sleep(60000);
+      } catch(InterruptedException& ex) {
+        *(reinterpret_cast<bool*>(data)) = true;
+      }
+      return NULL;
+  }
+
+};
+
+LOGUNIT_TEST_SUITE_REGISTRATION(ThreadTestCase);
+
diff --git a/src/test/cpp/helpers/transcodertestcase.cpp b/src/test/cpp/helpers/transcodertestcase.cpp
index 9711317..6eafc15 100644
--- a/src/test/cpp/helpers/transcodertestcase.cpp
+++ b/src/test/cpp/helpers/transcodertestcase.cpp
@@ -60,7 +60,11 @@
                 LOGUNIT_TEST(uencode3);
                 LOGUNIT_TEST(uencode5);
 #endif
-                
+#if LOG4CXX_LOGCHAR_IS_UTF8
+                LOGUNIT_TEST(encodeCharsetName1);
+                LOGUNIT_TEST(encodeCharsetName2);
+                LOGUNIT_TEST(encodeCharsetName3);
+#endif
         LOGUNIT_TEST_SUITE_END();
 
 
@@ -303,6 +307,35 @@
         }
 #endif
 
+#if LOG4CXX_LOGCHAR_IS_UTF8
+        void encodeCharsetName1() {
+            const logchar utf8[] = { 0x75, 0x74, 0x66, 0x2D, 0x38, 0x00 };
+            std::string encoded(Transcoder::encodeCharsetName(LogString(utf8)));
+            LOGUNIT_ASSERT_EQUAL(std::string("utf-8"), encoded);
+        }
+
+        void encodeCharsetName2() {
+            logchar lascii[0x60];
+            char ascii[0x60];
+            for(int i = 0; i < 0x5F; i++) {
+                lascii[i] = i + 0x20;
+                ascii[i] = i + 0x20;
+            }
+            lascii[0x5F] = 0;
+            ascii[0x5F] = 0;
+            std::string encoded(Transcoder::encodeCharsetName(LogString(ascii)));
+            LOGUNIT_ASSERT_EQUAL(std::string(" !\"#$%&'()*+,-./"), encoded.substr(0, 0x10));
+            if (0x40 == 'A') {
+                LOGUNIT_ASSERT_EQUAL(std::string(ascii), encoded);
+            }
+        }
+
+        void encodeCharsetName3() {
+            logchar unsupported[] = { 0x1F, 0x7F, 0x80, 0x81, 0x00 };
+            std::string encoded(Transcoder::encodeCharsetName(LogString(unsupported)));
+            LOGUNIT_ASSERT_EQUAL(std::string("????"), encoded);
+        }
+#endif
 
 };
 
diff --git a/src/test/cpp/hierarchytest.cpp b/src/test/cpp/hierarchytest.cpp
old mode 100755
new mode 100644
diff --git a/src/test/cpp/l7dtestcase.cpp b/src/test/cpp/l7dtestcase.cpp
index 680def2..7c13ab5 100644
--- a/src/test/cpp/l7dtestcase.cpp
+++ b/src/test/cpp/l7dtestcase.cpp
@@ -94,6 +94,9 @@
                         LOG4CXX_L7DLOG2(root, Level::getError(), LOG4CXX_TEST_STR("msg1"), os.str().c_str(),
                                  LOG4CXX_TEST_STR("log4j"));
                         LOG4CXX_L7DLOG(root, Level::getInfo(), LOG4CXX_TEST_STR("bogus2"));
+
+                        LOG4CXX_L7DLOG3(root, Level::getError(), LOG4CXX_TEST_STR("msg3"), os.str().c_str(),
+                                 LOG4CXX_TEST_STR("log4j"), LOG4CXX_TEST_STR("log4cxx"));
                 }
 
                 LOGUNIT_ASSERT(Compare::compare(LOG4CXX_FILE("output/temp"),
diff --git a/src/test/cpp/leveltestcase.cpp b/src/test/cpp/leveltestcase.cpp
index 15893ae..7de78aa 100644
--- a/src/test/cpp/leveltestcase.cpp
+++ b/src/test/cpp/leveltestcase.cpp
@@ -36,13 +36,14 @@
                 LOGUNIT_TEST(testStringToTrace);
 #if LOG4CXX_WCHAR_T_API
                 LOGUNIT_TEST(testWideStringToTrace);
-#endif                
+#endif
 #if LOG4CXX_UNICHAR_API
                 LOGUNIT_TEST(testUniCharStringToTrace);
-#endif                
+#endif
 #if LOG4CXX_CFSTRING_API
                 LOGUNIT_TEST(testCFStringToTrace);
-#endif                
+#endif
+                LOGUNIT_TEST(testTrimmedToTrace);
         LOGUNIT_TEST_SUITE_END();
 
 public:
@@ -51,7 +52,7 @@
                 LevelPtr level(Level::toLevel(LOG4CXX_TEST_STR("fATal")));
                 LOGUNIT_ASSERT_EQUAL((int) Level::FATAL_INT, level->toInt());
         }
-        
+
     /**
      * Tests Level::TRACE_INT.
      */
@@ -92,7 +93,7 @@
         LevelPtr trace(Level::toLevel(L"TRACE"));
         LOGUNIT_ASSERT(trace->toString() == LOG4CXX_STR("TRACE"));
   }
-#endif  
+#endif
 
 #if LOG4CXX_UNICHAR_API
     /**
@@ -103,7 +104,7 @@
         LevelPtr trace(Level::toLevel(name));
         LOGUNIT_ASSERT(trace->toString() == LOG4CXX_STR("TRACE"));
   }
-#endif  
+#endif
 
 #if LOG4CXX_CFSTRING_API
     /**
@@ -113,8 +114,15 @@
         LevelPtr trace(Level::toLevel(CFSTR("TRACE")));
         LOGUNIT_ASSERT(trace->toString() == LOG4CXX_STR("TRACE"));
   }
-#endif  
-        
+#endif
+
+    /**
+     * Tests Level.toLevel("TRACE ");
+     */
+  void testTrimmedToTrace() {
+        LevelPtr trace(Level::toLevel("TRACE "));
+      LOGUNIT_ASSERT(trace->toString() == LOG4CXX_STR("TRACE"));
+  }
 
 };
 
diff --git a/src/test/cpp/logunit.cpp b/src/test/cpp/logunit.cpp
index d5c52cc..138bf7b 100644
--- a/src/test/cpp/logunit.cpp
+++ b/src/test/cpp/logunit.cpp
@@ -115,8 +115,8 @@
 
 TestFixture::TestFixture() : tc(0) {}
 TestFixture::~TestFixture() {}
-void TestFixture::setCase(abts_case* tc) {
-      this->tc = tc;
+void TestFixture::setCase(abts_case* newtc) {
+      tc = newtc;
 }
 void TestFixture::setUp() {}
 void TestFixture::tearDown() {}
diff --git a/src/test/cpp/logunit.h b/src/test/cpp/logunit.h
index 179e268..abfaa40 100644
--- a/src/test/cpp/logunit.h
+++ b/src/test/cpp/logunit.h
@@ -27,6 +27,7 @@
 #include "abts.h"
 #include <exception>
 #include <map>
+#include <sstream>
 #include <string>
 #include <vector>
 
@@ -59,34 +60,34 @@
         void setCase(abts_case* tc);
         virtual void setUp();
         virtual void tearDown();
-        
+
         void assertEquals(const int expected, const int actual, int lineno);
-        void assertEquals(const std::string expected, 
-            const std::string actual, 
-            const char* expectedExpr, 
-            const char* actualExpr, 
+        void assertEquals(const std::string expected,
+            const std::string actual,
+            const char* expectedExpr,
+            const char* actualExpr,
             int lineno);
-        void assertEquals(const char* expected, 
-            const char* actual, 
-            const char* expectedExpr, 
-            const char* actualExpr, 
+        void assertEquals(const char* expected,
+            const char* actual,
+            const char* expectedExpr,
+            const char* actualExpr,
             int lineno);
-#if LOG4CXX_LOGCHAR_IS_WCHAR || LOG4CXX_WCHAR_T_API       
-        void assertEquals(const std::wstring expected, 
-            const std::wstring actual, 
-            const char* expectedExpr, 
-            const char* actualExpr, 
+#if LOG4CXX_LOGCHAR_IS_WCHAR || LOG4CXX_WCHAR_T_API
+        void assertEquals(const std::wstring expected,
+            const std::wstring actual,
+            const char* expectedExpr,
+            const char* actualExpr,
             int lineno);
-#endif        
+#endif
 #if LOG4CXX_LOGCHAR_IS_UNICHAR || LOG4CXX_UNICHAR_API || LOG4CXX_CFSTRING_API
-        void assertEquals(const std::basic_string<log4cxx::UniChar> expected, 
-             const std::basic_string<log4cxx::UniChar> actual, 
-             const char* expectedExpr, 
+        void assertEquals(const std::basic_string<log4cxx::UniChar> expected,
+             const std::basic_string<log4cxx::UniChar> actual,
+             const char* expectedExpr,
              const char* actualExpr, int lineno);
 #endif
         template<class T>
-        void assertEquals(const T& expected, 
-             const T& actual, 
+        void assertEquals(const T& expected,
+             const T& actual,
              const char* expectedExpr,
              const char* actualExpr,
              int lineno) {
@@ -112,6 +113,12 @@
         } catch(TestException&) {
         } catch(AssertException& fx) {
             abts_fail(tc, fx.getMessage().c_str(), fx.getLine());
+        } catch(std::exception& e) {
+            const char* what = e.what();
+            std::ostringstream oss;
+            oss << "Unexpected std::exception: "
+                << (what ? what : "what() == NULL");
+            abts_fail(tc, oss.str().c_str(), -1);
         } catch(...) {
             abts_fail(tc, "Unexpected exception", -1);
         }
@@ -184,8 +191,8 @@
      private:                                         \
      class RegisterSuite {                            \
      public:                                          \
-        typedef TF ThisFixture;                       
-        
+        typedef TF ThisFixture
+
 #define LOGUNIT_TEST(testName)          \
      class testName ## Registration {   \
      public:                            \
@@ -195,7 +202,7 @@
         static void run(abts_case* tc, void*) { \
             LogUnit::runTest<ThisFixture>(tc, &ThisFixture::testName); \
         }                                       \
-    } register ## testName;
+    } register ## testName
 
 #define LOGUNIT_TEST_EXCEPTION(testName, Exception)  \
      class testName ## Registration {   \
@@ -206,7 +213,7 @@
         static void run(abts_case* tc, void*) { \
             LogUnit::runTestWithException<ThisFixture, Exception>(tc, &ThisFixture::testName); \
         }                                       \
-    } register ## testName;
+    } register ## testName
 
 
 #define LOGUNIT_TEST_SUITE_END() \
@@ -214,8 +221,10 @@
     public:                        \
     static void populateSuite() {         \
         static RegisterSuite registration; \
-    }
-    
+    }                                      \
+    private:                               \
+    void nop()
+
 
 #define LOGUNIT_TEST_SUITE_REGISTRATION(TF) \
 static LogUnit::RegisterSuite<TF> registration;
@@ -223,10 +232,12 @@
 #define LOGUNIT_TEST_SUITE_REGISTRATION_DISABLED(TF) \
 static LogUnit::RegisterDisabledSuite<TF> registration;
 
-    
-#define LOGUNIT_ASSERT(x) { if (!(x)) throw LogUnit::AssertException(true, #x, __LINE__); }
-#define LOGUNIT_ASSERT_EQUAL(expected, actual) assertEquals(expected, actual, #expected, #actual, __LINE__)
-#define LOGUNIT_FAIL(msg) throw LogUnit::AssertException(msg, __LINE__)
+
+#define LOGUNIT_ASSERT(		x)									{ if (!(x)) throw LogUnit::AssertException(true, #x, __LINE__);	}
+#define LOGUNIT_ASSERT_SRCL(x, srcLine)							{ if (!(x)) throw LogUnit::AssertException(true, #x, srcLine);	}
+#define LOGUNIT_ASSERT_EQUAL(		expected, actual)			assertEquals(expected, actual, #expected, #actual, __LINE__)
+#define LOGUNIT_ASSERT_EQUAL_SRCL(	expected, actual, srcLine)	assertEquals(expected, actual, #expected, #actual, srcLine)
+#define LOGUNIT_FAIL(msg)										throw LogUnit::AssertException(msg, __LINE__)
 
 
 #if defined(_MSC_VER)
diff --git a/src/test/cpp/mdctestcase.cpp b/src/test/cpp/mdctestcase.cpp
new file mode 100644
index 0000000..b3a066e
--- /dev/null
+++ b/src/test/cpp/mdctestcase.cpp
@@ -0,0 +1,60 @@
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <log4cxx/mdc.h>
+#include <log4cxx/file.h>
+#include <log4cxx/logger.h>
+#include <log4cxx/propertyconfigurator.h>
+#include "insertwide.h"
+#include "logunit.h"
+#include "util/compare.h"
+
+
+
+using namespace log4cxx;
+
+LOGUNIT_CLASS(MDCTestCase)
+{
+        LOGUNIT_TEST_SUITE(MDCTestCase);
+                LOGUNIT_TEST(test1);
+        LOGUNIT_TEST_SUITE_END();
+
+public:
+
+        void setUp() {
+        }
+
+        void tearDown() {
+            Logger::getRootLogger()->getLoggerRepository()->resetConfiguration();
+        }
+
+        /**
+         *   log4cxx 0.10.0 did not replace previously set value.
+         */
+        void test1()
+        {
+                std::string key("key1");
+                std::string expected("value2");
+                MDC::put(key, "value1");
+                MDC::put(key, expected);
+                std::string actual(MDC::get(key));
+                LOGUNIT_ASSERT_EQUAL(expected, actual);
+        }
+};
+
+LOGUNIT_TEST_SUITE_REGISTRATION(MDCTestCase);
diff --git a/src/test/cpp/ndctestcase.cpp b/src/test/cpp/ndctestcase.cpp
old mode 100755
new mode 100644
diff --git a/src/test/cpp/net/smtpappendertestcase.cpp b/src/test/cpp/net/smtpappendertestcase.cpp
index 240011f..e2ebe43 100644
--- a/src/test/cpp/net/smtpappendertestcase.cpp
+++ b/src/test/cpp/net/smtpappendertestcase.cpp
@@ -111,8 +111,8 @@
       appender->activateOptions(p);
       LoggerPtr root(Logger::getRootLogger());
       root->addAppender(appender);
-      LOG4CXX_INFO(root, "Hello, World.");
-      LOG4CXX_ERROR(root, "Sending Message");
+      LOG4CXX_INFO(root, "Hello, World.")
+      LOG4CXX_ERROR(root, "Sending Message")
   }
 
 };
diff --git a/src/test/cpp/net/socketappendertestcase.cpp b/src/test/cpp/net/socketappendertestcase.cpp
index b77cc05..195ba99 100644
--- a/src/test/cpp/net/socketappendertestcase.cpp
+++ b/src/test/cpp/net/socketappendertestcase.cpp
@@ -17,6 +17,7 @@
 
 #include <log4cxx/net/socketappender.h>
 #include "../appenderskeletontestcase.h"
+#include "apr.h"
 
 using namespace log4cxx;
 using namespace log4cxx::helpers;
diff --git a/src/test/cpp/net/xmlsocketappendertestcase.cpp b/src/test/cpp/net/xmlsocketappendertestcase.cpp
index caf0008..507f8d5 100644
--- a/src/test/cpp/net/xmlsocketappendertestcase.cpp
+++ b/src/test/cpp/net/xmlsocketappendertestcase.cpp
@@ -17,6 +17,7 @@
 
 #include <log4cxx/net/xmlsocketappender.h>
 #include "../appenderskeletontestcase.h"
+#include "apr.h"
 
 using namespace log4cxx;
 using namespace log4cxx::helpers;
diff --git a/src/test/cpp/rolling/timebasedrollingtest.cpp b/src/test/cpp/rolling/timebasedrollingtest.cpp
old mode 100755
new mode 100644
index 3114e2c..76b8678
--- a/src/test/cpp/rolling/timebasedrollingtest.cpp
+++ b/src/test/cpp/rolling/timebasedrollingtest.cpp
@@ -15,6 +15,8 @@
  * limitations under the License.
  */
 
+#include <vector>
+
 #include <log4cxx/rolling/rollingfileappender.h>
 #include <log4cxx/logger.h>
 #include <log4cxx/consoleappender.h>
@@ -26,16 +28,20 @@
 #include <log4cxx/helpers/stringhelper.h>
 #include "../util/compare.h"
 #include "../logunit.h"
+
 #include <apr_strings.h>
-
-
+#include <apr_time.h>
 #ifndef INT64_C
 #define INT64_C(x) x ## LL
 #endif
-#include <apr_time.h>
 
-
-
+// We often need one and the same date pattern, but in different contexts, to either easily embed it
+// into other string literals or as an object. While macros are hard to debug, embedding into string
+// literals is easier this way, because the compiler can automatically collaps them, and if we have
+// one macro already, a second for a similar purpose shouldn't hurt as well.
+#define DATE_PATTERN		"yyyy-MM-dd_HH_mm_ss"
+#define DATE_PATTERN_STR	LogString(LOG4CXX_STR("yyyy-MM-dd_HH_mm_ss"))
+#define PATTERN_LAYOUT		LOG4CXX_STR("%c{1} - %m%n")
 
 using namespace log4cxx;
 using namespace log4cxx::helpers;
@@ -59,384 +65,570 @@
  Test5      NO                SET          NO
  Test6      YES               SET          NO
  * </pre>
- * 
  */
-LOGUNIT_CLASS(TimeBasedRollingTest) {
+LOGUNIT_CLASS(TimeBasedRollingTest)
+{
+	LOGUNIT_TEST_SUITE(TimeBasedRollingTest);
+		LOGUNIT_TEST(test1);
+		LOGUNIT_TEST(test2);
+		LOGUNIT_TEST(test3);
+		LOGUNIT_TEST(test4);
+		LOGUNIT_TEST(test5);
+		LOGUNIT_TEST(test6);
+		LOGUNIT_TEST(test7);
+	LOGUNIT_TEST_SUITE_END();
 
-        LOGUNIT_TEST_SUITE(TimeBasedRollingTest);
-           LOGUNIT_TEST(test1);
-           LOGUNIT_TEST(test2);
-           LOGUNIT_TEST(test3);
-           LOGUNIT_TEST(test4);
-           LOGUNIT_TEST(test5);
-           LOGUNIT_TEST(test6);
-        LOGUNIT_TEST_SUITE_END();
+private:
+	static LoggerPtr logger;
 
-    static LoggerPtr logger;
+	/**
+	 * Currently running test.
+	 * <p>
+	 * Number of currently running test, used e.g. for some generic code in {@link setUp()}.
+	 * </p>
+	 */
+	size_t num_test;
+
+	/**
+	 * Build file names with timestamps.
+	 * <p>
+	 * This method builds some file names based on a hard coded date pattern, while the important
+	 * thing is that the used time is "now" for the first and one additional second into the future
+	 * for each subsequent file name. The method is used to build names which are expected to get
+	 * created by loggers afterwards, so the existence of those files can be checked easily.
+	 * </p>
+	 * <p>
+	 * The given {@code prefix} is for the file name only, we hard code "output" as directory.
+	 * </p>
+	 * <p>
+	 * Using {@code startInFuture} the caller can specify if the first created file name uses "now"
+	 * or already starts one second in the future. This depends on what the caller wants to check:
+	 * If it is the existence of specially named files and the caller uses some generic log file to
+	 * start with, it's most likely that the first file name to checks needs to be in the future,
+	 * because new files are only created with subsequent log statements. The first goes to the
+	 * generically named file, afterwards the test sleeps a bit and the next statement is creating
+	 * the first file to check for. During the time between those two calls the current second and
+	 * therefore "now" could have easily past and the first file name will never be found, because
+	 * the rolling appender creates it with a newer "now", at least one second in the future.
+	 * </p>
+	 * @param[in,out]	pool
+	 * @param[in]		prefix
+	 * @param[in]		fileNames
+	 * param[in,opt]	withCompression
+	 * param[in,opt]	startInFuture
+	 */
+	template<size_t N>
+	void buildTsFileNames(			Pool&		pool,
+							const	logchar*	prefix,
+									LogString	(&fileNames)[N],
+									bool		withCompression	= false,
+									bool		startInFuture	= false)
+	{
+		SimpleDateFormat	sdf(DATE_PATTERN_STR);
+		apr_time_t			now(apr_time_now());
+		LogString			ext(withCompression ? LOG4CXX_STR(".gz") : LOG4CXX_STR(""));
+
+		now += startInFuture ? APR_USEC_PER_SEC : 0;
+		for (size_t i = 0; i < N; ++i)
+		{
+			fileNames[i].assign(LogString(LOG4CXX_STR("output/")) + prefix);
+			sdf.format(fileNames[i], now, pool);
+			fileNames[i].append(ext);
+
+			now += APR_USEC_PER_SEC;
+		}
+	}
+
+	/**
+	 * Log some msg and sleep.
+	 * <p>
+	 * Most tests need to log some message to some files and sleep afterwards, to spread the msgs
+	 * over time and timestamp based named files. This method handles this for all tests to not need
+	 * to replicate the same code AND deals with the fact that the logigng statements should contain
+	 * the original src function and line. For that to work each caller needs to provide us the
+	 * additional information and we redefine LOG4CXX_LOCATION to use that provided data instead of
+	 * that from the compiler when a log statement is issued. While this is a bit ugly, because we
+	 * need to duplicate the definition of LOG4CXX_LOCATION, it is easier than to duplicate the code
+	 * for logging and sleeping per test in this file.
+	 * </p>
+	 * <p>
+	 * The given wait factor is always multiplied with 1 second and the result is waited for, so a
+	 * caller needs to e.g. provide {@code 0.5} if it needs log statements to distribute over given
+	 * files, resulting in two statements per file. If the caller needs indivdual file to check for
+	 * their existence, {@code 1} can be provided, which ensures that we wait for at least the next
+	 * second.
+	 * </p>
+	 * <p>
+	 * It is important the the caller provides aus with {@code __LOG4CXX_FUNC__} instead of only
+	 * {@code __FUNC__} or such, because the latter is compiler specific and log4cxx already deals
+	 * with such things.
+	 * </p>
+	 * <p>
+	 * We had macro wrappers around this method dealing with such things in the past, but as args
+	 * where added, those become more and more difficult to maintain properly and therefore removed.
+	 * </p>
+	 * @param[in,out]	pool
+	 * @param[in]		howOften
+	 * @param[in]		srcFunc
+	 * @param[in]		srcLine
+	 * @param[in,opt]	startWith
+	 * @param[in]		waitFactor
+	 */
+	void logMsgAndSleep(Pool&		pool,
+						size_t		howOften,
+						std::string	srcFunc,
+						size_t		srcLine,
+						size_t		startWith	= 0,
+						float		waitFactor	= 0.5)
+	{
+#undef	LOG4CXX_LOCATION
+#define	LOG4CXX_LOCATION ::log4cxx::spi::LocationInfo(	\
+							__FILE__,					\
+							srcFunc.c_str(),			\
+							srcLine)
+
+		for (size_t i = startWith; i < startWith + howOften; ++i)
+		{
+			std::string	message("Hello---");
+						message.append(pool.itoa(i));
+
+			LOG4CXX_DEBUG(logger, message);
+			apr_sleep(APR_USEC_PER_SEC * waitFactor);
+		}
+
+#undef	LOG4CXX_LOCATION
+#define	LOG4CXX_LOCATION ::log4cxx::spi::LocationInfo(	\
+							__FILE__,					\
+							__LOG4CXX_FUNC__,			\
+							__LINE__)
+	}
+
+	/**
+	 * Check witness by comparing file contents.
+	 * <p>
+	 * This method checks the witness for some test by comparing the contents of the given file used
+	 * by that test. To find the corresponding witness, the prefix of the test needs to be provided,
+	 * which is some unique part of the file name to use, while we hard code the parent dir and
+	 * other non changing parts of the name.
+	 * </p>
+	 * <p>
+	 * We don't use a wrapper macro this time because the src line should have the same name in all
+	 * compilers and is easily to add for the caller.
+	 * </p>
+	 * @param[in,out]	pool
+	 * @param[in]		prefix
+	 * @param[in]		fileName
+	 * @param[in]		witnessIdx
+	 * @param[in]		srcLine
+	 */
+	void compareWitness(		Pool&		pool,
+						const	logchar*	prefix,
+						const	LogString&	fileName,
+								size_t		witnessIdx,
+								size_t		srcLine)
+	{
+		LogString	witness(LOG4CXX_STR("witness/rolling/tbr-"));
+					witness.append(prefix);
+
+		StringHelper::toString(witnessIdx, pool, witness);
+		LOGUNIT_ASSERT_SRCL(Compare::compare(fileName, File(witness)), srcLine);
+	}
+
+	/**
+	 * Check witnesses by comparing file contents.
+	 * <p>
+	 * This method is a wrapper around {@link compareWitness}, used to iterate over all files from a
+	 * given test.
+	 * </p>
+	 * @param[in,out]	pool
+	 * @param[in]		prefix
+	 * @param[in]		fileNames
+	 * @param[in]		srcLine
+	 */
+	template<size_t N>
+	void compareWitnesses(			Pool&		pool,
+							const	logchar*	prefix,
+									LogString	(&fileNames)[N],
+									size_t		srcLine)
+	{
+		for (int i = 0; i < N; ++i)
+		{
+			this->compareWitness(pool, prefix, fileNames[i], i, srcLine);
+		}
+	}
+
+	/**
+	 * Check existing files.
+	 * <p>
+	 * This method checks that the first N - 1 files of the given array actually exist and compares
+	 * the last one by content to some witness.
+	 * </p>
+	 * <p>
+	 * We don't use a wrapper macro this time because the src line schould have the same name in all
+	 * compilers and is easily to add for the caller.
+	 * </p>
+	 * @param[in,out]	pool
+	 * @param[in]		prefix
+	 * @param[in]		fileNames
+	 * @param[in]		srcLine
+	 */
+	template<size_t N>
+	void checkFilesExist(			Pool&		pool,
+							const	logchar*	prefix,
+									LogString	(&fileNames)[N],
+									size_t		srcLine)
+	{
+		for (int i = 0; i < N - 1; ++i)
+		{
+			LOGUNIT_ASSERT_EQUAL_SRCL(true, File(fileNames[0]).exists(pool), srcLine);
+		}
+
+		this->compareWitness(pool, prefix, fileNames[N - 1], N - 1, srcLine);
+	}
+
+	/**
+	 * Let the current second pass.
+	 * <p>
+	 * This method assures that the current second and some additional time gets passed before
+	 * returning.
+	 * </p>
+	 * @param[in,opt] millis
+	 */
+	void delayUntilNextSecond(size_t millis = 100)
+	{
+		apr_time_t now  = apr_time_now();
+		apr_time_t next = ((now / APR_USEC_PER_SEC) + 1) * APR_USEC_PER_SEC + millis * 1000L;
+
+		apr_sleep(next - now);
+	}
+
+	/**
+	 * Let the current second pass with some msg.
+	 * <p>
+	 * This method works exactly like {@link delayUntilNextSecond(size_t)}, but additionally prints
+	 * a message before and after the wait on STDOUT for debugging purposes.
+	 * </p>
+	 * @param[in,opt] millis
+	 */
+	void delayUntilNextSecondWithMsg(size_t millis = 100)
+	{
+		std::cout << "Waiting until next second and " << millis << " millis.";
+		delayUntilNextSecond(millis);
+		std::cout << "Done waiting." << std::endl;
+	}
+
+	/**
+	 * Delete generic log files.
+	 * <p>
+	 * Some tests use generic log file names which may already be available during subsequent calls
+	 * to the test and influence their behavior, e.g. because RollingFileAppender uses the last
+	 * modification time of already existing files to create their internal names. Such a date may
+	 * be from the arbitrary past, but ost of the test assumes operations like rollovers within few
+	 * seconds around "new". Thos assumptions will fail for older existing files. So this method can
+	 * be called during {@link setUp()} of an test to clear such generically named files for each
+	 * test. We currently only care about {@code output/testxy.log}.
+	 * </p>
+	 * @param[in] num_test
+	 */
+	void deleteGenericLogFilePerTest(size_t num_test)
+	{
+		Pool		pool;
+		LogString	path(LOG4CXX_STR("output/test"));
+
+		StringHelper::toString(num_test, pool, path);
+		path.append(LOG4CXX_STR(".log"));
+
+		File(path).deleteFile(pool);
+	}
+
+	/**
+	 * Setup for internal test call.
+	 * <p>
+	 * This method has a similar intention like {@link setUp()}, only that it focusses on internal
+	 * calls of the tests, where we don't need to create some loggers and such, but may need to
+	 * delete some files etc. to make tests work.
+	 * </p>
+	 * @param[in] num_test
+	 */
+	void internalSetUp(size_t num_test)
+	{
+		this->deleteGenericLogFilePerTest(num_test);
+	}
+
+	/**
+	 * Counterpart for {@like internalSetUp(size_t)}.
+	 * <p>
+	 * Counterpart for {@like internalSetUp(size_t)}.
+	 * </p>
+	 */
+	void internalTearDown()
+	{
+		// Nothing to do currently.
+    }
 
 public:
+	/**
+	 * Extract number of current test.
+	 * <p>
+	 * {@code setUp()} needs the number of the current runnign test for some generic work and this
+	 * is the only place where we can extract and save it in the instance.
+	 * </p>
+	 */
+	void setCase(abts_case* tc)
+	{
+		LogUnit::TestFixture::setCase(tc);
+		this->num_test = tc->suite->num_test;
+	}
 
-  void setUp() {
-      LoggerPtr root(Logger::getRootLogger());
-    root->addAppender(
-      new ConsoleAppender(new PatternLayout(
-         LOG4CXX_STR("%d{ABSOLUTE} [%t] %level %c{2}#%M:%L - %m%n"))));
-  }
+	void setUp()
+	{
+		LoggerPtr root(Logger::getRootLogger());
+		root->addAppender(
+			new ConsoleAppender(
+				new PatternLayout(
+					LOG4CXX_STR("%d{ABSOLUTE} [%t] %level %c{2}#%M:%L - %m%n"))));
+		this->internalSetUp(this->num_test);
+	}
 
-  void tearDown() {
-      LogManager::shutdown();
-  }
+	void tearDown()
+	{
+		this->internalTearDown();
+		LogManager::shutdown();
+	}
 
-  /**
-   * Test rolling without compression, activeFileName left blank, no stop/start
-   */
-  void test1()  {
-    PatternLayoutPtr layout(new PatternLayout(LOG4CXX_STR("%c{1} - %m%n")));
-    RollingFileAppenderPtr rfa(new RollingFileAppender());
-    rfa->setLayout(layout);
+	/**
+	 * Test rolling without compression, activeFileName left blank, no stop/start
+	 */
+	void test1()
+	{
+				Pool		pool;
+		const	size_t		nrOfFileNames = 4;
+				LogString	fileNames[nrOfFileNames];
 
-    LogString datePattern(LOG4CXX_STR("yyyy-MM-dd_HH_mm_ss"));
+		PatternLayoutPtr		layout(	new PatternLayout(PATTERN_LAYOUT));
+		RollingFileAppenderPtr	rfa(	new RollingFileAppender());
+		rfa->setLayout(layout);
 
-    TimeBasedRollingPolicyPtr tbrp(new TimeBasedRollingPolicy());
-    tbrp->setFileNamePattern(LOG4CXX_STR("output/test1-%d{yyyy-MM-dd_HH_mm_ss}"));
-    Pool p;
-    tbrp->activateOptions(p);
-    rfa->setRollingPolicy(tbrp);
-    rfa->activateOptions(p);
-    logger->addAppender(rfa);
+		TimeBasedRollingPolicyPtr tbrp(new TimeBasedRollingPolicy());
+		tbrp->setFileNamePattern(LOG4CXX_STR("output/test1-%d{" DATE_PATTERN "}"));
+		tbrp->activateOptions(pool);
+		rfa->setRollingPolicy(tbrp);
+		rfa->activateOptions(pool);
+		logger->addAppender(rfa);
 
-    SimpleDateFormat sdf(datePattern);
-    LogString filenames[4];
+		this->buildTsFileNames(pool, LOG4CXX_STR("test1-"), fileNames);
+		this->delayUntilNextSecondWithMsg();
+		this->logMsgAndSleep(	pool, nrOfFileNames + 1, __LOG4CXX_FUNC__, __LINE__);
+		this->compareWitnesses(	pool, LOG4CXX_STR("test1."), fileNames, __LINE__);
+	}
 
-    Pool pool;
-    apr_time_t now = apr_time_now();
-    { for (int i = 0; i < 4; i++) {
-      filenames[i] = LOG4CXX_STR("output/test1-");
-      sdf.format(filenames[i], now, p);
-      now += APR_USEC_PER_SEC;
-    } }
+	/**
+	 * No compression, with stop/restart, activeFileName left blank
+	 */
+	void test2()
+	{
+				Pool		pool;
+		const	size_t		nrOfFileNames = 4;
+				LogString	fileNames[nrOfFileNames];
 
-    std::cout << "Waiting until next second and 100 millis.";
-    delayUntilNextSecond(100);
-    std::cout << "Done waiting.";
+		PatternLayoutPtr		layout1(new PatternLayout(PATTERN_LAYOUT));
+		RollingFileAppenderPtr	rfa1(	new RollingFileAppender());
+		rfa1->setLayout(layout1);
 
-    { for (int i = 0; i < 5; i++) {
-        std::string message("Hello---");
-        message.append(pool.itoa(i));
-        LOG4CXX_DEBUG(logger, message);
-        apr_sleep(APR_USEC_PER_SEC/2);
-    } }
+		TimeBasedRollingPolicyPtr tbrp1(new TimeBasedRollingPolicy());
+		tbrp1->setFileNamePattern(LOG4CXX_STR("output/test2-%d{" DATE_PATTERN "}"));
+		tbrp1->activateOptions(pool);
+		rfa1->setRollingPolicy(tbrp1);
+		rfa1->activateOptions(pool);
+		logger->addAppender(rfa1);
 
-    for (int i = 0; i < 4; i++) {
-      LogString witness(LOG4CXX_STR("witness/rolling/tbr-test1."));
-      StringHelper::toString(i, pool, witness);
-      LOGUNIT_ASSERT(Compare::compare(filenames[i], File(witness)));
-    }
-  }
+		this->buildTsFileNames(pool, LOG4CXX_STR("test2-"), fileNames);
+		this->delayUntilNextSecondWithMsg();
+		this->logMsgAndSleep(pool, 3, __LOG4CXX_FUNC__, __LINE__);
 
-  /**
-   * No compression, with stop/restart, activeFileName left blank
-   */
-  void test2()  {
-    LogString datePattern(LOG4CXX_STR("yyyy-MM-dd_HH_mm_ss"));
+		logger->removeAppender(rfa1);
+		rfa1->close();
 
-    PatternLayoutPtr layout1(new PatternLayout(LOG4CXX_STR("%c{1} - %m%n")));
-    RollingFileAppenderPtr rfa1(new RollingFileAppender());
-    rfa1->setLayout(layout1);
+		PatternLayoutPtr		layout2(new PatternLayout(PATTERN_LAYOUT));
+		RollingFileAppenderPtr	rfa2(	new RollingFileAppender());
+		rfa2->setLayout(layout2);
 
-    TimeBasedRollingPolicyPtr tbrp1(new TimeBasedRollingPolicy());
-    tbrp1->setFileNamePattern(LOG4CXX_STR("output/test2-%d{yyyy-MM-dd_HH_mm_ss}"));
-    Pool pool;
-    tbrp1->activateOptions(pool);
-    rfa1->setRollingPolicy(tbrp1);
-    rfa1->activateOptions(pool);
-    logger->addAppender(rfa1);
+		TimeBasedRollingPolicyPtr tbrp2 = new TimeBasedRollingPolicy();
+		tbrp2->setFileNamePattern(LOG4CXX_STR("output/test2-%d{" DATE_PATTERN "}"));
+		tbrp2->activateOptions(pool);
+		rfa2->setRollingPolicy(tbrp2);
+		rfa2->activateOptions(pool);
+		logger->addAppender(rfa2);
 
-    SimpleDateFormat sdf(datePattern);
-    LogString filenames[4];
+		this->logMsgAndSleep(	pool, 2, __LOG4CXX_FUNC__, __LINE__, 3);
+		this->compareWitnesses(	pool, LOG4CXX_STR("test2."), fileNames, __LINE__);
+	}
 
-    apr_time_t now = apr_time_now();
-    { for (int i = 0; i < 4; i++) {
-      filenames[i] = LOG4CXX_STR("output/test2-");
-      sdf.format(filenames[i], now, pool);
-      now += APR_USEC_PER_SEC;
-    } }
+	/**
+	 * With compression, activeFileName left blank, no stop/restart
+	 */
+	void test3()
+	{
+				Pool		pool;
+		const	size_t		nrOfFileNames = 4;
+				LogString	fileNames[nrOfFileNames];
 
-    delayUntilNextSecond(100);
+		PatternLayoutPtr		layout(	new PatternLayout(PATTERN_LAYOUT));
+		RollingFileAppenderPtr	rfa(	new RollingFileAppender());
+		rfa->setAppend(false);
+		rfa->setLayout(layout);
 
-    { for (int i = 0; i <= 2; i++) {
-        std::string message("Hello---");
-        message.append(pool.itoa(i));
-        LOG4CXX_DEBUG(logger, message);
-        apr_sleep(APR_USEC_PER_SEC/2);
-    } }
+		TimeBasedRollingPolicyPtr tbrp = new TimeBasedRollingPolicy();
+		tbrp->setFileNamePattern(LogString(LOG4CXX_STR("output/test3-%d{" DATE_PATTERN "}.gz")));
+		tbrp->activateOptions(pool);
+		rfa->setRollingPolicy(tbrp);
+		rfa->activateOptions(pool);
+		logger->addAppender(rfa);
 
+		this->buildTsFileNames(pool, LOG4CXX_STR("test3-"), fileNames, true);
+		fileNames[3].resize(fileNames[3].size() - 3);
+		this->delayUntilNextSecondWithMsg();
+		this->logMsgAndSleep(	pool, nrOfFileNames + 1, __LOG4CXX_FUNC__, __LINE__);
+		this->checkFilesExist(	pool, LOG4CXX_STR("test3."), fileNames, __LINE__);
+	}
 
-    logger->removeAppender(rfa1);
-    rfa1->close();
+	/**
+	 * Without compression, activeFileName set,  with stop/restart
+	 */
+	void test4()
+	{
+				Pool		pool;
+		const	size_t		nrOfFileNames = 4;
+				LogString	fileNames[nrOfFileNames];
 
-    PatternLayoutPtr layout2(new PatternLayout(LOG4CXX_STR("%c{1} - %m%n")));
-    RollingFileAppenderPtr rfa2 = new RollingFileAppender();
-    rfa2->setLayout(layout2);
+		PatternLayoutPtr		layout1(new PatternLayout(PATTERN_LAYOUT));
+		RollingFileAppenderPtr	rfa1(	new RollingFileAppender());
+		rfa1->setLayout(layout1);
 
-    TimeBasedRollingPolicyPtr tbrp2 = new TimeBasedRollingPolicy();
-    tbrp2->setFileNamePattern(LOG4CXX_STR("output/test2-%d{yyyy-MM-dd_HH_mm_ss}"));
-    tbrp2->activateOptions(pool);
-    rfa2->setRollingPolicy(tbrp2);
-    rfa2->activateOptions(pool);
-    logger->addAppender(rfa2);
+		TimeBasedRollingPolicyPtr tbrp1 = new TimeBasedRollingPolicy();
+		rfa1->setFile(LOG4CXX_STR("output/test4.log"));
+		tbrp1->setFileNamePattern(LOG4CXX_STR("output/test4-%d{" DATE_PATTERN "}"));
+		tbrp1->activateOptions(pool);
+		rfa1->setRollingPolicy(tbrp1);
+		rfa1->activateOptions(pool);
+		logger->addAppender(rfa1);
 
-    { for (int i = 3; i <= 4; i++) {
-        std::string message("Hello---");
-        message.append(pool.itoa(i));
-        LOG4CXX_DEBUG(logger, message);
-        apr_sleep(APR_USEC_PER_SEC/2);
-    } }
+		this->buildTsFileNames(pool, LOG4CXX_STR("test4-"), fileNames);
+		fileNames[3].assign(rfa1->getFile());
+		this->delayUntilNextSecondWithMsg();
+		this->logMsgAndSleep(pool, 3, __LOG4CXX_FUNC__, __LINE__);
 
-    for (int i = 0; i < 4; i++) {
-      LogString witness(LOG4CXX_STR("witness/rolling/tbr-test2."));
-      StringHelper::toString(i, pool, witness);
-      LOGUNIT_ASSERT(Compare::compare(filenames[i], File(witness)));
-    }
-  }
+		logger->removeAppender(rfa1);
+		rfa1->close();
 
-  /**
-   * With compression, activeFileName left blank, no stop/restart
-   */
-  void test3() {
-    Pool p;
-    PatternLayoutPtr layout = new PatternLayout(LOG4CXX_STR("%c{1} - %m%n"));
-    RollingFileAppenderPtr rfa = new RollingFileAppender();
-    rfa->setAppend(false);
-    rfa->setLayout(layout);
+		PatternLayoutPtr		layout2(new PatternLayout(PATTERN_LAYOUT));
+		RollingFileAppenderPtr	rfa2(	new RollingFileAppender());
+		rfa2->setLayout(layout2);
 
-    LogString datePattern = LOG4CXX_STR("yyyy-MM-dd_HH_mm_ss");
+		TimeBasedRollingPolicyPtr tbrp2 = new TimeBasedRollingPolicy();
+		tbrp2->setFileNamePattern(LOG4CXX_STR("output/test4-%d{" DATE_PATTERN "}"));
+		rfa2->setFile(fileNames[3]);
+		tbrp2->activateOptions(pool);
+		rfa2->setRollingPolicy(tbrp2);
+		rfa2->activateOptions(pool);
+		logger->addAppender(rfa2);
 
-    TimeBasedRollingPolicyPtr tbrp = new TimeBasedRollingPolicy();
-    tbrp->setFileNamePattern(LogString(LOG4CXX_STR("output/test3-%d{")) + datePattern + LogString(LOG4CXX_STR("}.gz")));
-    tbrp->activateOptions(p);
-    rfa->setRollingPolicy(tbrp);
-    rfa->activateOptions(p);
-    logger->addAppender(rfa);
+		this->logMsgAndSleep(	pool, 2, __LOG4CXX_FUNC__, __LINE__, 3);
+		this->compareWitnesses(	pool, LOG4CXX_STR("test4."), fileNames, __LINE__);
+	}
 
-    DateFormatPtr sdf = new SimpleDateFormat(datePattern);
-    LogString filenames[4];
-
-    apr_time_t now = apr_time_now();
-    { for (int i = 0; i < 4; i++) {
-      filenames[i] = LOG4CXX_STR("output/test3-");
-      sdf->format(filenames[i], now, p);
-      filenames[i].append(LOG4CXX_STR(".gz"));
-      now += APR_USEC_PER_SEC;
-    } }
-
-    filenames[3].resize(filenames[3].size() - 3);
-
-    delayUntilNextSecond(100);
-
-    { for (int i = 0; i < 5; i++) {
-        std::string message("Hello---");
-        message.append(p.itoa(i));
-        LOG4CXX_DEBUG(logger, message);
-        apr_sleep(APR_USEC_PER_SEC/2);
-    } }
-
-    LOGUNIT_ASSERT_EQUAL(true, File(filenames[0]).exists(p));
-    LOGUNIT_ASSERT_EQUAL(true, File(filenames[1]).exists(p));
-    LOGUNIT_ASSERT_EQUAL(true, File(filenames[2]).exists(p));
-
-    LOGUNIT_ASSERT_EQUAL(true, Compare::compare(File(filenames[3]), File(LOG4CXX_STR("witness/rolling/tbr-test3.3"))));
-  }
-
-  /**
-   * Without compression, activeFileName set,  with stop/restart
-   */
-  void test4()  {
-    LogString datePattern = LOG4CXX_STR("yyyy-MM-dd_HH_mm_ss");
-
-    PatternLayoutPtr layout1 = new PatternLayout(LOG4CXX_STR("%c{1} - %m%n"));
-    RollingFileAppenderPtr rfa1 = new RollingFileAppender();
-    rfa1->setLayout(layout1);
-
-    Pool pool;
-
-    TimeBasedRollingPolicyPtr tbrp1 = new TimeBasedRollingPolicy();
-    rfa1->setFile(LOG4CXX_STR("output/test4.log"));
-    tbrp1->setFileNamePattern(LOG4CXX_STR("output/test4-%d{yyyy-MM-dd_HH_mm_ss}"));
-    tbrp1->activateOptions(pool);
-    rfa1->setRollingPolicy(tbrp1);
-    rfa1->activateOptions(pool);
-    logger->addAppender(rfa1);
-
-    SimpleDateFormat sdf(datePattern);
-    LogString filenames[4];
-
-    apr_time_t now = apr_time_now();
-    { for (int i = 0; i < 3; i++) {
-      filenames[i] = LOG4CXX_STR("output/test4-");
-      sdf.format(filenames[i], now, pool);
-      now += APR_USEC_PER_SEC;
-    } }
-    filenames[3] = LOG4CXX_STR("output/test4.log");
-
-    std::cout << "Waiting until next second and 100 millis.";
-    delayUntilNextSecond(100);
-    std::cout << "Done waiting.";
-
-    { for (int i = 0; i <= 2; i++) {
-        std::string message("Hello---");
-        message.append(pool.itoa(i));
-        LOG4CXX_DEBUG(logger, message);
-        apr_sleep(APR_USEC_PER_SEC/2);
-    } }
-
-    logger->removeAppender(rfa1);
-    rfa1->close();
-
-    PatternLayoutPtr layout2 = new PatternLayout(LOG4CXX_STR("%c{1} - %m%n"));
-    RollingFileAppenderPtr rfa2 = new RollingFileAppender();
-    rfa2->setLayout(layout2);
-
-    TimeBasedRollingPolicyPtr tbrp2 = new TimeBasedRollingPolicy();
-    tbrp2->setFileNamePattern(LOG4CXX_STR("output/test4-%d{yyyy-MM-dd_HH_mm_ss}"));
-    rfa2->setFile(LOG4CXX_STR("output/test4.log"));
-    tbrp2->activateOptions(pool);
-    rfa2->setRollingPolicy(tbrp2);
-    rfa2->activateOptions(pool);
-    logger->addAppender(rfa2);
-
-    { for (int i = 3; i <= 4; i++) {
-        std::string message("Hello---");
-        message.append(pool.itoa(i));
-        LOG4CXX_DEBUG(logger, message);
-        apr_sleep(APR_USEC_PER_SEC/2);
-    } }
-
-    for (int i = 0; i < 4; i++) {
-      LogString witness(LOG4CXX_STR("witness/rolling/tbr-test4."));
-      StringHelper::toString(i, pool, witness);
-      LOGUNIT_ASSERT(Compare::compare(filenames[i], File(witness)));
-    }
-  }
-
-  /**
-   * No compression, activeFileName set,  without stop/restart
-   */
-  void test5()  {
-    PatternLayoutPtr layout = new PatternLayout(LOG4CXX_STR("%c{1} - %m%n"));
-    RollingFileAppenderPtr rfa = new RollingFileAppender();
-    rfa->setLayout(layout);
-
-    LogString datePattern(LOG4CXX_STR("yyyy-MM-dd_HH_mm_ss"));
-
-    TimeBasedRollingPolicyPtr tbrp = new TimeBasedRollingPolicy();
-    tbrp->setFileNamePattern(LOG4CXX_STR("output/test5-%d{yyyy-MM-dd_HH_mm_ss}"));
-    rfa->setFile(LOG4CXX_STR("output/test5.log"));
-    Pool pool;
-
-    tbrp->activateOptions(pool);
-    rfa->setRollingPolicy(tbrp);
-    rfa->activateOptions(pool);
-    logger->addAppender(rfa);
-
-    SimpleDateFormat sdf(datePattern);
-    LogString filenames[4];
-
-    apr_time_t now = apr_time_now();
-    { for (int i = 0; i < 3; i++) {
-      filenames[i] = LOG4CXX_STR("output/test5-");
-      sdf.format(filenames[i], now, pool);
-      now += APR_USEC_PER_SEC;
-    } }
-    filenames[3] = LOG4CXX_STR("output/test5.log");
-
-    std::cout << "Waiting until next second and 100 millis.";
-    delayUntilNextSecond(100);
-    std::cout << "Done waiting.";
-
-    { for (int i = 0; i < 5; i++) {
-        std::string message("Hello---");
-        message.append(pool.itoa(i));
-        LOG4CXX_DEBUG(logger, message);
-        apr_sleep(APR_USEC_PER_SEC/2);
-    } }
-
-    for (int i = 0; i < 4; i++) {
-      LogString witness(LOG4CXX_STR("witness/rolling/tbr-test5."));
-      StringHelper::toString(i, pool, witness);
-      LOGUNIT_ASSERT(Compare::compare(filenames[i], File(witness)));
-    }
-  }
-
-  /**
-   * With compression, activeFileName set, no stop/restart,
-   */
-  void test6() {
-    Pool p;
-    PatternLayoutPtr layout = new PatternLayout(LOG4CXX_STR("%c{1} - %m%n"));
-    RollingFileAppenderPtr rfa = new RollingFileAppender();
-    rfa->setAppend(false);
-    rfa->setLayout(layout);
-
-    LogString datePattern = LOG4CXX_STR("yyyy-MM-dd_HH_mm_ss");
-
-    TimeBasedRollingPolicyPtr tbrp = new TimeBasedRollingPolicy();
-    tbrp->setFileNamePattern(LogString(LOG4CXX_STR("output/test6-%d{")) + datePattern + LogString(LOG4CXX_STR("}.gz")));
-    rfa->setFile(LOG4CXX_STR("output/test6.log"));
-    tbrp->activateOptions(p);
-    rfa->setRollingPolicy(tbrp);
-    rfa->activateOptions(p);
-    logger->addAppender(rfa);
+	/**
+	 * No compression, activeFileName set,  without stop/restart
+	 */
+	void test5()
+	{
+				Pool		pool;
+		const	size_t		nrOfFileNames = 4;
+				LogString	fileNames[nrOfFileNames];
 
-    DateFormatPtr sdf = new SimpleDateFormat(datePattern);
-    LogString filenames[4];
+		PatternLayoutPtr		layout(	new PatternLayout(PATTERN_LAYOUT));
+		RollingFileAppenderPtr	rfa(	new RollingFileAppender());
+		rfa->setLayout(layout);
 
-    apr_time_t now = apr_time_now();
-    { for (int i = 0; i < 3; i++) {
-      filenames[i] = LOG4CXX_STR("output/test6-");
-      sdf->format(filenames[i], now, p);
-      filenames[i].append(LOG4CXX_STR(".gz"));
-      now += APR_USEC_PER_SEC;
-    } }
+		TimeBasedRollingPolicyPtr tbrp = new TimeBasedRollingPolicy();
+		tbrp->setFileNamePattern(LOG4CXX_STR("output/test5-%d{" DATE_PATTERN "}"));
+		rfa->setFile(LOG4CXX_STR("output/test5.log"));
 
-    filenames[3] = LOG4CXX_STR("output/test6.log");
+		tbrp->activateOptions(pool);
+		rfa->setRollingPolicy(tbrp);
+		rfa->activateOptions(pool);
+		logger->addAppender(rfa);
 
-    delayUntilNextSecond(100);
+		this->buildTsFileNames(pool, LOG4CXX_STR("test5-"), fileNames);
+		fileNames[3].assign(rfa->getFile());
+		this->delayUntilNextSecondWithMsg();
+		this->logMsgAndSleep(	pool, nrOfFileNames + 1, __LOG4CXX_FUNC__, __LINE__);
+		this->compareWitnesses(	pool, LOG4CXX_STR("test5."), fileNames, __LINE__);
+	}
 
-    { for (int i = 0; i < 5; i++) {
-        std::string message("Hello---");
-        message.append(p.itoa(i));
-        LOG4CXX_DEBUG(logger, message);
-        apr_sleep(APR_USEC_PER_SEC/2);
-    } }
+	/**
+	 * With compression, activeFileName set, no stop/restart,
+	 */
+	void test6()
+	{
+				Pool		pool;
+		const	size_t		nrOfFileNames = 4;
+				LogString	fileNames[nrOfFileNames];
 
-    LOGUNIT_ASSERT_EQUAL(true, File(filenames[0]).exists(p));
-    LOGUNIT_ASSERT_EQUAL(true, File(filenames[1]).exists(p));
-    LOGUNIT_ASSERT_EQUAL(true, File(filenames[2]).exists(p));
+		PatternLayoutPtr		layout(	new PatternLayout(PATTERN_LAYOUT));
+		RollingFileAppenderPtr	rfa(	new RollingFileAppender());
+		rfa->setAppend(false);
+		rfa->setLayout(layout);
 
-    LOGUNIT_ASSERT_EQUAL(true, Compare::compare(File(filenames[3]), File(LOG4CXX_STR("witness/rolling/tbr-test6.3"))));
+		TimeBasedRollingPolicyPtr tbrp = new TimeBasedRollingPolicy();
+		tbrp->setFileNamePattern(LogString(LOG4CXX_STR("output/test6-%d{" DATE_PATTERN "}.gz")));
+		rfa->setFile(LOG4CXX_STR("output/test6.log"));
+		tbrp->activateOptions(pool);
+		rfa->setRollingPolicy(tbrp);
+		rfa->activateOptions(pool);
+		logger->addAppender(rfa);
 
-  }
+		this->buildTsFileNames(pool, LOG4CXX_STR("test6-"), fileNames, true);
+		fileNames[3].assign(rfa->getFile());
+		this->delayUntilNextSecondWithMsg();
+		this->logMsgAndSleep(	pool, nrOfFileNames + 1, __LOG4CXX_FUNC__, __LINE__);
+		this->checkFilesExist(	pool, LOG4CXX_STR("test6."), fileNames, __LINE__);
+	}
 
-  void delayUntilNextSecond(int millis) {
-    apr_time_t now = apr_time_now();
-    apr_time_t next = ((now / APR_USEC_PER_SEC) + 1) * APR_USEC_PER_SEC
-          + millis * 1000L;
+	/**
+	 * Repeat some test with generic file name.s
+	 * <p>
+	 * This test calls some tests which use generic file names and will only work properly if those
+	 * got deleted before running the test during setup.
+	 * </p>
+	 */
+	void test7()
+	{
+		typedef void (TimeBasedRollingTest::*Test)();
+		typedef std::vector<Test> Tests;
 
-    apr_sleep(next - now);
-  }
+		Tests	tests(10);
+		size_t	numTest = 0;
 
-  void delayUntilNextMinute(int seconds) {
-    apr_time_t now = apr_time_now();
-    apr_time_t next = ((now / APR_USEC_PER_SEC) + 1) * APR_USEC_PER_SEC
-          + seconds * 1000000L;
+		tests.at(4) = &TimeBasedRollingTest::test4;
+		tests.at(5) = &TimeBasedRollingTest::test5;
+		tests.at(6) = &TimeBasedRollingTest::test6;
 
-    apr_sleep(next - now);
-  }
+		for (size_t numTest = 1; numTest < tests.size(); ++numTest)
+		{
+			Test test(tests.at(numTest));
+			if (!test)
+			{
+				continue;
+			}
 
+			this->internalSetUp(numTest);
+			(this->*test)();
+			this->internalTearDown();
+		}
+	}
 };
 
-
 LoggerPtr TimeBasedRollingTest::logger(Logger::getLogger("org.apache.log4j.TimeBasedRollingTest"));
 
 LOGUNIT_TEST_SUITE_REGISTRATION(TimeBasedRollingTest);
diff --git a/src/test/cpp/streamtestcase.cpp b/src/test/cpp/streamtestcase.cpp
index 164a285..7609e24 100644
--- a/src/test/cpp/streamtestcase.cpp
+++ b/src/test/cpp/streamtestcase.cpp
@@ -224,13 +224,13 @@
        
         void testLogStreamSimple() {
             logstream root(Logger::getRootLogger(), Level::getInfo());
-            root << "This is a test" << LOG4CXX_ENDMSG;
+            root << std::string("This is a test") << LOG4CXX_ENDMSG;
             LOGUNIT_ASSERT_EQUAL((size_t) 1, vectorAppender->getVector().size());
         }
 
         void testLogStreamMultiple() {
            logstream root(Logger::getRootLogger(), Level::getInfo());
-           root << "This is a test" << ": Details to follow" << LOG4CXX_ENDMSG;
+           root << std::string("This is a test") << std::string(": Details to follow") << LOG4CXX_ENDMSG;
            LOGUNIT_ASSERT_EQUAL((size_t) 1, vectorAppender->getVector().size());
        }
 
@@ -427,7 +427,7 @@
         void testUniChar() {
             LoggerPtr root(Logger::getRootLogger());
             const log4cxx::UniChar msg[] = { 'T', 'h', 'i', 's', ' ', 'i', 's', ' ', 'a', ' ', 't', 'e', 's', 't', 0 };
-            LOG4CXX_INFO(root, msg);
+            LOG4CXX_INFO(root, msg)
             LOGUNIT_ASSERT_EQUAL((size_t) 1, vectorAppender->getVector().size());
         }
 
@@ -435,7 +435,7 @@
            LoggerPtr root(Logger::getRootLogger());
            const log4cxx::UniChar msg1[] = { 'T', 'h', 'i', 's', ' ', 'i', 's', ' ', 'a', ' ', 't', 'e', 's', 't', 0 };
            const log4cxx::UniChar msg2[] = { ':', ' ', 'D', 'e', 't', 'a', 'i', 'l', 's', ' ', 't', 'o', ' ', 'f', 'o', 'l', 'l', 'o', 'w', 0 };
-           LOG4CXX_INFO(root, msg1 << msg2);
+           LOG4CXX_INFO(root, msg1 << msg2)
            LOGUNIT_ASSERT_EQUAL((size_t) 1, vectorAppender->getVector().size());
        }
        
@@ -443,7 +443,7 @@
           LoggerPtr root(Logger::getRootLogger());
           const log4cxx::UniChar openBracket[] = { '[', 0 };
           const log4cxx::UniChar closeBracket[] = { ']', 0 };
-          LOG4CXX_INFO(root, openBracket << std::fixed << std::setprecision(2) << std::setw(7) << std::right << std::setfill((log4cxx::UniChar) '_') << 10.0 << closeBracket);
+          LOG4CXX_INFO(root, openBracket << std::fixed << std::setprecision(2) << std::setw(7) << std::right << std::setfill((log4cxx::UniChar) '_') << 10.0 << closeBracket)
           spi::LoggingEventPtr event(vectorAppender->getVector()[0]);
           LogString msg(event->getMessage());
           LOGUNIT_ASSERT_EQUAL(LogString(LOG4CXX_STR("[__10.00]")), msg);
@@ -555,13 +555,13 @@
 #if LOG4CXX_CFSTRING_API
         void testCFString() {
             LoggerPtr root(Logger::getRootLogger());
-            LOG4CXX_INFO(root, CFSTR("This is a test"));
+            LOG4CXX_INFO(root, CFSTR("This is a test"))
             LOGUNIT_ASSERT_EQUAL((size_t) 1, vectorAppender->getVector().size());
         }
 
         void testCFStringAppend() {
            LoggerPtr root(Logger::getRootLogger());
-           LOG4CXX_INFO(root, CFSTR("This is a test") << CFSTR(": Details to follow"));
+           LOG4CXX_INFO(root, CFSTR("This is a test") << CFSTR(": Details to follow"))
            LOGUNIT_ASSERT_EQUAL((size_t) 1, vectorAppender->getVector().size());
        }
 
diff --git a/src/test/cpp/util/filter.h b/src/test/cpp/util/filter.h
index 9f999df..fe2a2b1 100644
--- a/src/test/cpp/util/filter.h
+++ b/src/test/cpp/util/filter.h
@@ -31,7 +31,7 @@
 #define BASIC_PAT "\\[0x[0-9A-F]*] (FATAL|ERROR|WARN|INFO|DEBUG)"
 #define ISO8601_PAT "[0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\} [0-9]\\{2\\}:[0-9]\\{2\\}:[0-9]\\{2\\},[0-9]\\{3\\}"
 #define ABSOLUTE_DATE_AND_TIME_PAT \
-        "[0-9]\\{1,2\\} .* 200[0-9] [0-9]\\{2\\}:[0-9]\\{2\\}:[0-9]\\{2\\},[0-9]\\{3\\}"
+        "[0-9]\\{1,2\\} .* 2[0-9][0-9][0-9] [0-9]\\{2\\}:[0-9]\\{2\\}:[0-9]\\{2\\},[0-9]\\{3\\}"
 #define ABSOLUTE_TIME_PAT "[0-2][0-9]:[0-9][0-9]:[0-9][0-9],[0-9][0-9][0-9]"
 #define RELATIVE_TIME_PAT "^[0-9]+"
 
diff --git a/src/test/cpp/varia/errorhandlertestcase.cpp b/src/test/cpp/varia/errorhandlertestcase.cpp
index 65fb24a..dc527df 100644
--- a/src/test/cpp/varia/errorhandlertestcase.cpp
+++ b/src/test/cpp/varia/errorhandlertestcase.cpp
@@ -15,30 +15,21 @@
  * limitations under the License.
  */
 
-#define LOG4CXX_TEST 1
-#include <log4cxx/private/log4cxx_private.h>
-
 #include <log4cxx/logger.h>
 #include <log4cxx/xml/domconfigurator.h>
+#include <log4cxx/fileappender.h>
+#include <log4cxx/varia/fallbackerrorhandler.h>
 #include "../logunit.h"
 #include "../util/transformer.h"
 #include "../util/compare.h"
 #include "../util/controlfilter.h"
-#include "../util/threadfilter.h"
 #include "../util/linenumberfilter.h"
 #include <iostream>
-#include <log4cxx/file.h>
 
 using namespace log4cxx;
 using namespace log4cxx::helpers;
 using namespace log4cxx::xml;
 
-#define TEST1_A_PAT "FALLBACK - test - Message [0-9]"
-#define TEST1_B_PAT "FALLBACK - root - Message [0-9]"
-#define TEST1_2_PAT \
-        "^[0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\} [0-9]\\{2\\}:[0-9]\\{2\\}:[0-9]\\{2\\},[0-9]\\{3\\} " \
-        "\\[main]\\ (DEBUG|INFO|WARN|ERROR|FATAL) .* - Message [0-9]"
-
 LOGUNIT_CLASS(ErrorHandlerTestCase)
 {
         LOGUNIT_TEST_SUITE(ErrorHandlerTestCase);
@@ -48,9 +39,6 @@
         LoggerPtr root;
         LoggerPtr logger;
 
-    static const File TEMP;
-    static const File FILTERED;
-
 
 public:
         void setUp()
@@ -64,74 +52,67 @@
                 logger->getLoggerRepository()->resetConfiguration();
         }
 
+
         void test1()
         {
                 DOMConfigurator::configure("input/xml/fallback1.xml");
+                FileAppenderPtr primary(root->getAppender(LOG4CXX_STR("PRIMARY")));
+                log4cxx::varia::FallbackErrorHandlerPtr eh(primary->getErrorHandler());
+                LOGUNIT_ASSERT(eh != 0);
+                
                 common();
 
-                ControlFilter cf;
-                cf << TEST1_A_PAT << TEST1_B_PAT << TEST1_2_PAT;
+                std::string TEST1_PAT = 
+                       "FALLBACK - (root|test) - Message {0-9}";
 
-                ThreadFilter threadFilter;
+                ControlFilter cf;
+                cf << TEST1_PAT;
+
                 LineNumberFilter lineNumberFilter;
 
                 std::vector<Filter *> filters;
                 filters.push_back(&cf);
-                filters.push_back(&threadFilter);
                 filters.push_back(&lineNumberFilter);
 
-        common();
-
                 try
                 {
-                        Transformer::transform(TEMP, FILTERED, filters);
+                        Transformer::transform("output/temp", "output/filtered", filters);
                 }
                 catch(UnexpectedFormatException& e)
                 {
-            std::cout << "UnexpectedFormatException :" << e.what() << std::endl;
+                    std::cout << "UnexpectedFormatException :" << e.what() << std::endl;
                         throw;
                 }
 
-        const File witness("witness/fallback");
-                LOGUNIT_ASSERT(Compare::compare(FILTERED, witness));
+
+                LOGUNIT_ASSERT(Compare::compare("output/filtered", "witness/fallback1"));
         }
 
         void common()
         {
                 int i = -1;
+                  
+                LOG4CXX_DEBUG(logger, "Message " << ++i);
+                LOG4CXX_DEBUG(root, "Message " << i);
 
-        std::ostringstream os;
-        os << "Message " << ++ i;
-                LOG4CXX_DEBUG(logger, os.str());
-                LOG4CXX_DEBUG(root, os.str());
+                LOG4CXX_INFO(logger, "Message " << ++i);
+                LOG4CXX_INFO(root, "Message " << i);
 
-        os.str("");
-        os << "Message " << ++i;
-                LOG4CXX_INFO(logger, os.str());
-                LOG4CXX_INFO(root, os.str());
+                LOG4CXX_WARN(logger, "Message " << ++i);
+                LOG4CXX_WARN(root, "Message " << i);
 
-        os.str("");
-        os << "Message " << ++i;
-                LOG4CXX_WARN(logger, os.str());
-                LOG4CXX_WARN(root, os.str());
+                LOG4CXX_ERROR(logger, "Message " << ++i);
+                LOG4CXX_ERROR(root, "Message " << i);
 
-        os.str("");
-        os << "Message " << ++i;
-                LOG4CXX_ERROR(logger, os.str());
-                LOG4CXX_ERROR(root, os.str());
+                LOG4CXX_FATAL(logger, "Message " << ++i);
+                LOG4CXX_FATAL(root, "Message " << i);
 
-        os.str("");
-        os << "Message " << ++i;
-                LOG4CXX_FATAL(logger, os.str());
-                LOG4CXX_FATAL(root, os.str());
+                LOG4CXX_DEBUG(logger, "Message " << ++i);
+                LOG4CXX_DEBUG(root, "Message " << i);
+
+                LOG4CXX_ERROR(logger, "Message " << ++i);
+                LOG4CXX_ERROR(root, "Message " << i);
         }
 };
 
-//TODO: Not sure this test ever worked.  0.9.7 didn't call common
-//   had nothing that attempted to dispatch any log events
-
-//LOGUNIT_TEST_SUITE_REGISTRATION(ErrorHandlerTestCase);
-
-const File ErrorHandlerTestCase::TEMP("output/temp");
-const File ErrorHandlerTestCase::FILTERED("output/filtered");
-
+LOGUNIT_TEST_SUITE_REGISTRATION(ErrorHandlerTestCase)
diff --git a/src/test/cpp/xml/domtestcase.cpp b/src/test/cpp/xml/domtestcase.cpp
index a500628..a1491c7 100644
--- a/src/test/cpp/xml/domtestcase.cpp
+++ b/src/test/cpp/xml/domtestcase.cpp
@@ -15,7 +15,6 @@
  * limitations under the License.
  */
 
-
 #include <log4cxx/logger.h>
 #include <log4cxx/xml/domconfigurator.h>
 #include "../logunit.h"
@@ -36,190 +35,186 @@
 using namespace log4cxx::helpers;
 using namespace log4cxx::xml;
 
-
 #define TEST1_1A_PAT \
-        "(DEBUG|INFO |WARN |ERROR|FATAL) \\w*\\.\\w* - Message [0-9]"
+		"(DEBUG|INFO |WARN |ERROR|FATAL) \\w*\\.\\w* - Message [0-9]"
 
 #define TEST1_1B_PAT "(DEBUG|INFO |WARN |ERROR|FATAL) root - Message [0-9]"
 
 #define TEST1_2_PAT "^[0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\} [0-9]\\{2\\}:[0-9]\\{2\\}:[0-9]\\{2\\},[0-9]\\{3\\} " \
-        "\\[0x[0-9A-F]*]\\ (DEBUG|INFO|WARN|ERROR|FATAL) .* - Message [0-9]"
+		"\\[0x[0-9A-F]*]\\ (DEBUG|INFO|WARN|ERROR|FATAL) .* - Message [0-9]"
 
 LOGUNIT_CLASS(DOMTestCase)
 {
-        LOGUNIT_TEST_SUITE(DOMTestCase);
-                LOGUNIT_TEST(test1);
+		LOGUNIT_TEST_SUITE(DOMTestCase);
+			LOGUNIT_TEST(test1);
 #if defined(_WIN32)
-                LOGUNIT_TEST(test2);
+			LOGUNIT_TEST(test2);
 #endif
-                LOGUNIT_TEST(test3);
-                LOGUNIT_TEST(test4);                
-        LOGUNIT_TEST_SUITE_END();
+			LOGUNIT_TEST(test3);
+			LOGUNIT_TEST(test4);
+		LOGUNIT_TEST_SUITE_END();
 
-        LoggerPtr root;
-        LoggerPtr logger;
+		LoggerPtr root;
+		LoggerPtr logger;
 
-        static const File TEMP_A1;
-        static const File TEMP_A2;
-        static const File FILTERED_A1;
-        static const File FILTERED_A2;
-        static const File TEMP_A1_2;
-        static const File TEMP_A2_2;
-        static const File FILTERED_A1_2;
-        static const File FILTERED_A2_2;
+		static const File TEMP_A1;
+		static const File TEMP_A2;
+		static const File FILTERED_A1;
+		static const File FILTERED_A2;
+		static const File TEMP_A1_2;
+		static const File TEMP_A2_2;
+		static const File FILTERED_A1_2;
+		static const File FILTERED_A2_2;
 
 public:
-        void setUp()
-        {
-                root = Logger::getRootLogger();
-                logger = Logger::getLogger(LOG4CXX_TEST_STR("org.apache.log4j.xml.DOMTestCase"));
-        }
+		void setUp()
+		{
+			root = Logger::getRootLogger();
+			logger = Logger::getLogger(LOG4CXX_TEST_STR("org.apache.log4j.xml.DOMTestCase"));
+		}
 
-        void tearDown()
-        {
-                root->getLoggerRepository()->resetConfiguration();
-        }
+		void tearDown()
+		{
+			root->getLoggerRepository()->resetConfiguration();
+		}
+
+		void test1() {
+			DOMConfigurator::configure(LOG4CXX_TEST_STR("input/xml/DOMTestCase1.xml"));
+			common();
+
+			ControlFilter cf1;
+			cf1 << TEST1_1A_PAT << TEST1_1B_PAT;
+
+			ControlFilter cf2;
+			cf2 << TEST1_2_PAT;
+
+			ThreadFilter threadFilter;
+			ISO8601Filter iso8601Filter;
+
+			std::vector<Filter *> filters1;
+			filters1.push_back(&cf1);
+
+			std::vector<Filter *> filters2;
+			filters2.push_back(&cf2);
+			filters2.push_back(&threadFilter);
+			filters2.push_back(&iso8601Filter);
+
+			try
+			{
+					Transformer::transform(TEMP_A1, FILTERED_A1, filters1);
+					Transformer::transform(TEMP_A2, FILTERED_A2, filters2);
+			}
+			catch(UnexpectedFormatException& e)
+			{
+				std::cout << "UnexpectedFormatException :" << e.what() << std::endl;
+					throw;
+			}
+
+			const File witness1(LOG4CXX_TEST_STR("witness/dom.A1.1"));
+			const File witness2(LOG4CXX_TEST_STR("witness/dom.A2.1"));
+			// TODO: A1 doesn't contain duplicate entries
+			//
+			// LOGUNIT_ASSERT(Compare::compare(FILTERED_A1, witness1));
+			LOGUNIT_ASSERT(Compare::compare(FILTERED_A2, witness2));
+		}
+
+		//
+		// Same test but backslashes instead of forward
+		//
+		void test2() {
+			DOMConfigurator::configure(LOG4CXX_TEST_STR("input\\xml\\DOMTestCase2.xml"));
+			common();
+
+			ThreadFilter threadFilter;
+			ISO8601Filter iso8601Filter;
+
+			std::vector<Filter *> filters1;
+
+			std::vector<Filter *> filters2;
+			filters2.push_back(&threadFilter);
+			filters2.push_back(&iso8601Filter);
+
+			try
+			{
+					Transformer::transform(TEMP_A1_2, FILTERED_A1_2, filters1);
+					Transformer::transform(TEMP_A2_2, FILTERED_A2_2, filters2);
+			}
+			catch(UnexpectedFormatException& e)
+			{
+				std::cout << "UnexpectedFormatException :" << e.what() << std::endl;
+					throw;
+			}
+
+			const File witness1(LOG4CXX_TEST_STR("witness/dom.A1.2"));
+			const File witness2(LOG4CXX_TEST_STR("witness/dom.A2.2"));
+			// TODO: A1 doesn't contain duplicate entries
+			//
+			// LOGUNIT_ASSERT(Compare::compare(FILTERED_A1, witness1));
+			LOGUNIT_ASSERT(Compare::compare(FILTERED_A2, witness2));
+		}
 
 
-        void test1() {
-                DOMConfigurator::configure(LOG4CXX_TEST_STR("input/xml/DOMTestCase1.xml"));
-                common();
+		void common()
+		{
+			int i = 0;
 
-                ControlFilter cf1;
-                cf1 << TEST1_1A_PAT << TEST1_1B_PAT;
+			LOG4CXX_DEBUG(logger, "Message " << i);
+			LOG4CXX_DEBUG(root, "Message " << i);
 
-                ControlFilter cf2;
-                cf2 << TEST1_2_PAT;
+			i++;
+			LOG4CXX_INFO(logger, "Message " << i);
+			LOG4CXX_INFO(root, "Message " << i);
 
-                ThreadFilter threadFilter;
-                ISO8601Filter iso8601Filter;
+			i++;
+			LOG4CXX_WARN(logger, "Message " << i);
+			LOG4CXX_WARN(root, "Message " << i);
 
-                std::vector<Filter *> filters1;
-                filters1.push_back(&cf1);
+			i++;
+			LOG4CXX_ERROR(logger, "Message " << i);
+			LOG4CXX_ERROR(root, "Message " << i);
 
-                std::vector<Filter *> filters2;
-                filters2.push_back(&cf2);
-                filters2.push_back(&threadFilter);
-                filters2.push_back(&iso8601Filter);
+			i++;
+			LOG4CXX_FATAL(logger, "Message " << i);
+			LOG4CXX_FATAL(root, "Message " << i);
+		}
 
-                try
-                {
-                        Transformer::transform(TEMP_A1, FILTERED_A1, filters1);
-                        Transformer::transform(TEMP_A2, FILTERED_A2, filters2);
-                }
-                catch(UnexpectedFormatException& e)
-                {
-                    std::cout << "UnexpectedFormatException :" << e.what() << std::endl;
-                        throw;
-                }
-
-                const File witness1(LOG4CXX_TEST_STR("witness/dom.A1.1"));
-                const File witness2(LOG4CXX_TEST_STR("witness/dom.A2.1"));
-                //   TODO: A1 doesn't contain duplicate entries
-                //
-                //                LOGUNIT_ASSERT(Compare::compare(FILTERED_A1, witness1));
-                LOGUNIT_ASSERT(Compare::compare(FILTERED_A2, witness2));
-        }
-
-        //
-        //   Same test but backslashes instead of forward
-        //
-        void test2() {
-                DOMConfigurator::configure(LOG4CXX_TEST_STR("input\\xml\\DOMTestCase2.xml"));
-                common();
-
-                ThreadFilter threadFilter;
-                ISO8601Filter iso8601Filter;
-
-                std::vector<Filter *> filters1;
-
-                std::vector<Filter *> filters2;
-                filters2.push_back(&threadFilter);
-                filters2.push_back(&iso8601Filter);
-
-                try
-                {
-                        Transformer::transform(TEMP_A1_2, FILTERED_A1_2, filters1);
-                        Transformer::transform(TEMP_A2_2, FILTERED_A2_2, filters2);
-                }
-                catch(UnexpectedFormatException& e)
-                {
-                    std::cout << "UnexpectedFormatException :" << e.what() << std::endl;
-                        throw;
-                }
-
-                const File witness1(LOG4CXX_TEST_STR("witness/dom.A1.2"));
-                const File witness2(LOG4CXX_TEST_STR("witness/dom.A2.2"));
-                //   TODO: A1 doesn't contain duplicate entries
-                //
-                //                LOGUNIT_ASSERT(Compare::compare(FILTERED_A1, witness1));
-                LOGUNIT_ASSERT(Compare::compare(FILTERED_A2, witness2));
-        }
-
-
-        void common()
-        {
-                int i = 0;
-
-                LOG4CXX_DEBUG(logger, "Message " << i);
-                LOG4CXX_DEBUG(root, "Message " << i);
-
-                i++;
-                LOG4CXX_INFO(logger, "Message " << i);
-                LOG4CXX_INFO(root, "Message " << i);
-
-                i++;
-                LOG4CXX_WARN(logger, "Message " << i);
-                LOG4CXX_WARN(root, "Message " << i);
-
-                i++;
-                LOG4CXX_ERROR(logger, "Message " << i);
-                LOG4CXX_ERROR(root, "Message " << i);
-
-                i++;
-                LOG4CXX_FATAL(logger, "Message " << i);
-                LOG4CXX_FATAL(root, "Message " << i);
-
-        }
-      
-        /**
-         *   Creates a output file that ends with a superscript 3.
-         *   Output file is checked by build.xml after completion.
-         */  
-        void test3() {
-                DOMConfigurator::configure(LOG4CXX_TEST_STR("input/xml/DOMTestCase3.xml"));
-                LOG4CXX_INFO(logger, "File name is expected to end with a superscript 3");
+		/**
+		 * Creates a output file that ends with a superscript 3.
+		 * Output file is checked by build.xml after completion.
+		 */
+		void test3() {
+			DOMConfigurator::configure(LOG4CXX_TEST_STR("input/xml/DOMTestCase3.xml"));
+			LOG4CXX_INFO(logger, "File name is expected to end with a superscript 3");
 #if LOG4CXX_LOGCHAR_IS_UTF8
-                const logchar fname[] = { 0x6F, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2F, 0x64, 0x6F, 0x6D, 0xC2, 0xB3, 0 };
+			const logchar fname[] = { 0x6F, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2F, 0x64, 0x6F, 0x6D, static_cast<logchar>(0xC2), static_cast<logchar>(0xB3), 0 };
 #else
-                const logchar fname[] = { 0x6F, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2F, 0x64, 0x6F, 0x6D, 0xB3, 0 };
+			const logchar fname[] = { 0x6F, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2F, 0x64, 0x6F, 0x6D, static_cast<logchar>(0xB3), 0 };
 #endif
-                File file;
-                file.setPath(fname);
-                Pool p;
-                bool exists = file.exists(p);
-                LOGUNIT_ASSERT(exists);
-        }
+			File file;
+			file.setPath(fname);
+			Pool p;
+			bool exists = file.exists(p);
+			LOGUNIT_ASSERT(exists);
+		}
 
-        /**
-         *   Creates a output file that ends with a ideographic 4.
-         *   Output file is checked by build.xml after completion.
-         */  
-        void test4() {
-                DOMConfigurator::configure(LOG4CXX_TEST_STR("input/xml/DOMTestCase4.xml"));
-                LOG4CXX_INFO(logger, "File name is expected to end with an ideographic 4");
+		/**
+		 * Creates a output file that ends with a ideographic 4.
+		 * Output file is checked by build.xml after completion.
+		 */
+		void test4() {
+			DOMConfigurator::configure(LOG4CXX_TEST_STR("input/xml/DOMTestCase4.xml"));
+			LOG4CXX_INFO(logger, "File name is expected to end with an ideographic 4");
 #if LOG4CXX_LOGCHAR_IS_UTF8
-                const logchar fname[] = { 0x6F, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2F, 0x64, 0x6F, 0x6D, 0xE3, 0x86, 0x95, 0 };
+			const logchar fname[] = { 0x6F, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2F, 0x64, 0x6F, 0x6D, static_cast<logchar>(0xE3), static_cast<logchar>(0x86), static_cast<logchar>(0x95), 0 };
 #else
-                const logchar fname[] = { 0x6F, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2F, 0x64, 0x6F, 0x6D, 0x3195, 0 };
+			const logchar fname[] = { 0x6F, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2F, 0x64, 0x6F, 0x6D, static_cast<logchar>(0x3195), 0 };
 #endif
-                File file;
-                file.setPath(fname);
-                Pool p;
-                bool exists = file.exists(p);
-                LOGUNIT_ASSERT(exists);
-        }
-        
+			File file;
+			file.setPath(fname);
+			Pool p;
+			bool exists = file.exists(p);
+			LOGUNIT_ASSERT(exists);
+		}
 };
 
 LOGUNIT_TEST_SUITE_REGISTRATION(DOMTestCase);
diff --git a/src/test/resources/L7D_fr.properties b/src/test/resources/L7D_fr.properties
index 268e6f6..596b4e3 100644
--- a/src/test/resources/L7D_fr.properties
+++ b/src/test/resources/L7D_fr.properties
@@ -16,3 +16,4 @@
 test=Ceci est le test en francais pour la France.
 hello_world=Bonjour la France.
 msg1=Ceci est le test numero {0} contenant l'argument {1}.
+msg3=Ceci est le test numero {0} contenant l'argument {1} et l'argument {2}.
diff --git a/src/test/resources/Makefile.am b/src/test/resources/Makefile.am
index f64b2f0..d86a1ad 100644
--- a/src/test/resources/Makefile.am
+++ b/src/test/resources/Makefile.am
@@ -16,40 +16,36 @@
 SUBDIRS = input witness
 EXTRA_DIST = L7D_en_US.properties L7D_fr_CH.properties L7D_fr.properties
 
-
-
-# if we are building in a separate build tree, then copy all necessary files
+# if we are building in a separate build tree, then prepare all necessary links
 all-local:
 	@if test "$(top_srcdir)" != "$(top_builddir)"; then \
-	  echo "Copying test suite data files ..." ; \
-	  list='$(EXTRA_DIST)'; for file in $$list; do \
-	    cp -p $(srcdir)/$$file . ; \
+	  echo "Symlinking test suite data files ..." ; \
+	  for file in $(EXTRA_DIST); do \
+	    test -a "$$file" || $(LN_S) "$(srcdir)/$$file"; \
 	  done \
 	fi
 
 prepare:
-	@if test ! -d "output"; then \
-		mkdir output; \
-	fi;
+	@test -d output || mkdir output
 	@rm -rf log4j.xml
 	@rm -rf log4j.properties
 	@rm -rf log4cxx.xml
 	@rm -rf log4cxx.properties
-	
+
 build: check-recursive prepare
 
-cleanOutputDir:
+clean-local:
 	@rm -rf output/*
-	
+
 check: prepare run-unittest DefaultInit
 
-run-unittest: build cleanOutputDir
+run-unittest: build clean-local
 	@export TOTO=wonderful; \
 	export key1=value1; \
 	export key2=value2; \
 	../cpp/testsuite -v
-	
-DefaultInit: build cleanOutputDir
+
+DefaultInit: build clean-local
 	../cpp/testsuite -v testcase1
 	@cp input/xml/defaultInit.xml log4j.xml
 	../cpp/testsuite -v testcase2
@@ -63,6 +59,5 @@
 	@rm -f log4j.xml
 	@rm -f log4j.properties
 
-SocketServer: build cleanOutputDir
+SocketServer: build clean-local
 	../cpp/testsuite -v socketservertestcase
-
diff --git a/src/test/resources/input/Makefile.am b/src/test/resources/input/Makefile.am
index 492d81c..d3016ae 100644
--- a/src/test/resources/input/Makefile.am
+++ b/src/test/resources/input/Makefile.am
@@ -14,13 +14,45 @@
 # limitations under the License.
 #
 SUBDIRS = ndc xml rolling
-EXTRA_DIST = *.properties
+EXTRA_DIST = \
+    defaultInit3.properties \
+    hierarchyThreshold1.properties \
+    hierarchyThreshold2.properties \
+    hierarchyThreshold3.properties \
+    hierarchyThreshold4.properties \
+    hierarchyThreshold5.properties \
+    hierarchyThreshold6.properties \
+    hierarchyThreshold7.properties \
+    hierarchyThreshold8.properties \
+    l7d1.properties \
+    patternLayout10.properties \
+    patternLayout11.properties \
+    patternLayout12.properties \
+    patternLayout1.properties \
+    patternLayout2.properties \
+    patternLayout3.properties \
+    patternLayout4.properties \
+    patternLayout5.properties \
+    patternLayout6.properties \
+    patternLayout7.properties \
+    patternLayout8.properties \
+    patternLayout9.properties \
+    patternLayout.mdc.1.properties \
+    propertiestestcase.properties \
+    socketServer1.properties \
+    socketServer2.properties \
+    socketServer3.properties \
+    socketServer4.properties \
+    socketServer5.properties \
+    socketServer6.properties \
+    socketServer7.properties \
+    socketServer8.properties
 
-# if we are building in a separate build tree, then copy all necessary files
+# if we are building in a separate build tree, then prepare all necessary links
 all-local:
 	@if test "$(top_srcdir)" != "$(top_builddir)"; then \
-	  echo "Copying test suite data files ..." ; \
-	  list='$(EXTRA_DIST)'; for file in $$list; do \
-	    cp -p $(srcdir)/$$file . ; \
+	  echo "Symlinking test suite data files ..." ; \
+	  for file in $(EXTRA_DIST); do \
+	    test -a "$$file" || $(LN_S) "$(srcdir)/$$file"; \
 	  done \
 	fi
diff --git a/src/test/resources/input/decoding/Makefile.am b/src/test/resources/input/decoding/Makefile.am
new file mode 100644
index 0000000..c1a34ad
--- /dev/null
+++ b/src/test/resources/input/decoding/Makefile.am
@@ -0,0 +1,31 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+EXTRA_DIST = \
+    ascii.txt \
+    latin1.txt \
+    UTF-16BE.txt \
+    UTF-16LE.txt \
+    UTF-16.txt \
+    UTF-8.txt
+
+# if we are building in a separate build tree, then prepare all necessary links
+all-local:
+	@if test "$(top_srcdir)" != "$(top_builddir)"; then \
+	  echo "Symlinking test suite data files ..." ; \
+	  for file in $(EXTRA_DIST); do \
+	    test -a "$$file" || $(LN_S) "$(srcdir)/$$file"; \
+	  done \
+	fi
diff --git a/src/test/resources/input/decoding/UTF-16.txt b/src/test/resources/input/decoding/UTF-16.txt
new file mode 100644
index 0000000..3e9d406
--- /dev/null
+++ b/src/test/resources/input/decoding/UTF-16.txt
Binary files differ
diff --git a/src/test/resources/input/decoding/UTF-16BE.txt b/src/test/resources/input/decoding/UTF-16BE.txt
new file mode 100644
index 0000000..47d2242
--- /dev/null
+++ b/src/test/resources/input/decoding/UTF-16BE.txt
Binary files differ
diff --git a/src/test/resources/input/decoding/UTF-16LE.txt b/src/test/resources/input/decoding/UTF-16LE.txt
new file mode 100644
index 0000000..f497fb9
--- /dev/null
+++ b/src/test/resources/input/decoding/UTF-16LE.txt
Binary files differ
diff --git a/src/test/resources/input/decoding/UTF-8.txt b/src/test/resources/input/decoding/UTF-8.txt
new file mode 100644
index 0000000..04b248f
--- /dev/null
+++ b/src/test/resources/input/decoding/UTF-8.txt
@@ -0,0 +1 @@
+A؅԰আ七Ѐ ¹
\ No newline at end of file
diff --git a/src/test/resources/input/decoding/ascii.txt b/src/test/resources/input/decoding/ascii.txt
new file mode 100644
index 0000000..f0327b1
--- /dev/null
+++ b/src/test/resources/input/decoding/ascii.txt
@@ -0,0 +1 @@
+A????? ?
\ No newline at end of file
diff --git a/src/test/resources/input/decoding/latin1.txt b/src/test/resources/input/decoding/latin1.txt
new file mode 100644
index 0000000..9d8837b
--- /dev/null
+++ b/src/test/resources/input/decoding/latin1.txt
@@ -0,0 +1 @@
+A????? ¹
\ No newline at end of file
diff --git a/src/test/resources/input/ndc/Makefile.am b/src/test/resources/input/ndc/Makefile.am
index 5b67b7e..e1e6cf3 100644
--- a/src/test/resources/input/ndc/Makefile.am
+++ b/src/test/resources/input/ndc/Makefile.am
@@ -13,13 +13,14 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #
-EXTRA_DIST = *.properties
+EXTRA_DIST = \
+    NDC1.properties
 
-# if we are building in a separate build tree, then copy all necessary files
+# if we are building in a separate build tree, then prepare all necessary links
 all-local:
 	@if test "$(top_srcdir)" != "$(top_builddir)"; then \
-	  echo "Copying test suite data files ..." ; \
-	  list='$(EXTRA_DIST)'; for file in $$list; do \
-	    cp -p $(srcdir)/$$file . ; \
+	  echo "Symlinking test suite data files ..." ; \
+	  for file in $(EXTRA_DIST); do \
+	    test -a "$$file" || $(LN_S) "$(srcdir)/$$file"; \
 	  done \
 	fi
diff --git a/src/test/resources/input/ndc/NDC1.properties b/src/test/resources/input/ndc/NDC1.properties
old mode 100755
new mode 100644
diff --git a/src/test/resources/input/propertiestestcase.properties b/src/test/resources/input/propertiestestcase.properties
new file mode 100644
index 0000000..1f372b3
--- /dev/null
+++ b/src/test/resources/input/propertiestestcase.properties
@@ -0,0 +1,32 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+propertiestestcase.tab1	tab delimited
+	propertiestestcase.tab2=tab before key
+propertiestestcase.tab3\	=key contains tab
+propertiestestcase.tab4=	tab after equals
+propertiestestcase\
+	.tab5=tab after continue
+propertiestestcase.tab6=\	 in value
+propertiestestcase.tab7=continued\
+	value
+propertiestestcase.crlf1=continued\

+ value
+propertiestestcase.esct1\t=key contains tab
+propertiestestcase.esct2=\t in value
+propertiestestcase.escn1\n=key contains lf
+propertiestestcase.escn2=\n in value
+propertiestestcase.escr1\r=key contains cr
+propertiestestcase.escr2=\r in value
diff --git a/src/test/resources/input/rolling/Makefile.am b/src/test/resources/input/rolling/Makefile.am
index ae80170..d8083d2 100644
--- a/src/test/resources/input/rolling/Makefile.am
+++ b/src/test/resources/input/rolling/Makefile.am
@@ -13,13 +13,18 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #
-EXTRA_DIST = *.xml *.properties
+EXTRA_DIST = \
+    filter1.xml \
+    obsoleteDRFA1.properties \
+    obsoleteERFA1.properties \
+    obsoleteRFA1.properties \
+    time1.xml
 
-# if we are building in a separate build tree, then copy all necessary files
+# if we are building in a separate build tree, then prepare all necessary links
 all-local:
 	@if test "$(top_srcdir)" != "$(top_builddir)"; then \
-	  echo "Copying test suite data files ..." ; \
-	  list='$(EXTRA_DIST)'; for file in $$list; do \
-	    cp -p $(srcdir)/$$file . ; \
+	  echo "Symlinking test suite data files ..." ; \
+	  for file in $(EXTRA_DIST); do \
+	    test -a "$$file" || $(LN_S) "$(srcdir)/$$file"; \
 	  done \
 	fi
diff --git a/src/test/resources/input/xml/DOMTestCase1.xml b/src/test/resources/input/xml/DOMTestCase1.xml
old mode 100755
new mode 100644
diff --git a/src/test/resources/input/xml/DOMTestCase2.xml b/src/test/resources/input/xml/DOMTestCase2.xml
old mode 100755
new mode 100644
diff --git a/src/test/resources/input/xml/DOMTestCase3.xml b/src/test/resources/input/xml/DOMTestCase3.xml
old mode 100755
new mode 100644
diff --git a/src/test/resources/input/xml/DOMTestCase4.xml b/src/test/resources/input/xml/DOMTestCase4.xml
old mode 100755
new mode 100644
diff --git a/src/test/resources/input/xml/Makefile.am b/src/test/resources/input/xml/Makefile.am
index 065d1f0..fc25cb7 100644
--- a/src/test/resources/input/xml/Makefile.am
+++ b/src/test/resources/input/xml/Makefile.am
@@ -13,13 +13,33 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #
-EXTRA_DIST = log4j.dtd *.xml
+EXTRA_DIST = \
+    log4j.dtd \
+    asyncAppender1.xml \
+    customLevel1.xml \
+    customLevel2.xml \
+    customLevel3.xml \
+    customLevel4.xml \
+    customLogger1.xml \
+    customLogger2.xml \
+    defaultInit.xml \
+    DOMTestCase1.xml \
+    DOMTestCase2.xml \
+    DOMTestCase3.xml \
+    DOMTestCase4.xml \
+    fallback1.xml \
+    filters.LevelMatchFilter.test4.0.xml \
+    filters.LevelMatchFilter.test4.1.xml \
+    filters.LevelMatchFilter.test4.2.xml \
+    filters.LevelMatchFilter.test4.3.xml \
+    filters.LevelMatchFilter.test4.4.xml \
+    smtpAppender1.xml
 
-# if we are building in a separate build tree, then copy all necessary files
+# if we are building in a separate build tree, then prepare all necessary links
 all-local:
 	@if test "$(top_srcdir)" != "$(top_builddir)"; then \
-	  echo "Copying test suite data files ..." ; \
-	  list='$(EXTRA_DIST)'; for file in $$list; do \
-	    cp -p $(srcdir)/$$file . ; \
+	  echo "Symlinking test suite data files ..." ; \
+	  for file in $(EXTRA_DIST); do \
+	    test -a "$$file" || $(LN_S) "$(srcdir)/$$file"; \
 	  done \
 	fi
diff --git a/src/test/resources/input/xml/asyncAppender1.xml b/src/test/resources/input/xml/asyncAppender1.xml
old mode 100755
new mode 100644
diff --git a/src/test/resources/input/xml/customLevel1.xml b/src/test/resources/input/xml/customLevel1.xml
old mode 100755
new mode 100644
diff --git a/src/test/resources/input/xml/customLevel2.xml b/src/test/resources/input/xml/customLevel2.xml
old mode 100755
new mode 100644
diff --git a/src/test/resources/input/xml/customLevel3.xml b/src/test/resources/input/xml/customLevel3.xml
old mode 100755
new mode 100644
diff --git a/src/test/resources/input/xml/customLevel4.xml b/src/test/resources/input/xml/customLevel4.xml
old mode 100755
new mode 100644
diff --git a/src/test/resources/input/xml/fallback1.xml b/src/test/resources/input/xml/fallback1.xml
index 4ea9764..b0b8ff8 100644
--- a/src/test/resources/input/xml/fallback1.xml
+++ b/src/test/resources/input/xml/fallback1.xml
@@ -27,26 +27,35 @@
       <appender-ref ref="FALLBACK" />
     </errorHandler>
 
-    <param name="File" value="/xyz/x.log" />
-    <param name="Append" value="false" />	    
-    
+    <!--
+        The following path is carefully designed to fail on Linux and Windows,
+        so that the appender FALLBACK is used instead and the test succeeds in
+        the end. Linux considers "." as current directory, which can not be
+        created as a file, while Windows strips "/."[1] internally and fails at
+        ":", which is an invalid name.
+
+        [1]: https://en.wikipedia.org/wiki/Filename#Comparison_of_filename_limitations
+    -->
+    <param name="File"      value="output/xyz/:/."   />
+    <param name="Append"    value="false"            />
+
     <layout class="org.apache.log4j.PatternLayout">
       <param name="ConversionPattern" value="%-5p %c{2} - %m%n"/>
-    </layout>	    
+    </layout>
   </appender>
-  
+
   <appender name="FALLBACK" class="org.apache.log4j.FileAppender">
     <param name="File" value="output/temp" />
     <param name="Append" value="false" />
     <layout class="org.apache.log4j.PatternLayout">
       <param name="ConversionPattern" value="FALLBACK - %c - %m%n"/>
-    </layout>	    
+    </layout>
   </appender>
-	
-  
+
+
   <root>
     <priority value ="debug" />
     <appender-ref ref="PRIMARY" />
   </root>
-	
+
 </log4j:configuration>
diff --git a/src/test/resources/input/xml/log4j.dtd b/src/test/resources/input/xml/log4j.dtd
old mode 100755
new mode 100644
diff --git a/src/test/resources/witness/Makefile.am b/src/test/resources/witness/Makefile.am
index 9464d5b..bc5cfce 100644
--- a/src/test/resources/witness/Makefile.am
+++ b/src/test/resources/witness/Makefile.am
@@ -14,25 +14,69 @@
 # limitations under the License.
 #
 SUBDIRS = encoding ndc rolling
-EXTRA_DIST = LevelMatchFilter* \
-             LevelRangeFilter* \
-             NDCMatchFilter* \
-             custom* \
-             dom.* \
-             hierarchyThreshold.* \
-             l7d.* \
-             patternLayout.* \
-             socketServer.* \
-             xmlLayout.* \
-             fallback \
-             simple \
-             ttcc
+EXTRA_DIST = \
+    customLevel.1 \
+    customLevel.2 \
+    customLevel.3 \
+    customLevel.4 \
+    customLogger.1 \
+    customLogger.2 \
+    dom.A1.1 \
+    dom.A1.2 \
+    dom.A2.1 \
+    dom.A2.2 \
+    fallback1 \
+    hierarchyThreshold.1 \
+    hierarchyThreshold.2 \
+    hierarchyThreshold.3 \
+    hierarchyThreshold.4 \
+    hierarchyThreshold.5 \
+    hierarchyThreshold.6 \
+    hierarchyThreshold.7 \
+    hierarchyThreshold.8 \
+    l7d.1 \
+    LevelMatchFilter_accept \
+    LevelMatchFilter_deny \
+    LevelRangeFilter_accept \
+    LevelRangeFilter_neutral \
+    NDCMatchFilter_accept \
+    NDCMatchFilter_deny \
+    patternLayout.1 \
+    patternLayout.10 \
+    patternLayout.11 \
+    patternLayout.12 \
+    patternLayout.2 \
+    patternLayout.3 \
+    patternLayout.4 \
+    patternLayout.5 \
+    patternLayout.6 \
+    patternLayout.7 \
+    patternLayout.8 \
+    patternLayout.9 \
+    patternLayout.mdc.1 \
+    patternLayout.mdc.2 \
+    simple \
+    socketServer.1 \
+    socketServer.2 \
+    socketServer.3 \
+    socketServer.4 \
+    socketServer.5 \
+    socketServer.6 \
+    socketServer.7 \
+    socketServer.8 \
+    ttcc \
+    xmlLayout.1 \
+    xmlLayout.2 \
+    xmlLayout.3 \
+    xmlLayout.mdc.1 \
+    xmlLayout.mdc.2 \
+    xmlLayout.null
 
-# if we are building in a separate build tree, then copy all necessary files
+# if we are building in a separate build tree, then prepare all necessary links
 all-local:
 	@if test "$(top_srcdir)" != "$(top_builddir)"; then \
-	  echo "Copying test suite data files ..." ; \
-	  list='$(EXTRA_DIST)'; for file in $$list; do \
-	    cp -p $(srcdir)/$$file . ; \
+	  echo "Symlinking test suite data files ..." ; \
+	  for file in $(EXTRA_DIST); do \
+	    test -a "$$file" || $(LN_S) "$(srcdir)/$$file"; \
 	  done \
 	fi
diff --git a/src/test/resources/witness/customLevel.1 b/src/test/resources/witness/customLevel.1
old mode 100755
new mode 100644
diff --git a/src/test/resources/witness/customLevel.2 b/src/test/resources/witness/customLevel.2
old mode 100755
new mode 100644
diff --git a/src/test/resources/witness/customLevel.3 b/src/test/resources/witness/customLevel.3
old mode 100755
new mode 100644
diff --git a/src/test/resources/witness/customLevel.4 b/src/test/resources/witness/customLevel.4
old mode 100755
new mode 100644
diff --git a/src/test/resources/witness/dom.A1.1 b/src/test/resources/witness/dom.A1.1
old mode 100755
new mode 100644
diff --git a/src/test/resources/witness/dom.A1.2 b/src/test/resources/witness/dom.A1.2
old mode 100755
new mode 100644
diff --git a/src/test/resources/witness/dom.A2.1 b/src/test/resources/witness/dom.A2.1
old mode 100755
new mode 100644
diff --git a/src/test/resources/witness/dom.A2.2 b/src/test/resources/witness/dom.A2.2
old mode 100755
new mode 100644
diff --git a/src/test/resources/witness/encoding/Makefile.am b/src/test/resources/witness/encoding/Makefile.am
index ed1594a..cd909f2 100644
--- a/src/test/resources/witness/encoding/Makefile.am
+++ b/src/test/resources/witness/encoding/Makefile.am
@@ -13,15 +13,19 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #
-EXTRA_DIST = UTF-* \
-             ascii.log \
-             latin1.log
+EXTRA_DIST = \
+    ascii.log \
+    latin1.log \
+    UTF-16BE.log \
+    UTF-16LE.log \
+    UTF-16.log \
+    UTF-8.log
 
-# if we are building in a separate build tree, then copy all necessary files
+# if we are building in a separate build tree, then prepare all necessary links
 all-local:
 	@if test "$(top_srcdir)" != "$(top_builddir)"; then \
-	  echo "Copying test suite data files ..." ; \
-	  list='$(EXTRA_DIST)'; for file in $$list; do \
-	    cp -p $(srcdir)/$$file . ; \
+	  echo "Symlinking test suite data files ..." ; \
+	  for file in $(EXTRA_DIST); do \
+	    test -a "$$file" || $(LN_S) "$(srcdir)/$$file"; \
 	  done \
 	fi
diff --git a/src/test/resources/witness/fallback b/src/test/resources/witness/fallback1
similarity index 71%
rename from src/test/resources/witness/fallback
rename to src/test/resources/witness/fallback1
index 818931c..a58985c 100644
--- a/src/test/resources/witness/fallback
+++ b/src/test/resources/witness/fallback1
@@ -8,3 +8,7 @@
 FALLBACK - root - Message 3
 FALLBACK - test - Message 4
 FALLBACK - root - Message 4
+FALLBACK - test - Message 5
+FALLBACK - root - Message 5
+FALLBACK - test - Message 6
+FALLBACK - root - Message 6
diff --git a/src/test/resources/witness/l7d.1 b/src/test/resources/witness/l7d.1
index 0bc132b..70c5c94 100644
--- a/src/test/resources/witness/l7d.1
+++ b/src/test/resources/witness/l7d.1
@@ -5,6 +5,8 @@
 T1 ERROR - This is test number 1 with string argument log4j.
 T1 ERROR - No resource is associated with key "bogus2".
 T1  INFO - bogus2
+T1 ERROR - No resource is associated with key "msg3".
+T1 ERROR - msg3
 T1  INFO - Ceci est le test en francais pour la France.
 T1  WARN - Bonjour la France.
 T1 ERROR - No resource is associated with key "bogusMsg".
@@ -12,6 +14,7 @@
 T1 ERROR - Ceci est le test numero 2 contenant l'argument log4j.
 T1 ERROR - No resource is associated with key "bogus2".
 T1  INFO - bogus2
+T1 ERROR - Ceci est le test numero 2 contenant l'argument log4j et l'argument log4cxx.
 T1  INFO - Ceci est le test en francais pour la p'tite Suisse.
 T1  WARN - Bonjour la France.
 T1 ERROR - No resource is associated with key "bogusMsg".
@@ -19,3 +22,4 @@
 T1 ERROR - Ceci est le test numero 3 contenant l'argument log4j.
 T1 ERROR - No resource is associated with key "bogus2".
 T1  INFO - bogus2
+T1 ERROR - Ceci est le test numero 3 contenant l'argument log4j et l'argument log4cxx.
diff --git a/src/test/resources/witness/ndc/Makefile.am b/src/test/resources/witness/ndc/Makefile.am
index 8129cc1..ffd9944 100644
--- a/src/test/resources/witness/ndc/Makefile.am
+++ b/src/test/resources/witness/ndc/Makefile.am
@@ -13,13 +13,14 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #
-EXTRA_DIST = NDC.*
+EXTRA_DIST = \
+    NDC.1
 
-# if we are building in a separate build tree, then copy all necessary files
+# if we are building in a separate build tree, then prepare all necessary links
 all-local:
 	@if test "$(top_srcdir)" != "$(top_builddir)"; then \
-	  echo "Copying test suite data files ..." ; \
-	  list='$(EXTRA_DIST)'; for file in $$list; do \
-	    cp -p $(srcdir)/$$file . ; \
+	  echo "Symlinking test suite data files ..." ; \
+	  for file in $(EXTRA_DIST); do \
+	    test -a "$$file" || $(LN_S) "$(srcdir)/$$file"; \
 	  done \
 	fi
diff --git a/src/test/resources/witness/ndc/NDC.1 b/src/test/resources/witness/ndc/NDC.1
old mode 100755
new mode 100644
diff --git a/src/test/resources/witness/rolling/Makefile.am b/src/test/resources/witness/rolling/Makefile.am
index c154185..c51948d 100644
--- a/src/test/resources/witness/rolling/Makefile.am
+++ b/src/test/resources/witness/rolling/Makefile.am
@@ -13,14 +13,38 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #
-EXTRA_DIST = sbr-test* \
-             tbr-test*
+EXTRA_DIST = \
+    sbr-test2.0 \
+    sbr-test2.1 \
+    sbr-test2.log \
+    sbr-test3.0.gz \
+    sbr-test3.1.gz \
+    sbr-test3.log \
+    sbr-test4.log \
+    tbr-test1.0 \
+    tbr-test1.1 \
+    tbr-test1.2 \
+    tbr-test1.3 \
+    tbr-test2.0 \
+    tbr-test2.1 \
+    tbr-test2.2 \
+    tbr-test2.3 \
+    tbr-test3.3 \
+    tbr-test4.0 \
+    tbr-test4.1 \
+    tbr-test4.2 \
+    tbr-test4.3 \
+    tbr-test5.0 \
+    tbr-test5.1 \
+    tbr-test5.2 \
+    tbr-test5.3 \
+    tbr-test6.3
 
-# if we are building in a separate build tree, then copy all necessary files
+# if we are building in a separate build tree, then prepare all necessary links
 all-local:
 	@if test "$(top_srcdir)" != "$(top_builddir)"; then \
-	  echo "Copying test suite data files ..." ; \
-	  list='$(EXTRA_DIST)'; for file in $$list; do \
-	    cp -p $(srcdir)/$$file . ; \
+	  echo "Symlinking test suite data files ..." ; \
+	  for file in $(EXTRA_DIST); do \
+	    test -a "$$file" || $(LN_S) "$(srcdir)/$$file"; \
 	  done \
 	fi