Explorar o código

modules/app_java: added documentation, removed *.class,*.jar

Konstantin Mosesov %!s(int64=12) %!d(string=hai) anos
pai
achega
fc425b1c36
Modificáronse 100 ficheiros con 31607 adicións e 0 borrados
  1. 4 0
      modules/app_java/doc/Makefile
  2. 837 0
      modules/app_java/doc/README
  3. 573 0
      modules/app_java/doc/app_java.txt
  4. 35 0
      modules/app_java/doc/app_java.xml
  5. 648 0
      modules/app_java/doc/app_java_admin.xml
  6. 1 0
      modules/app_java/doc/epub/META-INF/container.xml
  7. BIN=BIN
      modules/app_java/doc/epub/app_java_admin.epub
  8. 32 0
      modules/app_java/doc/epub/ch01s02.html
  9. 7 0
      modules/app_java/doc/epub/ch01s03.html
  10. 117 0
      modules/app_java/doc/epub/ch01s04.html
  11. 352 0
      modules/app_java/doc/epub/ch01s05.html
  12. 43 0
      modules/app_java/doc/epub/ch01s06.html
  13. 1 0
      modules/app_java/doc/epub/content.opf
  14. 35 0
      modules/app_java/doc/epub/index.html
  15. 1 0
      modules/app_java/doc/epub/mimetype
  16. 0 0
      modules/app_java/doc/epub/toc.ncx
  17. 7 0
      modules/app_java/doc/html/app_java.html
  18. 585 0
      modules/app_java/doc/html/app_java_admin.html
  19. BIN=BIN
      modules/app_java/doc/pdf/app_java.pdf
  20. BIN=BIN
      modules/app_java/doc/pdf/app_java_admin.pdf
  21. 93 0
      modules/app_java/doc/webhelp/ch01.html
  22. 74 0
      modules/app_java/doc/webhelp/ch01s02.html
  23. 49 0
      modules/app_java/doc/webhelp/ch01s03.html
  24. 159 0
      modules/app_java/doc/webhelp/ch01s04.html
  25. 394 0
      modules/app_java/doc/webhelp/ch01s05.html
  26. 85 0
      modules/app_java/doc/webhelp/ch01s06.html
  27. 27 0
      modules/app_java/doc/webhelp/index.html
  28. 79 0
      modules/app_java/doc/webhelp/oxygen-main.html
  29. 32 0
      modules/app_java/doc/webhelp/oxygen-webhelp/index.html
  30. 22 0
      modules/app_java/doc/webhelp/oxygen-webhelp/noScript.html
  31. 552 0
      modules/app_java/doc/webhelp/oxygen-webhelp/resources/css/admin.css
  32. 994 0
      modules/app_java/doc/webhelp/oxygen-webhelp/resources/css/comments.css
  33. 175 0
      modules/app_java/doc/webhelp/oxygen-webhelp/resources/css/commonltr.css
  34. 126 0
      modules/app_java/doc/webhelp/oxygen-webhelp/resources/css/commonrtl.css
  35. 33 0
      modules/app_java/doc/webhelp/oxygen-webhelp/resources/css/index.html
  36. 220 0
      modules/app_java/doc/webhelp/oxygen-webhelp/resources/css/install.css
  37. 24 0
      modules/app_java/doc/webhelp/oxygen-webhelp/resources/css/jquery.cleditor.css
  38. 26 0
      modules/app_java/doc/webhelp/oxygen-webhelp/resources/css/jquery.realperson.css
  39. 1106 0
      modules/app_java/doc/webhelp/oxygen-webhelp/resources/css/o_comments.css
  40. 647 0
      modules/app_java/doc/webhelp/oxygen-webhelp/resources/css/style.css
  41. 459 0
      modules/app_java/doc/webhelp/oxygen-webhelp/resources/css/ui.dynatree.css
  42. 0 0
      modules/app_java/doc/webhelp/oxygen-webhelp/resources/css/webhelp_frameset.css
  43. 437 0
      modules/app_java/doc/webhelp/oxygen-webhelp/resources/css/webhelp_toc.css
  44. 249 0
      modules/app_java/doc/webhelp/oxygen-webhelp/resources/css/webhelp_topic.css
  45. BIN=BIN
      modules/app_java/doc/webhelp/oxygen-webhelp/resources/img/LogoOxygen100x22.png
  46. BIN=BIN
      modules/app_java/doc/webhelp/oxygen-webhelp/resources/img/ajax-loader.gif
  47. BIN=BIN
      modules/app_java/doc/webhelp/oxygen-webhelp/resources/img/buttons.gif
  48. BIN=BIN
      modules/app_java/doc/webhelp/oxygen-webhelp/resources/img/close.png
  49. BIN=BIN
      modules/app_java/doc/webhelp/oxygen-webhelp/resources/img/close_hover.png
  50. BIN=BIN
      modules/app_java/doc/webhelp/oxygen-webhelp/resources/img/dot.png
  51. BIN=BIN
      modules/app_java/doc/webhelp/oxygen-webhelp/resources/img/expand.png
  52. BIN=BIN
      modules/app_java/doc/webhelp/oxygen-webhelp/resources/img/icon_comment24x24.png
  53. BIN=BIN
      modules/app_java/doc/webhelp/oxygen-webhelp/resources/img/icons.png
  54. 33 0
      modules/app_java/doc/webhelp/oxygen-webhelp/resources/img/index.html
  55. BIN=BIN
      modules/app_java/doc/webhelp/oxygen-webhelp/resources/img/loading.gif
  56. BIN=BIN
      modules/app_java/doc/webhelp/oxygen-webhelp/resources/img/loadingSmall.gif
  57. BIN=BIN
      modules/app_java/doc/webhelp/oxygen-webhelp/resources/img/rss.gif
  58. BIN=BIN
      modules/app_java/doc/webhelp/oxygen-webhelp/resources/img/spinner.gif
  59. BIN=BIN
      modules/app_java/doc/webhelp/oxygen-webhelp/resources/img/star.png
  60. BIN=BIN
      modules/app_java/doc/webhelp/oxygen-webhelp/resources/img/starsSmall.png
  61. BIN=BIN
      modules/app_java/doc/webhelp/oxygen-webhelp/resources/img/timeLine.png
  62. BIN=BIN
      modules/app_java/doc/webhelp/oxygen-webhelp/resources/img/timeVersion.png
  63. BIN=BIN
      modules/app_java/doc/webhelp/oxygen-webhelp/resources/img/toolbar.gif
  64. BIN=BIN
      modules/app_java/doc/webhelp/oxygen-webhelp/resources/img/version.png
  65. 278 0
      modules/app_java/doc/webhelp/oxygen-webhelp/resources/js/GPL-LICENSE.txt
  66. 7 0
      modules/app_java/doc/webhelp/oxygen-webhelp/resources/js/MIT-License.txt
  67. 135 0
      modules/app_java/doc/webhelp/oxygen-webhelp/resources/js/base64.js
  68. 116 0
      modules/app_java/doc/webhelp/oxygen-webhelp/resources/js/browserDetect.js
  69. 52 0
      modules/app_java/doc/webhelp/oxygen-webhelp/resources/js/frames_redirect.js
  70. 33 0
      modules/app_java/doc/webhelp/oxygen-webhelp/resources/js/index.html
  71. 11 0
      modules/app_java/doc/webhelp/oxygen-webhelp/resources/js/jquery-1.3.2.js
  72. 4204 0
      modules/app_java/doc/webhelp/oxygen-webhelp/resources/js/jquery-ui.custom.js
  73. 321 0
      modules/app_java/doc/webhelp/oxygen-webhelp/resources/js/jquery-ui.custom.min.js
  74. 1131 0
      modules/app_java/doc/webhelp/oxygen-webhelp/resources/js/jquery.cleditor.js
  75. 97 0
      modules/app_java/doc/webhelp/oxygen-webhelp/resources/js/jquery.cookie.js
  76. 3278 0
      modules/app_java/doc/webhelp/oxygen-webhelp/resources/js/jquery.dynatree.js
  77. 9404 0
      modules/app_java/doc/webhelp/oxygen-webhelp/resources/js/jquery.js
  78. 150 0
      modules/app_java/doc/webhelp/oxygen-webhelp/resources/js/jquery.quicksearch.js
  79. 183 0
      modules/app_java/doc/webhelp/oxygen-webhelp/resources/js/jquery.realperson.js
  80. 6 0
      modules/app_java/doc/webhelp/oxygen-webhelp/resources/js/jquery.realperson.min.js
  81. 6 0
      modules/app_java/doc/webhelp/oxygen-webhelp/resources/js/jquery.realperson.pack.js
  82. 256 0
      modules/app_java/doc/webhelp/oxygen-webhelp/resources/js/md5.js
  83. 155 0
      modules/app_java/doc/webhelp/oxygen-webhelp/resources/js/quick_search.js
  84. 79 0
      modules/app_java/doc/webhelp/oxygen-webhelp/resources/js/rate_article.js
  85. 199 0
      modules/app_java/doc/webhelp/oxygen-webhelp/resources/js/webhelp.js
  86. 182 0
      modules/app_java/doc/webhelp/oxygen-webhelp/resources/localization/strings.js
  87. 80 0
      modules/app_java/doc/webhelp/oxygen-webhelp/resources/localization/strings.php
  88. 1 0
      modules/app_java/doc/webhelp/oxygen-webhelp/search/default.props
  89. 45 0
      modules/app_java/doc/webhelp/oxygen-webhelp/search/en-us.props
  90. 179 0
      modules/app_java/doc/webhelp/oxygen-webhelp/search/es-es.props
  91. 8 0
      modules/app_java/doc/webhelp/oxygen-webhelp/search/htmlFileInfoList.js
  92. 10 0
      modules/app_java/doc/webhelp/oxygen-webhelp/search/htmlFileList.js
  93. 138 0
      modules/app_java/doc/webhelp/oxygen-webhelp/search/index-1.js
  94. 137 0
      modules/app_java/doc/webhelp/oxygen-webhelp/search/index-2.js
  95. 135 0
      modules/app_java/doc/webhelp/oxygen-webhelp/search/index-3.js
  96. 33 0
      modules/app_java/doc/webhelp/oxygen-webhelp/search/index.html
  97. 1 0
      modules/app_java/doc/webhelp/oxygen-webhelp/search/ja-jp.props
  98. 906 0
      modules/app_java/doc/webhelp/oxygen-webhelp/search/nwSearchFnt.js
  99. 31 0
      modules/app_java/doc/webhelp/oxygen-webhelp/search/punctuation.props
  100. 247 0
      modules/app_java/doc/webhelp/oxygen-webhelp/search/stemmers/de_stemmer.js

+ 4 - 0
modules/app_java/doc/Makefile

@@ -0,0 +1,4 @@
+docs = app_java.xml
+
+docbook_dir = ../../../docbook
+include $(docbook_dir)/Makefile.module

+ 837 - 0
modules/app_java/doc/README

@@ -0,0 +1,837 @@
+app_java Module
+
+Konstantin Mosesov
+
+Edited by
+
+Konstantin Mosesov
+
+   <[email protected]>
+
+   Copyright © 2013 Konstantin Mosesov
+     __________________________________________________________________
+
+   Table of Contents
+
+   1. Admin Guide
+
+        1. Overview
+        2. Dependencies
+
+              2.1. Kamailio Modules
+              2.2. External Libraries or Applications
+
+        3. Parameters
+
+	      3.1. class_name (string)
+              3.2. child_init_method (string)
+	      3.3. java_options (string)
+	      3.4. force_kam_cmd_exec (int)
+
+        4. Functions
+
+	      4.0. Common requirements.
+              4.1. java_method_exec(method, method_signature, [param1[, param2]])
+	      4.2. java_s_method_exec(method, method_signature, [param1[, param2]])
+	      4.3. java_staticmethod_exec(method, method_signature, [param1[, param2]])
+	      4.4. java_s_staticmethod_exec(method, method_signature, [param1[, param2]])
+
+	5. Java module API
+
+	      5.0. Minimal program skeleton and structure of package org.siprouter
+		   5.0.1.  Minimal program skeleton
+		   5.0.2.  Structure of package org.siprouter
+	      5.1. abstract class NativeMethods
+	           5.1.1.  General logging
+			   5.1.1.0.   Logging levels and facilities
+			   5.1.1.1.   native void LM_GEN1(int logLevel, String s);
+			   5.1.1.2.   native void LM_GEN2(int logFacility, int logLevel, String s);
+			   5.1.1.3.   native void LM_ALERT(String s);
+			   5.1.1.4.   native void LM_CRIT(String s);
+			   5.1.1.5.   native void LM_WARN(String s);
+			   5.1.1.6.   native void LM_NOTICE(String s);
+			   5.1.1.7.   native void LM_ERR(String s);
+			   5.1.1.8.   native void LM_INFO(String s);
+			   5.1.1.9.   native void LM_DBG(String s);
+		   5.1.2.  Execution of kamailio commands
+			   5.1.2.1.   static native int KamExec(String fname, String... params);
+    			   5.1.2.2.   static native int SetURI(String ruri);
+    			   5.1.2.3.   static native int RewriteURI(String ruri);
+
+	      5.2. class IPPair.
+		   5.2.1.   final String ip;
+		   5.2.2.   final int port;
+	      5.3. abstract class SipMsg
+		   5.3.0.   Internal structure understanding.
+		   5.3.1.   int id;
+		   5.3.2.   int pid;
+		   5.3.3.   String eoh;
+		   5.3.4.   String unparsed;
+		   5.3.5.   String buf;
+		   5.3.6.   int len;
+		   5.3.7.   String new_uri;
+		   5.3.8.   String dst_uri;
+		   5.3.9.   int parsed_uri_ok;
+		   5.3.10.  int parsed_orig_ruri_ok;
+		   5.3.11.  String add_to_branch_s;
+		   5.3.12.  int add_to_branch_len;
+		   5.3.13.  int hash_index;
+		   5.3.14.  int msg_flags;
+		   5.3.15.  static native SipMsg ParseSipMsg();
+		   5.3.16.  static native String getMsgType();
+		   5.3.17.  static native String getRURI();
+		   5.3.18.  static native IPPair getSrcAddress();
+		   5.3.19.  static native IPPair getDstAddress();
+		   5.3.20.  static native String getBuffer();
+	      5.4. interface NativeInterface
+		   5.4.1.   abstract class Ranks
+			    5.4.1.1.  static final int PROC_MAIN
+			    5.4.1.2.  static final int PROC_TIMER
+			    5.4.1.3.  static final int PROC_RPC
+			    5.4.1.4.  static final int PROC_FIFO
+			    5.4.1.5.  static final int PROC_TCP_MAIN
+			    5.4.1.6.  static final int PROC_UNIXSOCK
+			    5.4.1.7.  static final int PROC_ATTENDANT
+			    5.4.1.8.  static final int PROC_INIT
+			    5.4.1.9.  static final int PROC_NOCHLDINIT
+			    5.4.1.10. static final int PROC_SIPINIT
+			    5.4.1.11. static final int PROC_SIPRPC
+			    5.4.1.12. static final int PROC_MIN
+		   5.4.2.   abstract class LogParams
+			    5.4.2.0.  Loggigng params
+			    5.4.2.1.  static final int L_ALERT
+			    5.4.2.2.  static final int L_BUG
+			    5.4.2.3.  static final int L_CRIT2
+			    5.4.2.4.  static final int L_CRIT
+			    5.4.2.5.  static final int L_ERR
+			    5.4.2.6.  static final int L_WARN
+			    5.4.2.7.  static final int L_NOTICE
+			    5.4.2.8.  static final int L_INFO
+			    5.4.2.9.  static final int L_DBG
+			    5.4.2.10. static final int DEFAULT_FACILITY
+	      5.5. Examples of usage Java API
+
+   List of Examples
+
+   1.1. Set class_name parameter
+   1.2. Set child_init_method parameter
+   1.3. Set java_options parameter
+   1.4. Set java_options parameter (live configuration)
+   1.5. Set java_options parameter (verbose configuration)
+   1.6. Set java_options parameter (debug configuration)
+
+   2.0. Example of usage signatures.
+   2.1. Example of usage java_method_exec()
+   2.2. Example of usage java_s_method_exec()
+   2.3. Example of usage java_staticmethod_exec()
+   3.4. Example of usage java_s_staticmethod_exec()
+
+Chapter 1. Admin Guide
+
+   Table of Contents
+
+   1. Overview
+   2. Dependencies
+
+        2.1. Kamailio Modules
+        2.2. External Libraries or Applications
+
+   3. Parameters
+
+        3.1. class_name (string)
+        3.2. child_init_method (string)
+        3.3. java_options (string)
+	3.4. force_kam_cmd_exec (int)
+
+   4. Functions
+
+	4.0. Common requirements.
+        4.1. java_method_exec(method, method_signature, [param1[, param2]])         - class method
+        4.2. java_s_method_exec(method, method_signature, [param1[, param2]])       - class synchronized method
+        4.3. java_staticmethod_exec(method, method_signature, [param1[, param2]])   - static method
+        4.4. java_s_staticmethod_exec(method, method_signature, [param1[, param2]]) - static synchronized method
+
+1. Overview
+
+   This module allows executing Java compiled classes from config file, exporting
+   functions to access the SIP message from Java using Java Native Interface (JNI).
+
+2. Dependencies
+
+   2.1. Kamailio Modules
+   2.2. External Libraries or Applications
+   2.3. Java runtime
+
+2.1. Kamailio Modules
+
+   The following modules must be loaded before this module:
+     * none.
+
+2.2. External Libraries or Applications
+
+   Legend:
+      * - Runtime library, required to launch
+      R - Required
+      O - Optional
+      D - Development (for building-rebuilding java)
+      P - Dependance of package
+
+   The following libraries or applications must be installed before
+   running Kamailio with this module loaded:
+     [*]    java-common            - Base of all Java packages
+     [*]    default-jre            - Standard Java or Java compatible Runtime
+     [*]    gcj-jre                - Java runtime environment using GIJ/classpath
+     [*]    libgcj12 (>=12)        - Java runtime library for use with gcj
+     [DR]   ant                    - Java based build tool like make
+     [DO]   ant-contrib            - collection of tasks, types and other tools for Apache Ant
+     [DPO]  ant-gcj                - Java based build tool like make (GCJ)
+     [DPO]  ant-optional           - Java based build tool like make - optional libraries
+     [DPO]  ant-optional-gcj       - Java based build tool like make - optional libraries (GCJ)
+     [DR]   default-jdk            - Standard Java or Java compatible Development Kit
+     [DR]   gcj-jdk                - gcj and classpath development tools for Java(TM)
+     [DR]   libgcj13-dev (>=12)    - Java development headers for use with gcj
+     [DO]   jdk                    - JDK Development Kit (either oracle jdk or openjdk)
+
+   The following libraries or applications must be compiled before
+   running Kamailio with this module loaded:
+     [*]   <class_name>.class
+     [*]   kamailio.jar
+
+2.3. Java runtime
+
+   Java runtime library (JRE or JDK) is required to use this module.
+
+3. Parameters
+
+   3.1. class_name (string)
+   3.2. child_init_method (string)
+   3.3. java_options (string)
+   3.4. force_kam_cmd_exec (int)
+
+3.1. class_name (string)
+
+   The class name should have the same compiled file name.
+   If the value is "Kamailio", then the compiled file should be named as "Kamailio.class".
+
+   Default value is “Kamailio”.
+
+   Example 1.1. Set class_name parameter
+...
+modparam("app_java", "class_name", "Kamailio")
+...
+
+3.2. child_init_method (string)
+
+   TBD.
+
+   Default value is “child_init”.
+
+   Example 1.2. Set child_init_method parameter
+...
+modparam("app_java", "child_init_method", "my_mod_init")
+...
+
+3.3. java_options (string)
+
+   Java options for Java Virtual Machine.
+   For more info see: http://docs.oracle.com/javase/6/docs/technotes/tools/windows/java.html
+
+   Default value is “-Djava.compiler=NONE”.
+
+   Example 1.3. Set java_options parameter
+...
+modparam("app_java", "java_options", "-Djava.compiler=NONE")
+...
+
+   Example 1.4. Set java_options parameter (live configuration)
+...
+modparam("app_java", "java_options", "-Djava.compiler=NONE -Djava.class.path=/path/to/kamailio/modules:/path/to/<class_name>_file_directory:/path/to/kamailio.jar")
+...
+
+   Example 1.5. Set java_options parameter (verbose configuration)
+...
+modparam("app_java", "java_options", "-verbose:gc,class,jni -Djava.compiler=NONE -Djava.class.path=/path/to/kamailio/modules:/path/to/class_name_file_directory:/path/to/kamailio.jar")
+...
+
+   Example 1.6. Set java_options parameter (debug configuration)
+...
+modparam("app_java", "java_options", "-Xdebug -verbose:gc,class,jni -Djava.compiler=NONE -Djava.class.path=/path/to/kamailio/modules:/path/to/class_name_file_directory:/path/to/kamailio.jar")
+...
+
+3.4. force_kam_cmd_exec (int)
+
+   This parameter forces execution a kamailio comnmand with java native method KamExec_raw.
+   Note: may cause a memory leaks if used from embedded languages.
+
+   Default value is 0 (off).
+
+4. Functions
+
+   4.0. Common requirements.
+   4.1. java_method_exec(method, method_signature, [param1[, param2]])
+   4.2. java_s_method_exec(method, method_signature, [param1[, param2]])
+   4.3. java_staticmethod_exec(method, method_signature, [param1[, param2]])
+   4.4. java_s_staticmethod_exec(method, method_signature, [param1[, param2]])
+
+4.0. Common requirements.
+
+   Each function has a required parameter “method_signature”.
+   For more info see: http://www.rgagnon.com/javadetails/java-0286.html
+   There are two parts to the signature. The first part is enclosed within the parentheses and represents the method's arguments. 
+   The second portion follows the closing parenthesis and represents the return type. The mapping between the Java type and C type is
+	Type     Chararacter 
+	boolean      Z 
+	byte         B 
+	char         C 
+	double       D 
+	float        F 
+	int          I 
+	long         J 
+	object       L 
+	short        S 
+	void         V 
+	array        [ 
+   Note that to specify an object, the "L" is followed by the object's class name and ends with a semi-colon, ';' .
+
+   app_java supports the following signatures
+      primitives: Z,B,C,D,F,I,J,L,S,V
+      objects: 
+		Ljava/lang/Boolean;
+		Ljava/lang/Byte;
+		Ljava/lang/Character;
+		Ljava/lang/Double;
+		Ljava/lang/Float;
+		Ljava/lang/Integer;
+		Ljava/lang/Long;
+		Ljava/lang/Short;
+		Ljava/lang/String;
+      NULL parameter: V
+
+   Each parameter passed to function will be cast according to given signature.
+
+   Example 2.0. Example of usage signatures.
+        0. Equivalent of java prototype:  public int ExampleMethod();
+...
+java_method_exec("ExampleMethod", "V");
+...
+
+        1. Equivalent of java prototype:  public int ExampleMethod(String param1, int param2);
+...
+java_method_exec("ExampleMethod", "Ljava/lang/String;I", "Hello world", "5");
+...
+           In the above scenario parameter 2 ("5") will be cast to integer representation.
+
+        2. Equivalent of java prototype:  public int ExampleMethod(boolean param1, byte param2);
+...
+java_method_exec("ExampleMethod", "ZB", "true", "0x05");
+...
+           In the above scenario parameter 1 ("true") will be cast to boolean representation.
+
+   Parameters are optional, ommitting a parameter meant the passed value is NULL.
+   Parameters count should be exactly the same as signature count.
+   Note, you shall use a correct signature, e.g. the following examples of combinations are invalid:
+        *) java_method_exec("ExampleMethod", "ZI", "False");
+        *) java_method_exec("ExampleMethod", "VI", "", "5");
+        *) java_method_exec("ExampleMethod", "LI", "something", "5");
+
+
+4.1.  java_method_exec(method, method_signature, [param1[, param2]])
+
+   Executes a java method “method”. Parameter “method_signature” is required (see 4.0).
+
+   Example 2.1. java_method_exec usage
+...
+# Equivalent of java prototype:  public int ExampleMethod();
+java_method_exec("ExampleMethod", "V");
+
+# Equivalent of java prototype:  public int ExampleMethod(String SipMessageBuffer, int SipMessageLenght);
+java_method_exec("ExampleMethod", "Ljava/lang/String;I", "$mb", "$ml");
+...
+
+
+4.2.  java_s_method_exec(method, method_signature, [param1[, param2]])
+
+   Executes a java synchronized method “method”. Parameter “method_signature” is required (see 4.0).
+   See a more info about to synchronization: http://docs.oracle.com/javase/tutorial/essential/concurrency/syncmeth.html
+
+   Example 2.2. java_s_method_exec usage
+...
+# Equivalent of java prototype:  public synchronized int ExampleMethod();
+java_s_method_exec("ExampleMethod", "V");
+
+# Equivalent of java prototype:  public synchronized int ExampleMethod(String SipMessageBuffer, int SipMessageLenght);
+java_s_method_exec("ExampleMethod", "Ljava/lang/String;I", "$mb", "$ml");
+...
+
+
+4.3.  java_staticmethod_exec(method, method_signature, [param1[, param2]])
+
+   Executes a java static method “method”. Parameter “method_signature” is required (see 4.0).
+
+   Example 2.3. java_staticmethod_exec usage
+...
+# Equivalent of java prototype:  public static int ExampleMethod();
+java_staticmethod_exec("ExampleMethod", "V");
+
+# Equivalent of java prototype:  public static int ExampleMethod(String SipMessageBuffer, int SipMessageLenght);
+java_staticmethod_exec("ExampleMethod", "Ljava/lang/String;I", "$mb", "$ml");
+...
+
+
+4.4.  java_s_staticmethod_exec(method, method_signature, [param1[, param2]])
+
+   Executes a java synchronized static method “method”. Parameter “method_signature” is required (see 4.0).
+   See a more info about to synchronization: http://docs.oracle.com/javase/tutorial/essential/concurrency/syncmeth.html
+
+   Example 2.4. java_s_staticmethod_exec usage
+...
+# Equivalent of java prototype:  public static synchronized int ExampleMethod();
+java_s_staticmethod_exec("ExampleMethod", "V");
+
+# Equivalent of java prototype:  public static synchronized int ExampleMethod(String SipMessageBuffer, int SipMessageLenght);
+java_s_staticmethod_exec("ExampleMethod", "Ljava/lang/String;I", "$mb", "$ml");
+...
+
+
+5. Java module API
+
+
+5.0. Minimal program skeleton and structure of package org.siprouter
+
+   5.0.1.  Minimal program skeleton
+
+...
+import org.siprouter.*;
+import org.siprouter.NativeInterface.*;
+
+public class Kamailio extends NativeMethods
+{
+	/* Here you should specify a full path to app_java.so */
+        static
+        {
+            System.load("/opt/kamailio/lib/kamailio/modules/app_java.so");
+        }
+
+        /* Constructor. Do not remove !!! */
+        public Kamailio()
+        {
+        }
+
+	/*
+	    This method should be executed for each children process, immediately after forking.
+	    Required. Do not remove !!!
+	*/
+        public int child_init(int rank)
+        {
+	    return 1;
+	}
+}
+...
+
+   5.0.2.  Structure of package org.siprouter
+
+            org.siprouter ---*---*--*-------> class NativeMethods
+                             |   |  +--> class IPPair
+                             |   +--> class SipMsg
+                             +--> interface NativeInterface
+                                        |
+                                        +--> class Ranks
+                                        +--> class LogParams
+
+
+5.1. abstract class NativeMethods
+
+   5.1.1.   General logging
+
+	5.1.1.0.   Log levels and facilities
+
+		   Log levels:
+			L_ALERT		= -5
+			L_BUG		= -4
+			L_CRIT2		= -3
+			L_CRIT		= -2
+			L_ERR		= -1
+			L_WARN		= 0
+			L_NOTICE	= 1
+			L_INFO		= 2
+			L_DBG		= 3
+
+		   Log facilities (see man syslog(3)):
+			DEFAULT_FACILITY	= 0  (LOG_KERN (Linux))
+
+		   1. Example of usage log levels and facilities:
+		     LM_GEN1(LogParams.L_BUG, "Hello World!\n");
+		     produces (example of output):
+		      0(3003) BUG: app_java [java_native_methods.c:255]: Hello World!
+
+		   2. Example of usage log levels and facilities:
+		     LM_GEN2(LogParams.DEFAULT_FACILITY, LogParams.L_WARN, "Hello World!\n");
+		     produces (example of output):
+		      2(3147) WARNING: app_java [java_native_methods.c:279]: Hello World!
+
+
+	5.1.1.1.   native void LM_GEN1(int logLevel, String s);
+	5.1.1.2.   native void LM_GEN2(int logFacility, int logLevel, String s);
+	5.1.1.3.   native void LM_ALERT(String s);
+        5.1.1.4.   native void LM_CRIT(String s);
+        5.1.1.5.   native void LM_WARN(String s);
+        5.1.1.6.   native void LM_NOTICE(String s);
+        5.1.1.7.   native void LM_ERR(String s);
+        5.1.1.8.   native void LM_INFO(String s);
+        5.1.1.9.   native void LM_DBG(String s);
+
+   5.1.2.   Execution of kamailio commands
+
+	5.1.2.1.   static native int KamExec(String fname, String... params);
+
+		   Executes a kamailio command.
+
+		   Parameter 'fname'  - Required. Kamailio function name.
+		   Parameter 'params' - An array of string parameters. Note, this method allows up to 6 params,
+					it will ignore all parameters if more than 6.
+
+		   Returns:
+			     1 - command was successfully executed.
+			    -1 - execution of command was failed.
+
+        5.1.2.2.   static native int SetURI(String ruri);
+
+		   Rewrites the request URI.
+
+		   Returns:
+			    1 - Ok
+			   -1 - Failed
+
+		   Online reference: http://www.kamailio.org/wiki/cookbooks/3.3.x/core#rewriteuri
+
+        5.1.2.3.   static native int RewriteURI(String ruri);
+
+		   Rewrites the request URI.
+		   Alias method: SetURI
+
+		   Returns:
+			    1 - Ok
+			   -1 - Failed
+
+		   Online reference: http://www.kamailio.org/wiki/cookbooks/3.3.x/core#rewriteuri
+
+
+
+5.2.   class IPPair.
+
+   Represents an IP-address pair (IP, Port)
+
+   5.2.1.   final String ip;
+
+	    IP Address
+
+   5.2.2.   final int port;
+
+	    Port
+
+
+5.3. abstract class SipMsg
+
+   5.3.0.   Internal structure understanding.
+
+	    The class SipMsg is partially incapsulating kamailio's struct sip_msg.
+	    References: parser/msg_parser.h, parser/parse_fline.h
+
+   5.3.1.   int id;
+
+	    Message id, unique/process
+
+   5.3.2.   int pid;
+
+	    Process ID
+
+   5.3.3.   String eoh;
+
+	    Pointer to the end of header (if found) or null
+
+   5.3.4.   String unparsed;
+
+	    Here we stopped parsing
+
+   5.3.5.   String buf;
+
+	    Scratch pad, holds a modified message, via, etc. point into it.
+
+   5.3.6.   int len;
+
+	    Message len (orig)
+
+   5.3.7.   String new_uri;
+
+	    Changed first line uri, when you change this
+
+   5.3.8.   String dst_uri;
+
+	    Destination URI, must be forwarded to this URI if dst_url lenght != 0
+
+   5.3.9.   int parsed_uri_ok;
+
+	    1 if parsed_orig_uri is valid, 0 if not, set if to 0 if you modify the uri (e.g change new_uri)
+
+   5.3.10.  int parsed_orig_ruri_ok;
+
+	    1 if parsed_orig_uri is valid, 0 if not, set if to 0 if you modify the uri (e.g change new_uri)
+
+   5.3.11.  String add_to_branch_s;
+
+	    Whatever whoever want to append to branch comes here
+
+   5.3.12.  int add_to_branch_len;
+
+	    Lenght of add_to_branch_s
+
+   5.3.13.  int hash_index;
+
+	    Index to TM hash table; stored in core to avoid unnecessary calculations
+
+   5.3.14.  int msg_flags;
+
+	    Flags used by core. Allows to set various flags on the message; may be used 
+	    for simple inter-module communication or remembering processing state reache.
+
+   5.3.15.  static native SipMsg ParseSipMsg();
+
+	    This method is using to get an instance of class SipMsg and populate a properties
+	    of this class with a fields specified at 5.3.1 - 5.3.14.
+
+   5.3.16.  static native String getMsgType();
+
+	    Gets a message type. Return value:
+		'SIP_REQUEST' - if message is request
+		'SIP_REPLY'   - if message is reply
+		'SIP_INVALID' - if invalid message
+
+   5.3.17.  static native String getRURI();
+
+	    Gets a request URI (RURI).
+
+   5.3.18.  static native IPPair getSrcAddress();
+
+	    Gets a source IP address and port.
+
+   5.3.19.  static native IPPair getDstAddress();
+
+	    Gets a destination IP address and port.
+
+   5.3.20.  static native String getBuffer();
+
+	    Gets a message buffer.
+
+
+5.4. interface NativeInterface
+
+   5.4.1.   abstract class Ranks
+
+	5.4.1.1.  static final int PROC_MAIN
+
+		  Main ser process
+
+        5.4.1.2.  static final int PROC_TIMER
+
+		  Timer attendant process
+
+        5.4.1.3.  static final int PROC_RPC
+
+		  RPC type process
+
+        5.4.1.4.  static final int PROC_FIFO
+
+		  FIFO attendant process.
+		  Alias to PROC_RPC.
+
+        5.4.1.5.  static final int PROC_TCP_MAIN
+
+		  TCP main process
+
+        5.4.1.6.  static final int PROC_UNIXSOCK
+
+		  Unix socket server
+
+        5.4.1.7.  static final int PROC_ATTENDANT
+
+		  Main "attendant process
+
+        5.4.1.8.  static final int PROC_INIT
+
+		  Special rank, the context is the main ser process, but this is
+		  guaranteed to be executed before any rocess is forked, so it
+		  can be used to setup shared variables that depend on some
+		  after mod_init available information (e.g. total number of processes).
+		  @warning child_init(PROC_MAIN) is again called in the same process (main)
+		  (before tcp), so make sure you don't init things twice, 
+		  both in PROC_MAIN and PROC_INT
+
+        5.4.1.9.  static final int PROC_NOCHLDINIT
+
+		  no child init functions will be called if this rank is used in fork_process()
+
+        5.4.1.10. static final int PROC_SIPINIT
+
+		  First SIP worker - some modules do special processing in this child, 
+		  like loading db data
+
+        5.4.1.11. static final int PROC_SIPRPC
+
+		  Used to init RPC worker as SIP commands handler.
+		  Don't do any special processing in the child init with this rank - 
+		  just bare child initialization
+
+        5.4.1.12. static final int PROC_MIN
+
+		  Minimum process rank.
+		  Alias to PROC_NOCHLDINIT.
+
+   5.4.2.   abstract class LogParams
+	5.4.2.0.  Loggigng params
+        5.4.2.1.  static final int L_ALERT
+        5.4.2.2.  static final int L_BUG
+        5.4.2.3.  static final int L_CRIT2
+        5.4.2.4.  static final int L_CRIT
+        5.4.2.5.  static final int L_ERR
+        5.4.2.6.  static final int L_WARN
+        5.4.2.7.  static final int L_NOTICE
+        5.4.2.8.  static final int L_INFO
+        5.4.2.9.  static final int L_DBG
+        5.4.2.10. static final int DEFAULT_FACILITY
+
+
+5.5. Examples of usage Java API
+
+...
+
+import java.lang.*;
+import java.io.*; 
+
+import org.siprouter.*;
+import org.siprouter.NativeInterface.*;
+
+public class Kamailio extends NativeMethods
+{
+	static
+	{
+	    System.load("/opt/kamailio/lib/kamailio/modules/app_java.so");
+	}
+
+	/* Constructor. Do not remove !!! */
+	public Kamailio()
+	{
+	}
+
+
+	public int child_init(int rank)
+	{
+	    switch (rank)
+	    {
+		case Ranks.PROC_MAIN:
+		    LM_INFO("We're at PROC_MAIN\n");
+		    break;
+		case Ranks.PROC_TIMER:
+		    LM_INFO("We're at PROC_TIMER\n");
+		    break;
+		case Ranks.PROC_RPC:
+		    LM_INFO("We're at PROC_RPC/PROC_FIFO\n");
+		    break;
+		case Ranks.PROC_TCP_MAIN:
+		    LM_INFO("We're at PROC_TCP_MAIN\n");
+		    break;
+		case Ranks.PROC_UNIXSOCK:
+		    LM_INFO("We're at PROC_UNIXSOCK\n");
+		    break;
+		case Ranks.PROC_ATTENDANT:
+		    LM_INFO("We're at PROC_ATTENDANT\n");
+		    break;
+		case Ranks.PROC_INIT:
+		    LM_INFO("We're at PROC_INIT\n");
+		    break;
+		case Ranks.PROC_NOCHLDINIT:
+		    LM_INFO("We're at PROC_NOCHLDINIT/PROC_MIN\n");
+		    break;
+		case Ranks.PROC_SIPINIT:
+		    LM_INFO("We're at PROC_SIPINIT\n");
+		    break;
+		case Ranks.PROC_SIPRPC:
+		    LM_INFO("We're at PROC_SIPRPC\n");
+		    break;
+	    }
+
+	    return 1;
+	}
+
+	public int TestMethod()
+	{
+
+	    LM_INFO(String.format("Msg Type: %s\n", SipMsg.getMsgType()));
+
+	    IPPair src = SipMsg.getSrcAddress();
+	    if (src != null)
+	    {
+		LM_INFO(String.format("src address=%s, src port=%d\n", src.ip, src.port));
+	    }
+	    else
+	    {
+		LM_ERR("IPPair src is null!");
+	    }
+
+	    IPPair dst = SipMsg.getDstAddress();
+	    if (dst != null)
+	    {
+		LM_INFO(String.format("dst address=%s, dst port=%d\n", dst.ip, dst.port));
+	    }
+	    else
+	    {
+		LM_ERR("IPPair dst is null!");
+	    }
+
+	    LM_INFO(String.format("buffer:\n%s\n", SipMsg.getBuffer().trim()));
+
+	    SipMsg msg = SipMsg.ParseSipMsg();
+	    if (msg != null)
+	    {
+		LM_INFO("msg:\n");
+		LM_INFO(String.format("\tid=%d\n", msg.id));
+		LM_INFO(String.format("\tpid=%d\n", msg.pid));
+		LM_INFO(String.format("\teoh='%s'\n", msg.eoh));
+		LM_INFO(String.format("\tunparsed='%s'\n", msg.unparsed));
+		LM_INFO(String.format("\tbuf='%s'\n", msg.buf));
+		LM_INFO(String.format("\tlen=%d\n", msg.len));
+		LM_INFO(String.format("\tnew_uri='%s'\n", msg.new_uri));
+		LM_INFO(String.format("\tdst_uri='%s'\n", msg.dst_uri));
+		LM_INFO(String.format("\tparsed_uri_ok=%d\n", msg.parsed_uri_ok));
+		LM_INFO(String.format("\tparsed_orig_ruri_ok=%d\n", msg.parsed_orig_ruri_ok));
+		LM_INFO(String.format("\tadd_to_branch_s='%s'\n", msg.add_to_branch_s));
+		LM_INFO(String.format("\tadd_to_branch_len=%d\n", msg.add_to_branch_len));
+		LM_INFO(String.format("\thash_index=%d\n", msg.hash_index));
+		LM_INFO(String.format("\tmsg_flags=%d\n", msg.msg_flags));
+		LM_INFO(String.format("\tset_global_address='%s'\n", msg.set_global_address));
+		LM_INFO(String.format("\tset_global_port='%s'\n", msg.set_global_port));
+	    }
+	    else
+	    {
+		LM_ERR("SipMsg msg is null!\n");
+	    }
+
+	    return 1;
+	}
+}
+
+...
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

+ 573 - 0
modules/app_java/doc/app_java.txt

@@ -0,0 +1,573 @@
+app_java Module
+
+Konstantin Mosesov
+
+Edited by
+
+Konstantin Mosesov
+
+   Copyright © 2013 Konstantin Mosesov
+     __________________________________________________________________
+
+   Table of Contents
+
+   1. Admin Guide
+
+        1. Overview
+        2. Dependencies
+
+              2.1. Kamailio Modules
+              2.2. External Libraries or Applications
+
+        3. Java runtime
+
+              3.1.
+
+        4. Parameters
+
+              4.1. class_name (string)
+              4.2. child_init_method (string)
+              4.3. java_options (string)
+              4.4. force_kam_cmd_exec (int)
+
+        5. Functions
+
+              5.1. Common requirements
+              5.2. java_method_exec(method, method_signature, [param1[,
+                      param2[, ...]]])
+
+              5.3. java_staticmethod_exec(method, method_signature,
+                      [param1[, param2[, ...]]])
+
+              5.4. java_s_method_exec(method, method_signature, [param1[,
+                      param2[, ...]]])
+
+              5.5. java_s_staticmethod_exec(method, method_signature,
+                      [param1[, param2[, ...]]])
+
+        6. Java Module API
+
+              6.1. Minimal program skeleton
+
+   List of Examples
+
+   1.1. Set class_name parameter
+   1.2. Set child_init_method parameter
+   1.3. Set java_options parameter
+   1.4. Set java_options parameter (live configuration)
+   1.5. Set java_options parameter (verbose configuration)
+   1.6. Set java_options parameter (debug configuration)
+   1.7. Set force_kam_cmd_exec parameter
+   1.8. Signature: "V"
+   1.9. Signature: "Ljava/lang/String;I"
+   1.10. Signature: "ZB"
+   1.11. Signature: "V"
+   1.12. Signature: "Ljava/lang/String;I"
+   1.13. Signature: "ZB"
+   1.14. Signature: "V"
+   1.15. Signature: "Ljava/lang/String;I"
+   1.16. Signature: "ZB"
+   1.17. Signature: "V"
+   1.18. Signature: "Ljava/lang/String;I"
+   1.19. Signature: "ZB"
+   1.20. Minimal program skeleton
+
+Chapter 1. Admin Guide
+
+   Table of Contents
+
+   1. Overview
+   2. Dependencies
+
+        2.1. Kamailio Modules
+        2.2. External Libraries or Applications
+
+   3. Java runtime
+
+        3.1.
+
+   4. Parameters
+
+        4.1. class_name (string)
+        4.2. child_init_method (string)
+        4.3. java_options (string)
+        4.4. force_kam_cmd_exec (int)
+
+   5. Functions
+
+        5.1. Common requirements
+        5.2. java_method_exec(method, method_signature, [param1[, param2[,
+                ...]]])
+
+        5.3. java_staticmethod_exec(method, method_signature, [param1[,
+                param2[, ...]]])
+
+        5.4. java_s_method_exec(method, method_signature, [param1[,
+                param2[, ...]]])
+
+        5.5. java_s_staticmethod_exec(method, method_signature, [param1[,
+                param2[, ...]]])
+
+   6. Java Module API
+
+        6.1. Minimal program skeleton
+
+1. Overview
+
+   This module allows executing Java compiled classes from config file,
+   exporting functions to access the SIP message from Java using Java
+   Native Interface (JNI).
+
+2. Dependencies
+
+   2.1. Kamailio Modules
+   2.2. External Libraries or Applications
+
+2.1. Kamailio Modules
+
+   The following modules must be loaded before this module:
+     * none.
+
+2.2. External Libraries or Applications
+
+   The following packages are runtime libraries, required to launch
+     * java-common Base of all Java packages.
+     * default-jre Standard Java or Java compatible Runtime.
+     * gcj-jre Java runtime environment using GIJ/classpath.
+     * libgcj12 (>=12) Java runtime library for use with gcj.
+
+   The following packages are optional, required for development
+     * ant Java based build tool like make.
+     * ant-contrib Collection of tasks, types and other tools for Apache
+       Ant.
+     * ant-gcj Java based build tool like make (GCJ).
+     * default-jdk Standard Java or Java compatible Development Kit
+     * gcj-jdk gcj and classpath development tools for Java(TM)
+     * libgcj13-dev (>=12) Java development headers for use with gcj
+     * jdk JDK Development Kit (either oracle jdk or openjdk)
+
+   The following libraries or applications must be compiled before running
+   Kamailio with this module loaded:
+
+   The following packages are runtime libraries, required to launch
+     * <class_name>.class
+     * kamailio.jar
+
+3. Java runtime
+
+   3.1.
+
+3.1.
+
+   Java runtime library (JRE or JDK) is required to use this module.
+
+4. Parameters
+
+   4.1. class_name (string)
+   4.2. child_init_method (string)
+   4.3. java_options (string)
+   4.4. force_kam_cmd_exec (int)
+
+4.1. class_name (string)
+
+   The class name should have the same compiled file name. If the value is
+   "Kamailio", then the compiled file should be named as "Kamailio.class".
+
+   Default value is “Kamailio”.
+
+   Example 1.1. Set class_name parameter
+...
+modparam("app_java", "class_name", "Kamailio")
+...
+
+4.2. child_init_method (string)
+
+   TBD.
+
+   Default value is “child_init”.
+
+   Example 1.2. Set child_init_method parameter
+...
+modparam("app_java", "child_init_method", "my_mod_init")
+...
+
+4.3. java_options (string)
+
+   Java options for Java Virtual Machine. For more info read java docs
+
+   Default value is “-Djava.compiler=NONE”.
+
+   Example 1.3. Set java_options parameter
+...
+modparam("app_java", "java_options", "-Djava.compiler=NONE")
+...
+
+   Example 1.4. Set java_options parameter (live configuration)
+...
+# Assumes "application java folder" is located at /opt/kamailio/java
+modparam("app_java", "java_options", "-Djava.compiler=NONE -Djava.class.path=/pa
+th/to/kamailio/modules:/opt/kamailio/java:/opt/kamailio/java/kamailio.jar")
+...
+
+   Example 1.5. Set java_options parameter (verbose configuration)
+...
+# Assumes "application java folder" is located at /opt/kamailio/java
+modparam("app_java", "java_options", "-verbose:gc,class,jni -Djava.compiler=NONE
+ -Djava.class.path=/path/to/kamailio/modules:/opt/kamailio/java:/opt/kamailio/ja
+va/kamailio.jar")
+...
+
+   Example 1.6. Set java_options parameter (debug configuration)
+...
+# Assumes "application java folder" is located at /opt/kamailio/java
+modparam("app_java", "java_options", "-Xdebug -verbose:gc,class,jni -Djava.compi
+ler=NONE -Djava.class.path=/path/to/kamailio/modules:/opt/kamailio/java:/opt/kam
+ailio/java/kamailio.jar")
+...
+
+4.4. force_kam_cmd_exec (int)
+
+   This parameter forces execution a kamailio comnmand with java native
+   method “KamExec”. # Note: this is an untested yet feature, may cause
+   (but may not) a memory leaks if used from embedded languages.
+
+   Default value is “0 (off)”.
+
+   Example 1.7. Set force_kam_cmd_exec parameter
+...
+modparam("app_java", "force_kam_cmd_exec", 1)
+...
+
+5. Functions
+
+   5.1. Common requirements
+   5.2. java_method_exec(method, method_signature, [param1[, param2[,
+          ...]]])
+
+   5.3. java_staticmethod_exec(method, method_signature, [param1[,
+          param2[, ...]]])
+
+   5.4. java_s_method_exec(method, method_signature, [param1[, param2[,
+          ...]]])
+
+   5.5. java_s_staticmethod_exec(method, method_signature, [param1[,
+          param2[, ...]]])
+
+5.1.  Common requirements
+
+   Each function has a required parameter “method_signature”. For more
+   info see Determine the signature of a method. Signature represents the
+   variable type. The mapping between the Java type and C type is
+                Type     Chararacter
+                boolean      Z
+                byte         B
+                char         C
+                double       D
+                float        F
+                int          I
+                long         J
+                object       L
+                short        S
+                void         V
+                Note that to specify an object, the "L" is followed by the objec
+t's class name and ends with a semi-colon, ';' .
+
+   app_java supports the following signatures:
+                Primitives: Z,B,C,D,F,I,J,L,S,V
+                Objects:
+                        Ljava/lang/Boolean;
+                        Ljava/lang/Byte;
+                        Ljava/lang/Character;
+                        Ljava/lang/Double;
+                        Ljava/lang/Float;
+                        Ljava/lang/Integer;
+                        Ljava/lang/Long;
+                        Ljava/lang/Short;
+                        Ljava/lang/String;
+                        NULL parameter: V
+
+        Each parameter passed to function will be cast according to given signat
+ure.
+
+        Parameters are optional, ommitting a parameter meant the passed value is
+ NULL.
+        Parameters count should be exactly the same as signature count.
+        Note 1: Arrays representation (symbol '[') is not supported yet.
+        Note 2: You shall use a correct signature, e.g. the following examples o
+f combinations are invalid:
+        java_method_exec("ExampleMethod", "ZI", "False");
+        java_method_exec("ExampleMethod", "LI", "something", "5");
+
+5.2. java_method_exec(method, method_signature, [param1[, param2[, ...]]])
+
+   Executes a java class method method. Parameter method_signature is
+   required.
+     * Example 1.8. Signature: "V"
+       Kamailio prototype
+java_method_exec("ExampleMethod", "V");
+       Java prototype
+public int ExampleMethod();
+       Example of usage:
+# Kamailio
+java_method_exec("ExampleMethod", "V");
+
+# Java
+public int ExampleMethod()
+{
+                ... do something;
+                return 1;
+}
+     * Example 1.9. Signature: "Ljava/lang/String;I"
+       Kamailio prototype
+java_method_exec("ExampleMethod", "Ljava/lang/String;I", "Hello world", "5");
+       Java prototype
+public int ExampleMethod(String param1, int param2);
+       In the above scenario parameter 2 ("5") will be cast to integer
+       representation.
+       Example of usage:
+# Kamailio
+java_method_exec("ExampleMethod", "Ljava/lang/String;I", "$mb", "$ml");
+
+# Java
+public int ExampleMethod(String SipMessageBuffer, int SipMessageLenght)
+{
+                ... do something with buffer;
+                return 1;
+}
+     * Example 1.10. Signature: "ZB"
+       Kamailio prototype
+java_method_exec("ExampleMethod", "ZB", "true", "0x05");
+       Java prototype
+public int ExampleMethod(boolean param1, byte param2);
+       In the above scenario parameter 1 ("true") will be cast to boolean
+       representation.
+       Example of usage:
+# Kamailio
+java_method_exec("ExampleMethod", "ZB", "true", "0x05");
+
+# Java
+public int ExampleMethod(boolean flagSet, byte bFlag);
+{
+                if (flagSet)
+                {
+                        ... do something with flags;
+                }
+                return 1;
+}
+
+5.3. java_staticmethod_exec(method, method_signature, [param1[, param2[,
+...]]])
+
+   Executes a java static method method. Parameter method_signature is
+   required.
+     * Example 1.11. Signature: "V"
+       Kamailio prototype
+java_staticmethod_exec("ExampleMethod", "V");
+       Java prototype
+public static int ExampleMethod();
+       Example of usage:
+# Kamailio
+java_staticmethod_exec("ExampleMethod", "V");
+
+# Java
+public static int ExampleMethod()
+{
+                ... do something;
+                return 1;
+}
+     * Example 1.12. Signature: "Ljava/lang/String;I"
+       Kamailio prototype
+java_staticmethod_exec("ExampleMethod", "Ljava/lang/String;I", "Hello world", "5
+");
+       Java prototype
+public static int ExampleMethod(String param1, int param2);
+       In the above scenario parameter 2 ("5") will be cast to integer
+       representation.
+       Example of usage:
+# Kamailio
+java_staticmethod_exec("ExampleMethod", "Ljava/lang/String;I", "$mb", "$ml");
+
+# Java
+public static int ExampleMethod(String SipMessageBuffer, int SipMessageLenght)
+{
+                ... do something with buffer;
+                return 1;
+}
+     * Example 1.13. Signature: "ZB"
+       Kamailio prototype
+java_staticmethod_exec("ExampleMethod", "ZB", "true", "0x05");
+       Java prototype
+public static int ExampleMethod(boolean param1, byte param2);
+       In the above scenario parameter 1 ("true") will be cast to boolean
+       representation.
+       Example of usage:
+# Kamailio
+java_staticmethod_exec("ExampleMethod", "ZB", "true", "0x05");
+
+# Java
+public static int ExampleMethod(boolean flagSet, byte bFlag);
+{
+                if (flagSet)
+                {
+                        ... do something with flags;
+                }
+                return 1;
+}
+
+5.4. java_s_method_exec(method, method_signature, [param1[, param2[, ...]]])
+
+   Executes a java class synchronized method method. Parameter
+   method_signature is required.
+
+   For more info see Synchronized Methods
+     * Example 1.14. Signature: "V"
+       Kamailio prototype
+java_s_method_exec("ExampleMethod", "V");
+       Java prototype
+public synchronized int ExampleMethod();
+       Example of usage:
+# Kamailio
+java_s_method_exec("ExampleMethod", "V");
+
+# Java
+public synchronized int ExampleMethod()
+{
+                ... do something;
+                return 1;
+}
+     * Example 1.15. Signature: "Ljava/lang/String;I"
+       Kamailio prototype
+java_s_method_exec("ExampleMethod", "Ljava/lang/String;I", "Hello world", "5");
+       Java prototype
+public synchronized int ExampleMethod(String param1, int param2);
+       In the above scenario parameter 2 ("5") will be cast to integer
+       representation.
+       Example of usage:
+# Kamailio
+java_s_method_exec("ExampleMethod", "Ljava/lang/String;I", "$mb", "$ml");
+
+# Java
+public synchronized int ExampleMethod(String SipMessageBuffer, int SipMessageLen
+ght)
+{
+                ... do something with buffer;
+                return 1;
+}
+     * Example 1.16. Signature: "ZB"
+       Kamailio prototype
+java_s_method_exec("ExampleMethod", "ZB", "true", "0x05");
+       Java prototype
+public synchronized int ExampleMethod(boolean param1, byte param2);
+       In the above scenario parameter 1 ("true") will be cast to boolean
+       representation.
+       Example of usage:
+# Kamailio
+java_s_method_exec("ExampleMethod", "ZB", "true", "0x05");
+
+# Java
+public synchronized int ExampleMethod(boolean flagSet, byte bFlag);
+{
+                if (flagSet)
+                {
+                        ... do something with flags;
+                }
+                return 1;
+}
+
+5.5. java_s_staticmethod_exec(method, method_signature, [param1[, param2[,
+...]]])
+
+   Executes a java synchronized static method method. Parameter
+   method_signature is required.
+
+   For more info see Synchronized Methods
+     * Example 1.17. Signature: "V"
+       Kamailio prototype
+java_s_staticmethod_exec("ExampleMethod", "V");
+       Java prototype
+public static synchronized int ExampleMethod();
+       Example of usage:
+# Kamailio
+java_s_staticmethod_exec("ExampleMethod", "V");
+
+# Java
+public static synchronized int ExampleMethod()
+{
+                ... do something;
+                return 1;
+}
+     * Example 1.18. Signature: "Ljava/lang/String;I"
+       Kamailio prototype
+java_s_staticmethod_exec("ExampleMethod", "Ljava/lang/String;I", "Hello world",
+"5");
+       Java prototype
+public static synchronized int ExampleMethod(String param1, int param2);
+       In the above scenario parameter 2 ("5") will be cast to integer
+       representation.
+       Example of usage:
+# Kamailio
+java_s_staticmethod_exec("ExampleMethod", "Ljava/lang/String;I", "$mb", "$ml");
+
+# Java
+public static synchronized int ExampleMethod(String SipMessageBuffer, int SipMes
+sageLenght)
+{
+                ... do something with buffer;
+                return 1;
+}
+     * Example 1.19. Signature: "ZB"
+       Kamailio prototype
+java_s_staticmethod_exec("ExampleMethod", "ZB", "true", "0x05");
+       Java prototype
+public static synchronized int ExampleMethod(boolean param1, byte param2);
+       In the above scenario parameter 1 ("true") will be cast to boolean
+       representation.
+       Example of usage:
+# Kamailio
+java_s_staticmethod_exec("ExampleMethod", "ZB", "true", "0x05");
+
+# Java
+public static synchronized int ExampleMethod(boolean flagSet, byte bFlag);
+{
+                if (flagSet)
+                {
+                        ... do something with flags;
+                }
+                return 1;
+}
+
+6. Java Module API
+
+   6.1. Minimal program skeleton
+
+6.1. Minimal program skeleton
+
+   Example 1.20. Minimal program skeleton
+
+import org.siprouter.*;
+import org.siprouter.NativeInterface.*;
+
+public class Kamailio extends NativeMethods
+{
+                /* Here you should specify a full path to app_java.so */
+                static
+                {
+                                System.load("/opt/kamailio/lib/kamailio/modules/
+app_java.so");
+                }
+
+                /* Constructor. Do not remove !!! */
+                public Kamailio()
+                {
+                }
+
+                /*
+                This method should be executed for each children process, immedi
+ately after forking.
+                Required. Do not remove !!!
+                */
+                public int child_init(int rank)
+                {
+                                return 1;
+                }
+}

+ 35 - 0
modules/app_java/doc/app_java.xml

@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding='utf-8'?>
+
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+	"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+
+<!-- Include general documentation entities -->
+<!ENTITY % docentities SYSTEM "../../../docbook/entities.xml">
+%docentities;
+
+]>
+
+<book xmlns:xi="http://www.w3.org/2001/XInclude">
+    <bookinfo>
+	<title>app_java Module</title>
+	<productname class="trade">&kamailioname;</productname>
+	<authorgroup>
+	    <author>
+			<firstname>Konstantin</firstname>
+			<surname>Mosesov</surname>
+	    </author>
+	    <editor>
+	    	<firstname>Konstantin</firstname>
+	    	<surname>Mosesov</surname>
+	    </editor>
+	</authorgroup>
+	<copyright>
+	    <year>2013</year>
+		<holder>Konstantin Mosesov</holder>
+	</copyright>
+    </bookinfo>
+    <toc></toc>
+    
+	<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="app_java_admin.xml"/>
+    
+</book>

+ 648 - 0
modules/app_java/doc/app_java_admin.xml

@@ -0,0 +1,648 @@
+<?xml version="1.0" encoding='utf-8'?>
+
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" 
+	"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+
+<!-- Include general documentation entities -->
+<!ENTITY % docentities SYSTEM "../../../docbook/entities.xml">
+%docentities;
+
+]>
+
+<!-- Module User's Guide -->
+
+<chapter>
+    
+    <title>&adminguide;</title>
+    
+    <!-- Section Overview -->
+    <section>
+		<title>Overview</title>
+		<para>
+			This module allows executing Java compiled classes from config file, exporting
+			functions to access the SIP message from Java using Java Native Interface (JNI).
+		</para>
+    </section>
+	<!-- end op section Overview -->
+	
+	<!-- Section Dependencies -->
+    <section>
+		<title>Dependencies</title>
+    	<!-- Section Modules -->
+		<section>
+		    <title>&kamailio; Modules</title>
+		    <para>
+			The following modules must be loaded before this module:
+		    	<itemizedlist>
+			    <listitem>
+				<para>
+				    <emphasis>none</emphasis>.
+				</para>
+			    </listitem>
+		    	</itemizedlist>
+		    </para>
+		</section>
+    	<!-- End of section Modules -->
+    	
+    	<!-- Section External Libraries or Applications -->
+		<section>
+		    <title>External Libraries or Applications</title>
+		    <para>
+<!--
+			The following libraries or applications must be installed before running
+			&kamailio; with this module loaded:
+-->			
+		    	<itemizedlist>
+		    		<para><emphasis>The following packages are runtime libraries, required to launch</emphasis></para>
+		    		<listitem override="disc"><para><emphasis>java-common</emphasis> Base of all Java packages.</para></listitem>
+		    		<listitem override="disc"><para><emphasis>default-jre</emphasis> Standard Java or Java compatible Runtime.</para></listitem>
+		    		<listitem override="disc"><para><emphasis>gcj-jre</emphasis> Java runtime environment using GIJ/classpath.</para></listitem>
+		    		<listitem override="disc"><para><emphasis>libgcj12 (>=12)</emphasis> Java runtime library for use with gcj.</para></listitem>
+		    	</itemizedlist>
+		    	<itemizedlist>
+		    		<para><emphasis>The following packages are optional, required for development</emphasis></para>
+		    		<listitem override="box"><para><emphasis>ant</emphasis> Java based build tool like make.</para></listitem>
+		    		<listitem override="box"><para><emphasis>ant-contrib</emphasis> Collection of tasks, types and other tools for Apache Ant.</para></listitem>
+		    		<listitem override="box"><para><emphasis>ant-gcj</emphasis> Java based build tool like make (GCJ).</para></listitem>
+		    		<listitem override="box"><para><emphasis>default-jdk</emphasis> Standard Java or Java compatible Development Kit</para></listitem>
+		    		<listitem override="box"><para><emphasis>gcj-jdk</emphasis> gcj and classpath development tools for Java(TM)</para></listitem>
+		    		<listitem override="box"><para><emphasis>libgcj13-dev (>=12)</emphasis> Java development headers for use with gcj</para></listitem>
+		    		<listitem override="box"><para><emphasis>jdk</emphasis> JDK Development Kit (either oracle jdk or openjdk)</para></listitem>
+		    	</itemizedlist>
+		    </para>
+			<para>
+				The following libraries or applications must be compiled before
+				running &kamailio; with this module loaded:
+				<itemizedlist>
+					<para><emphasis>The following packages are runtime libraries, required to launch</emphasis></para>
+					<listitem override="circle"><para><emphasis>&lt;class_name&gt;</emphasis>.class</para></listitem>
+					<listitem override="circle"><para><emphasis>&kamailiobinary;</emphasis>.jar</para></listitem>
+				</itemizedlist>
+			</para>
+		</section>
+    	<!-- end of section External Libraries or Applications -->
+    </section>
+	<!-- end of section Dependencies -->
+	
+	<!-- Section Java Runtime -->
+	<section>
+		<title>Java runtime</title>
+		<section>
+			<title/>
+			<para>Java runtime library (JRE or JDK) is required to use this module.</para>
+		</section>
+	</section>
+	<!-- end of section Java Runtime -->
+	
+	<!-- Section Parameters -->
+	<section>
+		<title>Parameters</title>
+
+		<!-- class_name -->
+		<section>
+			<title><varname>class_name</varname> (string)</title>
+		    <para>
+		    	The class name should have the same compiled file name.
+		    	If the value is <emphasis>"&kamailio;"</emphasis>, then the compiled file should be named as <emphasis>"&kamailio;.class"</emphasis>.
+		    </para>
+		    <para>
+				<emphasis>
+					Default value is <quote>&kamailio;</quote>.
+				</emphasis>
+		    </para>
+		    <example>
+		    	<title>Set <varname>class_name</varname> parameter</title>
+				<programlisting format="linespecific">
+...
+modparam("app_java", "class_name", "&kamailio;")
+...
+</programlisting>
+		    </example>
+		</section>
+
+		<!-- child_init_method -->
+		<section>
+			<title><varname>child_init_method</varname> (string)</title>
+			<para>
+				TBD.
+			</para>
+			<para>
+				<emphasis>
+					Default value is <quote>child_init</quote>.
+				</emphasis>
+			</para>
+			<example>
+				<title>Set <varname>child_init_method</varname> parameter</title>
+				<programlisting format="linespecific">
+...
+modparam("app_java", "child_init_method", "my_mod_init")
+...
+</programlisting>
+			</example>
+		</section>
+
+		<!-- java_options -->
+		<section>
+			<title><varname>java_options</varname> (string)</title>
+			<para>
+				Java options for Java Virtual Machine.
+				For more info read <ulink url="http://docs.oracle.com/javase/6/docs/technotes/tools/windows/java.html"><citetitle>java docs</citetitle></ulink>
+			</para>
+			<para>
+				<emphasis>
+					Default value is <quote>-Djava.compiler=NONE</quote>.
+				</emphasis>
+			</para>
+			<example>
+				<title>Set <varname>java_options</varname> parameter</title>
+				<programlisting format="linespecific">
+...
+modparam("app_java", "java_options", "-Djava.compiler=NONE")
+...
+</programlisting>
+			</example>
+			<example>
+				<title>Set <varname>java_options</varname> parameter (live configuration)</title>
+				<programlisting format="linespecific">
+...
+# Assumes "application java folder" is located at /opt/kamailio/java
+modparam("app_java", "java_options", "-Djava.compiler=NONE -Djava.class.path=/path/to/kamailio/modules:/opt/kamailio/java:/opt/kamailio/java/kamailio.jar")
+...
+</programlisting>
+			</example>
+			<example>
+				<title>Set <varname>java_options</varname> parameter (verbose configuration)</title>
+				<programlisting format="linespecific">
+...
+# Assumes "application java folder" is located at /opt/kamailio/java
+modparam("app_java", "java_options", "-verbose:gc,class,jni -Djava.compiler=NONE -Djava.class.path=/path/to/kamailio/modules:/opt/kamailio/java:/opt/kamailio/java/kamailio.jar")
+...
+</programlisting>
+			</example>
+			<example>
+				<title>Set <varname>java_options</varname> parameter (debug configuration)</title>
+				<programlisting format="linespecific">
+...
+# Assumes "application java folder" is located at /opt/kamailio/java
+modparam("app_java", "java_options", "-Xdebug -verbose:gc,class,jni -Djava.compiler=NONE -Djava.class.path=/path/to/kamailio/modules:/opt/kamailio/java:/opt/kamailio/java/kamailio.jar")
+...
+</programlisting>
+			</example>
+		</section>
+
+		<!-- force_kam_cmd_exec -->
+		<section>
+			<title><varname>force_kam_cmd_exec</varname> (int)</title>
+			<para>
+				This parameter forces execution a &kamailiobinary; comnmand with java native method <quote>KamExec</quote>.
+				# Note: this is an untested yet feature, may cause (but may not) a memory leaks if used from embedded languages.
+			</para>
+			<para>
+				<emphasis>
+					Default value is <quote>0 (off)</quote>.
+				</emphasis>
+			</para>
+			<example>
+				<title>Set <varname>force_kam_cmd_exec</varname> parameter</title>
+				<programlisting format="linespecific">
+...
+modparam("app_java", "force_kam_cmd_exec", 1)
+...
+</programlisting>
+			</example>
+		</section>
+	</section>
+	<!-- End of section Parameters -->
+	
+	<!-- Section Functions -->
+    <section>
+		<title>Functions</title>
+    	
+    	<!-- Section Common requirements -->
+    	<section>
+    		<title>
+    			Common requirements
+    		</title>
+    		<para>Each function has a required parameter <quote>method_signature</quote>. For more info
+				see <ulink url="http://www.rgagnon.com/javadetails/java-0286.html"
+						><citetitle>Determine the signature of a method</citetitle></ulink>.
+				Signature represents the variable type. The mapping between the Java type and C type
+				is
+				<programlisting format="linespecific">
+		Type     Chararacter 
+		boolean      Z 
+		byte         B 
+		char         C 
+		double       D 
+		float        F 
+		int          I 
+		long         J 
+		object       L 
+		short        S 
+		void         V 
+		Note that to specify an object, the "L" is followed by the object's class name and ends with a semi-colon, ';' .
+    			</programlisting>
+			</para>
+    		<para> app_java supports the following signatures:
+				<programlisting format="linespecific">
+		Primitives: Z,B,C,D,F,I,J,L,S,V
+		Objects: 
+			Ljava/lang/Boolean;
+			Ljava/lang/Byte;
+			Ljava/lang/Character;
+			Ljava/lang/Double;
+			Ljava/lang/Float;
+			Ljava/lang/Integer;
+			Ljava/lang/Long;
+			Ljava/lang/Short;
+			Ljava/lang/String;
+			NULL parameter: V
+
+	Each parameter passed to function will be cast according to given signature.
+	
+	Parameters are optional, ommitting a parameter meant the passed value is NULL.
+	Parameters count should be exactly the same as signature count.
+	Note 1: Arrays representation (symbol '[') is not supported yet.
+	Note 2: You shall use a correct signature, e.g. the following examples of combinations are invalid:    
+    	java_method_exec("ExampleMethod", "ZI", "False");
+        java_method_exec("ExampleMethod", "LI", "something", "5");
+</programlisting>
+			</para>
+
+ 
+    	</section>
+    	<!-- End of section Common Requirements -->
+  
+    	<!-- Section java_method_exec -->
+    	<section>
+    		<title>java_method_exec(method, method_signature, [param1[, param2[, ...]]])</title>
+    		<para>Executes a java class method <emphasis>method</emphasis>. Parameter <emphasis>method_signature</emphasis> is required.</para>
+    		<itemizedlist>
+	    		<listitem>
+			    	<example>
+						<title>Signature: "V"</title>
+			    		<para>&kamailio; prototype</para>
+			    		<programlisting format="linespecific">java_method_exec("ExampleMethod", "V");</programlisting>
+			    		<para>Java prototype</para>
+			    		<programlisting format="linespecific">public int ExampleMethod();</programlisting>
+			    		<para>Example of usage:</para>
+			    		<programlisting format="linespecific">
+# &kamailio;
+java_method_exec("ExampleMethod", "V");
+
+# Java
+public int ExampleMethod()
+{
+		... do something;
+		return 1;
+}
+</programlisting>
+			    	</example>
+	    		</listitem>
+    			
+	    		<listitem>
+	    			<example>
+	    				<title>Signature: "Ljava/lang/String;I"</title>
+	    				<para>&kamailio; prototype</para>
+		    			<programlisting format="linespecific">java_method_exec("ExampleMethod", "Ljava/lang/String;I", "Hello world", "5");</programlisting>
+	    				<para>Java prototype</para>
+	    				<programlisting format="linespecific">public int ExampleMethod(String param1, int param2);</programlisting>
+	    				<para>In the above scenario parameter 2 ("5") will be cast to integer representation.</para>
+	    				<para>Example of usage:</para>
+	    				<programlisting format="linespecific">
+# &kamailio;
+java_method_exec("ExampleMethod", "Ljava/lang/String;I", "$mb", "$ml");
+
+# Java
+public int ExampleMethod(String SipMessageBuffer, int SipMessageLenght)
+{
+		... do something with buffer;
+		return 1;
+}
+</programlisting>
+	    			</example>
+	    		</listitem>
+
+    			<listitem>
+    				<example>
+    					<title>Signature: "ZB"</title>
+    					<para>&kamailio; prototype</para>
+    					<programlisting format="linespecific">java_method_exec("ExampleMethod", "ZB", "true", "0x05");</programlisting>
+    					<para>Java prototype</para>
+    					<programlisting format="linespecific">public int ExampleMethod(boolean param1, byte param2);</programlisting>
+    					<para>In the above scenario parameter 1 ("true") will be cast to boolean representation.</para>
+    					<para>Example of usage:</para>
+    					<programlisting format="linespecific">
+# &kamailio;
+java_method_exec("ExampleMethod", "ZB", "true", "0x05");
+
+# Java
+public int ExampleMethod(boolean flagSet, byte bFlag);
+{
+		if (flagSet)
+		{
+			... do something with flags;
+		}
+		return 1;
+}
+</programlisting>
+    				</example>
+    			</listitem>
+
+    		</itemizedlist>
+    	</section>
+    	<!-- end of section java_method_exec -->
+
+    	<!-- Section java_staticmethod_method_exec -->
+    	<section>
+    		<title>java_staticmethod_exec(method, method_signature, [param1[, param2[, ...]]])</title>
+    		<para>Executes a java static method <emphasis>method</emphasis>. Parameter <emphasis>method_signature</emphasis> is required.</para>
+    		<itemizedlist>
+    			<listitem>
+    				<example>
+    					<title>Signature: "V"</title>
+    					<para>&kamailio; prototype</para>
+    					<programlisting format="linespecific">java_staticmethod_exec("ExampleMethod", "V");</programlisting>
+    					<para>Java prototype</para>
+    					<programlisting format="linespecific">public static int ExampleMethod();</programlisting>
+    					<para>Example of usage:</para>
+    					<programlisting format="linespecific">
+# &kamailio;
+java_staticmethod_exec("ExampleMethod", "V");
+
+# Java
+public static int ExampleMethod()
+{
+		... do something;
+		return 1;
+}
+</programlisting>
+    				</example>
+    			</listitem>
+    			
+    			<listitem>
+    				<example>
+    					<title>Signature: "Ljava/lang/String;I"</title>
+    					<para>&kamailio; prototype</para>
+    					<programlisting format="linespecific">java_staticmethod_exec("ExampleMethod", "Ljava/lang/String;I", "Hello world", "5");</programlisting>
+    					<para>Java prototype</para>
+    					<programlisting format="linespecific">public static int ExampleMethod(String param1, int param2);</programlisting>
+    					<para>In the above scenario parameter 2 ("5") will be cast to integer representation.</para>
+    					<para>Example of usage:</para>
+    					<programlisting format="linespecific">
+# &kamailio;
+java_staticmethod_exec("ExampleMethod", "Ljava/lang/String;I", "$mb", "$ml");
+
+# Java
+public static int ExampleMethod(String SipMessageBuffer, int SipMessageLenght)
+{
+		... do something with buffer;
+		return 1;
+}
+</programlisting>
+    				</example>
+    			</listitem>
+    			
+    			<listitem>
+    				<example>
+    					<title>Signature: "ZB"</title>
+    					<para>&kamailio; prototype</para>
+    					<programlisting format="linespecific">java_staticmethod_exec("ExampleMethod", "ZB", "true", "0x05");</programlisting>
+    					<para>Java prototype</para>
+    					<programlisting format="linespecific">public static int ExampleMethod(boolean param1, byte param2);</programlisting>
+    					<para>In the above scenario parameter 1 ("true") will be cast to boolean representation.</para>
+    					<para>Example of usage:</para>
+    					<programlisting format="linespecific">
+# &kamailio;
+java_staticmethod_exec("ExampleMethod", "ZB", "true", "0x05");
+
+# Java
+public static int ExampleMethod(boolean flagSet, byte bFlag);
+{
+		if (flagSet)
+		{
+			... do something with flags;
+		}
+		return 1;
+}
+</programlisting>
+    				</example>
+    			</listitem>
+    			
+    		</itemizedlist>
+    	</section>
+    	<!-- end of section java_staticmethod_exec -->
+    	
+    	<!-- Section java_s_method_exec -->
+    	<section>
+    		<title>java_s_method_exec(method, method_signature, [param1[, param2[, ...]]])</title>
+    		<para>Executes a java class synchronized method <emphasis>method</emphasis>. Parameter <emphasis>method_signature</emphasis> is required.</para>
+    		<para>For more info see <ulink url="http://docs.oracle.com/javase/tutorial/essential/concurrency/syncmeth.html"><citetitle>Synchronized Methods</citetitle></ulink></para>
+    		<itemizedlist>
+    			<listitem>
+    				<example>
+    					<title>Signature: "V"</title>
+    					<para>&kamailio; prototype</para>
+    					<programlisting format="linespecific">java_s_method_exec("ExampleMethod", "V");</programlisting>
+    					<para>Java prototype</para>
+    					<programlisting format="linespecific">public synchronized int ExampleMethod();</programlisting>
+    					<para>Example of usage:</para>
+    					<programlisting format="linespecific">
+# &kamailio;
+java_s_method_exec("ExampleMethod", "V");
+
+# Java
+public synchronized int ExampleMethod()
+{
+		... do something;
+		return 1;
+}
+</programlisting>
+    				</example>
+    			</listitem>
+    			
+    			<listitem>
+    				<example>
+    					<title>Signature: "Ljava/lang/String;I"</title>
+    					<para>&kamailio; prototype</para>
+    					<programlisting format="linespecific">java_s_method_exec("ExampleMethod", "Ljava/lang/String;I", "Hello world", "5");</programlisting>
+    					<para>Java prototype</para>
+    					<programlisting format="linespecific">public synchronized int ExampleMethod(String param1, int param2);</programlisting>
+    					<para>In the above scenario parameter 2 ("5") will be cast to integer representation.</para>
+    					<para>Example of usage:</para>
+    					<programlisting format="linespecific">
+# &kamailio;
+java_s_method_exec("ExampleMethod", "Ljava/lang/String;I", "$mb", "$ml");
+
+# Java
+public synchronized int ExampleMethod(String SipMessageBuffer, int SipMessageLenght)
+{
+		... do something with buffer;
+		return 1;
+}
+</programlisting>
+    				</example>
+    			</listitem>
+    			
+    			<listitem>
+    				<example>
+    					<title>Signature: "ZB"</title>
+    					<para>&kamailio; prototype</para>
+    					<programlisting format="linespecific">java_s_method_exec("ExampleMethod", "ZB", "true", "0x05");</programlisting>
+    					<para>Java prototype</para>
+    					<programlisting format="linespecific">public synchronized int ExampleMethod(boolean param1, byte param2);</programlisting>
+    					<para>In the above scenario parameter 1 ("true") will be cast to boolean representation.</para>
+    					<para>Example of usage:</para>
+    					<programlisting format="linespecific">
+# &kamailio;
+java_s_method_exec("ExampleMethod", "ZB", "true", "0x05");
+
+# Java
+public synchronized int ExampleMethod(boolean flagSet, byte bFlag);
+{
+		if (flagSet)
+		{
+			... do something with flags;
+		}
+		return 1;
+}
+</programlisting>
+    				</example>
+    			</listitem>
+    			
+    		</itemizedlist>
+    	</section>
+    	<!-- end of section java_s_method_exec -->
+    	
+    	<!-- Section java_s_staticmethod_exec -->
+    	<section>
+    		<title>java_s_staticmethod_exec(method, method_signature, [param1[, param2[, ...]]])</title>
+    		<para>Executes a java synchronized static method <emphasis>method</emphasis>. Parameter <emphasis>method_signature</emphasis> is required.</para>
+    		<para>For more info see <ulink url="http://docs.oracle.com/javase/tutorial/essential/concurrency/syncmeth.html"><citetitle>Synchronized Methods</citetitle></ulink></para>
+    		<itemizedlist>
+    			<listitem>
+    				<example>
+    					<title>Signature: "V"</title>
+    					<para>&kamailio; prototype</para>
+    					<programlisting format="linespecific">java_s_staticmethod_exec("ExampleMethod", "V");</programlisting>
+    					<para>Java prototype</para>
+    					<programlisting format="linespecific">public static synchronized int ExampleMethod();</programlisting>
+    					<para>Example of usage:</para>
+    					<programlisting format="linespecific">
+# &kamailio;
+java_s_staticmethod_exec("ExampleMethod", "V");
+
+# Java
+public static synchronized int ExampleMethod()
+{
+		... do something;
+		return 1;
+}
+</programlisting>
+    				</example>
+    			</listitem>
+    			
+    			<listitem>
+    				<example>
+    					<title>Signature: "Ljava/lang/String;I"</title>
+    					<para>&kamailio; prototype</para>
+    					<programlisting format="linespecific">java_s_staticmethod_exec("ExampleMethod", "Ljava/lang/String;I", "Hello world", "5");</programlisting>
+    					<para>Java prototype</para>
+    					<programlisting format="linespecific">public static synchronized int ExampleMethod(String param1, int param2);</programlisting>
+    					<para>In the above scenario parameter 2 ("5") will be cast to integer representation.</para>
+    					<para>Example of usage:</para>
+    					<programlisting format="linespecific">
+# &kamailio;
+java_s_staticmethod_exec("ExampleMethod", "Ljava/lang/String;I", "$mb", "$ml");
+
+# Java
+public static synchronized int ExampleMethod(String SipMessageBuffer, int SipMessageLenght)
+{
+		... do something with buffer;
+		return 1;
+}
+</programlisting>
+    				</example>
+    			</listitem>
+    			
+    			<listitem>
+    				<example>
+    					<title>Signature: "ZB"</title>
+    					<para>&kamailio; prototype</para>
+    					<programlisting format="linespecific">java_s_staticmethod_exec("ExampleMethod", "ZB", "true", "0x05");</programlisting>
+    					<para>Java prototype</para>
+    					<programlisting format="linespecific">public static synchronized int ExampleMethod(boolean param1, byte param2);</programlisting>
+    					<para>In the above scenario parameter 1 ("true") will be cast to boolean representation.</para>
+    					<para>Example of usage:</para>
+    					<programlisting format="linespecific">
+# &kamailio;
+java_s_staticmethod_exec("ExampleMethod", "ZB", "true", "0x05");
+
+# Java
+public static synchronized int ExampleMethod(boolean flagSet, byte bFlag);
+{
+		if (flagSet)
+		{
+			... do something with flags;
+		}
+		return 1;
+}
+</programlisting>
+    				</example>
+    			</listitem>
+    			
+    		</itemizedlist>
+    	</section>
+    	<!-- end of section java_s_method_exec -->
+
+    </section>
+	<!-- End of section Functions -->
+	
+	<!-- Section Java API-->
+    <section>
+		<title>Java Module API</title>
+    	<para></para>
+    	
+    	<!-- Section Minimal program skeleton -->
+    	<section>
+    		<title>Minimal program skeleton</title>
+    		<para></para>
+    		<example>
+    			<title>Minimal program skeleton</title>
+    			<para></para>
+    			<programlisting format="linespecific">
+import org.siprouter.*;
+import org.siprouter.NativeInterface.*;
+
+public class Kamailio extends NativeMethods
+{
+		/* Here you should specify a full path to app_java.so */
+		static
+		{
+				System.load("/opt/kamailio/lib/kamailio/modules/app_java.so");
+		}
+
+		/* Constructor. Do not remove !!! */
+		public Kamailio()
+		{
+		}
+
+		/*
+		This method should be executed for each children process, immediately after forking.
+		Required. Do not remove !!!
+		*/
+		public int child_init(int rank)
+		{
+				return 1;
+		}
+}
+</programlisting>
+    		</example>
+    	</section>
+    	<!-- End of section Minimal program skeleton -->
+    	
+    </section>
+	<!-- End of section Java API -->
+	
+</chapter>
+

+ 1 - 0
modules/app_java/doc/epub/META-INF/container.xml

@@ -0,0 +1 @@
+<?xml version="1.0" encoding="utf-8"?><container xmlns="urn:oasis:names:tc:opendocument:xmlns:container" version="1.0"><rootfiles><rootfile full-path="content.opf" media-type="application/oebps-package+xml"/></rootfiles></container>

BIN=BIN
modules/app_java/doc/epub/app_java_admin.epub


+ 32 - 0
modules/app_java/doc/epub/ch01s02.html

@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="utf-8"?><html xmlns="http://www.w3.org/1999/xhtml" version="-//W3C//DTD XHTML 1.1//EN"><head xmlns:h="http://www.w3.org/1999/xhtml" profile=""><title>Dependencies</title><meta name="generator" content="DocBook XSL Stylesheets V1.77.1"/></head><body><div class="section"><div class="titlepage"><div><div><h1 class="title"><a id="d5e6" shape="rect"/>Dependencies</h1></div></div></div>
+		
+    	
+		<div class="section"><div class="titlepage"><div><div><h2 class="title"><a id="d5e8" shape="rect"/>Kamailio Modules</h2></div></div></div>
+		    
+		    <p>
+			The following modules must be loaded before this module:
+		    	</p><div class="itemizedlist"><ul class="itemizedlist"><li class="listitem">
+				<p>
+				    <span class="emphasis"><em>none</em></span>.
+				</p>
+			    </li></ul></div><p>
+		    </p>
+		</div>
+    	
+    	
+    	
+		<div class="section"><div class="titlepage"><div><div><h2 class="title"><a id="d5e15" shape="rect"/>External Libraries or Applications</h2></div></div></div>
+		    
+		    <p>
+			
+		    	</p><div class="itemizedlist"><p><span class="emphasis"><em>The following packages are runtime libraries, required to launch</em></span></p><ul class="itemizedlist"><li class="listitem"><p><span class="emphasis"><em>java-common</em></span> Base of all Java packages.</p></li><li class="listitem"><p><span class="emphasis"><em>default-jre</em></span> Standard Java or Java compatible Runtime.</p></li><li class="listitem"><p><span class="emphasis"><em>gcj-jre</em></span> Java runtime environment using GIJ/classpath.</p></li><li class="listitem"><p><span class="emphasis"><em>libgcj12 (&gt;=12)</em></span> Java runtime library for use with gcj.</p></li></ul></div><p>
+		    	</p><div class="itemizedlist"><p><span class="emphasis"><em>The following packages are optional, required for development</em></span></p><ul class="itemizedlist"><li class="listitem"><p><span class="emphasis"><em>ant</em></span> Java based build tool like make.</p></li><li class="listitem"><p><span class="emphasis"><em>ant-contrib</em></span> Collection of tasks, types and other tools for Apache Ant.</p></li><li class="listitem"><p><span class="emphasis"><em>ant-gcj</em></span> Java based build tool like make (GCJ).</p></li><li class="listitem"><p><span class="emphasis"><em>default-jdk</em></span> Standard Java or Java compatible Development Kit</p></li><li class="listitem"><p><span class="emphasis"><em>gcj-jdk</em></span> gcj and classpath development tools for Java(TM)</p></li><li class="listitem"><p><span class="emphasis"><em>libgcj13-dev (&gt;=12)</em></span> Java development headers for use with gcj</p></li><li class="listitem"><p><span class="emphasis"><em>jdk</em></span> JDK Development Kit (either oracle jdk or openjdk)</p></li></ul></div><p>
+		    </p>
+			<p>
+				The following libraries or applications must be compiled before
+				running Kamailio with this module loaded:
+				</p><div class="itemizedlist"><p><span class="emphasis"><em>The following packages are runtime libraries, required to launch</em></span></p><ul class="itemizedlist"><li class="listitem"><p><span class="emphasis"><em>&lt;class_name&gt;</em></span>.class</p></li><li class="listitem"><p><span class="emphasis"><em>kamailio</em></span>.jar</p></li></ul></div><p>
+			</p>
+		</div>
+    	
+    </div></body></html>

+ 7 - 0
modules/app_java/doc/epub/ch01s03.html

@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?><html xmlns="http://www.w3.org/1999/xhtml" version="-//W3C//DTD XHTML 1.1//EN"><head xmlns:h="http://www.w3.org/1999/xhtml" profile=""><title>Java runtime</title><meta name="generator" content="DocBook XSL Stylesheets V1.77.1"/></head><body><div class="section"><div class="titlepage"><div><div><h1 class="title"><a id="d5e67" shape="rect"/>Java runtime</h1></div></div></div>
+		
+		<div class="section"><div class="titlepage"><div><div><h2 class="title"><a id="d5e69" shape="rect"/></h2></div></div></div>
+			
+			<p>Java runtime library (JRE or JDK) is required to use this module.</p>
+		</div>
+	</div></body></html>

+ 117 - 0
modules/app_java/doc/epub/ch01s04.html

@@ -0,0 +1,117 @@
+<?xml version="1.0" encoding="utf-8"?><html xmlns="http://www.w3.org/1999/xhtml" version="-//W3C//DTD XHTML 1.1//EN"><head xmlns:h="http://www.w3.org/1999/xhtml" profile=""><title>Parameters</title><meta name="generator" content="DocBook XSL Stylesheets V1.77.1"/></head><body><div class="section"><div class="titlepage"><div><div><h1 class="title"><a id="d5e72" shape="rect"/>Parameters</h1></div></div></div>
+		
+
+		
+		<div class="section"><div class="titlepage"><div><div><h2 class="title"><a id="d5e74" shape="rect"/><code class="varname">class_name</code> (string)</h2></div></div></div>
+			
+		    <p>
+		    	The class name should have the same compiled file name.
+		    	If the value is <span class="emphasis"><em>"Kamailio"</em></span>, then the compiled file should be named as <span class="emphasis"><em>"Kamailio.class"</em></span>.
+		    </p>
+		    <p>
+				<span class="emphasis"><em>
+					Default value is <span class="quote">“<span class="quote">Kamailio</span>”</span>.
+				</em></span>
+		    </p>
+		    <div class="example"><a id="d5e83" shape="rect"/><p class="title"><strong>Example 1.1. Set <code class="varname">class_name</code> parameter</strong></p><div class="example-contents">
+		    	
+				<pre class="programlisting" xml:space="preserve">
+...
+modparam("app_java", "class_name", "Kamailio")
+...
+</pre>
+		    </div></div>
+		</div>
+
+		
+		<div class="section"><div class="titlepage"><div><div><h2 class="title"><a id="d5e87" shape="rect"/><code class="varname">child_init_method</code> (string)</h2></div></div></div>
+			
+			<p>
+				TBD.
+			</p>
+			<p>
+				<span class="emphasis"><em>
+					Default value is <span class="quote">“<span class="quote">child_init</span>”</span>.
+				</em></span>
+			</p>
+			<div class="example"><a id="d5e94" shape="rect"/><p class="title"><strong>Example 1.2. Set <code class="varname">child_init_method</code> parameter</strong></p><div class="example-contents">
+				
+				<pre class="programlisting" xml:space="preserve">
+...
+modparam("app_java", "child_init_method", "my_mod_init")
+...
+</pre>
+			</div></div>
+		</div>
+
+		
+		<div class="section"><div class="titlepage"><div><div><h2 class="title"><a id="d5e98" shape="rect"/><code class="varname">java_options</code> (string)</h2></div></div></div>
+			
+			<p>
+				Java options for Java Virtual Machine.
+				For more info read <a class="ulink" href="http://docs.oracle.com/javase/6/docs/technotes/tools/windows/java.html" shape="rect"><em class="citetitle">java docs</em></a>
+			</p>
+			<p>
+				<span class="emphasis"><em>
+					Default value is <span class="quote">“<span class="quote">-Djava.compiler=NONE</span>”</span>.
+				</em></span>
+			</p>
+			<div class="example"><a id="d5e107" shape="rect"/><p class="title"><strong>Example 1.3. Set <code class="varname">java_options</code> parameter</strong></p><div class="example-contents">
+				
+				<pre class="programlisting" xml:space="preserve">
+...
+modparam("app_java", "java_options", "-Djava.compiler=NONE")
+...
+</pre>
+			</div></div>
+			<div class="example"><a id="d5e111" shape="rect"/><p class="title"><strong>Example 1.4. Set <code class="varname">java_options</code> parameter (live configuration)</strong></p><div class="example-contents">
+				
+				<pre class="programlisting" xml:space="preserve">
+...
+# Assumes "application java folder" is located at /opt/kamailio/java
+modparam("app_java", "java_options", "-Djava.compiler=NONE -Djava.class.path=/path/to/kamailio/modules:/opt/kamailio/java:/opt/kamailio/java/kamailio.jar")
+...
+</pre>
+			</div></div>
+			<div class="example"><a id="d5e115" shape="rect"/><p class="title"><strong>Example 1.5. Set <code class="varname">java_options</code> parameter (verbose configuration)</strong></p><div class="example-contents">
+				
+				<pre class="programlisting" xml:space="preserve">
+...
+# Assumes "application java folder" is located at /opt/kamailio/java
+modparam("app_java", "java_options", "-verbose:gc,class,jni -Djava.compiler=NONE -Djava.class.path=/path/to/kamailio/modules:/opt/kamailio/java:/opt/kamailio/java/kamailio.jar")
+...
+</pre>
+			</div></div>
+			<div class="example"><a id="d5e119" shape="rect"/><p class="title"><strong>Example 1.6. Set <code class="varname">java_options</code> parameter (debug configuration)</strong></p><div class="example-contents">
+				
+				<pre class="programlisting" xml:space="preserve">
+...
+# Assumes "application java folder" is located at /opt/kamailio/java
+modparam("app_java", "java_options", "-Xdebug -verbose:gc,class,jni -Djava.compiler=NONE -Djava.class.path=/path/to/kamailio/modules:/opt/kamailio/java:/opt/kamailio/java/kamailio.jar")
+...
+</pre>
+			</div></div>
+		</div>
+
+		
+		<div class="section"><div class="titlepage"><div><div><h2 class="title"><a id="d5e123" shape="rect"/><code class="varname">force_kam_cmd_exec</code> (int)</h2></div></div></div>
+			
+			<p>
+				This parameter forces execution a kamailio comnmand with java native method <span class="quote">“<span class="quote">KamExec</span>”</span>.
+				# Note: this is an untested yet feature, may cause (but may not) a memory leaks if used from embedded languages.
+			</p>
+			<p>
+				<span class="emphasis"><em>
+					Default value is <span class="quote">“<span class="quote">0 (off)</span>”</span>.
+				</em></span>
+			</p>
+			<div class="example"><a id="d5e131" shape="rect"/><p class="title"><strong>Example 1.7. Set <code class="varname">force_kam_cmd_exec</code> parameter</strong></p><div class="example-contents">
+				
+				<pre class="programlisting" xml:space="preserve">
+...
+modparam("app_java", "force_kam_cmd_exec", 1)
+...
+</pre>
+			</div></div>
+		</div>
+	</div></body></html>

+ 352 - 0
modules/app_java/doc/epub/ch01s05.html

@@ -0,0 +1,352 @@
+<?xml version="1.0" encoding="utf-8"?><html xmlns="http://www.w3.org/1999/xhtml" version="-//W3C//DTD XHTML 1.1//EN"><head xmlns:h="http://www.w3.org/1999/xhtml" profile=""><title>Functions</title><meta name="generator" content="DocBook XSL Stylesheets V1.77.1"/></head><body><div class="section"><div class="titlepage"><div><div><h1 class="title"><a id="d5e135" shape="rect"/>Functions</h1></div></div></div>
+		
+    	
+    	
+    	<div class="section"><div class="titlepage"><div><div><h2 class="title"><a id="d5e137" shape="rect"/>
+    			Common requirements
+    		</h2></div></div></div>
+    		
+    		<p>Each function has a required parameter <span class="quote">“<span class="quote">method_signature</span>”</span>. For more info
+				see <a class="ulink" href="http://www.rgagnon.com/javadetails/java-0286.html" shape="rect"><em class="citetitle">Determine the signature of a method</em></a>.
+				Signature represents the variable type. The mapping between the Java type and C type
+				is
+				</p><pre class="programlisting" xml:space="preserve">
+		Type     Chararacter 
+		boolean      Z 
+		byte         B 
+		char         C 
+		double       D 
+		float        F 
+		int          I 
+		long         J 
+		object       L 
+		short        S 
+		void         V 
+		Note that to specify an object, the "L" is followed by the object's class name and ends with a semi-colon, ';' .
+    			</pre><p>
+			</p>
+    		<p> app_java supports the following signatures:
+				</p><pre class="programlisting" xml:space="preserve">
+		Primitives: Z,B,C,D,F,I,J,L,S,V
+		Objects: 
+			Ljava/lang/Boolean;
+			Ljava/lang/Byte;
+			Ljava/lang/Character;
+			Ljava/lang/Double;
+			Ljava/lang/Float;
+			Ljava/lang/Integer;
+			Ljava/lang/Long;
+			Ljava/lang/Short;
+			Ljava/lang/String;
+			NULL parameter: V
+
+	Each parameter passed to function will be cast according to given signature.
+	
+	Parameters are optional, ommitting a parameter meant the passed value is NULL.
+	Parameters count should be exactly the same as signature count.
+	Note 1: Arrays representation (symbol '[') is not supported yet.
+	Note 2: You shall use a correct signature, e.g. the following examples of combinations are invalid:    
+    	java_method_exec("ExampleMethod", "ZI", "False");
+        java_method_exec("ExampleMethod", "LI", "something", "5");
+</pre><p>
+			</p>
+
+ 
+    	</div>
+    	
+  
+    	
+    	<div class="section"><div class="titlepage"><div><div><h2 class="title"><a id="d5e146" shape="rect"/>java_method_exec(method, method_signature, [param1[, param2[, ...]]])</h2></div></div></div>
+    		
+    		<p>Executes a java class method <span class="emphasis"><em>method</em></span>. Parameter <span class="emphasis"><em>method_signature</em></span> is required.</p>
+    		<div class="itemizedlist"><ul class="itemizedlist"><li class="listitem">
+			    	<div class="example"><a id="d5e153" shape="rect"/><p class="title"><strong>Example 1.8. Signature: "V"</strong></p><div class="example-contents">
+						
+			    		<p>Kamailio prototype</p>
+			    		<pre class="programlisting" xml:space="preserve">java_method_exec("ExampleMethod", "V");</pre>
+			    		<p>Java prototype</p>
+			    		<pre class="programlisting" xml:space="preserve">public int ExampleMethod();</pre>
+			    		<p>Example of usage:</p>
+			    		<pre class="programlisting" xml:space="preserve">
+# Kamailio
+java_method_exec("ExampleMethod", "V");
+
+# Java
+public int ExampleMethod()
+{
+		... do something;
+		return 1;
+}
+</pre>
+			    	</div></div>
+	    		</li><li class="listitem">
+	    			<div class="example"><a id="d5e162" shape="rect"/><p class="title"><strong>Example 1.9. Signature: "Ljava/lang/String;I"</strong></p><div class="example-contents">
+	    				
+	    				<p>Kamailio prototype</p>
+		    			<pre class="programlisting" xml:space="preserve">java_method_exec("ExampleMethod", "Ljava/lang/String;I", "Hello world", "5");</pre>
+	    				<p>Java prototype</p>
+	    				<pre class="programlisting" xml:space="preserve">public int ExampleMethod(String param1, int param2);</pre>
+	    				<p>In the above scenario parameter 2 ("5") will be cast to integer representation.</p>
+	    				<p>Example of usage:</p>
+	    				<pre class="programlisting" xml:space="preserve">
+# Kamailio
+java_method_exec("ExampleMethod", "Ljava/lang/String;I", "$mb", "$ml");
+
+# Java
+public int ExampleMethod(String SipMessageBuffer, int SipMessageLenght)
+{
+		... do something with buffer;
+		return 1;
+}
+</pre>
+	    			</div></div>
+	    		</li><li class="listitem">
+    				<div class="example"><a id="d5e172" shape="rect"/><p class="title"><strong>Example 1.10. Signature: "ZB"</strong></p><div class="example-contents">
+    					
+    					<p>Kamailio prototype</p>
+    					<pre class="programlisting" xml:space="preserve">java_method_exec("ExampleMethod", "ZB", "true", "0x05");</pre>
+    					<p>Java prototype</p>
+    					<pre class="programlisting" xml:space="preserve">public int ExampleMethod(boolean param1, byte param2);</pre>
+    					<p>In the above scenario parameter 1 ("true") will be cast to boolean representation.</p>
+    					<p>Example of usage:</p>
+    					<pre class="programlisting" xml:space="preserve">
+# Kamailio
+java_method_exec("ExampleMethod", "ZB", "true", "0x05");
+
+# Java
+public int ExampleMethod(boolean flagSet, byte bFlag);
+{
+		if (flagSet)
+		{
+			... do something with flags;
+		}
+		return 1;
+}
+</pre>
+    				</div></div>
+    			</li></ul></div>
+    	</div>
+    	
+
+    	
+    	<div class="section"><div class="titlepage"><div><div><h2 class="title"><a id="d5e181" shape="rect"/>java_staticmethod_exec(method, method_signature, [param1[, param2[, ...]]])</h2></div></div></div>
+    		
+    		<p>Executes a java static method <span class="emphasis"><em>method</em></span>. Parameter <span class="emphasis"><em>method_signature</em></span> is required.</p>
+    		<div class="itemizedlist"><ul class="itemizedlist"><li class="listitem">
+    				<div class="example"><a id="d5e188" shape="rect"/><p class="title"><strong>Example 1.11. Signature: "V"</strong></p><div class="example-contents">
+    					
+    					<p>Kamailio prototype</p>
+    					<pre class="programlisting" xml:space="preserve">java_staticmethod_exec("ExampleMethod", "V");</pre>
+    					<p>Java prototype</p>
+    					<pre class="programlisting" xml:space="preserve">public static int ExampleMethod();</pre>
+    					<p>Example of usage:</p>
+    					<pre class="programlisting" xml:space="preserve">
+# Kamailio
+java_staticmethod_exec("ExampleMethod", "V");
+
+# Java
+public static int ExampleMethod()
+{
+		... do something;
+		return 1;
+}
+</pre>
+    				</div></div>
+    			</li><li class="listitem">
+    				<div class="example"><a id="d5e197" shape="rect"/><p class="title"><strong>Example 1.12. Signature: "Ljava/lang/String;I"</strong></p><div class="example-contents">
+    					
+    					<p>Kamailio prototype</p>
+    					<pre class="programlisting" xml:space="preserve">java_staticmethod_exec("ExampleMethod", "Ljava/lang/String;I", "Hello world", "5");</pre>
+    					<p>Java prototype</p>
+    					<pre class="programlisting" xml:space="preserve">public static int ExampleMethod(String param1, int param2);</pre>
+    					<p>In the above scenario parameter 2 ("5") will be cast to integer representation.</p>
+    					<p>Example of usage:</p>
+    					<pre class="programlisting" xml:space="preserve">
+# Kamailio
+java_staticmethod_exec("ExampleMethod", "Ljava/lang/String;I", "$mb", "$ml");
+
+# Java
+public static int ExampleMethod(String SipMessageBuffer, int SipMessageLenght)
+{
+		... do something with buffer;
+		return 1;
+}
+</pre>
+    				</div></div>
+    			</li><li class="listitem">
+    				<div class="example"><a id="d5e207" shape="rect"/><p class="title"><strong>Example 1.13. Signature: "ZB"</strong></p><div class="example-contents">
+    					
+    					<p>Kamailio prototype</p>
+    					<pre class="programlisting" xml:space="preserve">java_staticmethod_exec("ExampleMethod", "ZB", "true", "0x05");</pre>
+    					<p>Java prototype</p>
+    					<pre class="programlisting" xml:space="preserve">public static int ExampleMethod(boolean param1, byte param2);</pre>
+    					<p>In the above scenario parameter 1 ("true") will be cast to boolean representation.</p>
+    					<p>Example of usage:</p>
+    					<pre class="programlisting" xml:space="preserve">
+# Kamailio
+java_staticmethod_exec("ExampleMethod", "ZB", "true", "0x05");
+
+# Java
+public static int ExampleMethod(boolean flagSet, byte bFlag);
+{
+		if (flagSet)
+		{
+			... do something with flags;
+		}
+		return 1;
+}
+</pre>
+    				</div></div>
+    			</li></ul></div>
+    	</div>
+    	
+    	
+    	
+    	<div class="section"><div class="titlepage"><div><div><h2 class="title"><a id="d5e216" shape="rect"/>java_s_method_exec(method, method_signature, [param1[, param2[, ...]]])</h2></div></div></div>
+    		
+    		<p>Executes a java class synchronized method <span class="emphasis"><em>method</em></span>. Parameter <span class="emphasis"><em>method_signature</em></span> is required.</p>
+    		<p>For more info see <a class="ulink" href="http://docs.oracle.com/javase/tutorial/essential/concurrency/syncmeth.html" shape="rect"><em class="citetitle">Synchronized Methods</em></a></p>
+    		<div class="itemizedlist"><ul class="itemizedlist"><li class="listitem">
+    				<div class="example"><a id="d5e226" shape="rect"/><p class="title"><strong>Example 1.14. Signature: "V"</strong></p><div class="example-contents">
+    					
+    					<p>Kamailio prototype</p>
+    					<pre class="programlisting" xml:space="preserve">java_s_method_exec("ExampleMethod", "V");</pre>
+    					<p>Java prototype</p>
+    					<pre class="programlisting" xml:space="preserve">public synchronized int ExampleMethod();</pre>
+    					<p>Example of usage:</p>
+    					<pre class="programlisting" xml:space="preserve">
+# Kamailio
+java_s_method_exec("ExampleMethod", "V");
+
+# Java
+public synchronized int ExampleMethod()
+{
+		... do something;
+		return 1;
+}
+</pre>
+    				</div></div>
+    			</li><li class="listitem">
+    				<div class="example"><a id="d5e235" shape="rect"/><p class="title"><strong>Example 1.15. Signature: "Ljava/lang/String;I"</strong></p><div class="example-contents">
+    					
+    					<p>Kamailio prototype</p>
+    					<pre class="programlisting" xml:space="preserve">java_s_method_exec("ExampleMethod", "Ljava/lang/String;I", "Hello world", "5");</pre>
+    					<p>Java prototype</p>
+    					<pre class="programlisting" xml:space="preserve">public synchronized int ExampleMethod(String param1, int param2);</pre>
+    					<p>In the above scenario parameter 2 ("5") will be cast to integer representation.</p>
+    					<p>Example of usage:</p>
+    					<pre class="programlisting" xml:space="preserve">
+# Kamailio
+java_s_method_exec("ExampleMethod", "Ljava/lang/String;I", "$mb", "$ml");
+
+# Java
+public synchronized int ExampleMethod(String SipMessageBuffer, int SipMessageLenght)
+{
+		... do something with buffer;
+		return 1;
+}
+</pre>
+    				</div></div>
+    			</li><li class="listitem">
+    				<div class="example"><a id="d5e245" shape="rect"/><p class="title"><strong>Example 1.16. Signature: "ZB"</strong></p><div class="example-contents">
+    					
+    					<p>Kamailio prototype</p>
+    					<pre class="programlisting" xml:space="preserve">java_s_method_exec("ExampleMethod", "ZB", "true", "0x05");</pre>
+    					<p>Java prototype</p>
+    					<pre class="programlisting" xml:space="preserve">public synchronized int ExampleMethod(boolean param1, byte param2);</pre>
+    					<p>In the above scenario parameter 1 ("true") will be cast to boolean representation.</p>
+    					<p>Example of usage:</p>
+    					<pre class="programlisting" xml:space="preserve">
+# Kamailio
+java_s_method_exec("ExampleMethod", "ZB", "true", "0x05");
+
+# Java
+public synchronized int ExampleMethod(boolean flagSet, byte bFlag);
+{
+		if (flagSet)
+		{
+			... do something with flags;
+		}
+		return 1;
+}
+</pre>
+    				</div></div>
+    			</li></ul></div>
+    	</div>
+    	
+    	
+    	
+    	<div class="section"><div class="titlepage"><div><div><h2 class="title"><a id="d5e254" shape="rect"/>java_s_staticmethod_exec(method, method_signature, [param1[, param2[, ...]]])</h2></div></div></div>
+    		
+    		<p>Executes a java synchronized static method <span class="emphasis"><em>method</em></span>. Parameter <span class="emphasis"><em>method_signature</em></span> is required.</p>
+    		<p>For more info see <a class="ulink" href="http://docs.oracle.com/javase/tutorial/essential/concurrency/syncmeth.html" shape="rect"><em class="citetitle">Synchronized Methods</em></a></p>
+    		<div class="itemizedlist"><ul class="itemizedlist"><li class="listitem">
+    				<div class="example"><a id="d5e264" shape="rect"/><p class="title"><strong>Example 1.17. Signature: "V"</strong></p><div class="example-contents">
+    					
+    					<p>Kamailio prototype</p>
+    					<pre class="programlisting" xml:space="preserve">java_s_staticmethod_exec("ExampleMethod", "V");</pre>
+    					<p>Java prototype</p>
+    					<pre class="programlisting" xml:space="preserve">public static synchronized int ExampleMethod();</pre>
+    					<p>Example of usage:</p>
+    					<pre class="programlisting" xml:space="preserve">
+# Kamailio
+java_s_staticmethod_exec("ExampleMethod", "V");
+
+# Java
+public static synchronized int ExampleMethod()
+{
+		... do something;
+		return 1;
+}
+</pre>
+    				</div></div>
+    			</li><li class="listitem">
+    				<div class="example"><a id="d5e273" shape="rect"/><p class="title"><strong>Example 1.18. Signature: "Ljava/lang/String;I"</strong></p><div class="example-contents">
+    					
+    					<p>Kamailio prototype</p>
+    					<pre class="programlisting" xml:space="preserve">java_s_staticmethod_exec("ExampleMethod", "Ljava/lang/String;I", "Hello world", "5");</pre>
+    					<p>Java prototype</p>
+    					<pre class="programlisting" xml:space="preserve">public static synchronized int ExampleMethod(String param1, int param2);</pre>
+    					<p>In the above scenario parameter 2 ("5") will be cast to integer representation.</p>
+    					<p>Example of usage:</p>
+    					<pre class="programlisting" xml:space="preserve">
+# Kamailio
+java_s_staticmethod_exec("ExampleMethod", "Ljava/lang/String;I", "$mb", "$ml");
+
+# Java
+public static synchronized int ExampleMethod(String SipMessageBuffer, int SipMessageLenght)
+{
+		... do something with buffer;
+		return 1;
+}
+</pre>
+    				</div></div>
+    			</li><li class="listitem">
+    				<div class="example"><a id="d5e283" shape="rect"/><p class="title"><strong>Example 1.19. Signature: "ZB"</strong></p><div class="example-contents">
+    					
+    					<p>Kamailio prototype</p>
+    					<pre class="programlisting" xml:space="preserve">java_s_staticmethod_exec("ExampleMethod", "ZB", "true", "0x05");</pre>
+    					<p>Java prototype</p>
+    					<pre class="programlisting" xml:space="preserve">public static synchronized int ExampleMethod(boolean param1, byte param2);</pre>
+    					<p>In the above scenario parameter 1 ("true") will be cast to boolean representation.</p>
+    					<p>Example of usage:</p>
+    					<pre class="programlisting" xml:space="preserve">
+# Kamailio
+java_s_staticmethod_exec("ExampleMethod", "ZB", "true", "0x05");
+
+# Java
+public static synchronized int ExampleMethod(boolean flagSet, byte bFlag);
+{
+		if (flagSet)
+		{
+			... do something with flags;
+		}
+		return 1;
+}
+</pre>
+    				</div></div>
+    			</li></ul></div>
+    	</div>
+    	
+
+    </div></body></html>

+ 43 - 0
modules/app_java/doc/epub/ch01s06.html

@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="utf-8"?><html xmlns="http://www.w3.org/1999/xhtml" version="-//W3C//DTD XHTML 1.1//EN"><head xmlns:h="http://www.w3.org/1999/xhtml" profile=""><title>Java Module API</title><meta name="generator" content="DocBook XSL Stylesheets V1.77.1"/></head><body><div class="section"><div class="titlepage"><div><div><h1 class="title"><a id="d5e292" shape="rect"/>Java Module API</h1></div></div></div>
+		
+    	<p/>
+    	
+    	
+    	<div class="section"><div class="titlepage"><div><div><h2 class="title"><a id="d5e295" shape="rect"/>Minimal program skeleton</h2></div></div></div>
+    		
+    		<p/>
+    		<div class="example"><a id="d5e298" shape="rect"/><p class="title"><strong>Example 1.20. Minimal program skeleton</strong></p><div class="example-contents">
+    			
+    			<p/>
+    			<pre class="programlisting" xml:space="preserve">
+import org.siprouter.*;
+import org.siprouter.NativeInterface.*;
+
+public class Kamailio extends NativeMethods
+{
+		/* Here you should specify a full path to app_java.so */
+		static
+		{
+				System.load("/opt/kamailio/lib/kamailio/modules/app_java.so");
+		}
+
+		/* Constructor. Do not remove !!! */
+		public Kamailio()
+		{
+		}
+
+		/*
+		This method should be executed for each children process, immediately after forking.
+		Required. Do not remove !!!
+		*/
+		public int child_init(int rank)
+		{
+				return 1;
+		}
+}
+</pre>
+    		</div></div>
+    	</div>
+    	
+    	
+    </div></body></html>

+ 1 - 0
modules/app_java/doc/epub/content.opf

@@ -0,0 +1 @@
+<?xml version="1.0" encoding="utf-8"?><package xmlns="http://www.idpf.org/2007/opf" version="2.0" unique-identifier="chapterid"><metadata><dc:identifier xmlns:dc="http://purl.org/dc/elements/1.1/" id="chapterid">_d5e1</dc:identifier><dc:title xmlns:dc="http://purl.org/dc/elements/1.1/">Admin Guide</dc:title><dc:language xmlns:dc="http://purl.org/dc/elements/1.1/">en</dc:language></metadata><manifest><item id="ncxtoc" media-type="application/x-dtbncx+xml" href="toc.ncx"/><item id="d5e1" href="index.html" media-type="application/xhtml+xml"/><item id="d5e6" href="ch01s02.html" media-type="application/xhtml+xml"/><item id="d5e67" href="ch01s03.html" media-type="application/xhtml+xml"/><item id="d5e72" href="ch01s04.html" media-type="application/xhtml+xml"/><item id="d5e135" href="ch01s05.html" media-type="application/xhtml+xml"/><item id="d5e292" href="ch01s06.html" media-type="application/xhtml+xml"/></manifest><spine toc="ncxtoc"><itemref idref="d5e1"/><itemref idref="d5e6"/><itemref idref="d5e67"/><itemref idref="d5e72"/><itemref idref="d5e135"/><itemref idref="d5e292"/></spine></package>

+ 35 - 0
modules/app_java/doc/epub/index.html

@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?><html xmlns="http://www.w3.org/1999/xhtml" version="-//W3C//DTD XHTML 1.1//EN"><head xmlns:h="http://www.w3.org/1999/xhtml" profile=""><title>Chapter 1. Admin Guide</title><meta name="generator" content="DocBook XSL Stylesheets V1.77.1"/></head><body><div class="chapter"><div class="titlepage"><div><div><h1 class="title"><a id="d5e1" shape="rect"/>Chapter 1. Admin Guide</h1></div></div></div>
+    
+    
+    
+    
+    <div class="section"><div class="titlepage"><div><div><h1 class="title"><a id="d5e3" shape="rect"/>Overview</h1></div></div></div>
+		
+		<p>
+			This module allows executing Java compiled classes from config file, exporting
+			functions to access the SIP message from Java using Java Native Interface (JNI).
+		</p>
+    </div>
+	
+	
+	
+    
+	
+	
+	
+	
+	
+	
+	
+	
+	
+	
+	
+    
+	
+	
+	
+    
+	
+	
+</div></body></html>

+ 1 - 0
modules/app_java/doc/epub/mimetype

@@ -0,0 +1 @@
+application/epub+zip

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
modules/app_java/doc/epub/toc.ncx


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 7 - 0
modules/app_java/doc/html/app_java.html


+ 585 - 0
modules/app_java/doc/html/app_java_admin.html

@@ -0,0 +1,585 @@
+<html><head>
+      <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+   <title>Chapter&nbsp;1.&nbsp;Admin Guide</title><meta name="generator" content="DocBook XSL Stylesheets V1.77.1"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="chapter"><div class="titlepage"><div><div><h2 class="title"><a name="d6e1"></a>Chapter&nbsp;1.&nbsp;Admin Guide</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="#d6e3">Overview</a></span></dt><dt><span class="section"><a href="#d6e6">Dependencies</a></span></dt><dd><dl><dt><span class="section"><a href="#d6e8">Kamailio Modules</a></span></dt><dt><span class="section"><a href="#d6e15">External Libraries or Applications</a></span></dt></dl></dd><dt><span class="section"><a href="#d6e67">Java runtime</a></span></dt><dd><dl><dt><span class="section"><a href="#d6e69"></a></span></dt></dl></dd><dt><span class="section"><a href="#d6e72">Parameters</a></span></dt><dd><dl><dt><span class="section"><a href="#d6e74"><code class="varname">class_name</code> (string)</a></span></dt><dt><span class="section"><a href="#d6e87"><code class="varname">child_init_method</code> (string)</a></span></dt><dt><span class="section"><a href="#d6e98"><code class="varname">java_options</code> (string)</a></span></dt><dt><span class="section"><a href="#d6e123"><code class="varname">force_kam_cmd_exec</code> (int)</a></span></dt></dl></dd><dt><span class="section"><a href="#d6e135">Functions</a></span></dt><dd><dl><dt><span class="section"><a href="#d6e137">
+    			Common requirements
+    		</a></span></dt><dt><span class="section"><a href="#d6e146">java_method_exec(method, method_signature, [param1[, param2[, ...]]])</a></span></dt><dt><span class="section"><a href="#d6e181">java_staticmethod_exec(method, method_signature, [param1[, param2[, ...]]])</a></span></dt><dt><span class="section"><a href="#d6e216">java_s_method_exec(method, method_signature, [param1[, param2[, ...]]])</a></span></dt><dt><span class="section"><a href="#d6e254">java_s_staticmethod_exec(method, method_signature, [param1[, param2[, ...]]])</a></span></dt></dl></dd><dt><span class="section"><a href="#d6e292">Java Module API</a></span></dt><dd><dl><dt><span class="section"><a href="#d6e295">Minimal program skeleton</a></span></dt></dl></dd></dl></div>
+    
+    
+    
+    
+    <div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d6e3"></a>Overview</h2></div></div></div>
+		
+		<p>
+			This module allows executing Java compiled classes from config file, exporting
+			functions to access the SIP message from Java using Java Native Interface (JNI).
+		</p>
+    </div>
+	
+	
+	
+    <div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d6e6"></a>Dependencies</h2></div></div></div>
+		
+    	
+		<div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="d6e8"></a>Kamailio Modules</h3></div></div></div>
+		    
+		    <p>
+			The following modules must be loaded before this module:
+		    	</p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem">
+				<p>
+				    <span class="emphasis"><em>none</em></span>.
+				</p>
+			    </li></ul></div><p>
+		    </p>
+		</div>
+    	
+    	
+    	
+		<div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="d6e15"></a>External Libraries or Applications</h3></div></div></div>
+		    
+		    <p>
+			
+		    	</p><div class="itemizedlist"><p><span class="emphasis"><em>The following packages are runtime libraries, required to launch</em></span></p><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem" style="list-style-type: disc"><p><span class="emphasis"><em>java-common</em></span> Base of all Java packages.</p></li><li class="listitem" style="list-style-type: disc"><p><span class="emphasis"><em>default-jre</em></span> Standard Java or Java compatible Runtime.</p></li><li class="listitem" style="list-style-type: disc"><p><span class="emphasis"><em>gcj-jre</em></span> Java runtime environment using GIJ/classpath.</p></li><li class="listitem" style="list-style-type: disc"><p><span class="emphasis"><em>libgcj12 (&gt;=12)</em></span> Java runtime library for use with gcj.</p></li></ul></div><p>
+		    	</p><div class="itemizedlist"><p><span class="emphasis"><em>The following packages are optional, required for development</em></span></p><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem" style="list-style-type: square"><p><span class="emphasis"><em>ant</em></span> Java based build tool like make.</p></li><li class="listitem" style="list-style-type: square"><p><span class="emphasis"><em>ant-contrib</em></span> Collection of tasks, types and other tools for Apache Ant.</p></li><li class="listitem" style="list-style-type: square"><p><span class="emphasis"><em>ant-gcj</em></span> Java based build tool like make (GCJ).</p></li><li class="listitem" style="list-style-type: square"><p><span class="emphasis"><em>default-jdk</em></span> Standard Java or Java compatible Development Kit</p></li><li class="listitem" style="list-style-type: square"><p><span class="emphasis"><em>gcj-jdk</em></span> gcj and classpath development tools for Java(TM)</p></li><li class="listitem" style="list-style-type: square"><p><span class="emphasis"><em>libgcj13-dev (&gt;=12)</em></span> Java development headers for use with gcj</p></li><li class="listitem" style="list-style-type: square"><p><span class="emphasis"><em>jdk</em></span> JDK Development Kit (either oracle jdk or openjdk)</p></li></ul></div><p>
+		    </p>
+			<p>
+				The following libraries or applications must be compiled before
+				running Kamailio with this module loaded:
+				</p><div class="itemizedlist"><p><span class="emphasis"><em>The following packages are runtime libraries, required to launch</em></span></p><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem" style="list-style-type: circle"><p><span class="emphasis"><em>&lt;class_name&gt;</em></span>.class</p></li><li class="listitem" style="list-style-type: circle"><p><span class="emphasis"><em>kamailio</em></span>.jar</p></li></ul></div><p>
+			</p>
+		</div>
+    	
+    </div>
+	
+	
+	
+	<div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d6e67"></a>Java runtime</h2></div></div></div>
+		
+		<div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="d6e69"></a></h3></div></div></div>
+			
+			<p>Java runtime library (JRE or JDK) is required to use this module.</p>
+		</div>
+	</div>
+	
+	
+	
+	<div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d6e72"></a>Parameters</h2></div></div></div>
+		
+
+		
+		<div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="d6e74"></a><code class="varname">class_name</code> (string)</h3></div></div></div>
+			
+		    <p>
+		    	The class name should have the same compiled file name.
+		    	If the value is <span class="emphasis"><em>"Kamailio"</em></span>, then the compiled file should be named as <span class="emphasis"><em>"Kamailio.class"</em></span>.
+		    </p>
+		    <p>
+				<span class="emphasis"><em>
+					Default value is <span class="quote">&#8220;<span class="quote">Kamailio</span>&#8221;</span>.
+				</em></span>
+		    </p>
+		    <div class="example"><a name="d6e83"></a><p class="title"><b>Example&nbsp;1.1.&nbsp;Set <code class="varname">class_name</code> parameter</b></p><div class="example-contents">
+		    	
+				<pre class="programlisting">
+...
+modparam("app_java", "class_name", "Kamailio")
+...
+</pre>
+		    </div></div><br class="example-break">
+		</div>
+
+		
+		<div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="d6e87"></a><code class="varname">child_init_method</code> (string)</h3></div></div></div>
+			
+			<p>
+				TBD.
+			</p>
+			<p>
+				<span class="emphasis"><em>
+					Default value is <span class="quote">&#8220;<span class="quote">child_init</span>&#8221;</span>.
+				</em></span>
+			</p>
+			<div class="example"><a name="d6e94"></a><p class="title"><b>Example&nbsp;1.2.&nbsp;Set <code class="varname">child_init_method</code> parameter</b></p><div class="example-contents">
+				
+				<pre class="programlisting">
+...
+modparam("app_java", "child_init_method", "my_mod_init")
+...
+</pre>
+			</div></div><br class="example-break">
+		</div>
+
+		
+		<div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="d6e98"></a><code class="varname">java_options</code> (string)</h3></div></div></div>
+			
+			<p>
+				Java options for Java Virtual Machine.
+				For more info read <a class="ulink" href="http://docs.oracle.com/javase/6/docs/technotes/tools/windows/java.html" target="_top"><em class="citetitle">java docs</em></a>
+			</p>
+			<p>
+				<span class="emphasis"><em>
+					Default value is <span class="quote">&#8220;<span class="quote">-Djava.compiler=NONE</span>&#8221;</span>.
+				</em></span>
+			</p>
+			<div class="example"><a name="d6e107"></a><p class="title"><b>Example&nbsp;1.3.&nbsp;Set <code class="varname">java_options</code> parameter</b></p><div class="example-contents">
+				
+				<pre class="programlisting">
+...
+modparam("app_java", "java_options", "-Djava.compiler=NONE")
+...
+</pre>
+			</div></div><br class="example-break">
+			<div class="example"><a name="d6e111"></a><p class="title"><b>Example&nbsp;1.4.&nbsp;Set <code class="varname">java_options</code> parameter (live configuration)</b></p><div class="example-contents">
+				
+				<pre class="programlisting">
+...
+# Assumes "application java folder" is located at /opt/kamailio/java
+modparam("app_java", "java_options", "-Djava.compiler=NONE -Djava.class.path=/path/to/kamailio/modules:/opt/kamailio/java:/opt/kamailio/java/kamailio.jar")
+...
+</pre>
+			</div></div><br class="example-break">
+			<div class="example"><a name="d6e115"></a><p class="title"><b>Example&nbsp;1.5.&nbsp;Set <code class="varname">java_options</code> parameter (verbose configuration)</b></p><div class="example-contents">
+				
+				<pre class="programlisting">
+...
+# Assumes "application java folder" is located at /opt/kamailio/java
+modparam("app_java", "java_options", "-verbose:gc,class,jni -Djava.compiler=NONE -Djava.class.path=/path/to/kamailio/modules:/opt/kamailio/java:/opt/kamailio/java/kamailio.jar")
+...
+</pre>
+			</div></div><br class="example-break">
+			<div class="example"><a name="d6e119"></a><p class="title"><b>Example&nbsp;1.6.&nbsp;Set <code class="varname">java_options</code> parameter (debug configuration)</b></p><div class="example-contents">
+				
+				<pre class="programlisting">
+...
+# Assumes "application java folder" is located at /opt/kamailio/java
+modparam("app_java", "java_options", "-Xdebug -verbose:gc,class,jni -Djava.compiler=NONE -Djava.class.path=/path/to/kamailio/modules:/opt/kamailio/java:/opt/kamailio/java/kamailio.jar")
+...
+</pre>
+			</div></div><br class="example-break">
+		</div>
+
+		
+		<div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="d6e123"></a><code class="varname">force_kam_cmd_exec</code> (int)</h3></div></div></div>
+			
+			<p>
+				This parameter forces execution a kamailio comnmand with java native method <span class="quote">&#8220;<span class="quote">KamExec</span>&#8221;</span>.
+				# Note: this is an untested yet feature, may cause (but may not) a memory leaks if used from embedded languages.
+			</p>
+			<p>
+				<span class="emphasis"><em>
+					Default value is <span class="quote">&#8220;<span class="quote">0 (off)</span>&#8221;</span>.
+				</em></span>
+			</p>
+			<div class="example"><a name="d6e131"></a><p class="title"><b>Example&nbsp;1.7.&nbsp;Set <code class="varname">force_kam_cmd_exec</code> parameter</b></p><div class="example-contents">
+				
+				<pre class="programlisting">
+...
+modparam("app_java", "force_kam_cmd_exec", 1)
+...
+</pre>
+			</div></div><br class="example-break">
+		</div>
+	</div>
+	
+	
+	
+    <div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d6e135"></a>Functions</h2></div></div></div>
+		
+    	
+    	
+    	<div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="d6e137"></a>
+    			Common requirements
+    		</h3></div></div></div>
+    		
+    		<p>Each function has a required parameter <span class="quote">&#8220;<span class="quote">method_signature</span>&#8221;</span>. For more info
+				see <a class="ulink" href="http://www.rgagnon.com/javadetails/java-0286.html" target="_top"><em class="citetitle">Determine the signature of a method</em></a>.
+				Signature represents the variable type. The mapping between the Java type and C type
+				is
+				</p><pre class="programlisting">
+		Type     Chararacter 
+		boolean      Z 
+		byte         B 
+		char         C 
+		double       D 
+		float        F 
+		int          I 
+		long         J 
+		object       L 
+		short        S 
+		void         V 
+		Note that to specify an object, the "L" is followed by the object's class name and ends with a semi-colon, ';' .
+    			</pre><p>
+			</p>
+    		<p> app_java supports the following signatures:
+				</p><pre class="programlisting">
+		Primitives: Z,B,C,D,F,I,J,L,S,V
+		Objects: 
+			Ljava/lang/Boolean;
+			Ljava/lang/Byte;
+			Ljava/lang/Character;
+			Ljava/lang/Double;
+			Ljava/lang/Float;
+			Ljava/lang/Integer;
+			Ljava/lang/Long;
+			Ljava/lang/Short;
+			Ljava/lang/String;
+			NULL parameter: V
+
+	Each parameter passed to function will be cast according to given signature.
+	
+	Parameters are optional, ommitting a parameter meant the passed value is NULL.
+	Parameters count should be exactly the same as signature count.
+	Note 1: Arrays representation (symbol '[') is not supported yet.
+	Note 2: You shall use a correct signature, e.g. the following examples of combinations are invalid:    
+    	java_method_exec("ExampleMethod", "ZI", "False");
+        java_method_exec("ExampleMethod", "LI", "something", "5");
+</pre><p>
+			</p>
+
+ 
+    	</div>
+    	
+  
+    	
+    	<div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="d6e146"></a>java_method_exec(method, method_signature, [param1[, param2[, ...]]])</h3></div></div></div>
+    		
+    		<p>Executes a java class method <span class="emphasis"><em>method</em></span>. Parameter <span class="emphasis"><em>method_signature</em></span> is required.</p>
+    		<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem">
+			    	<div class="example"><a name="d6e153"></a><p class="title"><b>Example&nbsp;1.8.&nbsp;Signature: "V"</b></p><div class="example-contents">
+						
+			    		<p>Kamailio prototype</p>
+			    		<pre class="programlisting">java_method_exec("ExampleMethod", "V");</pre>
+			    		<p>Java prototype</p>
+			    		<pre class="programlisting">public int ExampleMethod();</pre>
+			    		<p>Example of usage:</p>
+			    		<pre class="programlisting">
+# Kamailio
+java_method_exec("ExampleMethod", "V");
+
+# Java
+public int ExampleMethod()
+{
+		... do something;
+		return 1;
+}
+</pre>
+			    	</div></div><br class="example-break">
+	    		</li><li class="listitem">
+	    			<div class="example"><a name="d6e162"></a><p class="title"><b>Example&nbsp;1.9.&nbsp;Signature: "Ljava/lang/String;I"</b></p><div class="example-contents">
+	    				
+	    				<p>Kamailio prototype</p>
+		    			<pre class="programlisting">java_method_exec("ExampleMethod", "Ljava/lang/String;I", "Hello world", "5");</pre>
+	    				<p>Java prototype</p>
+	    				<pre class="programlisting">public int ExampleMethod(String param1, int param2);</pre>
+	    				<p>In the above scenario parameter 2 ("5") will be cast to integer representation.</p>
+	    				<p>Example of usage:</p>
+	    				<pre class="programlisting">
+# Kamailio
+java_method_exec("ExampleMethod", "Ljava/lang/String;I", "$mb", "$ml");
+
+# Java
+public int ExampleMethod(String SipMessageBuffer, int SipMessageLenght)
+{
+		... do something with buffer;
+		return 1;
+}
+</pre>
+	    			</div></div><br class="example-break">
+	    		</li><li class="listitem">
+    				<div class="example"><a name="d6e172"></a><p class="title"><b>Example&nbsp;1.10.&nbsp;Signature: "ZB"</b></p><div class="example-contents">
+    					
+    					<p>Kamailio prototype</p>
+    					<pre class="programlisting">java_method_exec("ExampleMethod", "ZB", "true", "0x05");</pre>
+    					<p>Java prototype</p>
+    					<pre class="programlisting">public int ExampleMethod(boolean param1, byte param2);</pre>
+    					<p>In the above scenario parameter 1 ("true") will be cast to boolean representation.</p>
+    					<p>Example of usage:</p>
+    					<pre class="programlisting">
+# Kamailio
+java_method_exec("ExampleMethod", "ZB", "true", "0x05");
+
+# Java
+public int ExampleMethod(boolean flagSet, byte bFlag);
+{
+		if (flagSet)
+		{
+			... do something with flags;
+		}
+		return 1;
+}
+</pre>
+    				</div></div><br class="example-break">
+    			</li></ul></div>
+    	</div>
+    	
+
+    	
+    	<div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="d6e181"></a>java_staticmethod_exec(method, method_signature, [param1[, param2[, ...]]])</h3></div></div></div>
+    		
+    		<p>Executes a java static method <span class="emphasis"><em>method</em></span>. Parameter <span class="emphasis"><em>method_signature</em></span> is required.</p>
+    		<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem">
+    				<div class="example"><a name="d6e188"></a><p class="title"><b>Example&nbsp;1.11.&nbsp;Signature: "V"</b></p><div class="example-contents">
+    					
+    					<p>Kamailio prototype</p>
+    					<pre class="programlisting">java_staticmethod_exec("ExampleMethod", "V");</pre>
+    					<p>Java prototype</p>
+    					<pre class="programlisting">public static int ExampleMethod();</pre>
+    					<p>Example of usage:</p>
+    					<pre class="programlisting">
+# Kamailio
+java_staticmethod_exec("ExampleMethod", "V");
+
+# Java
+public static int ExampleMethod()
+{
+		... do something;
+		return 1;
+}
+</pre>
+    				</div></div><br class="example-break">
+    			</li><li class="listitem">
+    				<div class="example"><a name="d6e197"></a><p class="title"><b>Example&nbsp;1.12.&nbsp;Signature: "Ljava/lang/String;I"</b></p><div class="example-contents">
+    					
+    					<p>Kamailio prototype</p>
+    					<pre class="programlisting">java_staticmethod_exec("ExampleMethod", "Ljava/lang/String;I", "Hello world", "5");</pre>
+    					<p>Java prototype</p>
+    					<pre class="programlisting">public static int ExampleMethod(String param1, int param2);</pre>
+    					<p>In the above scenario parameter 2 ("5") will be cast to integer representation.</p>
+    					<p>Example of usage:</p>
+    					<pre class="programlisting">
+# Kamailio
+java_staticmethod_exec("ExampleMethod", "Ljava/lang/String;I", "$mb", "$ml");
+
+# Java
+public static int ExampleMethod(String SipMessageBuffer, int SipMessageLenght)
+{
+		... do something with buffer;
+		return 1;
+}
+</pre>
+    				</div></div><br class="example-break">
+    			</li><li class="listitem">
+    				<div class="example"><a name="d6e207"></a><p class="title"><b>Example&nbsp;1.13.&nbsp;Signature: "ZB"</b></p><div class="example-contents">
+    					
+    					<p>Kamailio prototype</p>
+    					<pre class="programlisting">java_staticmethod_exec("ExampleMethod", "ZB", "true", "0x05");</pre>
+    					<p>Java prototype</p>
+    					<pre class="programlisting">public static int ExampleMethod(boolean param1, byte param2);</pre>
+    					<p>In the above scenario parameter 1 ("true") will be cast to boolean representation.</p>
+    					<p>Example of usage:</p>
+    					<pre class="programlisting">
+# Kamailio
+java_staticmethod_exec("ExampleMethod", "ZB", "true", "0x05");
+
+# Java
+public static int ExampleMethod(boolean flagSet, byte bFlag);
+{
+		if (flagSet)
+		{
+			... do something with flags;
+		}
+		return 1;
+}
+</pre>
+    				</div></div><br class="example-break">
+    			</li></ul></div>
+    	</div>
+    	
+    	
+    	
+    	<div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="d6e216"></a>java_s_method_exec(method, method_signature, [param1[, param2[, ...]]])</h3></div></div></div>
+    		
+    		<p>Executes a java class synchronized method <span class="emphasis"><em>method</em></span>. Parameter <span class="emphasis"><em>method_signature</em></span> is required.</p>
+    		<p>For more info see <a class="ulink" href="http://docs.oracle.com/javase/tutorial/essential/concurrency/syncmeth.html" target="_top"><em class="citetitle">Synchronized Methods</em></a></p>
+    		<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem">
+    				<div class="example"><a name="d6e226"></a><p class="title"><b>Example&nbsp;1.14.&nbsp;Signature: "V"</b></p><div class="example-contents">
+    					
+    					<p>Kamailio prototype</p>
+    					<pre class="programlisting">java_s_method_exec("ExampleMethod", "V");</pre>
+    					<p>Java prototype</p>
+    					<pre class="programlisting">public synchronized int ExampleMethod();</pre>
+    					<p>Example of usage:</p>
+    					<pre class="programlisting">
+# Kamailio
+java_s_method_exec("ExampleMethod", "V");
+
+# Java
+public synchronized int ExampleMethod()
+{
+		... do something;
+		return 1;
+}
+</pre>
+    				</div></div><br class="example-break">
+    			</li><li class="listitem">
+    				<div class="example"><a name="d6e235"></a><p class="title"><b>Example&nbsp;1.15.&nbsp;Signature: "Ljava/lang/String;I"</b></p><div class="example-contents">
+    					
+    					<p>Kamailio prototype</p>
+    					<pre class="programlisting">java_s_method_exec("ExampleMethod", "Ljava/lang/String;I", "Hello world", "5");</pre>
+    					<p>Java prototype</p>
+    					<pre class="programlisting">public synchronized int ExampleMethod(String param1, int param2);</pre>
+    					<p>In the above scenario parameter 2 ("5") will be cast to integer representation.</p>
+    					<p>Example of usage:</p>
+    					<pre class="programlisting">
+# Kamailio
+java_s_method_exec("ExampleMethod", "Ljava/lang/String;I", "$mb", "$ml");
+
+# Java
+public synchronized int ExampleMethod(String SipMessageBuffer, int SipMessageLenght)
+{
+		... do something with buffer;
+		return 1;
+}
+</pre>
+    				</div></div><br class="example-break">
+    			</li><li class="listitem">
+    				<div class="example"><a name="d6e245"></a><p class="title"><b>Example&nbsp;1.16.&nbsp;Signature: "ZB"</b></p><div class="example-contents">
+    					
+    					<p>Kamailio prototype</p>
+    					<pre class="programlisting">java_s_method_exec("ExampleMethod", "ZB", "true", "0x05");</pre>
+    					<p>Java prototype</p>
+    					<pre class="programlisting">public synchronized int ExampleMethod(boolean param1, byte param2);</pre>
+    					<p>In the above scenario parameter 1 ("true") will be cast to boolean representation.</p>
+    					<p>Example of usage:</p>
+    					<pre class="programlisting">
+# Kamailio
+java_s_method_exec("ExampleMethod", "ZB", "true", "0x05");
+
+# Java
+public synchronized int ExampleMethod(boolean flagSet, byte bFlag);
+{
+		if (flagSet)
+		{
+			... do something with flags;
+		}
+		return 1;
+}
+</pre>
+    				</div></div><br class="example-break">
+    			</li></ul></div>
+    	</div>
+    	
+    	
+    	
+    	<div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="d6e254"></a>java_s_staticmethod_exec(method, method_signature, [param1[, param2[, ...]]])</h3></div></div></div>
+    		
+    		<p>Executes a java synchronized static method <span class="emphasis"><em>method</em></span>. Parameter <span class="emphasis"><em>method_signature</em></span> is required.</p>
+    		<p>For more info see <a class="ulink" href="http://docs.oracle.com/javase/tutorial/essential/concurrency/syncmeth.html" target="_top"><em class="citetitle">Synchronized Methods</em></a></p>
+    		<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem">
+    				<div class="example"><a name="d6e264"></a><p class="title"><b>Example&nbsp;1.17.&nbsp;Signature: "V"</b></p><div class="example-contents">
+    					
+    					<p>Kamailio prototype</p>
+    					<pre class="programlisting">java_s_staticmethod_exec("ExampleMethod", "V");</pre>
+    					<p>Java prototype</p>
+    					<pre class="programlisting">public static synchronized int ExampleMethod();</pre>
+    					<p>Example of usage:</p>
+    					<pre class="programlisting">
+# Kamailio
+java_s_staticmethod_exec("ExampleMethod", "V");
+
+# Java
+public static synchronized int ExampleMethod()
+{
+		... do something;
+		return 1;
+}
+</pre>
+    				</div></div><br class="example-break">
+    			</li><li class="listitem">
+    				<div class="example"><a name="d6e273"></a><p class="title"><b>Example&nbsp;1.18.&nbsp;Signature: "Ljava/lang/String;I"</b></p><div class="example-contents">
+    					
+    					<p>Kamailio prototype</p>
+    					<pre class="programlisting">java_s_staticmethod_exec("ExampleMethod", "Ljava/lang/String;I", "Hello world", "5");</pre>
+    					<p>Java prototype</p>
+    					<pre class="programlisting">public static synchronized int ExampleMethod(String param1, int param2);</pre>
+    					<p>In the above scenario parameter 2 ("5") will be cast to integer representation.</p>
+    					<p>Example of usage:</p>
+    					<pre class="programlisting">
+# Kamailio
+java_s_staticmethod_exec("ExampleMethod", "Ljava/lang/String;I", "$mb", "$ml");
+
+# Java
+public static synchronized int ExampleMethod(String SipMessageBuffer, int SipMessageLenght)
+{
+		... do something with buffer;
+		return 1;
+}
+</pre>
+    				</div></div><br class="example-break">
+    			</li><li class="listitem">
+    				<div class="example"><a name="d6e283"></a><p class="title"><b>Example&nbsp;1.19.&nbsp;Signature: "ZB"</b></p><div class="example-contents">
+    					
+    					<p>Kamailio prototype</p>
+    					<pre class="programlisting">java_s_staticmethod_exec("ExampleMethod", "ZB", "true", "0x05");</pre>
+    					<p>Java prototype</p>
+    					<pre class="programlisting">public static synchronized int ExampleMethod(boolean param1, byte param2);</pre>
+    					<p>In the above scenario parameter 1 ("true") will be cast to boolean representation.</p>
+    					<p>Example of usage:</p>
+    					<pre class="programlisting">
+# Kamailio
+java_s_staticmethod_exec("ExampleMethod", "ZB", "true", "0x05");
+
+# Java
+public static synchronized int ExampleMethod(boolean flagSet, byte bFlag);
+{
+		if (flagSet)
+		{
+			... do something with flags;
+		}
+		return 1;
+}
+</pre>
+    				</div></div><br class="example-break">
+    			</li></ul></div>
+    	</div>
+    	
+
+    </div>
+	
+	
+	
+    <div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d6e292"></a>Java Module API</h2></div></div></div>
+		
+    	<p></p>
+    	
+    	
+    	<div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="d6e295"></a>Minimal program skeleton</h3></div></div></div>
+    		
+    		<p></p>
+    		<div class="example"><a name="d6e298"></a><p class="title"><b>Example&nbsp;1.20.&nbsp;Minimal program skeleton</b></p><div class="example-contents">
+    			
+    			<p></p>
+    			<pre class="programlisting">
+import org.siprouter.*;
+import org.siprouter.NativeInterface.*;
+
+public class Kamailio extends NativeMethods
+{
+		/* Here you should specify a full path to app_java.so */
+		static
+		{
+				System.load("/opt/kamailio/lib/kamailio/modules/app_java.so");
+		}
+
+		/* Constructor. Do not remove !!! */
+		public Kamailio()
+		{
+		}
+
+		/*
+		This method should be executed for each children process, immediately after forking.
+		Required. Do not remove !!!
+		*/
+		public int child_init(int rank)
+		{
+				return 1;
+		}
+}
+</pre>
+    		</div></div><br class="example-break">
+    	</div>
+    	
+    	
+    </div>
+	
+	
+</div></body></html>

BIN=BIN
modules/app_java/doc/pdf/app_java.pdf


BIN=BIN
modules/app_java/doc/pdf/app_java_admin.pdf


+ 93 - 0
modules/app_java/doc/webhelp/ch01.html

@@ -0,0 +1,93 @@
+
+<!DOCTYPE html
+  PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Chapter 1. Admin Guide</title><meta name="generator" content="DocBook XSL Stylesheets V1.77.1"/><link rel="home" href="oxygen-main.html" title="app_java Module"/><link rel="up" href="oxygen-main.html" title="app_java Module"/><link rel="prev" href="oxygen-main.html" title="app_java Module"/><link rel="next" href="ch01s02.html" title="Dependencies"/><meta http-equiv="Content-Type" content="text/html; charset=utf-8"/><link rel="stylesheet" type="text/css" href="oxygen-webhelp/resources/css/webhelp_topic.css"/>
+<script type="text/javascript" src="oxygen-webhelp/resources/js/jquery.js"> </script>
+<script type="text/javascript" src="oxygen-webhelp/resources/js/jquery-ui.custom.min.js"> </script>
+<script type="text/javascript" src="oxygen-webhelp/resources/js/frames_redirect.js"> </script>                                        <script type="text/javascript" charset="utf-8" src="oxygen-webhelp/resources/localization/strings.js"> </script>                         <script type="text/javascript" charset="utf-8" src="oxygen-webhelp/resources/js/comments-functions.js"> </script>                         <script type="text/javascript" charset="utf-8" src="oxygen-webhelp/resources/php/cnf.php"> </script>                         <script type="text/javascript" charset="utf-8" src="oxygen-webhelp/resources/js/init.js"> </script>
+<script type="text/javascript"><!--
+    var prefix = "oxygen-main";
+    var ratingFile = "";
+    redirectToToc(window.location.search);
+    function highlightSearchTerm(){
+        if(parent.termsToHighlight != null){
+        // highlight each term in the content view  
+          for(i = 0 ; i < parent.termsToHighlight.length ; i++){        
+              $('*', window.parent.contentwin.document).highlight(parent.termsToHighlight[i]);
+          }
+        }
+    }
+//--></script>
+</head><body onload="highlightSearchTerm()"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 1. Admin Guide</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="oxygen-main.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="ch01s02.html">Next</a></td></tr></table><hr/></div><span class="frames"><script type="text/javascript"><!--                    
+									 if (top === self) { 
+							        document.write("<div class='wFrames'><a href=" + getPath(location.pathname) + ">With Frames</a></div>");							
+						        } else {
+						          //document.write("<div class='wFramesPerma'><a href=" + getPath(location.pathname) + " target='_top' title='link to this page'>Link</a></div>");						
+						        }       
+                  --></script></span>
+<div class="chapter" id="d6e16"><div class="titlepage"><div><div><h1 class="title">Chapter 1. Admin Guide</h1></div></div></div><div class="toc"><p><strong>Table of Contents</strong></p><dl><dt><span class="section"><a href="ch01.html#d6e18">Overview</a></span></dt><dt><span class="section"><a href="ch01s02.html">Dependencies</a></span></dt><dd><dl><dt><span class="section"><a href="ch01s02.html#d6e23">Kamailio Modules</a></span></dt><dt><span class="section"><a href="ch01s02.html#d6e30">External Libraries or Applications</a></span></dt></dl></dd><dt><span class="section"><a href="ch01s03.html">Java runtime</a></span></dt><dd><dl><dt><span class="section"><a href="ch01s03.html#d6e84"/></span></dt></dl></dd><dt><span class="section"><a href="ch01s04.html">Parameters</a></span></dt><dd><dl><dt><span class="section"><a href="ch01s04.html#d6e89"><code class="varname">class_name</code> (string)</a></span></dt><dt><span class="section"><a href="ch01s04.html#d6e102"><code class="varname">child_init_method</code> (string)</a></span></dt><dt><span class="section"><a href="ch01s04.html#d6e113"><code class="varname">java_options</code> (string)</a></span></dt><dt><span class="section"><a href="ch01s04.html#d6e138"><code class="varname">force_kam_cmd_exec</code> (int)</a></span></dt></dl></dd><dt><span class="section"><a href="ch01s05.html">Functions</a></span></dt><dd><dl><dt><span class="section"><a href="ch01s05.html#d6e152">
+    			Common requirements
+    		</a></span></dt><dt><span class="section"><a href="ch01s05.html#d6e161">java_method_exec(method, method_signature, [param1[, param2[, ...]]])</a></span></dt><dt><span class="section"><a href="ch01s05.html#d6e196">java_staticmethod_exec(method, method_signature, [param1[, param2[, ...]]])</a></span></dt><dt><span class="section"><a href="ch01s05.html#d6e231">java_s_method_exec(method, method_signature, [param1[, param2[, ...]]])</a></span></dt><dt><span class="section"><a href="ch01s05.html#d6e269">java_s_staticmethod_exec(method, method_signature, [param1[, param2[, ...]]])</a></span></dt></dl></dd><dt><span class="section"><a href="ch01s06.html">Java Module API</a></span></dt><dd><dl><dt><span class="section"><a href="ch01s06.html#d6e310">Minimal program skeleton</a></span></dt></dl></dd></dl></div>
+    
+    
+    
+    
+    <div class="section" id="d6e18"><div class="titlepage"><div><div><h2 class="title" style="clear: both">Overview</h2></div></div></div>
+		
+		<p>
+			This module allows executing Java compiled classes from config file, exporting
+			functions to access the SIP message from Java using Java Native Interface (JNI).
+		</p>
+    </div>
+	
+	
+	
+    
+	
+	
+	
+	
+	
+	
+	
+	
+	
+	
+	
+    
+	
+	
+	
+    
+	
+	
+</div><div class="navfooter"><hr/><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="oxygen-main.html">Prev</a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="ch01s02.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">app_java Module </td><td width="20%" align="center"><a accesskey="h" href="oxygen-main.html">Home</a></td><td width="40%" align="right" valign="top"> Dependencies</td></tr></table></div><div class="footer">WebHelp output generated by<a href="http://www.oxygenxml.com" target="_blank"><span class="oXygenLogo"><img src="oxygen-webhelp/resources/img/LogoOxygen100x22.png" alt="Oxygen"/></span><span class="xmlauthor">XML Author</span></a>.
+        </div>    <script type="text/javascript">
+        <!--
+            function expand(){
+                if (parent.tocwin){
+                    parent.tocwin.expandToTopic(window.location.href, this.getAttribute('href'));
+                }
+            }
+            var aArray = document.getElementsByTagName('a');
+            var i;
+            for (i = 0; i< aArray.length; i++){
+              aArray[i].onclick = expand;
+            }
+        -->
+    </script> 
+    <script type="text/javascript">
+        <!--
+            function expand(){
+                if (parent.tocwin){
+                    parent.tocwin.expandToTopic(window.location.href, this.getAttribute('href'));
+                }
+            }
+            var aArray = document.getElementsByTagName('a');
+            var i;
+            for (i = 0; i< aArray.length; i++){
+              aArray[i].onclick = expand;
+            }
+        -->
+    </script> 
+</body></html>

+ 74 - 0
modules/app_java/doc/webhelp/ch01s02.html

@@ -0,0 +1,74 @@
+
+<!DOCTYPE html
+  PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Dependencies</title><meta name="generator" content="DocBook XSL Stylesheets V1.77.1"/><link rel="home" href="oxygen-main.html" title="Chapter 1. Admin Guide"/><link rel="up" href="oxygen-main.html" title="Chapter 1. Admin Guide"/><link rel="prev" href="oxygen-main.html" title="Chapter 1. Admin Guide"/><link rel="next" href="ch01s03.html" title="Java runtime"/><meta http-equiv="Content-Type" content="text/html; charset=utf-8"/><link rel="stylesheet" type="text/css" href="oxygen-webhelp/resources/css/webhelp_topic.css"/>
+<script type="text/javascript" src="oxygen-webhelp/resources/js/jquery.js"> </script>
+<script type="text/javascript" src="oxygen-webhelp/resources/js/jquery-ui.custom.min.js"> </script>
+<script type="text/javascript" src="oxygen-webhelp/resources/js/frames_redirect.js"> </script>                                        <script type="text/javascript" charset="utf-8" src="oxygen-webhelp/resources/localization/strings.js"> </script>                         <script type="text/javascript" charset="utf-8" src="oxygen-webhelp/resources/js/comments-functions.js"> </script>                         <script type="text/javascript" charset="utf-8" src="oxygen-webhelp/resources/php/cnf.php"> </script>                         <script type="text/javascript" charset="utf-8" src="oxygen-webhelp/resources/js/init.js"> </script>
+<script type="text/javascript"><!--
+    var prefix = "oxygen-main";
+    var ratingFile = "";
+    redirectToToc(window.location.search);
+    function highlightSearchTerm(){
+        if(parent.termsToHighlight != null){
+        // highlight each term in the content view  
+          for(i = 0 ; i < parent.termsToHighlight.length ; i++){        
+              $('*', window.parent.contentwin.document).highlight(parent.termsToHighlight[i]);
+          }
+        }
+    }
+//--></script>
+</head><body onload="highlightSearchTerm()"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Dependencies</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="oxygen-main.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="ch01s03.html">Next</a></td></tr></table><hr/></div><span class="frames"><script type="text/javascript"><!--                    
+									 if (top === self) { 
+							        document.write("<div class='wFrames'><a href=" + getPath(location.pathname) + ">With Frames</a></div>");							
+						        } else {
+						          //document.write("<div class='wFramesPerma'><a href=" + getPath(location.pathname) + " target='_top' title='link to this page'>Link</a></div>");						
+						        }       
+                  --></script></span>
+<div class="section" id="d6e6"><div class="titlepage"><div><div><h2 class="title" style="clear: both">Dependencies</h2></div></div></div>
+		
+    	
+		<div class="section" id="d6e8"><div class="titlepage"><div><div><h3 class="title">Kamailio Modules</h3></div></div></div>
+		    
+		    <p>
+			The following modules must be loaded before this module:
+		    	</p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem">
+				<p>
+				    <span class="emphasis"><em>none</em></span>.
+				</p>
+			    </li></ul></div><p>
+		    </p>
+		</div>
+    	
+    	
+    	
+		<div class="section" id="d6e15"><div class="titlepage"><div><div><h3 class="title">External Libraries or Applications</h3></div></div></div>
+		    
+		    <p>
+			
+		    	</p><div class="itemizedlist"><p><span class="emphasis"><em>The following packages are runtime libraries, required to launch</em></span></p><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem" style="list-style-type: disc"><p><span class="emphasis"><em>java-common</em></span> Base of all Java packages.</p></li><li class="listitem" style="list-style-type: disc"><p><span class="emphasis"><em>default-jre</em></span> Standard Java or Java compatible Runtime.</p></li><li class="listitem" style="list-style-type: disc"><p><span class="emphasis"><em>gcj-jre</em></span> Java runtime environment using GIJ/classpath.</p></li><li class="listitem" style="list-style-type: disc"><p><span class="emphasis"><em>libgcj12 (&gt;=12)</em></span> Java runtime library for use with gcj.</p></li></ul></div><p>
+		    	</p><div class="itemizedlist"><p><span class="emphasis"><em>The following packages are optional, required for development</em></span></p><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem" style="list-style-type: square"><p><span class="emphasis"><em>ant</em></span> Java based build tool like make.</p></li><li class="listitem" style="list-style-type: square"><p><span class="emphasis"><em>ant-contrib</em></span> Collection of tasks, types and other tools for Apache Ant.</p></li><li class="listitem" style="list-style-type: square"><p><span class="emphasis"><em>ant-gcj</em></span> Java based build tool like make (GCJ).</p></li><li class="listitem" style="list-style-type: square"><p><span class="emphasis"><em>default-jdk</em></span> Standard Java or Java compatible Development Kit</p></li><li class="listitem" style="list-style-type: square"><p><span class="emphasis"><em>gcj-jdk</em></span> gcj and classpath development tools for Java(TM)</p></li><li class="listitem" style="list-style-type: square"><p><span class="emphasis"><em>libgcj13-dev (&gt;=12)</em></span> Java development headers for use with gcj</p></li><li class="listitem" style="list-style-type: square"><p><span class="emphasis"><em>jdk</em></span> JDK Development Kit (either oracle jdk or openjdk)</p></li></ul></div><p>
+		    </p>
+			<p>
+				The following libraries or applications must be compiled before
+				running Kamailio with this module loaded:
+				</p><div class="itemizedlist"><p><span class="emphasis"><em>The following packages are runtime libraries, required to launch</em></span></p><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem" style="list-style-type: circle"><p><span class="emphasis"><em>&lt;class_name&gt;</em></span>.class</p></li><li class="listitem" style="list-style-type: circle"><p><span class="emphasis"><em>kamailio</em></span>.jar</p></li></ul></div><p>
+			</p>
+		</div>
+    	
+    </div><div class="navfooter"><hr/><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="oxygen-main.html">Prev</a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="ch01s03.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 1. Admin Guide </td><td width="20%" align="center"><a accesskey="h" href="oxygen-main.html">Home</a></td><td width="40%" align="right" valign="top"> Java runtime</td></tr></table></div><div class="footer">WebHelp output generated by<a href="http://www.oxygenxml.com" target="_blank"><span class="oXygenLogo"><img src="oxygen-webhelp/resources/img/LogoOxygen100x22.png" alt="Oxygen"/></span><span class="xmlauthor">XML Author</span></a>.
+        </div>    <script type="text/javascript">
+        <!--
+            function expand(){
+                if (parent.tocwin){
+                    parent.tocwin.expandToTopic(window.location.href, this.getAttribute('href'));
+                }
+            }
+            var aArray = document.getElementsByTagName('a');
+            var i;
+            for (i = 0; i< aArray.length; i++){
+              aArray[i].onclick = expand;
+            }
+        -->
+    </script> 
+</body></html>

+ 49 - 0
modules/app_java/doc/webhelp/ch01s03.html

@@ -0,0 +1,49 @@
+
+<!DOCTYPE html
+  PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Java runtime</title><meta name="generator" content="DocBook XSL Stylesheets V1.77.1"/><link rel="home" href="oxygen-main.html" title="Chapter 1. Admin Guide"/><link rel="up" href="oxygen-main.html" title="Chapter 1. Admin Guide"/><link rel="prev" href="ch01s02.html" title="Dependencies"/><link rel="next" href="ch01s04.html" title="Parameters"/><meta http-equiv="Content-Type" content="text/html; charset=utf-8"/><link rel="stylesheet" type="text/css" href="oxygen-webhelp/resources/css/webhelp_topic.css"/>
+<script type="text/javascript" src="oxygen-webhelp/resources/js/jquery.js"> </script>
+<script type="text/javascript" src="oxygen-webhelp/resources/js/jquery-ui.custom.min.js"> </script>
+<script type="text/javascript" src="oxygen-webhelp/resources/js/frames_redirect.js"> </script>                                        <script type="text/javascript" charset="utf-8" src="oxygen-webhelp/resources/localization/strings.js"> </script>                         <script type="text/javascript" charset="utf-8" src="oxygen-webhelp/resources/js/comments-functions.js"> </script>                         <script type="text/javascript" charset="utf-8" src="oxygen-webhelp/resources/php/cnf.php"> </script>                         <script type="text/javascript" charset="utf-8" src="oxygen-webhelp/resources/js/init.js"> </script>
+<script type="text/javascript"><!--
+    var prefix = "oxygen-main";
+    var ratingFile = "";
+    redirectToToc(window.location.search);
+    function highlightSearchTerm(){
+        if(parent.termsToHighlight != null){
+        // highlight each term in the content view  
+          for(i = 0 ; i < parent.termsToHighlight.length ; i++){        
+              $('*', window.parent.contentwin.document).highlight(parent.termsToHighlight[i]);
+          }
+        }
+    }
+//--></script>
+</head><body onload="highlightSearchTerm()"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Java runtime</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch01s02.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="ch01s04.html">Next</a></td></tr></table><hr/></div><span class="frames"><script type="text/javascript"><!--                    
+									 if (top === self) { 
+							        document.write("<div class='wFrames'><a href=" + getPath(location.pathname) + ">With Frames</a></div>");							
+						        } else {
+						          //document.write("<div class='wFramesPerma'><a href=" + getPath(location.pathname) + " target='_top' title='link to this page'>Link</a></div>");						
+						        }       
+                  --></script></span>
+<div class="section" id="d6e67"><div class="titlepage"><div><div><h2 class="title" style="clear: both">Java runtime</h2></div></div></div>
+		
+		<div class="section" id="d6e69"><div class="titlepage"><div><div><h3 class="title"/></div></div></div>
+			
+			<p>Java runtime library (JRE or JDK) is required to use this module.</p>
+		</div>
+	</div><div class="navfooter"><hr/><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch01s02.html">Prev</a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="ch01s04.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Dependencies </td><td width="20%" align="center"><a accesskey="h" href="oxygen-main.html">Home</a></td><td width="40%" align="right" valign="top"> Parameters</td></tr></table></div><div class="footer">WebHelp output generated by<a href="http://www.oxygenxml.com" target="_blank"><span class="oXygenLogo"><img src="oxygen-webhelp/resources/img/LogoOxygen100x22.png" alt="Oxygen"/></span><span class="xmlauthor">XML Author</span></a>.
+        </div>    <script type="text/javascript">
+        <!--
+            function expand(){
+                if (parent.tocwin){
+                    parent.tocwin.expandToTopic(window.location.href, this.getAttribute('href'));
+                }
+            }
+            var aArray = document.getElementsByTagName('a');
+            var i;
+            for (i = 0; i< aArray.length; i++){
+              aArray[i].onclick = expand;
+            }
+        -->
+    </script> 
+</body></html>

+ 159 - 0
modules/app_java/doc/webhelp/ch01s04.html

@@ -0,0 +1,159 @@
+
+<!DOCTYPE html
+  PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Parameters</title><meta name="generator" content="DocBook XSL Stylesheets V1.77.1"/><link rel="home" href="oxygen-main.html" title="Chapter 1. Admin Guide"/><link rel="up" href="oxygen-main.html" title="Chapter 1. Admin Guide"/><link rel="prev" href="ch01s03.html" title="Java runtime"/><link rel="next" href="ch01s05.html" title="Functions"/><meta http-equiv="Content-Type" content="text/html; charset=utf-8"/><link rel="stylesheet" type="text/css" href="oxygen-webhelp/resources/css/webhelp_topic.css"/>
+<script type="text/javascript" src="oxygen-webhelp/resources/js/jquery.js"> </script>
+<script type="text/javascript" src="oxygen-webhelp/resources/js/jquery-ui.custom.min.js"> </script>
+<script type="text/javascript" src="oxygen-webhelp/resources/js/frames_redirect.js"> </script>                                        <script type="text/javascript" charset="utf-8" src="oxygen-webhelp/resources/localization/strings.js"> </script>                         <script type="text/javascript" charset="utf-8" src="oxygen-webhelp/resources/js/comments-functions.js"> </script>                         <script type="text/javascript" charset="utf-8" src="oxygen-webhelp/resources/php/cnf.php"> </script>                         <script type="text/javascript" charset="utf-8" src="oxygen-webhelp/resources/js/init.js"> </script>
+<script type="text/javascript"><!--
+    var prefix = "oxygen-main";
+    var ratingFile = "";
+    redirectToToc(window.location.search);
+    function highlightSearchTerm(){
+        if(parent.termsToHighlight != null){
+        // highlight each term in the content view  
+          for(i = 0 ; i < parent.termsToHighlight.length ; i++){        
+              $('*', window.parent.contentwin.document).highlight(parent.termsToHighlight[i]);
+          }
+        }
+    }
+//--></script>
+</head><body onload="highlightSearchTerm()"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Parameters</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch01s03.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="ch01s05.html">Next</a></td></tr></table><hr/></div><span class="frames"><script type="text/javascript"><!--                    
+									 if (top === self) { 
+							        document.write("<div class='wFrames'><a href=" + getPath(location.pathname) + ">With Frames</a></div>");							
+						        } else {
+						          //document.write("<div class='wFramesPerma'><a href=" + getPath(location.pathname) + " target='_top' title='link to this page'>Link</a></div>");						
+						        }       
+                  --></script></span>
+<div class="section" id="d6e72"><div class="titlepage"><div><div><h2 class="title" style="clear: both">Parameters</h2></div></div></div>
+		
+
+		
+		<div class="section" id="d6e74"><div class="titlepage"><div><div><h3 class="title"><code class="varname">class_name</code> (string)</h3></div></div></div>
+			
+		    <p>
+		    	The class name should have the same compiled file name.
+		    	If the value is <span class="emphasis"><em>"Kamailio"</em></span>, then the compiled file should be named as <span class="emphasis"><em>"Kamailio.class"</em></span>.
+		    </p>
+		    <p>
+				<span class="emphasis"><em>
+					Default value is <span class="quote">“<span class="quote">Kamailio</span>”</span>.
+				</em></span>
+		    </p>
+		    <div class="example" id="d6e83"><p class="title"><strong>Example 1.1. Set <code class="varname">class_name</code> parameter</strong></p><div class="example-contents">
+		    	
+				<pre class="programlisting">
+...
+modparam("app_java", "class_name", "Kamailio")
+...
+</pre>
+		    </div></div><br class="example-break"/>
+		</div>
+
+		
+		<div class="section" id="d6e87"><div class="titlepage"><div><div><h3 class="title"><code class="varname">child_init_method</code> (string)</h3></div></div></div>
+			
+			<p>
+				TBD.
+			</p>
+			<p>
+				<span class="emphasis"><em>
+					Default value is <span class="quote">“<span class="quote">child_init</span>”</span>.
+				</em></span>
+			</p>
+			<div class="example" id="d6e94"><p class="title"><strong>Example 1.2. Set <code class="varname">child_init_method</code> parameter</strong></p><div class="example-contents">
+				
+				<pre class="programlisting">
+...
+modparam("app_java", "child_init_method", "my_mod_init")
+...
+</pre>
+			</div></div><br class="example-break"/>
+		</div>
+
+		
+		<div class="section" id="d6e98"><div class="titlepage"><div><div><h3 class="title"><code class="varname">java_options</code> (string)</h3></div></div></div>
+			
+			<p>
+				Java options for Java Virtual Machine.
+				For more info read <a class="ulink" href="http://docs.oracle.com/javase/6/docs/technotes/tools/windows/java.html" target="_top"><em class="citetitle">java docs</em></a>
+			</p>
+			<p>
+				<span class="emphasis"><em>
+					Default value is <span class="quote">“<span class="quote">-Djava.compiler=NONE</span>”</span>.
+				</em></span>
+			</p>
+			<div class="example" id="d6e107"><p class="title"><strong>Example 1.3. Set <code class="varname">java_options</code> parameter</strong></p><div class="example-contents">
+				
+				<pre class="programlisting">
+...
+modparam("app_java", "java_options", "-Djava.compiler=NONE")
+...
+</pre>
+			</div></div><br class="example-break"/>
+			<div class="example" id="d6e111"><p class="title"><strong>Example 1.4. Set <code class="varname">java_options</code> parameter (live configuration)</strong></p><div class="example-contents">
+				
+				<pre class="programlisting">
+...
+# Assumes "application java folder" is located at /opt/kamailio/java
+modparam("app_java", "java_options", "-Djava.compiler=NONE -Djava.class.path=/path/to/kamailio/modules:/opt/kamailio/java:/opt/kamailio/java/kamailio.jar")
+...
+</pre>
+			</div></div><br class="example-break"/>
+			<div class="example" id="d6e115"><p class="title"><strong>Example 1.5. Set <code class="varname">java_options</code> parameter (verbose configuration)</strong></p><div class="example-contents">
+				
+				<pre class="programlisting">
+...
+# Assumes "application java folder" is located at /opt/kamailio/java
+modparam("app_java", "java_options", "-verbose:gc,class,jni -Djava.compiler=NONE -Djava.class.path=/path/to/kamailio/modules:/opt/kamailio/java:/opt/kamailio/java/kamailio.jar")
+...
+</pre>
+			</div></div><br class="example-break"/>
+			<div class="example" id="d6e119"><p class="title"><strong>Example 1.6. Set <code class="varname">java_options</code> parameter (debug configuration)</strong></p><div class="example-contents">
+				
+				<pre class="programlisting">
+...
+# Assumes "application java folder" is located at /opt/kamailio/java
+modparam("app_java", "java_options", "-Xdebug -verbose:gc,class,jni -Djava.compiler=NONE -Djava.class.path=/path/to/kamailio/modules:/opt/kamailio/java:/opt/kamailio/java/kamailio.jar")
+...
+</pre>
+			</div></div><br class="example-break"/>
+		</div>
+
+		
+		<div class="section" id="d6e123"><div class="titlepage"><div><div><h3 class="title"><code class="varname">force_kam_cmd_exec</code> (int)</h3></div></div></div>
+			
+			<p>
+				This parameter forces execution a kamailio comnmand with java native method <span class="quote">“<span class="quote">KamExec</span>”</span>.
+				# Note: this is an untested yet feature, may cause (but may not) a memory leaks if used from embedded languages.
+			</p>
+			<p>
+				<span class="emphasis"><em>
+					Default value is <span class="quote">“<span class="quote">0 (off)</span>”</span>.
+				</em></span>
+			</p>
+			<div class="example" id="d6e131"><p class="title"><strong>Example 1.7. Set <code class="varname">force_kam_cmd_exec</code> parameter</strong></p><div class="example-contents">
+				
+				<pre class="programlisting">
+...
+modparam("app_java", "force_kam_cmd_exec", 1)
+...
+</pre>
+			</div></div><br class="example-break"/>
+		</div>
+	</div><div class="navfooter"><hr/><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch01s03.html">Prev</a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="ch01s05.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Java runtime </td><td width="20%" align="center"><a accesskey="h" href="oxygen-main.html">Home</a></td><td width="40%" align="right" valign="top"> Functions</td></tr></table></div><div class="footer">WebHelp output generated by<a href="http://www.oxygenxml.com" target="_blank"><span class="oXygenLogo"><img src="oxygen-webhelp/resources/img/LogoOxygen100x22.png" alt="Oxygen"/></span><span class="xmlauthor">XML Author</span></a>.
+        </div>    <script type="text/javascript">
+        <!--
+            function expand(){
+                if (parent.tocwin){
+                    parent.tocwin.expandToTopic(window.location.href, this.getAttribute('href'));
+                }
+            }
+            var aArray = document.getElementsByTagName('a');
+            var i;
+            for (i = 0; i< aArray.length; i++){
+              aArray[i].onclick = expand;
+            }
+        -->
+    </script> 
+</body></html>

+ 394 - 0
modules/app_java/doc/webhelp/ch01s05.html

@@ -0,0 +1,394 @@
+
+<!DOCTYPE html
+  PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Functions</title><meta name="generator" content="DocBook XSL Stylesheets V1.77.1"/><link rel="home" href="oxygen-main.html" title="Chapter 1. Admin Guide"/><link rel="up" href="oxygen-main.html" title="Chapter 1. Admin Guide"/><link rel="prev" href="ch01s04.html" title="Parameters"/><link rel="next" href="ch01s06.html" title="Java Module API"/><meta http-equiv="Content-Type" content="text/html; charset=utf-8"/><link rel="stylesheet" type="text/css" href="oxygen-webhelp/resources/css/webhelp_topic.css"/>
+<script type="text/javascript" src="oxygen-webhelp/resources/js/jquery.js"> </script>
+<script type="text/javascript" src="oxygen-webhelp/resources/js/jquery-ui.custom.min.js"> </script>
+<script type="text/javascript" src="oxygen-webhelp/resources/js/frames_redirect.js"> </script>                                        <script type="text/javascript" charset="utf-8" src="oxygen-webhelp/resources/localization/strings.js"> </script>                         <script type="text/javascript" charset="utf-8" src="oxygen-webhelp/resources/js/comments-functions.js"> </script>                         <script type="text/javascript" charset="utf-8" src="oxygen-webhelp/resources/php/cnf.php"> </script>                         <script type="text/javascript" charset="utf-8" src="oxygen-webhelp/resources/js/init.js"> </script>
+<script type="text/javascript"><!--
+    var prefix = "oxygen-main";
+    var ratingFile = "";
+    redirectToToc(window.location.search);
+    function highlightSearchTerm(){
+        if(parent.termsToHighlight != null){
+        // highlight each term in the content view  
+          for(i = 0 ; i < parent.termsToHighlight.length ; i++){        
+              $('*', window.parent.contentwin.document).highlight(parent.termsToHighlight[i]);
+          }
+        }
+    }
+//--></script>
+</head><body onload="highlightSearchTerm()"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Functions</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch01s04.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="ch01s06.html">Next</a></td></tr></table><hr/></div><span class="frames"><script type="text/javascript"><!--                    
+									 if (top === self) { 
+							        document.write("<div class='wFrames'><a href=" + getPath(location.pathname) + ">With Frames</a></div>");							
+						        } else {
+						          //document.write("<div class='wFramesPerma'><a href=" + getPath(location.pathname) + " target='_top' title='link to this page'>Link</a></div>");						
+						        }       
+                  --></script></span>
+<div class="section" id="d6e135"><div class="titlepage"><div><div><h2 class="title" style="clear: both">Functions</h2></div></div></div>
+		
+    	
+    	
+    	<div class="section" id="d6e137"><div class="titlepage"><div><div><h3 class="title">
+    			Common requirements
+    		</h3></div></div></div>
+    		
+    		<p>Each function has a required parameter <span class="quote">“<span class="quote">method_signature</span>”</span>. For more info
+				see <a class="ulink" href="http://www.rgagnon.com/javadetails/java-0286.html" target="_top"><em class="citetitle">Determine the signature of a method</em></a>.
+				Signature represents the variable type. The mapping between the Java type and C type
+				is
+				</p><pre class="programlisting">
+		Type     Chararacter 
+		boolean      Z 
+		byte         B 
+		char         C 
+		double       D 
+		float        F 
+		int          I 
+		long         J 
+		object       L 
+		short        S 
+		void         V 
+		Note that to specify an object, the "L" is followed by the object's class name and ends with a semi-colon, ';' .
+    			</pre><p>
+			</p>
+    		<p> app_java supports the following signatures:
+				</p><pre class="programlisting">
+		Primitives: Z,B,C,D,F,I,J,L,S,V
+		Objects: 
+			Ljava/lang/Boolean;
+			Ljava/lang/Byte;
+			Ljava/lang/Character;
+			Ljava/lang/Double;
+			Ljava/lang/Float;
+			Ljava/lang/Integer;
+			Ljava/lang/Long;
+			Ljava/lang/Short;
+			Ljava/lang/String;
+			NULL parameter: V
+
+	Each parameter passed to function will be cast according to given signature.
+	
+	Parameters are optional, ommitting a parameter meant the passed value is NULL.
+	Parameters count should be exactly the same as signature count.
+	Note 1: Arrays representation (symbol '[') is not supported yet.
+	Note 2: You shall use a correct signature, e.g. the following examples of combinations are invalid:    
+    	java_method_exec("ExampleMethod", "ZI", "False");
+        java_method_exec("ExampleMethod", "LI", "something", "5");
+</pre><p>
+			</p>
+
+ 
+    	</div>
+    	
+  
+    	
+    	<div class="section" id="d6e146"><div class="titlepage"><div><div><h3 class="title">java_method_exec(method, method_signature, [param1[, param2[, ...]]])</h3></div></div></div>
+    		
+    		<p>Executes a java class method <span class="emphasis"><em>method</em></span>. Parameter <span class="emphasis"><em>method_signature</em></span> is required.</p>
+    		<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem">
+			    	<div class="example" id="d6e153"><p class="title"><strong>Example 1.8. Signature: "V"</strong></p><div class="example-contents">
+						
+			    		<p>Kamailio prototype</p>
+			    		<pre class="programlisting">java_method_exec("ExampleMethod", "V");</pre>
+			    		<p>Java prototype</p>
+			    		<pre class="programlisting">public int ExampleMethod();</pre>
+			    		<p>Example of usage:</p>
+			    		<pre class="programlisting">
+# Kamailio
+java_method_exec("ExampleMethod", "V");
+
+# Java
+public int ExampleMethod()
+{
+		... do something;
+		return 1;
+}
+</pre>
+			    	</div></div><br class="example-break"/>
+	    		</li><li class="listitem">
+	    			<div class="example" id="d6e162"><p class="title"><strong>Example 1.9. Signature: "Ljava/lang/String;I"</strong></p><div class="example-contents">
+	    				
+	    				<p>Kamailio prototype</p>
+		    			<pre class="programlisting">java_method_exec("ExampleMethod", "Ljava/lang/String;I", "Hello world", "5");</pre>
+	    				<p>Java prototype</p>
+	    				<pre class="programlisting">public int ExampleMethod(String param1, int param2);</pre>
+	    				<p>In the above scenario parameter 2 ("5") will be cast to integer representation.</p>
+	    				<p>Example of usage:</p>
+	    				<pre class="programlisting">
+# Kamailio
+java_method_exec("ExampleMethod", "Ljava/lang/String;I", "$mb", "$ml");
+
+# Java
+public int ExampleMethod(String SipMessageBuffer, int SipMessageLenght)
+{
+		... do something with buffer;
+		return 1;
+}
+</pre>
+	    			</div></div><br class="example-break"/>
+	    		</li><li class="listitem">
+    				<div class="example" id="d6e172"><p class="title"><strong>Example 1.10. Signature: "ZB"</strong></p><div class="example-contents">
+    					
+    					<p>Kamailio prototype</p>
+    					<pre class="programlisting">java_method_exec("ExampleMethod", "ZB", "true", "0x05");</pre>
+    					<p>Java prototype</p>
+    					<pre class="programlisting">public int ExampleMethod(boolean param1, byte param2);</pre>
+    					<p>In the above scenario parameter 1 ("true") will be cast to boolean representation.</p>
+    					<p>Example of usage:</p>
+    					<pre class="programlisting">
+# Kamailio
+java_method_exec("ExampleMethod", "ZB", "true", "0x05");
+
+# Java
+public int ExampleMethod(boolean flagSet, byte bFlag);
+{
+		if (flagSet)
+		{
+			... do something with flags;
+		}
+		return 1;
+}
+</pre>
+    				</div></div><br class="example-break"/>
+    			</li></ul></div>
+    	</div>
+    	
+
+    	
+    	<div class="section" id="d6e181"><div class="titlepage"><div><div><h3 class="title">java_staticmethod_exec(method, method_signature, [param1[, param2[, ...]]])</h3></div></div></div>
+    		
+    		<p>Executes a java static method <span class="emphasis"><em>method</em></span>. Parameter <span class="emphasis"><em>method_signature</em></span> is required.</p>
+    		<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem">
+    				<div class="example" id="d6e188"><p class="title"><strong>Example 1.11. Signature: "V"</strong></p><div class="example-contents">
+    					
+    					<p>Kamailio prototype</p>
+    					<pre class="programlisting">java_staticmethod_exec("ExampleMethod", "V");</pre>
+    					<p>Java prototype</p>
+    					<pre class="programlisting">public static int ExampleMethod();</pre>
+    					<p>Example of usage:</p>
+    					<pre class="programlisting">
+# Kamailio
+java_staticmethod_exec("ExampleMethod", "V");
+
+# Java
+public static int ExampleMethod()
+{
+		... do something;
+		return 1;
+}
+</pre>
+    				</div></div><br class="example-break"/>
+    			</li><li class="listitem">
+    				<div class="example" id="d6e197"><p class="title"><strong>Example 1.12. Signature: "Ljava/lang/String;I"</strong></p><div class="example-contents">
+    					
+    					<p>Kamailio prototype</p>
+    					<pre class="programlisting">java_staticmethod_exec("ExampleMethod", "Ljava/lang/String;I", "Hello world", "5");</pre>
+    					<p>Java prototype</p>
+    					<pre class="programlisting">public static int ExampleMethod(String param1, int param2);</pre>
+    					<p>In the above scenario parameter 2 ("5") will be cast to integer representation.</p>
+    					<p>Example of usage:</p>
+    					<pre class="programlisting">
+# Kamailio
+java_staticmethod_exec("ExampleMethod", "Ljava/lang/String;I", "$mb", "$ml");
+
+# Java
+public static int ExampleMethod(String SipMessageBuffer, int SipMessageLenght)
+{
+		... do something with buffer;
+		return 1;
+}
+</pre>
+    				</div></div><br class="example-break"/>
+    			</li><li class="listitem">
+    				<div class="example" id="d6e207"><p class="title"><strong>Example 1.13. Signature: "ZB"</strong></p><div class="example-contents">
+    					
+    					<p>Kamailio prototype</p>
+    					<pre class="programlisting">java_staticmethod_exec("ExampleMethod", "ZB", "true", "0x05");</pre>
+    					<p>Java prototype</p>
+    					<pre class="programlisting">public static int ExampleMethod(boolean param1, byte param2);</pre>
+    					<p>In the above scenario parameter 1 ("true") will be cast to boolean representation.</p>
+    					<p>Example of usage:</p>
+    					<pre class="programlisting">
+# Kamailio
+java_staticmethod_exec("ExampleMethod", "ZB", "true", "0x05");
+
+# Java
+public static int ExampleMethod(boolean flagSet, byte bFlag);
+{
+		if (flagSet)
+		{
+			... do something with flags;
+		}
+		return 1;
+}
+</pre>
+    				</div></div><br class="example-break"/>
+    			</li></ul></div>
+    	</div>
+    	
+    	
+    	
+    	<div class="section" id="d6e216"><div class="titlepage"><div><div><h3 class="title">java_s_method_exec(method, method_signature, [param1[, param2[, ...]]])</h3></div></div></div>
+    		
+    		<p>Executes a java class synchronized method <span class="emphasis"><em>method</em></span>. Parameter <span class="emphasis"><em>method_signature</em></span> is required.</p>
+    		<p>For more info see <a class="ulink" href="http://docs.oracle.com/javase/tutorial/essential/concurrency/syncmeth.html" target="_top"><em class="citetitle">Synchronized Methods</em></a></p>
+    		<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem">
+    				<div class="example" id="d6e226"><p class="title"><strong>Example 1.14. Signature: "V"</strong></p><div class="example-contents">
+    					
+    					<p>Kamailio prototype</p>
+    					<pre class="programlisting">java_s_method_exec("ExampleMethod", "V");</pre>
+    					<p>Java prototype</p>
+    					<pre class="programlisting">public synchronized int ExampleMethod();</pre>
+    					<p>Example of usage:</p>
+    					<pre class="programlisting">
+# Kamailio
+java_s_method_exec("ExampleMethod", "V");
+
+# Java
+public synchronized int ExampleMethod()
+{
+		... do something;
+		return 1;
+}
+</pre>
+    				</div></div><br class="example-break"/>
+    			</li><li class="listitem">
+    				<div class="example" id="d6e235"><p class="title"><strong>Example 1.15. Signature: "Ljava/lang/String;I"</strong></p><div class="example-contents">
+    					
+    					<p>Kamailio prototype</p>
+    					<pre class="programlisting">java_s_method_exec("ExampleMethod", "Ljava/lang/String;I", "Hello world", "5");</pre>
+    					<p>Java prototype</p>
+    					<pre class="programlisting">public synchronized int ExampleMethod(String param1, int param2);</pre>
+    					<p>In the above scenario parameter 2 ("5") will be cast to integer representation.</p>
+    					<p>Example of usage:</p>
+    					<pre class="programlisting">
+# Kamailio
+java_s_method_exec("ExampleMethod", "Ljava/lang/String;I", "$mb", "$ml");
+
+# Java
+public synchronized int ExampleMethod(String SipMessageBuffer, int SipMessageLenght)
+{
+		... do something with buffer;
+		return 1;
+}
+</pre>
+    				</div></div><br class="example-break"/>
+    			</li><li class="listitem">
+    				<div class="example" id="d6e245"><p class="title"><strong>Example 1.16. Signature: "ZB"</strong></p><div class="example-contents">
+    					
+    					<p>Kamailio prototype</p>
+    					<pre class="programlisting">java_s_method_exec("ExampleMethod", "ZB", "true", "0x05");</pre>
+    					<p>Java prototype</p>
+    					<pre class="programlisting">public synchronized int ExampleMethod(boolean param1, byte param2);</pre>
+    					<p>In the above scenario parameter 1 ("true") will be cast to boolean representation.</p>
+    					<p>Example of usage:</p>
+    					<pre class="programlisting">
+# Kamailio
+java_s_method_exec("ExampleMethod", "ZB", "true", "0x05");
+
+# Java
+public synchronized int ExampleMethod(boolean flagSet, byte bFlag);
+{
+		if (flagSet)
+		{
+			... do something with flags;
+		}
+		return 1;
+}
+</pre>
+    				</div></div><br class="example-break"/>
+    			</li></ul></div>
+    	</div>
+    	
+    	
+    	
+    	<div class="section" id="d6e254"><div class="titlepage"><div><div><h3 class="title">java_s_staticmethod_exec(method, method_signature, [param1[, param2[, ...]]])</h3></div></div></div>
+    		
+    		<p>Executes a java synchronized static method <span class="emphasis"><em>method</em></span>. Parameter <span class="emphasis"><em>method_signature</em></span> is required.</p>
+    		<p>For more info see <a class="ulink" href="http://docs.oracle.com/javase/tutorial/essential/concurrency/syncmeth.html" target="_top"><em class="citetitle">Synchronized Methods</em></a></p>
+    		<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem">
+    				<div class="example" id="d6e264"><p class="title"><strong>Example 1.17. Signature: "V"</strong></p><div class="example-contents">
+    					
+    					<p>Kamailio prototype</p>
+    					<pre class="programlisting">java_s_staticmethod_exec("ExampleMethod", "V");</pre>
+    					<p>Java prototype</p>
+    					<pre class="programlisting">public static synchronized int ExampleMethod();</pre>
+    					<p>Example of usage:</p>
+    					<pre class="programlisting">
+# Kamailio
+java_s_staticmethod_exec("ExampleMethod", "V");
+
+# Java
+public static synchronized int ExampleMethod()
+{
+		... do something;
+		return 1;
+}
+</pre>
+    				</div></div><br class="example-break"/>
+    			</li><li class="listitem">
+    				<div class="example" id="d6e273"><p class="title"><strong>Example 1.18. Signature: "Ljava/lang/String;I"</strong></p><div class="example-contents">
+    					
+    					<p>Kamailio prototype</p>
+    					<pre class="programlisting">java_s_staticmethod_exec("ExampleMethod", "Ljava/lang/String;I", "Hello world", "5");</pre>
+    					<p>Java prototype</p>
+    					<pre class="programlisting">public static synchronized int ExampleMethod(String param1, int param2);</pre>
+    					<p>In the above scenario parameter 2 ("5") will be cast to integer representation.</p>
+    					<p>Example of usage:</p>
+    					<pre class="programlisting">
+# Kamailio
+java_s_staticmethod_exec("ExampleMethod", "Ljava/lang/String;I", "$mb", "$ml");
+
+# Java
+public static synchronized int ExampleMethod(String SipMessageBuffer, int SipMessageLenght)
+{
+		... do something with buffer;
+		return 1;
+}
+</pre>
+    				</div></div><br class="example-break"/>
+    			</li><li class="listitem">
+    				<div class="example" id="d6e283"><p class="title"><strong>Example 1.19. Signature: "ZB"</strong></p><div class="example-contents">
+    					
+    					<p>Kamailio prototype</p>
+    					<pre class="programlisting">java_s_staticmethod_exec("ExampleMethod", "ZB", "true", "0x05");</pre>
+    					<p>Java prototype</p>
+    					<pre class="programlisting">public static synchronized int ExampleMethod(boolean param1, byte param2);</pre>
+    					<p>In the above scenario parameter 1 ("true") will be cast to boolean representation.</p>
+    					<p>Example of usage:</p>
+    					<pre class="programlisting">
+# Kamailio
+java_s_staticmethod_exec("ExampleMethod", "ZB", "true", "0x05");
+
+# Java
+public static synchronized int ExampleMethod(boolean flagSet, byte bFlag);
+{
+		if (flagSet)
+		{
+			... do something with flags;
+		}
+		return 1;
+}
+</pre>
+    				</div></div><br class="example-break"/>
+    			</li></ul></div>
+    	</div>
+    	
+
+    </div><div class="navfooter"><hr/><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch01s04.html">Prev</a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="ch01s06.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Parameters </td><td width="20%" align="center"><a accesskey="h" href="oxygen-main.html">Home</a></td><td width="40%" align="right" valign="top"> Java Module API</td></tr></table></div><div class="footer">WebHelp output generated by<a href="http://www.oxygenxml.com" target="_blank"><span class="oXygenLogo"><img src="oxygen-webhelp/resources/img/LogoOxygen100x22.png" alt="Oxygen"/></span><span class="xmlauthor">XML Author</span></a>.
+        </div>    <script type="text/javascript">
+        <!--
+            function expand(){
+                if (parent.tocwin){
+                    parent.tocwin.expandToTopic(window.location.href, this.getAttribute('href'));
+                }
+            }
+            var aArray = document.getElementsByTagName('a');
+            var i;
+            for (i = 0; i< aArray.length; i++){
+              aArray[i].onclick = expand;
+            }
+        -->
+    </script> 
+</body></html>

+ 85 - 0
modules/app_java/doc/webhelp/ch01s06.html

@@ -0,0 +1,85 @@
+
+<!DOCTYPE html
+  PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Java Module API</title><meta name="generator" content="DocBook XSL Stylesheets V1.77.1"/><link rel="home" href="oxygen-main.html" title="Chapter 1. Admin Guide"/><link rel="up" href="oxygen-main.html" title="Chapter 1. Admin Guide"/><link rel="prev" href="ch01s05.html" title="Functions"/><meta http-equiv="Content-Type" content="text/html; charset=utf-8"/><link rel="stylesheet" type="text/css" href="oxygen-webhelp/resources/css/webhelp_topic.css"/>
+<script type="text/javascript" src="oxygen-webhelp/resources/js/jquery.js"> </script>
+<script type="text/javascript" src="oxygen-webhelp/resources/js/jquery-ui.custom.min.js"> </script>
+<script type="text/javascript" src="oxygen-webhelp/resources/js/frames_redirect.js"> </script>                                        <script type="text/javascript" charset="utf-8" src="oxygen-webhelp/resources/localization/strings.js"> </script>                         <script type="text/javascript" charset="utf-8" src="oxygen-webhelp/resources/js/comments-functions.js"> </script>                         <script type="text/javascript" charset="utf-8" src="oxygen-webhelp/resources/php/cnf.php"> </script>                         <script type="text/javascript" charset="utf-8" src="oxygen-webhelp/resources/js/init.js"> </script>
+<script type="text/javascript"><!--
+    var prefix = "oxygen-main";
+    var ratingFile = "";
+    redirectToToc(window.location.search);
+    function highlightSearchTerm(){
+        if(parent.termsToHighlight != null){
+        // highlight each term in the content view  
+          for(i = 0 ; i < parent.termsToHighlight.length ; i++){        
+              $('*', window.parent.contentwin.document).highlight(parent.termsToHighlight[i]);
+          }
+        }
+    }
+//--></script>
+</head><body onload="highlightSearchTerm()"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Java Module API</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch01s05.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> </td></tr></table><hr/></div><span class="frames"><script type="text/javascript"><!--                    
+									 if (top === self) { 
+							        document.write("<div class='wFrames'><a href=" + getPath(location.pathname) + ">With Frames</a></div>");							
+						        } else {
+						          //document.write("<div class='wFramesPerma'><a href=" + getPath(location.pathname) + " target='_top' title='link to this page'>Link</a></div>");						
+						        }       
+                  --></script></span>
+<div class="section" id="d6e292"><div class="titlepage"><div><div><h2 class="title" style="clear: both">Java Module API</h2></div></div></div>
+		
+    	<p/>
+    	
+    	
+    	<div class="section" id="d6e295"><div class="titlepage"><div><div><h3 class="title">Minimal program skeleton</h3></div></div></div>
+    		
+    		<p/>
+    		<div class="example" id="d6e298"><p class="title"><strong>Example 1.20. Minimal program skeleton</strong></p><div class="example-contents">
+    			
+    			<p/>
+    			<pre class="programlisting">
+import org.siprouter.*;
+import org.siprouter.NativeInterface.*;
+
+public class Kamailio extends NativeMethods
+{
+		/* Here you should specify a full path to app_java.so */
+		static
+		{
+				System.load("/opt/kamailio/lib/kamailio/modules/app_java.so");
+		}
+
+		/* Constructor. Do not remove !!! */
+		public Kamailio()
+		{
+		}
+
+		/*
+		This method should be executed for each children process, immediately after forking.
+		Required. Do not remove !!!
+		*/
+		public int child_init(int rank)
+		{
+				return 1;
+		}
+}
+</pre>
+    		</div></div><br class="example-break"/>
+    	</div>
+    	
+    	
+    </div><div class="navfooter"><hr/><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch01s05.html">Prev</a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> </td></tr><tr><td width="40%" align="left" valign="top">Functions </td><td width="20%" align="center"><a accesskey="h" href="oxygen-main.html">Home</a></td><td width="40%" align="right" valign="top"> </td></tr></table></div><div class="footer">WebHelp output generated by<a href="http://www.oxygenxml.com" target="_blank"><span class="oXygenLogo"><img src="oxygen-webhelp/resources/img/LogoOxygen100x22.png" alt="Oxygen"/></span><span class="xmlauthor">XML Author</span></a>.
+        </div>    <script type="text/javascript">
+        <!--
+            function expand(){
+                if (parent.tocwin){
+                    parent.tocwin.expandToTopic(window.location.href, this.getAttribute('href'));
+                }
+            }
+            var aArray = document.getElementsByTagName('a');
+            var i;
+            for (i = 0; i< aArray.length; i++){
+              aArray[i].onclick = expand;
+            }
+        -->
+    </script> 
+</body></html>

+ 27 - 0
modules/app_java/doc/webhelp/index.html

@@ -0,0 +1,27 @@
+
+<!DOCTYPE html
+  PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+   <head>
+      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+      <title>Chapter 1. Admin Guide</title>
+      <link rel="stylesheet" type="text/css" href="oxygen-webhelp/resources/css/commonltr.css" />
+      <link rel="stylesheet" type="text/css" href="oxygen-webhelp/resources/css/webhelp_frameset.css" /><script type="text/javascript">
+         <!--
+                        function getHTMLPage(){
+                           var currentPage = "oxygen-main.html#d6e3";
+                           var page = window.location.search.substr(1);
+                  
+                           if (page != ""){
+                            page = page.split("=");
+                            if (page[0] == 'q') currentPage = page[1];
+                           }
+                           
+                           return currentPage;
+                        }
+                        --></script></head>
+   <frameset cols="25%,*" onload="frames.contentwin.location = getHTMLPage()">
+      <frame name="tocwin" id="tocwin" src="toc.html" />
+      <frame name="contentwin" id="contentwin" src="./oxygen-webhelp/noScript.html" />
+   </frameset>
+</html>

+ 79 - 0
modules/app_java/doc/webhelp/oxygen-main.html

@@ -0,0 +1,79 @@
+
+<!DOCTYPE html
+  PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Chapter 1. Admin Guide</title><meta name="generator" content="DocBook XSL Stylesheets V1.77.1"/><link rel="home" href="oxygen-main.html" title="Chapter 1. Admin Guide"/><link rel="next" href="ch01s02.html" title="Dependencies"/><meta http-equiv="Content-Type" content="text/html; charset=utf-8"/><link rel="stylesheet" type="text/css" href="oxygen-webhelp/resources/css/webhelp_topic.css"/>
+<script type="text/javascript" src="oxygen-webhelp/resources/js/jquery.js"> </script>
+<script type="text/javascript" src="oxygen-webhelp/resources/js/jquery-ui.custom.min.js"> </script>
+<script type="text/javascript" src="oxygen-webhelp/resources/js/frames_redirect.js"> </script>                                        <script type="text/javascript" charset="utf-8" src="oxygen-webhelp/resources/localization/strings.js"> </script>                         <script type="text/javascript" charset="utf-8" src="oxygen-webhelp/resources/js/comments-functions.js"> </script>                         <script type="text/javascript" charset="utf-8" src="oxygen-webhelp/resources/php/cnf.php"> </script>                         <script type="text/javascript" charset="utf-8" src="oxygen-webhelp/resources/js/init.js"> </script>
+<script type="text/javascript"><!--
+    var prefix = "oxygen-main";
+    var ratingFile = "";
+    redirectToToc(window.location.search);
+    function highlightSearchTerm(){
+        if(parent.termsToHighlight != null){
+        // highlight each term in the content view  
+          for(i = 0 ; i < parent.termsToHighlight.length ; i++){        
+              $('*', window.parent.contentwin.document).highlight(parent.termsToHighlight[i]);
+          }
+        }
+    }
+//--></script>
+</head><body onload="highlightSearchTerm()"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 1. Admin Guide</th></tr><tr><td width="20%" align="left"> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="ch01s02.html">Next</a></td></tr></table><hr/></div><span class="frames"><script type="text/javascript"><!--                    
+									 if (top === self) { 
+							        document.write("<div class='wFrames'><a href=" + getPath(location.pathname) + ">With Frames</a></div>");							
+						        } else {
+						          //document.write("<div class='wFramesPerma'><a href=" + getPath(location.pathname) + " target='_top' title='link to this page'>Link</a></div>");						
+						        }       
+                  --></script></span>
+<div class="chapter" id="d6e1"><div class="titlepage"><div><div><h2 class="title">Chapter 1. Admin Guide</h2></div></div></div><div class="toc"><p><strong>Table of Contents</strong></p><dl><dt><span class="section"><a href="oxygen-main.html#d6e3">Overview</a></span></dt><dt><span class="section"><a href="ch01s02.html">Dependencies</a></span></dt><dd><dl><dt><span class="section"><a href="ch01s02.html#d6e8">Kamailio Modules</a></span></dt><dt><span class="section"><a href="ch01s02.html#d6e15">External Libraries or Applications</a></span></dt></dl></dd><dt><span class="section"><a href="ch01s03.html">Java runtime</a></span></dt><dd><dl><dt><span class="section"><a href="ch01s03.html#d6e69"/></span></dt></dl></dd><dt><span class="section"><a href="ch01s04.html">Parameters</a></span></dt><dd><dl><dt><span class="section"><a href="ch01s04.html#d6e74"><code class="varname">class_name</code> (string)</a></span></dt><dt><span class="section"><a href="ch01s04.html#d6e87"><code class="varname">child_init_method</code> (string)</a></span></dt><dt><span class="section"><a href="ch01s04.html#d6e98"><code class="varname">java_options</code> (string)</a></span></dt><dt><span class="section"><a href="ch01s04.html#d6e123"><code class="varname">force_kam_cmd_exec</code> (int)</a></span></dt></dl></dd><dt><span class="section"><a href="ch01s05.html">Functions</a></span></dt><dd><dl><dt><span class="section"><a href="ch01s05.html#d6e137">
+    			Common requirements
+    		</a></span></dt><dt><span class="section"><a href="ch01s05.html#d6e146">java_method_exec(method, method_signature, [param1[, param2[, ...]]])</a></span></dt><dt><span class="section"><a href="ch01s05.html#d6e181">java_staticmethod_exec(method, method_signature, [param1[, param2[, ...]]])</a></span></dt><dt><span class="section"><a href="ch01s05.html#d6e216">java_s_method_exec(method, method_signature, [param1[, param2[, ...]]])</a></span></dt><dt><span class="section"><a href="ch01s05.html#d6e254">java_s_staticmethod_exec(method, method_signature, [param1[, param2[, ...]]])</a></span></dt></dl></dd><dt><span class="section"><a href="ch01s06.html">Java Module API</a></span></dt><dd><dl><dt><span class="section"><a href="ch01s06.html#d6e295">Minimal program skeleton</a></span></dt></dl></dd></dl></div>
+    
+    
+    
+    
+    <div class="section" id="d6e3"><div class="titlepage"><div><div><h2 class="title" style="clear: both">Overview</h2></div></div></div>
+		
+		<p>
+			This module allows executing Java compiled classes from config file, exporting
+			functions to access the SIP message from Java using Java Native Interface (JNI).
+		</p>
+    </div>
+	
+	
+	
+    
+	
+	
+	
+	
+	
+	
+	
+	
+	
+	
+	
+    
+	
+	
+	
+    
+	
+	
+</div><div class="navfooter"><hr/><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="ch01s02.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"> </td><td width="20%" align="center"> </td><td width="40%" align="right" valign="top"> Dependencies</td></tr></table></div><div class="footer">WebHelp output generated by<a href="http://www.oxygenxml.com" target="_blank"><span class="oXygenLogo"><img src="oxygen-webhelp/resources/img/LogoOxygen100x22.png" alt="Oxygen"/></span><span class="xmlauthor">XML Author</span></a>.
+        </div>    <script type="text/javascript">
+        <!--
+            function expand(){
+                if (parent.tocwin){
+                    parent.tocwin.expandToTopic(window.location.href, this.getAttribute('href'));
+                }
+            }
+            var aArray = document.getElementsByTagName('a');
+            var i;
+            for (i = 0; i< aArray.length; i++){
+              aArray[i].onclick = expand;
+            }
+        -->
+    </script> 
+</body></html>

+ 32 - 0
modules/app_java/doc/webhelp/oxygen-webhelp/index.html

@@ -0,0 +1,32 @@
+<!DOCTYPE html SYSTEM "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>WebHelp</title>
+			<meta HTTP-EQUIV="REFRESH" content="0; url=../"/>        
+    </head>
+    <body>            
+            Current generated project :            
+            <!-- to be generated  -->
+<div id="productInfo" style="display:none;">
+	<span id="oxy_productid">${webhelp.product.id}</span>
+	<span id="oxy_productVersion">${webhelp.product.version}</span>
+</div>
+<!-- /to be generated  -->
+                 
+	<script type="text/javascript">
+    var pageSearch = window.location.href;
+    var pageWSearch = pageSearch.replace(window.location.search,"");
+    pageWSearch = pageWSearch.replace(window.location.hash,"");
+    var url=pageWSearch.split("/");
+    var newUrl="";
+    for ( var i = 0; i < url.length; i++) {
+    	if (url[i]=='oxygen-webhelp'){
+    		break;
+    	}else{    	    		
+				newUrl=newUrl+url[i]+"/";
+    	}
+		}    
+    document.location=newUrl;
+    </script>                                             
+    </body>
+</html>

+ 22 - 0
modules/app_java/doc/webhelp/oxygen-webhelp/noScript.html

@@ -0,0 +1,22 @@
+<!DOCTYPE html SYSTEM "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title></title>
+    </head>
+    <body>
+        <noscript>
+            
+            
+            This site presents some live examples for Web Help generated by oXygen
+            
+            Select a topic on the navigator to the left.
+            
+            Current generated project :            
+  
+		<span id="oxy_productid">${webhelp.product.id}</span>
+		<span id="oxy_productVersion">${webhelp.product.version}</span>
+	          
+            oXygen Team
+        </noscript>
+    </body>
+</html>

+ 552 - 0
modules/app_java/doc/webhelp/oxygen-webhelp/resources/css/admin.css

@@ -0,0 +1,552 @@
+#comments {
+	font-size: 12px;
+	border-width: 1px;
+	border-style: solid;
+	border-color: rgb(238, 238, 238) rgb(238, 238, 238) rgb(221, 221, 221);
+	color: rgb(68, 68, 68);
+	float: left;
+	width: 100%;
+	padding: 5px 5px 5px 0px;
+	vertical-align: middle;
+	background-image: url('../img/icon_comment24x24.png');
+	background-color: rgb(251, 251, 251);
+	box-shadow: rgb(238, 238, 238) 0px 2px 3px;
+	background-position: 10px 50%;
+	background-repeat: no-repeat no-repeat;
+}
+
+#comments #userAccount {
+	padding: 5px 0px;
+	margin: 0px;
+	right: 15px;
+	float: right;
+	display: inline-block;
+}
+
+#loginResponse {
+	color: red;
+	font-style: italic;
+}
+
+.bt_toolbar,#accountInfo a,#userAccount #bt_logIn,#userAccount #bt_logOff,#userAccount #bt_editProfile
+	{
+	background-color: rgb(223, 241, 255);
+	cursor: pointer;
+	font-size: 0.8em;
+	color: rgb(51, 51, 51);
+	text-shadow: rgb(255, 255, 255) 0px 1px 0px;
+	text-decoration: none;
+	padding: 5px 10px;
+	min-width: 60px;
+	border: 1px solid rgb(221, 221, 221);
+	border-top-left-radius: 5px;
+	border-top-right-radius: 5px;
+	border-bottom-right-radius: 5px;
+	border-bottom-left-radius: 5px;
+	margin: 0px 0px 0px 10px;
+	box-shadow: rgb(221, 221, 221) 1px 1px 7px;
+}
+
+.btnHGlue {
+	display: inline-block;
+	width: 30px;
+	height: 10px;
+}
+
+.btn,.bt_cancel,#l_bt_submit_nc,#bt_recover,#bt_signUp,#logIn,#l_bt_submit_log,#bt_passwd,.span_bt,#bt_profile,#bt_close
+	{
+	background-color: rgb(249, 249, 249);
+	border: 1px solid rgb(221, 221, 221);
+	border-top-left-radius: 5px;
+	border-top-right-radius: 5px;
+	border-bottom-right-radius: 5px;
+	border-bottom-left-radius: 5px;
+	box-shadow: rgb(221, 221, 221) 1px 1px 3px;
+	min-width: 60px;
+	color: rgb(68, 68, 68);
+	text-shadow: rgb(255, 255, 255) 0px 1px 0px;
+	cursor: pointer;
+	padding: 6px 10px;
+	margin-top: 15px;
+	display: inline-block;
+	font-size: 0.9em;
+	font-style: normal;
+	text-align: center;
+}
+.btn:HOVER,.bt_cancel:hover,#l_bt_submit_nc:hover,#bt_recover:hover,#bt_signUp:hover,#logIn:hover,#l_bt_submit_log:hover,.span_bt:hover,#bt_passwd:hover,#bt_profile:hover, #bt_close:hover
+	{
+	color:#000;
+	border:1px solid #ccc;
+	background-color: #E1F1FF;
+	box-shadow: 1px 1px 3px #ddd;
+}
+#cm_count,#preload {
+	margin-left: 35px;
+}
+
+#cm_count,#cm_title {
+	font-weight: bold;
+	font-size: 1.2em;
+	padding-left: 5px;
+}
+
+#loginData,#recoverPwd,#signUp {
+	width: 350px;
+	position: absolute;
+	clear: both;
+	background-color: rgb(255, 255, 255);
+	border-top-left-radius: 7px;
+	border-top-right-radius: 7px;
+	border-bottom-right-radius: 7px;
+	border-bottom-left-radius: 7px;
+	border-width: 0px 1px 1px;
+	border-right-style: solid;
+	border-bottom-style: solid;
+	border-left-style: solid;
+	border-right-color: rgb(204, 204, 204);
+	border-bottom-color: rgb(204, 204, 204);
+	border-left-color: rgb(204, 204, 204);
+	float: left;
+	padding: 10px;
+	box-shadow: rgb(153, 153, 153) 1px 1px 10px;
+	top: 20%;
+	left: 50%;
+	margin-top: -15%;
+	margin-left: -25%;
+	z-index: 100;
+}
+
+.login {
+	font-size: 1em;
+	width: 96%;
+	padding: 2%;
+}
+
+.login thead td {
+	font-size: 1.2em;
+	font-weight: bold;
+}
+
+.login td:first-child {
+	width: 50%;
+}
+
+.bt_close {
+	clear: both;
+	background-image: url("../img/close.png");
+	background-repeat: no-repeat;
+	/*background-position:5px 5px;*/
+	position: relative;
+	cursor: pointer;
+	width: 20px;
+	height: 20px;
+	padding: 0px 4px 0 4px;
+	text-align: center;
+	float: right;
+	margin-top: 10px;
+}
+
+.bt_close:HOVER {
+	background-image: url("../img/close_hover.png");
+}
+
+#preload img {
+	padding: 0px 5px;
+	margin-bottom: 0px;
+}
+
+#adminMenu {
+	clear: both;
+	float: right;
+	padding: 5px 0px;
+	margin: 0px;
+	right: 15px;
+	display: inline-block;
+}
+
+#adminMenu .span_bt {
+	float: right;
+	margin-right: 20px;
+}
+
+.formTitle {
+	height: 30px;
+	font-weight: bold;
+	font-size: 1.2em;
+	float: left;
+	padding: 10px;
+}
+
+#loginData input,#recoverPwd input,#signUp input {
+	line-height: 18px;
+	margin: 10px 0px 0px;
+}
+
+#v_preload {
+	height: 30px;
+	font-weight: bold;
+	font-size: 1.2em;
+	float: left;
+	padding: 10px;
+}
+
+#setVersionInfo {
+	clear: both;
+	padding: 10px;
+}
+
+#exportDiv {
+	position: absolute;
+	clear: both;
+	width: 60%;
+	background-color: rgb(255, 255, 255);
+	border-top-left-radius: 7px;
+	border-top-right-radius: 7px;
+	border-bottom-right-radius: 7px;
+	border-bottom-left-radius: 7px;
+	border-width: 0px 1px 1px;
+	border-right-style: solid;
+	border-bottom-style: solid;
+	border-left-style: solid;
+	border-right-color: rgb(204, 204, 204);
+	border-bottom-color: rgb(204, 204, 204);
+	border-left-color: rgb(204, 204, 204);
+	float: none;
+	padding: 10px;
+	box-shadow: rgb(153, 153, 153) 1px 1px 10px;
+	top: 30%;
+	left: 50%;
+	min-width: 400px;
+	margin-top: -10%;
+	margin-left: -30%;
+	z-index: 100;
+}
+
+.bt_inactiv {
+	background-color: rgb(239, 239, 239);
+	border-top-left-radius: 5px;
+	border-top-right-radius: 5px;
+	border-bottom-right-radius: 5px;
+	border-bottom-left-radius: 5px;
+	box-shadow: rgb(170, 170, 170) 0px 1px 4px;
+	min-width: 60px;
+	color: rgb(221, 221, 221);
+	text-shadow: rgb(255, 255, 255) 0px 1px 0px;
+	cursor: pointer;
+	padding: 6px 10px;
+	margin-top: 15px;
+	display: inline-block;
+	font-size: 0.9em;
+	text-align: center;
+	border: 0px;
+}
+
+body {
+	font-family: arial, helvetica, verdana;
+	font-size: 0.9em;
+}
+
+#msgInfo {
+		
+}
+
+#adminMenu {
+	padding: 5px 0px;
+	margin: 0px;
+	right: 15px;
+	float: right;
+}
+
+#inlineViewDiv {
+	position: absolute;
+	clear: both;
+	width: 90%;
+	height: 80%;
+	background-color: rgb(255, 255, 255);
+	border-top-left-radius: 7px;
+	border-top-right-radius: 7px;
+	border-bottom-right-radius: 7px;
+	border-bottom-left-radius: 7px;
+	border: 1px solid rgb(204, 204, 204);
+	box-shadow: rgb(153, 153, 153) 1px 1px 10px;
+	float: none;
+	padding: 10px;
+	top: 7%;
+	left: 5%;
+	overflow: hidden;
+}
+
+.inLineFormTitle {
+	height: 5%;
+	font-weight: bold;
+	font-size: 1.2em;
+	float: left;
+	padding: 10px;
+}
+
+#setVersionDiv {
+	position: absolute;
+	clear: both;
+	background-color: rgb(255, 255, 255);
+	border-top-left-radius: 7px;
+	border-top-right-radius: 7px;
+	border-bottom-right-radius: 7px;
+	border-bottom-left-radius: 7px;
+	border-width: 0px 1px 1px;
+	border-right-style: solid;
+	border-bottom-style: solid;
+	border-left-style: solid;
+	border-right-color: rgb(204, 204, 204);
+	border-bottom-color: rgb(204, 204, 204);
+	border-left-color: rgb(204, 204, 204);
+	float: none;
+	box-shadow: rgb(153, 153, 153) 1px 1px 10px;
+	top: 10%;
+	left: 50%;
+	width: 50%;
+	padding: 15px;
+	margin-left: -25%;
+	z-index: 100;
+}
+table#usersList {
+	width: 100%
+}
+
+table#usersList td {
+	padding: 10px
+}
+
+table#usersList thead {
+	background-color: #336699;
+	color: #fff;
+	text-shadow: 0 1px 0 #333;
+	text-align: left;
+	text-indent: 15px
+}
+.tbHRow {
+	width: 98%;
+	height:100%;
+	float: left;
+	padding: 5px 0px 5px 0px;
+	border-bottom: 1px solid #ccc;
+	background-color: #69c;
+	color: #fff;
+	text-shadow: 0 1px 0 #333;
+	text-align: center;	
+}
+.tbRow {
+	float: left;
+	width: 99%;
+	padding-bottom: 5px;
+	border-bottom: 1px solid #ccc;
+	vertical-align: middle;
+}
+.tbRow:hover {
+	background-color:#fffff0;
+}
+.tbCell {
+	float: left;		
+	vertical-align: middle;		
+	padding-left:5px;  
+}
+.tbCell p{
+	
+}
+table#usersList tbody td {
+	border: 1px solid #fff;
+}
+
+table#usersList tbody tr:HOVER { /*	background-color: lightyellow;*/
+	background-color: #F2FAFF;
+	cursor: pointer;
+	border-top: 1px solid #eee;
+	border-bottom: 1px solid #ccc;
+}
+
+table#usersList #editUser table tr:HOVER {
+	background-color: #fff;
+}
+table#usersList thead {
+	font-weight:bold;	
+	background-color: #336699;
+	color: #fff;
+	text-shadow: 0 1px 0 #333;
+	text-align: left;
+	text-indent: 5px;
+}
+.listTitle,.listTitleV{
+	width: 44%;
+	float: left;
+	padding-bottom: 5px;
+	/*border-bottom: 1px solid #ddd;*/
+	margin-bottom:5px;
+	margin-left:5px;
+	font-weight: bold;
+	float: left;	
+}
+
+table#usersList tbody td{
+	font-size: 0.8em;
+	padding: 5px;
+	
+	}
+	
+	.products{
+	clear: both;
+	border: 1px solid #ccc;
+	width: 44%;
+	float: left;
+	padding: 5px;
+}
+
+.formTitle {
+	height: 30px;
+	font-weight: bold;
+	font-size: 1.2em;
+	float: left;
+	padding: 10px 10px 10px 10px;
+}
+#loginData input, #recoverPwd input,#signUp input{
+	line-height: 18px;
+	margin: 10px 0 0 0;
+}
+
+.v_true,.v_false {
+	padding: 3px 5px 3px 5px;
+	width: 30px;
+	height: 20px;
+	background-color: #eee;
+	border-radius: 5px;
+	text-align: center;
+	text-shadow: 0 1px 0 #fff;
+	cursor: pointer;
+	font-size: 1em;
+	box-shadow: 0px 1px 2px #999;
+	float: left;
+	margin-top: 15px;
+	margin-left: 10px;
+}
+
+.versionTimeLine {
+	float: left;
+	width: 56px;
+	background-image: url('../img/timeVersion.png');
+	background-position: 50% 0px;
+	background-repeat: no-repeat;
+	margin-bottom: 10px;
+}
+
+.v_true:hover,.v_false:hover {
+	background-color: #98C1D6;
+	text-shadow: 0 1px 0 #ddd;
+	margin-left: 10px;
+}
+
+.v_true {
+	background-color: #dfd;
+}
+.versions{	
+	border: 1px solid #ccc;
+	width: 44%;
+	float: left;
+	padding: 5px;
+	margin-left: 20px;
+}
+.inLineBand {
+	clear: both;
+	float: left;
+	padding: 10px 0px 0px;
+	width: 100%;
+	height: 40px;
+}
+
+#ex_inline {
+	max-height: 82%;
+	overflow: auto;
+	width: 100%;
+}
+
+#editUser td {
+	height: 2em;
+}
+
+#editUser {
+	z-index: 10;
+	background-color: rgb(255, 255, 255);
+	border: 1px solid rgb(204, 204, 204);
+	position: absolute;
+	min-width: 400px;
+	width: 50%;
+	box-shadow: rgb(85, 85, 85) 1px 1px 15px;
+	padding: 15px;
+	left: 50%;
+	margin-top: -100px;
+	margin-left: -300px;
+}
+
+#editUser table {
+	width: 100%;
+}
+
+#editUser table input[type="text"] {
+	width: 90%;
+}
+
+#editUser table td:first-child {
+	width: 200px;
+}
+
+#adminUsers {
+	float: left;
+}
+
+#adminUsers form fieldset {
+	border: 0px solid rgb(238, 238, 238);
+}
+
+.toolbar {
+	height: 55px;
+}
+
+.product_Versions,.selectable,.p_selectable,.band {
+	clear: both;
+	float: left;
+	width: 100%;
+}
+
+.product_Versions,
+.selectable,
+.p_selectable,
+.band {
+	clear: both;
+	float: left;
+	width: 100%;
+	
+}
+
+.selectable,
+.p_selectable {
+	cursor: pointer;
+}
+
+.selectedItem {
+	background-color: #369;
+	color: #fff;
+}
+
+
+.1selectable:hover,
+.1p_selectable:hover {
+	background-color: #58b;
+	color: #fff;
+	cursor: pointer;
+}
+
+.cb-element{	
+	margin:1px 5px 1px 5px;	
+	vertical-align: top;		
+}
+input.ck{	
+	margin-bottom: 18px;	
+}
+

+ 994 - 0
modules/app_java/doc/webhelp/oxygen-webhelp/resources/css/comments.css

@@ -0,0 +1,994 @@
+#commentsContainer {
+	font-family: 'Lucida sans Unicode', Arial, Verdana;
+	clear: both;
+	margin: 7px;
+}
+
+#comments {
+	font-size: 12px;
+	border: 1px solid #eee;
+	border-bottom: 1px solid #ddd;
+	color: #444;
+	float:left;
+	width: 100%;
+	padding: 5px 5px 5px 0;
+	vertical-align: middle;
+	background-image: url('../img/icon_comment24x24.png');
+	background-position: 10px 50%;
+	background-repeat: no-repeat;
+	background-color: #fbfbfb;
+	box-shadow:0px 2px 3px #eee;
+}
+div.cmTitle{
+	float:left; 	
+	padding: 5px 0 5px 0;
+	margin: 0;
+	right: 15px;	
+}
+
+#comments #userAccount {
+	padding: 5px 0 5px 0;
+	margin: 0;
+	right: 15px;
+	float:right;
+	display: inline-block;
+	
+}
+#commentsContainer input{
+	margin: 5px 0 0 0 ;
+}
+ul.commentStyle {
+	list-style: none;
+	padding: 0
+}
+
+ul.commentStyle li {
+	clear: both;
+	padding: 0;
+	margin-left: 5px;
+}
+
+ul.commentStyle li ul.commentStyle li {
+	margin-left: 30px;
+	border-top: 0px solid #eee;
+}
+
+ul.commentStyle li:first-child {
+	border-top: 1px solid #eee;
+	background-color: #fff;
+}
+
+ul.commentStyle li div.content {
+	clear: both;
+	padding: 0px 7px 5px 15px;
+	margin: 0;
+}
+
+div.liContent {
+	padding: 10px 0 5px 0;
+	border-bottom: 1px solid #eee;
+}
+
+div.liContent div.liContent {
+	padding-left: 165px;
+}
+
+div.liContent:hover,div.suspended:hover {
+	/*	background-color: lightyellow;*/
+	background-color: #F9FEFF;
+}
+
+.liContent .head {
+	width: 97%;
+	padding: 0px 0 0px 10px;
+	display: inline-block;
+	float: left;
+	/*/Only for IE7 & IE8
+    padding:0px 0 0px 10px\9; */
+}
+
+.minus,.plus {
+	background-image: url('../img/expand.png');
+	background-repeat: no-repeat;
+	padding: 0px 5px 5px 5px;
+	width: 10px;
+	height: 10px;
+	background-position: -16px 0;
+	margin-top: 2px;
+	margin-right: 7px;
+	cursor: pointer;
+	float: left;
+}
+
+.plus {
+	background-position: 0 0;
+}
+
+.minus {
+	background-position: -16px 0;
+}
+
+div.name {
+	float: left;
+	padding:0px 0 10px 0;
+  color: #667799;
+  font-weight:bold
+}
+
+div.date {
+	font-size: 0.8em;
+	padding-left: 17px;
+	float: right;
+	color: #555;
+}
+
+div.version {
+	font-size: 0.9em;
+	padding-left: 10px;
+	float: right;
+	color: #444;
+	vertical-align: middle;
+}
+div.product {
+	font-size: 0.9em;
+	padding-left: 10px;
+	float: right;
+	color: #444;
+	vertical-align: middle;
+}
+
+.bt_admin {
+	display: inline-block;
+	float: right;
+	width: 300px;
+}
+
+.commentState {
+	color: #444;
+	float: left;
+	font-size: 0.8em;
+	width: 60px;
+	text-align: center;
+	text-shadow: 0 1px 0 #fff;
+	margin-left: 7px;
+}
+
+.level {
+	padding: 0 10px 0 10px;
+}
+
+.actions {
+	width: 210px;
+	border-left: 1px solid #eee;
+	float: right;
+}
+
+.bt_edit,.bt_approve,.bt_suspend,.bt_delete{
+	padding: 2px 4px 2px 4px;
+	width: 50px;
+	background-color: #fff;
+	border-radius: 5px;
+	text-align: center;
+	text-shadow: 0 1px 0 #fff;
+	cursor: pointer;
+	margin-left: 10px;
+	font-size: 0.9em;
+	box-shadow: 0px 1px 5px #ddd;
+	float: right;
+  border:1px solid #ddd;
+	color:#555;
+}
+
+.bt_edit:hover,.bt_approve:hover,.bt_suspend:hover,.bt_delete:hover {
+  color:#000;
+	background-color: #E1F1FF;
+}
+
+#oldComments {
+	clear: both;
+}
+
+#bt_new {
+	clear: both;
+	margin-top:10px;
+	padding: 10px 0 15px 0px;
+	position: relative;
+	display: inline-block;
+	width: 100%
+}
+
+.bt_new,#bt_approveAll {
+	float: left;
+	background-color: #fdfdfd;
+	cursor: pointer;
+	font-size: 0.8em;
+	color: #444;
+	text-shadow: 0 1px 0 #fff;
+	text-decoration: none;
+	padding: 5px 10px 5px 10px;
+	min-width: 60px;
+	border: 1px solid #ddd;
+	border-radius: 5px;
+	box-shadow: 0px 1px 7px #ddd;
+}
+
+.bt_new:hover {
+	background-color: #eee /*color: #336699;*/
+}
+
+.bt_reply {
+	color: #336699;
+	font-size: 0.9em;
+	margin:auto;
+	float:inherit;
+}
+
+.bt_reply:hover {
+	cursor: pointer;
+}
+/*
+#preload {
+	width: 30%;
+	position: absolute;
+	clear: both;
+	background-color: #fff;
+	padding-left: 15px;
+	border-radius: 7px;
+	border: 1px solid #ccc;
+	border-top: 0;
+	float: none;
+	box-shadow: 1px 1px 10px #999;
+	top: 50%;
+	left: 50%;
+	margin-top: -15%; 
+	margin-left: -15%; 
+	z-index: 100;
+	vertical-align: top;
+	text-align: center;
+	padding-top: 50px;
+	height: 127px;
+}
+*/
+#loginResponse {
+	color: red;
+	font-style: italic
+}
+
+.bt_toolbar,#accountInfo a,#userAccount #bt_logIn,#userAccount #bt_logOff,#userAccount #bt_editProfile
+	{
+	background-color: #DFF1FF;
+	cursor: pointer;
+	font-size: 0.8em;
+	color: #333;
+	text-shadow: 0 1px 0 #fff;
+	text-decoration: none;
+	padding: 5px 10px 5px 10px;
+	min-width: 60px;
+	border: 1px solid #ddd;
+	border-radius: 5px;
+	margin: 0;
+	margin-left: 10px;
+	box-shadow: 1px 1px 7px #ddd;
+}
+
+.bt_toolbar:hover,#accountInfo a:hover,#userAccount #bt_logIn:hover,#userAccount #bt_logOff:hover,#userAccount #bt_editProfile:hover
+	{
+	background-color: #CCE8FF;
+}
+
+#u_Profile {
+	clear: both;
+	position: relative;
+	background-color: #fff;
+	padding-left: 15px;
+	border-radius: 7px;
+	border: 1px solid #ccc;
+	border-top: 0;
+	float: none;
+	width: 300px;
+	box-shadow: 1px 1px 10px #999;
+	margin-top: 14px;
+	z-index: 100;
+}
+
+#u_Profile form {
+	margin-bottom: 15px;
+}
+
+#u_Profile table {
+	font-size: 1em;
+	width: 100%;
+	padding: 2%;
+}
+
+#u_Profile table thead td {
+	font-size: 1.2em
+}
+
+#u_Profile table td:FIRST-CHILD {
+	width: 55%;
+}
+
+#u_Profile table#u_notification {
+	margin: 0;
+	padding: 0
+}
+
+#u_Profile table#u_notification td:FIRST-CHILD {
+	width: 75%;
+}
+
+.u_response {
+	color: #cc0000
+}
+
+.btnHGlue{
+	display: inline-block; 
+	width:30px;
+	height:10px;
+}
+.btn,.bt_cancel,#l_bt_submit_nc,#bt_recover,#bt_signUp,#logIn,#l_bt_submit_log,#bt_passwd,.span_bt,#bt_profile,#bt_close
+	{
+	background-color: #F9F9F9;
+	border:1px solid #ddd;
+	border-radius: 5px;
+	box-shadow: 1px 1px 3px #ddd;
+	min-width: 60px;
+	color: #444;
+	text-shadow: 0 1px 0 #fff;
+	cursor: pointer;
+	padding: 6px 10px 6px 10px;
+	margin-top: 15px;
+	display: inline-block;
+	font-size: 0.9em;
+  font-style:normal;
+	text-align: center;
+}
+
+.btn:HOVER,.bt_cancel:hover,#l_bt_submit_nc:hover,#bt_recover:hover,#bt_signUp:hover,#logIn:hover,#l_bt_submit_log:hover,.span_bt:hover,#bt_passwd:hover,#bt_profile:hover, #bt_close:hover
+	{
+	color:#000;
+	border:1px solid #ccc;
+	background-color: #E1F1FF;
+	box-shadow: 1px 1px 3px #ddd;
+}
+
+#commentsContainer div,#commentsContainer span {
+	line-height: normal;
+}
+#o_captcha .realperson-text{
+	line-height: 3px;;
+}
+
+#cm_count, #preload {
+	margin-left: 35px;
+}
+
+#cm_count,#cm_title {
+	font-weight: bold;
+	font-size: 1.2em;
+	padding-left: 5px;
+}
+
+/*	Log In data */
+#loginData,#recoverPwd,#signUp {
+	width: 350px;
+	position: absolute;
+	clear: both;
+	background-color: #fff;
+	border-radius: 7px;
+	border: 1px solid #ccc;	
+	float: left;
+	padding: 10px;
+	box-shadow: 1px 1px 10px #999;
+	top: 20%;
+	left: 50%;
+	margin-top: -15%; /*set to a negative number 1/2 of your height*/
+	margin-left: -25%; /*set to a negative number 1/2 of your width*/
+	z-index: 100;
+}
+
+#signUp {
+	width: 350px;
+}
+
+.login {
+	font-size: 1em;
+	width: 96%;
+	padding: 2%;
+}
+
+.login thead td {
+	font-size: 1.2em;
+	font-weight: bold;
+}
+
+.login td:FIRST-CHILD {
+	width: 50%
+}
+
+.loginAlternative {
+	width: 93%;
+	/*padding: 10px;*/
+}
+
+.loginAlternative span {
+	padding: 0px 5px 10px 5px;
+	margin: 0
+}
+
+.loginAlternative span:hover {
+	color: #cc0000;
+	cursor: pointer;
+}
+
+#link_lostPwd {
+	float: left;
+	color: #336699;
+}
+
+#link_signUp {
+	float: right;
+	color: #336699;
+}
+/*	/ Log In data */
+#signUp table thead td {
+  text-align:left;
+	font-size: 1.2em;
+	font-weight: bold;
+}
+#signUp #signUpResponse{
+  padding:15px 0 10px 0;
+  font-size:0.9em;
+  font-weight:normal;  
+}
+
+#signUp #signUpResponse #bt_close{
+  font-size:0.8em;
+  font-style:normal;
+  font-weight:normal;
+  margin-left:auto;
+  margin-right:auto;
+  display:inherit;
+  text-align: center;
+  width:100px;  
+}
+
+#signUp table td:FIRST-CHILD {
+	width: 45%
+}
+
+.inputTable {
+	width: 180px;
+}
+
+#signUp table {
+	font-size: 1em;
+	width: 100%;
+}
+
+/*	/ Sign up Form */
+#recoverPwd table thead td {
+	font-size: 1.2em;
+}
+
+#recoverPwd table td:FIRST-CHILD {
+	width: 45%
+}
+
+#recoverPwd table {
+	font-size: 1em;
+	width: 100%;
+}
+
+#userAccount #recoverPwd {
+	position: absolute;
+	margin-top: 7px;
+	right: 10px;
+}
+/*	/ Lost Password Form */
+
+/* Insert new comment */
+#newComment {
+	width: 96%;
+	margin: 10px;
+	padding: 10px;
+	font-size: 1em;
+	vertical-align: bottom;
+}
+
+#newComment form {
+	padding: 0;
+	margin: 0
+}
+
+#commentTitle {
+	padding-bottom: 4px;
+	display: inline-block;
+	font-weight:bold;
+	color:#444
+}
+
+/* Close button */
+.bt_close {
+	clear: both;
+	background-image: url("../img/close.png");
+	background-repeat: no-repeat;
+	/*background-position:5px 5px;*/
+	position: relative;
+	cursor: pointer;
+	width: 20px;
+	height: 20px;
+	padding: 0px 4px 0 4px;
+	text-align: center;
+	float: right;
+	margin-top: 10px;
+}
+
+.bt_close:HOVER {
+	background-image: url("../img/close_hover.png");
+}
+
+#newComment .bt_close {
+	margin: 0px;
+}
+/* / Close button */
+#u_Profile {
+	clear: both;
+	float: right;
+	position: absolute;
+	width: 500px;
+	right: 10px;
+	margin-top: 35px;
+	z-index: 100;
+}
+
+#preload img {
+  padding: 0px 5px 0px 5px;
+  margin-bottom:0px;
+}
+
+.red {
+	color: #cc0000
+}
+
+div.suspended {
+	background-color: white;
+}
+
+.moderationInfo {
+	margin: 0;
+	padding: 0px 0px 0px 20px;
+	color: #cc0000;
+	text-shadow:0 1px 0 #fff;
+}
+
+.mustBeModerate {
+	background-color: #E8F0F7;
+	padding: 10px;
+	border-radius: 10px;
+	margin-bottom: 10px
+}
+
+/* ADMIN */
+#cm_title span {
+	padding: 8px
+}
+
+#approveAll {
+	position: absolute;
+	right: 0;
+}
+
+#bt_approveAll {
+	background-color: #eee;
+	text-shadow: 0 1px 0 #fff;
+	cursor: pointer;
+}
+
+#bt_approveAll:hover {
+	background-color: #98C1D6;
+	text-shadow: 0 1px 0 #ddd;
+}
+
+#showConfirmApproveAll {
+	right: 20px;
+	position: absolute;
+	background-color: #fcfcfc;
+	border: 1px solid #ccc;
+	min-width: 150px;
+	box-shadow: 1px 1px 15px #555;
+	padding: 15px;
+	margin-top: 25px;
+	width: 250px;
+	text-align: center;
+}
+
+
+#confirmDelete {
+	right: 20px;
+	position: absolute;
+	background-color: #fcfcfc;
+	border: 1px solid #ccc;
+	min-width: 150px;
+	box-shadow: 1px 1px 15px #555;
+	padding: 15px;
+	margin-top: 25px
+}
+
+#confirmActions {
+	text-align: center;
+	padding: 10px;
+	margin-top: 20px;
+}
+
+#confirmDelete #commentToDelete {
+	text-align: left;
+	padding: 10px;
+	border: 1px solid #ccc;
+	background-color: #fff;
+	margin: 5px
+}
+
+#confirmActions span {
+	text-align: center;
+	padding: 4px;
+	border: 1px solid #ccc;
+	border-radius: 5px;
+	width: 25px;
+	margin: 40px;
+	cursor: pointer
+}
+
+.cleditorMain {
+	border: 1px solid #bbb;
+	padding: 0 1px 1px;
+	background-color: #fff;
+}
+
+.cleditorMain iframe {
+	border: none;
+	margin: 0;
+	padding: 0
+}
+
+.cleditorMain textarea {
+	border: none;
+	margin: 0;
+	padding: 0;
+	overflow-y: scroll;
+	font: 10pt Arial, Verdana;
+	resize: none;
+	outline: none /* webkit grip focus */
+}
+
+.cleditorToolbar {
+	background: url('../img/toolbar.gif') repeat
+}
+
+.cleditorGroup {
+	float: left;
+	height: 26px
+}
+
+.cleditorButton {
+	float: left;
+	width: 24px;
+	height: 24px;
+	margin: 1px 0 1px 0;
+	background: url('../img/buttons.gif')
+}
+
+.cleditorDisabled {
+	opacity: 0.3;
+	filter: alpha(opacity =   30)
+}
+
+.cleditorDivider {
+	float: left;
+	width: 1px;
+	height: 23px;
+	margin: 1px 0 1px 0;
+	background: #CCC
+}
+
+.cleditorPopup {
+	border: solid 1px #999;
+	background-color: white;
+	position: absolute;
+	font: 10pt Arial, Verdana;
+	cursor: default;
+	z-index: 10000
+}
+
+.cleditorList div {
+	padding: 2px 4px 2px 4px
+}
+
+.cleditorList p,.cleditorList h1,.cleditorList h2,.cleditorList h3,.cleditorList h4,.cleditorList h5,.cleditorList h6,.cleditorList font
+	{
+	padding: 0;
+	margin: 0;
+	background-color: Transparent
+}
+
+.cleditorColor {
+	width: 150px;
+	padding: 1px 0 0 1px
+}
+
+.cleditorColor div {
+	float: left;
+	width: 14px;
+	height: 14px;
+	margin: 0 1px 1px 0
+}
+
+.cleditorPrompt {
+	background-color: #F6F7F9;
+	padding: 4px;
+	font-size: 8.5pt
+}
+
+.cleditorPrompt input,.cleditorPrompt textarea {
+	font: 8.5pt Arial, Verdana;
+}
+
+.cleditorMsg {
+	background-color: #FDFCEE;
+	width: 150px;
+	padding: 4px;
+	font-size: 8.5pt
+}
+
+.textError {
+	color: red;
+	font-weight: bold;
+}
+
+.textInfo {
+	color: yellow;
+	font-weight: normal;
+}
+
+#adminMenu {
+	clear: both;
+	float: right;
+	padding: 5px 0 5px 0;
+	margin: 0;
+	right: 15px;
+	display: inline-block;		
+}
+
+#adminMenu .span_bt {
+	float: right;
+	margin-right: 20px;
+}
+
+.formTitle {
+	height: 30px;
+	font-weight: bold;
+	font-size: 1.2em;
+	float: left;
+	padding: 10px 10px 10px 10px;
+}
+#loginData input, #recoverPwd input,#signUp input{
+	line-height: 18px;
+	margin: 10px 0 0 0;
+}
+
+.v_true,.v_false {
+	padding: 3px 5px 3px 5px;
+	width: 30px;
+	height: 20px;
+	background-color: #eee;
+	border-radius: 5px;
+	text-align: center;
+	text-shadow: 0 1px 0 #fff;
+	cursor: pointer;
+	font-size: 1em;
+	box-shadow: 0px 1px 2px #999;
+	float: left;
+	margin-top: 15px;
+	margin-left: 10px;
+}
+
+.versionTimeLine {
+	float: left;
+	width: 56px;
+	background-image: url('../img/timeVersion.png');
+	background-position: 50% 0px;
+	background-repeat: no-repeat;
+	margin-bottom: 10px;
+}
+
+.v_true:hover,.v_false:hover {
+	background-color: #98C1D6;
+	text-shadow: 0 1px 0 #ddd;
+	margin-left: 10px;
+}
+
+.v_true {
+	background-color: #dfd;
+}
+
+.gtSign {
+	padding: 3px 0px 3px 0px;
+	width: 15px;
+	height: 20px;
+	margin-top: 15px;
+	text-align: center;
+	text-shadow: 0 1px 0 #fff;
+	font-size: 1em;
+	float: left;
+}
+
+#v_preload {
+	height: 30px;
+	font-weight: bold;
+	font-size: 1.2em;
+	float: left;
+	padding: 10px 10px 10px 10px;
+}
+
+#setVersionInfo {
+	clear: both;
+	padding: 10px;
+}
+
+#exportDiv {
+	position: absolute;
+	clear: both;
+	width: 60%;
+	background-color: #fff;
+	border-radius: 7px;
+	border: 1px solid #ccc;
+	border-top: 0;
+	float: none;
+	padding: 10px;
+	box-shadow: 1px 1px 10px #999;
+	top: 30%;
+	left: 50%;
+	min-width:400px;
+	margin-top: -10%; /*set to a negative number 1/2 of your height*/
+	margin-left: -30%; /*set to a negative number 1/2 of your width*/
+	z-index: 100;
+}
+
+#ll_exp_sel {
+	margin-top: 10px;
+	margin-bottom: 10px;
+}
+
+.selected {
+	position: relative;
+	float: left;
+	margin-left: 20px;
+	background-color: #fff;
+	padding: 10px;
+}
+
+.bandL {
+	float: left;
+}
+
+.ex_close {
+	background-image: url("../img/close.png");
+	background-position: 0px 0px;
+	width: 10px;
+	height: 10px;
+	float: right;
+	cursor: pointer;
+}
+
+.ex_close:HOVER {
+	background-image: url("../img/close_hover.png");
+	cursor: pointer;
+}
+
+.bt_inactiv {
+	background-color: #efefef;
+	border-radius: 5px;
+	box-shadow: 0 1px 4px #aaa;
+	min-width: 60px;
+	color: #ddd;
+	text-shadow: 0 1px 0 #fff;
+	cursor: pointer;
+	padding: 6px 10px 6px 10px;
+	margin-top: 15px;
+	display: inline-block;
+	font-size: 0.9em;
+	text-align: center;
+	border: 0;
+}
+
+.bt_inactiv:hover {
+	background-color: #efefef;
+	color: #ddd;
+	text-shadow: 0 1px 0 #222;
+	box-shadow: 0 1px 7px #000;
+}
+
+
+.hrPadding {
+	padding: 20px 10px 0px 10px;
+}
+
+div.table {
+	width: 99%;	
+}
+
+div.tbHRow {
+	width: 98%;
+	height:100%;
+	float: left;
+	padding: 5px 0px 5px 0px;
+	border-bottom: 1px solid #ccc;
+	background-color: #69c;
+	color: #fff;
+	text-shadow: 0 1px 0 #333;
+	text-align: center;	
+}
+
+div.tbHCell {
+	float: left;
+	width: 10%;	
+}
+
+div.tbRow {
+	float: left;
+	width: 99%;
+	padding-bottom: 5px;
+	border-bottom: 1px solid #ccc;
+	vertical-align: middle;
+}
+div.tbRow:hover {
+	background-color:#fffff0;
+}
+
+div.tbCell {
+	float: left;		
+	vertical-align: middle;		
+	padding-left:5px;  
+}
+div.tbCell p{
+	
+}
+#newPassword {
+	position: absolute;
+	clear: both;
+	width: 40%;
+	background-color: #fff;
+	border-radius: 7px;
+	border: 1px solid #ccc;
+	border-top: 0;
+	float: none;
+	padding: 10px;
+	box-shadow: 1px 1px 10px #999;
+	top: 20%;
+	left: 50%;
+	margin-top: -10%; /*set to a negative number 1/2 of your height*/
+	margin-left: -20%; /*set to a negative number 1/2 of your width*/
+	z-index: 100;
+}
+div.info{
+	font-size:xx-small;
+	color: #777
+}
+.shareF{
+	display: inline-block;
+}
+.sharePName, #shareWithTitle{
+	font-size: 0.8em;	
+	padding: 0px 3px 0px 3px;
+}
+.sharePName{
+	font-weight:bold;	
+}
+.sharePID{
+	display: none;
+}
+div#shareWith{
+	clear: both;
+	display: block;	
+}

+ 175 - 0
modules/app_java/doc/webhelp/oxygen-webhelp/resources/css/commonltr.css

@@ -0,0 +1,175 @@
+/*
+ | This file is part of the DITA Open Toolkit project hosted on 
+ | Sourceforge.net. See the accompanying license.txt file for 
+ | applicable licenses.
+*/
+
+/*
+ | (c) Copyright IBM Corp. 2004, 2005 All Rights Reserved.
+ */
+ 
+.unresolved { background-color: skyblue; }
+.noTemplate { background-color: yellow; }
+
+.base { background-color: #ffffff; }
+
+/* Add space for top level topics */
+.nested0 { margin-top : 1em;}
+
+/* div with class=p is used for paragraphs that contain blocks, to keep the XHTML valid */
+.p {margin-top: 1em}
+
+/* Default of italics to set apart figure captions */
+.figcap { font-style: italic }
+.figdesc { font-style: normal }
+
+/* Use @frame to create frames on figures */
+.figborder { border-style: solid; padding-left : 3px; border-width : 2px; padding-right : 3px; margin-top: 1em; border-color : Silver;}
+.figsides { border-left : 2px solid; padding-left : 3px; border-right : 2px solid; padding-right : 3px; margin-top: 1em; border-color : Silver;}
+.figtop { border-top : 2px solid; margin-top: 1em; border-color : Silver;}
+.figbottom { border-bottom : 2px solid; border-color : Silver;}
+.figtopbot { border-top : 2px solid; border-bottom : 2px solid; margin-top: 1em; border-color : Silver;}
+
+/* Most link groups are created with <div>. Ensure they have space before and after. */
+.ullinks { list-style-type: none }
+.ulchildlink { margin-top: 1em; margin-bottom: 1em }
+.olchildlink { margin-top: 1em; margin-bottom: 1em }
+.linklist { margin-bottom: 1em }
+.linklistwithchild { margin-left: 1.5em; margin-bottom: 1em  }
+.sublinklist { margin-left: 1.5em; margin-bottom: 1em  }
+.relconcepts { margin-top: 1em; margin-bottom: 1em }
+.reltasks { margin-top: 1em; margin-bottom: 1em }
+.relref { margin-top: 1em; margin-bottom: 1em }
+.relinfo { margin-top: 1em; margin-bottom: 1em }
+.breadcrumb { font-size : smaller; margin-bottom: 1em }
+.prereq { margin-left : 20px;}
+
+/* Set heading sizes, getting smaller for deeper nesting */
+.topictitle1 { margin-top: 0pc; margin-bottom: .1em; font-size: 1.34em; }
+.topictitle2 { margin-top: 1pc; margin-bottom: .45em; font-size: 1.17em; }
+.topictitle3 { margin-top: 1pc; margin-bottom: .17em; font-size: 1.17em; font-weight: bold; }
+.topictitle4 { margin-top: .83em; font-size: 1.17em; font-weight: bold; }
+.topictitle5 { font-size: 1.17em; font-weight: bold; }
+.topictitle6 { font-size: 1.17em; font-style: italic; }
+.sectiontitle { margin-top: 1em; margin-bottom: 0em; color: black; font-size: 1.17em; font-weight: bold;}
+.section { margin-top: 1em; margin-bottom: 1em }
+.example { margin-top: 1em; margin-bottom: 1em }
+div.tasklabel { margin-top: 1em; margin-bottom: 1em; }
+h2.tasklabel, h3.tasklabel, h4.tasklabel, h5.tasklabel, h6.tasklabel { font-size: 100%; }
+
+/* All note formats have the same default presentation */
+.note { margin-top: 1em; margin-bottom : 1em;}
+.notetitle { font-weight: bold }
+.notelisttitle { font-weight: bold }
+.tip { margin-top: 1em; margin-bottom : 1em;}
+.tiptitle { font-weight: bold }
+.fastpath { margin-top: 1em; margin-bottom : 1em;}
+.fastpathtitle { font-weight: bold }
+.important { margin-top: 1em; margin-bottom : 1em;}
+.importanttitle { font-weight: bold }
+.remember { margin-top: 1em; margin-bottom : 1em;}
+.remembertitle { font-weight: bold }
+.restriction { margin-top: 1em; margin-bottom : 1em;}
+.restrictiontitle { font-weight: bold }
+.attention { margin-top: 1em; margin-bottom : 1em;}
+.attentiontitle { font-weight: bold }
+.dangertitle { font-weight: bold }
+.danger { margin-top: 1em; margin-bottom : 1em;}
+.cautiontitle { font-weight: bold }
+.caution { font-weight: bold; margin-bottom : 1em; }
+
+/* Simple lists do not get a bullet */
+ul.simple { list-style-type: none }
+
+/* Used on the first column of a table, when rowheader="firstcol" is used */
+.firstcol { font-weight : bold;}
+
+/* Various basic phrase styles */
+.bold { font-weight: bold; }
+.boldItalic { font-weight: bold; font-style: italic; }
+.italic { font-style: italic; }
+.underlined { text-decoration: underline; }
+.uicontrol { font-weight: bold; }
+.parmname { font-weight: bold; }
+.kwd { font-weight: bold; }
+.defkwd { font-weight: bold; text-decoration: underline; }
+.var { font-style : italic;}
+.shortcut { text-decoration: underline; }
+
+/* Default of bold for definition list terms */
+.dlterm { font-weight: bold; }
+
+/* Use CSS to expand lists with @compact="no" */
+.dltermexpand { font-weight: bold; margin-top: 1em; }
+*[compact="yes"]>li { margin-top: 0em;}
+*[compact="no"]>li { margin-top: .53em;}	
+.liexpand { margin-top: 1em; margin-bottom: 1em }
+.sliexpand { margin-top: 1em; margin-bottom: 1em }
+.dlexpand { margin-top: 1em; margin-bottom: 1em }
+.ddexpand { margin-top: 1em; margin-bottom: 1em }
+.stepexpand { margin-top: 1em; margin-bottom: 1em }
+.substepexpand { margin-top: 1em; margin-bottom: 1em }
+
+/* Align images based on @align on topic/image */
+div.imageleft { text-align: left }
+div.imagecenter { text-align: center }
+div.imageright { text-align: right }
+div.imagejustify { text-align: justify }
+
+/* The cell border can be turned on with
+   {border-right:solid}
+   This value creates a very thick border in Firefox (does not match other tables)
+
+   Firefox works with 
+   {border-right:solid 1pt}
+   but this causes a barely visible line in IE */
+.cellrowborder { border-left:none; border-top:none; border-right:solid 1px; border-bottom:solid 1px }
+.row-nocellborder { border-left:none; border-right:none; border-top:none; border-right: hidden; border-bottom:solid 1px}
+.cell-norowborder { border-top:none; border-bottom:none; border-left:none; border-bottom: hidden; border-right:solid 1px}
+.nocellnorowborder { border:none; border-right: hidden;border-bottom: hidden }
+
+pre.screen { padding:5px; border: 1px solid #ccc; background-color: #ddd; margin: 2px 7px 2px 0; white-space: pre}
+
+span.filepath { font-family:monospace }
+
+/* OXYGEN PATCH START - EXM-18138 - Insert space between button image and button name. */
+span.uicontrol > img {
+  padding-right: 5px;
+}
+/* OXYGEN PATCH END - EXM-18138 */
+
+/* OXYGEN PATCH START EXM-17248 - Center figure captions. */
+div.fignone p.figcap {
+  display:block;
+  text-align:left;
+  font-weight:bold;
+  padding:2px 10px 5px 10px;
+}
+
+div.fignone p.figcapcenter {
+  display:block;
+  text-align:center;
+  font-weight:bold;
+  padding:2px 10px 5px 10px;
+}
+
+div.fignone p.figcapright {
+  display:block;
+  text-align:right;
+  font-weight:bold;
+  padding:2px 10px 5px 10px;
+}
+
+div.fignone p.figcapjustify {
+  display:block;
+  text-align:justify;
+  font-weight:bold;
+  padding:2px 10px 5px 10px;
+}
+
+div.fignone img {
+  padding-top: 5px;
+  padding-left: 10px;
+  padding-right: 10px;
+}
+/* OXYGEN PATCH END EXM-17248 */

+ 126 - 0
modules/app_java/doc/webhelp/oxygen-webhelp/resources/css/commonrtl.css

@@ -0,0 +1,126 @@
+/*
+ | This file is part of the DITA Open Toolkit project hosted on 
+ | Sourceforge.net. See the accompanying license.txt file for 
+ | applicable licenses.
+*/
+
+/*
+ | (c) Copyright IBM Corp. 2004, 2005 All Rights Reserved.
+ */
+ 
+.unresolved { background-color: skyblue; }
+.noTemplate { background-color: yellow; }
+
+.base { background-color: #ffffff; }
+
+/* Add space for top level topics */
+.nested0 { margin-top : 1em;}
+
+/* div with class=p is used for paragraphs that contain blocks, to keep the XHTML valid */
+.p {margin-top: 1em}
+
+/* Default of italics to set apart figure captions */
+.figcap { font-style: italic }
+.figdesc { font-style: normal }
+
+/* Use @frame to create frames on figures */
+.figborder { border-style: solid; padding-left : 3px; border-width : 2px; padding-right : 3px; margin-top: 1em; border-color : Silver;}
+.figsides { border-left : 2px solid; padding-left : 3px; border-right : 2px solid; padding-right : 3px; margin-top: 1em; border-color : Silver;}
+.figtop { border-top : 2px solid; margin-top: 1em; border-color : Silver;}
+.figbottom { border-bottom : 2px solid; border-color : Silver;}
+.figtopbot { border-top : 2px solid; border-bottom : 2px solid; margin-top: 1em; border-color : Silver;}
+
+/* Most link groups are created with <div>. Ensure they have space before and after. */
+.ullinks { list-style-type: none }
+.ulchildlink { margin-top: 1em; margin-bottom: 1em }
+.olchildlink { margin-top: 1em; margin-bottom: 1em }
+.linklist { margin-top: 1em; margin-bottom: 1em }
+.linklistwithchild { margin-top: 1em; margin-right: 1.5em; margin-bottom: 1em  }
+.sublinklist { margin-top: 1em; margin-right: 1.5em; margin-bottom: 1em  }
+.relconcepts { margin-top: 1em; margin-bottom: 1em }
+.reltasks { margin-top: 1em; margin-bottom: 1em }
+.relref { margin-top: 1em; margin-bottom: 1em }
+.relinfo { margin-top: 1em; margin-bottom: 1em }
+.breadcrumb { font-size : smaller; margin-bottom: 1em }
+.prereq { margin-right : 20px;}
+
+/* Set heading sizes, getting smaller for deeper nesting */
+.topictitle1 { margin-top: 0pc; margin-bottom: .1em; font-size: 1.34em; }
+.topictitle2 { margin-top: 1pc; margin-bottom: .45em; font-size: 1.17em; }
+.topictitle3 { margin-top: 1pc; margin-bottom: .17em; font-size: 1.17em; font-weight: bold; }
+.topictitle4 { margin-top: .83em; font-size: 1.17em; font-weight: bold; }
+.topictitle5 { font-size: 1.17em; font-weight: bold; }
+.topictitle6 { font-size: 1.17em; font-style: italic; }
+.sectiontitle { margin-top: 1em; margin-bottom: 0em; color: black; font-size: 1.17em; font-weight: bold;}
+.section { margin-top: 1em; margin-bottom: 1em }
+.example { margin-top: 1em; margin-bottom: 1em }
+div.tasklabel { margin-top: 1em; margin-bottom: 1em; }
+h2.tasklabel, h3.tasklabel, h4.tasklabel, h5.tasklabel, h6.tasklabel { font-size: 100%; }
+
+/* All note formats have the same default presentation */
+.note { margin-top: 1em; margin-bottom : 1em;}
+.notetitle { font-weight: bold }
+.notelisttitle { font-weight: bold }
+.tip { margin-top: 1em; margin-bottom : 1em;}
+.tiptitle { font-weight: bold }
+.fastpath { margin-top: 1em; margin-bottom : 1em;}
+.fastpathtitle { font-weight: bold }
+.important { margin-top: 1em; margin-bottom : 1em;}
+.importanttitle { font-weight: bold }
+.remember { margin-top: 1em; margin-bottom : 1em;}
+.remembertitle { font-weight: bold }
+.restriction { margin-top: 1em; margin-bottom : 1em;}
+.restrictiontitle { font-weight: bold }
+.attention { margin-top: 1em; margin-bottom : 1em;}
+.attentiontitle { font-weight: bold }
+.dangertitle { font-weight: bold }
+.danger { margin-top: 1em; margin-bottom : 1em;}
+.cautiontitle { font-weight: bold }
+.caution { font-weight: bold; margin-bottom : 1em; }
+
+/* Simple lists do not get a bullet */
+ul.simple { list-style-type: none }
+
+/* Used on the first column of a table, when rowheader="firstcol" is used */
+.firstcol { font-weight : bold;}
+
+/* Various basic phrase styles */
+.bold { font-weight: bold; }
+.boldItalic { font-weight: bold; font-style: italic; }
+.italic { font-style: italic; }
+.underlined { text-decoration: underline; }
+.uicontrol { font-weight: bold; }
+.parmname { font-weight: bold; }
+.kwd { font-weight: bold; }
+.defkwd { font-weight: bold; text-decoration: underline; }
+.var { font-style : italic;}
+.shortcut { text-decoration: underline; }
+
+/* Default of bold for definition list terms */
+.dlterm { font-weight: bold; }
+
+/* Use CSS to expand lists with @compact="no" */
+.dltermexpand { font-weight: bold; margin-top: 1em; }
+*[compact="yes"]>li { margin-top: 0em;}
+*[compact="no"]>li { margin-top: .53em;}
+.liexpand { margin-top: 1em; margin-bottom: 1em }
+.sliexpand { margin-top: 1em; margin-bottom: 1em }
+.dlexpand { margin-top: 1em; margin-bottom: 1em }
+.ddexpand { margin-top: 1em; margin-bottom: 1em }
+.stepexpand { margin-top: 1em; margin-bottom: 1em }
+.substepexpand { margin-top: 1em; margin-bottom: 1em }
+
+/* Align images based on @align on topic/image */
+div.imageleft { text-align: left }
+div.imagecenter { text-align: center }
+div.imageright { text-align: right }
+div.imagejustify { text-align: justify }
+
+.cellrowborder { border-right:none; border-top:none; border-left:solid 1px; border-bottom:solid 1px }
+.row-nocellborder { border-left:none; border-right:none; border-top:none; border-left: hidden; border-bottom:solid 1px}
+.cell-norowborder { border-top:none; border-bottom:none; border-right:none; border-bottom: hidden; border-left:solid 1px}
+.nocellnorowborder { border:none; border-left: hidden;border-bottom: hidden }
+
+pre.screen { padding: 5px 5px 5px 5px; border: outset; background-color: #CCCCCC; margin-top: 2px; margin-bottom : 2px; white-space: pre}
+
+

+ 33 - 0
modules/app_java/doc/webhelp/oxygen-webhelp/resources/css/index.html

@@ -0,0 +1,33 @@
+<!DOCTYPE html SYSTEM "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>WebHelp</title>
+			<meta HTTP-EQUIV="REFRESH" content="0; url=../../../"/>        
+    </head>
+    <body>            
+            Current generated project :            
+            <!-- to be generated  -->
+<div id="productInfo" style="display:none;">
+	<span id="oxy_productid">${webhelp.product.id}</span>
+	<span id="oxy_productVersion">${webhelp.product.version}</span>
+</div>
+<!-- /to be generated  -->
+                 
+	<script type="text/javascript">
+    var pageSearch = window.location.href;
+    var pageWSearch = pageSearch.replace(window.location.search,"");
+    pageWSearch = pageWSearch.replace(window.location.hash,"");
+    var url=pageWSearch.split("/");
+    var newUrl="";
+    for ( var i = 0; i < url.length; i++) {
+    	if (url[i]=='oxygen-webhelp'){
+    		break;
+    	}else{    	    		
+				newUrl=newUrl+url[i]+"/";
+    	}
+		}    
+    document.location=newUrl;
+    </script>
+                                              
+    </body>
+</html>

+ 220 - 0
modules/app_java/doc/webhelp/oxygen-webhelp/resources/css/install.css

@@ -0,0 +1,220 @@
+body{
+  font-family:arial, helvetica, verdana;
+  font-size:12px;
+  text-shadow: 0 1px 0 #fff;
+}
+
+h1 {
+   text-align:center;
+}
+
+h1.centerH{
+  vertical-align:middle;
+  text-align:center;
+  font-size:1.6em;
+  font-weight:normal;
+  text-shadow: 0 1px 0 #fff;
+}
+
+#logo,.topictitle1{
+  margin:auto;
+  margin-bottom:35px;
+  font-size:1.7em;
+  color:#444;
+  width:83%;
+  position:relative;
+  left:1%;
+}
+
+.topictitle1{
+  margin-top:30px;
+  margin-bottom:0
+}
+
+#logo img, .topictitle1 img{
+  width:150px;
+}
+
+.titProduct{
+  font-weight:bold;
+}
+
+#form{
+  width:10%;
+  position:relative;
+  left:45%;
+  float:left;
+}
+img{
+  vertical-align:middle;
+}
+div.title{
+  font-size:medium;
+  font-style:normal;
+  font-weight:bold;
+  padding:5px 2px 5px 2px;
+}
+div.desc{
+  color:#444;
+  font-size:1.1em;
+  font-style:normal;
+  /*font-weight:bold;*/
+  padding:5px 2px 5px 2px;
+  line-height:1.6em;
+}
+
+input{
+  line-height:22px;
+  margin:3px;
+}
+
+input[readonly = readonly]{
+  background-color:#f9f9f9;
+  color:#444;
+  padding:1px;
+  border:1px solid #ccc;
+}
+div.panel, .taskbody{
+  clear:both;
+  width:80%;
+  position:relative;
+  left:9%;
+  background-color:#F9FEFF;
+  border-radius:7px;
+  box-shadow:0px 2px 2px #eee;
+  border:1px solid #ddd;
+  float:left;
+  padding:10px;
+  margin:10px 5px 10px 5px;
+}
+
+div.panel table{
+  width:100%;
+}
+
+div.panel td:first-child{
+  font-weight:bold;
+  color:#333;
+  width:60%;
+}
+div.panel .settingDesc{
+  font-weight:normal;
+  font-size:0.9em;
+  color:#555;
+}
+
+div.panel td{
+  height:2.5em;
+  padding:4px;
+}
+
+div.panel .col2 td{
+  height:1.8em;
+  padding:4px;
+}
+
+
+div.panel td:last-child{
+  font-style:italic;
+  font-size:0.9em;
+  padding-left:7px;
+}
+div.panel .col2 td:last-child{
+  font-style:normal;
+  font-size:1em;
+}
+
+div.panel tr:hover td{
+  background-color:#E6F7FF;
+}
+
+
+#doInstallData{
+  width:100%;
+  left:5%;
+  padding:0px;
+  margin:10px 5px 0px 5px;
+}
+div.success{
+  color:green;
+  font-weight:bold;
+}
+div.error{
+  color:red;
+  font-weight:bold;
+}
+.btActions{
+  clear:both;
+  width:91%;
+}
+.btActions input{
+  float:right;
+  margin:auto;
+	margin-left: 20px;
+	margin-bottom: 20px;
+  padding: 4px;
+	width: 130px;
+	cursor: pointer;
+  border:1px solid #ddd;
+	border-radius: 5px;
+	background-color: #eee;
+	text-align: center;
+	text-shadow: 0 1px 0 #fff;
+	font-weight:bold;
+	color:#666;
+	box-shadow: 1px 1px 7px #ccc;
+}
+
+.btActions input:hover {
+	background-color: #E1F1FF;
+  color:#333;
+}
+
+table.col2 td:first-child{width:38%}
+
+/* *** installation.html *** */
+
+h1.topictitle1{
+  font-size:2em;
+  padding:15px 0 15px 0;
+}
+
+.taskbody h2{
+  padding-top:10px;
+  color:#444;
+}
+
+ol{
+  line-height:2em;
+}
+
+li.step .cmd{font-weight:bold}
+li.substep .cmd{font-weight:normal;}
+strong.b{}
+span.code{
+	padding: 20px;
+	font-family: Courier, monospace;
+	font-size: 12px;
+	display: block;
+	background-color: #fefefe;
+	border: 1px solid #ddd;
+	margin: 10px;
+	line-height: 18px;
+}
+.bld{
+	color:#336699;
+	font-weight: bold;
+}	
+ol ol ol{
+  list-style:circle;
+}
+ol a{
+  color:#275078;
+  text-decoration:none  
+  }
+  
+div.removeInfo{
+	font-size: medium;
+	font-weight: bold;
+	color: #aa0000;
+}

+ 24 - 0
modules/app_java/doc/webhelp/oxygen-webhelp/resources/css/jquery.cleditor.css

@@ -0,0 +1,24 @@
+.cleditorMain {border:1px solid #bbb; padding:0 1px 1px; background-color:#fff; }
+.cleditorMain iframe {border:none; margin:0; padding:0}
+.cleditorMain textarea {border:none; margin:0; padding:0; overflow-y:scroll; font:10pt Arial,Verdana; resize:none; outline:none /* webkit grip focus */}
+.cleditorToolbar {background: url('../img/toolbar.gif') repeat}
+.cleditorGroup {float:left; height:26px}
+.cleditorButton {float:left; width:24px; height:24px; margin:1px 0 1px 0; background: url('../img/buttons.gif')}
+.cleditorDisabled {opacity:0.3; filter:alpha(opacity=30)}
+.cleditorDivider {float:left; width:1px; height:23px; margin:1px 0 1px 0; background:#CCC}
+.cleditorPopup {border:solid 1px #999; background-color:white; position:absolute; font:10pt Arial,Verdana; cursor:default; z-index:10000}
+.cleditorList div {padding:2px 4px 2px 4px}
+.cleditorList p,
+.cleditorList h1,
+.cleditorList h2,
+.cleditorList h3,
+.cleditorList h4,
+.cleditorList h5,
+.cleditorList h6,
+.cleditorList font {padding:0; margin:0; background-color:Transparent}
+.cleditorColor {width:150px; padding:1px 0 0 1px}
+.cleditorColor div {float:left; width:14px; height:14px; margin:0 1px 1px 0}
+.cleditorPrompt {background-color:#F6F7F9; padding:4px; font-size:8.5pt}
+.cleditorPrompt input,
+.cleditorPrompt textarea {font:8.5pt Arial,Verdana;}
+.cleditorMsg {background-color:#FDFCEE; width:150px; padding:4px; font-size:8.5pt}

+ 26 - 0
modules/app_java/doc/webhelp/oxygen-webhelp/resources/css/jquery.realperson.css

@@ -0,0 +1,26 @@
+/* Real Person jQuery plugin styles v1.0.1. */
+.captcha{
+    clear:both ;    
+}
+
+.realperson-challenge {
+	display: block;
+	color: #000;
+	clear:both;
+	border:1px solid #fff;
+	
+}
+.realperson-text {
+	font-family: "Courier New",monospace;
+	font-size: 6px;
+	font-weight: bold;
+	letter-spacing: -2px;
+	line-height: 3px;
+}
+.realperson-regen {	
+	padding-top: 4px;
+	font-size: 12px;
+	text-align: center;
+	cursor: pointer;
+	float:left;
+}

+ 1106 - 0
modules/app_java/doc/webhelp/oxygen-webhelp/resources/css/o_comments.css

@@ -0,0 +1,1106 @@
+#commentsContainer {
+	font-family: 'Lucida sans Unicode', Arial, Verdana;
+	clear: both;
+	margin: 7px;	
+}
+
+#comments {
+	font-size: 12px;
+	border: 1px solid #eee;
+	border-bottom: 1px solid #ddd;
+	color: #444;
+	float:left;
+	width: 100%;
+	padding: 5px 5px 5px 0;
+	vertical-align: middle;
+	background-image: url('../img/icon_comment24x24.png');
+	background-position: 10px 50%;
+	background-repeat: no-repeat;
+	background-color: #fbfbfb;
+	box-shadow:0px 2px 3px #eee;
+}
+
+div.cmTitle{
+	float:left; 	
+	padding: 5px 0 5px 0;
+	margin: 0;
+	right: 15px;	
+}
+#comments #userAccount {
+	padding: 5px 0 5px 0;
+	margin: 0;
+	right: 15px;
+	float: right;	
+}
+
+ul.commentStyle {
+	list-style: none;
+	padding: 0
+}
+
+ul.commentStyle li {
+	clear: both;
+	padding: 0;
+	margin-left: 5px;
+}
+
+ul.commentStyle li ul.commentStyle li {
+	margin-left: 30px;
+	border-top: 0px solid #eee;
+}
+
+ul.commentStyle li:first-child {
+	border-top: 1px solid #eee;
+	background-color: #fff;
+}
+
+ul.commentStyle li div.content {
+	clear: both;
+	padding: 0px 7px 5px 15px;
+	margin: 0;
+}
+
+div.liContent {
+	padding: 10px 0 5px 0;
+	border-bottom: 1px solid #eee;
+}
+
+div.liContent div.liContent {
+	padding-left: 165px;
+}
+
+div.liContent:hover,div.suspended:hover {
+	/*	background-color: lightyellow;*/
+	background-color: #F9FEFF;
+}
+
+.liContent .head {
+	width: 97%;
+	padding: 0px 0 0px 10px;
+	display: inline-block;
+	float: left;
+	/*/Only for IE7 & IE8
+    padding:0px 0 0px 10px\9; */
+}
+
+.minus,.plus {
+	background-image: url('../img/expand.png');
+	background-repeat: no-repeat;
+	padding: 0px 5px 5px 5px;
+	width: 10px;
+	height: 10px;
+	background-position: -16px 0;
+	margin-top: 2px;
+	margin-right: 7px;
+	cursor: pointer;
+	float: left;
+}
+
+.plus {
+	background-position: 0 0;
+}
+
+.minus {
+	background-position: -16px 0;
+}
+
+div.name {
+	float: left;
+	padding:0px 0 10px 0;
+  color: #667799;
+  font-weight:bold
+}
+
+div.date {
+	font-size: 0.8em;
+	padding-left: 17px;
+	float: right;
+	color: #555;
+}
+
+div.version {
+	font-size: 0.9em;
+	padding-left: 10px;
+	float: right;
+	color: #444;
+	vertical-align: middle;
+}
+
+.bt_admin {
+	display: inline-block;
+	float: right;
+	width: 300px;
+}
+
+.commentState {
+	color: #444;
+	float: left;
+	font-size: 0.8em;
+	width: 60px;
+	text-align: center;
+	text-shadow: 0 1px 0 #fff;
+	margin-left: 7px;
+}
+
+.level {
+	padding: 0 10px 0 10px;
+}
+
+.actions {
+	width: 210px;
+	border-left: 1px solid #eee;
+	float: right;
+}
+
+.bt_edit,.bt_approve,.bt_suspend,.bt_delete {
+	padding: 2px 4px 2px 4px;
+	width: 50px;
+	background-color: #fff;
+	border-radius: 5px;
+	text-align: center;
+	text-shadow: 0 1px 0 #fff;
+	cursor: pointer;
+	margin-left: 10px;
+	font-size: 0.9em;
+	box-shadow: 0px 1px 5px #ddd;
+	float: right;
+  border:1px solid #ddd;
+	color:#555;
+}
+
+.bt_edit:hover,.bt_approve:hover,.bt_suspend:hover,.bt_delete:hover {
+  color:#000;
+	background-color: #E1F1FF;
+}
+
+#oldComments {
+	clear: both;
+}
+
+#bt_new {
+	clear: both;
+	margin-top:10px;
+	padding: 10px 0 15px 0px;
+	position: relative;
+	display: inline-block;
+	width: 100%
+}
+
+.bt_new,#bt_approveAll {
+	float: left;
+	background-color: #fdfdfd;
+	cursor: pointer;
+	font-size: 0.8em;
+	color: #444;
+	text-shadow: 0 1px 0 #fff;
+	text-decoration: none;
+	padding: 5px 10px 5px 10px;
+	min-width: 60px;
+	border: 1px solid #ddd;
+	border-radius: 5px;
+	box-shadow: 0px 1px 7px #ddd;
+}
+
+.bt_new:hover {
+	background-color: #eee /*color: #336699;*/
+}
+
+.bt_reply {
+	color: #336699;
+	font-size: 0.9em;
+	margin:auto;
+	float:inherit;
+}
+
+.bt_reply:hover {
+	cursor: pointer;
+}
+/*
+#preload {
+	width: 30%;
+	position: absolute;
+	clear: both;
+	background-color: #fff;
+	padding-left: 15px;
+	border-radius: 7px;
+	border: 1px solid #ccc;
+	border-top: 0;
+	float: none;
+	box-shadow: 1px 1px 10px #999;
+	top: 50%;
+	left: 50%;
+	margin-top: -15%; 
+	margin-left: -15%; 
+	z-index: 100;
+	vertical-align: top;
+	text-align: center;
+	padding-top: 50px;
+	height: 127px;
+}
+*/
+#loginResponse {
+	color: red;
+	font-style: italic
+}
+
+.bt_toolbar,#accountInfo a,#userAccount #bt_logIn,#userAccount #bt_logOff,#userAccount #bt_editProfile
+	{
+	clear:both;
+	background-color: #DFF1FF;
+	cursor: pointer;
+	font-size: 0.8em;
+	color: #333;
+	text-shadow: 0 1px 0 #fff;
+	text-decoration: none;
+	padding: 5px 10px 5px 10px;
+	min-width: 60px;
+	border: 1px solid #ddd;
+	border-radius: 5px;
+	margin: 0;
+	margin-left: 10px;
+	box-shadow: 1px 1px 7px #ddd;	
+}
+
+.bt_toolbar:hover,#accountInfo a:hover,#userAccount #bt_logIn:hover,#userAccount #bt_logOff:hover,#userAccount #bt_editProfile:hover
+	{
+	background-color: #CCE8FF;
+}
+
+#u_Profile {
+	clear: both;
+	position: relative;
+	background-color: #fff;
+	padding-left: 15px;
+	border-radius: 7px;
+	border: 1px solid #ccc;
+	border-top: 0;
+	float: none;
+	width: 300px;
+	box-shadow: 1px 1px 10px #999;
+	margin-top: 14px;
+	z-index: 100;
+}
+
+#u_Profile form {
+	margin-bottom: 15px;
+}
+
+#u_Profile table {
+	font-size: 1em;
+	width: 100%;
+	padding: 2%;
+}
+
+#u_Profile table thead td {
+	font-size: 1.2em
+}
+
+#u_Profile table td:FIRST-CHILD {
+	width: 55%;
+}
+
+#u_Profile table#u_notification {
+	margin: 0;
+	padding: 0
+}
+
+#u_Profile table#u_notification td:FIRST-CHILD {
+	width: 75%;
+}
+
+.u_response {
+	color: #cc0000
+}
+
+.btn,.bt_cancel,#l_bt_submit_nc,#bt_recover,#bt_signUp,#logIn,#l_bt_submit_log,#bt_passwd,.span_bt,#bt_profile,#bt_close
+	{
+	background-color: #F9F9F9;
+	border:1px solid #ddd;
+	border-radius: 5px;
+	box-shadow: 1px 1px 3px #ddd;
+	min-width: 60px;
+	color: #444;
+	text-shadow: 0 1px 0 #fff;
+	cursor: pointer;
+	padding: 6px 10px 6px 10px;
+	margin-top: 15px;
+	display: inline-block;
+	font-size: 0.9em;
+  font-style:normal;
+	text-align: center;
+	
+}
+
+.btn:HOVER,.bt_cancel:hover,#l_bt_submit_nc:hover,#bt_recover:hover,#bt_signUp:hover,#logIn:hover,#l_bt_submit_log:hover,.span_bt:hover,#bt_passwd:hover,#bt_profile:hover, #bt_close:hover
+	{
+	color:#000;
+	border:1px solid #ccc;
+	background-color: #E1F1FF;
+	box-shadow: 1px 1px 3px #ddd;
+}
+
+#cm_count, #preload {
+	margin-left: 35px;
+}
+
+#cm_count,#cm_title {
+	font-weight: bold;
+	font-size: 1.2em;
+	padding-left: 5px;
+}
+
+/*	Log In data */
+#loginData,#recoverPwd,#signUp {
+	width: 300px;
+	position: absolute;
+	clear: both;
+	background-color: #fff;
+	border-radius: 7px;
+	border: 1px solid #ccc;
+	border-top: 0;
+	float: left;
+	padding: 10px;
+	box-shadow: 1px 1px 10px #999;
+	top: 20%;
+	left: 50%;
+	margin-top: -25%; /*set to a negative number 1/2 of your height*/
+	margin-left: -25%; /*set to a negative number 1/2 of your width*/
+	z-index: 100;
+}
+
+#signUp {
+	width: 350px;
+}
+
+.login {
+	font-size: 1em;
+	width: 96%;
+	padding: 2%;
+}
+
+.login thead td {
+	font-size: 1.2em;
+	font-weight: bold;
+}
+
+.login td:FIRST-CHILD {
+	width: 50%
+}
+
+.loginAlternative {
+	width: 93%;
+	/*padding: 10px;*/
+}
+
+.loginAlternative span {
+	padding: 0px 5px 10px 5px;
+	margin: 0
+}
+
+.loginAlternative span:hover {
+	color: #cc0000;
+	cursor: pointer;
+}
+
+#link_lostPwd {
+	float: left;
+	color: #336699;
+}
+
+#link_signUp {
+	float: right;
+	color: #336699;
+}
+/*	/ Log In data */
+#signUp table thead td {
+  text-align:left;
+	font-size: 1.2em;
+	font-weight: bold;
+}
+#signUp #signUpResponse{
+  padding:15px 0 10px 0;
+  font-size:0.9em;
+  font-weight:normal;  
+}
+
+#signUp #signUpResponse #bt_close{
+  font-size:0.8em;
+  font-style:normal;
+  font-weight:normal;
+  margin-left:auto;
+  margin-right:auto;
+  display:inherit;
+  text-align: center;
+  width:100px;  
+}
+
+#signUp table td:FIRST-CHILD {
+	width: 45%
+}
+
+.inputTable {
+	width: 180px;
+}
+
+#signUp table {
+	font-size: 1em;
+	width: 100%;
+}
+
+/*	/ Sign up Form */
+#recoverPwd table thead td {
+	font-size: 1.2em;
+}
+
+#recoverPwd table td:FIRST-CHILD {
+	width: 45%
+}
+
+#recoverPwd table {
+	font-size: 1em;
+	width: 100%;
+}
+
+#userAccount #recoverPwd {
+	position: absolute;	
+	margin-top: 7px;
+	right: 10px;	
+}
+/*	/ Lost Password Form */
+
+/* Insert new comment */
+#newComment {
+	width: 96%;
+	margin: 10px;
+	padding: 10px;
+	font-size: 1em;
+	vertical-align: bottom;
+}
+
+#newComment form {
+	padding: 0;
+	margin: 0
+}
+
+#commentTitle {
+	padding-bottom: 4px;
+	display: inline-block;
+	font-weight:bold;
+	color:#444
+}
+
+/* Close button */
+.bt_close {
+	clear: both;
+	background-image: url("../img/close.png");
+	background-repeat: no-repeat;
+	/*background-position:5px 5px;*/
+	position: relative;
+	cursor: pointer;
+	width: 20px;
+	height: 20px;
+	padding: 0px 4px 0 4px;
+	text-align: center;
+	float: right;
+	margin-top: 10px;
+}
+
+.bt_close:HOVER {
+	background-image: url("../img/close_hover.png");
+}
+
+#newComment .bt_close {
+	margin: 0px;
+}
+/* / Close button */
+#u_Profile {
+	clear: both;
+	float: right;
+	position: absolute;
+	width: 500px;
+	right: 10px;
+	margin-top: 35px;
+	z-index: 100;
+}
+
+#preload img {
+  padding: 0px 5px 0px 5px;
+  margin-bottom:0px;
+}
+
+.red {
+	color: #cc0000
+}
+
+div.suspended {
+	background-color: white;
+}
+
+.moderationInfo {
+	margin: 0;
+	padding: 0;
+	color: #cc0000;
+	text-shadow:0 1px 0 #fff;
+}
+
+.mustBeModerate {
+	background-color: #E8F0F7;
+	padding: 10px;
+	border-radius: 10px;
+	margin-bottom: 10px
+}
+
+/* ADMIN */
+#cm_title span {
+	padding: 8px
+}
+
+#approveAll {
+	position: absolute;
+	right: 0;
+}
+
+#bt_approveAll {
+	background-color: #eee;
+	text-shadow: 0 1px 0 #fff;
+	cursor: pointer;
+}
+
+#bt_approveAll:hover {
+	background-color: #98C1D6;
+	text-shadow: 0 1px 0 #ddd;
+}
+
+#showConfirmApproveAll {
+	right: 20px;
+	position: absolute;
+	background-color: #fcfcfc;
+	border: 1px solid #ccc;
+	min-width: 150px;
+	box-shadow: 1px 1px 15px #555;
+	padding: 15px;
+	margin-top: 25px;
+	width: 250px;
+	text-align: center;
+}
+
+#editUser {
+	z-index: 1000;
+	background-color: #fff;
+	border: 1px solid #ccc;
+	position: absolute;
+	min-width: 400px;
+	box-shadow: 1px 1px 15px #555;
+	padding: 15px;
+	left: 50%;
+	margin-top: -100px;
+	margin-left: -200px;
+}
+
+#editUser:hover {
+	background-color: white
+}
+
+#editUser table td:FIRST-CHILD {
+	width: 200px;
+}
+
+#adminUsers form fieldset {
+	border: 0px solid #eee;
+	margin-top: 20px;
+}
+
+table#usersList {
+	width: 100%
+}
+
+table#usersList td {
+	padding: 10px
+}
+
+table#usersList thead {
+	background-color: #336699;
+	color: #fff;
+	text-shadow: 0 1px 0 #333;
+	text-align: left;
+	text-indent: 15px
+}
+
+table#usersList tbody td {
+	border: 1px solid #fff;
+}
+
+table#usersList tbody tr:HOVER { /*	background-color: lightyellow;*/
+	background-color: #F2FAFF;
+	cursor: pointer;
+	border-top: 1px solid #eee;
+	border-bottom: 1px solid #ccc;
+}
+
+table#usersList #editUser table tr:HOVER {
+	background-color: #fff;
+}
+
+.bt_edit_user {
+	padding: 3px 5px 3px 5px;
+	width: 50px;
+	background-color: #eee;
+	border-radius: 5px;
+	text-align: center;
+	text-shadow: 0 1px 0 #fff;
+	cursor: pointer;
+	margin-left: 10px;
+	font-size: 0.7em;
+	box-shadow: 0px 1px 2px #999;
+}
+
+.bt_edit_user:hover {
+	background-color: #98C1D6;
+	text-shadow: 0 1px 0 #ddd;
+}
+
+#confirmDelete {
+	right: 20px;
+	position: absolute;
+	background-color: #fcfcfc;
+	border: 1px solid #ccc;
+	min-width: 150px;
+	box-shadow: 1px 1px 15px #555;
+	padding: 15px;
+	margin-top: 25px
+}
+
+#confirmActions {
+	text-align: center;
+	padding: 10px;
+	margin-top: 20px;
+}
+
+#confirmDelete #commentToDelete {
+	text-align: left;
+	padding: 10px;
+	border: 1px solid #ccc;
+	background-color: #fff;
+	margin: 5px
+}
+
+#confirmActions span {
+	text-align: center;
+	padding: 4px;
+	border: 1px solid #ccc;
+	border-radius: 5px;
+	width: 25px;
+	margin: 40px;
+	cursor: pointer
+}
+
+.cleditorMain {
+	border: 1px solid #bbb;
+	padding: 0 1px 1px;
+	background-color: #fff;
+}
+
+.cleditorMain iframe {
+	border: none;
+	margin: 0;
+	padding: 0
+}
+
+.cleditorMain textarea {
+	border: none;
+	margin: 0;
+	padding: 0;
+	overflow-y: scroll;
+	font: 10pt Arial, Verdana;
+	resize: none;
+	outline: none /* webkit grip focus */
+}
+
+.cleditorToolbar {
+	background: url('../img/toolbar.gif') repeat
+}
+
+.cleditorGroup {
+	float: left;
+	height: 26px
+}
+
+.cleditorButton {
+	float: left;
+	width: 24px;
+	height: 24px;
+	margin: 1px 0 1px 0;
+	background: url('../img/buttons.gif')
+}
+
+.cleditorDisabled {
+	opacity: 0.3;
+	filter: alpha(opacity =   30)
+}
+
+.cleditorDivider {
+	float: left;
+	width: 1px;
+	height: 23px;
+	margin: 1px 0 1px 0;
+	background: #CCC
+}
+
+.cleditorPopup {
+	border: solid 1px #999;
+	background-color: white;
+	position: absolute;
+	font: 10pt Arial, Verdana;
+	cursor: default;
+	z-index: 10000
+}
+
+.cleditorList div {
+	padding: 2px 4px 2px 4px
+}
+
+.cleditorList p,.cleditorList h1,.cleditorList h2,.cleditorList h3,.cleditorList h4,.cleditorList h5,.cleditorList h6,.cleditorList font
+	{
+	padding: 0;
+	margin: 0;
+	background-color: Transparent
+}
+
+.cleditorColor {
+	width: 150px;
+	padding: 1px 0 0 1px
+}
+
+.cleditorColor div {
+	float: left;
+	width: 14px;
+	height: 14px;
+	margin: 0 1px 1px 0
+}
+
+.cleditorPrompt {
+	background-color: #F6F7F9;
+	padding: 4px;
+	font-size: 8.5pt
+}
+
+.cleditorPrompt input,.cleditorPrompt textarea {
+	font: 8.5pt Arial, Verdana;
+}
+
+.cleditorMsg {
+	background-color: #FDFCEE;
+	width: 150px;
+	padding: 4px;
+	font-size: 8.5pt
+}
+
+.textError {
+	color: red;
+	font-weight: bold;
+}
+
+.textInfo {
+	color: yellow;
+	font-weight: normal;
+}
+
+#adminMenu {
+	clear: both;
+	float: right;
+	padding: 5px 0 5px 0;
+	margin: 0;
+	right: 15px;
+	display: inline-block;		
+}
+
+#adminMenu .span_bt {
+	float: right;
+	margin-right: 20px;
+}
+
+.formTitle {
+	height: 30px;
+	font-weight: bold;
+	font-size: 1.2em;
+	float: left;
+	padding: 10px 10px 10px 10px;
+}
+
+#setVersionDiv {
+	position: absolute;
+	clear: both;
+	background-color: #fff;
+	border-radius: 7px;
+	border: 1px solid #ccc;
+	border-top: 0;
+	float: none;
+	box-shadow: 1px 1px 10px #999;
+	top: 10%;
+	left: 50%;
+	width: 30%;
+	padding:15px;
+	/*margin-top: -90px; /*set to a negative number 1/2 of your height*/
+	margin-left: -15%; /*set to a negative number 1/2 of your width*/
+	z-index: 100;
+}
+
+.v_true,.v_false {
+	padding: 3px 5px 3px 5px;
+	width: 30px;
+	height: 20px;
+	background-color: #eee;
+	border-radius: 5px;
+	text-align: center;
+	text-shadow: 0 1px 0 #fff;
+	cursor: pointer;
+	font-size: 1em;
+	box-shadow: 0px 1px 2px #999;
+	float: left;
+	margin-top: 15px;
+	margin-left: 10px;
+}
+
+.versionTimeLine {
+	float: left;
+	width: 56px;
+	background-image: url('../img/timeVersion.png');
+	background-position: 50% 0px;
+	background-repeat: no-repeat;
+	margin-bottom: 10px;
+}
+
+.v_true:hover,.v_false:hover {
+	background-color: #98C1D6;
+	text-shadow: 0 1px 0 #ddd;
+	margin-left: 10px;
+}
+
+.v_true {
+	background-color: #dfd;
+}
+
+.gtSign {
+	padding: 3px 0px 3px 0px;
+	width: 15px;
+	height: 20px;
+	margin-top: 15px;
+	text-align: center;
+	text-shadow: 0 1px 0 #fff;
+	font-size: 1em;
+	float: left;
+}
+
+#v_preload {
+	height: 30px;
+	font-weight: bold;
+	font-size: 1.2em;
+	float: left;
+	padding: 10px 10px 10px 10px;
+}
+
+#setVersionInfo {
+	clear: both;
+	padding: 10px;
+}
+
+#exportDiv {
+	position: absolute;
+	clear: both;
+	width: 40%;
+	background-color: #fff;
+	border-radius: 7px;
+	border: 1px solid #ccc;
+	border-top: 0;
+	float: none;
+	padding: 10px;
+	box-shadow: 1px 1px 10px #999;
+	top: 20%;
+	left: 50%;
+	min-width:400px;
+	margin-top: -10%; /*set to a negative number 1/2 of your height*/
+	margin-left: -20%; /*set to a negative number 1/2 of your width*/
+	z-index: 100;
+}
+
+#ll_exp_sel {
+	margin-top: 10px;
+	margin-bottom: 10px;
+}
+
+.selected {
+	position: relative;
+	float: left;
+	margin-left: 20px;
+	background-color: #fff;
+	padding: 10px;
+}
+
+.bandL {
+	float: left;
+}
+
+.ex_close {
+	background-image: url("../img/close.png");
+	background-position: 0px 0px;
+	width: 10px;
+	height: 10px;
+	float: right;
+	cursor: pointer;
+}
+
+.ex_close:HOVER {
+	background-image: url("../img/close_hover.png");
+	cursor: pointer;
+}
+
+.bt_inactiv {
+	background-color: #efefef;
+	border-radius: 5px;
+	box-shadow: 0 1px 4px #aaa;
+	min-width: 60px;
+	color: #ddd;
+	text-shadow: 0 1px 0 #fff;
+	cursor: pointer;
+	padding: 6px 10px 6px 10px;
+	margin-top: 15px;
+	display: inline-block;
+	font-size: 0.9em;
+	text-align: center;
+	border: 0;
+}
+
+.bt_inactiv:hover {
+	background-color: #efefef;
+	color: #ddd;
+	text-shadow: 0 1px 0 #222;
+	box-shadow: 0 1px 7px #000;
+}
+
+#inlineViewDiv {
+	position: absolute;
+	clear: both;
+	width: 90%;
+	height: 80%;
+	background-color: #fff;
+	border-radius: 7px;
+	border: 1px solid #ccc;
+	box-shadow: 1px 1px 10px #999;	
+	float: none;
+	padding: 10px;	
+	top: 7%;
+	left: 5%;
+	/*margin-top: 10%; /*set to a negative number 1/2 of your height*/
+	/*margin-left: -40%; /*set to a negative number 1/2 of your width*/
+	overflow: hidden;
+}
+
+#ex_inline {
+	max-height: 85%;
+	overflow: auto;
+	width: 100%;
+}
+
+.inLineFormTitle {
+	height: 5%;
+	font-weight: bold;
+	font-size: 1.2em;
+	float: left;
+	padding: 10px 10px 10px 10px;
+}
+.inLineBand {
+	clear: both;
+	float: left;
+	padding: 10px 0px 0px 0px;
+	width: 100%;
+	height: 5%;
+}
+
+.deleteBtn {
+	padding: 2px 3px 2px 3px;
+	width: 40px;
+	background-color: #eee;
+	border-radius: 5px;
+	text-align: center;
+	text-shadow: 0 1px 0 #fff;
+	cursor: pointer;
+	font-size: 1em;
+	box-shadow: 0px 1px 2px #999;
+	float: right;
+}
+
+.deleteBtn:hover {
+	background-color: #98C1D6;
+	text-shadow: 0 1px 0 #ddd;
+}
+
+.hrPadding {
+	padding: 20px 10px 0px 10px;
+}
+
+div.table {
+	width: 99%;	
+}
+
+div.tbHRow {
+	width: 98%;
+	height:100%;
+	float: left;
+	padding: 5px 0px 5px 0px;
+	border-bottom: 1px solid #ccc;
+	background-color: #69c;
+	color: #fff;
+	text-shadow: 0 1px 0 #333;
+	text-align: center;	
+}
+
+div.tbHCell {
+	float: left;
+	width: 10%;	
+}
+
+div.tbRow {
+	float: left;
+	width: 99%;
+	padding-bottom: 5px;
+	border-bottom: 1px solid #ccc;
+	vertical-align: middle;
+}
+div.tbRow:hover {
+	background-color:#fffff0;
+}
+
+div.tbCell {
+	float: left;		
+	vertical-align: middle;		
+	padding-left:5px;  
+}
+div.tbCell p{
+	
+}
+.cb-element{	
+	margin:5px 0px 0px 0px;		
+}
+#newPassword {
+	position: absolute;
+	clear: both;
+	width: 40%;
+	background-color: #fff;
+	border-radius: 7px;
+	border: 1px solid #ccc;
+	border-top: 0;
+	float: none;
+	padding: 10px;
+	box-shadow: 1px 1px 10px #999;
+	top: 20%;
+	left: 50%;
+	margin-top: -10%; /*set to a negative number 1/2 of your height*/
+	margin-left: -20%; /*set to a negative number 1/2 of your width*/
+	z-index: 100;
+}
+.btnHGlue{
+	display: inline-block; 
+	width:30px;
+	height:10px;
+}
+

+ 647 - 0
modules/app_java/doc/webhelp/oxygen-webhelp/resources/css/style.css

@@ -0,0 +1,647 @@
+body {
+	font-family: 'Lucida sans Unicode', Arial, Verdana;
+	font-size: 12px
+}
+
+#comments {
+	border-bottom: 1px solid #ccc;
+	color: #444;
+	padding: 9px;
+	background-image: url('/img/icon_comment24x24.png');
+	background-position: 10px 7px;
+	background-repeat: no-repeat;
+	background-color: #eee;
+}
+
+ul.commentStyle {
+	list-style: none;
+	padding: 0
+}
+
+ul.commentStyle li {
+	clear: both;
+	padding: 0;
+	margin-left: 5px;
+}
+
+ul.commentStyle li ul.commentStyle li {
+	margin-left: 30px;
+}
+
+div.liContent {
+	padding: 7px;
+	padding-left: 0px;
+	border-bottom:1px solid #ccc;
+}
+
+
+div.liContent div.liContent {
+	padding-left: 165px;
+}
+.head{
+	
+}
+
+.minus,.plus {
+	background-image: url('/img/expand.png');
+	background-repeat: no-repeat;
+	padding: 2px 7px 7px 10px;
+	width: 15px;
+	height: 15px;
+	margin-top: 10px;
+	background-position: -16px 0;
+	margin-right: 7px;
+}
+
+.plus {
+	background-position: 0 0;
+}
+
+.minus {
+	background-position: -13px 0;
+}
+
+div.liContent:hover,div.suspended:hover {
+	background-color: lightyellow;
+}
+
+ul.commentStyle li:first-child {
+	border-top: 0 solid #ccc
+}
+
+ul.commentStyle li ul.commentStyle li {
+	/*border-bottom: 1px solid #ccc; */
+}
+
+ul.commentStyle li div.content {
+	padding: 7px 7px 7px 15px;
+	clear: both
+}
+.content p:FIRST-CHILD{
+	padding: 5px;
+margin: 0;
+	}
+
+span.name {
+	font-weight: bold;
+	font-size: 1.2em;
+	color: #336699;
+}
+
+span.date {
+	font-size: 0.8em;
+	padding-left: 17px;
+	float: right;
+}
+
+span.version {
+	font-size: 1.0em;
+	padding-left: 10px;
+	float: right;
+}
+
+.bt_admin {
+	float: right;
+	vertical-align: middle;
+}
+
+.commentState {
+	padding: 3px 7px 3px 7px;
+	color: #444;
+	display: inline-block;
+	font-size: 0.8em;
+	width: 60px;
+	text-align: center;
+	text-shadow: 0 1px 0 #fff;
+	margin-left: 7px;
+}
+
+.level {
+	padding: 0 10px 0 10px;
+}
+
+.actions {
+	width: 210px;
+	border-left: 1px solid #eee;
+	float: right;
+}
+
+.bt_edit,.bt_approve,.bt_suspend,.bt_delete {
+	padding: 2px 4px 2px 4px;
+	width: 50px;
+	background-color: #eee;
+	border-radius: 5px;
+	text-align: center;
+	text-shadow: 0 1px 0 #fff;
+	cursor: pointer;
+	margin-left: 10px;
+	font-size: 0.9em;
+	box-shadow: 0px 1px 5px #999;
+	float: right;
+}
+
+.bt_edit:hover,.bt_approve:hover,.bt_suspend:hover,.bt_delete:hover {
+	background-color: #98C1D6;
+	text-shadow: 0 1px 0 #ddd;
+}
+
+#oldComments {
+	clear: both;
+}
+
+#bt_new {
+	margin: 10px;
+	position: relative;
+}
+
+.span_new {
+	background-color: #336699;
+	color: white;
+	border-radius: 4px;
+	text-shadow: 0 1px 0 #000;
+	padding: 3px;
+	border: 0;
+	margin: 0;
+	font-size: 0.9em;
+	cursor: pointer;
+	width: 60px;
+	text-align: center;
+}
+.bt_reply {
+	color: #336699;
+}
+.bt_reply:hover {
+	cursor: pointer;
+}
+
+.span_new {
+	width: 100px
+}
+
+.span_new:hover {
+	background-color: #334466 /*color: #336699;*/
+}
+
+#preload {
+	width: 300px;
+}
+
+#loginResponse {
+	color: red;
+	font-style: italic
+}
+
+#userAccount {
+	float: right;
+	margin: 0;
+	margin-top: -4px
+}
+
+#accountInfo a,#userAccount #bt_logIn,#userAccount #bt_logOff,#userAccount #bt_editProfile {
+	background-color: #336699;
+	padding: 5px 10px 5px 10px;
+	color: white;
+	border: 0;
+	border-radius: 4px;
+	margin: 0;
+	font-size: 0.8em;
+	text-shadow: 0 1px 0 #000;
+	text-decoration: none;
+	cursor: pointer;
+}
+
+#accountInfo a:hover,#userAccount #bt_logIn:hover,#userAccount #bt_logOff:hover,#userAccount #bt_editProfile:hover {
+	background-color: #334466
+}
+
+#u_Profile {
+	clear: both;
+	position: relative;
+	background-color: #fff;
+	padding-left: 15px;
+	border-radius: 7px;
+	border: 1px solid #ccc;
+	border-top: 0;
+	float: none;
+	width: 300px;
+	box-shadow: 1px 1px 10px #999;
+	margin-top: 14px;
+	z-index: 100;
+}
+
+#u_Profile table {
+	font-size: 1em;
+	width: 96%;
+	padding: 2%;
+}
+
+#u_Profile table thead td {
+	font-size: 1.2em
+}
+
+#u_Profile table td:FIRST-CHILD {
+	width: 55%;
+}
+
+#u_Profile table#u_notification {
+	margin: 0;
+	padding: 0
+}
+
+#u_Profile table#u_notification td:FIRST-CHILD {
+	width: 75%;
+}
+.u_response{color:#cc0000}
+
+#submitComment,#bt_recover,#bt_signUp,#logIn,#bt_passwd,#bt_profile {
+	background-color: #eee;
+	border-radius: 5px;
+	box-shadow: 0 1px 7px #888;
+	color: #000;
+	text-shadow: 0 1px 0 #fff;
+	cursor: pointer;
+	padding: 3px 6px 4px 6px;
+	margin-top: 13px;
+	display: inline-block;
+	font-size: 0.9em;
+	border: 0;
+}
+
+#submitComment:hover,#bt_recover:hover,#bt_signUp:hover,#logIn:hover,#bt_passwd:hover,#bt_profile:hover {
+	background-color: #336699;
+	color: #fff;
+	text-shadow: 0 1px 0 #222;
+	box-shadow: 0 1px 12px #000;
+}
+
+#cm_count {
+	font-weight: bold;
+	font-size: 1.2em;
+	margin-left: 35px;
+}
+#cm_title{
+	font-weight: bold;
+	font-size: 1.2em;	
+}
+
+
+/*	Log In data */
+#loginData {
+	clear: both;
+	position: relative;
+	background-color: #fff;
+	padding-left: 15px;
+	border-radius: 7px;
+	border: 1px solid #ccc;
+	border-top: 0;
+	float: none;
+	width: 300px;
+	box-shadow: 1px 1px 10px #999;
+	margin-top: 14px;
+	z-index: 100;
+}
+
+#userAccount #loginData {
+	position: absolute;
+	right: 10px;
+}
+
+.login {
+	font-size: 1em;
+	width: 96%;
+	padding: 2%;
+}
+
+.login thead td {
+	font-size: 1.2em
+}
+
+.login td:FIRST-CHILD {
+	width: 50%
+}
+
+.loginAlternative {
+	width: 280px;
+	padding: 10px;
+}
+
+.loginAlternative span {
+	padding: 0px 5px 10px 5px;
+	margin: 0
+}
+
+.bt_lostPwd {
+	float: left;
+	color: #336699;
+}
+
+.bt_signUp {
+	float: right;
+	color: #336699;
+}
+
+.loginAlternative span:hover {
+	color: #cc0000;
+	cursor: pointer;
+}
+
+/*	/ Log In data */
+
+/*	Sign up Form */
+#signUp {
+	clear: both;
+	position: relative;
+	background-color: #fff;
+	padding-left: 15px;
+	padding-right: 5px;
+	border-radius: 7px;
+	border: 1px solid #ccc;
+	float: none;
+	width: 360px;
+	box-shadow: 1px 1px 10px #999;
+	margin-top: 14px;
+	z-index: 100;
+}
+
+#signUp table thead td {
+	font-size: 1.2em;
+}
+
+#signUp table td:FIRST-CHILD {
+	width: 45%
+}
+
+.inputTable {
+	width: 180px;
+}
+
+#signUp table {
+	font-size: 1em;
+	width: 100%;
+}
+
+#userAccount #signUp {
+	position: absolute;
+	right: 10px;
+}
+
+/*	/ Sign up Form */
+
+/*	Lost Password Form */
+#recoverPwd {
+	clear: both;
+	position: relative;
+	background-color: #fff;
+	padding-left: 15px;
+	padding-right: 5px;
+	border-radius: 7px;
+	border: 1px solid #ccc;
+	float: none;
+	width: 330px;
+	box-shadow: 1px 1px 10px #999;
+	margin-top: 14px;
+	z-index: 100;
+}
+
+#recoverPwd table thead td {
+	font-size: 1.2em;
+}
+
+#recoverPwd table td:FIRST-CHILD {
+	width: 45%
+}
+
+.inputTable {
+	width: 180px;
+}
+
+#recoverPwd table {
+	font-size: 1em;
+	width: 100%;
+}
+
+#userAccount #recoverPwd {
+	position: absolute;
+	right: 10px;
+}
+/*	/ Lost Password Form */
+
+/* Insert new comment */
+#newComment {
+	width: 600px;
+	margin: 10px;
+	padding: 10px;
+	font-size: 1em;
+	vertical-align: bottom;
+}
+
+#newComment form {
+	padding: 0;
+	margin: 0
+}
+
+/* Close button */
+.bt_close {
+	clear: both;
+	background-image: url("/img/close.png");
+	background-repeat: no-repeat;
+	/*background-position:5px 5px;*/
+	position: relative;
+	cursor: pointer;
+	width: 20px;
+	height: 20px;
+	padding: 0px 4px 0 4px;
+	text-align: center;
+	float: right;
+	margin-top: 10px;
+}
+
+.bt_close:HOVER {
+	background-image: url("/img/close_hover.png");
+}
+
+#newComment .bt_close {
+	margin-top: 0px;
+}
+/* / Close button */
+#u_Profile {
+	clear: both;
+	float: right;
+	position: absolute;
+	width: 500px;
+	right: 10px;
+	margin-top: 35px;
+	z-index: 100;
+}
+
+#preload {
+	vertical-align: top;
+	text-align: center;
+	padding-top: 80px;
+	height: 127px
+}
+
+#preload img {
+	width: 50px
+}
+
+.red {
+	color: #cc0000
+}
+
+div.suspended { /*	background-color: white; */
+	
+}
+
+.moderationInfo {
+	margin: 0;
+	padding: 0;
+	color: #cc0000;
+}
+
+.mustBeModerate {
+	background-color: #E8F0F7;
+	padding: 10px;
+	border-radius: 10px;
+	margin-bottom: 10px
+}
+
+/* ADMIN */
+#cm_title span {
+	padding: 8px
+}
+
+#bt_approveAll{
+	padding: 2px 4px 2px 4px;
+	width: 80px;
+	background-color: #eee;
+	border-radius: 5px;
+	text-align: center;
+	text-shadow: 0 1px 0 #fff;
+	cursor: pointer;
+	margin-left: 10px;
+	font-size: 0.9em;
+	box-shadow: 0px 1px 5px #999;
+	float:right;
+}
+#bt_approveAll:hover {
+	background-color: #98C1D6;
+	text-shadow: 0 1px 0 #ddd;
+}
+
+
+#showConfirmApproveAll{
+	right: 20px;
+	position: absolute;
+	background-color: #fcfcfc;
+	border: 1px solid #ccc;
+	min-width: 150px;
+	box-shadow: 1px 1px 15px #555;
+	padding: 15px;
+	margin-top:25px
+}
+
+
+#editUser {
+	z-index: 1000;
+	background-color: #fff;
+	border: 1px solid #ccc;
+	position: absolute;
+	min-width: 400px;
+	box-shadow: 1px 1px 15px #555;
+	padding: 15px;
+	left: 40%;
+	margin-top: -100px;
+}
+
+#editUser:hover {
+	background-color: white
+}
+
+#adminUsers form fieldset {
+	border: 0px solid #eee;
+	margin-top: 20px;
+}
+
+table#usersList {
+	width: 100%
+}
+
+table#usersList td {
+	padding: 10px
+}
+
+table#usersList thead {
+	background-color: #336699;
+	color: #fff;
+	text-shadow: 0 1px 0 #333;
+	text-align: left;
+	text-indent: 15px
+}
+
+table#usersList tbody td {
+	border: 1px solid #fff;
+}
+
+table#usersList tbody tr:HOVER {
+	background-color: lightyellow;
+	cursor: pointer;
+	border-top: 1px solid #eee;
+	border-bottom: 1px solid #ccc;
+}
+
+table#usersList #editUser table tr:HOVER {
+	background-color: #fff;
+}
+
+.bt_edit_user {
+	padding: 3px 5px 3px 5px;
+	width: 50px;
+	background-color: #eee;
+	border-radius: 5px;
+	text-align: center;
+	text-shadow: 0 1px 0 #fff;
+	cursor: pointer;
+	margin-left: 10px;
+	font-size: 0.7em;
+	box-shadow: 0px 1px 2px #999;
+}
+
+.bt_edit_user:hover {
+	background-color: #98C1D6;
+	text-shadow: 0 1px 0 #ddd;
+}
+
+#confirmDelete {
+	right: 20px;
+	position: absolute;
+	background-color: #fcfcfc;
+	border: 1px solid #ccc;
+	min-width: 150px;
+	box-shadow: 1px 1px 15px #555;
+	padding: 15px;
+	margin-top:25px
+}
+
+#confirmActions {
+	text-align: center;
+	padding: 10px;
+}
+
+#confirmDelete #commentToDelete {
+	text-align: left;
+	padding: 10px;
+	border: 1px solid #ccc;
+	background-color: #fff;
+	margin: 5px
+}
+
+#confirmActions span {
+	text-align: center;
+	padding: 4px;
+	border: 1px solid #ccc;
+	border-radius: 5px;
+	width: 25px;
+	margin: 40px;
+	cursor: pointer
+}

+ 459 - 0
modules/app_java/doc/webhelp/oxygen-webhelp/resources/css/ui.dynatree.css

@@ -0,0 +1,459 @@
+/*******************************************************************************
+ * Tree container
+ */
+ul.dt-container
+{
+	font-family: arial, helvetica, tahoma;
+	font-size: 10pt; /* font size should not be too big */
+	white-space: nowrap;
+	padding: 3px 3px 3px 13px;
+	margin: 0; /* issue 201 */
+  background-color: white;
+}
+
+ul.dt-container ul
+{
+	padding: 0 0 0 16px;
+	margin: 0;
+}
+
+ul.dt-container li
+{
+	list-style-image: none;
+	list-style-position: outside;
+	list-style-type: none;
+	-moz-background-clip:border;
+	-moz-background-inline-policy: continuous;
+	-moz-background-origin: padding;
+	background-attachment: scroll;
+	background-color: transparent;
+	background-repeat: repeat-y;
+	background-position: 0 0;
+	/*
+	background-image: url("../img/icons_96x256.gif");
+	background-position: -80px -64px;
+	*/
+	margin: 0;
+	padding: 1px 0 0 0;
+}
+/* Suppress lines for last child node */
+ul.dt-container li.dt-lastsib
+{
+	background-image: none;
+}
+/* Suppress lines if level is fixed expanded (option minExpandLevel) */
+ul.dt-no-connector > li
+{
+	background-image: none;
+}
+
+/* Style, when control is disabled */
+.ui-dt-disabled ul.dt-container
+{
+	opacity: 0.5;
+/*	filter: alpha(opacity=50); /* Yields a css warning */
+	background-color: silver;
+}
+
+/*******************************************************************************
+ * Common icon definitions
+ */
+span.dt-empty,
+span.dt-vline,
+span.dt-connector,
+span.dt-expander,
+span.dt-icon,
+span.dt-checkbox,
+span.dt-radio,
+span.dt-drag-helper-img,
+#dt-drop-marker
+{
+	width: 16px;
+	height: 16px;
+	display: -moz-inline-box; /* @ FF 1+2 */
+	display: inline-block; /* Required to make a span sizeable */
+	vertical-align: top;
+	background-repeat: no-repeat;
+	background-position: left;
+	background-image: url("../img/icons.png");
+	background-position: 0 0;
+}
+
+/** Used by 'icon' node option: */
+ul.dt-container img
+{
+	width: 16px;
+	height: 16px;
+	margin-left: 3px;
+	vertical-align: top;
+	border-style: none;
+}
+
+
+/*******************************************************************************
+ * Lines and connectors
+ */
+
+span.dt-connector
+{
+	background-position: -16px -64px;
+}
+
+/*******************************************************************************
+ * Expander icon
+ * Note: IE6 doesn't correctly evaluate multiples class names,
+ *		 so we create combined class names that can be used in the CSS.
+ *
+ * Prefix: dt-exp-
+ * 1st character: 'e': expanded, 'c': collapsed
+ * 2nd character (optional): 'd': lazy (Delayed)
+ * 3rd character (optional): 'l': Last sibling
+ *  
+ * 
+ */
+
+/*.dt-ico-cf span.dt-icon  /\* Collapsed Folder *\/
+{
+	background-position: 0px -16px;
+}
+
+.dt-ico-ef span.dt-icon  /\* Expanded Folder *\/
+{
+	background-position: -64px -16px;
+}
+*/
+
+span.dt-expander
+{
+	/*background-position: 0px -80px;*/
+	background-position: 0px -16px;
+	cursor: pointer;
+}
+.dt-exp-cl span.dt-expander /* Collapsed, not delayed, last sibling */
+{
+	/*background-position: 0px -96px;*/
+	background-position: 0px -16px;
+}
+.dt-exp-cd span.dt-expander /* Collapsed, delayed, not last sibling */
+{
+	/*background-position: -64px -80px;*/
+	background-position: 0px -16px;
+}
+.dt-exp-cdl span.dt-expander /* Collapsed, delayed, last sibling */
+{
+	/*background-position: -64px -96px;*/
+	background-position: 0px -16px;
+}
+.dt-exp-e span.dt-expander,  /* Expanded, not delayed, not last sibling */
+.dt-exp-ed span.dt-expander  /* Expanded, delayed, not last sibling */
+{
+	/*background-position: -32px -80px;*/
+	background-position: -64px -16px;
+}
+.dt-exp-el span.dt-expander,  /* Expanded, not delayed, last sibling */
+.dt-exp-edl span.dt-expander  /* Expanded, delayed, last sibling */
+{
+	/*background-position: -32px -96px;*/
+	background-position: -64px -16px;
+}
+.dt-loading span.dt-expander  /* 'Loading' status overrides all others */
+{
+	background-position: 0 0;
+	background-image: url("../img/loading.gif");
+}
+
+
+/*******************************************************************************
+ * Checkbox icon
+ */
+span.dt-checkbox
+{
+	margin-left: 3px;
+	background-position: 0px -32px;
+}
+span.dt-checkbox:hover
+{
+	background-position: -16px -32px;
+}
+
+.dt-partsel span.dt-checkbox
+{
+	background-position: -64px -32px;
+}
+.dt-partsel span.dt-checkbox:hover
+{
+	background-position: -80px -32px;
+}
+
+.dt-selected span.dt-checkbox
+{
+	background-position: -32px -32px;
+}
+.dt-selected span.dt-checkbox:hover
+{
+	background-position: -48px -32px;
+}
+
+/*******************************************************************************
+ * Radiobutton icon
+ * This is a customization, that may be activated by overriding the 'checkbox'
+ * class name as 'dt-radio' in the tree options.
+ */
+span.dt-radio
+{
+	margin-left: 3px;
+	background-position: 0px -48px;
+}
+span.dt-radio:hover
+{
+	background-position: -16px -48px;
+}
+
+.dt-partsel span.dt-radio
+{
+	background-position: -64px -48px;
+}
+.dt-partsel span.dt-radio:hover
+{
+	background-position: -80px -48px;
+}
+
+.dt-selected span.dt-radio
+{
+	background-position: -32px -48px;
+}
+.dt-selected span.dt-radio:hover
+{
+	background-position: -48px -48px;
+}
+
+/*******************************************************************************
+ * Node type icon
+ * Note: IE6 doesn't correctly evaluate multiples class names,
+ *		 so we create combined class names that can be used in the CSS.
+ *
+ * Prefix: dt-ico-
+ * 1st character: 'e': expanded, 'c': collapsed
+ * 2nd character (optional): 'f': folder
+ */
+
+span.dt-icon /* Default icon */
+{
+	background-position: -17px 0px;
+}
+
+.dt-ico-cf span.dt-icon  /* Collapsed Folder */
+{
+	background-position: 0px -16px;
+}
+
+.dt-ico-ef span.dt-icon  /* Expanded Folder */
+{
+	background-position: -64px -16px;
+}
+
+/* Status node icons */
+
+.dt-statusnode-wait span.dt-icon
+{
+	background-image: url("../img/loading.gif");
+}
+
+.dt-statusnode-error span.dt-icon
+{
+	background-position: 0px -112px;
+/*	background-image: url("../img/ltError.gif");*/
+}
+
+/*******************************************************************************
+ * Node titles
+ */
+
+/* @Chrome: otherwise hit area of node titles is broken (issue 133)
+   Removed again for issue 165; (133 couldn't be reproduced) */
+span.dt-node
+{
+	display: -moz-inline-box; /* issue 133, 165, 172, 192,  */
+/*  display: inline-block; /* Required to make a span sizeable */
+}
+
+
+/* Remove blue color and underline from title links */
+ul.dt-container a
+/*, ul.dt-container a:visited*/
+{
+	color: navy; /* inherit doesn't work on IE */
+	text-decoration: none;
+	vertical-align: top;
+	margin: 0px;
+	margin-left: 3px;
+/*	outline: 0; /* @ Firefox, prevent dotted border after click */
+    
+    margin-bottom:5px;
+}
+
+ul.dt-container a:hover
+{
+/*	text-decoration: underline; */
+    color:red;
+	background: #F2F7FD; /* light blue */
+	/*border-color: #B8D6FB;*/ /* darker light blue */
+}
+
+span.dt-node a
+{
+	font-size: 10pt; /* required for IE, quirks mode */
+	display: inline-block; /* Better alignment, when title contains <br> */
+/*	vertical-align: top;*/
+	padding-left: 3px;
+	padding-right: 3px; /* Otherwise italic font will be outside bounds */
+	/*	line-height: 16px; /* should be the same as img height, in case 16 px */
+}
+span.dt-folder a
+{
+	font-weight: bold;
+}
+
+ul.dt-container a:focus,
+span.dt-focused a:link  /* @IE */
+{
+	background-color: #EFEBDE; /* gray */
+}
+
+span.dt-has-children a
+{
+}
+
+span.dt-expanded a
+{
+}
+
+span.dt-selected a
+{
+	color: green;
+	font-style: italic;
+}
+
+span.dt-active a
+{
+	background-color: #3169C6 !important;
+	color: white !important; /* @ IE6 */
+}
+
+/*******************************************************************************
+ * Drag'n'drop support
+ */
+
+/*** Helper object ************************************************************/
+div.dt-drag-helper
+{
+}
+div.dt-drag-helper a
+{
+	border: 1px solid gray;
+	background-color: white;
+	padding-left: 5px;
+	padding-right: 5px;
+	opacity: 0.8;
+}
+span.dt-drag-helper-img
+{
+	/*
+	position: relative;
+	left: -16px;
+	*/
+}
+div.dt-drag-helper /*.dt-drop-accept*/
+{
+
+/*    border-color: green;
+	background-color: red;*/
+}
+div.dt-drop-accept span.dt-drag-helper-img
+{
+	background-position: -32px -112px;
+}
+div.dt-drag-helper.dt-drop-reject
+{
+	border-color: red;
+}
+div.dt-drop-reject span.dt-drag-helper-img
+{
+	background-position: -16px -112px;
+}
+
+/*** Drop marker icon *********************************************************/
+
+#dt-drop-marker
+{
+	width: 24px;
+	position: absolute;
+	background-position: 0 -128px;
+}
+#dt-drop-marker.dt-drop-after,
+#dt-drop-marker.dt-drop-before
+{
+	width:64px;
+	background-position: 0 -144px;
+}
+#dt-drop-marker.dt-drop-copy
+{
+	background-position: -64px -128px;
+}
+#dt-drop-marker.dt-drop-move
+{
+	background-position: -64px -128px;
+}
+
+/*** Source node while dragging ***********************************************/
+
+span.dt-drag-source
+{
+	/* border: 1px dotted gray; */
+	background-color: #e0e0e0;
+}
+span.dt-drag-source a
+{
+	color: gray;
+}
+
+/*** Target node while dragging cursor is over it *****************************/
+
+span.dt-drop-target
+{
+	/*border: 1px solid gray;*/
+}
+span.dt-drop-target a
+{
+	/*background-repeat: no-repeat;
+	background-position: right;
+	background-image: url("../img/drop_child.gif");*/
+}
+span.dt-drop-target.dt-drop-accept a
+{
+	/*border: 1px solid green;*/
+	background-color: #3169C6 !important;
+	color: white !important; /* @ IE6 */
+	text-decoration: none;
+}
+span.dt-drop-target.dt-drop-reject
+{
+	/*border: 1px solid red;*/
+}
+span.dt-drop-target.dt-drop-after a
+{
+	/*background-repeat: repeat-x;
+	background-position: bottom;
+	background-image: url("../img/drop_append.gif");*/
+}
+
+
+/*******************************************************************************
+ * Custom node classes (sample)
+ */
+
+span.custom1 a
+{
+	background-color: maroon;
+	color: yellow;
+}

+ 0 - 0
modules/app_java/doc/webhelp/oxygen-webhelp/resources/css/webhelp_frameset.css


+ 437 - 0
modules/app_java/doc/webhelp/oxygen-webhelp/resources/css/webhelp_toc.css

@@ -0,0 +1,437 @@
+html
+{
+	overflow: auto;
+}
+
+body {
+    margin: 0px; padding:0;
+    font-family: arial, helvetica, sans-serif;
+    font-size:18px;
+    background-color:white;
+}
+
+#tocMenu{
+  /* Patch EXM-18336
+   * padding-left: 0.6em;
+   */
+  margin:0 auto;
+  overflow: auto;
+  min-width:250px;
+  width:100%;
+}
+#tocMenu div{ 
+  text-decoration:none; 
+  color:#336699; 
+  padding:4px 10px 2px 10px;
+  cursor:pointer; 
+  border-bottom:0;
+  background-color:#f9f9f9;
+  border:1px solid #ddd;
+  border-top-left-radius:7px;
+  border-top-right-radius:7px;
+  border-bottom:0;
+  float: left;
+  min-height: 1px;
+  text-shadow:0 1px 0 #fff;
+}
+
+#tocMenu div:hover{
+  color:#cc0000;
+}
+
+#tocMenu div.selected{	
+	text-decoration: none;
+	/*width:70px;*/
+	color:#333;
+	background-color:#D3E1F1;
+  border:1px solid #ccc;
+  border-top-left-radius:7px;
+  border-top-right-radius:7px;
+  border-bottom:0;
+  text-shadow:0 1px 0 #fff;
+} 
+ 
+#indexBlock {
+  line-height:1.8em;
+}
+
+#indexBlock a{
+  text-decoration:none;
+}
+
+#indexBlock fieldset{
+  border:0;
+  padding-top:0;
+  border-bottom:1px solid #eee;
+}
+
+#indexBlock ul{
+  color:#444;
+  list-style:none;
+  margin:0;
+  padding-left:16px;
+}
+
+#list_idx{
+  padding-left:20px;
+}
+
+#id_search{
+  width:270px; 
+}
+
+#bck_toc{
+  background-color:#D3E1F1;
+  padding:10px 0 0 0px;
+}
+  
+
+#tab_nav_tree_placeholder, #searchResults{
+    height:90%;	
+    /*overflow: auto;*/
+}
+
+#searchForm{
+    padding:0 10px 15px 10px;
+    border-bottom:0px solid #eee;
+}
+
+#bck_toc #searchBlock,#bck_toc #indexBlock, #bck_toc #contentBlock{
+    border-top:1px solid #ccc;
+    background-color:white;
+    padding-top:20px; 
+    position: relative;
+	  vertical-align:top;
+	  width:100%;
+}
+
+h1{
+   font-size:1.2em;
+   padding:0.1em 0 0 0.3em;
+}
+
+a span.navheader_separator,a span.navheader_linktext {
+  display:none;
+}
+
+a{
+  color:navy; 
+  text-decoration:underline;
+}
+
+a:hover{ 
+  color:red; 
+  text-decoration:underline;
+}
+
+.hide{display:none}
+
+#preload{
+    position:absolute;
+    margin:80px 0 0 40px;
+    color:#444;
+    height:100px;
+    text-align:center;
+}
+.g_pu,.g_nu {cursor:pointer; padding:0 4px 0 4px;}
+/*
+ * Start patch WebHelp - 18.08.2010 EXM-18336
+ */
+.g_nu,.g_pu,
+a.link{
+	padding-left: 10px;
+	padding-right: 10px;
+    color: #0000EE;
+    text-decoration: underline;
+}
+
+a.link:hover{
+	color:red;
+    text-decoration: underline;
+}
+
+a.link:visited{
+    color: #840084;
+    text-decoration: underline;
+    font-size:40px;
+}
+
+.normalLink{
+	color: #2B008C;
+	background-color: #EBEFF8;
+    text-decoration: none;
+	font-size: 15px;
+	padding-left: 10px;
+	padding-right: 10px;
+}
+a.otherLink{
+    color: #0050A0;
+    background-color: #EBEFF8;
+    text-decoration: none;
+	font-size: 13px;
+    font-weight: bold;	
+}
+a.otherLink:hover{
+    text-decoration: none;
+}
+.searchButton{
+    font-size: 11px;
+    margin-left: 10px;
+}
+.highlightText{
+    color: #0050A0;
+	/*
+    background-color: #EBEFF8;
+	*/
+    text-decoration: none;
+	font-size: 13px;
+    font-weight: bold;	
+}
+.textToSearch{
+    font-size: 11px;
+}
+a.foundResult{
+    color:#0000FF;
+    font-weight: bold;
+}
+a.foundResult:visited{
+  color:#660066;         
+}
+a.foundResult:hover{
+    color:red;
+}
+    
+/*
+ * End patch WebHelp - 18.08.2010 EXM-18336
+ */
+
+
+table.nav{
+  width:100%;  
+  vertical-align:middle;
+}
+
+table.nav td + td {
+  text-align:right;
+}
+
+h1.topictitle1 {
+  color:black;
+  background-color:#eee;
+  padding: 0.2em;
+}
+
+.navfooter{
+  border-top:1px solid #eee;
+  padding:0.4em 0 0 0;
+}
+
+#searchResults{
+    padding: 0.6em;
+}
+
+.searchresult{
+  margin:0;
+  padding:0
+}
+
+.searchresult li{
+  margin-top:0.2em;
+  padding: 0.6em;
+}
+
+/*
+ .searchresult li:hover{
+  background-color:#ebebeb;  
+}
+*/
+
+div.footer{  
+  line-height:24px;
+  padding:0 0 0 0.9em;
+}
+
+div.footer span.oXygenLogo img{ 
+  border:0;
+  vertical-align:bottom;
+}
+div.footer span.xmlauthor{
+  margin-bottom:0.7em;
+}
+
+
+
+/*----------- OLD STYLE ---------------*/
+
+/*The copyright.*/
+div, td{
+    font-size:10pt;
+}
+
+div.copyright{
+    font-size:8pt;
+    padding-top:1em;
+}
+#nav_tree div.copyright{
+    padding-top:0.2em;
+    padding-left:1em;
+}
+
+/* Makes the titles stand-out */
+h1.title,
+h2.title{
+    color:black;
+    background-color:silver;
+    padding: 0.2em;
+}
+
+
+/* The navigation tree classes */
+#nav_tree > ul{
+    border-top:1px solid gray;
+    border-bottom:1px solid gray;
+    margin-top: 0em;
+    margin-left: 0.5em;
+    margin-right: 0.5em;
+    min-width:300px;
+    padding: 1em;
+    font-size:10pt;
+}
+
+#content{
+    margin-left:1em;
+    border-left:0px solid gray;
+    padding-left:1em;
+}
+
+#nav_tree ul ul{
+    margin:0;
+    padding:0;
+}
+
+#nav_tree form{
+    margin-top:0.5em;
+    margin-bottom:0.5em;
+    padding-right:0.5em;
+    text-align:right;
+}
+#nav_tree form input{
+    font-size:8pt;
+}
+
+#nav_tree li {
+    margin-top: 0.2em;
+    margin-left: 1em;
+    list-style-type:none;
+}
+
+/* The links */
+#nav_tree a.nav_tree{
+    color:black;
+    background-color:inherit;
+}
+
+/* The selected page. */
+#nav_tree li.nav_tree_last_open_book > a{
+    background-color: #333399;
+    color:white;
+    text-decoration:none;
+}
+
+#nav_tree li:before{
+    display:inline;
+    vertical-align:text-bottom;
+    padding-top:0.2em;
+    padding-right:0.2em;
+}
+
+
+/* Title displayed over the tree area.*/
+#nav_tree p.nav_title { 
+    font-size: 14pt; 
+    font-weight: bold; 
+    margin-bottom: 0.5px; 
+    margin-top: 0.5em;
+    margin-left: 0.5em;
+    margin-right: 0.5em;
+}
+#nav_tree p.nav_title a{ 
+    text-decoration:none;
+    color:black;
+    background-color:inherit;
+}
+
+/* The path in the document displayed over the content.*/
+div.nav_path{
+    text-align:right;
+}
+
+/*----------------
+    The footer. 
+-----------------*/
+.footer {
+    margin-top:3em;
+}
+
+.redX {
+    color:red;
+    background-color:inherit;
+    font-size:1.2em;
+}
+
+.oXygenLogo {
+    color:#1166DD;
+    background-color:inherit;
+    font-weight:bold;
+    font-size:1.2em;
+}
+.searchExpression {
+    color: #0050A0; 
+    /*background-color: #EBEFF8;*/ 
+    font-size: 10pt; 
+    font-weight:bold;
+}
+#star ul.star { 
+    LIST-STYLE: none; 
+    MARGIN: 0; 
+    PADDING: 0; 
+    WIDTH: 85px;
+    /* was 100 */ 
+    HEIGHT: 20px;
+    LEFT: 1px; 
+    TOP: -5px; 
+    POSITION: relative; 
+    FLOAT: right; 
+    BACKGROUND: url('../img/starsSmall.png') repeat-x 0 -25px;
+}
+#star li { 
+    PADDING: 0; 
+    MARGIN: 0; 
+    FLOAT: right; 
+    DISPLAY: block; 
+    WIDTH: 85px;
+    /* was 100 */
+    HEIGHT: 20px; 
+    TEXT-DECORATION: none; 
+    text-indent: -9000px; 
+    Z-INDEX: 20; 
+    POSITION: absolute; 
+    PADDING: 0; 
+}
+#star li.curr { 
+    BACKGROUND: url('../img/starsSmall.png') left 25px; 
+    FONT-SIZE: 1px; 
+}
+#star div.user {
+    LEFT: 5px;
+    POSITION: relative;
+    FLOAT: right;
+    FONT-SIZE: 13px;
+    FONT-FAMILY: Arial;
+    COLOR: #888;
+}
+#rightDiv{
+    position: relative;
+    width: 98%;
+    text-align: right;    
+}

+ 249 - 0
modules/app_java/doc/webhelp/oxygen-webhelp/resources/css/webhelp_topic.css

@@ -0,0 +1,249 @@
+body {
+  background-color:white;
+  margin:0px; padding:0 0 0 0.9em;
+  font-family: arial, helvetica, sans-serif;
+  line-height:18px;
+  font-size:12px;
+  
+}
+span.frames{ cursor:pointer; padding:0 5px 0 0; }
+
+a span.navheader_separator,a span.navheader_linktext {
+  display:none;
+}
+
+a:visited{
+  color:#660066;        
+}
+a:hover{
+  color:red;
+}
+
+a span.frames{
+/*
+ * Patch 18.08.2010 EXM-18336
+ * color:navy;
+ */
+    color:#0000FF; 
+    text-decoration:underline;
+}
+/*
+ * Patch 18.08.2010 EXM-18336
+ * a:hover{ 
+ *    color:red; 
+ *    text-decoration:underline;
+ * }
+ * 
+ */
+
+table.nav{
+  width:100%;  
+  vertical-align:middle;
+}
+
+table.nav td + td {
+  text-align:right;
+  padding:0 0.4em 0 0;
+}
+
+/* Patch EXM-18336
+ * h1.topictitle1 {
+ *   color:black;
+ *   background-color:#eee;  
+ *   padding:0.3em 0 0 0.2em;
+ *   margin:0 0.3em 0 0;
+}
+ */
+h1.topictitle1 {
+  color:black;
+  background-color:#C0C0C0;
+  font-size: 20px;  
+  padding:0.3em 0 0.3em 0.3em;
+  margin:0 0.3em 0 0;
+}
+
+div.rate_page{float:left; width:400px; margin:40px 0 0 0;}
+div.rate_response {color:#555; font-size:0.9em;}
+.stars { position:absolute; width:105px; height:16px; left:140px; margin:-15px 0 0px 0;
+  background-image:url("../img/dot.png");background-position:0px 1px; 
+  background-repeat:no-repeat;overflow:hidden; padding:0; }
+
+ul.stars li{  margin:0; height:20px; width:21px;position:absolute;float:left;list-style-type:none;}
+ul.stars li a{ text-decoration:none; position:absolute; overflow:hidden; padding:0; margin:0;}
+ul.stars li a:hover, ul.stars li a.show_star {text-decoration:none; background-image:url("../img/star.png"); 
+  background-position:0 0px;height:25px; background-repeat:no-repeat;
+}
+input {margin:14px 0 0 0;}
+textarea.text-input{margin:4px 0 0 0; width:225px; height:100px; border:1px solid #ccc;}
+
+a#star1 { width:18px; z-index:6;  }
+a#star2 { width:40px; z-index:5; }
+a#star3 { width:60px; z-index:4; }
+a#star4 { width:80px; z-index:3; }
+a#star5 { width:100px; z-index:2; }
+
+div#rate_comment {clear:both; margin:14px 0 0 0;}
+div.rate_response {margin:-14px 0 0 0; }
+.small {font-size:0.9em;}
+.hide {display:none;}
+.show {display:block;}
+
+/*----------------------*/
+
+
+/*----------------
+    The footer. 
+-----------------*/
+
+div.footer{  
+  margin:2em 0.6em 1.5em 0;
+  float:right;
+  line-height:24px;
+  color:#444;
+  font-size:0.9em
+}
+div.footer a{text-decoration:none; color:#444}
+
+.navfooter{
+  border-top:1px solid #eee;
+  margin:3em 0 0 0; 
+  padding:0.4em 0 0 0;
+}
+
+ul li {
+  line-height:18px;
+}
+
+div.footer span.oXygenLogo img{  
+  vertical-align:bottom;
+  border:0;
+}
+div.footer span.xmlauthor{
+  margin-bottom:14px;
+}
+
+
+
+/*----------------*/
+/*The copyright.*/
+div, td{
+    font-size:10pt;
+}
+
+div.copyright{
+    font-size:8pt;
+    padding-top:1em;
+}
+#nav_tree div.copyright{
+    padding-top:0.2em;
+    padding-left:1em;
+}
+
+/* Makes the titles stand-out */
+h1.title,
+h2.title{
+    color:#333;
+    background-color:#ececec;
+    text-shadow:0 1px 0 #fff;
+    padding: 0.4em;
+    box-shadow: 0px 1px 2px #999;
+    /*border-radius:5px;*/
+}
+
+
+/* The navigation tree classes */
+#nav_tree > ul{
+    border-top:1px solid gray;
+    border-bottom:1px solid gray;
+    margin-top: 0em;
+    margin-left: 0.5em;
+    margin-right: 0.5em;
+    min-width:300px;
+    padding: 1em;
+    font-size:10pt;
+}
+
+#content{
+    margin-left:1em;
+    border-left:2px solid gray;
+    padding-left:1em;
+}
+
+#nav_tree ul ul{
+    margin:0;
+    padding:0;
+}
+
+#nav_tree form{
+    margin-top:0.5em;
+    margin-bottom:0.5em;
+    padding-right:0.5em;
+    text-align:right;
+}
+#nav_tree form input{
+    font-size:8pt;
+}
+
+#nav_tree li {
+    margin-top: 0.2em;
+    margin-left: 1em;
+    list-style-type:none;
+}
+
+/* The links */
+#nav_tree a.nav_tree{
+    color:black;
+    background-color:inherit;
+}
+
+/* The selected page. */
+#nav_tree li.nav_tree_last_open_book > a{
+    background-color: #333399;
+    color:white;
+    text-decoration:none;
+}
+
+#nav_tree li:before{
+    display:inline;
+    vertical-align:text-bottom;
+    padding-top:0.2em;
+    padding-right:0.2em;
+}
+
+
+/* Title displayed over the tree area.*/
+#nav_tree p.nav_title { 
+    font-size: 14pt; 
+    font-weight: bold; 
+    margin-bottom: 0.5px; 
+    margin-top: 0.5em;
+    margin-left: 0.5em;
+    margin-right: 0.5em;
+}
+#nav_tree p.nav_title a{ 
+    text-decoration:none;
+    color:black;
+    background-color:inherit;
+}
+
+/* The path in the document displayed over the content.*/
+div.nav_path{
+    text-align:right;
+}
+
+.redX {
+    color:red;
+    background-color:inherit;
+    font-size:1.2em;
+}
+
+.oXygenLogo {
+    color:#1166DD;
+    background-color:inherit;
+    font-weight:bold;
+    font-size:1.2em;
+}
+
+.highlight { 
+    background-color: #FFFF88; 
+}

BIN=BIN
modules/app_java/doc/webhelp/oxygen-webhelp/resources/img/LogoOxygen100x22.png


BIN=BIN
modules/app_java/doc/webhelp/oxygen-webhelp/resources/img/ajax-loader.gif


BIN=BIN
modules/app_java/doc/webhelp/oxygen-webhelp/resources/img/buttons.gif


BIN=BIN
modules/app_java/doc/webhelp/oxygen-webhelp/resources/img/close.png


BIN=BIN
modules/app_java/doc/webhelp/oxygen-webhelp/resources/img/close_hover.png


BIN=BIN
modules/app_java/doc/webhelp/oxygen-webhelp/resources/img/dot.png


BIN=BIN
modules/app_java/doc/webhelp/oxygen-webhelp/resources/img/expand.png


BIN=BIN
modules/app_java/doc/webhelp/oxygen-webhelp/resources/img/icon_comment24x24.png


BIN=BIN
modules/app_java/doc/webhelp/oxygen-webhelp/resources/img/icons.png


+ 33 - 0
modules/app_java/doc/webhelp/oxygen-webhelp/resources/img/index.html

@@ -0,0 +1,33 @@
+<!DOCTYPE html SYSTEM "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>WebHelp</title>
+			<meta HTTP-EQUIV="REFRESH" content="0; url=../../../"/>        
+    </head>
+    <body>            
+            Current generated project :            
+            <!-- to be generated  -->
+<div id="productInfo" style="display:none;">
+	<span id="oxy_productid">@PRODUCT_ID@</span>
+	<span id="oxy_productVersion">@PRODUCT_VERSION@</span>
+</div>
+<!-- /to be generated  -->
+                 
+	<script type="text/javascript">
+    var pageSearch = window.location.href;
+    var pageWSearch = pageSearch.replace(window.location.search,"");
+    pageWSearch = pageWSearch.replace(window.location.hash,"");
+    var url=pageWSearch.split("/");
+    var newUrl="";
+    for ( var i = 0; i < url.length; i++) {
+    	if (url[i]=='oxygen-webhelp'){
+    		break;
+    	}else{    	    		
+				newUrl=newUrl+url[i]+"/";
+    	}
+		}    
+    document.location=newUrl;
+    </script>
+                                              
+    </body>
+</html>

BIN=BIN
modules/app_java/doc/webhelp/oxygen-webhelp/resources/img/loading.gif


BIN=BIN
modules/app_java/doc/webhelp/oxygen-webhelp/resources/img/loadingSmall.gif


BIN=BIN
modules/app_java/doc/webhelp/oxygen-webhelp/resources/img/rss.gif


BIN=BIN
modules/app_java/doc/webhelp/oxygen-webhelp/resources/img/spinner.gif


BIN=BIN
modules/app_java/doc/webhelp/oxygen-webhelp/resources/img/star.png


BIN=BIN
modules/app_java/doc/webhelp/oxygen-webhelp/resources/img/starsSmall.png


BIN=BIN
modules/app_java/doc/webhelp/oxygen-webhelp/resources/img/timeLine.png


BIN=BIN
modules/app_java/doc/webhelp/oxygen-webhelp/resources/img/timeVersion.png


BIN=BIN
modules/app_java/doc/webhelp/oxygen-webhelp/resources/img/toolbar.gif


BIN=BIN
modules/app_java/doc/webhelp/oxygen-webhelp/resources/img/version.png


+ 278 - 0
modules/app_java/doc/webhelp/oxygen-webhelp/resources/js/GPL-LICENSE.txt

@@ -0,0 +1,278 @@
+        GNU GENERAL PUBLIC LICENSE
+           Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+          Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users.  This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it.  (Some other Free Software Foundation software is covered by
+the GNU Lesser General Public License instead.)  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+  To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have.  You must make sure that they, too, receive or can get the
+source code.  And you must show them these terms so they know their
+rights.
+
+  We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+  Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software.  If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+  Finally, any free program is threatened constantly by software
+patents.  We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary.  To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+        GNU GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License.  The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language.  (Hereinafter, translation is included without limitation in
+the term "modification".)  Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+  1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+  2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) You must cause the modified files to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    b) You must cause any work that you distribute or publish, that in
+    whole or in part contains or is derived from the Program or any
+    part thereof, to be licensed as a whole at no charge to all third
+    parties under the terms of this License.
+
+    c) If the modified program normally reads commands interactively
+    when run, you must cause it, when started running for such
+    interactive use in the most ordinary way, to print or display an
+    announcement including an appropriate copyright notice and a
+    notice that there is no warranty (or else, saying that you provide
+    a warranty) and that users may redistribute the program under
+    these conditions, and telling the user how to view a copy of this
+    License.  (Exception: if the Program itself is interactive but
+    does not normally print such an announcement, your work based on
+    the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+    a) Accompany it with the complete corresponding machine-readable
+    source code, which must be distributed under the terms of Sections
+    1 and 2 above on a medium customarily used for software interchange; or,
+
+    b) Accompany it with a written offer, valid for at least three
+    years, to give any third party, for a charge no more than your
+    cost of physically performing source distribution, a complete
+    machine-readable copy of the corresponding source code, to be
+    distributed under the terms of Sections 1 and 2 above on a medium
+    customarily used for software interchange; or,
+
+    c) Accompany it with the information you received as to the offer
+    to distribute corresponding source code.  (This alternative is
+    allowed only for noncommercial distribution and only if you
+    received the program in object code or executable form with such
+    an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it.  For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable.  However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+  4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License.  Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+  5. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Program or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+  6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+  7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+  8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded.  In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+  9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation.  If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+  10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission.  For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this.  Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+          NO WARRANTY
+
+  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.

+ 7 - 0
modules/app_java/doc/webhelp/oxygen-webhelp/resources/js/MIT-License.txt

@@ -0,0 +1,7 @@
+Copyright (c) 2008-2011  Martin Wendt (http://wwWendt.de)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

+ 135 - 0
modules/app_java/doc/webhelp/oxygen-webhelp/resources/js/base64.js

@@ -0,0 +1,135 @@
+var Base64 = {
+ 
+	// private property
+	_keyStr : "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",
+ 
+	// public method for encoding
+	encode : function (input) {
+		var output = "";
+		var chr1, chr2, chr3, enc1, enc2, enc3, enc4;
+		var i = 0;
+ 
+		input = Base64._utf8_encode(input);
+ 
+		while (i < input.length) {
+ 
+			chr1 = input.charCodeAt(i++);
+			chr2 = input.charCodeAt(i++);
+			chr3 = input.charCodeAt(i++);
+ 
+			enc1 = chr1 >> 2;
+			enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);
+			enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);
+			enc4 = chr3 & 63;
+ 
+			if (isNaN(chr2)) {
+				enc3 = enc4 = 64;
+			} else if (isNaN(chr3)) {
+				enc4 = 64;
+			}
+ 
+			output = output +
+			this._keyStr.charAt(enc1) + this._keyStr.charAt(enc2) +
+			this._keyStr.charAt(enc3) + this._keyStr.charAt(enc4);
+ 
+		}
+ 
+		return output;
+	},
+ 
+	// public method for decoding
+	decode : function (input) {
+		var output = "";
+		var chr1, chr2, chr3;
+		var enc1, enc2, enc3, enc4;
+		var i = 0;
+ 
+		input = input.replace(/[^A-Za-z0-9\+\/\=]/g, "");
+ 
+		while (i < input.length) {
+ 
+			enc1 = this._keyStr.indexOf(input.charAt(i++));
+			enc2 = this._keyStr.indexOf(input.charAt(i++));
+			enc3 = this._keyStr.indexOf(input.charAt(i++));
+			enc4 = this._keyStr.indexOf(input.charAt(i++));
+ 
+			chr1 = (enc1 << 2) | (enc2 >> 4);
+			chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);
+			chr3 = ((enc3 & 3) << 6) | enc4;
+ 
+			output = output + String.fromCharCode(chr1);
+ 
+			if (enc3 != 64) {
+				output = output + String.fromCharCode(chr2);
+			}
+			if (enc4 != 64) {
+				output = output + String.fromCharCode(chr3);
+			}
+ 
+		}
+ 
+		output = Base64._utf8_decode(output);
+ 
+		return output;
+ 
+	},
+ 
+	// private method for UTF-8 encoding
+	_utf8_encode : function (string) {
+		string = string.replace(/\r\n/g,"\n");
+		var utftext = "";
+ 
+		for (var n = 0; n < string.length; n++) {
+ 
+			var c = string.charCodeAt(n);
+ 
+			if (c < 128) {
+				utftext += String.fromCharCode(c);
+			}
+			else if((c > 127) && (c < 2048)) {
+				utftext += String.fromCharCode((c >> 6) | 192);
+				utftext += String.fromCharCode((c & 63) | 128);
+			}
+			else {
+				utftext += String.fromCharCode((c >> 12) | 224);
+				utftext += String.fromCharCode(((c >> 6) & 63) | 128);
+				utftext += String.fromCharCode((c & 63) | 128);
+			}
+ 
+		}
+ 
+		return utftext;
+	},
+ 
+	// private method for UTF-8 decoding
+	_utf8_decode : function (utftext) {
+		var string = "";
+		var i = 0;
+		var c = c1 = c2 = 0;
+ 
+		while ( i < utftext.length ) {
+ 
+			c = utftext.charCodeAt(i);
+ 
+			if (c < 128) {
+				string += String.fromCharCode(c);
+				i++;
+			}
+			else if((c > 191) && (c < 224)) {
+				c2 = utftext.charCodeAt(i+1);
+				string += String.fromCharCode(((c & 31) << 6) | (c2 & 63));
+				i += 2;
+			}
+			else {
+				c2 = utftext.charCodeAt(i+1);
+				c3 = utftext.charCodeAt(i+2);
+				string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));
+				i += 3;
+			}
+ 
+		}
+ 
+		return string;
+	}
+ 
+}

+ 116 - 0
modules/app_java/doc/webhelp/oxygen-webhelp/resources/js/browserDetect.js

@@ -0,0 +1,116 @@
+var BrowserDetect = {
+	init: function () {
+		this.browser = this.searchString(this.dataBrowser) || "An unknown browser";
+		this.version = this.searchVersion(navigator.userAgent)
+			|| this.searchVersion(navigator.appVersion)
+			|| "an unknown version";
+		this.OS = this.searchString(this.dataOS) || "an unknown OS";
+	},
+	searchString: function (data) {
+		for (var i=0;i<data.length;i++)	{
+			var dataString = data[i].string;
+			var dataProp = data[i].prop;
+			this.versionSearchString = data[i].versionSearch || data[i].identity;
+			if (dataString) {
+				if (dataString.indexOf(data[i].subString) != -1)
+					return data[i].identity;
+			}
+			else if (dataProp)
+				return data[i].identity;
+		}
+	},
+	searchVersion: function (dataString) {
+		var index = dataString.indexOf(this.versionSearchString);
+		if (index == -1) return;
+		return parseFloat(dataString.substring(index+this.versionSearchString.length+1));
+	},
+	dataBrowser: [
+		{
+			string: navigator.userAgent,
+			subString: "Chrome",
+			identity: "Chrome"
+		},
+		{ 	string: navigator.userAgent,
+			subString: "OmniWeb",
+			versionSearch: "OmniWeb/",
+			identity: "OmniWeb"
+		},
+		{
+			string: navigator.vendor,
+			subString: "Apple",
+			identity: "Safari",
+			versionSearch: "Version"
+		},
+		{
+			prop: window.opera,
+			identity: "Opera"
+		},
+		{
+			string: navigator.vendor,
+			subString: "iCab",
+			identity: "iCab"
+		},
+		{
+			string: navigator.vendor,
+			subString: "KDE",
+			identity: "Konqueror"
+		},
+		{
+			string: navigator.userAgent,
+			subString: "Firefox",
+			identity: "Firefox"
+		},
+		{
+			string: navigator.vendor,
+			subString: "Camino",
+			identity: "Camino"
+		},
+		{		// for newer Netscapes (6+)
+			string: navigator.userAgent,
+			subString: "Netscape",
+			identity: "Netscape"
+		},
+		{
+			string: navigator.userAgent,
+			subString: "MSIE",
+			identity: "Explorer",
+			versionSearch: "MSIE"
+		},
+		{
+			string: navigator.userAgent,
+			subString: "Gecko",
+			identity: "Mozilla",
+			versionSearch: "rv"
+		},
+		{ 		// for older Netscapes (4-)
+			string: navigator.userAgent,
+			subString: "Mozilla",
+			identity: "Netscape",
+			versionSearch: "Mozilla"
+		}
+	],
+	dataOS : [
+		{
+			string: navigator.platform,
+			subString: "Win",
+			identity: "Windows"
+		},
+		{
+			string: navigator.platform,
+			subString: "Mac",
+			identity: "Mac"
+		},
+		{
+			   string: navigator.userAgent,
+			   subString: "iPhone",
+			   identity: "iPhone/iPod"
+	    },
+		{
+			string: navigator.platform,
+			subString: "Linux",
+			identity: "Linux"
+		}
+	]
+
+};
+BrowserDetect.init();

+ 52 - 0
modules/app_java/doc/webhelp/oxygen-webhelp/resources/js/frames_redirect.js

@@ -0,0 +1,52 @@
+var pageTo =  parent.location.search;
+var redirectPageTo ="";
+if (pageTo){
+ redirectPageTo = pageTo.substring(3);
+}
+
+/**
+ * Redirects to frames/no frames version of the manual. 
+ *
+ * @param currentUrl the link of the page that is redirected to the frames version.
+ */
+function redirectFrames(currentUrl){
+  if (parent.window.location.pathname != window.location.pathname){
+    //No Frames
+    parent.window.location = "http://" + location.hostname + currentUrl;  
+  } else {
+    //With Frames
+    if(/MSIE (\d+\.\d+);/.test(navigator.userAgent) && location.hostname == '' && currentUrl.search("/") == '0'){
+        currentUrl = currentUrl.substr(1);
+    }
+    window.location = prefix + "?q=" + currentUrl;
+  }
+}
+
+function getPath(currentUrl){
+    //With Frames
+    if(/MSIE (\d+\.\d+);/.test(navigator.userAgent) && location.hostname == '' && currentUrl.search("/") == '0'){
+        currentUrl = currentUrl.substr(1);
+    }
+    path = prefix + "?q=" + currentUrl;
+    return path;
+}
+  
+/**
+ * Redirects to the frames version of the manual if a parameter is found in url. 
+ *
+ * @param toc - if true redirects the page to the frames version 
+ */
+function redirectToToc(url){  
+   var page = url.substr(1);
+   var x;
+   if (page != ""){
+     page = page.split("&");
+     for (x in page) {
+        if(page[x] == 'toc=true'){
+         redirectFrames(window.location.pathname); 
+        }
+     }
+   }
+} 
+
+  

+ 33 - 0
modules/app_java/doc/webhelp/oxygen-webhelp/resources/js/index.html

@@ -0,0 +1,33 @@
+<!DOCTYPE html SYSTEM "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>WebHelp</title>
+			<meta HTTP-EQUIV="REFRESH" content="0; url=../../../"/>        
+    </head>
+    <body>            
+            Current generated project :            
+            <!-- to be generated  -->
+<div id="productInfo" style="display:none;">
+	<span id="oxy_productid">${webhelp.product.id}</span>
+	<span id="oxy_productVersion">${webhelp.product.version}</span>
+</div>
+<!-- /to be generated  -->
+                 
+	<script type="text/javascript">
+    var pageSearch = window.location.href;
+    var pageWSearch = pageSearch.replace(window.location.search,"");
+    pageWSearch = pageWSearch.replace(window.location.hash,"");
+    var url=pageWSearch.split("/");
+    var newUrl="";
+    for ( var i = 0; i < url.length; i++) {
+    	if (url[i]=='oxygen-webhelp'){
+    		break;
+    	}else{    	    		
+				newUrl=newUrl+url[i]+"/";
+    	}
+		}    
+    document.location=newUrl;
+    </script>
+                                              
+    </body>
+</html>

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 11 - 0
modules/app_java/doc/webhelp/oxygen-webhelp/resources/js/jquery-1.3.2.js


+ 4204 - 0
modules/app_java/doc/webhelp/oxygen-webhelp/resources/js/jquery-ui.custom.js

@@ -0,0 +1,4204 @@
+/*!
+ * jQuery UI 1.8.7
+ *
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI
+ */
+(function( $, undefined ) {
+
+// prevent duplicate loading
+// this is only a problem because we proxy existing functions
+// and we don't want to double proxy them
+$.ui = $.ui || {};
+if ( $.ui.version ) {
+	return;
+}
+
+$.extend( $.ui, {
+	version: "1.8.7",
+
+	keyCode: {
+		ALT: 18,
+		BACKSPACE: 8,
+		CAPS_LOCK: 20,
+		COMMA: 188,
+		COMMAND: 91,
+		COMMAND_LEFT: 91, // COMMAND
+		COMMAND_RIGHT: 93,
+		CONTROL: 17,
+		DELETE: 46,
+		DOWN: 40,
+		END: 35,
+		ENTER: 13,
+		ESCAPE: 27,
+		HOME: 36,
+		INSERT: 45,
+		LEFT: 37,
+		MENU: 93, // COMMAND_RIGHT
+		NUMPAD_ADD: 107,
+		NUMPAD_DECIMAL: 110,
+		NUMPAD_DIVIDE: 111,
+		NUMPAD_ENTER: 108,
+		NUMPAD_MULTIPLY: 106,
+		NUMPAD_SUBTRACT: 109,
+		PAGE_DOWN: 34,
+		PAGE_UP: 33,
+		PERIOD: 190,
+		RIGHT: 39,
+		SHIFT: 16,
+		SPACE: 32,
+		TAB: 9,
+		UP: 38,
+		WINDOWS: 91 // COMMAND
+	}
+});
+
+// plugins
+$.fn.extend({
+	_focus: $.fn.focus,
+	focus: function( delay, fn ) {
+		return typeof delay === "number" ?
+			this.each(function() {
+				var elem = this;
+				setTimeout(function() {
+					$( elem ).focus();
+					if ( fn ) {
+						fn.call( elem );
+					}
+				}, delay );
+			}) :
+			this._focus.apply( this, arguments );
+	},
+
+	scrollParent: function() {
+		var scrollParent;
+		if (($.browser.msie && (/(static|relative)/).test(this.css('position'))) || (/absolute/).test(this.css('position'))) {
+			scrollParent = this.parents().filter(function() {
+				return (/(relative|absolute|fixed)/).test($.curCSS(this,'position',1)) && (/(auto|scroll)/).test($.curCSS(this,'overflow',1)+$.curCSS(this,'overflow-y',1)+$.curCSS(this,'overflow-x',1));
+			}).eq(0);
+		} else {
+			scrollParent = this.parents().filter(function() {
+				return (/(auto|scroll)/).test($.curCSS(this,'overflow',1)+$.curCSS(this,'overflow-y',1)+$.curCSS(this,'overflow-x',1));
+			}).eq(0);
+		}
+
+		return (/fixed/).test(this.css('position')) || !scrollParent.length ? $(document) : scrollParent;
+	},
+
+	zIndex: function( zIndex ) {
+		if ( zIndex !== undefined ) {
+			return this.css( "zIndex", zIndex );
+		}
+
+		if ( this.length ) {
+			var elem = $( this[ 0 ] ), position, value;
+			while ( elem.length && elem[ 0 ] !== document ) {
+				// Ignore z-index if position is set to a value where z-index is ignored by the browser
+				// This makes behavior of this function consistent across browsers
+				// WebKit always returns auto if the element is positioned
+				position = elem.css( "position" );
+				if ( position === "absolute" || position === "relative" || position === "fixed" ) {
+					// IE returns 0 when zIndex is not specified
+					// other browsers return a string
+					// we ignore the case of nested elements with an explicit value of 0
+					// <div style="z-index: -10;"><div style="z-index: 0;"></div></div>
+					value = parseInt( elem.css( "zIndex" ), 10 );
+					if ( !isNaN( value ) && value !== 0 ) {
+						return value;
+					}
+				}
+				elem = elem.parent();
+			}
+		}
+
+		return 0;
+	},
+
+	disableSelection: function() {
+		return this.bind( ( $.support.selectstart ? "selectstart" : "mousedown" ) +
+			".ui-disableSelection", function( event ) {
+				event.preventDefault();
+			});
+	},
+
+	enableSelection: function() {
+		return this.unbind( ".ui-disableSelection" );
+	}
+});
+
+$.each( [ "Width", "Height" ], function( i, name ) {
+	var side = name === "Width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ],
+		type = name.toLowerCase(),
+		orig = {
+			innerWidth: $.fn.innerWidth,
+			innerHeight: $.fn.innerHeight,
+			outerWidth: $.fn.outerWidth,
+			outerHeight: $.fn.outerHeight
+		};
+
+	function reduce( elem, size, border, margin ) {
+		$.each( side, function() {
+			size -= parseFloat( $.curCSS( elem, "padding" + this, true) ) || 0;
+			if ( border ) {
+				size -= parseFloat( $.curCSS( elem, "border" + this + "Width", true) ) || 0;
+			}
+			if ( margin ) {
+				size -= parseFloat( $.curCSS( elem, "margin" + this, true) ) || 0;
+			}
+		});
+		return size;
+	}
+
+	$.fn[ "inner" + name ] = function( size ) {
+		if ( size === undefined ) {
+			return orig[ "inner" + name ].call( this );
+		}
+
+		return this.each(function() {
+			$( this ).css( type, reduce( this, size ) + "px" );
+		});
+	};
+
+	$.fn[ "outer" + name] = function( size, margin ) {
+		if ( typeof size !== "number" ) {
+			return orig[ "outer" + name ].call( this, size );
+		}
+
+		return this.each(function() {
+			$( this).css( type, reduce( this, size, true, margin ) + "px" );
+		});
+	};
+});
+
+// selectors
+function visible( element ) {
+	return !$( element ).parents().andSelf().filter(function() {
+		return $.curCSS( this, "visibility" ) === "hidden" ||
+			$.expr.filters.hidden( this );
+	}).length;
+}
+
+$.extend( $.expr[ ":" ], {
+	data: function( elem, i, match ) {
+		return !!$.data( elem, match[ 3 ] );
+	},
+
+	focusable: function( element ) {
+		var nodeName = element.nodeName.toLowerCase(),
+			tabIndex = $.attr( element, "tabindex" );
+		if ( "area" === nodeName ) {
+			var map = element.parentNode,
+				mapName = map.name,
+				img;
+			if ( !element.href || !mapName || map.nodeName.toLowerCase() !== "map" ) {
+				return false;
+			}
+			img = $( "img[usemap=#" + mapName + "]" )[0];
+			return !!img && visible( img );
+		}
+		return ( /input|select|textarea|button|object/.test( nodeName )
+			? !element.disabled
+			: "a" == nodeName
+				? element.href || !isNaN( tabIndex )
+				: !isNaN( tabIndex ))
+			// the element and all of its ancestors must be visible
+			&& visible( element );
+	},
+
+	tabbable: function( element ) {
+		var tabIndex = $.attr( element, "tabindex" );
+		return ( isNaN( tabIndex ) || tabIndex >= 0 ) && $( element ).is( ":focusable" );
+	}
+});
+
+// support
+$(function() {
+	var body = document.body,
+		div = body.appendChild( div = document.createElement( "div" ) );
+
+	$.extend( div.style, {
+		minHeight: "100px",
+		height: "auto",
+		padding: 0,
+		borderWidth: 0
+	});
+
+	$.support.minHeight = div.offsetHeight === 100;
+	$.support.selectstart = "onselectstart" in div;
+
+	// set display to none to avoid a layout bug in IE
+	// http://dev.jquery.com/ticket/4014
+	body.removeChild( div ).style.display = "none";
+});
+
+
+
+
+
+// deprecated
+$.extend( $.ui, {
+	// $.ui.plugin is deprecated.  Use the proxy pattern instead.
+	plugin: {
+		add: function( module, option, set ) {
+			var proto = $.ui[ module ].prototype;
+			for ( var i in set ) {
+				proto.plugins[ i ] = proto.plugins[ i ] || [];
+				proto.plugins[ i ].push( [ option, set[ i ] ] );
+			}
+		},
+		call: function( instance, name, args ) {
+			var set = instance.plugins[ name ];
+			if ( !set || !instance.element[ 0 ].parentNode ) {
+				return;
+			}
+	
+			for ( var i = 0; i < set.length; i++ ) {
+				if ( instance.options[ set[ i ][ 0 ] ] ) {
+					set[ i ][ 1 ].apply( instance.element, args );
+				}
+			}
+		}
+	},
+	
+	// will be deprecated when we switch to jQuery 1.4 - use jQuery.contains()
+	contains: function( a, b ) {
+		return document.compareDocumentPosition ?
+			a.compareDocumentPosition( b ) & 16 :
+			a !== b && a.contains( b );
+	},
+	
+	// only used by resizable
+	hasScroll: function( el, a ) {
+	
+		//If overflow is hidden, the element might have extra content, but the user wants to hide it
+		if ( $( el ).css( "overflow" ) === "hidden") {
+			return false;
+		}
+	
+		var scroll = ( a && a === "left" ) ? "scrollLeft" : "scrollTop",
+			has = false;
+	
+		if ( el[ scroll ] > 0 ) {
+			return true;
+		}
+	
+		// TODO: determine which cases actually cause this to happen
+		// if the element doesn't have the scroll set, see if it's possible to
+		// set the scroll
+		el[ scroll ] = 1;
+		has = ( el[ scroll ] > 0 );
+		el[ scroll ] = 0;
+		return has;
+	},
+	
+	// these are odd functions, fix the API or move into individual plugins
+	isOverAxis: function( x, reference, size ) {
+		//Determines when x coordinate is over "b" element axis
+		return ( x > reference ) && ( x < ( reference + size ) );
+	},
+	isOver: function( y, x, top, left, height, width ) {
+		//Determines when x, y coordinates is over "b" element
+		return $.ui.isOverAxis( y, top, height ) && $.ui.isOverAxis( x, left, width );
+	}
+});
+
+})( jQuery );
+/*!
+ * jQuery UI Widget 1.8.7
+ *
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Widget
+ */
+(function( $, undefined ) {
+
+// jQuery 1.4+
+if ( $.cleanData ) {
+	var _cleanData = $.cleanData;
+	$.cleanData = function( elems ) {
+		for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) {
+			$( elem ).triggerHandler( "remove" );
+		}
+		_cleanData( elems );
+	};
+} else {
+	var _remove = $.fn.remove;
+	$.fn.remove = function( selector, keepData ) {
+		return this.each(function() {
+			if ( !keepData ) {
+				if ( !selector || $.filter( selector, [ this ] ).length ) {
+					$( "*", this ).add( [ this ] ).each(function() {
+						$( this ).triggerHandler( "remove" );
+					});
+				}
+			}
+			return _remove.call( $(this), selector, keepData );
+		});
+	};
+}
+
+$.widget = function( name, base, prototype ) {
+	var namespace = name.split( "." )[ 0 ],
+		fullName;
+	name = name.split( "." )[ 1 ];
+	fullName = namespace + "-" + name;
+
+	if ( !prototype ) {
+		prototype = base;
+		base = $.Widget;
+	}
+
+	// create selector for plugin
+	$.expr[ ":" ][ fullName ] = function( elem ) {
+		return !!$.data( elem, name );
+	};
+
+	$[ namespace ] = $[ namespace ] || {};
+	$[ namespace ][ name ] = function( options, element ) {
+		// allow instantiation without initializing for simple inheritance
+		if ( arguments.length ) {
+			this._createWidget( options, element );
+		}
+	};
+
+	var basePrototype = new base();
+	// we need to make the options hash a property directly on the new instance
+	// otherwise we'll modify the options hash on the prototype that we're
+	// inheriting from
+//	$.each( basePrototype, function( key, val ) {
+//		if ( $.isPlainObject(val) ) {
+//			basePrototype[ key ] = $.extend( {}, val );
+//		}
+//	});
+	basePrototype.options = $.extend( true, {}, basePrototype.options );
+	$[ namespace ][ name ].prototype = $.extend( true, basePrototype, {
+		namespace: namespace,
+		widgetName: name,
+		widgetEventPrefix: $[ namespace ][ name ].prototype.widgetEventPrefix || name,
+		widgetBaseClass: fullName
+	}, prototype );
+
+	$.widget.bridge( name, $[ namespace ][ name ] );
+};
+
+$.widget.bridge = function( name, object ) {
+	$.fn[ name ] = function( options ) {
+		var isMethodCall = typeof options === "string",
+			args = Array.prototype.slice.call( arguments, 1 ),
+			returnValue = this;
+
+		// allow multiple hashes to be passed on init
+		options = !isMethodCall && args.length ?
+			$.extend.apply( null, [ true, options ].concat(args) ) :
+			options;
+
+		// prevent calls to internal methods
+		if ( isMethodCall && options.charAt( 0 ) === "_" ) {
+			return returnValue;
+		}
+
+		if ( isMethodCall ) {
+			this.each(function() {
+				var instance = $.data( this, name ),
+					methodValue = instance && $.isFunction( instance[options] ) ?
+						instance[ options ].apply( instance, args ) :
+						instance;
+				// TODO: add this back in 1.9 and use $.error() (see #5972)
+//				if ( !instance ) {
+//					throw "cannot call methods on " + name + " prior to initialization; " +
+//						"attempted to call method '" + options + "'";
+//				}
+//				if ( !$.isFunction( instance[options] ) ) {
+//					throw "no such method '" + options + "' for " + name + " widget instance";
+//				}
+//				var methodValue = instance[ options ].apply( instance, args );
+				if ( methodValue !== instance && methodValue !== undefined ) {
+					returnValue = methodValue;
+					return false;
+				}
+			});
+		} else {
+			this.each(function() {
+				var instance = $.data( this, name );
+				if ( instance ) {
+					instance.option( options || {} )._init();
+				} else {
+					$.data( this, name, new object( options, this ) );
+				}
+			});
+		}
+
+		return returnValue;
+	};
+};
+
+$.Widget = function( options, element ) {
+	// allow instantiation without initializing for simple inheritance
+	if ( arguments.length ) {
+		this._createWidget( options, element );
+	}
+};
+
+$.Widget.prototype = {
+	widgetName: "widget",
+	widgetEventPrefix: "",
+	options: {
+		disabled: false
+	},
+	_createWidget: function( options, element ) {
+		// $.widget.bridge stores the plugin instance, but we do it anyway
+		// so that it's stored even before the _create function runs
+		$.data( element, this.widgetName, this );
+		this.element = $( element );
+		this.options = $.extend( true, {},
+			this.options,
+			this._getCreateOptions(),
+			options );
+
+		var self = this;
+		this.element.bind( "remove." + this.widgetName, function() {
+			self.destroy();
+		});
+
+		this._create();
+		this._trigger( "create" );
+		this._init();
+	},
+	_getCreateOptions: function() {
+		return $.metadata && $.metadata.get( this.element[0] )[ this.widgetName ];
+	},
+	_create: function() {},
+	_init: function() {},
+
+	destroy: function() {
+		this.element
+			.unbind( "." + this.widgetName )
+			.removeData( this.widgetName );
+		this.widget()
+			.unbind( "." + this.widgetName )
+			.removeAttr( "aria-disabled" )
+			.removeClass(
+				this.widgetBaseClass + "-disabled " +
+				"ui-state-disabled" );
+	},
+
+	widget: function() {
+		return this.element;
+	},
+
+	option: function( key, value ) {
+		var options = key;
+
+		if ( arguments.length === 0 ) {
+			// don't return a reference to the internal hash
+			return $.extend( {}, this.options );
+		}
+
+		if  (typeof key === "string" ) {
+			if ( value === undefined ) {
+				return this.options[ key ];
+			}
+			options = {};
+			options[ key ] = value;
+		}
+
+		this._setOptions( options );
+
+		return this;
+	},
+	_setOptions: function( options ) {
+		var self = this;
+		$.each( options, function( key, value ) {
+			self._setOption( key, value );
+		});
+
+		return this;
+	},
+	_setOption: function( key, value ) {
+		this.options[ key ] = value;
+
+		if ( key === "disabled" ) {
+			this.widget()
+				[ value ? "addClass" : "removeClass"](
+					this.widgetBaseClass + "-disabled" + " " +
+					"ui-state-disabled" )
+				.attr( "aria-disabled", value );
+		}
+
+		return this;
+	},
+
+	enable: function() {
+		return this._setOption( "disabled", false );
+	},
+	disable: function() {
+		return this._setOption( "disabled", true );
+	},
+
+	_trigger: function( type, event, data ) {
+		var callback = this.options[ type ];
+
+		event = $.Event( event );
+		event.type = ( type === this.widgetEventPrefix ?
+			type :
+			this.widgetEventPrefix + type ).toLowerCase();
+		data = data || {};
+
+		// copy original event properties over to the new event
+		// this would happen if we could call $.event.fix instead of $.Event
+		// but we don't have a way to force an event to be fixed multiple times
+		if ( event.originalEvent ) {
+			for ( var i = $.event.props.length, prop; i; ) {
+				prop = $.event.props[ --i ];
+				event[ prop ] = event.originalEvent[ prop ];
+			}
+		}
+
+		this.element.trigger( event, data );
+
+		return !( $.isFunction(callback) &&
+			callback.call( this.element[0], event, data ) === false ||
+			event.isDefaultPrevented() );
+	}
+};
+
+})( jQuery );
+/*!
+ * jQuery UI Mouse 1.8.7
+ *
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Mouse
+ *
+ * Depends:
+ *	jquery.ui.widget.js
+ */
+(function( $, undefined ) {
+
+$.widget("ui.mouse", {
+	options: {
+		cancel: ':input,option',
+		distance: 1,
+		delay: 0
+	},
+	_mouseInit: function() {
+		var self = this;
+
+		this.element
+			.bind('mousedown.'+this.widgetName, function(event) {
+				return self._mouseDown(event);
+			})
+			.bind('click.'+this.widgetName, function(event) {
+				if (true === $.data(event.target, self.widgetName + '.preventClickEvent')) {
+				    $.removeData(event.target, self.widgetName + '.preventClickEvent');
+					event.stopImmediatePropagation();
+					return false;
+				}
+			});
+
+		this.started = false;
+	},
+
+	// TODO: make sure destroying one instance of mouse doesn't mess with
+	// other instances of mouse
+	_mouseDestroy: function() {
+		this.element.unbind('.'+this.widgetName);
+	},
+
+	_mouseDown: function(event) {
+		// don't let more than one widget handle mouseStart
+		// TODO: figure out why we have to use originalEvent
+		event.originalEvent = event.originalEvent || {};
+		if (event.originalEvent.mouseHandled) { return; }
+
+		// we may have missed mouseup (out of window)
+		(this._mouseStarted && this._mouseUp(event));
+
+		this._mouseDownEvent = event;
+
+		var self = this,
+			btnIsLeft = (event.which == 1),
+			elIsCancel = (typeof this.options.cancel == "string" ? $(event.target).parents().add(event.target).filter(this.options.cancel).length : false);
+		if (!btnIsLeft || elIsCancel || !this._mouseCapture(event)) {
+			return true;
+		}
+
+		this.mouseDelayMet = !this.options.delay;
+		if (!this.mouseDelayMet) {
+			this._mouseDelayTimer = setTimeout(function() {
+				self.mouseDelayMet = true;
+			}, this.options.delay);
+		}
+
+		if (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) {
+			this._mouseStarted = (this._mouseStart(event) !== false);
+			if (!this._mouseStarted) {
+				event.preventDefault();
+				return true;
+			}
+		}
+
+		// these delegates are required to keep context
+		this._mouseMoveDelegate = function(event) {
+			return self._mouseMove(event);
+		};
+		this._mouseUpDelegate = function(event) {
+			return self._mouseUp(event);
+		};
+		$(document)
+			.bind('mousemove.'+this.widgetName, this._mouseMoveDelegate)
+			.bind('mouseup.'+this.widgetName, this._mouseUpDelegate);
+
+		event.preventDefault();
+		event.originalEvent.mouseHandled = true;
+		return true;
+	},
+
+	_mouseMove: function(event) {
+		// IE mouseup check - mouseup happened when mouse was out of window
+		if ($.browser.msie && !(document.documentMode >= 9) && !event.button) {
+			return this._mouseUp(event);
+		}
+
+		if (this._mouseStarted) {
+			this._mouseDrag(event);
+			return event.preventDefault();
+		}
+
+		if (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) {
+			this._mouseStarted =
+				(this._mouseStart(this._mouseDownEvent, event) !== false);
+			(this._mouseStarted ? this._mouseDrag(event) : this._mouseUp(event));
+		}
+
+		return !this._mouseStarted;
+	},
+
+	_mouseUp: function(event) {
+		$(document)
+			.unbind('mousemove.'+this.widgetName, this._mouseMoveDelegate)
+			.unbind('mouseup.'+this.widgetName, this._mouseUpDelegate);
+
+		if (this._mouseStarted) {
+			this._mouseStarted = false;
+
+			if (event.target == this._mouseDownEvent.target) {
+			    $.data(event.target, this.widgetName + '.preventClickEvent', true);
+			}
+
+			this._mouseStop(event);
+		}
+
+		return false;
+	},
+
+	_mouseDistanceMet: function(event) {
+		return (Math.max(
+				Math.abs(this._mouseDownEvent.pageX - event.pageX),
+				Math.abs(this._mouseDownEvent.pageY - event.pageY)
+			) >= this.options.distance
+		);
+	},
+
+	_mouseDelayMet: function(event) {
+		return this.mouseDelayMet;
+	},
+
+	// These are placeholder methods, to be overriden by extending plugin
+	_mouseStart: function(event) {},
+	_mouseDrag: function(event) {},
+	_mouseStop: function(event) {},
+	_mouseCapture: function(event) { return true; }
+});
+
+})(jQuery);
+/*
+ * jQuery UI Position 1.8.7
+ *
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Position
+ */
+(function( $, undefined ) {
+
+$.ui = $.ui || {};
+
+var horizontalPositions = /left|center|right/,
+	verticalPositions = /top|center|bottom/,
+	center = "center",
+	_position = $.fn.position,
+	_offset = $.fn.offset;
+
+$.fn.position = function( options ) {
+	if ( !options || !options.of ) {
+		return _position.apply( this, arguments );
+	}
+
+	// make a copy, we don't want to modify arguments
+	options = $.extend( {}, options );
+
+	var target = $( options.of ),
+		targetElem = target[0],
+		collision = ( options.collision || "flip" ).split( " " ),
+		offset = options.offset ? options.offset.split( " " ) : [ 0, 0 ],
+		targetWidth,
+		targetHeight,
+		basePosition;
+
+	if ( targetElem.nodeType === 9 ) {
+		targetWidth = target.width();
+		targetHeight = target.height();
+		basePosition = { top: 0, left: 0 };
+	// TODO: use $.isWindow() in 1.9
+	} else if ( targetElem.setTimeout ) {
+		targetWidth = target.width();
+		targetHeight = target.height();
+		basePosition = { top: target.scrollTop(), left: target.scrollLeft() };
+	} else if ( targetElem.preventDefault ) {
+		// force left top to allow flipping
+		options.at = "left top";
+		targetWidth = targetHeight = 0;
+		basePosition = { top: options.of.pageY, left: options.of.pageX };
+	} else {
+		targetWidth = target.outerWidth();
+		targetHeight = target.outerHeight();
+		basePosition = target.offset();
+	}
+
+	// force my and at to have valid horizontal and veritcal positions
+	// if a value is missing or invalid, it will be converted to center 
+	$.each( [ "my", "at" ], function() {
+		var pos = ( options[this] || "" ).split( " " );
+		if ( pos.length === 1) {
+			pos = horizontalPositions.test( pos[0] ) ?
+				pos.concat( [center] ) :
+				verticalPositions.test( pos[0] ) ?
+					[ center ].concat( pos ) :
+					[ center, center ];
+		}
+		pos[ 0 ] = horizontalPositions.test( pos[0] ) ? pos[ 0 ] : center;
+		pos[ 1 ] = verticalPositions.test( pos[1] ) ? pos[ 1 ] : center;
+		options[ this ] = pos;
+	});
+
+	// normalize collision option
+	if ( collision.length === 1 ) {
+		collision[ 1 ] = collision[ 0 ];
+	}
+
+	// normalize offset option
+	offset[ 0 ] = parseInt( offset[0], 10 ) || 0;
+	if ( offset.length === 1 ) {
+		offset[ 1 ] = offset[ 0 ];
+	}
+	offset[ 1 ] = parseInt( offset[1], 10 ) || 0;
+
+	if ( options.at[0] === "right" ) {
+		basePosition.left += targetWidth;
+	} else if (options.at[0] === center ) {
+		basePosition.left += targetWidth / 2;
+	}
+
+	if ( options.at[1] === "bottom" ) {
+		basePosition.top += targetHeight;
+	} else if ( options.at[1] === center ) {
+		basePosition.top += targetHeight / 2;
+	}
+
+	basePosition.left += offset[ 0 ];
+	basePosition.top += offset[ 1 ];
+
+	return this.each(function() {
+		var elem = $( this ),
+			elemWidth = elem.outerWidth(),
+			elemHeight = elem.outerHeight(),
+			marginLeft = parseInt( $.curCSS( this, "marginLeft", true ) ) || 0,
+			marginTop = parseInt( $.curCSS( this, "marginTop", true ) ) || 0,
+			collisionWidth = elemWidth + marginLeft +
+				parseInt( $.curCSS( this, "marginRight", true ) ) || 0,
+			collisionHeight = elemHeight + marginTop +
+				parseInt( $.curCSS( this, "marginBottom", true ) ) || 0,
+			position = $.extend( {}, basePosition ),
+			collisionPosition;
+
+		if ( options.my[0] === "right" ) {
+			position.left -= elemWidth;
+		} else if ( options.my[0] === center ) {
+			position.left -= elemWidth / 2;
+		}
+
+		if ( options.my[1] === "bottom" ) {
+			position.top -= elemHeight;
+		} else if ( options.my[1] === center ) {
+			position.top -= elemHeight / 2;
+		}
+
+		// prevent fractions (see #5280)
+		position.left = Math.round( position.left );
+		position.top = Math.round( position.top );
+
+		collisionPosition = {
+			left: position.left - marginLeft,
+			top: position.top - marginTop
+		};
+
+		$.each( [ "left", "top" ], function( i, dir ) {
+			if ( $.ui.position[ collision[i] ] ) {
+				$.ui.position[ collision[i] ][ dir ]( position, {
+					targetWidth: targetWidth,
+					targetHeight: targetHeight,
+					elemWidth: elemWidth,
+					elemHeight: elemHeight,
+					collisionPosition: collisionPosition,
+					collisionWidth: collisionWidth,
+					collisionHeight: collisionHeight,
+					offset: offset,
+					my: options.my,
+					at: options.at
+				});
+			}
+		});
+
+		if ( $.fn.bgiframe ) {
+			elem.bgiframe();
+		}
+		elem.offset( $.extend( position, { using: options.using } ) );
+	});
+};
+
+$.ui.position = {
+	fit: {
+		left: function( position, data ) {
+			var win = $( window ),
+				over = data.collisionPosition.left + data.collisionWidth - win.width() - win.scrollLeft();
+			position.left = over > 0 ? position.left - over : Math.max( position.left - data.collisionPosition.left, position.left );
+		},
+		top: function( position, data ) {
+			var win = $( window ),
+				over = data.collisionPosition.top + data.collisionHeight - win.height() - win.scrollTop();
+			position.top = over > 0 ? position.top - over : Math.max( position.top - data.collisionPosition.top, position.top );
+		}
+	},
+
+	flip: {
+		left: function( position, data ) {
+			if ( data.at[0] === center ) {
+				return;
+			}
+			var win = $( window ),
+				over = data.collisionPosition.left + data.collisionWidth - win.width() - win.scrollLeft(),
+				myOffset = data.my[ 0 ] === "left" ?
+					-data.elemWidth :
+					data.my[ 0 ] === "right" ?
+						data.elemWidth :
+						0,
+				atOffset = data.at[ 0 ] === "left" ?
+					data.targetWidth :
+					-data.targetWidth,
+				offset = -2 * data.offset[ 0 ];
+			position.left += data.collisionPosition.left < 0 ?
+				myOffset + atOffset + offset :
+				over > 0 ?
+					myOffset + atOffset + offset :
+					0;
+		},
+		top: function( position, data ) {
+			if ( data.at[1] === center ) {
+				return;
+			}
+			var win = $( window ),
+				over = data.collisionPosition.top + data.collisionHeight - win.height() - win.scrollTop(),
+				myOffset = data.my[ 1 ] === "top" ?
+					-data.elemHeight :
+					data.my[ 1 ] === "bottom" ?
+						data.elemHeight :
+						0,
+				atOffset = data.at[ 1 ] === "top" ?
+					data.targetHeight :
+					-data.targetHeight,
+				offset = -2 * data.offset[ 1 ];
+			position.top += data.collisionPosition.top < 0 ?
+				myOffset + atOffset + offset :
+				over > 0 ?
+					myOffset + atOffset + offset :
+					0;
+		}
+	}
+};
+
+// offset setter from jQuery 1.4
+if ( !$.offset.setOffset ) {
+	$.offset.setOffset = function( elem, options ) {
+		// set position first, in-case top/left are set even on static elem
+		if ( /static/.test( $.curCSS( elem, "position" ) ) ) {
+			elem.style.position = "relative";
+		}
+		var curElem   = $( elem ),
+			curOffset = curElem.offset(),
+			curTop    = parseInt( $.curCSS( elem, "top",  true ), 10 ) || 0,
+			curLeft   = parseInt( $.curCSS( elem, "left", true ), 10)  || 0,
+			props     = {
+				top:  (options.top  - curOffset.top)  + curTop,
+				left: (options.left - curOffset.left) + curLeft
+			};
+		
+		if ( 'using' in options ) {
+			options.using.call( elem, props );
+		} else {
+			curElem.css( props );
+		}
+	};
+
+	$.fn.offset = function( options ) {
+		var elem = this[ 0 ];
+		if ( !elem || !elem.ownerDocument ) { return null; }
+		if ( options ) { 
+			return this.each(function() {
+				$.offset.setOffset( this, options );
+			});
+		}
+		return _offset.call( this );
+	};
+}
+
+}( jQuery ));
+/*
+ * jQuery UI Draggable 1.8.7
+ *
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Draggables
+ *
+ * Depends:
+ *	jquery.ui.core.js
+ *	jquery.ui.mouse.js
+ *	jquery.ui.widget.js
+ */
+(function( $, undefined ) {
+
+$.widget("ui.draggable", $.ui.mouse, {
+	widgetEventPrefix: "drag",
+	options: {
+		addClasses: true,
+		appendTo: "parent",
+		axis: false,
+		connectToSortable: false,
+		containment: false,
+		cursor: "auto",
+		cursorAt: false,
+		grid: false,
+		handle: false,
+		helper: "original",
+		iframeFix: false,
+		opacity: false,
+		refreshPositions: false,
+		revert: false,
+		revertDuration: 500,
+		scope: "default",
+		scroll: true,
+		scrollSensitivity: 20,
+		scrollSpeed: 20,
+		snap: false,
+		snapMode: "both",
+		snapTolerance: 20,
+		stack: false,
+		zIndex: false
+	},
+	_create: function() {
+
+		if (this.options.helper == 'original' && !(/^(?:r|a|f)/).test(this.element.css("position")))
+			this.element[0].style.position = 'relative';
+
+		(this.options.addClasses && this.element.addClass("ui-draggable"));
+		(this.options.disabled && this.element.addClass("ui-draggable-disabled"));
+
+		this._mouseInit();
+
+	},
+
+	destroy: function() {
+		if(!this.element.data('draggable')) return;
+		this.element
+			.removeData("draggable")
+			.unbind(".draggable")
+			.removeClass("ui-draggable"
+				+ " ui-draggable-dragging"
+				+ " ui-draggable-disabled");
+		this._mouseDestroy();
+
+		return this;
+	},
+
+	_mouseCapture: function(event) {
+
+		var o = this.options;
+
+		// among others, prevent a drag on a resizable-handle
+		if (this.helper || o.disabled || $(event.target).is('.ui-resizable-handle'))
+			return false;
+
+		//Quit if we're not on a valid handle
+		this.handle = this._getHandle(event);
+		if (!this.handle)
+			return false;
+
+		return true;
+
+	},
+
+	_mouseStart: function(event) {
+
+		var o = this.options;
+
+		//Create and append the visible helper
+		this.helper = this._createHelper(event);
+
+		//Cache the helper size
+		this._cacheHelperProportions();
+
+		//If ddmanager is used for droppables, set the global draggable
+		if($.ui.ddmanager)
+			$.ui.ddmanager.current = this;
+
+		/*
+		 * - Position generation -
+		 * This block generates everything position related - it's the core of draggables.
+		 */
+
+		//Cache the margins of the original element
+		this._cacheMargins();
+
+		//Store the helper's css position
+		this.cssPosition = this.helper.css("position");
+		this.scrollParent = this.helper.scrollParent();
+
+		//The element's absolute position on the page minus margins
+		this.offset = this.positionAbs = this.element.offset();
+		this.offset = {
+			top: this.offset.top - this.margins.top,
+			left: this.offset.left - this.margins.left
+		};
+
+		$.extend(this.offset, {
+			click: { //Where the click happened, relative to the element
+				left: event.pageX - this.offset.left,
+				top: event.pageY - this.offset.top
+			},
+			parent: this._getParentOffset(),
+			relative: this._getRelativeOffset() //This is a relative to absolute position minus the actual position calculation - only used for relative positioned helper
+		});
+
+		//Generate the original position
+		this.originalPosition = this.position = this._generatePosition(event);
+		this.originalPageX = event.pageX;
+		this.originalPageY = event.pageY;
+
+		//Adjust the mouse offset relative to the helper if 'cursorAt' is supplied
+		(o.cursorAt && this._adjustOffsetFromHelper(o.cursorAt));
+
+		//Set a containment if given in the options
+		if(o.containment)
+			this._setContainment();
+
+		//Trigger event + callbacks
+		if(this._trigger("start", event) === false) {
+			this._clear();
+			return false;
+		}
+
+		//Recache the helper size
+		this._cacheHelperProportions();
+
+		//Prepare the droppable offsets
+		if ($.ui.ddmanager && !o.dropBehaviour)
+			$.ui.ddmanager.prepareOffsets(this, event);
+
+		this.helper.addClass("ui-draggable-dragging");
+		this._mouseDrag(event, true); //Execute the drag once - this causes the helper not to be visible before getting its correct position
+		return true;
+	},
+
+	_mouseDrag: function(event, noPropagation) {
+
+		//Compute the helpers position
+		this.position = this._generatePosition(event);
+		this.positionAbs = this._convertPositionTo("absolute");
+
+		//Call plugins and callbacks and use the resulting position if something is returned
+		if (!noPropagation) {
+			var ui = this._uiHash();
+			if(this._trigger('drag', event, ui) === false) {
+				this._mouseUp({});
+				return false;
+			}
+			this.position = ui.position;
+		}
+
+		if(!this.options.axis || this.options.axis != "y") this.helper[0].style.left = this.position.left+'px';
+		if(!this.options.axis || this.options.axis != "x") this.helper[0].style.top = this.position.top+'px';
+		if($.ui.ddmanager) $.ui.ddmanager.drag(this, event);
+
+		return false;
+	},
+
+	_mouseStop: function(event) {
+
+		//If we are using droppables, inform the manager about the drop
+		var dropped = false;
+		if ($.ui.ddmanager && !this.options.dropBehaviour)
+			dropped = $.ui.ddmanager.drop(this, event);
+
+		//if a drop comes from outside (a sortable)
+		if(this.dropped) {
+			dropped = this.dropped;
+			this.dropped = false;
+		}
+		
+		//if the original element is removed, don't bother to continue
+		if(!this.element[0] || !this.element[0].parentNode)
+			return false;
+
+		if((this.options.revert == "invalid" && !dropped) || (this.options.revert == "valid" && dropped) || this.options.revert === true || ($.isFunction(this.options.revert) && this.options.revert.call(this.element, dropped))) {
+			var self = this;
+			$(this.helper).animate(this.originalPosition, parseInt(this.options.revertDuration, 10), function() {
+				if(self._trigger("stop", event) !== false) {
+					self._clear();
+				}
+			});
+		} else {
+			if(this._trigger("stop", event) !== false) {
+				this._clear();
+			}
+		}
+
+		return false;
+	},
+	
+	cancel: function() {
+		
+		if(this.helper.is(".ui-draggable-dragging")) {
+			this._mouseUp({});
+		} else {
+			this._clear();
+		}
+		
+		return this;
+		
+	},
+
+	_getHandle: function(event) {
+
+		var handle = !this.options.handle || !$(this.options.handle, this.element).length ? true : false;
+		$(this.options.handle, this.element)
+			.find("*")
+			.andSelf()
+			.each(function() {
+				if(this == event.target) handle = true;
+			});
+
+		return handle;
+
+	},
+
+	_createHelper: function(event) {
+
+		var o = this.options;
+		var helper = $.isFunction(o.helper) ? $(o.helper.apply(this.element[0], [event])) : (o.helper == 'clone' ? this.element.clone() : this.element);
+
+		if(!helper.parents('body').length)
+			helper.appendTo((o.appendTo == 'parent' ? this.element[0].parentNode : o.appendTo));
+
+		if(helper[0] != this.element[0] && !(/(fixed|absolute)/).test(helper.css("position")))
+			helper.css("position", "absolute");
+
+		return helper;
+
+	},
+
+	_adjustOffsetFromHelper: function(obj) {
+		if (typeof obj == 'string') {
+			obj = obj.split(' ');
+		}
+		if ($.isArray(obj)) {
+			obj = {left: +obj[0], top: +obj[1] || 0};
+		}
+		if ('left' in obj) {
+			this.offset.click.left = obj.left + this.margins.left;
+		}
+		if ('right' in obj) {
+			this.offset.click.left = this.helperProportions.width - obj.right + this.margins.left;
+		}
+		if ('top' in obj) {
+			this.offset.click.top = obj.top + this.margins.top;
+		}
+		if ('bottom' in obj) {
+			this.offset.click.top = this.helperProportions.height - obj.bottom + this.margins.top;
+		}
+	},
+
+	_getParentOffset: function() {
+
+		//Get the offsetParent and cache its position
+		this.offsetParent = this.helper.offsetParent();
+		var po = this.offsetParent.offset();
+
+		// This is a special case where we need to modify a offset calculated on start, since the following happened:
+		// 1. The position of the helper is absolute, so it's position is calculated based on the next positioned parent
+		// 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't the document, which means that
+		//    the scroll is included in the initial calculation of the offset of the parent, and never recalculated upon drag
+		if(this.cssPosition == 'absolute' && this.scrollParent[0] != document && $.ui.contains(this.scrollParent[0], this.offsetParent[0])) {
+			po.left += this.scrollParent.scrollLeft();
+			po.top += this.scrollParent.scrollTop();
+		}
+
+		if((this.offsetParent[0] == document.body) //This needs to be actually done for all browsers, since pageX/pageY includes this information
+		|| (this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() == 'html' && $.browser.msie)) //Ugly IE fix
+			po = { top: 0, left: 0 };
+
+		return {
+			top: po.top + (parseInt(this.offsetParent.css("borderTopWidth"),10) || 0),
+			left: po.left + (parseInt(this.offsetParent.css("borderLeftWidth"),10) || 0)
+		};
+
+	},
+
+	_getRelativeOffset: function() {
+
+		if(this.cssPosition == "relative") {
+			var p = this.element.position();
+			return {
+				top: p.top - (parseInt(this.helper.css("top"),10) || 0) + this.scrollParent.scrollTop(),
+				left: p.left - (parseInt(this.helper.css("left"),10) || 0) + this.scrollParent.scrollLeft()
+			};
+		} else {
+			return { top: 0, left: 0 };
+		}
+
+	},
+
+	_cacheMargins: function() {
+		this.margins = {
+			left: (parseInt(this.element.css("marginLeft"),10) || 0),
+			top: (parseInt(this.element.css("marginTop"),10) || 0)
+		};
+	},
+
+	_cacheHelperProportions: function() {
+		this.helperProportions = {
+			width: this.helper.outerWidth(),
+			height: this.helper.outerHeight()
+		};
+	},
+
+	_setContainment: function() {
+
+		var o = this.options;
+		if(o.containment == 'parent') o.containment = this.helper[0].parentNode;
+		if(o.containment == 'document' || o.containment == 'window') this.containment = [
+			(o.containment == 'document' ? 0 : $(window).scrollLeft()) - this.offset.relative.left - this.offset.parent.left,
+			(o.containment == 'document' ? 0 : $(window).scrollTop()) - this.offset.relative.top - this.offset.parent.top,
+			(o.containment == 'document' ? 0 : $(window).scrollLeft()) + $(o.containment == 'document' ? document : window).width() - this.helperProportions.width - this.margins.left,
+			(o.containment == 'document' ? 0 : $(window).scrollTop()) + ($(o.containment == 'document' ? document : window).height() || document.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top
+		];
+
+		if(!(/^(document|window|parent)$/).test(o.containment) && o.containment.constructor != Array) {
+			var ce = $(o.containment)[0]; if(!ce) return;
+			var co = $(o.containment).offset();
+			var over = ($(ce).css("overflow") != 'hidden');
+
+			this.containment = [
+				co.left + (parseInt($(ce).css("borderLeftWidth"),10) || 0) + (parseInt($(ce).css("paddingLeft"),10) || 0) - this.margins.left,
+				co.top + (parseInt($(ce).css("borderTopWidth"),10) || 0) + (parseInt($(ce).css("paddingTop"),10) || 0) - this.margins.top,
+				co.left+(over ? Math.max(ce.scrollWidth,ce.offsetWidth) : ce.offsetWidth) - (parseInt($(ce).css("borderLeftWidth"),10) || 0) - (parseInt($(ce).css("paddingRight"),10) || 0) - this.helperProportions.width - this.margins.left,
+				co.top+(over ? Math.max(ce.scrollHeight,ce.offsetHeight) : ce.offsetHeight) - (parseInt($(ce).css("borderTopWidth"),10) || 0) - (parseInt($(ce).css("paddingBottom"),10) || 0) - this.helperProportions.height - this.margins.top
+			];
+		} else if(o.containment.constructor == Array) {
+			this.containment = o.containment;
+		}
+
+	},
+
+	_convertPositionTo: function(d, pos) {
+
+		if(!pos) pos = this.position;
+		var mod = d == "absolute" ? 1 : -1;
+		var o = this.options, scroll = this.cssPosition == 'absolute' && !(this.scrollParent[0] != document && $.ui.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName);
+
+		return {
+			top: (
+				pos.top																	// The absolute mouse position
+				+ this.offset.relative.top * mod										// Only for relative positioned nodes: Relative offset from element to offset parent
+				+ this.offset.parent.top * mod											// The offsetParent's offset without borders (offset + border)
+				- ($.browser.safari && $.browser.version < 526 && this.cssPosition == 'fixed' ? 0 : ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ) * mod)
+			),
+			left: (
+				pos.left																// The absolute mouse position
+				+ this.offset.relative.left * mod										// Only for relative positioned nodes: Relative offset from element to offset parent
+				+ this.offset.parent.left * mod											// The offsetParent's offset without borders (offset + border)
+				- ($.browser.safari && $.browser.version < 526 && this.cssPosition == 'fixed' ? 0 : ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ) * mod)
+			)
+		};
+
+	},
+
+	_generatePosition: function(event) {
+
+		var o = this.options, scroll = this.cssPosition == 'absolute' && !(this.scrollParent[0] != document && $.ui.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName);
+		var pageX = event.pageX;
+		var pageY = event.pageY;
+
+		/*
+		 * - Position constraining -
+		 * Constrain the position to a mix of grid, containment.
+		 */
+
+		if(this.originalPosition) { //If we are not dragging yet, we won't check for options
+
+			if(this.containment) {
+				if(event.pageX - this.offset.click.left < this.containment[0]) pageX = this.containment[0] + this.offset.click.left;
+				if(event.pageY - this.offset.click.top < this.containment[1]) pageY = this.containment[1] + this.offset.click.top;
+				if(event.pageX - this.offset.click.left > this.containment[2]) pageX = this.containment[2] + this.offset.click.left;
+				if(event.pageY - this.offset.click.top > this.containment[3]) pageY = this.containment[3] + this.offset.click.top;
+			}
+
+			if(o.grid) {
+				var top = this.originalPageY + Math.round((pageY - this.originalPageY) / o.grid[1]) * o.grid[1];
+				pageY = this.containment ? (!(top - this.offset.click.top < this.containment[1] || top - this.offset.click.top > this.containment[3]) ? top : (!(top - this.offset.click.top < this.containment[1]) ? top - o.grid[1] : top + o.grid[1])) : top;
+
+				var left = this.originalPageX + Math.round((pageX - this.originalPageX) / o.grid[0]) * o.grid[0];
+				pageX = this.containment ? (!(left - this.offset.click.left < this.containment[0] || left - this.offset.click.left > this.containment[2]) ? left : (!(left - this.offset.click.left < this.containment[0]) ? left - o.grid[0] : left + o.grid[0])) : left;
+			}
+
+		}
+
+		return {
+			top: (
+				pageY																// The absolute mouse position
+				- this.offset.click.top													// Click offset (relative to the element)
+				- this.offset.relative.top												// Only for relative positioned nodes: Relative offset from element to offset parent
+				- this.offset.parent.top												// The offsetParent's offset without borders (offset + border)
+				+ ($.browser.safari && $.browser.version < 526 && this.cssPosition == 'fixed' ? 0 : ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ))
+			),
+			left: (
+				pageX																// The absolute mouse position
+				- this.offset.click.left												// Click offset (relative to the element)
+				- this.offset.relative.left												// Only for relative positioned nodes: Relative offset from element to offset parent
+				- this.offset.parent.left												// The offsetParent's offset without borders (offset + border)
+				+ ($.browser.safari && $.browser.version < 526 && this.cssPosition == 'fixed' ? 0 : ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ))
+			)
+		};
+
+	},
+
+	_clear: function() {
+		this.helper.removeClass("ui-draggable-dragging");
+		if(this.helper[0] != this.element[0] && !this.cancelHelperRemoval) this.helper.remove();
+		//if($.ui.ddmanager) $.ui.ddmanager.current = null;
+		this.helper = null;
+		this.cancelHelperRemoval = false;
+	},
+
+	// From now on bulk stuff - mainly helpers
+
+	_trigger: function(type, event, ui) {
+		ui = ui || this._uiHash();
+		$.ui.plugin.call(this, type, [event, ui]);
+		if(type == "drag") this.positionAbs = this._convertPositionTo("absolute"); //The absolute position has to be recalculated after plugins
+		return $.Widget.prototype._trigger.call(this, type, event, ui);
+	},
+
+	plugins: {},
+
+	_uiHash: function(event) {
+		return {
+			helper: this.helper,
+			position: this.position,
+			originalPosition: this.originalPosition,
+			offset: this.positionAbs
+		};
+	}
+
+});
+
+$.extend($.ui.draggable, {
+	version: "1.8.7"
+});
+
+$.ui.plugin.add("draggable", "connectToSortable", {
+	start: function(event, ui) {
+
+		var inst = $(this).data("draggable"), o = inst.options,
+			uiSortable = $.extend({}, ui, { item: inst.element });
+		inst.sortables = [];
+		$(o.connectToSortable).each(function() {
+			var sortable = $.data(this, 'sortable');
+			if (sortable && !sortable.options.disabled) {
+				inst.sortables.push({
+					instance: sortable,
+					shouldRevert: sortable.options.revert
+				});
+				sortable._refreshItems();	//Do a one-time refresh at start to refresh the containerCache
+				sortable._trigger("activate", event, uiSortable);
+			}
+		});
+
+	},
+	stop: function(event, ui) {
+
+		//If we are still over the sortable, we fake the stop event of the sortable, but also remove helper
+		var inst = $(this).data("draggable"),
+			uiSortable = $.extend({}, ui, { item: inst.element });
+
+		$.each(inst.sortables, function() {
+			if(this.instance.isOver) {
+
+				this.instance.isOver = 0;
+
+				inst.cancelHelperRemoval = true; //Don't remove the helper in the draggable instance
+				this.instance.cancelHelperRemoval = false; //Remove it in the sortable instance (so sortable plugins like revert still work)
+
+				//The sortable revert is supported, and we have to set a temporary dropped variable on the draggable to support revert: 'valid/invalid'
+				if(this.shouldRevert) this.instance.options.revert = true;
+
+				//Trigger the stop of the sortable
+				this.instance._mouseStop(event);
+
+				this.instance.options.helper = this.instance.options._helper;
+
+				//If the helper has been the original item, restore properties in the sortable
+				if(inst.options.helper == 'original')
+					this.instance.currentItem.css({ top: 'auto', left: 'auto' });
+
+			} else {
+				this.instance.cancelHelperRemoval = false; //Remove the helper in the sortable instance
+				this.instance._trigger("deactivate", event, uiSortable);
+			}
+
+		});
+
+	},
+	drag: function(event, ui) {
+
+		var inst = $(this).data("draggable"), self = this;
+
+		var checkPos = function(o) {
+			var dyClick = this.offset.click.top, dxClick = this.offset.click.left;
+			var helperTop = this.positionAbs.top, helperLeft = this.positionAbs.left;
+			var itemHeight = o.height, itemWidth = o.width;
+			var itemTop = o.top, itemLeft = o.left;
+
+			return $.ui.isOver(helperTop + dyClick, helperLeft + dxClick, itemTop, itemLeft, itemHeight, itemWidth);
+		};
+
+		$.each(inst.sortables, function(i) {
+			
+			//Copy over some variables to allow calling the sortable's native _intersectsWith
+			this.instance.positionAbs = inst.positionAbs;
+			this.instance.helperProportions = inst.helperProportions;
+			this.instance.offset.click = inst.offset.click;
+			
+			if(this.instance._intersectsWith(this.instance.containerCache)) {
+
+				//If it intersects, we use a little isOver variable and set it once, so our move-in stuff gets fired only once
+				if(!this.instance.isOver) {
+
+					this.instance.isOver = 1;
+					//Now we fake the start of dragging for the sortable instance,
+					//by cloning the list group item, appending it to the sortable and using it as inst.currentItem
+					//We can then fire the start event of the sortable with our passed browser event, and our own helper (so it doesn't create a new one)
+					this.instance.currentItem = $(self).clone().appendTo(this.instance.element).data("sortable-item", true);
+					this.instance.options._helper = this.instance.options.helper; //Store helper option to later restore it
+					this.instance.options.helper = function() { return ui.helper[0]; };
+
+					event.target = this.instance.currentItem[0];
+					this.instance._mouseCapture(event, true);
+					this.instance._mouseStart(event, true, true);
+
+					//Because the browser event is way off the new appended portlet, we modify a couple of variables to reflect the changes
+					this.instance.offset.click.top = inst.offset.click.top;
+					this.instance.offset.click.left = inst.offset.click.left;
+					this.instance.offset.parent.left -= inst.offset.parent.left - this.instance.offset.parent.left;
+					this.instance.offset.parent.top -= inst.offset.parent.top - this.instance.offset.parent.top;
+
+					inst._trigger("toSortable", event);
+					inst.dropped = this.instance.element; //draggable revert needs that
+					//hack so receive/update callbacks work (mostly)
+					inst.currentItem = inst.element;
+					this.instance.fromOutside = inst;
+
+				}
+
+				//Provided we did all the previous steps, we can fire the drag event of the sortable on every draggable drag, when it intersects with the sortable
+				if(this.instance.currentItem) this.instance._mouseDrag(event);
+
+			} else {
+
+				//If it doesn't intersect with the sortable, and it intersected before,
+				//we fake the drag stop of the sortable, but make sure it doesn't remove the helper by using cancelHelperRemoval
+				if(this.instance.isOver) {
+
+					this.instance.isOver = 0;
+					this.instance.cancelHelperRemoval = true;
+					
+					//Prevent reverting on this forced stop
+					this.instance.options.revert = false;
+					
+					// The out event needs to be triggered independently
+					this.instance._trigger('out', event, this.instance._uiHash(this.instance));
+					
+					this.instance._mouseStop(event, true);
+					this.instance.options.helper = this.instance.options._helper;
+
+					//Now we remove our currentItem, the list group clone again, and the placeholder, and animate the helper back to it's original size
+					this.instance.currentItem.remove();
+					if(this.instance.placeholder) this.instance.placeholder.remove();
+
+					inst._trigger("fromSortable", event);
+					inst.dropped = false; //draggable revert needs that
+				}
+
+			};
+
+		});
+
+	}
+});
+
+$.ui.plugin.add("draggable", "cursor", {
+	start: function(event, ui) {
+		var t = $('body'), o = $(this).data('draggable').options;
+		if (t.css("cursor")) o._cursor = t.css("cursor");
+		t.css("cursor", o.cursor);
+	},
+	stop: function(event, ui) {
+		var o = $(this).data('draggable').options;
+		if (o._cursor) $('body').css("cursor", o._cursor);
+	}
+});
+
+$.ui.plugin.add("draggable", "iframeFix", {
+	start: function(event, ui) {
+		var o = $(this).data('draggable').options;
+		$(o.iframeFix === true ? "iframe" : o.iframeFix).each(function() {
+			$('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>')
+			.css({
+				width: this.offsetWidth+"px", height: this.offsetHeight+"px",
+				position: "absolute", opacity: "0.001", zIndex: 1000
+			})
+			.css($(this).offset())
+			.appendTo("body");
+		});
+	},
+	stop: function(event, ui) {
+		$("div.ui-draggable-iframeFix").each(function() { this.parentNode.removeChild(this); }); //Remove frame helpers
+	}
+});
+
+$.ui.plugin.add("draggable", "opacity", {
+	start: function(event, ui) {
+		var t = $(ui.helper), o = $(this).data('draggable').options;
+		if(t.css("opacity")) o._opacity = t.css("opacity");
+		t.css('opacity', o.opacity);
+	},
+	stop: function(event, ui) {
+		var o = $(this).data('draggable').options;
+		if(o._opacity) $(ui.helper).css('opacity', o._opacity);
+	}
+});
+
+$.ui.plugin.add("draggable", "scroll", {
+	start: function(event, ui) {
+		var i = $(this).data("draggable");
+		if(i.scrollParent[0] != document && i.scrollParent[0].tagName != 'HTML') i.overflowOffset = i.scrollParent.offset();
+	},
+	drag: function(event, ui) {
+
+		var i = $(this).data("draggable"), o = i.options, scrolled = false;
+
+		if(i.scrollParent[0] != document && i.scrollParent[0].tagName != 'HTML') {
+
+			if(!o.axis || o.axis != 'x') {
+				if((i.overflowOffset.top + i.scrollParent[0].offsetHeight) - event.pageY < o.scrollSensitivity)
+					i.scrollParent[0].scrollTop = scrolled = i.scrollParent[0].scrollTop + o.scrollSpeed;
+				else if(event.pageY - i.overflowOffset.top < o.scrollSensitivity)
+					i.scrollParent[0].scrollTop = scrolled = i.scrollParent[0].scrollTop - o.scrollSpeed;
+			}
+
+			if(!o.axis || o.axis != 'y') {
+				if((i.overflowOffset.left + i.scrollParent[0].offsetWidth) - event.pageX < o.scrollSensitivity)
+					i.scrollParent[0].scrollLeft = scrolled = i.scrollParent[0].scrollLeft + o.scrollSpeed;
+				else if(event.pageX - i.overflowOffset.left < o.scrollSensitivity)
+					i.scrollParent[0].scrollLeft = scrolled = i.scrollParent[0].scrollLeft - o.scrollSpeed;
+			}
+
+		} else {
+
+			if(!o.axis || o.axis != 'x') {
+				if(event.pageY - $(document).scrollTop() < o.scrollSensitivity)
+					scrolled = $(document).scrollTop($(document).scrollTop() - o.scrollSpeed);
+				else if($(window).height() - (event.pageY - $(document).scrollTop()) < o.scrollSensitivity)
+					scrolled = $(document).scrollTop($(document).scrollTop() + o.scrollSpeed);
+			}
+
+			if(!o.axis || o.axis != 'y') {
+				if(event.pageX - $(document).scrollLeft() < o.scrollSensitivity)
+					scrolled = $(document).scrollLeft($(document).scrollLeft() - o.scrollSpeed);
+				else if($(window).width() - (event.pageX - $(document).scrollLeft()) < o.scrollSensitivity)
+					scrolled = $(document).scrollLeft($(document).scrollLeft() + o.scrollSpeed);
+			}
+
+		}
+
+		if(scrolled !== false && $.ui.ddmanager && !o.dropBehaviour)
+			$.ui.ddmanager.prepareOffsets(i, event);
+
+	}
+});
+
+$.ui.plugin.add("draggable", "snap", {
+	start: function(event, ui) {
+
+		var i = $(this).data("draggable"), o = i.options;
+		i.snapElements = [];
+
+		$(o.snap.constructor != String ? ( o.snap.items || ':data(draggable)' ) : o.snap).each(function() {
+			var $t = $(this); var $o = $t.offset();
+			if(this != i.element[0]) i.snapElements.push({
+				item: this,
+				width: $t.outerWidth(), height: $t.outerHeight(),
+				top: $o.top, left: $o.left
+			});
+		});
+
+	},
+	drag: function(event, ui) {
+
+		var inst = $(this).data("draggable"), o = inst.options;
+		var d = o.snapTolerance;
+
+		var x1 = ui.offset.left, x2 = x1 + inst.helperProportions.width,
+			y1 = ui.offset.top, y2 = y1 + inst.helperProportions.height;
+
+		for (var i = inst.snapElements.length - 1; i >= 0; i--){
+
+			var l = inst.snapElements[i].left, r = l + inst.snapElements[i].width,
+				t = inst.snapElements[i].top, b = t + inst.snapElements[i].height;
+
+			//Yes, I know, this is insane ;)
+			if(!((l-d < x1 && x1 < r+d && t-d < y1 && y1 < b+d) || (l-d < x1 && x1 < r+d && t-d < y2 && y2 < b+d) || (l-d < x2 && x2 < r+d && t-d < y1 && y1 < b+d) || (l-d < x2 && x2 < r+d && t-d < y2 && y2 < b+d))) {
+				if(inst.snapElements[i].snapping) (inst.options.snap.release && inst.options.snap.release.call(inst.element, event, $.extend(inst._uiHash(), { snapItem: inst.snapElements[i].item })));
+				inst.snapElements[i].snapping = false;
+				continue;
+			}
+
+			if(o.snapMode != 'inner') {
+				var ts = Math.abs(t - y2) <= d;
+				var bs = Math.abs(b - y1) <= d;
+				var ls = Math.abs(l - x2) <= d;
+				var rs = Math.abs(r - x1) <= d;
+				if(ts) ui.position.top = inst._convertPositionTo("relative", { top: t - inst.helperProportions.height, left: 0 }).top - inst.margins.top;
+				if(bs) ui.position.top = inst._convertPositionTo("relative", { top: b, left: 0 }).top - inst.margins.top;
+				if(ls) ui.position.left = inst._convertPositionTo("relative", { top: 0, left: l - inst.helperProportions.width }).left - inst.margins.left;
+				if(rs) ui.position.left = inst._convertPositionTo("relative", { top: 0, left: r }).left - inst.margins.left;
+			}
+
+			var first = (ts || bs || ls || rs);
+
+			if(o.snapMode != 'outer') {
+				var ts = Math.abs(t - y1) <= d;
+				var bs = Math.abs(b - y2) <= d;
+				var ls = Math.abs(l - x1) <= d;
+				var rs = Math.abs(r - x2) <= d;
+				if(ts) ui.position.top = inst._convertPositionTo("relative", { top: t, left: 0 }).top - inst.margins.top;
+				if(bs) ui.position.top = inst._convertPositionTo("relative", { top: b - inst.helperProportions.height, left: 0 }).top - inst.margins.top;
+				if(ls) ui.position.left = inst._convertPositionTo("relative", { top: 0, left: l }).left - inst.margins.left;
+				if(rs) ui.position.left = inst._convertPositionTo("relative", { top: 0, left: r - inst.helperProportions.width }).left - inst.margins.left;
+			}
+
+			if(!inst.snapElements[i].snapping && (ts || bs || ls || rs || first))
+				(inst.options.snap.snap && inst.options.snap.snap.call(inst.element, event, $.extend(inst._uiHash(), { snapItem: inst.snapElements[i].item })));
+			inst.snapElements[i].snapping = (ts || bs || ls || rs || first);
+
+		};
+
+	}
+});
+
+$.ui.plugin.add("draggable", "stack", {
+	start: function(event, ui) {
+
+		var o = $(this).data("draggable").options;
+
+		var group = $.makeArray($(o.stack)).sort(function(a,b) {
+			return (parseInt($(a).css("zIndex"),10) || 0) - (parseInt($(b).css("zIndex"),10) || 0);
+		});
+		if (!group.length) { return; }
+		
+		var min = parseInt(group[0].style.zIndex) || 0;
+		$(group).each(function(i) {
+			this.style.zIndex = min + i;
+		});
+
+		this[0].style.zIndex = min + group.length;
+
+	}
+});
+
+$.ui.plugin.add("draggable", "zIndex", {
+	start: function(event, ui) {
+		var t = $(ui.helper), o = $(this).data("draggable").options;
+		if(t.css("zIndex")) o._zIndex = t.css("zIndex");
+		t.css('zIndex', o.zIndex);
+	},
+	stop: function(event, ui) {
+		var o = $(this).data("draggable").options;
+		if(o._zIndex) $(ui.helper).css('zIndex', o._zIndex);
+	}
+});
+
+})(jQuery);
+/*
+ * jQuery UI Droppable 1.8.7
+ *
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Droppables
+ *
+ * Depends:
+ *	jquery.ui.core.js
+ *	jquery.ui.widget.js
+ *	jquery.ui.mouse.js
+ *	jquery.ui.draggable.js
+ */
+(function( $, undefined ) {
+
+$.widget("ui.droppable", {
+	widgetEventPrefix: "drop",
+	options: {
+		accept: '*',
+		activeClass: false,
+		addClasses: true,
+		greedy: false,
+		hoverClass: false,
+		scope: 'default',
+		tolerance: 'intersect'
+	},
+	_create: function() {
+
+		var o = this.options, accept = o.accept;
+		this.isover = 0; this.isout = 1;
+
+		this.accept = $.isFunction(accept) ? accept : function(d) {
+			return d.is(accept);
+		};
+
+		//Store the droppable's proportions
+		this.proportions = { width: this.element[0].offsetWidth, height: this.element[0].offsetHeight };
+
+		// Add the reference and positions to the manager
+		$.ui.ddmanager.droppables[o.scope] = $.ui.ddmanager.droppables[o.scope] || [];
+		$.ui.ddmanager.droppables[o.scope].push(this);
+
+		(o.addClasses && this.element.addClass("ui-droppable"));
+
+	},
+
+	destroy: function() {
+		var drop = $.ui.ddmanager.droppables[this.options.scope];
+		for ( var i = 0; i < drop.length; i++ )
+			if ( drop[i] == this )
+				drop.splice(i, 1);
+
+		this.element
+			.removeClass("ui-droppable ui-droppable-disabled")
+			.removeData("droppable")
+			.unbind(".droppable");
+
+		return this;
+	},
+
+	_setOption: function(key, value) {
+
+		if(key == 'accept') {
+			this.accept = $.isFunction(value) ? value : function(d) {
+				return d.is(value);
+			};
+		}
+		$.Widget.prototype._setOption.apply(this, arguments);
+	},
+
+	_activate: function(event) {
+		var draggable = $.ui.ddmanager.current;
+		if(this.options.activeClass) this.element.addClass(this.options.activeClass);
+		(draggable && this._trigger('activate', event, this.ui(draggable)));
+	},
+
+	_deactivate: function(event) {
+		var draggable = $.ui.ddmanager.current;
+		if(this.options.activeClass) this.element.removeClass(this.options.activeClass);
+		(draggable && this._trigger('deactivate', event, this.ui(draggable)));
+	},
+
+	_over: function(event) {
+
+		var draggable = $.ui.ddmanager.current;
+		if (!draggable || (draggable.currentItem || draggable.element)[0] == this.element[0]) return; // Bail if draggable and droppable are same element
+
+		if (this.accept.call(this.element[0],(draggable.currentItem || draggable.element))) {
+			if(this.options.hoverClass) this.element.addClass(this.options.hoverClass);
+			this._trigger('over', event, this.ui(draggable));
+		}
+
+	},
+
+	_out: function(event) {
+
+		var draggable = $.ui.ddmanager.current;
+		if (!draggable || (draggable.currentItem || draggable.element)[0] == this.element[0]) return; // Bail if draggable and droppable are same element
+
+		if (this.accept.call(this.element[0],(draggable.currentItem || draggable.element))) {
+			if(this.options.hoverClass) this.element.removeClass(this.options.hoverClass);
+			this._trigger('out', event, this.ui(draggable));
+		}
+
+	},
+
+	_drop: function(event,custom) {
+
+		var draggable = custom || $.ui.ddmanager.current;
+		if (!draggable || (draggable.currentItem || draggable.element)[0] == this.element[0]) return false; // Bail if draggable and droppable are same element
+
+		var childrenIntersection = false;
+		this.element.find(":data(droppable)").not(".ui-draggable-dragging").each(function() {
+			var inst = $.data(this, 'droppable');
+			if(
+				inst.options.greedy
+				&& !inst.options.disabled
+				&& inst.options.scope == draggable.options.scope
+				&& inst.accept.call(inst.element[0], (draggable.currentItem || draggable.element))
+				&& $.ui.intersect(draggable, $.extend(inst, { offset: inst.element.offset() }), inst.options.tolerance)
+			) { childrenIntersection = true; return false; }
+		});
+		if(childrenIntersection) return false;
+
+		if(this.accept.call(this.element[0],(draggable.currentItem || draggable.element))) {
+			if(this.options.activeClass) this.element.removeClass(this.options.activeClass);
+			if(this.options.hoverClass) this.element.removeClass(this.options.hoverClass);
+			this._trigger('drop', event, this.ui(draggable));
+			return this.element;
+		}
+
+		return false;
+
+	},
+
+	ui: function(c) {
+		return {
+			draggable: (c.currentItem || c.element),
+			helper: c.helper,
+			position: c.position,
+			offset: c.positionAbs
+		};
+	}
+
+});
+
+$.extend($.ui.droppable, {
+	version: "1.8.7"
+});
+
+$.ui.intersect = function(draggable, droppable, toleranceMode) {
+
+	if (!droppable.offset) return false;
+
+	var x1 = (draggable.positionAbs || draggable.position.absolute).left, x2 = x1 + draggable.helperProportions.width,
+		y1 = (draggable.positionAbs || draggable.position.absolute).top, y2 = y1 + draggable.helperProportions.height;
+	var l = droppable.offset.left, r = l + droppable.proportions.width,
+		t = droppable.offset.top, b = t + droppable.proportions.height;
+
+	switch (toleranceMode) {
+		case 'fit':
+			return (l <= x1 && x2 <= r
+				&& t <= y1 && y2 <= b);
+			break;
+		case 'intersect':
+			return (l < x1 + (draggable.helperProportions.width / 2) // Right Half
+				&& x2 - (draggable.helperProportions.width / 2) < r // Left Half
+				&& t < y1 + (draggable.helperProportions.height / 2) // Bottom Half
+				&& y2 - (draggable.helperProportions.height / 2) < b ); // Top Half
+			break;
+		case 'pointer':
+			var draggableLeft = ((draggable.positionAbs || draggable.position.absolute).left + (draggable.clickOffset || draggable.offset.click).left),
+				draggableTop = ((draggable.positionAbs || draggable.position.absolute).top + (draggable.clickOffset || draggable.offset.click).top),
+				isOver = $.ui.isOver(draggableTop, draggableLeft, t, l, droppable.proportions.height, droppable.proportions.width);
+			return isOver;
+			break;
+		case 'touch':
+			return (
+					(y1 >= t && y1 <= b) ||	// Top edge touching
+					(y2 >= t && y2 <= b) ||	// Bottom edge touching
+					(y1 < t && y2 > b)		// Surrounded vertically
+				) && (
+					(x1 >= l && x1 <= r) ||	// Left edge touching
+					(x2 >= l && x2 <= r) ||	// Right edge touching
+					(x1 < l && x2 > r)		// Surrounded horizontally
+				);
+			break;
+		default:
+			return false;
+			break;
+		}
+
+};
+
+/*
+	This manager tracks offsets of draggables and droppables
+*/
+$.ui.ddmanager = {
+	current: null,
+	droppables: { 'default': [] },
+	prepareOffsets: function(t, event) {
+
+		var m = $.ui.ddmanager.droppables[t.options.scope] || [];
+		var type = event ? event.type : null; // workaround for #2317
+		var list = (t.currentItem || t.element).find(":data(droppable)").andSelf();
+
+		droppablesLoop: for (var i = 0; i < m.length; i++) {
+
+			if(m[i].options.disabled || (t && !m[i].accept.call(m[i].element[0],(t.currentItem || t.element)))) continue;	//No disabled and non-accepted
+			for (var j=0; j < list.length; j++) { if(list[j] == m[i].element[0]) { m[i].proportions.height = 0; continue droppablesLoop; } }; //Filter out elements in the current dragged item
+			m[i].visible = m[i].element.css("display") != "none"; if(!m[i].visible) continue; 									//If the element is not visible, continue
+
+			m[i].offset = m[i].element.offset();
+			m[i].proportions = { width: m[i].element[0].offsetWidth, height: m[i].element[0].offsetHeight };
+
+			if(type == "mousedown") m[i]._activate.call(m[i], event); //Activate the droppable if used directly from draggables
+
+		}
+
+	},
+	drop: function(draggable, event) {
+
+		var dropped = false;
+		$.each($.ui.ddmanager.droppables[draggable.options.scope] || [], function() {
+
+			if(!this.options) return;
+			if (!this.options.disabled && this.visible && $.ui.intersect(draggable, this, this.options.tolerance))
+				dropped = dropped || this._drop.call(this, event);
+
+			if (!this.options.disabled && this.visible && this.accept.call(this.element[0],(draggable.currentItem || draggable.element))) {
+				this.isout = 1; this.isover = 0;
+				this._deactivate.call(this, event);
+			}
+
+		});
+		return dropped;
+
+	},
+	drag: function(draggable, event) {
+
+		//If you have a highly dynamic page, you might try this option. It renders positions every time you move the mouse.
+		if(draggable.options.refreshPositions) $.ui.ddmanager.prepareOffsets(draggable, event);
+
+		//Run through all droppables and check their positions based on specific tolerance options
+		$.each($.ui.ddmanager.droppables[draggable.options.scope] || [], function() {
+
+			if(this.options.disabled || this.greedyChild || !this.visible) return;
+			var intersects = $.ui.intersect(draggable, this, this.options.tolerance);
+
+			var c = !intersects && this.isover == 1 ? 'isout' : (intersects && this.isover == 0 ? 'isover' : null);
+			if(!c) return;
+
+			var parentInstance;
+			if (this.options.greedy) {
+				var parent = this.element.parents(':data(droppable):eq(0)');
+				if (parent.length) {
+					parentInstance = $.data(parent[0], 'droppable');
+					parentInstance.greedyChild = (c == 'isover' ? 1 : 0);
+				}
+			}
+
+			// we just moved into a greedy child
+			if (parentInstance && c == 'isover') {
+				parentInstance['isover'] = 0;
+				parentInstance['isout'] = 1;
+				parentInstance._out.call(parentInstance, event);
+			}
+
+			this[c] = 1; this[c == 'isout' ? 'isover' : 'isout'] = 0;
+			this[c == "isover" ? "_over" : "_out"].call(this, event);
+
+			// we just moved out of a greedy child
+			if (parentInstance && c == 'isout') {
+				parentInstance['isout'] = 0;
+				parentInstance['isover'] = 1;
+				parentInstance._over.call(parentInstance, event);
+			}
+		});
+
+	}
+};
+
+})(jQuery);
+/*
+ * jQuery UI Resizable 1.8.7
+ *
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Resizables
+ *
+ * Depends:
+ *	jquery.ui.core.js
+ *	jquery.ui.mouse.js
+ *	jquery.ui.widget.js
+ */
+(function( $, undefined ) {
+
+$.widget("ui.resizable", $.ui.mouse, {
+	widgetEventPrefix: "resize",
+	options: {
+		alsoResize: false,
+		animate: false,
+		animateDuration: "slow",
+		animateEasing: "swing",
+		aspectRatio: false,
+		autoHide: false,
+		containment: false,
+		ghost: false,
+		grid: false,
+		handles: "e,s,se",
+		helper: false,
+		maxHeight: null,
+		maxWidth: null,
+		minHeight: 10,
+		minWidth: 10,
+		zIndex: 1000
+	},
+	_create: function() {
+
+		var self = this, o = this.options;
+		this.element.addClass("ui-resizable");
+
+		$.extend(this, {
+			_aspectRatio: !!(o.aspectRatio),
+			aspectRatio: o.aspectRatio,
+			originalElement: this.element,
+			_proportionallyResizeElements: [],
+			_helper: o.helper || o.ghost || o.animate ? o.helper || 'ui-resizable-helper' : null
+		});
+
+		//Wrap the element if it cannot hold child nodes
+		if(this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)) {
+
+			//Opera fix for relative positioning
+			if (/relative/.test(this.element.css('position')) && $.browser.opera)
+				this.element.css({ position: 'relative', top: 'auto', left: 'auto' });
+
+			//Create a wrapper element and set the wrapper to the new current internal element
+			this.element.wrap(
+				$('<div class="ui-wrapper" style="overflow: hidden;"></div>').css({
+					position: this.element.css('position'),
+					width: this.element.outerWidth(),
+					height: this.element.outerHeight(),
+					top: this.element.css('top'),
+					left: this.element.css('left')
+				})
+			);
+
+			//Overwrite the original this.element
+			this.element = this.element.parent().data(
+				"resizable", this.element.data('resizable')
+			);
+
+			this.elementIsWrapper = true;
+
+			//Move margins to the wrapper
+			this.element.css({ marginLeft: this.originalElement.css("marginLeft"), marginTop: this.originalElement.css("marginTop"), marginRight: this.originalElement.css("marginRight"), marginBottom: this.originalElement.css("marginBottom") });
+			this.originalElement.css({ marginLeft: 0, marginTop: 0, marginRight: 0, marginBottom: 0});
+
+			//Prevent Safari textarea resize
+			this.originalResizeStyle = this.originalElement.css('resize');
+			this.originalElement.css('resize', 'none');
+
+			//Push the actual element to our proportionallyResize internal array
+			this._proportionallyResizeElements.push(this.originalElement.css({ position: 'static', zoom: 1, display: 'block' }));
+
+			// avoid IE jump (hard set the margin)
+			this.originalElement.css({ margin: this.originalElement.css('margin') });
+
+			// fix handlers offset
+			this._proportionallyResize();
+
+		}
+
+		this.handles = o.handles || (!$('.ui-resizable-handle', this.element).length ? "e,s,se" : { n: '.ui-resizable-n', e: '.ui-resizable-e', s: '.ui-resizable-s', w: '.ui-resizable-w', se: '.ui-resizable-se', sw: '.ui-resizable-sw', ne: '.ui-resizable-ne', nw: '.ui-resizable-nw' });
+		if(this.handles.constructor == String) {
+
+			if(this.handles == 'all') this.handles = 'n,e,s,w,se,sw,ne,nw';
+			var n = this.handles.split(","); this.handles = {};
+
+			for(var i = 0; i < n.length; i++) {
+
+				var handle = $.trim(n[i]), hname = 'ui-resizable-'+handle;
+				var axis = $('<div class="ui-resizable-handle ' + hname + '"></div>');
+
+				// increase zIndex of sw, se, ne, nw axis
+				//TODO : this modifies original option
+				if(/sw|se|ne|nw/.test(handle)) axis.css({ zIndex: ++o.zIndex });
+
+				//TODO : What's going on here?
+				if ('se' == handle) {
+					axis.addClass('ui-icon ui-icon-gripsmall-diagonal-se');
+				};
+
+				//Insert into internal handles object and append to element
+				this.handles[handle] = '.ui-resizable-'+handle;
+				this.element.append(axis);
+			}
+
+		}
+
+		this._renderAxis = function(target) {
+
+			target = target || this.element;
+
+			for(var i in this.handles) {
+
+				if(this.handles[i].constructor == String)
+					this.handles[i] = $(this.handles[i], this.element).show();
+
+				//Apply pad to wrapper element, needed to fix axis position (textarea, inputs, scrolls)
+				if (this.elementIsWrapper && this.originalElement[0].nodeName.match(/textarea|input|select|button/i)) {
+
+					var axis = $(this.handles[i], this.element), padWrapper = 0;
+
+					//Checking the correct pad and border
+					padWrapper = /sw|ne|nw|se|n|s/.test(i) ? axis.outerHeight() : axis.outerWidth();
+
+					//The padding type i have to apply...
+					var padPos = [ 'padding',
+						/ne|nw|n/.test(i) ? 'Top' :
+						/se|sw|s/.test(i) ? 'Bottom' :
+						/^e$/.test(i) ? 'Right' : 'Left' ].join("");
+
+					target.css(padPos, padWrapper);
+
+					this._proportionallyResize();
+
+				}
+
+				//TODO: What's that good for? There's not anything to be executed left
+				if(!$(this.handles[i]).length)
+					continue;
+
+			}
+		};
+
+		//TODO: make renderAxis a prototype function
+		this._renderAxis(this.element);
+
+		this._handles = $('.ui-resizable-handle', this.element)
+			.disableSelection();
+
+		//Matching axis name
+		this._handles.mouseover(function() {
+			if (!self.resizing) {
+				if (this.className)
+					var axis = this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i);
+				//Axis, default = se
+				self.axis = axis && axis[1] ? axis[1] : 'se';
+			}
+		});
+
+		//If we want to auto hide the elements
+		if (o.autoHide) {
+			this._handles.hide();
+			$(this.element)
+				.addClass("ui-resizable-autohide")
+				.hover(function() {
+					$(this).removeClass("ui-resizable-autohide");
+					self._handles.show();
+				},
+				function(){
+					if (!self.resizing) {
+						$(this).addClass("ui-resizable-autohide");
+						self._handles.hide();
+					}
+				});
+		}
+
+		//Initialize the mouse interaction
+		this._mouseInit();
+
+	},
+
+	destroy: function() {
+
+		this._mouseDestroy();
+
+		var _destroy = function(exp) {
+			$(exp).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing")
+				.removeData("resizable").unbind(".resizable").find('.ui-resizable-handle').remove();
+		};
+
+		//TODO: Unwrap at same DOM position
+		if (this.elementIsWrapper) {
+			_destroy(this.element);
+			var wrapper = this.element;
+			wrapper.after(
+				this.originalElement.css({
+					position: wrapper.css('position'),
+					width: wrapper.outerWidth(),
+					height: wrapper.outerHeight(),
+					top: wrapper.css('top'),
+					left: wrapper.css('left')
+				})
+			).remove();
+		}
+
+		this.originalElement.css('resize', this.originalResizeStyle);
+		_destroy(this.originalElement);
+
+		return this;
+	},
+
+	_mouseCapture: function(event) {
+		var handle = false;
+		for (var i in this.handles) {
+			if ($(this.handles[i])[0] == event.target) {
+				handle = true;
+			}
+		}
+
+		return !this.options.disabled && handle;
+	},
+
+	_mouseStart: function(event) {
+
+		var o = this.options, iniPos = this.element.position(), el = this.element;
+
+		this.resizing = true;
+		this.documentScroll = { top: $(document).scrollTop(), left: $(document).scrollLeft() };
+
+		// bugfix for http://dev.jquery.com/ticket/1749
+		if (el.is('.ui-draggable') || (/absolute/).test(el.css('position'))) {
+			el.css({ position: 'absolute', top: iniPos.top, left: iniPos.left });
+		}
+
+		//Opera fixing relative position
+		if ($.browser.opera && (/relative/).test(el.css('position')))
+			el.css({ position: 'relative', top: 'auto', left: 'auto' });
+
+		this._renderProxy();
+
+		var curleft = num(this.helper.css('left')), curtop = num(this.helper.css('top'));
+
+		if (o.containment) {
+			curleft += $(o.containment).scrollLeft() || 0;
+			curtop += $(o.containment).scrollTop() || 0;
+		}
+
+		//Store needed variables
+		this.offset = this.helper.offset();
+		this.position = { left: curleft, top: curtop };
+		this.size = this._helper ? { width: el.outerWidth(), height: el.outerHeight() } : { width: el.width(), height: el.height() };
+		this.originalSize = this._helper ? { width: el.outerWidth(), height: el.outerHeight() } : { width: el.width(), height: el.height() };
+		this.originalPosition = { left: curleft, top: curtop };
+		this.sizeDiff = { width: el.outerWidth() - el.width(), height: el.outerHeight() - el.height() };
+		this.originalMousePosition = { left: event.pageX, top: event.pageY };
+
+		//Aspect Ratio
+		this.aspectRatio = (typeof o.aspectRatio == 'number') ? o.aspectRatio : ((this.originalSize.width / this.originalSize.height) || 1);
+
+	    var cursor = $('.ui-resizable-' + this.axis).css('cursor');
+	    $('body').css('cursor', cursor == 'auto' ? this.axis + '-resize' : cursor);
+
+		el.addClass("ui-resizable-resizing");
+		this._propagate("start", event);
+		return true;
+	},
+
+	_mouseDrag: function(event) {
+
+		//Increase performance, avoid regex
+		var el = this.helper, o = this.options, props = {},
+			self = this, smp = this.originalMousePosition, a = this.axis;
+
+		var dx = (event.pageX-smp.left)||0, dy = (event.pageY-smp.top)||0;
+		var trigger = this._change[a];
+		if (!trigger) return false;
+
+		// Calculate the attrs that will be change
+		var data = trigger.apply(this, [event, dx, dy]), ie6 = $.browser.msie && $.browser.version < 7, csdif = this.sizeDiff;
+
+		if (this._aspectRatio || event.shiftKey)
+			data = this._updateRatio(data, event);
+
+		data = this._respectSize(data, event);
+
+		// plugins callbacks need to be called first
+		this._propagate("resize", event);
+
+		el.css({
+			top: this.position.top + "px", left: this.position.left + "px",
+			width: this.size.width + "px", height: this.size.height + "px"
+		});
+
+		if (!this._helper && this._proportionallyResizeElements.length)
+			this._proportionallyResize();
+
+		this._updateCache(data);
+
+		// calling the user callback at the end
+		this._trigger('resize', event, this.ui());
+
+		return false;
+	},
+
+	_mouseStop: function(event) {
+
+		this.resizing = false;
+		var o = this.options, self = this;
+
+		if(this._helper) {
+			var pr = this._proportionallyResizeElements, ista = pr.length && (/textarea/i).test(pr[0].nodeName),
+						soffseth = ista && $.ui.hasScroll(pr[0], 'left') /* TODO - jump height */ ? 0 : self.sizeDiff.height,
+							soffsetw = ista ? 0 : self.sizeDiff.width;
+
+			var s = { width: (self.size.width - soffsetw), height: (self.size.height - soffseth) },
+				left = (parseInt(self.element.css('left'), 10) + (self.position.left - self.originalPosition.left)) || null,
+				top = (parseInt(self.element.css('top'), 10) + (self.position.top - self.originalPosition.top)) || null;
+
+			if (!o.animate)
+				this.element.css($.extend(s, { top: top, left: left }));
+
+			self.helper.height(self.size.height);
+			self.helper.width(self.size.width);
+
+			if (this._helper && !o.animate) this._proportionallyResize();
+		}
+
+		$('body').css('cursor', 'auto');
+
+		this.element.removeClass("ui-resizable-resizing");
+
+		this._propagate("stop", event);
+
+		if (this._helper) this.helper.remove();
+		return false;
+
+	},
+
+	_updateCache: function(data) {
+		var o = this.options;
+		this.offset = this.helper.offset();
+		if (isNumber(data.left)) this.position.left = data.left;
+		if (isNumber(data.top)) this.position.top = data.top;
+		if (isNumber(data.height)) this.size.height = data.height;
+		if (isNumber(data.width)) this.size.width = data.width;
+	},
+
+	_updateRatio: function(data, event) {
+
+		var o = this.options, cpos = this.position, csize = this.size, a = this.axis;
+
+		if (data.height) data.width = (csize.height * this.aspectRatio);
+		else if (data.width) data.height = (csize.width / this.aspectRatio);
+
+		if (a == 'sw') {
+			data.left = cpos.left + (csize.width - data.width);
+			data.top = null;
+		}
+		if (a == 'nw') {
+			data.top = cpos.top + (csize.height - data.height);
+			data.left = cpos.left + (csize.width - data.width);
+		}
+
+		return data;
+	},
+
+	_respectSize: function(data, event) {
+
+		var el = this.helper, o = this.options, pRatio = this._aspectRatio || event.shiftKey, a = this.axis,
+				ismaxw = isNumber(data.width) && o.maxWidth && (o.maxWidth < data.width), ismaxh = isNumber(data.height) && o.maxHeight && (o.maxHeight < data.height),
+					isminw = isNumber(data.width) && o.minWidth && (o.minWidth > data.width), isminh = isNumber(data.height) && o.minHeight && (o.minHeight > data.height);
+
+		if (isminw) data.width = o.minWidth;
+		if (isminh) data.height = o.minHeight;
+		if (ismaxw) data.width = o.maxWidth;
+		if (ismaxh) data.height = o.maxHeight;
+
+		var dw = this.originalPosition.left + this.originalSize.width, dh = this.position.top + this.size.height;
+		var cw = /sw|nw|w/.test(a), ch = /nw|ne|n/.test(a);
+
+		if (isminw && cw) data.left = dw - o.minWidth;
+		if (ismaxw && cw) data.left = dw - o.maxWidth;
+		if (isminh && ch)	data.top = dh - o.minHeight;
+		if (ismaxh && ch)	data.top = dh - o.maxHeight;
+
+		// fixing jump error on top/left - bug #2330
+		var isNotwh = !data.width && !data.height;
+		if (isNotwh && !data.left && data.top) data.top = null;
+		else if (isNotwh && !data.top && data.left) data.left = null;
+
+		return data;
+	},
+
+	_proportionallyResize: function() {
+
+		var o = this.options;
+		if (!this._proportionallyResizeElements.length) return;
+		var element = this.helper || this.element;
+
+		for (var i=0; i < this._proportionallyResizeElements.length; i++) {
+
+			var prel = this._proportionallyResizeElements[i];
+
+			if (!this.borderDif) {
+				var b = [prel.css('borderTopWidth'), prel.css('borderRightWidth'), prel.css('borderBottomWidth'), prel.css('borderLeftWidth')],
+					p = [prel.css('paddingTop'), prel.css('paddingRight'), prel.css('paddingBottom'), prel.css('paddingLeft')];
+
+				this.borderDif = $.map(b, function(v, i) {
+					var border = parseInt(v,10)||0, padding = parseInt(p[i],10)||0;
+					return border + padding;
+				});
+			}
+
+			if ($.browser.msie && !(!($(element).is(':hidden') || $(element).parents(':hidden').length)))
+				continue;
+
+			prel.css({
+				height: (element.height() - this.borderDif[0] - this.borderDif[2]) || 0,
+				width: (element.width() - this.borderDif[1] - this.borderDif[3]) || 0
+			});
+
+		};
+
+	},
+
+	_renderProxy: function() {
+
+		var el = this.element, o = this.options;
+		this.elementOffset = el.offset();
+
+		if(this._helper) {
+
+			this.helper = this.helper || $('<div style="overflow:hidden;"></div>');
+
+			// fix ie6 offset TODO: This seems broken
+			var ie6 = $.browser.msie && $.browser.version < 7, ie6offset = (ie6 ? 1 : 0),
+			pxyoffset = ( ie6 ? 2 : -1 );
+
+			this.helper.addClass(this._helper).css({
+				width: this.element.outerWidth() + pxyoffset,
+				height: this.element.outerHeight() + pxyoffset,
+				position: 'absolute',
+				left: this.elementOffset.left - ie6offset +'px',
+				top: this.elementOffset.top - ie6offset +'px',
+				zIndex: ++o.zIndex //TODO: Don't modify option
+			});
+
+			this.helper
+				.appendTo("body")
+				.disableSelection();
+
+		} else {
+			this.helper = this.element;
+		}
+
+	},
+
+	_change: {
+		e: function(event, dx, dy) {
+			return { width: this.originalSize.width + dx };
+		},
+		w: function(event, dx, dy) {
+			var o = this.options, cs = this.originalSize, sp = this.originalPosition;
+			return { left: sp.left + dx, width: cs.width - dx };
+		},
+		n: function(event, dx, dy) {
+			var o = this.options, cs = this.originalSize, sp = this.originalPosition;
+			return { top: sp.top + dy, height: cs.height - dy };
+		},
+		s: function(event, dx, dy) {
+			return { height: this.originalSize.height + dy };
+		},
+		se: function(event, dx, dy) {
+			return $.extend(this._change.s.apply(this, arguments), this._change.e.apply(this, [event, dx, dy]));
+		},
+		sw: function(event, dx, dy) {
+			return $.extend(this._change.s.apply(this, arguments), this._change.w.apply(this, [event, dx, dy]));
+		},
+		ne: function(event, dx, dy) {
+			return $.extend(this._change.n.apply(this, arguments), this._change.e.apply(this, [event, dx, dy]));
+		},
+		nw: function(event, dx, dy) {
+			return $.extend(this._change.n.apply(this, arguments), this._change.w.apply(this, [event, dx, dy]));
+		}
+	},
+
+	_propagate: function(n, event) {
+		$.ui.plugin.call(this, n, [event, this.ui()]);
+		(n != "resize" && this._trigger(n, event, this.ui()));
+	},
+
+	plugins: {},
+
+	ui: function() {
+		return {
+			originalElement: this.originalElement,
+			element: this.element,
+			helper: this.helper,
+			position: this.position,
+			size: this.size,
+			originalSize: this.originalSize,
+			originalPosition: this.originalPosition
+		};
+	}
+
+});
+
+$.extend($.ui.resizable, {
+	version: "1.8.7"
+});
+
+/*
+ * Resizable Extensions
+ */
+
+$.ui.plugin.add("resizable", "alsoResize", {
+
+	start: function (event, ui) {
+		var self = $(this).data("resizable"), o = self.options;
+
+		var _store = function (exp) {
+			$(exp).each(function() {
+				var el = $(this);
+				el.data("resizable-alsoresize", {
+					width: parseInt(el.width(), 10), height: parseInt(el.height(), 10),
+					left: parseInt(el.css('left'), 10), top: parseInt(el.css('top'), 10),
+					position: el.css('position') // to reset Opera on stop()
+				});
+			});
+		};
+
+		if (typeof(o.alsoResize) == 'object' && !o.alsoResize.parentNode) {
+			if (o.alsoResize.length) { o.alsoResize = o.alsoResize[0]; _store(o.alsoResize); }
+			else { $.each(o.alsoResize, function (exp) { _store(exp); }); }
+		}else{
+			_store(o.alsoResize);
+		}
+	},
+
+	resize: function (event, ui) {
+		var self = $(this).data("resizable"), o = self.options, os = self.originalSize, op = self.originalPosition;
+
+		var delta = {
+			height: (self.size.height - os.height) || 0, width: (self.size.width - os.width) || 0,
+			top: (self.position.top - op.top) || 0, left: (self.position.left - op.left) || 0
+		},
+
+		_alsoResize = function (exp, c) {
+			$(exp).each(function() {
+				var el = $(this), start = $(this).data("resizable-alsoresize"), style = {}, 
+					css = c && c.length ? c : el.parents(ui.originalElement[0]).length ? ['width', 'height'] : ['width', 'height', 'top', 'left'];
+
+				$.each(css, function (i, prop) {
+					var sum = (start[prop]||0) + (delta[prop]||0);
+					if (sum && sum >= 0)
+						style[prop] = sum || null;
+				});
+
+				// Opera fixing relative position
+				if ($.browser.opera && /relative/.test(el.css('position'))) {
+					self._revertToRelativePosition = true;
+					el.css({ position: 'absolute', top: 'auto', left: 'auto' });
+				}
+
+				el.css(style);
+			});
+		};
+
+		if (typeof(o.alsoResize) == 'object' && !o.alsoResize.nodeType) {
+			$.each(o.alsoResize, function (exp, c) { _alsoResize(exp, c); });
+		}else{
+			_alsoResize(o.alsoResize);
+		}
+	},
+
+	stop: function (event, ui) {
+		var self = $(this).data("resizable"), o = self.options;
+
+		var _reset = function (exp) {
+			$(exp).each(function() {
+				var el = $(this);
+				// reset position for Opera - no need to verify it was changed
+				el.css({ position: el.data("resizable-alsoresize").position });
+			});
+		};
+
+		if (self._revertToRelativePosition) {
+			self._revertToRelativePosition = false;
+			if (typeof(o.alsoResize) == 'object' && !o.alsoResize.nodeType) {
+				$.each(o.alsoResize, function (exp) { _reset(exp); });
+			}else{
+				_reset(o.alsoResize);
+			}
+		}
+
+		$(this).removeData("resizable-alsoresize");
+	}
+});
+
+$.ui.plugin.add("resizable", "animate", {
+
+	stop: function(event, ui) {
+		var self = $(this).data("resizable"), o = self.options;
+
+		var pr = self._proportionallyResizeElements, ista = pr.length && (/textarea/i).test(pr[0].nodeName),
+					soffseth = ista && $.ui.hasScroll(pr[0], 'left') /* TODO - jump height */ ? 0 : self.sizeDiff.height,
+						soffsetw = ista ? 0 : self.sizeDiff.width;
+
+		var style = { width: (self.size.width - soffsetw), height: (self.size.height - soffseth) },
+					left = (parseInt(self.element.css('left'), 10) + (self.position.left - self.originalPosition.left)) || null,
+						top = (parseInt(self.element.css('top'), 10) + (self.position.top - self.originalPosition.top)) || null;
+
+		self.element.animate(
+			$.extend(style, top && left ? { top: top, left: left } : {}), {
+				duration: o.animateDuration,
+				easing: o.animateEasing,
+				step: function() {
+
+					var data = {
+						width: parseInt(self.element.css('width'), 10),
+						height: parseInt(self.element.css('height'), 10),
+						top: parseInt(self.element.css('top'), 10),
+						left: parseInt(self.element.css('left'), 10)
+					};
+
+					if (pr && pr.length) $(pr[0]).css({ width: data.width, height: data.height });
+
+					// propagating resize, and updating values for each animation step
+					self._updateCache(data);
+					self._propagate("resize", event);
+
+				}
+			}
+		);
+	}
+
+});
+
+$.ui.plugin.add("resizable", "containment", {
+
+	start: function(event, ui) {
+		var self = $(this).data("resizable"), o = self.options, el = self.element;
+		var oc = o.containment,	ce = (oc instanceof $) ? oc.get(0) : (/parent/.test(oc)) ? el.parent().get(0) : oc;
+		if (!ce) return;
+
+		self.containerElement = $(ce);
+
+		if (/document/.test(oc) || oc == document) {
+			self.containerOffset = { left: 0, top: 0 };
+			self.containerPosition = { left: 0, top: 0 };
+
+			self.parentData = {
+				element: $(document), left: 0, top: 0,
+				width: $(document).width(), height: $(document).height() || document.body.parentNode.scrollHeight
+			};
+		}
+
+		// i'm a node, so compute top, left, right, bottom
+		else {
+			var element = $(ce), p = [];
+			$([ "Top", "Right", "Left", "Bottom" ]).each(function(i, name) { p[i] = num(element.css("padding" + name)); });
+
+			self.containerOffset = element.offset();
+			self.containerPosition = element.position();
+			self.containerSize = { height: (element.innerHeight() - p[3]), width: (element.innerWidth() - p[1]) };
+
+			var co = self.containerOffset, ch = self.containerSize.height,	cw = self.containerSize.width,
+						width = ($.ui.hasScroll(ce, "left") ? ce.scrollWidth : cw ), height = ($.ui.hasScroll(ce) ? ce.scrollHeight : ch);
+
+			self.parentData = {
+				element: ce, left: co.left, top: co.top, width: width, height: height
+			};
+		}
+	},
+
+	resize: function(event, ui) {
+		var self = $(this).data("resizable"), o = self.options,
+				ps = self.containerSize, co = self.containerOffset, cs = self.size, cp = self.position,
+				pRatio = self._aspectRatio || event.shiftKey, cop = { top:0, left:0 }, ce = self.containerElement;
+
+		if (ce[0] != document && (/static/).test(ce.css('position'))) cop = co;
+
+		if (cp.left < (self._helper ? co.left : 0)) {
+			self.size.width = self.size.width + (self._helper ? (self.position.left - co.left) : (self.position.left - cop.left));
+			if (pRatio) self.size.height = self.size.width / o.aspectRatio;
+			self.position.left = o.helper ? co.left : 0;
+		}
+
+		if (cp.top < (self._helper ? co.top : 0)) {
+			self.size.height = self.size.height + (self._helper ? (self.position.top - co.top) : self.position.top);
+			if (pRatio) self.size.width = self.size.height * o.aspectRatio;
+			self.position.top = self._helper ? co.top : 0;
+		}
+
+		self.offset.left = self.parentData.left+self.position.left;
+		self.offset.top = self.parentData.top+self.position.top;
+
+		var woset = Math.abs( (self._helper ? self.offset.left - cop.left : (self.offset.left - cop.left)) + self.sizeDiff.width ),
+					hoset = Math.abs( (self._helper ? self.offset.top - cop.top : (self.offset.top - co.top)) + self.sizeDiff.height );
+
+		var isParent = self.containerElement.get(0) == self.element.parent().get(0),
+		    isOffsetRelative = /relative|absolute/.test(self.containerElement.css('position'));
+
+		if(isParent && isOffsetRelative) woset -= self.parentData.left;
+
+		if (woset + self.size.width >= self.parentData.width) {
+			self.size.width = self.parentData.width - woset;
+			if (pRatio) self.size.height = self.size.width / self.aspectRatio;
+		}
+
+		if (hoset + self.size.height >= self.parentData.height) {
+			self.size.height = self.parentData.height - hoset;
+			if (pRatio) self.size.width = self.size.height * self.aspectRatio;
+		}
+	},
+
+	stop: function(event, ui){
+		var self = $(this).data("resizable"), o = self.options, cp = self.position,
+				co = self.containerOffset, cop = self.containerPosition, ce = self.containerElement;
+
+		var helper = $(self.helper), ho = helper.offset(), w = helper.outerWidth() - self.sizeDiff.width, h = helper.outerHeight() - self.sizeDiff.height;
+
+		if (self._helper && !o.animate && (/relative/).test(ce.css('position')))
+			$(this).css({ left: ho.left - cop.left - co.left, width: w, height: h });
+
+		if (self._helper && !o.animate && (/static/).test(ce.css('position')))
+			$(this).css({ left: ho.left - cop.left - co.left, width: w, height: h });
+
+	}
+});
+
+$.ui.plugin.add("resizable", "ghost", {
+
+	start: function(event, ui) {
+
+		var self = $(this).data("resizable"), o = self.options, cs = self.size;
+
+		self.ghost = self.originalElement.clone();
+		self.ghost
+			.css({ opacity: .25, display: 'block', position: 'relative', height: cs.height, width: cs.width, margin: 0, left: 0, top: 0 })
+			.addClass('ui-resizable-ghost')
+			.addClass(typeof o.ghost == 'string' ? o.ghost : '');
+
+		self.ghost.appendTo(self.helper);
+
+	},
+
+	resize: function(event, ui){
+		var self = $(this).data("resizable"), o = self.options;
+		if (self.ghost) self.ghost.css({ position: 'relative', height: self.size.height, width: self.size.width });
+	},
+
+	stop: function(event, ui){
+		var self = $(this).data("resizable"), o = self.options;
+		if (self.ghost && self.helper) self.helper.get(0).removeChild(self.ghost.get(0));
+	}
+
+});
+
+$.ui.plugin.add("resizable", "grid", {
+
+	resize: function(event, ui) {
+		var self = $(this).data("resizable"), o = self.options, cs = self.size, os = self.originalSize, op = self.originalPosition, a = self.axis, ratio = o._aspectRatio || event.shiftKey;
+		o.grid = typeof o.grid == "number" ? [o.grid, o.grid] : o.grid;
+		var ox = Math.round((cs.width - os.width) / (o.grid[0]||1)) * (o.grid[0]||1), oy = Math.round((cs.height - os.height) / (o.grid[1]||1)) * (o.grid[1]||1);
+
+		if (/^(se|s|e)$/.test(a)) {
+			self.size.width = os.width + ox;
+			self.size.height = os.height + oy;
+		}
+		else if (/^(ne)$/.test(a)) {
+			self.size.width = os.width + ox;
+			self.size.height = os.height + oy;
+			self.position.top = op.top - oy;
+		}
+		else if (/^(sw)$/.test(a)) {
+			self.size.width = os.width + ox;
+			self.size.height = os.height + oy;
+			self.position.left = op.left - ox;
+		}
+		else {
+			self.size.width = os.width + ox;
+			self.size.height = os.height + oy;
+			self.position.top = op.top - oy;
+			self.position.left = op.left - ox;
+		}
+	}
+
+});
+
+var num = function(v) {
+	return parseInt(v, 10) || 0;
+};
+
+var isNumber = function(value) {
+	return !isNaN(parseInt(value, 10));
+};
+
+})(jQuery);
+/*
+ * jQuery UI Selectable 1.8.7
+ *
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Selectables
+ *
+ * Depends:
+ *	jquery.ui.core.js
+ *	jquery.ui.mouse.js
+ *	jquery.ui.widget.js
+ */
+(function( $, undefined ) {
+
+$.widget("ui.selectable", $.ui.mouse, {
+	options: {
+		appendTo: 'body',
+		autoRefresh: true,
+		distance: 0,
+		filter: '*',
+		tolerance: 'touch'
+	},
+	_create: function() {
+		var self = this;
+
+		this.element.addClass("ui-selectable");
+
+		this.dragged = false;
+
+		// cache selectee children based on filter
+		var selectees;
+		this.refresh = function() {
+			selectees = $(self.options.filter, self.element[0]);
+			selectees.each(function() {
+				var $this = $(this);
+				var pos = $this.offset();
+				$.data(this, "selectable-item", {
+					element: this,
+					$element: $this,
+					left: pos.left,
+					top: pos.top,
+					right: pos.left + $this.outerWidth(),
+					bottom: pos.top + $this.outerHeight(),
+					startselected: false,
+					selected: $this.hasClass('ui-selected'),
+					selecting: $this.hasClass('ui-selecting'),
+					unselecting: $this.hasClass('ui-unselecting')
+				});
+			});
+		};
+		this.refresh();
+
+		this.selectees = selectees.addClass("ui-selectee");
+
+		this._mouseInit();
+
+		this.helper = $("<div class='ui-selectable-helper'></div>");
+	},
+
+	destroy: function() {
+		this.selectees
+			.removeClass("ui-selectee")
+			.removeData("selectable-item");
+		this.element
+			.removeClass("ui-selectable ui-selectable-disabled")
+			.removeData("selectable")
+			.unbind(".selectable");
+		this._mouseDestroy();
+
+		return this;
+	},
+
+	_mouseStart: function(event) {
+		var self = this;
+
+		this.opos = [event.pageX, event.pageY];
+
+		if (this.options.disabled)
+			return;
+
+		var options = this.options;
+
+		this.selectees = $(options.filter, this.element[0]);
+
+		this._trigger("start", event);
+
+		$(options.appendTo).append(this.helper);
+		// position helper (lasso)
+		this.helper.css({
+			"left": event.clientX,
+			"top": event.clientY,
+			"width": 0,
+			"height": 0
+		});
+
+		if (options.autoRefresh) {
+			this.refresh();
+		}
+
+		this.selectees.filter('.ui-selected').each(function() {
+			var selectee = $.data(this, "selectable-item");
+			selectee.startselected = true;
+			if (!event.metaKey) {
+				selectee.$element.removeClass('ui-selected');
+				selectee.selected = false;
+				selectee.$element.addClass('ui-unselecting');
+				selectee.unselecting = true;
+				// selectable UNSELECTING callback
+				self._trigger("unselecting", event, {
+					unselecting: selectee.element
+				});
+			}
+		});
+
+		$(event.target).parents().andSelf().each(function() {
+			var selectee = $.data(this, "selectable-item");
+			if (selectee) {
+				var doSelect = !event.metaKey || !selectee.$element.hasClass('ui-selected');
+				selectee.$element
+					.removeClass(doSelect ? "ui-unselecting" : "ui-selected")
+					.addClass(doSelect ? "ui-selecting" : "ui-unselecting");
+				selectee.unselecting = !doSelect;
+				selectee.selecting = doSelect;
+				selectee.selected = doSelect;
+				// selectable (UN)SELECTING callback
+				if (doSelect) {
+					self._trigger("selecting", event, {
+						selecting: selectee.element
+					});
+				} else {
+					self._trigger("unselecting", event, {
+						unselecting: selectee.element
+					});
+				}
+				return false;
+			}
+		});
+
+	},
+
+	_mouseDrag: function(event) {
+		var self = this;
+		this.dragged = true;
+
+		if (this.options.disabled)
+			return;
+
+		var options = this.options;
+
+		var x1 = this.opos[0], y1 = this.opos[1], x2 = event.pageX, y2 = event.pageY;
+		if (x1 > x2) { var tmp = x2; x2 = x1; x1 = tmp; }
+		if (y1 > y2) { var tmp = y2; y2 = y1; y1 = tmp; }
+		this.helper.css({left: x1, top: y1, width: x2-x1, height: y2-y1});
+
+		this.selectees.each(function() {
+			var selectee = $.data(this, "selectable-item");
+			//prevent helper from being selected if appendTo: selectable
+			if (!selectee || selectee.element == self.element[0])
+				return;
+			var hit = false;
+			if (options.tolerance == 'touch') {
+				hit = ( !(selectee.left > x2 || selectee.right < x1 || selectee.top > y2 || selectee.bottom < y1) );
+			} else if (options.tolerance == 'fit') {
+				hit = (selectee.left > x1 && selectee.right < x2 && selectee.top > y1 && selectee.bottom < y2);
+			}
+
+			if (hit) {
+				// SELECT
+				if (selectee.selected) {
+					selectee.$element.removeClass('ui-selected');
+					selectee.selected = false;
+				}
+				if (selectee.unselecting) {
+					selectee.$element.removeClass('ui-unselecting');
+					selectee.unselecting = false;
+				}
+				if (!selectee.selecting) {
+					selectee.$element.addClass('ui-selecting');
+					selectee.selecting = true;
+					// selectable SELECTING callback
+					self._trigger("selecting", event, {
+						selecting: selectee.element
+					});
+				}
+			} else {
+				// UNSELECT
+				if (selectee.selecting) {
+					if (event.metaKey && selectee.startselected) {
+						selectee.$element.removeClass('ui-selecting');
+						selectee.selecting = false;
+						selectee.$element.addClass('ui-selected');
+						selectee.selected = true;
+					} else {
+						selectee.$element.removeClass('ui-selecting');
+						selectee.selecting = false;
+						if (selectee.startselected) {
+							selectee.$element.addClass('ui-unselecting');
+							selectee.unselecting = true;
+						}
+						// selectable UNSELECTING callback
+						self._trigger("unselecting", event, {
+							unselecting: selectee.element
+						});
+					}
+				}
+				if (selectee.selected) {
+					if (!event.metaKey && !selectee.startselected) {
+						selectee.$element.removeClass('ui-selected');
+						selectee.selected = false;
+
+						selectee.$element.addClass('ui-unselecting');
+						selectee.unselecting = true;
+						// selectable UNSELECTING callback
+						self._trigger("unselecting", event, {
+							unselecting: selectee.element
+						});
+					}
+				}
+			}
+		});
+
+		return false;
+	},
+
+	_mouseStop: function(event) {
+		var self = this;
+
+		this.dragged = false;
+
+		var options = this.options;
+
+		$('.ui-unselecting', this.element[0]).each(function() {
+			var selectee = $.data(this, "selectable-item");
+			selectee.$element.removeClass('ui-unselecting');
+			selectee.unselecting = false;
+			selectee.startselected = false;
+			self._trigger("unselected", event, {
+				unselected: selectee.element
+			});
+		});
+		$('.ui-selecting', this.element[0]).each(function() {
+			var selectee = $.data(this, "selectable-item");
+			selectee.$element.removeClass('ui-selecting').addClass('ui-selected');
+			selectee.selecting = false;
+			selectee.selected = true;
+			selectee.startselected = true;
+			self._trigger("selected", event, {
+				selected: selectee.element
+			});
+		});
+		this._trigger("stop", event);
+
+		this.helper.remove();
+
+		return false;
+	}
+
+});
+
+$.extend($.ui.selectable, {
+	version: "1.8.7"
+});
+
+})(jQuery);
+/*
+ * jQuery UI Sortable 1.8.7
+ *
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Sortables
+ *
+ * Depends:
+ *	jquery.ui.core.js
+ *	jquery.ui.mouse.js
+ *	jquery.ui.widget.js
+ */
+(function( $, undefined ) {
+
+$.widget("ui.sortable", $.ui.mouse, {
+	widgetEventPrefix: "sort",
+	options: {
+		appendTo: "parent",
+		axis: false,
+		connectWith: false,
+		containment: false,
+		cursor: 'auto',
+		cursorAt: false,
+		dropOnEmpty: true,
+		forcePlaceholderSize: false,
+		forceHelperSize: false,
+		grid: false,
+		handle: false,
+		helper: "original",
+		items: '> *',
+		opacity: false,
+		placeholder: false,
+		revert: false,
+		scroll: true,
+		scrollSensitivity: 20,
+		scrollSpeed: 20,
+		scope: "default",
+		tolerance: "intersect",
+		zIndex: 1000
+	},
+	_create: function() {
+
+		var o = this.options;
+		this.containerCache = {};
+		this.element.addClass("ui-sortable");
+
+		//Get the items
+		this.refresh();
+
+		//Let's determine if the items are floating
+		this.floating = this.items.length ? (/left|right/).test(this.items[0].item.css('float')) : false;
+
+		//Let's determine the parent's offset
+		this.offset = this.element.offset();
+
+		//Initialize mouse events for interaction
+		this._mouseInit();
+
+	},
+
+	destroy: function() {
+		this.element
+			.removeClass("ui-sortable ui-sortable-disabled")
+			.removeData("sortable")
+			.unbind(".sortable");
+		this._mouseDestroy();
+
+		for ( var i = this.items.length - 1; i >= 0; i-- )
+			this.items[i].item.removeData("sortable-item");
+
+		return this;
+	},
+
+	_setOption: function(key, value){
+		if ( key === "disabled" ) {
+			this.options[ key ] = value;
+	
+			this.widget()
+				[ value ? "addClass" : "removeClass"]( "ui-sortable-disabled" );
+		} else {
+			// Don't call widget base _setOption for disable as it adds ui-state-disabled class
+			$.Widget.prototype._setOption.apply(this, arguments);
+		}
+	},
+
+	_mouseCapture: function(event, overrideHandle) {
+
+		if (this.reverting) {
+			return false;
+		}
+
+		if(this.options.disabled || this.options.type == 'static') return false;
+
+		//We have to refresh the items data once first
+		this._refreshItems(event);
+
+		//Find out if the clicked node (or one of its parents) is a actual item in this.items
+		var currentItem = null, self = this, nodes = $(event.target).parents().each(function() {
+			if($.data(this, 'sortable-item') == self) {
+				currentItem = $(this);
+				return false;
+			}
+		});
+		if($.data(event.target, 'sortable-item') == self) currentItem = $(event.target);
+
+		if(!currentItem) return false;
+		if(this.options.handle && !overrideHandle) {
+			var validHandle = false;
+
+			$(this.options.handle, currentItem).find("*").andSelf().each(function() { if(this == event.target) validHandle = true; });
+			if(!validHandle) return false;
+		}
+
+		this.currentItem = currentItem;
+		this._removeCurrentsFromItems();
+		return true;
+
+	},
+
+	_mouseStart: function(event, overrideHandle, noActivation) {
+
+		var o = this.options, self = this;
+		this.currentContainer = this;
+
+		//We only need to call refreshPositions, because the refreshItems call has been moved to mouseCapture
+		this.refreshPositions();
+
+		//Create and append the visible helper
+		this.helper = this._createHelper(event);
+
+		//Cache the helper size
+		this._cacheHelperProportions();
+
+		/*
+		 * - Position generation -
+		 * This block generates everything position related - it's the core of draggables.
+		 */
+
+		//Cache the margins of the original element
+		this._cacheMargins();
+
+		//Get the next scrolling parent
+		this.scrollParent = this.helper.scrollParent();
+
+		//The element's absolute position on the page minus margins
+		this.offset = this.currentItem.offset();
+		this.offset = {
+			top: this.offset.top - this.margins.top,
+			left: this.offset.left - this.margins.left
+		};
+
+		// Only after we got the offset, we can change the helper's position to absolute
+		// TODO: Still need to figure out a way to make relative sorting possible
+		this.helper.css("position", "absolute");
+		this.cssPosition = this.helper.css("position");
+
+		$.extend(this.offset, {
+			click: { //Where the click happened, relative to the element
+				left: event.pageX - this.offset.left,
+				top: event.pageY - this.offset.top
+			},
+			parent: this._getParentOffset(),
+			relative: this._getRelativeOffset() //This is a relative to absolute position minus the actual position calculation - only used for relative positioned helper
+		});
+
+		//Generate the original position
+		this.originalPosition = this._generatePosition(event);
+		this.originalPageX = event.pageX;
+		this.originalPageY = event.pageY;
+
+		//Adjust the mouse offset relative to the helper if 'cursorAt' is supplied
+		(o.cursorAt && this._adjustOffsetFromHelper(o.cursorAt));
+
+		//Cache the former DOM position
+		this.domPosition = { prev: this.currentItem.prev()[0], parent: this.currentItem.parent()[0] };
+
+		//If the helper is not the original, hide the original so it's not playing any role during the drag, won't cause anything bad this way
+		if(this.helper[0] != this.currentItem[0]) {
+			this.currentItem.hide();
+		}
+
+		//Create the placeholder
+		this._createPlaceholder();
+
+		//Set a containment if given in the options
+		if(o.containment)
+			this._setContainment();
+
+		if(o.cursor) { // cursor option
+			if ($('body').css("cursor")) this._storedCursor = $('body').css("cursor");
+			$('body').css("cursor", o.cursor);
+		}
+
+		if(o.opacity) { // opacity option
+			if (this.helper.css("opacity")) this._storedOpacity = this.helper.css("opacity");
+			this.helper.css("opacity", o.opacity);
+		}
+
+		if(o.zIndex) { // zIndex option
+			if (this.helper.css("zIndex")) this._storedZIndex = this.helper.css("zIndex");
+			this.helper.css("zIndex", o.zIndex);
+		}
+
+		//Prepare scrolling
+		if(this.scrollParent[0] != document && this.scrollParent[0].tagName != 'HTML')
+			this.overflowOffset = this.scrollParent.offset();
+
+		//Call callbacks
+		this._trigger("start", event, this._uiHash());
+
+		//Recache the helper size
+		if(!this._preserveHelperProportions)
+			this._cacheHelperProportions();
+
+
+		//Post 'activate' events to possible containers
+		if(!noActivation) {
+			 for (var i = this.containers.length - 1; i >= 0; i--) { this.containers[i]._trigger("activate", event, self._uiHash(this)); }
+		}
+
+		//Prepare possible droppables
+		if($.ui.ddmanager)
+			$.ui.ddmanager.current = this;
+
+		if ($.ui.ddmanager && !o.dropBehaviour)
+			$.ui.ddmanager.prepareOffsets(this, event);
+
+		this.dragging = true;
+
+		this.helper.addClass("ui-sortable-helper");
+		this._mouseDrag(event); //Execute the drag once - this causes the helper not to be visible before getting its correct position
+		return true;
+
+	},
+
+	_mouseDrag: function(event) {
+
+		//Compute the helpers position
+		this.position = this._generatePosition(event);
+		this.positionAbs = this._convertPositionTo("absolute");
+
+		if (!this.lastPositionAbs) {
+			this.lastPositionAbs = this.positionAbs;
+		}
+
+		//Do scrolling
+		if(this.options.scroll) {
+			var o = this.options, scrolled = false;
+			if(this.scrollParent[0] != document && this.scrollParent[0].tagName != 'HTML') {
+
+				if((this.overflowOffset.top + this.scrollParent[0].offsetHeight) - event.pageY < o.scrollSensitivity)
+					this.scrollParent[0].scrollTop = scrolled = this.scrollParent[0].scrollTop + o.scrollSpeed;
+				else if(event.pageY - this.overflowOffset.top < o.scrollSensitivity)
+					this.scrollParent[0].scrollTop = scrolled = this.scrollParent[0].scrollTop - o.scrollSpeed;
+
+				if((this.overflowOffset.left + this.scrollParent[0].offsetWidth) - event.pageX < o.scrollSensitivity)
+					this.scrollParent[0].scrollLeft = scrolled = this.scrollParent[0].scrollLeft + o.scrollSpeed;
+				else if(event.pageX - this.overflowOffset.left < o.scrollSensitivity)
+					this.scrollParent[0].scrollLeft = scrolled = this.scrollParent[0].scrollLeft - o.scrollSpeed;
+
+			} else {
+
+				if(event.pageY - $(document).scrollTop() < o.scrollSensitivity)
+					scrolled = $(document).scrollTop($(document).scrollTop() - o.scrollSpeed);
+				else if($(window).height() - (event.pageY - $(document).scrollTop()) < o.scrollSensitivity)
+					scrolled = $(document).scrollTop($(document).scrollTop() + o.scrollSpeed);
+
+				if(event.pageX - $(document).scrollLeft() < o.scrollSensitivity)
+					scrolled = $(document).scrollLeft($(document).scrollLeft() - o.scrollSpeed);
+				else if($(window).width() - (event.pageX - $(document).scrollLeft()) < o.scrollSensitivity)
+					scrolled = $(document).scrollLeft($(document).scrollLeft() + o.scrollSpeed);
+
+			}
+
+			if(scrolled !== false && $.ui.ddmanager && !o.dropBehaviour)
+				$.ui.ddmanager.prepareOffsets(this, event);
+		}
+
+		//Regenerate the absolute position used for position checks
+		this.positionAbs = this._convertPositionTo("absolute");
+
+		//Set the helper position
+		if(!this.options.axis || this.options.axis != "y") this.helper[0].style.left = this.position.left+'px';
+		if(!this.options.axis || this.options.axis != "x") this.helper[0].style.top = this.position.top+'px';
+
+		//Rearrange
+		for (var i = this.items.length - 1; i >= 0; i--) {
+
+			//Cache variables and intersection, continue if no intersection
+			var item = this.items[i], itemElement = item.item[0], intersection = this._intersectsWithPointer(item);
+			if (!intersection) continue;
+
+			if(itemElement != this.currentItem[0] //cannot intersect with itself
+				&&	this.placeholder[intersection == 1 ? "next" : "prev"]()[0] != itemElement //no useless actions that have been done before
+				&&	!$.ui.contains(this.placeholder[0], itemElement) //no action if the item moved is the parent of the item checked
+				&& (this.options.type == 'semi-dynamic' ? !$.ui.contains(this.element[0], itemElement) : true)
+				//&& itemElement.parentNode == this.placeholder[0].parentNode // only rearrange items within the same container
+			) {
+
+				this.direction = intersection == 1 ? "down" : "up";
+
+				if (this.options.tolerance == "pointer" || this._intersectsWithSides(item)) {
+					this._rearrange(event, item);
+				} else {
+					break;
+				}
+
+				this._trigger("change", event, this._uiHash());
+				break;
+			}
+		}
+
+		//Post events to containers
+		this._contactContainers(event);
+
+		//Interconnect with droppables
+		if($.ui.ddmanager) $.ui.ddmanager.drag(this, event);
+
+		//Call callbacks
+		this._trigger('sort', event, this._uiHash());
+
+		this.lastPositionAbs = this.positionAbs;
+		return false;
+
+	},
+
+	_mouseStop: function(event, noPropagation) {
+
+		if(!event) return;
+
+		//If we are using droppables, inform the manager about the drop
+		if ($.ui.ddmanager && !this.options.dropBehaviour)
+			$.ui.ddmanager.drop(this, event);
+
+		if(this.options.revert) {
+			var self = this;
+			var cur = self.placeholder.offset();
+
+			self.reverting = true;
+
+			$(this.helper).animate({
+				left: cur.left - this.offset.parent.left - self.margins.left + (this.offsetParent[0] == document.body ? 0 : this.offsetParent[0].scrollLeft),
+				top: cur.top - this.offset.parent.top - self.margins.top + (this.offsetParent[0] == document.body ? 0 : this.offsetParent[0].scrollTop)
+			}, parseInt(this.options.revert, 10) || 500, function() {
+				self._clear(event);
+			});
+		} else {
+			this._clear(event, noPropagation);
+		}
+
+		return false;
+
+	},
+
+	cancel: function() {
+
+		var self = this;
+
+		if(this.dragging) {
+
+			this._mouseUp();
+
+			if(this.options.helper == "original")
+				this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper");
+			else
+				this.currentItem.show();
+
+			//Post deactivating events to containers
+			for (var i = this.containers.length - 1; i >= 0; i--){
+				this.containers[i]._trigger("deactivate", null, self._uiHash(this));
+				if(this.containers[i].containerCache.over) {
+					this.containers[i]._trigger("out", null, self._uiHash(this));
+					this.containers[i].containerCache.over = 0;
+				}
+			}
+
+		}
+
+		//$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately, it unbinds ALL events from the original node!
+		if(this.placeholder[0].parentNode) this.placeholder[0].parentNode.removeChild(this.placeholder[0]);
+		if(this.options.helper != "original" && this.helper && this.helper[0].parentNode) this.helper.remove();
+
+		$.extend(this, {
+			helper: null,
+			dragging: false,
+			reverting: false,
+			_noFinalSort: null
+		});
+
+		if(this.domPosition.prev) {
+			$(this.domPosition.prev).after(this.currentItem);
+		} else {
+			$(this.domPosition.parent).prepend(this.currentItem);
+		}
+
+		return this;
+
+	},
+
+	serialize: function(o) {
+
+		var items = this._getItemsAsjQuery(o && o.connected);
+		var str = []; o = o || {};
+
+		$(items).each(function() {
+			var res = ($(o.item || this).attr(o.attribute || 'id') || '').match(o.expression || (/(.+)[-=_](.+)/));
+			if(res) str.push((o.key || res[1]+'[]')+'='+(o.key && o.expression ? res[1] : res[2]));
+		});
+
+		if(!str.length && o.key) {
+			str.push(o.key + '=');
+		}
+
+		return str.join('&');
+
+	},
+
+	toArray: function(o) {
+
+		var items = this._getItemsAsjQuery(o && o.connected);
+		var ret = []; o = o || {};
+
+		items.each(function() { ret.push($(o.item || this).attr(o.attribute || 'id') || ''); });
+		return ret;
+
+	},
+
+	/* Be careful with the following core functions */
+	_intersectsWith: function(item) {
+
+		var x1 = this.positionAbs.left,
+			x2 = x1 + this.helperProportions.width,
+			y1 = this.positionAbs.top,
+			y2 = y1 + this.helperProportions.height;
+
+		var l = item.left,
+			r = l + item.width,
+			t = item.top,
+			b = t + item.height;
+
+		var dyClick = this.offset.click.top,
+			dxClick = this.offset.click.left;
+
+		var isOverElement = (y1 + dyClick) > t && (y1 + dyClick) < b && (x1 + dxClick) > l && (x1 + dxClick) < r;
+
+		if(	   this.options.tolerance == "pointer"
+			|| this.options.forcePointerForContainers
+			|| (this.options.tolerance != "pointer" && this.helperProportions[this.floating ? 'width' : 'height'] > item[this.floating ? 'width' : 'height'])
+		) {
+			return isOverElement;
+		} else {
+
+			return (l < x1 + (this.helperProportions.width / 2) // Right Half
+				&& x2 - (this.helperProportions.width / 2) < r // Left Half
+				&& t < y1 + (this.helperProportions.height / 2) // Bottom Half
+				&& y2 - (this.helperProportions.height / 2) < b ); // Top Half
+
+		}
+	},
+
+	_intersectsWithPointer: function(item) {
+
+		var isOverElementHeight = $.ui.isOverAxis(this.positionAbs.top + this.offset.click.top, item.top, item.height),
+			isOverElementWidth = $.ui.isOverAxis(this.positionAbs.left + this.offset.click.left, item.left, item.width),
+			isOverElement = isOverElementHeight && isOverElementWidth,
+			verticalDirection = this._getDragVerticalDirection(),
+			horizontalDirection = this._getDragHorizontalDirection();
+
+		if (!isOverElement)
+			return false;
+
+		return this.floating ?
+			( ((horizontalDirection && horizontalDirection == "right") || verticalDirection == "down") ? 2 : 1 )
+			: ( verticalDirection && (verticalDirection == "down" ? 2 : 1) );
+
+	},
+
+	_intersectsWithSides: function(item) {
+
+		var isOverBottomHalf = $.ui.isOverAxis(this.positionAbs.top + this.offset.click.top, item.top + (item.height/2), item.height),
+			isOverRightHalf = $.ui.isOverAxis(this.positionAbs.left + this.offset.click.left, item.left + (item.width/2), item.width),
+			verticalDirection = this._getDragVerticalDirection(),
+			horizontalDirection = this._getDragHorizontalDirection();
+
+		if (this.floating && horizontalDirection) {
+			return ((horizontalDirection == "right" && isOverRightHalf) || (horizontalDirection == "left" && !isOverRightHalf));
+		} else {
+			return verticalDirection && ((verticalDirection == "down" && isOverBottomHalf) || (verticalDirection == "up" && !isOverBottomHalf));
+		}
+
+	},
+
+	_getDragVerticalDirection: function() {
+		var delta = this.positionAbs.top - this.lastPositionAbs.top;
+		return delta != 0 && (delta > 0 ? "down" : "up");
+	},
+
+	_getDragHorizontalDirection: function() {
+		var delta = this.positionAbs.left - this.lastPositionAbs.left;
+		return delta != 0 && (delta > 0 ? "right" : "left");
+	},
+
+	refresh: function(event) {
+		this._refreshItems(event);
+		this.refreshPositions();
+		return this;
+	},
+
+	_connectWith: function() {
+		var options = this.options;
+		return options.connectWith.constructor == String
+			? [options.connectWith]
+			: options.connectWith;
+	},
+	
+	_getItemsAsjQuery: function(connected) {
+
+		var self = this;
+		var items = [];
+		var queries = [];
+		var connectWith = this._connectWith();
+
+		if(connectWith && connected) {
+			for (var i = connectWith.length - 1; i >= 0; i--){
+				var cur = $(connectWith[i]);
+				for (var j = cur.length - 1; j >= 0; j--){
+					var inst = $.data(cur[j], 'sortable');
+					if(inst && inst != this && !inst.options.disabled) {
+						queries.push([$.isFunction(inst.options.items) ? inst.options.items.call(inst.element) : $(inst.options.items, inst.element).not(".ui-sortable-helper").not('.ui-sortable-placeholder'), inst]);
+					}
+				};
+			};
+		}
+
+		queries.push([$.isFunction(this.options.items) ? this.options.items.call(this.element, null, { options: this.options, item: this.currentItem }) : $(this.options.items, this.element).not(".ui-sortable-helper").not('.ui-sortable-placeholder'), this]);
+
+		for (var i = queries.length - 1; i >= 0; i--){
+			queries[i][0].each(function() {
+				items.push(this);
+			});
+		};
+
+		return $(items);
+
+	},
+
+	_removeCurrentsFromItems: function() {
+
+		var list = this.currentItem.find(":data(sortable-item)");
+
+		for (var i=0; i < this.items.length; i++) {
+
+			for (var j=0; j < list.length; j++) {
+				if(list[j] == this.items[i].item[0])
+					this.items.splice(i,1);
+			};
+
+		};
+
+	},
+
+	_refreshItems: function(event) {
+
+		this.items = [];
+		this.containers = [this];
+		var items = this.items;
+		var self = this;
+		var queries = [[$.isFunction(this.options.items) ? this.options.items.call(this.element[0], event, { item: this.currentItem }) : $(this.options.items, this.element), this]];
+		var connectWith = this._connectWith();
+
+		if(connectWith) {
+			for (var i = connectWith.length - 1; i >= 0; i--){
+				var cur = $(connectWith[i]);
+				for (var j = cur.length - 1; j >= 0; j--){
+					var inst = $.data(cur[j], 'sortable');
+					if(inst && inst != this && !inst.options.disabled) {
+						queries.push([$.isFunction(inst.options.items) ? inst.options.items.call(inst.element[0], event, { item: this.currentItem }) : $(inst.options.items, inst.element), inst]);
+						this.containers.push(inst);
+					}
+				};
+			};
+		}
+
+		for (var i = queries.length - 1; i >= 0; i--) {
+			var targetData = queries[i][1];
+			var _queries = queries[i][0];
+
+			for (var j=0, queriesLength = _queries.length; j < queriesLength; j++) {
+				var item = $(_queries[j]);
+
+				item.data('sortable-item', targetData); // Data for target checking (mouse manager)
+
+				items.push({
+					item: item,
+					instance: targetData,
+					width: 0, height: 0,
+					left: 0, top: 0
+				});
+			};
+		};
+
+	},
+
+	refreshPositions: function(fast) {
+
+		//This has to be redone because due to the item being moved out/into the offsetParent, the offsetParent's position will change
+		if(this.offsetParent && this.helper) {
+			this.offset.parent = this._getParentOffset();
+		}
+
+		for (var i = this.items.length - 1; i >= 0; i--){
+			var item = this.items[i];
+
+			var t = this.options.toleranceElement ? $(this.options.toleranceElement, item.item) : item.item;
+
+			if (!fast) {
+				item.width = t.outerWidth();
+				item.height = t.outerHeight();
+			}
+
+			var p = t.offset();
+			item.left = p.left;
+			item.top = p.top;
+		};
+
+		if(this.options.custom && this.options.custom.refreshContainers) {
+			this.options.custom.refreshContainers.call(this);
+		} else {
+			for (var i = this.containers.length - 1; i >= 0; i--){
+				var p = this.containers[i].element.offset();
+				this.containers[i].containerCache.left = p.left;
+				this.containers[i].containerCache.top = p.top;
+				this.containers[i].containerCache.width	= this.containers[i].element.outerWidth();
+				this.containers[i].containerCache.height = this.containers[i].element.outerHeight();
+			};
+		}
+
+		return this;
+	},
+
+	_createPlaceholder: function(that) {
+
+		var self = that || this, o = self.options;
+
+		if(!o.placeholder || o.placeholder.constructor == String) {
+			var className = o.placeholder;
+			o.placeholder = {
+				element: function() {
+
+					var el = $(document.createElement(self.currentItem[0].nodeName))
+						.addClass(className || self.currentItem[0].className+" ui-sortable-placeholder")
+						.removeClass("ui-sortable-helper")[0];
+
+					if(!className)
+						el.style.visibility = "hidden";
+
+					return el;
+				},
+				update: function(container, p) {
+
+					// 1. If a className is set as 'placeholder option, we don't force sizes - the class is responsible for that
+					// 2. The option 'forcePlaceholderSize can be enabled to force it even if a class name is specified
+					if(className && !o.forcePlaceholderSize) return;
+
+					//If the element doesn't have a actual height by itself (without styles coming from a stylesheet), it receives the inline height from the dragged item
+					if(!p.height()) { p.height(self.currentItem.innerHeight() - parseInt(self.currentItem.css('paddingTop')||0, 10) - parseInt(self.currentItem.css('paddingBottom')||0, 10)); };
+					if(!p.width()) { p.width(self.currentItem.innerWidth() - parseInt(self.currentItem.css('paddingLeft')||0, 10) - parseInt(self.currentItem.css('paddingRight')||0, 10)); };
+				}
+			};
+		}
+
+		//Create the placeholder
+		self.placeholder = $(o.placeholder.element.call(self.element, self.currentItem));
+
+		//Append it after the actual current item
+		self.currentItem.after(self.placeholder);
+
+		//Update the size of the placeholder (TODO: Logic to fuzzy, see line 316/317)
+		o.placeholder.update(self, self.placeholder);
+
+	},
+
+	_contactContainers: function(event) {
+		
+		// get innermost container that intersects with item 
+		var innermostContainer = null, innermostIndex = null;		
+		
+		
+		for (var i = this.containers.length - 1; i >= 0; i--){
+
+			// never consider a container that's located within the item itself 
+			if($.ui.contains(this.currentItem[0], this.containers[i].element[0]))
+				continue;
+
+			if(this._intersectsWith(this.containers[i].containerCache)) {
+
+				// if we've already found a container and it's more "inner" than this, then continue 
+				if(innermostContainer && $.ui.contains(this.containers[i].element[0], innermostContainer.element[0]))
+					continue;
+
+				innermostContainer = this.containers[i]; 
+				innermostIndex = i;
+					
+			} else {
+				// container doesn't intersect. trigger "out" event if necessary 
+				if(this.containers[i].containerCache.over) {
+					this.containers[i]._trigger("out", event, this._uiHash(this));
+					this.containers[i].containerCache.over = 0;
+				}
+			}
+
+		}
+		
+		// if no intersecting containers found, return 
+		if(!innermostContainer) return; 
+
+		// move the item into the container if it's not there already
+		if(this.containers.length === 1) {
+			this.containers[innermostIndex]._trigger("over", event, this._uiHash(this));
+			this.containers[innermostIndex].containerCache.over = 1;
+		} else if(this.currentContainer != this.containers[innermostIndex]) { 
+
+			//When entering a new container, we will find the item with the least distance and append our item near it 
+			var dist = 10000; var itemWithLeastDistance = null; var base = this.positionAbs[this.containers[innermostIndex].floating ? 'left' : 'top']; 
+			for (var j = this.items.length - 1; j >= 0; j--) { 
+				if(!$.ui.contains(this.containers[innermostIndex].element[0], this.items[j].item[0])) continue; 
+				var cur = this.items[j][this.containers[innermostIndex].floating ? 'left' : 'top']; 
+				if(Math.abs(cur - base) < dist) { 
+					dist = Math.abs(cur - base); itemWithLeastDistance = this.items[j]; 
+				} 
+			} 
+
+			if(!itemWithLeastDistance && !this.options.dropOnEmpty) //Check if dropOnEmpty is enabled 
+				return; 
+
+			this.currentContainer = this.containers[innermostIndex]; 
+			itemWithLeastDistance ? this._rearrange(event, itemWithLeastDistance, null, true) : this._rearrange(event, null, this.containers[innermostIndex].element, true); 
+			this._trigger("change", event, this._uiHash()); 
+			this.containers[innermostIndex]._trigger("change", event, this._uiHash(this)); 
+
+			//Update the placeholder 
+			this.options.placeholder.update(this.currentContainer, this.placeholder); 
+		
+			this.containers[innermostIndex]._trigger("over", event, this._uiHash(this)); 
+			this.containers[innermostIndex].containerCache.over = 1;
+		} 
+	
+		
+	},
+
+	_createHelper: function(event) {
+
+		var o = this.options;
+		var helper = $.isFunction(o.helper) ? $(o.helper.apply(this.element[0], [event, this.currentItem])) : (o.helper == 'clone' ? this.currentItem.clone() : this.currentItem);
+
+		if(!helper.parents('body').length) //Add the helper to the DOM if that didn't happen already
+			$(o.appendTo != 'parent' ? o.appendTo : this.currentItem[0].parentNode)[0].appendChild(helper[0]);
+
+		if(helper[0] == this.currentItem[0])
+			this._storedCSS = { width: this.currentItem[0].style.width, height: this.currentItem[0].style.height, position: this.currentItem.css("position"), top: this.currentItem.css("top"), left: this.currentItem.css("left") };
+
+		if(helper[0].style.width == '' || o.forceHelperSize) helper.width(this.currentItem.width());
+		if(helper[0].style.height == '' || o.forceHelperSize) helper.height(this.currentItem.height());
+
+		return helper;
+
+	},
+
+	_adjustOffsetFromHelper: function(obj) {
+		if (typeof obj == 'string') {
+			obj = obj.split(' ');
+		}
+		if ($.isArray(obj)) {
+			obj = {left: +obj[0], top: +obj[1] || 0};
+		}
+		if ('left' in obj) {
+			this.offset.click.left = obj.left + this.margins.left;
+		}
+		if ('right' in obj) {
+			this.offset.click.left = this.helperProportions.width - obj.right + this.margins.left;
+		}
+		if ('top' in obj) {
+			this.offset.click.top = obj.top + this.margins.top;
+		}
+		if ('bottom' in obj) {
+			this.offset.click.top = this.helperProportions.height - obj.bottom + this.margins.top;
+		}
+	},
+
+	_getParentOffset: function() {
+
+
+		//Get the offsetParent and cache its position
+		this.offsetParent = this.helper.offsetParent();
+		var po = this.offsetParent.offset();
+
+		// This is a special case where we need to modify a offset calculated on start, since the following happened:
+		// 1. The position of the helper is absolute, so it's position is calculated based on the next positioned parent
+		// 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't the document, which means that
+		//    the scroll is included in the initial calculation of the offset of the parent, and never recalculated upon drag
+		if(this.cssPosition == 'absolute' && this.scrollParent[0] != document && $.ui.contains(this.scrollParent[0], this.offsetParent[0])) {
+			po.left += this.scrollParent.scrollLeft();
+			po.top += this.scrollParent.scrollTop();
+		}
+
+		if((this.offsetParent[0] == document.body) //This needs to be actually done for all browsers, since pageX/pageY includes this information
+		|| (this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() == 'html' && $.browser.msie)) //Ugly IE fix
+			po = { top: 0, left: 0 };
+
+		return {
+			top: po.top + (parseInt(this.offsetParent.css("borderTopWidth"),10) || 0),
+			left: po.left + (parseInt(this.offsetParent.css("borderLeftWidth"),10) || 0)
+		};
+
+	},
+
+	_getRelativeOffset: function() {
+
+		if(this.cssPosition == "relative") {
+			var p = this.currentItem.position();
+			return {
+				top: p.top - (parseInt(this.helper.css("top"),10) || 0) + this.scrollParent.scrollTop(),
+				left: p.left - (parseInt(this.helper.css("left"),10) || 0) + this.scrollParent.scrollLeft()
+			};
+		} else {
+			return { top: 0, left: 0 };
+		}
+
+	},
+
+	_cacheMargins: function() {
+		this.margins = {
+			left: (parseInt(this.currentItem.css("marginLeft"),10) || 0),
+			top: (parseInt(this.currentItem.css("marginTop"),10) || 0)
+		};
+	},
+
+	_cacheHelperProportions: function() {
+		this.helperProportions = {
+			width: this.helper.outerWidth(),
+			height: this.helper.outerHeight()
+		};
+	},
+
+	_setContainment: function() {
+
+		var o = this.options;
+		if(o.containment == 'parent') o.containment = this.helper[0].parentNode;
+		if(o.containment == 'document' || o.containment == 'window') this.containment = [
+			0 - this.offset.relative.left - this.offset.parent.left,
+			0 - this.offset.relative.top - this.offset.parent.top,
+			$(o.containment == 'document' ? document : window).width() - this.helperProportions.width - this.margins.left,
+			($(o.containment == 'document' ? document : window).height() || document.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top
+		];
+
+		if(!(/^(document|window|parent)$/).test(o.containment)) {
+			var ce = $(o.containment)[0];
+			var co = $(o.containment).offset();
+			var over = ($(ce).css("overflow") != 'hidden');
+
+			this.containment = [
+				co.left + (parseInt($(ce).css("borderLeftWidth"),10) || 0) + (parseInt($(ce).css("paddingLeft"),10) || 0) - this.margins.left,
+				co.top + (parseInt($(ce).css("borderTopWidth"),10) || 0) + (parseInt($(ce).css("paddingTop"),10) || 0) - this.margins.top,
+				co.left+(over ? Math.max(ce.scrollWidth,ce.offsetWidth) : ce.offsetWidth) - (parseInt($(ce).css("borderLeftWidth"),10) || 0) - (parseInt($(ce).css("paddingRight"),10) || 0) - this.helperProportions.width - this.margins.left,
+				co.top+(over ? Math.max(ce.scrollHeight,ce.offsetHeight) : ce.offsetHeight) - (parseInt($(ce).css("borderTopWidth"),10) || 0) - (parseInt($(ce).css("paddingBottom"),10) || 0) - this.helperProportions.height - this.margins.top
+			];
+		}
+
+	},
+
+	_convertPositionTo: function(d, pos) {
+
+		if(!pos) pos = this.position;
+		var mod = d == "absolute" ? 1 : -1;
+		var o = this.options, scroll = this.cssPosition == 'absolute' && !(this.scrollParent[0] != document && $.ui.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName);
+
+		return {
+			top: (
+				pos.top																	// The absolute mouse position
+				+ this.offset.relative.top * mod										// Only for relative positioned nodes: Relative offset from element to offset parent
+				+ this.offset.parent.top * mod											// The offsetParent's offset without borders (offset + border)
+				- ($.browser.safari && this.cssPosition == 'fixed' ? 0 : ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ) * mod)
+			),
+			left: (
+				pos.left																// The absolute mouse position
+				+ this.offset.relative.left * mod										// Only for relative positioned nodes: Relative offset from element to offset parent
+				+ this.offset.parent.left * mod											// The offsetParent's offset without borders (offset + border)
+				- ($.browser.safari && this.cssPosition == 'fixed' ? 0 : ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ) * mod)
+			)
+		};
+
+	},
+
+	_generatePosition: function(event) {
+
+		var o = this.options, scroll = this.cssPosition == 'absolute' && !(this.scrollParent[0] != document && $.ui.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName);
+
+		// This is another very weird special case that only happens for relative elements:
+		// 1. If the css position is relative
+		// 2. and the scroll parent is the document or similar to the offset parent
+		// we have to refresh the relative offset during the scroll so there are no jumps
+		if(this.cssPosition == 'relative' && !(this.scrollParent[0] != document && this.scrollParent[0] != this.offsetParent[0])) {
+			this.offset.relative = this._getRelativeOffset();
+		}
+
+		var pageX = event.pageX;
+		var pageY = event.pageY;
+
+		/*
+		 * - Position constraining -
+		 * Constrain the position to a mix of grid, containment.
+		 */
+
+		if(this.originalPosition) { //If we are not dragging yet, we won't check for options
+
+			if(this.containment) {
+				if(event.pageX - this.offset.click.left < this.containment[0]) pageX = this.containment[0] + this.offset.click.left;
+				if(event.pageY - this.offset.click.top < this.containment[1]) pageY = this.containment[1] + this.offset.click.top;
+				if(event.pageX - this.offset.click.left > this.containment[2]) pageX = this.containment[2] + this.offset.click.left;
+				if(event.pageY - this.offset.click.top > this.containment[3]) pageY = this.containment[3] + this.offset.click.top;
+			}
+
+			if(o.grid) {
+				var top = this.originalPageY + Math.round((pageY - this.originalPageY) / o.grid[1]) * o.grid[1];
+				pageY = this.containment ? (!(top - this.offset.click.top < this.containment[1] || top - this.offset.click.top > this.containment[3]) ? top : (!(top - this.offset.click.top < this.containment[1]) ? top - o.grid[1] : top + o.grid[1])) : top;
+
+				var left = this.originalPageX + Math.round((pageX - this.originalPageX) / o.grid[0]) * o.grid[0];
+				pageX = this.containment ? (!(left - this.offset.click.left < this.containment[0] || left - this.offset.click.left > this.containment[2]) ? left : (!(left - this.offset.click.left < this.containment[0]) ? left - o.grid[0] : left + o.grid[0])) : left;
+			}
+
+		}
+
+		return {
+			top: (
+				pageY																// The absolute mouse position
+				- this.offset.click.top													// Click offset (relative to the element)
+				- this.offset.relative.top												// Only for relative positioned nodes: Relative offset from element to offset parent
+				- this.offset.parent.top												// The offsetParent's offset without borders (offset + border)
+				+ ($.browser.safari && this.cssPosition == 'fixed' ? 0 : ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ))
+			),
+			left: (
+				pageX																// The absolute mouse position
+				- this.offset.click.left												// Click offset (relative to the element)
+				- this.offset.relative.left												// Only for relative positioned nodes: Relative offset from element to offset parent
+				- this.offset.parent.left												// The offsetParent's offset without borders (offset + border)
+				+ ($.browser.safari && this.cssPosition == 'fixed' ? 0 : ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ))
+			)
+		};
+
+	},
+
+	_rearrange: function(event, i, a, hardRefresh) {
+
+		a ? a[0].appendChild(this.placeholder[0]) : i.item[0].parentNode.insertBefore(this.placeholder[0], (this.direction == 'down' ? i.item[0] : i.item[0].nextSibling));
+
+		//Various things done here to improve the performance:
+		// 1. we create a setTimeout, that calls refreshPositions
+		// 2. on the instance, we have a counter variable, that get's higher after every append
+		// 3. on the local scope, we copy the counter variable, and check in the timeout, if it's still the same
+		// 4. this lets only the last addition to the timeout stack through
+		this.counter = this.counter ? ++this.counter : 1;
+		var self = this, counter = this.counter;
+
+		window.setTimeout(function() {
+			if(counter == self.counter) self.refreshPositions(!hardRefresh); //Precompute after each DOM insertion, NOT on mousemove
+		},0);
+
+	},
+
+	_clear: function(event, noPropagation) {
+
+		this.reverting = false;
+		// We delay all events that have to be triggered to after the point where the placeholder has been removed and
+		// everything else normalized again
+		var delayedTriggers = [], self = this;
+
+		// We first have to update the dom position of the actual currentItem
+		// Note: don't do it if the current item is already removed (by a user), or it gets reappended (see #4088)
+		if(!this._noFinalSort && this.currentItem[0].parentNode) this.placeholder.before(this.currentItem);
+		this._noFinalSort = null;
+
+		if(this.helper[0] == this.currentItem[0]) {
+			for(var i in this._storedCSS) {
+				if(this._storedCSS[i] == 'auto' || this._storedCSS[i] == 'static') this._storedCSS[i] = '';
+			}
+			this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper");
+		} else {
+			this.currentItem.show();
+		}
+
+		if(this.fromOutside && !noPropagation) delayedTriggers.push(function(event) { this._trigger("receive", event, this._uiHash(this.fromOutside)); });
+		if((this.fromOutside || this.domPosition.prev != this.currentItem.prev().not(".ui-sortable-helper")[0] || this.domPosition.parent != this.currentItem.parent()[0]) && !noPropagation) delayedTriggers.push(function(event) { this._trigger("update", event, this._uiHash()); }); //Trigger update callback if the DOM position has changed
+		if(!$.ui.contains(this.element[0], this.currentItem[0])) { //Node was moved out of the current element
+			if(!noPropagation) delayedTriggers.push(function(event) { this._trigger("remove", event, this._uiHash()); });
+			for (var i = this.containers.length - 1; i >= 0; i--){
+				if($.ui.contains(this.containers[i].element[0], this.currentItem[0]) && !noPropagation) {
+					delayedTriggers.push((function(c) { return function(event) { c._trigger("receive", event, this._uiHash(this)); };  }).call(this, this.containers[i]));
+					delayedTriggers.push((function(c) { return function(event) { c._trigger("update", event, this._uiHash(this));  }; }).call(this, this.containers[i]));
+				}
+			};
+		};
+
+		//Post events to containers
+		for (var i = this.containers.length - 1; i >= 0; i--){
+			if(!noPropagation) delayedTriggers.push((function(c) { return function(event) { c._trigger("deactivate", event, this._uiHash(this)); };  }).call(this, this.containers[i]));
+			if(this.containers[i].containerCache.over) {
+				delayedTriggers.push((function(c) { return function(event) { c._trigger("out", event, this._uiHash(this)); };  }).call(this, this.containers[i]));
+				this.containers[i].containerCache.over = 0;
+			}
+		}
+
+		//Do what was originally in plugins
+		if(this._storedCursor) $('body').css("cursor", this._storedCursor); //Reset cursor
+		if(this._storedOpacity) this.helper.css("opacity", this._storedOpacity); //Reset opacity
+		if(this._storedZIndex) this.helper.css("zIndex", this._storedZIndex == 'auto' ? '' : this._storedZIndex); //Reset z-index
+
+		this.dragging = false;
+		if(this.cancelHelperRemoval) {
+			if(!noPropagation) {
+				this._trigger("beforeStop", event, this._uiHash());
+				for (var i=0; i < delayedTriggers.length; i++) { delayedTriggers[i].call(this, event); }; //Trigger all delayed events
+				this._trigger("stop", event, this._uiHash());
+			}
+			return false;
+		}
+
+		if(!noPropagation) this._trigger("beforeStop", event, this._uiHash());
+
+		//$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately, it unbinds ALL events from the original node!
+		this.placeholder[0].parentNode.removeChild(this.placeholder[0]);
+
+		if(this.helper[0] != this.currentItem[0]) this.helper.remove(); this.helper = null;
+
+		if(!noPropagation) {
+			for (var i=0; i < delayedTriggers.length; i++) { delayedTriggers[i].call(this, event); }; //Trigger all delayed events
+			this._trigger("stop", event, this._uiHash());
+		}
+
+		this.fromOutside = false;
+		return true;
+
+	},
+
+	_trigger: function() {
+		if ($.Widget.prototype._trigger.apply(this, arguments) === false) {
+			this.cancel();
+		}
+	},
+
+	_uiHash: function(inst) {
+		var self = inst || this;
+		return {
+			helper: self.helper,
+			placeholder: self.placeholder || $([]),
+			position: self.position,
+			originalPosition: self.originalPosition,
+			offset: self.positionAbs,
+			item: self.currentItem,
+			sender: inst ? inst.element : null
+		};
+	}
+
+});
+
+$.extend($.ui.sortable, {
+	version: "1.8.7"
+});
+
+})(jQuery);

+ 321 - 0
modules/app_java/doc/webhelp/oxygen-webhelp/resources/js/jquery-ui.custom.min.js

@@ -0,0 +1,321 @@
+/*!
+ * jQuery UI 1.8.2
+ *
+ * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI
+ */
+(function(c){c.ui=c.ui||{};if(!c.ui.version){c.extend(c.ui,{version:"1.8.2",plugin:{add:function(a,b,d){a=c.ui[a].prototype;for(var e in d){a.plugins[e]=a.plugins[e]||[];a.plugins[e].push([b,d[e]])}},call:function(a,b,d){if((b=a.plugins[b])&&a.element[0].parentNode)for(var e=0;e<b.length;e++)a.options[b[e][0]]&&b[e][1].apply(a.element,d)}},contains:function(a,b){return document.compareDocumentPosition?a.compareDocumentPosition(b)&16:a!==b&&a.contains(b)},hasScroll:function(a,b){if(c(a).css("overflow")==
+"hidden")return false;b=b&&b=="left"?"scrollLeft":"scrollTop";var d=false;if(a[b]>0)return true;a[b]=1;d=a[b]>0;a[b]=0;return d},isOverAxis:function(a,b,d){return a>b&&a<b+d},isOver:function(a,b,d,e,f,g){return c.ui.isOverAxis(a,d,f)&&c.ui.isOverAxis(b,e,g)},keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,
+NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91}});c.fn.extend({_focus:c.fn.focus,focus:function(a,b){return typeof a==="number"?this.each(function(){var d=this;setTimeout(function(){c(d).focus();b&&b.call(d)},a)}):this._focus.apply(this,arguments)},enableSelection:function(){return this.attr("unselectable","off").css("MozUserSelect","")},disableSelection:function(){return this.attr("unselectable","on").css("MozUserSelect",
+"none")},scrollParent:function(){var a;a=c.browser.msie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(c.curCSS(this,"position",1))&&/(auto|scroll)/.test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",
+1))}).eq(0);return/fixed/.test(this.css("position"))||!a.length?c(document):a},zIndex:function(a){if(a!==undefined)return this.css("zIndex",a);if(this.length){a=c(this[0]);for(var b;a.length&&a[0]!==document;){b=a.css("position");if(b=="absolute"||b=="relative"||b=="fixed"){b=parseInt(a.css("zIndex"));if(!isNaN(b)&&b!=0)return b}a=a.parent()}}return 0}});c.extend(c.expr[":"],{data:function(a,b,d){return!!c.data(a,d[3])},focusable:function(a){var b=a.nodeName.toLowerCase(),d=c.attr(a,"tabindex");return(/input|select|textarea|button|object/.test(b)?
+!a.disabled:"a"==b||"area"==b?a.href||!isNaN(d):!isNaN(d))&&!c(a)["area"==b?"parents":"closest"](":hidden").length},tabbable:function(a){var b=c.attr(a,"tabindex");return(isNaN(b)||b>=0)&&c(a).is(":focusable")}})}})(jQuery);
+;/*!
+ * jQuery UI Widget 1.8.2
+ *
+ * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Widget
+ */
+(function(b){var j=b.fn.remove;b.fn.remove=function(a,c){return this.each(function(){if(!c)if(!a||b.filter(a,[this]).length)b("*",this).add(this).each(function(){b(this).triggerHandler("remove")});return j.call(b(this),a,c)})};b.widget=function(a,c,d){var e=a.split(".")[0],f;a=a.split(".")[1];f=e+"-"+a;if(!d){d=c;c=b.Widget}b.expr[":"][f]=function(h){return!!b.data(h,a)};b[e]=b[e]||{};b[e][a]=function(h,g){arguments.length&&this._createWidget(h,g)};c=new c;c.options=b.extend({},c.options);b[e][a].prototype=
+b.extend(true,c,{namespace:e,widgetName:a,widgetEventPrefix:b[e][a].prototype.widgetEventPrefix||a,widgetBaseClass:f},d);b.widget.bridge(a,b[e][a])};b.widget.bridge=function(a,c){b.fn[a]=function(d){var e=typeof d==="string",f=Array.prototype.slice.call(arguments,1),h=this;d=!e&&f.length?b.extend.apply(null,[true,d].concat(f)):d;if(e&&d.substring(0,1)==="_")return h;e?this.each(function(){var g=b.data(this,a),i=g&&b.isFunction(g[d])?g[d].apply(g,f):g;if(i!==g&&i!==undefined){h=i;return false}}):this.each(function(){var g=
+b.data(this,a);if(g){d&&g.option(d);g._init()}else b.data(this,a,new c(d,this))});return h}};b.Widget=function(a,c){arguments.length&&this._createWidget(a,c)};b.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",options:{disabled:false},_createWidget:function(a,c){this.element=b(c).data(this.widgetName,this);this.options=b.extend(true,{},this.options,b.metadata&&b.metadata.get(c)[this.widgetName],a);var d=this;this.element.bind("remove."+this.widgetName,function(){d.destroy()});this._create();
+this._init()},_create:function(){},_init:function(){},destroy:function(){this.element.unbind("."+this.widgetName).removeData(this.widgetName);this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+"-disabled ui-state-disabled")},widget:function(){return this.element},option:function(a,c){var d=a,e=this;if(arguments.length===0)return b.extend({},e.options);if(typeof a==="string"){if(c===undefined)return this.options[a];d={};d[a]=c}b.each(d,function(f,
+h){e._setOption(f,h)});return e},_setOption:function(a,c){this.options[a]=c;if(a==="disabled")this.widget()[c?"addClass":"removeClass"](this.widgetBaseClass+"-disabled ui-state-disabled").attr("aria-disabled",c);return this},enable:function(){return this._setOption("disabled",false)},disable:function(){return this._setOption("disabled",true)},_trigger:function(a,c,d){var e=this.options[a];c=b.Event(c);c.type=(a===this.widgetEventPrefix?a:this.widgetEventPrefix+a).toLowerCase();d=d||{};if(c.originalEvent){a=
+b.event.props.length;for(var f;a;){f=b.event.props[--a];c[f]=c.originalEvent[f]}}this.element.trigger(c,d);return!(b.isFunction(e)&&e.call(this.element[0],c,d)===false||c.isDefaultPrevented())}}})(jQuery);
+;/*!
+ * jQuery UI Mouse 1.8.2
+ *
+ * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Mouse
+ *
+ * Depends:
+ *	jquery.ui.widget.js
+ */
+(function(c){c.widget("ui.mouse",{options:{cancel:":input,option",distance:1,delay:0},_mouseInit:function(){var a=this;this.element.bind("mousedown."+this.widgetName,function(b){return a._mouseDown(b)}).bind("click."+this.widgetName,function(b){if(a._preventClickEvent){a._preventClickEvent=false;b.stopImmediatePropagation();return false}});this.started=false},_mouseDestroy:function(){this.element.unbind("."+this.widgetName)},_mouseDown:function(a){a.originalEvent=a.originalEvent||{};if(!a.originalEvent.mouseHandled){this._mouseStarted&&
+this._mouseUp(a);this._mouseDownEvent=a;var b=this,e=a.which==1,f=typeof this.options.cancel=="string"?c(a.target).parents().add(a.target).filter(this.options.cancel).length:false;if(!e||f||!this._mouseCapture(a))return true;this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet)this._mouseDelayTimer=setTimeout(function(){b.mouseDelayMet=true},this.options.delay);if(this._mouseDistanceMet(a)&&this._mouseDelayMet(a)){this._mouseStarted=this._mouseStart(a)!==false;if(!this._mouseStarted){a.preventDefault();
+return true}}this._mouseMoveDelegate=function(d){return b._mouseMove(d)};this._mouseUpDelegate=function(d){return b._mouseUp(d)};c(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);c.browser.safari||a.preventDefault();return a.originalEvent.mouseHandled=true}},_mouseMove:function(a){if(c.browser.msie&&!a.button)return this._mouseUp(a);if(this._mouseStarted){this._mouseDrag(a);return a.preventDefault()}if(this._mouseDistanceMet(a)&&
+this._mouseDelayMet(a))(this._mouseStarted=this._mouseStart(this._mouseDownEvent,a)!==false)?this._mouseDrag(a):this._mouseUp(a);return!this._mouseStarted},_mouseUp:function(a){c(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;this._preventClickEvent=a.target==this._mouseDownEvent.target;this._mouseStop(a)}return false},_mouseDistanceMet:function(a){return Math.max(Math.abs(this._mouseDownEvent.pageX-
+a.pageX),Math.abs(this._mouseDownEvent.pageY-a.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return true}})})(jQuery);
+;/*
+ * jQuery UI Position 1.8.2
+ *
+ * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Position
+ */
+(function(c){c.ui=c.ui||{};var m=/left|center|right/,n=/top|center|bottom/,p=c.fn.position,q=c.fn.offset;c.fn.position=function(a){if(!a||!a.of)return p.apply(this,arguments);a=c.extend({},a);var b=c(a.of),d=(a.collision||"flip").split(" "),e=a.offset?a.offset.split(" "):[0,0],g,h,i;if(a.of.nodeType===9){g=b.width();h=b.height();i={top:0,left:0}}else if(a.of.scrollTo&&a.of.document){g=b.width();h=b.height();i={top:b.scrollTop(),left:b.scrollLeft()}}else if(a.of.preventDefault){a.at="left top";g=h=
+0;i={top:a.of.pageY,left:a.of.pageX}}else{g=b.outerWidth();h=b.outerHeight();i=b.offset()}c.each(["my","at"],function(){var f=(a[this]||"").split(" ");if(f.length===1)f=m.test(f[0])?f.concat(["center"]):n.test(f[0])?["center"].concat(f):["center","center"];f[0]=m.test(f[0])?f[0]:"center";f[1]=n.test(f[1])?f[1]:"center";a[this]=f});if(d.length===1)d[1]=d[0];e[0]=parseInt(e[0],10)||0;if(e.length===1)e[1]=e[0];e[1]=parseInt(e[1],10)||0;if(a.at[0]==="right")i.left+=g;else if(a.at[0]==="center")i.left+=
+g/2;if(a.at[1]==="bottom")i.top+=h;else if(a.at[1]==="center")i.top+=h/2;i.left+=e[0];i.top+=e[1];return this.each(function(){var f=c(this),k=f.outerWidth(),l=f.outerHeight(),j=c.extend({},i);if(a.my[0]==="right")j.left-=k;else if(a.my[0]==="center")j.left-=k/2;if(a.my[1]==="bottom")j.top-=l;else if(a.my[1]==="center")j.top-=l/2;j.left=parseInt(j.left);j.top=parseInt(j.top);c.each(["left","top"],function(o,r){c.ui.position[d[o]]&&c.ui.position[d[o]][r](j,{targetWidth:g,targetHeight:h,elemWidth:k,
+elemHeight:l,offset:e,my:a.my,at:a.at})});c.fn.bgiframe&&f.bgiframe();f.offset(c.extend(j,{using:a.using}))})};c.ui.position={fit:{left:function(a,b){var d=c(window);b=a.left+b.elemWidth-d.width()-d.scrollLeft();a.left=b>0?a.left-b:Math.max(0,a.left)},top:function(a,b){var d=c(window);b=a.top+b.elemHeight-d.height()-d.scrollTop();a.top=b>0?a.top-b:Math.max(0,a.top)}},flip:{left:function(a,b){if(b.at[0]!=="center"){var d=c(window);d=a.left+b.elemWidth-d.width()-d.scrollLeft();var e=b.my[0]==="left"?
+-b.elemWidth:b.my[0]==="right"?b.elemWidth:0,g=-2*b.offset[0];a.left+=a.left<0?e+b.targetWidth+g:d>0?e-b.targetWidth+g:0}},top:function(a,b){if(b.at[1]!=="center"){var d=c(window);d=a.top+b.elemHeight-d.height()-d.scrollTop();var e=b.my[1]==="top"?-b.elemHeight:b.my[1]==="bottom"?b.elemHeight:0,g=b.at[1]==="top"?b.targetHeight:-b.targetHeight,h=-2*b.offset[1];a.top+=a.top<0?e+b.targetHeight+h:d>0?e+g+h:0}}}};if(!c.offset.setOffset){c.offset.setOffset=function(a,b){if(/static/.test(c.curCSS(a,"position")))a.style.position=
+"relative";var d=c(a),e=d.offset(),g=parseInt(c.curCSS(a,"top",true),10)||0,h=parseInt(c.curCSS(a,"left",true),10)||0;e={top:b.top-e.top+g,left:b.left-e.left+h};"using"in b?b.using.call(a,e):d.css(e)};c.fn.offset=function(a){var b=this[0];if(!b||!b.ownerDocument)return null;if(a)return this.each(function(){c.offset.setOffset(this,a)});return q.call(this)}}})(jQuery);
+;/*
+ * jQuery UI Resizable 1.8.2
+ *
+ * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Resizables
+ *
+ * Depends:
+ *	jquery.ui.core.js
+ *	jquery.ui.mouse.js
+ *	jquery.ui.widget.js
+ */
+(function(d){d.widget("ui.resizable",d.ui.mouse,{widgetEventPrefix:"resize",options:{alsoResize:false,animate:false,animateDuration:"slow",animateEasing:"swing",aspectRatio:false,autoHide:false,containment:false,ghost:false,grid:false,handles:"e,s,se",helper:false,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:1E3},_create:function(){var b=this,a=this.options;this.element.addClass("ui-resizable");d.extend(this,{_aspectRatio:!!a.aspectRatio,aspectRatio:a.aspectRatio,originalElement:this.element,
+_proportionallyResizeElements:[],_helper:a.helper||a.ghost||a.animate?a.helper||"ui-resizable-helper":null});if(this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)){/relative/.test(this.element.css("position"))&&d.browser.opera&&this.element.css({position:"relative",top:"auto",left:"auto"});this.element.wrap(d('<div class="ui-wrapper" style="overflow: hidden;"></div>').css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),
+top:this.element.css("top"),left:this.element.css("left")}));this.element=this.element.parent().data("resizable",this.element.data("resizable"));this.elementIsWrapper=true;this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")});this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0});this.originalResizeStyle=
+this.originalElement.css("resize");this.originalElement.css("resize","none");this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"}));this.originalElement.css({margin:this.originalElement.css("margin")});this._proportionallyResize()}this.handles=a.handles||(!d(".ui-resizable-handle",this.element).length?"e,s,se":{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",
+nw:".ui-resizable-nw"});if(this.handles.constructor==String){if(this.handles=="all")this.handles="n,e,s,w,se,sw,ne,nw";var c=this.handles.split(",");this.handles={};for(var e=0;e<c.length;e++){var g=d.trim(c[e]),f=d('<div class="ui-resizable-handle '+("ui-resizable-"+g)+'"></div>');/sw|se|ne|nw/.test(g)&&f.css({zIndex:++a.zIndex});"se"==g&&f.addClass("ui-icon ui-icon-gripsmall-diagonal-se");this.handles[g]=".ui-resizable-"+g;this.element.append(f)}}this._renderAxis=function(h){h=h||this.element;for(var i in this.handles){if(this.handles[i].constructor==
+String)this.handles[i]=d(this.handles[i],this.element).show();if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var j=d(this.handles[i],this.element),l=0;l=/sw|ne|nw|se|n|s/.test(i)?j.outerHeight():j.outerWidth();j=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join("");h.css(j,l);this._proportionallyResize()}d(this.handles[i])}};this._renderAxis(this.element);this._handles=d(".ui-resizable-handle",this.element).disableSelection();
+this._handles.mouseover(function(){if(!b.resizing){if(this.className)var h=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i);b.axis=h&&h[1]?h[1]:"se"}});if(a.autoHide){this._handles.hide();d(this.element).addClass("ui-resizable-autohide").hover(function(){d(this).removeClass("ui-resizable-autohide");b._handles.show()},function(){if(!b.resizing){d(this).addClass("ui-resizable-autohide");b._handles.hide()}})}this._mouseInit()},destroy:function(){this._mouseDestroy();var b=function(c){d(c).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};
+if(this.elementIsWrapper){b(this.element);var a=this.element;a.after(this.originalElement.css({position:a.css("position"),width:a.outerWidth(),height:a.outerHeight(),top:a.css("top"),left:a.css("left")})).remove()}this.originalElement.css("resize",this.originalResizeStyle);b(this.originalElement);return this},_mouseCapture:function(b){var a=false;for(var c in this.handles)if(d(this.handles[c])[0]==b.target)a=true;return!this.options.disabled&&a},_mouseStart:function(b){var a=this.options,c=this.element.position(),
+e=this.element;this.resizing=true;this.documentScroll={top:d(document).scrollTop(),left:d(document).scrollLeft()};if(e.is(".ui-draggable")||/absolute/.test(e.css("position")))e.css({position:"absolute",top:c.top,left:c.left});d.browser.opera&&/relative/.test(e.css("position"))&&e.css({position:"relative",top:"auto",left:"auto"});this._renderProxy();c=m(this.helper.css("left"));var g=m(this.helper.css("top"));if(a.containment){c+=d(a.containment).scrollLeft()||0;g+=d(a.containment).scrollTop()||0}this.offset=
+this.helper.offset();this.position={left:c,top:g};this.size=this._helper?{width:e.outerWidth(),height:e.outerHeight()}:{width:e.width(),height:e.height()};this.originalSize=this._helper?{width:e.outerWidth(),height:e.outerHeight()}:{width:e.width(),height:e.height()};this.originalPosition={left:c,top:g};this.sizeDiff={width:e.outerWidth()-e.width(),height:e.outerHeight()-e.height()};this.originalMousePosition={left:b.pageX,top:b.pageY};this.aspectRatio=typeof a.aspectRatio=="number"?a.aspectRatio:
+this.originalSize.width/this.originalSize.height||1;a=d(".ui-resizable-"+this.axis).css("cursor");d("body").css("cursor",a=="auto"?this.axis+"-resize":a);e.addClass("ui-resizable-resizing");this._propagate("start",b);return true},_mouseDrag:function(b){var a=this.helper,c=this.originalMousePosition,e=this._change[this.axis];if(!e)return false;c=e.apply(this,[b,b.pageX-c.left||0,b.pageY-c.top||0]);if(this._aspectRatio||b.shiftKey)c=this._updateRatio(c,b);c=this._respectSize(c,b);this._propagate("resize",
+b);a.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"});!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize();this._updateCache(c);this._trigger("resize",b,this.ui());return false},_mouseStop:function(b){this.resizing=false;var a=this.options,c=this;if(this._helper){var e=this._proportionallyResizeElements,g=e.length&&/textarea/i.test(e[0].nodeName);e=g&&d.ui.hasScroll(e[0],"left")?0:c.sizeDiff.height;
+g={width:c.size.width-(g?0:c.sizeDiff.width),height:c.size.height-e};e=parseInt(c.element.css("left"),10)+(c.position.left-c.originalPosition.left)||null;var f=parseInt(c.element.css("top"),10)+(c.position.top-c.originalPosition.top)||null;a.animate||this.element.css(d.extend(g,{top:f,left:e}));c.helper.height(c.size.height);c.helper.width(c.size.width);this._helper&&!a.animate&&this._proportionallyResize()}d("body").css("cursor","auto");this.element.removeClass("ui-resizable-resizing");this._propagate("stop",
+b);this._helper&&this.helper.remove();return false},_updateCache:function(b){this.offset=this.helper.offset();if(k(b.left))this.position.left=b.left;if(k(b.top))this.position.top=b.top;if(k(b.height))this.size.height=b.height;if(k(b.width))this.size.width=b.width},_updateRatio:function(b){var a=this.position,c=this.size,e=this.axis;if(b.height)b.width=c.height*this.aspectRatio;else if(b.width)b.height=c.width/this.aspectRatio;if(e=="sw"){b.left=a.left+(c.width-b.width);b.top=null}if(e=="nw"){b.top=
+a.top+(c.height-b.height);b.left=a.left+(c.width-b.width)}return b},_respectSize:function(b){var a=this.options,c=this.axis,e=k(b.width)&&a.maxWidth&&a.maxWidth<b.width,g=k(b.height)&&a.maxHeight&&a.maxHeight<b.height,f=k(b.width)&&a.minWidth&&a.minWidth>b.width,h=k(b.height)&&a.minHeight&&a.minHeight>b.height;if(f)b.width=a.minWidth;if(h)b.height=a.minHeight;if(e)b.width=a.maxWidth;if(g)b.height=a.maxHeight;var i=this.originalPosition.left+this.originalSize.width,j=this.position.top+this.size.height,
+l=/sw|nw|w/.test(c);c=/nw|ne|n/.test(c);if(f&&l)b.left=i-a.minWidth;if(e&&l)b.left=i-a.maxWidth;if(h&&c)b.top=j-a.minHeight;if(g&&c)b.top=j-a.maxHeight;if((a=!b.width&&!b.height)&&!b.left&&b.top)b.top=null;else if(a&&!b.top&&b.left)b.left=null;return b},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var b=this.helper||this.element,a=0;a<this._proportionallyResizeElements.length;a++){var c=this._proportionallyResizeElements[a];if(!this.borderDif){var e=[c.css("borderTopWidth"),
+c.css("borderRightWidth"),c.css("borderBottomWidth"),c.css("borderLeftWidth")],g=[c.css("paddingTop"),c.css("paddingRight"),c.css("paddingBottom"),c.css("paddingLeft")];this.borderDif=d.map(e,function(f,h){f=parseInt(f,10)||0;h=parseInt(g[h],10)||0;return f+h})}d.browser.msie&&(d(b).is(":hidden")||d(b).parents(":hidden").length)||c.css({height:b.height()-this.borderDif[0]-this.borderDif[2]||0,width:b.width()-this.borderDif[1]-this.borderDif[3]||0})}},_renderProxy:function(){var b=this.options;this.elementOffset=
+this.element.offset();if(this._helper){this.helper=this.helper||d('<div style="overflow:hidden;"></div>');var a=d.browser.msie&&d.browser.version<7,c=a?1:0;a=a?2:-1;this.helper.addClass(this._helper).css({width:this.element.outerWidth()+a,height:this.element.outerHeight()+a,position:"absolute",left:this.elementOffset.left-c+"px",top:this.elementOffset.top-c+"px",zIndex:++b.zIndex});this.helper.appendTo("body").disableSelection()}else this.helper=this.element},_change:{e:function(b,a){return{width:this.originalSize.width+
+a}},w:function(b,a){return{left:this.originalPosition.left+a,width:this.originalSize.width-a}},n:function(b,a,c){return{top:this.originalPosition.top+c,height:this.originalSize.height-c}},s:function(b,a,c){return{height:this.originalSize.height+c}},se:function(b,a,c){return d.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[b,a,c]))},sw:function(b,a,c){return d.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[b,a,c]))},ne:function(b,a,c){return d.extend(this._change.n.apply(this,
+arguments),this._change.e.apply(this,[b,a,c]))},nw:function(b,a,c){return d.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[b,a,c]))}},_propagate:function(b,a){d.ui.plugin.call(this,b,[a,this.ui()]);b!="resize"&&this._trigger(b,a,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}});d.extend(d.ui.resizable,
+{version:"1.8.2"});d.ui.plugin.add("resizable","alsoResize",{start:function(){var b=d(this).data("resizable").options,a=function(c){d(c).each(function(){d(this).data("resizable-alsoresize",{width:parseInt(d(this).width(),10),height:parseInt(d(this).height(),10),left:parseInt(d(this).css("left"),10),top:parseInt(d(this).css("top"),10)})})};if(typeof b.alsoResize=="object"&&!b.alsoResize.parentNode)if(b.alsoResize.length){b.alsoResize=b.alsoResize[0];a(b.alsoResize)}else d.each(b.alsoResize,function(c){a(c)});
+else a(b.alsoResize)},resize:function(){var b=d(this).data("resizable"),a=b.options,c=b.originalSize,e=b.originalPosition,g={height:b.size.height-c.height||0,width:b.size.width-c.width||0,top:b.position.top-e.top||0,left:b.position.left-e.left||0},f=function(h,i){d(h).each(function(){var j=d(this),l=d(this).data("resizable-alsoresize"),p={};d.each((i&&i.length?i:["width","height","top","left"])||["width","height","top","left"],function(n,o){if((n=(l[o]||0)+(g[o]||0))&&n>=0)p[o]=n||null});if(/relative/.test(j.css("position"))&&
+d.browser.opera){b._revertToRelativePosition=true;j.css({position:"absolute",top:"auto",left:"auto"})}j.css(p)})};typeof a.alsoResize=="object"&&!a.alsoResize.nodeType?d.each(a.alsoResize,function(h,i){f(h,i)}):f(a.alsoResize)},stop:function(){var b=d(this).data("resizable");if(b._revertToRelativePosition&&d.browser.opera){b._revertToRelativePosition=false;el.css({position:"relative"})}d(this).removeData("resizable-alsoresize-start")}});d.ui.plugin.add("resizable","animate",{stop:function(b){var a=
+d(this).data("resizable"),c=a.options,e=a._proportionallyResizeElements,g=e.length&&/textarea/i.test(e[0].nodeName),f=g&&d.ui.hasScroll(e[0],"left")?0:a.sizeDiff.height;g={width:a.size.width-(g?0:a.sizeDiff.width),height:a.size.height-f};f=parseInt(a.element.css("left"),10)+(a.position.left-a.originalPosition.left)||null;var h=parseInt(a.element.css("top"),10)+(a.position.top-a.originalPosition.top)||null;a.element.animate(d.extend(g,h&&f?{top:h,left:f}:{}),{duration:c.animateDuration,easing:c.animateEasing,
+step:function(){var i={width:parseInt(a.element.css("width"),10),height:parseInt(a.element.css("height"),10),top:parseInt(a.element.css("top"),10),left:parseInt(a.element.css("left"),10)};e&&e.length&&d(e[0]).css({width:i.width,height:i.height});a._updateCache(i);a._propagate("resize",b)}})}});d.ui.plugin.add("resizable","containment",{start:function(){var b=d(this).data("resizable"),a=b.element,c=b.options.containment;if(a=c instanceof d?c.get(0):/parent/.test(c)?a.parent().get(0):c){b.containerElement=
+d(a);if(/document/.test(c)||c==document){b.containerOffset={left:0,top:0};b.containerPosition={left:0,top:0};b.parentData={element:d(document),left:0,top:0,width:d(document).width(),height:d(document).height()||document.body.parentNode.scrollHeight}}else{var e=d(a),g=[];d(["Top","Right","Left","Bottom"]).each(function(i,j){g[i]=m(e.css("padding"+j))});b.containerOffset=e.offset();b.containerPosition=e.position();b.containerSize={height:e.innerHeight()-g[3],width:e.innerWidth()-g[1]};c=b.containerOffset;
+var f=b.containerSize.height,h=b.containerSize.width;h=d.ui.hasScroll(a,"left")?a.scrollWidth:h;f=d.ui.hasScroll(a)?a.scrollHeight:f;b.parentData={element:a,left:c.left,top:c.top,width:h,height:f}}}},resize:function(b){var a=d(this).data("resizable"),c=a.options,e=a.containerOffset,g=a.position;b=a._aspectRatio||b.shiftKey;var f={top:0,left:0},h=a.containerElement;if(h[0]!=document&&/static/.test(h.css("position")))f=e;if(g.left<(a._helper?e.left:0)){a.size.width+=a._helper?a.position.left-e.left:
+a.position.left-f.left;if(b)a.size.height=a.size.width/c.aspectRatio;a.position.left=c.helper?e.left:0}if(g.top<(a._helper?e.top:0)){a.size.height+=a._helper?a.position.top-e.top:a.position.top;if(b)a.size.width=a.size.height*c.aspectRatio;a.position.top=a._helper?e.top:0}a.offset.left=a.parentData.left+a.position.left;a.offset.top=a.parentData.top+a.position.top;c=Math.abs((a._helper?a.offset.left-f.left:a.offset.left-f.left)+a.sizeDiff.width);e=Math.abs((a._helper?a.offset.top-f.top:a.offset.top-
+e.top)+a.sizeDiff.height);g=a.containerElement.get(0)==a.element.parent().get(0);f=/relative|absolute/.test(a.containerElement.css("position"));if(g&&f)c-=a.parentData.left;if(c+a.size.width>=a.parentData.width){a.size.width=a.parentData.width-c;if(b)a.size.height=a.size.width/a.aspectRatio}if(e+a.size.height>=a.parentData.height){a.size.height=a.parentData.height-e;if(b)a.size.width=a.size.height*a.aspectRatio}},stop:function(){var b=d(this).data("resizable"),a=b.options,c=b.containerOffset,e=b.containerPosition,
+g=b.containerElement,f=d(b.helper),h=f.offset(),i=f.outerWidth()-b.sizeDiff.width;f=f.outerHeight()-b.sizeDiff.height;b._helper&&!a.animate&&/relative/.test(g.css("position"))&&d(this).css({left:h.left-e.left-c.left,width:i,height:f});b._helper&&!a.animate&&/static/.test(g.css("position"))&&d(this).css({left:h.left-e.left-c.left,width:i,height:f})}});d.ui.plugin.add("resizable","ghost",{start:function(){var b=d(this).data("resizable"),a=b.options,c=b.size;b.ghost=b.originalElement.clone();b.ghost.css({opacity:0.25,
+display:"block",position:"relative",height:c.height,width:c.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof a.ghost=="string"?a.ghost:"");b.ghost.appendTo(b.helper)},resize:function(){var b=d(this).data("resizable");b.ghost&&b.ghost.css({position:"relative",height:b.size.height,width:b.size.width})},stop:function(){var b=d(this).data("resizable");b.ghost&&b.helper&&b.helper.get(0).removeChild(b.ghost.get(0))}});d.ui.plugin.add("resizable","grid",{resize:function(){var b=
+d(this).data("resizable"),a=b.options,c=b.size,e=b.originalSize,g=b.originalPosition,f=b.axis;a.grid=typeof a.grid=="number"?[a.grid,a.grid]:a.grid;var h=Math.round((c.width-e.width)/(a.grid[0]||1))*(a.grid[0]||1);a=Math.round((c.height-e.height)/(a.grid[1]||1))*(a.grid[1]||1);if(/^(se|s|e)$/.test(f)){b.size.width=e.width+h;b.size.height=e.height+a}else if(/^(ne)$/.test(f)){b.size.width=e.width+h;b.size.height=e.height+a;b.position.top=g.top-a}else{if(/^(sw)$/.test(f)){b.size.width=e.width+h;b.size.height=
+e.height+a}else{b.size.width=e.width+h;b.size.height=e.height+a;b.position.top=g.top-a}b.position.left=g.left-h}}});var m=function(b){return parseInt(b,10)||0},k=function(b){return!isNaN(parseInt(b,10))}})(jQuery);
+;
+/*
+ * jQuery UI Selectable 1.8.2
+ *
+ * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Selectables
+ *
+ * Depends:
+ *	jquery.ui.core.js
+ *	jquery.ui.mouse.js
+ *	jquery.ui.widget.js
+ */
+(function(e){e.widget("ui.selectable",e.ui.mouse,{options:{appendTo:"body",autoRefresh:true,distance:0,filter:"*",tolerance:"touch"},_create:function(){var c=this;this.element.addClass("ui-selectable");this.dragged=false;var f;this.refresh=function(){f=e(c.options.filter,c.element[0]);f.each(function(){var d=e(this),b=d.offset();e.data(this,"selectable-item",{element:this,$element:d,left:b.left,top:b.top,right:b.left+d.outerWidth(),bottom:b.top+d.outerHeight(),startselected:false,selected:d.hasClass("ui-selected"),
+selecting:d.hasClass("ui-selecting"),unselecting:d.hasClass("ui-unselecting")})})};this.refresh();this.selectees=f.addClass("ui-selectee");this._mouseInit();this.helper=e("<div class='ui-selectable-helper'></div>")},destroy:function(){this.selectees.removeClass("ui-selectee").removeData("selectable-item");this.element.removeClass("ui-selectable ui-selectable-disabled").removeData("selectable").unbind(".selectable");this._mouseDestroy();return this},_mouseStart:function(c){var f=this;this.opos=[c.pageX,
+c.pageY];if(!this.options.disabled){var d=this.options;this.selectees=e(d.filter,this.element[0]);this._trigger("start",c);e(d.appendTo).append(this.helper);this.helper.css({"z-index":100,position:"absolute",left:c.clientX,top:c.clientY,width:0,height:0});d.autoRefresh&&this.refresh();this.selectees.filter(".ui-selected").each(function(){var b=e.data(this,"selectable-item");b.startselected=true;if(!c.metaKey){b.$element.removeClass("ui-selected");b.selected=false;b.$element.addClass("ui-unselecting");
+b.unselecting=true;f._trigger("unselecting",c,{unselecting:b.element})}});e(c.target).parents().andSelf().each(function(){var b=e.data(this,"selectable-item");if(b){var g=!c.metaKey||!b.$element.hasClass("ui-selected");b.$element.removeClass(g?"ui-unselecting":"ui-selected").addClass(g?"ui-selecting":"ui-unselecting");b.unselecting=!g;b.selecting=g;(b.selected=g)?f._trigger("selecting",c,{selecting:b.element}):f._trigger("unselecting",c,{unselecting:b.element});return false}})}},_mouseDrag:function(c){var f=
+this;this.dragged=true;if(!this.options.disabled){var d=this.options,b=this.opos[0],g=this.opos[1],h=c.pageX,i=c.pageY;if(b>h){var j=h;h=b;b=j}if(g>i){j=i;i=g;g=j}this.helper.css({left:b,top:g,width:h-b,height:i-g});this.selectees.each(function(){var a=e.data(this,"selectable-item");if(!(!a||a.element==f.element[0])){var k=false;if(d.tolerance=="touch")k=!(a.left>h||a.right<b||a.top>i||a.bottom<g);else if(d.tolerance=="fit")k=a.left>b&&a.right<h&&a.top>g&&a.bottom<i;if(k){if(a.selected){a.$element.removeClass("ui-selected");
+a.selected=false}if(a.unselecting){a.$element.removeClass("ui-unselecting");a.unselecting=false}if(!a.selecting){a.$element.addClass("ui-selecting");a.selecting=true;f._trigger("selecting",c,{selecting:a.element})}}else{if(a.selecting)if(c.metaKey&&a.startselected){a.$element.removeClass("ui-selecting");a.selecting=false;a.$element.addClass("ui-selected");a.selected=true}else{a.$element.removeClass("ui-selecting");a.selecting=false;if(a.startselected){a.$element.addClass("ui-unselecting");a.unselecting=
+true}f._trigger("unselecting",c,{unselecting:a.element})}if(a.selected)if(!c.metaKey&&!a.startselected){a.$element.removeClass("ui-selected");a.selected=false;a.$element.addClass("ui-unselecting");a.unselecting=true;f._trigger("unselecting",c,{unselecting:a.element})}}}});return false}},_mouseStop:function(c){var f=this;this.dragged=false;e(".ui-unselecting",this.element[0]).each(function(){var d=e.data(this,"selectable-item");d.$element.removeClass("ui-unselecting");d.unselecting=false;d.startselected=
+false;f._trigger("unselected",c,{unselected:d.element})});e(".ui-selecting",this.element[0]).each(function(){var d=e.data(this,"selectable-item");d.$element.removeClass("ui-selecting").addClass("ui-selected");d.selecting=false;d.selected=true;d.startselected=true;f._trigger("selected",c,{selected:d.element})});this._trigger("stop",c);this.helper.remove();return false}});e.extend(e.ui.selectable,{version:"1.8.2"})})(jQuery);
+ 
+(function(e){e.widget("ui.selectable",e.ui.mouse,{options:{appendTo:"body",autoRefresh:true,distance:0,filter:"*",tolerance:"touch"},_create:function(){var c=this;this.element.addClass("ui-selectable");this.dragged=false;var f;this.refresh=function(){f=e(c.options.filter,c.element[0]);f.each(function(){var d=e(this),b=d.offset();e.data(this,"selectable-item",{element:this,$element:d,left:b.left,top:b.top,right:b.left+d.outerWidth(),bottom:b.top+d.outerHeight(),startselected:false,selected:d.hasClass("ui-selected"),
+selecting:d.hasClass("ui-selecting"),unselecting:d.hasClass("ui-unselecting")})})};this.refresh();this.selectees=f.addClass("ui-selectee");this._mouseInit();this.helper=e("<div class='ui-selectable-helper'></div>")},destroy:function(){this.selectees.removeClass("ui-selectee").removeData("selectable-item");this.element.removeClass("ui-selectable ui-selectable-disabled").removeData("selectable").unbind(".selectable");this._mouseDestroy();return this},_mouseStart:function(c){var f=this;this.opos=[c.pageX,
+c.pageY];if(!this.options.disabled){var d=this.options;this.selectees=e(d.filter,this.element[0]);this._trigger("start",c);e(d.appendTo).append(this.helper);this.helper.css({"z-index":100,position:"absolute",left:c.clientX,top:c.clientY,width:0,height:0});d.autoRefresh&&this.refresh();this.selectees.filter(".ui-selected").each(function(){var b=e.data(this,"selectable-item");b.startselected=true;if(!c.metaKey){b.$element.removeClass("ui-selected");b.selected=false;b.$element.addClass("ui-unselecting");
+b.unselecting=true;f._trigger("unselecting",c,{unselecting:b.element})}});e(c.target).parents().andSelf().each(function(){var b=e.data(this,"selectable-item");if(b){var g=!c.metaKey||!b.$element.hasClass("ui-selected");b.$element.removeClass(g?"ui-unselecting":"ui-selected").addClass(g?"ui-selecting":"ui-unselecting");b.unselecting=!g;b.selecting=g;(b.selected=g)?f._trigger("selecting",c,{selecting:b.element}):f._trigger("unselecting",c,{unselecting:b.element});return false}})}},_mouseDrag:function(c){var f=
+this;this.dragged=true;if(!this.options.disabled){var d=this.options,b=this.opos[0],g=this.opos[1],h=c.pageX,i=c.pageY;if(b>h){var j=h;h=b;b=j}if(g>i){j=i;i=g;g=j}this.helper.css({left:b,top:g,width:h-b,height:i-g});this.selectees.each(function(){var a=e.data(this,"selectable-item");if(!(!a||a.element==f.element[0])){var k=false;if(d.tolerance=="touch")k=!(a.left>h||a.right<b||a.top>i||a.bottom<g);else if(d.tolerance=="fit")k=a.left>b&&a.right<h&&a.top>g&&a.bottom<i;if(k){if(a.selected){a.$element.removeClass("ui-selected");
+a.selected=false}if(a.unselecting){a.$element.removeClass("ui-unselecting");a.unselecting=false}if(!a.selecting){a.$element.addClass("ui-selecting");a.selecting=true;f._trigger("selecting",c,{selecting:a.element})}}else{if(a.selecting)if(c.metaKey&&a.startselected){a.$element.removeClass("ui-selecting");a.selecting=false;a.$element.addClass("ui-selected");a.selected=true}else{a.$element.removeClass("ui-selecting");a.selecting=false;if(a.startselected){a.$element.addClass("ui-unselecting");a.unselecting=
+true}f._trigger("unselecting",c,{unselecting:a.element})}if(a.selected)if(!c.metaKey&&!a.startselected){a.$element.removeClass("ui-selected");a.selected=false;a.$element.addClass("ui-unselecting");a.unselecting=true;f._trigger("unselecting",c,{unselecting:a.element})}}}});return false}},_mouseStop:function(c){var f=this;this.dragged=false;e(".ui-unselecting",this.element[0]).each(function(){var d=e.data(this,"selectable-item");d.$element.removeClass("ui-unselecting");d.unselecting=false;d.startselected=
+false;f._trigger("unselected",c,{unselected:d.element})});e(".ui-selecting",this.element[0]).each(function(){var d=e.data(this,"selectable-item");d.$element.removeClass("ui-selecting").addClass("ui-selected");d.selecting=false;d.selected=true;d.startselected=true;f._trigger("selected",c,{selected:d.element})});this._trigger("stop",c);this.helper.remove();return false}});e.extend(e.ui.selectable,{version:"1.8.2"})})(jQuery);
+;/*
+ * jQuery UI Autocomplete 1.8.2
+ *
+ * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Autocomplete
+ *
+ * Depends:
+ *	jquery.ui.core.js
+ *	jquery.ui.widget.js
+ *	jquery.ui.position.js
+ */
+(function(e){e.widget("ui.autocomplete",{options:{minLength:1,delay:300},_create:function(){var a=this,c=this.element[0].ownerDocument;this.element.addClass("ui-autocomplete-input").attr("autocomplete","off").attr({role:"textbox","aria-autocomplete":"list","aria-haspopup":"true"}).bind("keydown.autocomplete",function(d){var b=e.ui.keyCode;switch(d.keyCode){case b.PAGE_UP:a._move("previousPage",d);break;case b.PAGE_DOWN:a._move("nextPage",d);break;case b.UP:a._move("previous",d);d.preventDefault();
+break;case b.DOWN:a._move("next",d);d.preventDefault();break;case b.ENTER:case b.NUMPAD_ENTER:a.menu.active&&d.preventDefault();case b.TAB:if(!a.menu.active)return;a.menu.select(d);break;case b.ESCAPE:a.element.val(a.term);a.close(d);break;case b.LEFT:case b.RIGHT:case b.SHIFT:case b.CONTROL:case b.ALT:case b.COMMAND:case b.COMMAND_RIGHT:case b.INSERT:case b.CAPS_LOCK:case b.END:case b.HOME:break;default:clearTimeout(a.searching);a.searching=setTimeout(function(){a.search(null,d)},a.options.delay);
+break}}).bind("focus.autocomplete",function(){a.selectedItem=null;a.previous=a.element.val()}).bind("blur.autocomplete",function(d){clearTimeout(a.searching);a.closing=setTimeout(function(){a.close(d);a._change(d)},150)});this._initSource();this.response=function(){return a._response.apply(a,arguments)};this.menu=e("<ul></ul>").addClass("ui-autocomplete").appendTo("body",c).mousedown(function(){setTimeout(function(){clearTimeout(a.closing)},13)}).menu({focus:function(d,b){b=b.item.data("item.autocomplete");
+false!==a._trigger("focus",null,{item:b})&&/^key/.test(d.originalEvent.type)&&a.element.val(b.value)},selected:function(d,b){b=b.item.data("item.autocomplete");false!==a._trigger("select",d,{item:b})&&a.element.val(b.value);a.close(d);d=a.previous;if(a.element[0]!==c.activeElement){a.element.focus();a.previous=d}a.selectedItem=b},blur:function(){a.menu.element.is(":visible")&&a.element.val(a.term)}}).zIndex(this.element.zIndex()+1).css({top:0,left:0}).hide().data("menu");e.fn.bgiframe&&this.menu.element.bgiframe()},
+destroy:function(){this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete").removeAttr("role").removeAttr("aria-autocomplete").removeAttr("aria-haspopup");this.menu.element.remove();e.Widget.prototype.destroy.call(this)},_setOption:function(a){e.Widget.prototype._setOption.apply(this,arguments);a==="source"&&this._initSource()},_initSource:function(){var a,c;if(e.isArray(this.options.source)){a=this.options.source;this.source=function(d,b){b(e.ui.autocomplete.filter(a,d.term))}}else if(typeof this.options.source===
+"string"){c=this.options.source;this.source=function(d,b){e.getJSON(c,d,b)}}else this.source=this.options.source},search:function(a,c){a=a!=null?a:this.element.val();if(a.length<this.options.minLength)return this.close(c);clearTimeout(this.closing);if(this._trigger("search")!==false)return this._search(a)},_search:function(a){this.term=this.element.addClass("ui-autocomplete-loading").val();this.source({term:a},this.response)},_response:function(a){if(a.length){a=this._normalize(a);this._suggest(a);
+this._trigger("open")}else this.close();this.element.removeClass("ui-autocomplete-loading")},close:function(a){clearTimeout(this.closing);if(this.menu.element.is(":visible")){this._trigger("close",a);this.menu.element.hide();this.menu.deactivate()}},_change:function(a){this.previous!==this.element.val()&&this._trigger("change",a,{item:this.selectedItem})},_normalize:function(a){if(a.length&&a[0].label&&a[0].value)return a;return e.map(a,function(c){if(typeof c==="string")return{label:c,value:c};return e.extend({label:c.label||
+c.value,value:c.value||c.label},c)})},_suggest:function(a){var c=this.menu.element.empty().zIndex(this.element.zIndex()+1),d;this._renderMenu(c,a);this.menu.deactivate();this.menu.refresh();this.menu.element.show().position({my:"left top",at:"left bottom",of:this.element,collision:"none"});a=c.width("").width();d=this.element.width();c.width(Math.max(a,d))},_renderMenu:function(a,c){var d=this;e.each(c,function(b,f){d._renderItem(a,f)})},_renderItem:function(a,c){return e("<li></li>").data("item.autocomplete",
+c).append("<a>"+c.label+"</a>").appendTo(a)},_move:function(a,c){if(this.menu.element.is(":visible"))if(this.menu.first()&&/^previous/.test(a)||this.menu.last()&&/^next/.test(a)){this.element.val(this.term);this.menu.deactivate()}else this.menu[a](c);else this.search(null,c)},widget:function(){return this.menu.element}});e.extend(e.ui.autocomplete,{escapeRegex:function(a){return a.replace(/([\^\$\(\)\[\]\{\}\*\.\+\?\|\\])/gi,"\\$1")},filter:function(a,c){var d=new RegExp(e.ui.autocomplete.escapeRegex(c),
+"i");return e.grep(a,function(b){return d.test(b.label||b.value||b)})}})})(jQuery);
+(function(e){e.widget("ui.menu",{_create:function(){var a=this;this.element.addClass("ui-menu ui-widget ui-widget-content ui-corner-all").attr({role:"listbox","aria-activedescendant":"ui-active-menuitem"}).click(function(c){if(e(c.target).closest(".ui-menu-item a").length){c.preventDefault();a.select(c)}});this.refresh()},refresh:function(){var a=this;this.element.children("li:not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role","menuitem").children("a").addClass("ui-corner-all").attr("tabindex",
+-1).mouseenter(function(c){a.activate(c,e(this).parent())}).mouseleave(function(){a.deactivate()})},activate:function(a,c){this.deactivate();if(this.hasScroll()){var d=c.offset().top-this.element.offset().top,b=this.element.attr("scrollTop"),f=this.element.height();if(d<0)this.element.attr("scrollTop",b+d);else d>f&&this.element.attr("scrollTop",b+d-f+c.height())}this.active=c.eq(0).children("a").addClass("ui-state-hover").attr("id","ui-active-menuitem").end();this._trigger("focus",a,{item:c})},deactivate:function(){if(this.active){this.active.children("a").removeClass("ui-state-hover").removeAttr("id");
+this._trigger("blur");this.active=null}},next:function(a){this.move("next",".ui-menu-item:first",a)},previous:function(a){this.move("prev",".ui-menu-item:last",a)},first:function(){return this.active&&!this.active.prev().length},last:function(){return this.active&&!this.active.next().length},move:function(a,c,d){if(this.active){a=this.active[a+"All"](".ui-menu-item").eq(0);a.length?this.activate(d,a):this.activate(d,this.element.children(c))}else this.activate(d,this.element.children(c))},nextPage:function(a){if(this.hasScroll())if(!this.active||
+this.last())this.activate(a,this.element.children(":first"));else{var c=this.active.offset().top,d=this.element.height(),b=this.element.children("li").filter(function(){var f=e(this).offset().top-c-d+e(this).height();return f<10&&f>-10});b.length||(b=this.element.children(":last"));this.activate(a,b)}else this.activate(a,this.element.children(!this.active||this.last()?":first":":last"))},previousPage:function(a){if(this.hasScroll())if(!this.active||this.first())this.activate(a,this.element.children(":last"));
+else{var c=this.active.offset().top,d=this.element.height();result=this.element.children("li").filter(function(){var b=e(this).offset().top-c+d-e(this).height();return b<10&&b>-10});result.length||(result=this.element.children(":first"));this.activate(a,result)}else this.activate(a,this.element.children(!this.active||this.first()?":last":":first"))},hasScroll:function(){return this.element.height()<this.element.attr("scrollHeight")},select:function(a){this._trigger("selected",a,{item:this.active})}})})(jQuery);
+;/*
+ * jQuery UI Button 1.8.2
+ *
+ * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Button
+ *
+ * Depends:
+ *	jquery.ui.core.js
+ *	jquery.ui.widget.js
+ */
+(function(a){var g,i=function(b){a(":ui-button",b.target.form).each(function(){var c=a(this).data("button");setTimeout(function(){c.refresh()},1)})},h=function(b){var c=b.name,d=b.form,e=a([]);if(c)e=d?a(d).find("[name='"+c+"']"):a("[name='"+c+"']",b.ownerDocument).filter(function(){return!this.form});return e};a.widget("ui.button",{options:{text:true,label:null,icons:{primary:null,secondary:null}},_create:function(){this.element.closest("form").unbind("reset.button").bind("reset.button",i);this._determineButtonType();
+this.hasTitle=!!this.buttonElement.attr("title");var b=this,c=this.options,d=this.type==="checkbox"||this.type==="radio",e="ui-state-hover"+(!d?" ui-state-active":"");if(c.label===null)c.label=this.buttonElement.html();if(this.element.is(":disabled"))c.disabled=true;this.buttonElement.addClass("ui-button ui-widget ui-state-default ui-corner-all").attr("role","button").bind("mouseenter.button",function(){if(!c.disabled){a(this).addClass("ui-state-hover");this===g&&a(this).addClass("ui-state-active")}}).bind("mouseleave.button",
+function(){c.disabled||a(this).removeClass(e)}).bind("focus.button",function(){a(this).addClass("ui-state-focus")}).bind("blur.button",function(){a(this).removeClass("ui-state-focus")});d&&this.element.bind("change.button",function(){b.refresh()});if(this.type==="checkbox")this.buttonElement.bind("click.button",function(){if(c.disabled)return false;a(this).toggleClass("ui-state-active");b.buttonElement.attr("aria-pressed",b.element[0].checked)});else if(this.type==="radio")this.buttonElement.bind("click.button",
+function(){if(c.disabled)return false;a(this).addClass("ui-state-active");b.buttonElement.attr("aria-pressed",true);var f=b.element[0];h(f).not(f).map(function(){return a(this).button("widget")[0]}).removeClass("ui-state-active").attr("aria-pressed",false)});else{this.buttonElement.bind("mousedown.button",function(){if(c.disabled)return false;a(this).addClass("ui-state-active");g=this;a(document).one("mouseup",function(){g=null})}).bind("mouseup.button",function(){if(c.disabled)return false;a(this).removeClass("ui-state-active")}).bind("keydown.button",
+function(f){if(c.disabled)return false;if(f.keyCode==a.ui.keyCode.SPACE||f.keyCode==a.ui.keyCode.ENTER)a(this).addClass("ui-state-active")}).bind("keyup.button",function(){a(this).removeClass("ui-state-active")});this.buttonElement.is("a")&&this.buttonElement.keyup(function(f){f.keyCode===a.ui.keyCode.SPACE&&a(this).click()})}this._setOption("disabled",c.disabled)},_determineButtonType:function(){this.type=this.element.is(":checkbox")?"checkbox":this.element.is(":radio")?"radio":this.element.is("input")?
+"input":"button";if(this.type==="checkbox"||this.type==="radio"){this.buttonElement=this.element.parents().last().find("[for="+this.element.attr("id")+"]");this.element.addClass("ui-helper-hidden-accessible");var b=this.element.is(":checked");b&&this.buttonElement.addClass("ui-state-active");this.buttonElement.attr("aria-pressed",b)}else this.buttonElement=this.element},widget:function(){return this.buttonElement},destroy:function(){this.element.removeClass("ui-helper-hidden-accessible");this.buttonElement.removeClass("ui-button ui-widget ui-state-default ui-corner-all ui-state-hover ui-state-active  ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon ui-button-text-only").removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html());
+this.hasTitle||this.buttonElement.removeAttr("title");a.Widget.prototype.destroy.call(this)},_setOption:function(b,c){a.Widget.prototype._setOption.apply(this,arguments);if(b==="disabled")c?this.element.attr("disabled",true):this.element.removeAttr("disabled");this._resetButton()},refresh:function(){var b=this.element.is(":disabled");b!==this.options.disabled&&this._setOption("disabled",b);if(this.type==="radio")h(this.element[0]).each(function(){a(this).is(":checked")?a(this).button("widget").addClass("ui-state-active").attr("aria-pressed",
+true):a(this).button("widget").removeClass("ui-state-active").attr("aria-pressed",false)});else if(this.type==="checkbox")this.element.is(":checked")?this.buttonElement.addClass("ui-state-active").attr("aria-pressed",true):this.buttonElement.removeClass("ui-state-active").attr("aria-pressed",false)},_resetButton:function(){if(this.type==="input")this.options.label&&this.element.val(this.options.label);else{var b=this.buttonElement.removeClass("ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon ui-button-text-only"),
+c=a("<span></span>").addClass("ui-button-text").html(this.options.label).appendTo(b.empty()).text(),d=this.options.icons,e=d.primary&&d.secondary;if(d.primary||d.secondary){b.addClass("ui-button-text-icon"+(e?"s":""));d.primary&&b.prepend("<span class='ui-button-icon-primary ui-icon "+d.primary+"'></span>");d.secondary&&b.append("<span class='ui-button-icon-secondary ui-icon "+d.secondary+"'></span>");if(!this.options.text){b.addClass(e?"ui-button-icons-only":"ui-button-icon-only").removeClass("ui-button-text-icons ui-button-text-icon");
+this.hasTitle||b.attr("title",c)}}else b.addClass("ui-button-text-only")}}});a.widget("ui.buttonset",{_create:function(){this.element.addClass("ui-buttonset");this._init()},_init:function(){this.refresh()},_setOption:function(b,c){b==="disabled"&&this.buttons.button("option",b,c);a.Widget.prototype._setOption.apply(this,arguments)},refresh:function(){this.buttons=this.element.find(":button, :submit, :reset, :checkbox, :radio, a, :data(button)").filter(":ui-button").button("refresh").end().not(":ui-button").button().end().map(function(){return a(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass("ui-corner-left").end().filter(":last").addClass("ui-corner-right").end().end()},
+destroy:function(){this.element.removeClass("ui-buttonset");this.buttons.map(function(){return a(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy");a.Widget.prototype.destroy.call(this)}})})(jQuery);
+;/*
+ * jQuery UI Dialog 1.8.2
+ *
+ * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Dialog
+ *
+ * Depends:
+ *	jquery.ui.core.js
+ *	jquery.ui.widget.js
+ *  jquery.ui.button.js
+ *	jquery.ui.draggable.js
+ *	jquery.ui.mouse.js
+ *	jquery.ui.position.js
+ *	jquery.ui.resizable.js
+ */
+(function(c){c.widget("ui.dialog",{options:{autoOpen:true,buttons:{},closeOnEscape:true,closeText:"close",dialogClass:"",draggable:true,hide:null,height:"auto",maxHeight:false,maxWidth:false,minHeight:150,minWidth:150,modal:false,position:"center",resizable:true,show:null,stack:true,title:"",width:300,zIndex:1E3},_create:function(){this.originalTitle=this.element.attr("title");var a=this,b=a.options,d=b.title||a.originalTitle||"&#160;",e=c.ui.dialog.getTitleId(a.element),g=(a.uiDialog=c("<div></div>")).appendTo(document.body).hide().addClass("ui-dialog ui-widget ui-widget-content ui-corner-all "+
+b.dialogClass).css({zIndex:b.zIndex}).attr("tabIndex",-1).css("outline",0).keydown(function(i){if(b.closeOnEscape&&i.keyCode&&i.keyCode===c.ui.keyCode.ESCAPE){a.close(i);i.preventDefault()}}).attr({role:"dialog","aria-labelledby":e}).mousedown(function(i){a.moveToTop(false,i)});a.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(g);var f=(a.uiDialogTitlebar=c("<div></div>")).addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(g),
+h=c('<a href="#"></a>').addClass("ui-dialog-titlebar-close ui-corner-all").attr("role","button").hover(function(){h.addClass("ui-state-hover")},function(){h.removeClass("ui-state-hover")}).focus(function(){h.addClass("ui-state-focus")}).blur(function(){h.removeClass("ui-state-focus")}).click(function(i){a.close(i);return false}).appendTo(f);(a.uiDialogTitlebarCloseText=c("<span></span>")).addClass("ui-icon ui-icon-closethick").text(b.closeText).appendTo(h);c("<span></span>").addClass("ui-dialog-title").attr("id",
+e).html(d).prependTo(f);if(c.isFunction(b.beforeclose)&&!c.isFunction(b.beforeClose))b.beforeClose=b.beforeclose;f.find("*").add(f).disableSelection();b.draggable&&c.fn.draggable&&a._makeDraggable();b.resizable&&c.fn.resizable&&a._makeResizable();a._createButtons(b.buttons);a._isOpen=false;c.fn.bgiframe&&g.bgiframe()},_init:function(){this.options.autoOpen&&this.open()},destroy:function(){var a=this;a.overlay&&a.overlay.destroy();a.uiDialog.hide();a.element.unbind(".dialog").removeData("dialog").removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body");
+a.uiDialog.remove();a.originalTitle&&a.element.attr("title",a.originalTitle);return a},widget:function(){return this.uiDialog},close:function(a){var b=this,d;if(false!==b._trigger("beforeClose",a)){b.overlay&&b.overlay.destroy();b.uiDialog.unbind("keypress.ui-dialog");b._isOpen=false;if(b.options.hide)b.uiDialog.hide(b.options.hide,function(){b._trigger("close",a)});else{b.uiDialog.hide();b._trigger("close",a)}c.ui.dialog.overlay.resize();if(b.options.modal){d=0;c(".ui-dialog").each(function(){if(this!==
+b.uiDialog[0])d=Math.max(d,c(this).css("z-index"))});c.ui.dialog.maxZ=d}return b}},isOpen:function(){return this._isOpen},moveToTop:function(a,b){var d=this,e=d.options;if(e.modal&&!a||!e.stack&&!e.modal)return d._trigger("focus",b);if(e.zIndex>c.ui.dialog.maxZ)c.ui.dialog.maxZ=e.zIndex;if(d.overlay){c.ui.dialog.maxZ+=1;d.overlay.$el.css("z-index",c.ui.dialog.overlay.maxZ=c.ui.dialog.maxZ)}a={scrollTop:d.element.attr("scrollTop"),scrollLeft:d.element.attr("scrollLeft")};c.ui.dialog.maxZ+=1;d.uiDialog.css("z-index",
+c.ui.dialog.maxZ);d.element.attr(a);d._trigger("focus",b);return d},open:function(){if(!this._isOpen){var a=this,b=a.options,d=a.uiDialog;a.overlay=b.modal?new c.ui.dialog.overlay(a):null;d.next().length&&d.appendTo("body");a._size();a._position(b.position);d.show(b.show);a.moveToTop(true);b.modal&&d.bind("keypress.ui-dialog",function(e){if(e.keyCode===c.ui.keyCode.TAB){var g=c(":tabbable",this),f=g.filter(":first");g=g.filter(":last");if(e.target===g[0]&&!e.shiftKey){f.focus(1);return false}else if(e.target===
+f[0]&&e.shiftKey){g.focus(1);return false}}});c([]).add(d.find(".ui-dialog-content :tabbable:first")).add(d.find(".ui-dialog-buttonpane :tabbable:first")).add(d).filter(":first").focus();a._trigger("open");a._isOpen=true;return a}},_createButtons:function(a){var b=this,d=false,e=c("<div></div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix");b.uiDialog.find(".ui-dialog-buttonpane").remove();typeof a==="object"&&a!==null&&c.each(a,function(){return!(d=true)});if(d){c.each(a,
+function(g,f){g=c('<button type="button"></button>').text(g).click(function(){f.apply(b.element[0],arguments)}).appendTo(e);c.fn.button&&g.button()});e.appendTo(b.uiDialog)}},_makeDraggable:function(){function a(f){return{position:f.position,offset:f.offset}}var b=this,d=b.options,e=c(document),g;b.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(f,h){g=d.height==="auto"?"auto":c(this).height();c(this).height(c(this).height()).addClass("ui-dialog-dragging");
+b._trigger("dragStart",f,a(h))},drag:function(f,h){b._trigger("drag",f,a(h))},stop:function(f,h){d.position=[h.position.left-e.scrollLeft(),h.position.top-e.scrollTop()];c(this).removeClass("ui-dialog-dragging").height(g);b._trigger("dragStop",f,a(h));c.ui.dialog.overlay.resize()}})},_makeResizable:function(a){function b(f){return{originalPosition:f.originalPosition,originalSize:f.originalSize,position:f.position,size:f.size}}a=a===undefined?this.options.resizable:a;var d=this,e=d.options,g=d.uiDialog.css("position");
+a=typeof a==="string"?a:"n,e,s,w,se,sw,ne,nw";d.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:d.element,maxWidth:e.maxWidth,maxHeight:e.maxHeight,minWidth:e.minWidth,minHeight:d._minHeight(),handles:a,start:function(f,h){c(this).addClass("ui-dialog-resizing");d._trigger("resizeStart",f,b(h))},resize:function(f,h){d._trigger("resize",f,b(h))},stop:function(f,h){c(this).removeClass("ui-dialog-resizing");e.height=c(this).height();e.width=c(this).width();d._trigger("resizeStop",
+f,b(h));c.ui.dialog.overlay.resize()}}).css("position",g).find(".ui-resizable-se").addClass("ui-icon ui-icon-grip-diagonal-se")},_minHeight:function(){var a=this.options;return a.height==="auto"?a.minHeight:Math.min(a.minHeight,a.height)},_position:function(a){var b=[],d=[0,0];a=a||c.ui.dialog.prototype.options.position;if(typeof a==="string"||typeof a==="object"&&"0"in a){b=a.split?a.split(" "):[a[0],a[1]];if(b.length===1)b[1]=b[0];c.each(["left","top"],function(e,g){if(+b[e]===b[e]){d[e]=b[e];b[e]=
+g}})}else if(typeof a==="object"){if("left"in a){b[0]="left";d[0]=a.left}else if("right"in a){b[0]="right";d[0]=-a.right}if("top"in a){b[1]="top";d[1]=a.top}else if("bottom"in a){b[1]="bottom";d[1]=-a.bottom}}(a=this.uiDialog.is(":visible"))||this.uiDialog.show();this.uiDialog.css({top:0,left:0}).position({my:b.join(" "),at:b.join(" "),offset:d.join(" "),of:window,collision:"fit",using:function(e){var g=c(this).css(e).offset().top;g<0&&c(this).css("top",e.top-g)}});a||this.uiDialog.hide()},_setOption:function(a,
+b){var d=this,e=d.uiDialog,g=e.is(":data(resizable)"),f=false;switch(a){case "beforeclose":a="beforeClose";break;case "buttons":d._createButtons(b);break;case "closeText":d.uiDialogTitlebarCloseText.text(""+b);break;case "dialogClass":e.removeClass(d.options.dialogClass).addClass("ui-dialog ui-widget ui-widget-content ui-corner-all "+b);break;case "disabled":b?e.addClass("ui-dialog-disabled"):e.removeClass("ui-dialog-disabled");break;case "draggable":b?d._makeDraggable():e.draggable("destroy");break;
+case "height":f=true;break;case "maxHeight":g&&e.resizable("option","maxHeight",b);f=true;break;case "maxWidth":g&&e.resizable("option","maxWidth",b);f=true;break;case "minHeight":g&&e.resizable("option","minHeight",b);f=true;break;case "minWidth":g&&e.resizable("option","minWidth",b);f=true;break;case "position":d._position(b);break;case "resizable":g&&!b&&e.resizable("destroy");g&&typeof b==="string"&&e.resizable("option","handles",b);!g&&b!==false&&d._makeResizable(b);break;case "title":c(".ui-dialog-title",
+d.uiDialogTitlebar).html(""+(b||"&#160;"));break;case "width":f=true;break}c.Widget.prototype._setOption.apply(d,arguments);f&&d._size()},_size:function(){var a=this.options,b;this.element.css({width:"auto",minHeight:0,height:0});b=this.uiDialog.css({height:"auto",width:a.width}).height();this.element.css(a.height==="auto"?{minHeight:Math.max(a.minHeight-b,0),height:"auto"}:{minHeight:0,height:Math.max(a.height-b,0)}).show();this.uiDialog.is(":data(resizable)")&&this.uiDialog.resizable("option","minHeight",
+this._minHeight())}});c.extend(c.ui.dialog,{version:"1.8.2",uuid:0,maxZ:0,getTitleId:function(a){a=a.attr("id");if(!a){this.uuid+=1;a=this.uuid}return"ui-dialog-title-"+a},overlay:function(a){this.$el=c.ui.dialog.overlay.create(a)}});c.extend(c.ui.dialog.overlay,{instances:[],oldInstances:[],maxZ:0,events:c.map("focus,mousedown,mouseup,keydown,keypress,click".split(","),function(a){return a+".dialog-overlay"}).join(" "),create:function(a){if(this.instances.length===0){setTimeout(function(){c.ui.dialog.overlay.instances.length&&
+c(document).bind(c.ui.dialog.overlay.events,function(d){return c(d.target).zIndex()>=c.ui.dialog.overlay.maxZ})},1);c(document).bind("keydown.dialog-overlay",function(d){if(a.options.closeOnEscape&&d.keyCode&&d.keyCode===c.ui.keyCode.ESCAPE){a.close(d);d.preventDefault()}});c(window).bind("resize.dialog-overlay",c.ui.dialog.overlay.resize)}var b=(this.oldInstances.pop()||c("<div></div>").addClass("ui-widget-overlay")).appendTo(document.body).css({width:this.width(),height:this.height()});c.fn.bgiframe&&
+b.bgiframe();this.instances.push(b);return b},destroy:function(a){this.oldInstances.push(this.instances.splice(c.inArray(a,this.instances),1)[0]);this.instances.length===0&&c([document,window]).unbind(".dialog-overlay");a.remove();var b=0;c.each(this.instances,function(){b=Math.max(b,this.css("z-index"))});this.maxZ=b},height:function(){var a,b;if(c.browser.msie&&c.browser.version<7){a=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);b=Math.max(document.documentElement.offsetHeight,
+document.body.offsetHeight);return a<b?c(window).height()+"px":a+"px"}else return c(document).height()+"px"},width:function(){var a,b;if(c.browser.msie&&c.browser.version<7){a=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth);b=Math.max(document.documentElement.offsetWidth,document.body.offsetWidth);return a<b?c(window).width()+"px":a+"px"}else return c(document).width()+"px"},resize:function(){var a=c([]);c.each(c.ui.dialog.overlay.instances,function(){a=a.add(this)});a.css({width:0,
+height:0}).css({width:c.ui.dialog.overlay.width(),height:c.ui.dialog.overlay.height()})}});c.extend(c.ui.dialog.overlay.prototype,{destroy:function(){c.ui.dialog.overlay.destroy(this.$el)}})})(jQuery);
+;/*
+ * jQuery UI Tabs 1.8.2
+ *
+ * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Tabs
+ *
+ * Depends:
+ *	jquery.ui.core.js
+ *	jquery.ui.widget.js
+ */
+(function(d){function s(){return++u}function v(){return++w}var u=0,w=0;d.widget("ui.tabs",{options:{add:null,ajaxOptions:null,cache:false,cookie:null,collapsible:false,disable:null,disabled:[],enable:null,event:"click",fx:null,idPrefix:"ui-tabs-",load:null,panelTemplate:"<div></div>",remove:null,select:null,show:null,spinner:"<em>Loading&#8230;</em>",tabTemplate:'<li><a href="#{href}"><span>#{label}</span></a></li>'},_create:function(){this._tabify(true)},_setOption:function(c,e){if(c=="selected")this.options.collapsible&&
+e==this.options.selected||this.select(e);else{this.options[c]=e;this._tabify()}},_tabId:function(c){return c.title&&c.title.replace(/\s/g,"_").replace(/[^A-Za-z0-9\-_:\.]/g,"")||this.options.idPrefix+s()},_sanitizeSelector:function(c){return c.replace(/:/g,"\\:")},_cookie:function(){var c=this.cookie||(this.cookie=this.options.cookie.name||"ui-tabs-"+v());return d.cookie.apply(null,[c].concat(d.makeArray(arguments)))},_ui:function(c,e){return{tab:c,panel:e,index:this.anchors.index(c)}},_cleanup:function(){this.lis.filter(".ui-state-processing").removeClass("ui-state-processing").find("span:data(label.tabs)").each(function(){var c=
+d(this);c.html(c.data("label.tabs")).removeData("label.tabs")})},_tabify:function(c){function e(g,f){g.css({display:""});!d.support.opacity&&f.opacity&&g[0].style.removeAttribute("filter")}this.list=this.element.find("ol,ul").eq(0);this.lis=d("li:has(a[href])",this.list);this.anchors=this.lis.map(function(){return d("a",this)[0]});this.panels=d([]);var a=this,b=this.options,h=/^#.+/;this.anchors.each(function(g,f){var j=d(f).attr("href"),l=j.split("#")[0],p;if(l&&(l===location.toString().split("#")[0]||
+(p=d("base")[0])&&l===p.href)){j=f.hash;f.href=j}if(h.test(j))a.panels=a.panels.add(a._sanitizeSelector(j));else if(j!="#"){d.data(f,"href.tabs",j);d.data(f,"load.tabs",j.replace(/#.*$/,""));j=a._tabId(f);f.href="#"+j;f=d("#"+j);if(!f.length){f=d(b.panelTemplate).attr("id",j).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").insertAfter(a.panels[g-1]||a.list);f.data("destroy.tabs",true)}a.panels=a.panels.add(f)}else b.disabled.push(g)});if(c){this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all");
+this.list.addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.lis.addClass("ui-state-default ui-corner-top");this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom");if(b.selected===undefined){location.hash&&this.anchors.each(function(g,f){if(f.hash==location.hash){b.selected=g;return false}});if(typeof b.selected!="number"&&b.cookie)b.selected=parseInt(a._cookie(),10);if(typeof b.selected!="number"&&this.lis.filter(".ui-tabs-selected").length)b.selected=
+this.lis.index(this.lis.filter(".ui-tabs-selected"));b.selected=b.selected||(this.lis.length?0:-1)}else if(b.selected===null)b.selected=-1;b.selected=b.selected>=0&&this.anchors[b.selected]||b.selected<0?b.selected:0;b.disabled=d.unique(b.disabled.concat(d.map(this.lis.filter(".ui-state-disabled"),function(g){return a.lis.index(g)}))).sort();d.inArray(b.selected,b.disabled)!=-1&&b.disabled.splice(d.inArray(b.selected,b.disabled),1);this.panels.addClass("ui-tabs-hide");this.lis.removeClass("ui-tabs-selected ui-state-active");
+if(b.selected>=0&&this.anchors.length){this.panels.eq(b.selected).removeClass("ui-tabs-hide");this.lis.eq(b.selected).addClass("ui-tabs-selected ui-state-active");a.element.queue("tabs",function(){a._trigger("show",null,a._ui(a.anchors[b.selected],a.panels[b.selected]))});this.load(b.selected)}d(window).bind("unload",function(){a.lis.add(a.anchors).unbind(".tabs");a.lis=a.anchors=a.panels=null})}else b.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"));this.element[b.collapsible?"addClass":
+"removeClass"]("ui-tabs-collapsible");b.cookie&&this._cookie(b.selected,b.cookie);c=0;for(var i;i=this.lis[c];c++)d(i)[d.inArray(c,b.disabled)!=-1&&!d(i).hasClass("ui-tabs-selected")?"addClass":"removeClass"]("ui-state-disabled");b.cache===false&&this.anchors.removeData("cache.tabs");this.lis.add(this.anchors).unbind(".tabs");if(b.event!="mouseover"){var k=function(g,f){f.is(":not(.ui-state-disabled)")&&f.addClass("ui-state-"+g)},n=function(g,f){f.removeClass("ui-state-"+g)};this.lis.bind("mouseover.tabs",
+function(){k("hover",d(this))});this.lis.bind("mouseout.tabs",function(){n("hover",d(this))});this.anchors.bind("focus.tabs",function(){k("focus",d(this).closest("li"))});this.anchors.bind("blur.tabs",function(){n("focus",d(this).closest("li"))})}var m,o;if(b.fx)if(d.isArray(b.fx)){m=b.fx[0];o=b.fx[1]}else m=o=b.fx;var q=o?function(g,f){d(g).closest("li").addClass("ui-tabs-selected ui-state-active");f.hide().removeClass("ui-tabs-hide").animate(o,o.duration||"normal",function(){e(f,o);a._trigger("show",
+null,a._ui(g,f[0]))})}:function(g,f){d(g).closest("li").addClass("ui-tabs-selected ui-state-active");f.removeClass("ui-tabs-hide");a._trigger("show",null,a._ui(g,f[0]))},r=m?function(g,f){f.animate(m,m.duration||"normal",function(){a.lis.removeClass("ui-tabs-selected ui-state-active");f.addClass("ui-tabs-hide");e(f,m);a.element.dequeue("tabs")})}:function(g,f){a.lis.removeClass("ui-tabs-selected ui-state-active");f.addClass("ui-tabs-hide");a.element.dequeue("tabs")};this.anchors.bind(b.event+".tabs",
+function(){var g=this,f=d(this).closest("li"),j=a.panels.filter(":not(.ui-tabs-hide)"),l=d(a._sanitizeSelector(this.hash));if(f.hasClass("ui-tabs-selected")&&!b.collapsible||f.hasClass("ui-state-disabled")||f.hasClass("ui-state-processing")||a._trigger("select",null,a._ui(this,l[0]))===false){this.blur();return false}b.selected=a.anchors.index(this);a.abort();if(b.collapsible)if(f.hasClass("ui-tabs-selected")){b.selected=-1;b.cookie&&a._cookie(b.selected,b.cookie);a.element.queue("tabs",function(){r(g,
+j)}).dequeue("tabs");this.blur();return false}else if(!j.length){b.cookie&&a._cookie(b.selected,b.cookie);a.element.queue("tabs",function(){q(g,l)});a.load(a.anchors.index(this));this.blur();return false}b.cookie&&a._cookie(b.selected,b.cookie);if(l.length){j.length&&a.element.queue("tabs",function(){r(g,j)});a.element.queue("tabs",function(){q(g,l)});a.load(a.anchors.index(this))}else throw"jQuery UI Tabs: Mismatching fragment identifier.";d.browser.msie&&this.blur()});this.anchors.bind("click.tabs",
+function(){return false})},destroy:function(){var c=this.options;this.abort();this.element.unbind(".tabs").removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible").removeData("tabs");this.list.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.anchors.each(function(){var e=d.data(this,"href.tabs");if(e)this.href=e;var a=d(this).unbind(".tabs");d.each(["href","load","cache"],function(b,h){a.removeData(h+".tabs")})});this.lis.unbind(".tabs").add(this.panels).each(function(){d.data(this,
+"destroy.tabs")?d(this).remove():d(this).removeClass("ui-state-default ui-corner-top ui-tabs-selected ui-state-active ui-state-hover ui-state-focus ui-state-disabled ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide")});c.cookie&&this._cookie(null,c.cookie);return this},add:function(c,e,a){if(a===undefined)a=this.anchors.length;var b=this,h=this.options;e=d(h.tabTemplate.replace(/#\{href\}/g,c).replace(/#\{label\}/g,e));c=!c.indexOf("#")?c.replace("#",""):this._tabId(d("a",e)[0]);e.addClass("ui-state-default ui-corner-top").data("destroy.tabs",
+true);var i=d("#"+c);i.length||(i=d(h.panelTemplate).attr("id",c).data("destroy.tabs",true));i.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide");if(a>=this.lis.length){e.appendTo(this.list);i.appendTo(this.list[0].parentNode)}else{e.insertBefore(this.lis[a]);i.insertBefore(this.panels[a])}h.disabled=d.map(h.disabled,function(k){return k>=a?++k:k});this._tabify();if(this.anchors.length==1){h.selected=0;e.addClass("ui-tabs-selected ui-state-active");i.removeClass("ui-tabs-hide");
+this.element.queue("tabs",function(){b._trigger("show",null,b._ui(b.anchors[0],b.panels[0]))});this.load(0)}this._trigger("add",null,this._ui(this.anchors[a],this.panels[a]));return this},remove:function(c){var e=this.options,a=this.lis.eq(c).remove(),b=this.panels.eq(c).remove();if(a.hasClass("ui-tabs-selected")&&this.anchors.length>1)this.select(c+(c+1<this.anchors.length?1:-1));e.disabled=d.map(d.grep(e.disabled,function(h){return h!=c}),function(h){return h>=c?--h:h});this._tabify();this._trigger("remove",
+null,this._ui(a.find("a")[0],b[0]));return this},enable:function(c){var e=this.options;if(d.inArray(c,e.disabled)!=-1){this.lis.eq(c).removeClass("ui-state-disabled");e.disabled=d.grep(e.disabled,function(a){return a!=c});this._trigger("enable",null,this._ui(this.anchors[c],this.panels[c]));return this}},disable:function(c){var e=this.options;if(c!=e.selected){this.lis.eq(c).addClass("ui-state-disabled");e.disabled.push(c);e.disabled.sort();this._trigger("disable",null,this._ui(this.anchors[c],this.panels[c]))}return this},
+select:function(c){if(typeof c=="string")c=this.anchors.index(this.anchors.filter("[href$="+c+"]"));else if(c===null)c=-1;if(c==-1&&this.options.collapsible)c=this.options.selected;this.anchors.eq(c).trigger(this.options.event+".tabs");return this},load:function(c){var e=this,a=this.options,b=this.anchors.eq(c)[0],h=d.data(b,"load.tabs");this.abort();if(!h||this.element.queue("tabs").length!==0&&d.data(b,"cache.tabs"))this.element.dequeue("tabs");else{this.lis.eq(c).addClass("ui-state-processing");
+if(a.spinner){var i=d("span",b);i.data("label.tabs",i.html()).html(a.spinner)}this.xhr=d.ajax(d.extend({},a.ajaxOptions,{url:h,success:function(k,n){d(e._sanitizeSelector(b.hash)).html(k);e._cleanup();a.cache&&d.data(b,"cache.tabs",true);e._trigger("load",null,e._ui(e.anchors[c],e.panels[c]));try{a.ajaxOptions.success(k,n)}catch(m){}},error:function(k,n){e._cleanup();e._trigger("load",null,e._ui(e.anchors[c],e.panels[c]));try{a.ajaxOptions.error(k,n,c,b)}catch(m){}}}));e.element.dequeue("tabs");return this}},
+abort:function(){this.element.queue([]);this.panels.stop(false,true);this.element.queue("tabs",this.element.queue("tabs").splice(-2,2));if(this.xhr){this.xhr.abort();delete this.xhr}this._cleanup();return this},url:function(c,e){this.anchors.eq(c).removeData("cache.tabs").data("load.tabs",e);return this},length:function(){return this.anchors.length}});d.extend(d.ui.tabs,{version:"1.8.2"});d.extend(d.ui.tabs.prototype,{rotation:null,rotate:function(c,e){var a=this,b=this.options,h=a._rotate||(a._rotate=
+function(i){clearTimeout(a.rotation);a.rotation=setTimeout(function(){var k=b.selected;a.select(++k<a.anchors.length?k:0)},c);i&&i.stopPropagation()});e=a._unrotate||(a._unrotate=!e?function(i){i.clientX&&a.rotate(null)}:function(){t=b.selected;h()});if(c){this.element.bind("tabsshow",h);this.anchors.bind(b.event+".tabs",e);h()}else{clearTimeout(a.rotation);this.element.unbind("tabsshow",h);this.anchors.unbind(b.event+".tabs",e);delete this._rotate;delete this._unrotate}return this}})})(jQuery);
+;/*
+ * jQuery UI Effects 1.8.2
+ *
+ * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Effects/
+ */
+jQuery.effects||function(f){function k(c){var a;if(c&&c.constructor==Array&&c.length==3)return c;if(a=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(c))return[parseInt(a[1],10),parseInt(a[2],10),parseInt(a[3],10)];if(a=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(c))return[parseFloat(a[1])*2.55,parseFloat(a[2])*2.55,parseFloat(a[3])*2.55];if(a=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(c))return[parseInt(a[1],
+16),parseInt(a[2],16),parseInt(a[3],16)];if(a=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(c))return[parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16),parseInt(a[3]+a[3],16)];if(/rgba\(0, 0, 0, 0\)/.exec(c))return l.transparent;return l[f.trim(c).toLowerCase()]}function q(c,a){var b;do{b=f.curCSS(c,a);if(b!=""&&b!="transparent"||f.nodeName(c,"body"))break;a="backgroundColor"}while(c=c.parentNode);return k(b)}function m(){var c=document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle,
+a={},b,d;if(c&&c.length&&c[0]&&c[c[0]])for(var e=c.length;e--;){b=c[e];if(typeof c[b]=="string"){d=b.replace(/\-(\w)/g,function(g,h){return h.toUpperCase()});a[d]=c[b]}}else for(b in c)if(typeof c[b]==="string")a[b]=c[b];return a}function n(c){var a,b;for(a in c){b=c[a];if(b==null||f.isFunction(b)||a in r||/scrollbar/.test(a)||!/color/i.test(a)&&isNaN(parseFloat(b)))delete c[a]}return c}function s(c,a){var b={_:0},d;for(d in a)if(c[d]!=a[d])b[d]=a[d];return b}function j(c,a,b,d){if(typeof c=="object"){d=
+a;b=null;a=c;c=a.effect}if(f.isFunction(a)){d=a;b=null;a={}}if(f.isFunction(b)){d=b;b=null}if(typeof a=="number"||f.fx.speeds[a]){d=b;b=a;a={}}a=a||{};b=b||a.duration;b=f.fx.off?0:typeof b=="number"?b:f.fx.speeds[b]||f.fx.speeds._default;d=d||a.complete;return[c,a,b,d]}f.effects={};f.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor","borderTopColor","color","outlineColor"],function(c,a){f.fx.step[a]=function(b){if(!b.colorInit){b.start=q(b.elem,a);b.end=k(b.end);b.colorInit=
+true}b.elem.style[a]="rgb("+Math.max(Math.min(parseInt(b.pos*(b.end[0]-b.start[0])+b.start[0],10),255),0)+","+Math.max(Math.min(parseInt(b.pos*(b.end[1]-b.start[1])+b.start[1],10),255),0)+","+Math.max(Math.min(parseInt(b.pos*(b.end[2]-b.start[2])+b.start[2],10),255),0)+")"}});var l={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,
+183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,
+165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0],transparent:[255,255,255]},o=["add","remove","toggle"],r={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};f.effects.animateClass=function(c,a,b,d){if(f.isFunction(b)){d=b;b=null}return this.each(function(){var e=f(this),g=e.attr("style")||" ",h=n(m.call(this)),p,t=e.attr("className");f.each(o,function(u,
+i){c[i]&&e[i+"Class"](c[i])});p=n(m.call(this));e.attr("className",t);e.animate(s(h,p),a,b,function(){f.each(o,function(u,i){c[i]&&e[i+"Class"](c[i])});if(typeof e.attr("style")=="object"){e.attr("style").cssText="";e.attr("style").cssText=g}else e.attr("style",g);d&&d.apply(this,arguments)})})};f.fn.extend({_addClass:f.fn.addClass,addClass:function(c,a,b,d){return a?f.effects.animateClass.apply(this,[{add:c},a,b,d]):this._addClass(c)},_removeClass:f.fn.removeClass,removeClass:function(c,a,b,d){return a?
+f.effects.animateClass.apply(this,[{remove:c},a,b,d]):this._removeClass(c)},_toggleClass:f.fn.toggleClass,toggleClass:function(c,a,b,d,e){return typeof a=="boolean"||a===undefined?b?f.effects.animateClass.apply(this,[a?{add:c}:{remove:c},b,d,e]):this._toggleClass(c,a):f.effects.animateClass.apply(this,[{toggle:c},a,b,d])},switchClass:function(c,a,b,d,e){return f.effects.animateClass.apply(this,[{add:a,remove:c},b,d,e])}});f.extend(f.effects,{version:"1.8.2",save:function(c,a){for(var b=0;b<a.length;b++)a[b]!==
+null&&c.data("ec.storage."+a[b],c[0].style[a[b]])},restore:function(c,a){for(var b=0;b<a.length;b++)a[b]!==null&&c.css(a[b],c.data("ec.storage."+a[b]))},setMode:function(c,a){if(a=="toggle")a=c.is(":hidden")?"show":"hide";return a},getBaseline:function(c,a){var b;switch(c[0]){case "top":b=0;break;case "middle":b=0.5;break;case "bottom":b=1;break;default:b=c[0]/a.height}switch(c[1]){case "left":c=0;break;case "center":c=0.5;break;case "right":c=1;break;default:c=c[1]/a.width}return{x:c,y:b}},createWrapper:function(c){if(c.parent().is(".ui-effects-wrapper"))return c.parent();
+var a={width:c.outerWidth(true),height:c.outerHeight(true),"float":c.css("float")},b=f("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0});c.wrap(b);b=c.parent();if(c.css("position")=="static"){b.css({position:"relative"});c.css({position:"relative"})}else{f.extend(a,{position:c.css("position"),zIndex:c.css("z-index")});f.each(["top","left","bottom","right"],function(d,e){a[e]=c.css(e);if(isNaN(parseInt(a[e],10)))a[e]="auto"});
+c.css({position:"relative",top:0,left:0})}return b.css(a).show()},removeWrapper:function(c){if(c.parent().is(".ui-effects-wrapper"))return c.parent().replaceWith(c);return c},setTransition:function(c,a,b,d){d=d||{};f.each(a,function(e,g){unit=c.cssUnit(g);if(unit[0]>0)d[g]=unit[0]*b+unit[1]});return d}});f.fn.extend({effect:function(c){var a=j.apply(this,arguments);a={options:a[1],duration:a[2],callback:a[3]};var b=f.effects[c];return b&&!f.fx.off?b.call(this,a):this},_show:f.fn.show,show:function(c){if(!c||
+typeof c=="number"||f.fx.speeds[c])return this._show.apply(this,arguments);else{var a=j.apply(this,arguments);a[1].mode="show";return this.effect.apply(this,a)}},_hide:f.fn.hide,hide:function(c){if(!c||typeof c=="number"||f.fx.speeds[c])return this._hide.apply(this,arguments);else{var a=j.apply(this,arguments);a[1].mode="hide";return this.effect.apply(this,a)}},__toggle:f.fn.toggle,toggle:function(c){if(!c||typeof c=="number"||f.fx.speeds[c]||typeof c=="boolean"||f.isFunction(c))return this.__toggle.apply(this,
+arguments);else{var a=j.apply(this,arguments);a[1].mode="toggle";return this.effect.apply(this,a)}},cssUnit:function(c){var a=this.css(c),b=[];f.each(["em","px","%","pt"],function(d,e){if(a.indexOf(e)>0)b=[parseFloat(a),e]});return b}});f.easing.jswing=f.easing.swing;f.extend(f.easing,{def:"easeOutQuad",swing:function(c,a,b,d,e){return f.easing[f.easing.def](c,a,b,d,e)},easeInQuad:function(c,a,b,d,e){return d*(a/=e)*a+b},easeOutQuad:function(c,a,b,d,e){return-d*(a/=e)*(a-2)+b},easeInOutQuad:function(c,
+a,b,d,e){if((a/=e/2)<1)return d/2*a*a+b;return-d/2*(--a*(a-2)-1)+b},easeInCubic:function(c,a,b,d,e){return d*(a/=e)*a*a+b},easeOutCubic:function(c,a,b,d,e){return d*((a=a/e-1)*a*a+1)+b},easeInOutCubic:function(c,a,b,d,e){if((a/=e/2)<1)return d/2*a*a*a+b;return d/2*((a-=2)*a*a+2)+b},easeInQuart:function(c,a,b,d,e){return d*(a/=e)*a*a*a+b},easeOutQuart:function(c,a,b,d,e){return-d*((a=a/e-1)*a*a*a-1)+b},easeInOutQuart:function(c,a,b,d,e){if((a/=e/2)<1)return d/2*a*a*a*a+b;return-d/2*((a-=2)*a*a*a-2)+
+b},easeInQuint:function(c,a,b,d,e){return d*(a/=e)*a*a*a*a+b},easeOutQuint:function(c,a,b,d,e){return d*((a=a/e-1)*a*a*a*a+1)+b},easeInOutQuint:function(c,a,b,d,e){if((a/=e/2)<1)return d/2*a*a*a*a*a+b;return d/2*((a-=2)*a*a*a*a+2)+b},easeInSine:function(c,a,b,d,e){return-d*Math.cos(a/e*(Math.PI/2))+d+b},easeOutSine:function(c,a,b,d,e){return d*Math.sin(a/e*(Math.PI/2))+b},easeInOutSine:function(c,a,b,d,e){return-d/2*(Math.cos(Math.PI*a/e)-1)+b},easeInExpo:function(c,a,b,d,e){return a==0?b:d*Math.pow(2,
+10*(a/e-1))+b},easeOutExpo:function(c,a,b,d,e){return a==e?b+d:d*(-Math.pow(2,-10*a/e)+1)+b},easeInOutExpo:function(c,a,b,d,e){if(a==0)return b;if(a==e)return b+d;if((a/=e/2)<1)return d/2*Math.pow(2,10*(a-1))+b;return d/2*(-Math.pow(2,-10*--a)+2)+b},easeInCirc:function(c,a,b,d,e){return-d*(Math.sqrt(1-(a/=e)*a)-1)+b},easeOutCirc:function(c,a,b,d,e){return d*Math.sqrt(1-(a=a/e-1)*a)+b},easeInOutCirc:function(c,a,b,d,e){if((a/=e/2)<1)return-d/2*(Math.sqrt(1-a*a)-1)+b;return d/2*(Math.sqrt(1-(a-=2)*
+a)+1)+b},easeInElastic:function(c,a,b,d,e){c=1.70158;var g=0,h=d;if(a==0)return b;if((a/=e)==1)return b+d;g||(g=e*0.3);if(h<Math.abs(d)){h=d;c=g/4}else c=g/(2*Math.PI)*Math.asin(d/h);return-(h*Math.pow(2,10*(a-=1))*Math.sin((a*e-c)*2*Math.PI/g))+b},easeOutElastic:function(c,a,b,d,e){c=1.70158;var g=0,h=d;if(a==0)return b;if((a/=e)==1)return b+d;g||(g=e*0.3);if(h<Math.abs(d)){h=d;c=g/4}else c=g/(2*Math.PI)*Math.asin(d/h);return h*Math.pow(2,-10*a)*Math.sin((a*e-c)*2*Math.PI/g)+d+b},easeInOutElastic:function(c,
+a,b,d,e){c=1.70158;var g=0,h=d;if(a==0)return b;if((a/=e/2)==2)return b+d;g||(g=e*0.3*1.5);if(h<Math.abs(d)){h=d;c=g/4}else c=g/(2*Math.PI)*Math.asin(d/h);if(a<1)return-0.5*h*Math.pow(2,10*(a-=1))*Math.sin((a*e-c)*2*Math.PI/g)+b;return h*Math.pow(2,-10*(a-=1))*Math.sin((a*e-c)*2*Math.PI/g)*0.5+d+b},easeInBack:function(c,a,b,d,e,g){if(g==undefined)g=1.70158;return d*(a/=e)*a*((g+1)*a-g)+b},easeOutBack:function(c,a,b,d,e,g){if(g==undefined)g=1.70158;return d*((a=a/e-1)*a*((g+1)*a+g)+1)+b},easeInOutBack:function(c,
+a,b,d,e,g){if(g==undefined)g=1.70158;if((a/=e/2)<1)return d/2*a*a*(((g*=1.525)+1)*a-g)+b;return d/2*((a-=2)*a*(((g*=1.525)+1)*a+g)+2)+b},easeInBounce:function(c,a,b,d,e){return d-f.easing.easeOutBounce(c,e-a,0,d,e)+b},easeOutBounce:function(c,a,b,d,e){return(a/=e)<1/2.75?d*7.5625*a*a+b:a<2/2.75?d*(7.5625*(a-=1.5/2.75)*a+0.75)+b:a<2.5/2.75?d*(7.5625*(a-=2.25/2.75)*a+0.9375)+b:d*(7.5625*(a-=2.625/2.75)*a+0.984375)+b},easeInOutBounce:function(c,a,b,d,e){if(a<e/2)return f.easing.easeInBounce(c,a*2,0,
+d,e)*0.5+b;return f.easing.easeOutBounce(c,a*2-e,0,d,e)*0.5+d*0.5+b}})}(jQuery);
+;/*
+ * jQuery UI Effects Fold 1.8.2
+ *
+ * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Effects/Fold
+ *
+ * Depends:
+ *	jquery.effects.core.js
+ */
+(function(c){c.effects.fold=function(a){return this.queue(function(){var b=c(this),j=["position","top","left"],d=c.effects.setMode(b,a.options.mode||"hide"),g=a.options.size||15,h=!!a.options.horizFirst,k=a.duration?a.duration/2:c.fx.speeds._default/2;c.effects.save(b,j);b.show();var e=c.effects.createWrapper(b).css({overflow:"hidden"}),f=d=="show"!=h,l=f?["width","height"]:["height","width"];f=f?[e.width(),e.height()]:[e.height(),e.width()];var i=/([0-9]+)%/.exec(g);if(i)g=parseInt(i[1],10)/100*
+f[d=="hide"?0:1];if(d=="show")e.css(h?{height:0,width:g}:{height:g,width:0});h={};i={};h[l[0]]=d=="show"?f[0]:g;i[l[1]]=d=="show"?f[1]:0;e.animate(h,k,a.options.easing).animate(i,k,a.options.easing,function(){d=="hide"&&b.hide();c.effects.restore(b,j);c.effects.removeWrapper(b);a.callback&&a.callback.apply(b[0],arguments);b.dequeue()})})}})(jQuery);
+;/*
+ * jQuery Highlight plugin
+ * Based on highlight v3 by Johann Burkard
+ * http://johannburkard.de/blog/programming/javascript/highlight-javascript-text-higlighting-jquery-plugin.html
+ * Copyright (c) 2009 Bartek Szopka http://bartaz.github.com/sandbox.js/jquery.highlight.html
+ * Licensed under MIT license. 
+ */
+jQuery.extend({highlight:function(a,c,b,e){if(a.nodeType===3){if(c=a.data.match(c)){b=document.createElement(b||"span");b.className=e||"highlight";a=a.splitText(c.index);a.splitText(c[0].length);e=a.cloneNode(true);b.appendChild(e);a.parentNode.replaceChild(b,a);return 1}}else if(a.nodeType===1&&a.childNodes&&!/(script|style)/i.test(a.tagName)&&!(a.tagName===b.toUpperCase()&&a.className===e))for(var d=0;d<a.childNodes.length;d++)d+=jQuery.highlight(a.childNodes[d],c,b,e);return 0}});
+jQuery.fn.unhighlight=function(a){var c={className:"highlight",element:"span"};jQuery.extend(c,a);return this.find(c.element+"."+c.className).each(function(){var b=this.parentNode;b.replaceChild(this.firstChild,this);b.normalize()}).end()};
+jQuery.fn.highlight=function(a,c){var b={className:"highlight",element:"span",caseSensitive:false,wordsOnly:false};jQuery.extend(b,c);if(a.constructor===String)a=[a];a=jQuery.grep(a,function(f){return f!=""});if(a.length==0)return this;var e=b.caseSensitive?"":"i",d="("+a.join("|")+")";if(b.wordsOnly)d="\\b"+d+"\\b";var g=RegExp(d,e);return this.each(function(){jQuery.highlight(this,g,b.element,b.className)})};

+ 1131 - 0
modules/app_java/doc/webhelp/oxygen-webhelp/resources/js/jquery.cleditor.js

@@ -0,0 +1,1131 @@
+/**
+ @preserve CLEditor WYSIWYG HTML Editor v1.3.0
+ http://premiumsoftware.net/cleditor
+ requires jQuery v1.4.2 or later
+
+ Copyright 2010, Chris Landowski, Premium Software, LLC
+ Dual licensed under the MIT or GPL Version 2 licenses.
+*/
+
+// ==ClosureCompiler==
+// @compilation_level SIMPLE_OPTIMIZATIONS
+// @output_file_name jquery.cleditor.min.js
+// ==/ClosureCompiler==
+
+(function($) {
+
+  //==============
+  // jQuery Plugin
+  //==============
+
+  $.cleditor = {
+
+    // Define the defaults used for all new cleditor instances
+    defaultOptions: {
+      width:        500, // width not including margins, borders or padding
+      height:       250, // height not including margins, borders or padding
+      controls:     // controls to add to the toolbar
+                    "bold italic underline strikethrough subscript superscript | font size " +
+                    "style | color highlight removeformat | bullets numbering | outdent " +
+                    "indent | alignleft center alignright justify | undo redo | " +
+                    "rule image link unlink | cut copy paste pastetext | print source",
+      colors:       // colors in the color popup
+                    "FFF FCC FC9 FF9 FFC 9F9 9FF CFF CCF FCF " +
+                    "CCC F66 F96 FF6 FF3 6F9 3FF 6FF 99F F9F " +
+                    "BBB F00 F90 FC6 FF0 3F3 6CC 3CF 66C C6C " +
+                    "999 C00 F60 FC3 FC0 3C0 0CC 36F 63F C3C " +
+                    "666 900 C60 C93 990 090 399 33F 60C 939 " +
+                    "333 600 930 963 660 060 366 009 339 636 " +
+                    "000 300 630 633 330 030 033 006 309 303",    
+      fonts:        // font names in the font popup
+                    "Arial,Arial Black,Comic Sans MS,Courier New,Narrow,Garamond," +
+                    "Georgia,Impact,Sans Serif,Serif,Tahoma,Trebuchet MS,Verdana",
+      sizes:        // sizes in the font size popup
+                    "1,2,3,4,5,6,7",
+      styles:       // styles in the style popup
+                    [["Paragraph", "<p>"], ["Header 1", "<h1>"], ["Header 2", "<h2>"],
+                    ["Header 3", "<h3>"],  ["Header 4","<h4>"],  ["Header 5","<h5>"],
+                    ["Header 6","<h6>"]],
+      useCSS:       false, // use CSS to style HTML when possible (not supported in ie)
+      docType:      // Document type contained within the editor
+                    '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">',
+      docCSSFile:   // CSS file used to style the document contained within the editor
+                    "", 
+      bodyStyle:    // style to assign to document body contained within the editor
+                    "margin:4px; font:10pt Arial,Verdana; cursor:text"
+    },
+
+    // Define all usable toolbar buttons - the init string property is 
+    //   expanded during initialization back into the buttons object and 
+    //   seperate object properties are created for each button.
+    //   e.g. buttons.size.title = "Font Size"
+    buttons: {
+      // name,title,command,popupName (""=use name)
+      init:
+      "bold,,|" +
+      "italic,,|" +
+      "underline,,|" +
+      "strikethrough,,|" +
+      "subscript,,|" +
+      "superscript,,|" +
+      "font,,fontname,|" +
+      "size,Font Size,fontsize,|" +
+      "style,,formatblock,|" +
+      "color,Font Color,forecolor,|" +
+      "highlight,Text Highlight Color,hilitecolor,color|" +
+      "removeformat,Remove Formatting,|" +
+      "bullets,,insertunorderedlist|" +
+      "numbering,,insertorderedlist|" +
+      "outdent,,|" +
+      "indent,,|" +
+      "alignleft,Align Text Left,justifyleft|" +
+      "center,,justifycenter|" +
+      "alignright,Align Text Right,justifyright|" +
+      "justify,,justifyfull|" +
+      "undo,,|" +
+      "redo,,|" +
+      "rule,Insert Horizontal Rule,inserthorizontalrule|" +
+      "image,Insert Image,insertimage,url|" +
+      "link,Insert Hyperlink,createlink,url|" +
+      "unlink,Remove Hyperlink,|" +
+      "cut,,|" +
+      "copy,,|" +
+      "paste,,|" +
+      "pastetext,Paste as Text,inserthtml,|" +
+      "print,,|" +
+      "source,Show Source"
+    },
+
+    // imagesPath - returns the path to the images folder
+    imagesPath: function() { return imagesPath(); }
+
+  };
+
+  // cleditor - creates a new editor for each of the matched textareas
+  $.fn.cleditor = function(options) {
+
+    // Create a new jQuery object to hold the results
+    var $result = $([]);
+
+    // Loop through all matching textareas and create the editors
+    this.each(function(idx, elem) {
+      if (elem.tagName == "TEXTAREA") {
+        var data = $.data(elem, CLEDITOR);
+        if (!data) data = new cleditor(elem, options);
+        $result = $result.add(data);
+      }
+    });
+
+    // return the new jQuery object
+    return $result;
+
+  };
+    
+  //==================
+  // Private Variables
+  //==================
+
+  var
+
+  // Misc constants
+  BACKGROUND_COLOR = "backgroundColor",
+  BUTTON           = "button",
+  BUTTON_NAME      = "buttonName",
+  CHANGE           = "change",
+  CLEDITOR         = "cleditor",
+  CLICK            = "click",
+  DISABLED         = "disabled",
+  DIV_TAG          = "<div>",
+  TRANSPARENT      = "transparent",
+  UNSELECTABLE     = "unselectable",
+
+  // Class name constants
+  MAIN_CLASS       = "cleditorMain",    // main containing div
+  TOOLBAR_CLASS    = "cleditorToolbar", // toolbar div inside main div
+  GROUP_CLASS      = "cleditorGroup",   // group divs inside the toolbar div
+  BUTTON_CLASS     = "cleditorButton",  // button divs inside group div
+  DISABLED_CLASS   = "cleditorDisabled",// disabled button divs
+  DIVIDER_CLASS    = "cleditorDivider", // divider divs inside group div
+  POPUP_CLASS      = "cleditorPopup",   // popup divs inside body
+  LIST_CLASS       = "cleditorList",    // list popup divs inside body
+  COLOR_CLASS      = "cleditorColor",   // color popup div inside body
+  PROMPT_CLASS     = "cleditorPrompt",  // prompt popup divs inside body
+  MSG_CLASS        = "cleditorMsg",     // message popup div inside body
+
+  // Test for ie
+  ie = $.browser.msie,
+  ie6 = /msie\s6/i.test(navigator.userAgent),
+
+  // Test for iPhone/iTouch/iPad
+  iOS = /iphone|ipad|ipod/i.test(navigator.userAgent),
+
+  // Popups are created once as needed and shared by all editor instances
+  popups = {},
+
+  // Used to prevent the document click event from being bound more than once
+  documentClickAssigned,
+
+  // Local copy of the buttons object
+  buttons = $.cleditor.buttons;
+
+  //===============
+  // Initialization
+  //===============
+
+  // Expand the buttons.init string back into the buttons object
+  //   and create seperate object properties for each button.
+  //   e.g. buttons.size.title = "Font Size"
+  $.each(buttons.init.split("|"), function(idx, button) {
+    var items = button.split(","), name = items[0];
+    buttons[name] = {
+      stripIndex: idx,
+      name: name,
+      title: items[1] === "" ? name.charAt(0).toUpperCase() + name.substr(1) : items[1],
+      command: items[2] === "" ? name : items[2],
+      popupName: items[3] === "" ? name : items[3]
+    };
+  });
+  delete buttons.init;
+
+  //============
+  // Constructor
+  //============
+
+  // cleditor - creates a new editor for the passed in textarea element
+  cleditor = function(area, options) {
+    var editor = this;
+
+    // Get the defaults and override with options
+    editor.options = options = $.extend({}, $.cleditor.defaultOptions, options);
+
+    // Hide the textarea and associate it with this editor
+    var $area = editor.$area = $(area)
+      .hide()
+      .data(CLEDITOR, editor)
+      .blur(function() {
+        // Update the iframe when the textarea loses focus
+        updateFrame(editor, true);
+      });
+
+    // Create the main container and append the textarea
+    var $main = editor.$main = $(DIV_TAG)
+      .addClass(MAIN_CLASS)
+      .width(options.width)
+      .height(options.height);
+
+    // Create the toolbar
+    var $toolbar = editor.$toolbar = $(DIV_TAG)
+      .addClass(TOOLBAR_CLASS)
+      .appendTo($main);
+
+    // Add the first group to the toolbar
+    var $group = $(DIV_TAG)
+      .addClass(GROUP_CLASS)
+      .appendTo($toolbar);
+    
+    // Add the buttons to the toolbar
+    $.each(options.controls.split(" "), function(idx, buttonName) {
+      if (buttonName === "") return true;
+
+      // Divider
+      if (buttonName == "|") {
+
+        // Add a new divider to the group
+        var $div = $(DIV_TAG)
+          .addClass(DIVIDER_CLASS)
+          .appendTo($group);
+
+        // Create a new group
+        $group = $(DIV_TAG)
+          .addClass(GROUP_CLASS)
+          .appendTo($toolbar);
+
+      }
+
+      // Button
+      else {
+        
+        // Get the button definition
+        var button = buttons[buttonName];
+
+        // Add a new button to the group
+        var $buttonDiv = $(DIV_TAG)
+          .data(BUTTON_NAME, button.name)
+          .addClass(BUTTON_CLASS)
+          .attr("title", button.title)
+          .bind(CLICK, $.proxy(buttonClick, editor))
+          .appendTo($group)
+          .hover(hoverEnter, hoverLeave);
+
+        // Prepare the button image
+        var map = {};
+        if (button.css) map = button.css;
+        else if (button.image) map.backgroundImage = imageUrl(button.image);
+        if (button.stripIndex) map.backgroundPosition = button.stripIndex * -24;
+        $buttonDiv.css(map);
+
+        // Add the unselectable attribute for ie
+        if (ie)
+          $buttonDiv.attr(UNSELECTABLE, "on");
+
+        // Create the popup
+        if (button.popupName)
+          createPopup(button.popupName, options, button.popupClass,
+            button.popupContent, button.popupHover);
+        
+      }
+
+    });
+
+    // Add the main div to the DOM and append the textarea
+    $main.insertBefore($area)
+      .append($area);
+
+    // Bind the document click event handler
+    if (!documentClickAssigned) {
+      $(document).click(function(e) {
+        // Dismiss all non-prompt popups
+        var $target = $(e.target);
+        if (!$target.add($target.parents()).is("." + PROMPT_CLASS))
+          hidePopups();
+      });
+      documentClickAssigned = true;
+    }
+
+    // Bind the window resize event when the width or height is auto or %
+    if (/auto|%/.test("" + options.width + options.height))
+      $(window).resize(function() {refresh(editor);});
+
+    // Create the iframe and resize the controls
+    refresh(editor);
+
+  };
+
+  //===============
+  // Public Methods
+  //===============
+
+  var fn = cleditor.prototype,
+
+  // Expose the following private functions as methods on the cleditor object.
+  // The closure compiler will rename the private functions. However, the
+  // exposed method names on the cleditor object will remain fixed.
+  methods = [
+    ["clear", clear],
+    ["disable", disable],
+    ["execCommand", execCommand],
+    ["focus", focus],
+    ["hidePopups", hidePopups],
+    ["sourceMode", sourceMode, true],
+    ["refresh", refresh],
+    ["select", select],
+    ["selectedHTML", selectedHTML, true],
+    ["selectedText", selectedText, true],
+    ["showMessage", showMessage],
+    ["updateFrame", updateFrame],
+    ["updateTextArea", updateTextArea]
+  ];
+
+  $.each(methods, function(idx, method) {
+    fn[method[0]] = function() {
+      var editor = this, args = [editor];
+      // using each here would cast booleans into objects!
+      for(var x = 0; x < arguments.length; x++) {args.push(arguments[x]);}
+      var result = method[1].apply(editor, args);
+      if (method[2]) return result;
+      return editor;
+    };
+  });
+
+  // change - shortcut for .bind("change", handler) or .trigger("change")
+  fn.change = function(handler) {
+    var $this = $(this);
+    return handler ? $this.bind(CHANGE, handler) : $this.trigger(CHANGE);
+  };
+
+  //===============
+  // Event Handlers
+  //===============
+
+  // buttonClick - click event handler for toolbar buttons
+  function buttonClick(e) {
+
+    var editor = this,
+        buttonDiv = e.target,
+        buttonName = $.data(buttonDiv, BUTTON_NAME),
+        button = buttons[buttonName],
+        popupName = button.popupName,
+        popup = popups[popupName];
+
+    // Check if disabled
+    if (editor.disabled || $(buttonDiv).attr(DISABLED) == DISABLED)
+      return;
+
+    // Fire the buttonClick event
+    var data = {
+      editor: editor,
+      button: buttonDiv,
+      buttonName: buttonName,
+      popup: popup,
+      popupName: popupName,
+      command: button.command,
+      useCSS: editor.options.useCSS
+    };
+
+    if (button.buttonClick && button.buttonClick(e, data) === false)
+      return false;
+
+    // Toggle source
+    if (buttonName == "source") {
+
+      // Show the iframe
+      if (sourceMode(editor)) {
+        delete editor.range;
+        editor.$area.hide();
+        editor.$frame.show();
+        buttonDiv.title = button.title;
+      }
+
+      // Show the textarea
+      else {
+        editor.$frame.hide();
+        editor.$area.show();
+        buttonDiv.title = "Show Rich Text";
+      }
+
+      // Enable or disable the toolbar buttons
+      // IE requires the timeout
+      setTimeout(function() {refreshButtons(editor);}, 100);
+
+    }
+
+    // Check for rich text mode
+    else if (!sourceMode(editor)) {
+
+      // Handle popups
+      if (popupName) {
+        var $popup = $(popup);
+
+        // URL
+        if (popupName == "url") {
+
+          // Check for selection before showing the link url popup
+          if (buttonName == "link" && selectedText(editor) === "") {
+            showMessage(editor, "A selection is required when inserting a link.", buttonDiv);
+            return false;
+          }
+
+          // Wire up the submit button click event handler
+          $popup.children(":button")
+            .unbind(CLICK)
+            .bind(CLICK, function() {
+
+              // Insert the image or link if a url was entered
+              var $text = $popup.find(":text"),
+                url = $.trim($text.val());
+              if (url !== "")
+                execCommand(editor, data.command, url, null, data.button);
+
+              // Reset the text, hide the popup and set focus
+              $text.val("http://");
+              hidePopups();
+              focus(editor);
+
+            });
+
+        }
+
+        // Paste as Text
+        else if (popupName == "pastetext") {
+
+          // Wire up the submit button click event handler
+          $popup.children(":button")
+            .unbind(CLICK)
+            .bind(CLICK, function() {
+
+              // Insert the unformatted text replacing new lines with break tags
+              var $textarea = $popup.find("textarea"),
+                text = $textarea.val().replace(/\n/g, "<br />");
+              if (text !== "")
+                execCommand(editor, data.command, text, null, data.button);
+
+              // Reset the text, hide the popup and set focus
+              $textarea.val("");
+              hidePopups();
+              focus(editor);
+
+            });
+
+        }
+
+        // Show the popup if not already showing for this button
+        if (buttonDiv !== $.data(popup, BUTTON)) {
+          showPopup(editor, popup, buttonDiv);
+          return false; // stop propagination to document click
+        }
+
+        // propaginate to documnt click
+        return;
+
+      }
+
+      // Print
+      else if (buttonName == "print")
+        editor.$frame[0].contentWindow.print();
+
+      // All other buttons
+      else if (!execCommand(editor, data.command, data.value, data.useCSS, buttonDiv))
+        return false;
+
+    }
+
+    // Focus the editor
+    focus(editor);
+
+  }
+
+  // hoverEnter - mouseenter event handler for buttons and popup items
+  function hoverEnter(e) {
+    var $div = $(e.target).closest("div");
+    $div.css(BACKGROUND_COLOR, $div.data(BUTTON_NAME) ? "#FFF" : "#FFC");
+  }
+
+  // hoverLeave - mouseleave event handler for buttons and popup items
+  function hoverLeave(e) {
+    $(e.target).closest("div").css(BACKGROUND_COLOR, "transparent");
+  }
+
+  // popupClick - click event handler for popup items
+  function popupClick(e) {
+
+    var editor = this,
+        popup = e.data.popup,
+        target = e.target;
+
+    // Check for message and prompt popups
+    if (popup === popups.msg || $(popup).hasClass(PROMPT_CLASS))
+      return;
+
+    // Get the button info
+    var buttonDiv = $.data(popup, BUTTON),
+        buttonName = $.data(buttonDiv, BUTTON_NAME),
+        button = buttons[buttonName],
+        command = button.command,
+        value,
+        useCSS = editor.options.useCSS;
+
+    // Get the command value
+    if (buttonName == "font")
+      // Opera returns the fontfamily wrapped in quotes
+      value = target.style.fontFamily.replace(/"/g, "");
+    else if (buttonName == "size") {
+      if (target.tagName == "DIV")
+        target = target.children[0];
+      value = target.innerHTML;
+    }
+    else if (buttonName == "style")
+      value = "<" + target.tagName + ">";
+    else if (buttonName == "color")
+      value = hex(target.style.backgroundColor);
+    else if (buttonName == "highlight") {
+      value = hex(target.style.backgroundColor);
+      if (ie) command = 'backcolor';
+      else useCSS = true;
+    }
+
+    // Fire the popupClick event
+    var data = {
+      editor: editor,
+      button: buttonDiv,
+      buttonName: buttonName,
+      popup: popup,
+      popupName: button.popupName,
+      command: command,
+      value: value,
+      useCSS: useCSS
+    };
+
+    if (button.popupClick && button.popupClick(e, data) === false)
+      return;
+
+    // Execute the command
+    if (data.command && !execCommand(editor, data.command, data.value, data.useCSS, buttonDiv))
+      return false;
+
+    // Hide the popup and focus the editor
+    hidePopups();
+    focus(editor);
+
+  }
+
+  //==================
+  // Private Functions
+  //==================
+
+  // checksum - returns a checksum using the Adler-32 method
+  function checksum(text)
+  {
+    var a = 1, b = 0;
+    for (var index = 0; index < text.length; ++index) {
+      a = (a + text.charCodeAt(index)) % 65521;
+      b = (b + a) % 65521;
+    }
+    return (b << 16) | a;
+  }
+
+  // clear - clears the contents of the editor
+  function clear(editor) {
+    editor.$area.val("");
+    updateFrame(editor);
+  }
+
+  // createPopup - creates a popup and adds it to the body
+  function createPopup(popupName, options, popupTypeClass, popupContent, popupHover) {
+
+    // Check if popup already exists
+    if (popups[popupName])
+      return popups[popupName];
+
+    // Create the popup
+    var $popup = $(DIV_TAG)
+      .hide()
+      .addClass(POPUP_CLASS)
+      .appendTo("body");
+
+    // Add the content
+
+    // Custom popup
+    if (popupContent)
+      $popup.html(popupContent);
+
+    // Color
+    else if (popupName == "color") {
+      var colors = options.colors.split(" ");
+      if (colors.length < 10)
+        $popup.width("auto");
+      $.each(colors, function(idx, color) {
+        $(DIV_TAG).appendTo($popup)
+          .css(BACKGROUND_COLOR, "#" + color);
+      });
+      popupTypeClass = COLOR_CLASS;
+    }
+
+    // Font
+    else if (popupName == "font")
+      $.each(options.fonts.split(","), function(idx, font) {
+        $(DIV_TAG).appendTo($popup)
+          .css("fontFamily", font)
+          .html(font);
+      });
+
+    // Size
+    else if (popupName == "size")
+      $.each(options.sizes.split(","), function(idx, size) {
+        $(DIV_TAG).appendTo($popup)
+          .html("<font size=" + size + ">" + size + "</font>");
+      });
+
+    // Style
+    else if (popupName == "style")
+      $.each(options.styles, function(idx, style) {
+        $(DIV_TAG).appendTo($popup)
+          .html(style[1] + style[0] + style[1].replace("<", "</"));
+      });
+
+    // URL
+    else if (popupName == "url") {
+      $popup.html('Enter URL:<br><input type=text value="http://" size=35><br><input type=button value="Submit">');
+      popupTypeClass = PROMPT_CLASS;
+    }
+
+    // Paste as Text
+    else if (popupName == "pastetext") {
+      $popup.html('Paste your content here and click submit.<br /><textarea cols=40 rows=3></textarea><br /><input type=button value=Submit>');
+      popupTypeClass = PROMPT_CLASS;
+    }
+
+    // Add the popup type class name
+    if (!popupTypeClass && !popupContent)
+      popupTypeClass = LIST_CLASS;
+    $popup.addClass(popupTypeClass);
+
+    // Add the unselectable attribute to all items
+    if (ie) {
+      $popup.attr(UNSELECTABLE, "on")
+        .find("div,font,p,h1,h2,h3,h4,h5,h6")
+        .attr(UNSELECTABLE, "on");
+    }
+
+    // Add the hover effect to all items
+    if ($popup.hasClass(LIST_CLASS) || popupHover === true)
+      $popup.children().hover(hoverEnter, hoverLeave);
+
+    // Add the popup to the array and return it
+    popups[popupName] = $popup[0];
+    return $popup[0];
+
+  }
+
+  // disable - enables or disables the editor
+  function disable(editor, disabled) {
+
+    // Update the textarea and save the state
+    if (disabled) {
+      editor.$area.attr(DISABLED, DISABLED);
+      editor.disabled = true;
+    }
+    else {
+      editor.$area.removeAttr(DISABLED);
+      delete editor.disabled;
+    }
+
+    // Switch the iframe into design mode.
+    // ie6 does not support designMode.
+    // ie7 & ie8 do not properly support designMode="off".
+    try {
+      if (ie) editor.doc.body.contentEditable = !disabled;
+      else editor.doc.designMode = !disabled ? "on" : "off";
+    }
+    // Firefox 1.5 throws an exception that can be ignored
+    // when toggling designMode from off to on.
+    catch (err) {}
+
+    // Enable or disable the toolbar buttons
+    refreshButtons(editor);
+
+  }
+
+  // execCommand - executes a designMode command
+  function execCommand(editor, command, value, useCSS, button) {
+
+    // Restore the current ie selection
+    restoreRange(editor);
+
+    // Set the styling method
+    if (!ie) {
+      if (useCSS === undefined || useCSS === null)
+        useCSS = editor.options.useCSS;
+      editor.doc.execCommand("styleWithCSS", 0, useCSS.toString());
+    }
+
+    // Execute the command and check for error
+    var success = true, description;
+    if (ie && command.toLowerCase() == "inserthtml")
+      getRange(editor).pasteHTML(value);
+    else {
+      try { success = editor.doc.execCommand(command, 0, value || null); }
+      catch (err) { description = err.description; success = false; }
+      if (!success) {
+        if ("cutcopypaste".indexOf(command) > -1)
+          showMessage(editor, "For security reasons, your browser does not support the " +
+            command + " command. Try using the keyboard shortcut or context menu instead.",
+            button);
+        else
+          showMessage(editor,
+            (description ? description : "Error executing the " + command + " command."),
+            button);
+      }
+    }
+
+    // Enable the buttons
+    refreshButtons(editor);
+    return success;
+
+  }
+
+  // focus - sets focus to either the textarea or iframe
+  function focus(editor) {
+    setTimeout(function() {
+      if (sourceMode(editor)) editor.$area.focus();
+      else editor.$frame[0].contentWindow.focus();
+      refreshButtons(editor);
+    }, 0);
+  }
+
+  // getRange - gets the current text range object
+  function getRange(editor) {
+    if (ie) return getSelection(editor).createRange();
+    return getSelection(editor).getRangeAt(0);
+  }
+
+  // getSelection - gets the current text range object
+  function getSelection(editor) {
+    if (ie) return editor.doc.selection;
+    return editor.$frame[0].contentWindow.getSelection();
+  }
+
+  // Returns the hex value for the passed in string.
+  //   hex("rgb(255, 0, 0)"); // #FF0000
+  //   hex("#FF0000"); // #FF0000
+  //   hex("#F00"); // #FF0000
+  function hex(s) {
+    var m = /rgba?\((\d+), (\d+), (\d+)/.exec(s),
+      c = s.split("");
+    if (m) {
+      s = ( m[1] << 16 | m[2] << 8 | m[3] ).toString(16);
+      while (s.length < 6)
+        s = "0" + s;
+    }
+    return "#" + (s.length == 6 ? s : c[1] + c[1] + c[2] + c[2] + c[3] + c[3]);
+  }
+
+  // hidePopups - hides all popups
+  function hidePopups() {
+    $.each(popups, function(idx, popup) {
+      $(popup)
+        .hide()
+        .unbind(CLICK)
+        .removeData(BUTTON);
+    });
+  }
+
+  // imagesPath - returns the path to the images folder
+  function imagesPath() {
+    var cssFile = "jquery.cleditor.css",
+        href = $("link[href$='" + cssFile +"']").attr("href");
+    return href.substr(0, href.length - cssFile.length) + "images/";
+  }
+
+  // imageUrl - Returns the css url string for a filemane
+  function imageUrl(filename) {
+    return "url(" + imagesPath() + filename + ")";
+  }
+
+  // refresh - creates the iframe and resizes the controls
+  function refresh(editor) {
+
+    var $main = editor.$main,
+      options = editor.options;
+
+    // Remove the old iframe
+    if (editor.$frame) 
+      editor.$frame.remove();
+
+    // Create a new iframe
+    var $frame = editor.$frame = $('<iframe frameborder="0" src="javascript:true;">')
+      .hide()
+      .appendTo($main);
+
+    // Load the iframe document content
+    var contentWindow = $frame[0].contentWindow,
+      doc = editor.doc = contentWindow.document,
+      $doc = $(doc);
+
+    doc.open();
+    doc.write(
+      options.docType +
+      '<html>' +
+      ((options.docCSSFile === '') ? '' : '<head><link rel="stylesheet" type="text/css" href="' + options.docCSSFile + '" /></head>') +
+      '<body style="' + options.bodyStyle + '"></body></html>'
+    );
+    doc.close();
+
+    // Work around for bug in IE which causes the editor to lose
+    // focus when clicking below the end of the document.
+    if (ie)
+      $doc.click(function() {focus(editor);});
+
+    // Load the content
+    updateFrame(editor);
+
+    // Bind the ie specific iframe event handlers
+    if (ie) {
+
+      // Save the current user selection. This code is needed since IE will
+      // reset the selection just after the beforedeactivate event and just
+      // before the beforeactivate event.
+      $doc.bind("beforedeactivate beforeactivate selectionchange keypress", function(e) {
+        
+        // Flag the editor as inactive
+        if (e.type == "beforedeactivate")
+          editor.inactive = true;
+        
+        // Get rid of the bogus selection and flag the editor as active
+        else if (e.type == "beforeactivate") {
+          if (!editor.inactive && editor.range && editor.range.length > 1)
+            editor.range.shift();
+          delete editor.inactive;
+        }
+
+        // Save the selection when the editor is active
+        else if (!editor.inactive) {
+          if (!editor.range) 
+            editor.range = [];
+          editor.range.unshift(getRange(editor));
+
+          // We only need the last 2 selections
+          while (editor.range.length > 2)
+            editor.range.pop();
+        }
+
+      });
+
+      // Restore the text range when the iframe gains focus
+      $frame.focus(function() {
+        restoreRange(editor);
+      });
+
+    }
+
+    // Update the textarea when the iframe loses focus
+    ($.browser.mozilla ? $doc : $(contentWindow)).blur(function() {
+      updateTextArea(editor, true);
+    });
+
+    // Enable the toolbar buttons as the user types or clicks
+    $doc.click(hidePopups)
+      .bind("keyup mouseup", function() {
+        refreshButtons(editor);
+      });
+
+    // Show the textarea for iPhone/iTouch/iPad or
+    // the iframe when design mode is supported.
+    if (iOS) editor.$area.show();
+    else $frame.show();
+
+    // Wait for the layout to finish - shortcut for $(document).ready()
+    $(function() {
+
+      var $toolbar = editor.$toolbar,
+          $group = $toolbar.children("div:last"),
+          wid = $main.width();
+
+      // Resize the toolbar
+      var hgt = $group.offset().top + $group.outerHeight() - $toolbar.offset().top + 1;
+      $toolbar.height(hgt);
+
+      // Resize the iframe
+      hgt = (/%/.test("" + options.height) ? $main.height() : parseInt(options.height)) - hgt;
+      $frame.width(wid).height(hgt);
+
+      // Resize the textarea. IE6 textareas have a 1px top
+      // & bottom margin that cannot be removed using css.
+      editor.$area.width(wid).height(ie6 ? hgt - 2 : hgt);
+
+      // Switch the iframe into design mode if enabled
+      disable(editor, editor.disabled);
+
+      // Enable or disable the toolbar buttons
+      refreshButtons(editor);
+
+    });
+
+  }
+
+  // refreshButtons - enables or disables buttons based on availability
+  function refreshButtons(editor) {
+
+    // Webkit requires focus before queryCommandEnabled will return anything but false
+    if (!iOS && $.browser.webkit && !editor.focused) {
+      editor.$frame[0].contentWindow.focus();
+      window.focus();
+      editor.focused = true;
+    }
+
+    // Get the object used for checking queryCommandEnabled
+    var queryObj = editor.doc;
+    if (ie) queryObj = getRange(editor);
+
+    // Loop through each button
+    var inSourceMode = sourceMode(editor);
+    $.each(editor.$toolbar.find("." + BUTTON_CLASS), function(idx, elem) {
+
+      var $elem = $(elem),
+        button = $.cleditor.buttons[$.data(elem, BUTTON_NAME)],
+        command = button.command,
+        enabled = true;
+
+      // Determine the state
+      if (editor.disabled)
+        enabled = false;
+      else if (button.getEnabled) {
+        var data = {
+          editor: editor,
+          button: elem,
+          buttonName: button.name,
+          popup: popups[button.popupName],
+          popupName: button.popupName,
+          command: button.command,
+          useCSS: editor.options.useCSS
+        };
+        enabled = button.getEnabled(data);
+        if (enabled === undefined)
+          enabled = true;
+      }
+      else if (((inSourceMode || iOS) && button.name != "source") ||
+      (ie && (command == "undo" || command == "redo")))
+        enabled = false;
+      else if (command && command != "print") {
+        if (ie && command == "hilitecolor")
+          command = "backcolor";
+        // IE does not support inserthtml, so it's always enabled
+        if (!ie || command != "inserthtml") {
+          try {enabled = queryObj.queryCommandEnabled(command);}
+          catch (err) {enabled = false;}
+        }
+      }
+
+      // Enable or disable the button
+      if (enabled) {
+        $elem.removeClass(DISABLED_CLASS);
+        $elem.removeAttr(DISABLED);
+      }
+      else {
+        $elem.addClass(DISABLED_CLASS);
+        $elem.attr(DISABLED, DISABLED);
+      }
+
+    });
+  }
+
+  // restoreRange - restores the current ie selection
+  function restoreRange(editor) {
+    if (ie && editor.range)
+      editor.range[0].select();
+  }
+
+  // select - selects all the text in either the textarea or iframe
+  function select(editor) {
+    setTimeout(function() {
+      if (sourceMode(editor)) editor.$area.select();
+      else execCommand(editor, "selectall");
+    }, 0);
+  }
+
+  // selectedHTML - returns the current HTML selection or and empty string
+  function selectedHTML(editor) {
+    restoreRange(editor);
+    var range = getRange(editor);
+    if (ie)
+      return range.htmlText;
+    var layer = $("<layer>")[0];
+    layer.appendChild(range.cloneContents());
+    var html = layer.innerHTML;
+    layer = null;
+    return html;
+  }
+
+  // selectedText - returns the current text selection or and empty string
+  function selectedText(editor) {
+    restoreRange(editor);
+    if (ie) return getRange(editor).text;
+    return getSelection(editor).toString();
+  }
+
+  // showMessage - alert replacement
+  function showMessage(editor, message, button) {
+    var popup = createPopup("msg", editor.options, MSG_CLASS);
+    popup.innerHTML = message;
+    showPopup(editor, popup, button);
+  }
+
+  // showPopup - shows a popup
+  function showPopup(editor, popup, button) {
+
+    var offset, left, top, $popup = $(popup);
+
+    // Determine the popup location
+    if (button) {
+      var $button = $(button);
+      offset = $button.offset();
+      left = --offset.left;
+      top = offset.top + $button.height();
+    }
+    else {
+      var $toolbar = editor.$toolbar;
+      offset = $toolbar.offset();
+      left = Math.floor(($toolbar.width() - $popup.width()) / 2) + offset.left;
+      top = offset.top + $toolbar.height() - 2;
+    }
+
+    // Position and show the popup
+    hidePopups();
+    $popup.css({left: left, top: top})
+      .show();
+
+    // Assign the popup button and click event handler
+    if (button) {
+      $.data(popup, BUTTON, button);
+      $popup.bind(CLICK, {popup: popup}, $.proxy(popupClick, editor));
+    }
+
+    // Focus the first input element if any
+    setTimeout(function() {
+      $popup.find(":text,textarea").eq(0).focus().select();
+    }, 100);
+
+  }
+
+  // sourceMode - returns true if the textarea is showing
+  function sourceMode(editor) {
+    return editor.$area.is(":visible");
+  }
+
+  // updateFrame - updates the iframe with the textarea contents
+  function updateFrame(editor, checkForChange) {
+    
+    var code = editor.$area.val(),
+      options = editor.options,
+      updateFrameCallback = options.updateFrame,
+      $body = $(editor.doc.body);
+
+    // Check for textarea change to avoid unnecessary firing
+    // of potentially heavy updateFrame callbacks.
+    if (updateFrameCallback) {
+      var sum = checksum(code);
+      if (checkForChange && editor.areaChecksum == sum)
+        return;
+      editor.areaChecksum = sum;
+    }
+
+    // Convert the textarea source code into iframe html
+    var html = updateFrameCallback ? updateFrameCallback(code) : code;
+
+    // Prevent script injection attacks by html encoding script tags
+    html = html.replace(/<(?=\/?script)/ig, "&lt;");
+
+    // Update the iframe checksum
+    if (options.updateTextArea)
+      editor.frameChecksum = checksum(html);
+
+    // Update the iframe and trigger the change event
+    if (html != $body.html()) {
+      $body.html(html);
+      $(editor).triggerHandler(CHANGE);
+    }
+
+  }
+
+  // updateTextArea - updates the textarea with the iframe contents
+  function updateTextArea(editor, checkForChange) {
+
+    var html = $(editor.doc.body).html(),
+      options = editor.options,
+      updateTextAreaCallback = options.updateTextArea,
+      $area = editor.$area;
+
+    // Check for iframe change to avoid unnecessary firing
+    // of potentially heavy updateTextArea callbacks.
+    if (updateTextAreaCallback) {
+      var sum = checksum(html);
+      if (checkForChange && editor.frameChecksum == sum)
+        return;
+      editor.frameChecksum = sum;
+    }
+
+    // Convert the iframe html into textarea source code
+    var code = updateTextAreaCallback ? updateTextAreaCallback(html) : html;
+
+    // Update the textarea checksum
+    if (options.updateFrame)
+      editor.areaChecksum = checksum(code);
+
+    // Update the textarea and trigger the change event
+    if (code != $area.val()) {
+      $area.val(code);
+      $(editor).triggerHandler(CHANGE);
+    }
+
+  }
+
+})(jQuery);

+ 97 - 0
modules/app_java/doc/webhelp/oxygen-webhelp/resources/js/jquery.cookie.js

@@ -0,0 +1,97 @@
+/**
+ * Cookie plugin
+ *
+ * Copyright (c) 2006 Klaus Hartl (stilbuero.de)
+ * Dual licensed under the MIT and GPL licenses:
+ * http://www.opensource.org/licenses/mit-license.php
+ * http://www.gnu.org/licenses/gpl.html
+ *
+ */
+
+/**
+ * Create a cookie with the given name and value and other optional parameters.
+ *
+ * @example $.cookie('the_cookie', 'the_value');
+ * @desc Set the value of a cookie.
+ * @example $.cookie('the_cookie', 'the_value', { expires: 7, path: '/', domain: 'jquery.com', secure: true });
+ * @desc Create a cookie with all available options.
+ * @example $.cookie('the_cookie', 'the_value');
+ * @desc Create a session cookie.
+ * @example $.cookie('the_cookie', null);
+ * @desc Delete a cookie by passing null as value. Keep in mind that you have to use the same path and domain
+ *       used when the cookie was set.
+ *
+ * @param String name The name of the cookie.
+ * @param String value The value of the cookie.
+ * @param Object options An object literal containing key/value pairs to provide optional cookie attributes.
+ * @option Number|Date expires Either an integer specifying the expiration date from now on in days or a Date object.
+ *                             If a negative value is specified (e.g. a date in the past), the cookie will be deleted.
+ *                             If set to null or omitted, the cookie will be a session cookie and will not be retained
+ *                             when the the browser exits.
+ * @option String path The value of the path atribute of the cookie (default: path of page that created the cookie).
+ * @option String domain The value of the domain attribute of the cookie (default: domain of page that created the cookie).
+ * @option Boolean secure If true, the secure attribute of the cookie will be set and the cookie transmission will
+ *                        require a secure protocol (like HTTPS).
+ * @type undefined
+ *
+ * @name $.cookie
+ * @cat Plugins/Cookie
+ * @author Klaus Hartl/[email protected]
+ */
+
+/**
+ * Get the value of a cookie with the given name.
+ *
+ * @example $.cookie('the_cookie');
+ * @desc Get the value of a cookie.
+ *
+ * @param String name The name of the cookie.
+ * @return The value of the cookie.
+ * @type String
+ *
+ * @name $.cookie
+ * @cat Plugins/Cookie
+ * @author Klaus Hartl/[email protected]
+ */
+jQuery.cookie = function(name, value, options) {
+    if (typeof value != 'undefined') { // name and value given, set cookie
+        options = options || {};
+        if (value === null) {
+            value = '';
+            options = $.extend({}, options); // clone object since it's unexpected behavior if the expired property were changed
+            options.expires = -1;
+        }
+        var expires = '';
+        if (options.expires && (typeof options.expires == 'number' || options.expires.toUTCString)) {
+            var date;
+            if (typeof options.expires == 'number') {
+                date = new Date();
+                date.setTime(date.getTime() + (options.expires * 24 * 60 * 60 * 1000));
+            } else {
+                date = options.expires;
+            }
+            expires = '; expires=' + date.toUTCString(); // use expires attribute, max-age is not supported by IE
+        }
+        // NOTE Needed to parenthesize options.path and options.domain
+        // in the following expressions, otherwise they evaluate to undefined
+        // in the packed version for some reason...
+        var path = options.path ? '; path=' + (options.path) : '';
+        var domain = options.domain ? '; domain=' + (options.domain) : '';
+        var secure = options.secure ? '; secure' : '';
+        document.cookie = [name, '=', encodeURIComponent(value), expires, path, domain, secure].join('');
+    } else { // only name given, get cookie
+        var cookieValue = null;
+        if (document.cookie && document.cookie != '') {
+            var cookies = document.cookie.split(';');
+            for (var i = 0; i < cookies.length; i++) {
+                var cookie = jQuery.trim(cookies[i]);
+                // Does this cookie string begin with the name we want?
+                if (cookie.substring(0, name.length + 1) == (name + '=')) {
+                    cookieValue = decodeURIComponent(cookie.substring(name.length + 1));
+                    break;
+                }
+            }
+        }
+        return cookieValue;
+    }
+};

+ 3278 - 0
modules/app_java/doc/webhelp/oxygen-webhelp/resources/js/jquery.dynatree.js

@@ -0,0 +1,3278 @@
+/*************************************************************************
+	jquery.dynatree.js
+	Dynamic tree view control, with support for lazy loading of branches.
+
+	Copyright (c) 2008-2011, Martin Wendt (http://wwWendt.de)
+	Dual licensed under the MIT or GPL Version 2 licenses.
+	http://code.google.com/p/dynatree/wiki/LicenseInfo
+
+	A current version and some documentation is available at
+		http://dynatree.googlecode.com/
+
+	$Version: 1.2.0$
+	$Revision: 528, 2011-09-17 18:58:59$
+
+	@depends: jquery.js
+	@depends: jquery.ui.core.js
+	@depends: jquery.cookie.js
+*************************************************************************/
+
+// Note: We currently allow eval() to parse the 'data' attribtes, when initializing from HTML.
+/*jslint laxbreak: true, browser: true, evil: true, indent: 0, white: false, onevar: false */
+
+/*************************************************************************
+ *	Debug functions
+ */
+
+var _canLog = true;
+
+function _log(mode, msg) {
+	/**
+	 * Usage: logMsg("%o was toggled", this);
+	 */
+	if( !_canLog ){
+		return;
+	}
+	// Remove first argument
+	var args = Array.prototype.slice.apply(arguments, [1]);
+	// Prepend timestamp
+	var dt = new Date();
+	var tag = dt.getHours()+":"+dt.getMinutes()+":"+dt.getSeconds()+"."+dt.getMilliseconds();
+	args[0] = tag + " - " + args[0];
+
+	try {
+		switch( mode ) {
+		case "info":
+			window.console.info.apply(window.console, args);
+			break;
+		case "warn":
+			window.console.warn.apply(window.console, args);
+			break;
+		default:
+			//window.console.log.apply(window.console, args);
+			break;
+		}
+	} catch(e) {
+		if( !window.console ){
+			_canLog = false; // Permanently disable, when logging is not supported by the browser
+		}
+	}
+}
+
+function logMsg(msg) {
+	Array.prototype.unshift.apply(arguments, ["debug"]);
+	_log.apply(this, arguments);
+}
+
+
+// Forward declaration
+var getDynaTreePersistData = null;
+
+
+
+/*************************************************************************
+ *	Constants
+ */
+var DTNodeStatus_Error   = -1;
+var DTNodeStatus_Loading = 1;
+var DTNodeStatus_Ok      = 0;
+
+
+// Start of local namespace
+(function($) {
+
+/*************************************************************************
+ *	Common tool functions.
+ */
+
+var Class = {
+	create: function() {
+		return function() {
+			this.initialize.apply(this, arguments);
+		};
+	}
+};
+
+// Tool function to get dtnode from the event target:
+function getDtNodeFromElement(el) {
+	var iMax = 5;
+	while( el && iMax-- ) {
+		if(el.dtnode) { return el.dtnode; }
+		el = el.parentNode;
+	}
+	return null;
+}
+
+function noop() {
+}
+
+/*************************************************************************
+ *	Class DynaTreeNode
+ */
+var DynaTreeNode = Class.create();
+
+DynaTreeNode.prototype = {
+	initialize: function(parent, tree, data) {
+		/**
+		 * @constructor
+		 */
+		this.parent = parent;
+		this.tree = tree;
+		if ( typeof data === "string" ){
+			data = { title: data };
+		}
+		if( data.key === undefined ){
+			data.key = "_" + tree._nodeCount++;
+		}
+		this.data = $.extend({}, $.ui.dynatree.nodedatadefaults, data);
+		this.li = null; // not yet created
+		this.span = null; // not yet created
+		this.ul = null; // not yet created
+		this.childList = null; // no subnodes yet
+		this.isLoading = false; // Lazy content is being loaded
+		this.hasSubSel = false;
+		this.bExpanded = false;
+		this.bSelected = false;
+
+	},
+
+	toString: function() {
+		return "DynaTreeNode<" + this.data.key + ">: '" + this.data.title + "'";
+	},
+
+	toDict: function(recursive, callback) {
+		var dict = $.extend({}, this.data);
+		dict.activate = ( this.tree.activeNode === this );
+		dict.focus = ( this.tree.focusNode === this );
+		dict.expand = this.bExpanded;
+		dict.select = this.bSelected;
+		if( callback ){
+			callback(dict);
+		}
+		if( recursive && this.childList ) {
+			dict.children = [];
+			for(var i=0, l=this.childList.length; i<l; i++ ){
+				dict.children.push(this.childList[i].toDict(true, callback));
+			}
+		} else {
+			delete dict.children;
+		}
+		return dict;
+	},
+
+	fromDict: function(dict) {
+		/**
+		 * Update node data. If dict contains 'children', then also replace
+		 * the hole sub tree.
+		 */
+		var children = dict.children;
+		if(children === undefined){
+			this.data = $.extend(this.data, dict);
+			this.render();
+			return;
+		}
+		dict = $.extend({}, dict);
+		dict.children = undefined;
+		this.data = $.extend(this.data, dict);
+		this.removeChildren();
+		this.addChild(children);
+	},
+
+	_getInnerHtml: function() {
+		var tree = this.tree,
+			opts = tree.options,
+			cache = tree.cache,
+			level = this.getLevel(),
+			data = this.data,
+			res = "";
+		// connector (expanded, expandable or simple)
+		if( level < opts.minExpandLevel ) {
+			if(level > 1){
+				res += cache.tagConnector;
+			}
+			// .. else (i.e. for root level) skip expander/connector altogether
+		} else if( this.hasChildren() !== false ) {
+			res += cache.tagExpander;
+		} else {
+			res += cache.tagConnector;
+		}
+		// Checkbox mode
+		if( opts.checkbox && data.hideCheckbox !== true && !data.isStatusNode ) {
+			res += cache.tagCheckbox;
+		}
+		// folder or doctype icon
+		if ( data.icon ) {
+			res += "<img src='" + opts.imagePath + data.icon + "' alt='' />";
+		} else if ( data.icon === false ) {
+			// icon == false means 'no icon'
+			noop(); // keep JSLint happy
+		} else {
+			// icon == null means 'default icon'
+			res += cache.tagNodeIcon;
+		}
+		// node title
+		var nodeTitle = "";
+		if ( opts.onCustomRender ){
+			nodeTitle = opts.onCustomRender.call(tree, this) || "";
+		}
+		if(!nodeTitle){
+			var tooltip = data.tooltip ? " title='" + data.tooltip + "'" : "";
+			if( opts.noLink || data.noLink ) {
+				nodeTitle = "<span style='display: inline-block;' class='" + opts.classNames.title + "'" + tooltip + ">" + data.title + "</span>";
+//				this.tree.logDebug("nodeTitle: " + nodeTitle);
+			}else{
+				//nodeTitle = "<a href='#' class='" + opts.classNames.title + "'" + tooltip + ">" + data.title + "</a>";
+				nodeTitle = "<a href=" + data.href + " id='" + data.key + "' class='" + opts.classNames.title + "'" + tooltip + ">" + data.title + "</a>";
+			}
+		}
+		res += nodeTitle;
+		return res;
+	},
+
+
+	_fixOrder: function() {
+		/**
+		 * Make sure, that <li> order matches childList order.
+		 */
+		var cl = this.childList;
+		if( !cl || !this.ul ){
+			return;
+		}
+		var childLI = this.ul.firstChild;
+		for(var i=0, l=cl.length-1; i<l; i++) {
+			var childNode1 = cl[i];
+			var childNode2 = childLI.dtnode;
+			if( childNode1 !== childNode2 ) {
+				this.tree.logDebug("_fixOrder: mismatch at index " + i + ": " + childNode1 + " != " + childNode2);
+				this.ul.insertBefore(childNode1.li, childNode2.li);
+			} else {
+				childLI = childLI.nextSibling;
+			}
+		}
+	},
+
+
+	render: function(useEffects, includeInvisible) {
+		/**
+		 * Create <li><span>..</span> .. </li> tags for this node.
+		 *
+		 * <li id='KEY' dtnode=NODE> // This div contains the node's span and list of child div's.
+		 *   <span class='title'>S S S A</span> // Span contains graphic spans and title <a> tag
+		 *   <ul> // only present, when node has children
+		 *       <li id='KEY' dtnode=NODE>child1</li>
+		 *       <li id='KEY' dtnode=NODE>child2</li>
+		 *   </ul>
+		 * </li>
+		 */
+		//this.tree.logDebug("%s.render(%s)", this, useEffects);
+		// ---
+		var tree = this.tree,
+			parent = this.parent,
+			data = this.data,
+			opts = tree.options,
+			cn = opts.classNames,
+			isLastSib = this.isLastSibling(),
+			firstTime = false;
+
+		if( !parent && !this.ul ) {
+			// Root node has only a <ul>
+			this.li = this.span = null;
+			this.ul = document.createElement("ul");
+			if( opts.minExpandLevel > 1 ){
+				this.ul.className = cn.container + " " + cn.noConnector;
+			}else{
+				this.ul.className = cn.container;
+			}
+		} else if( parent ) {
+			// Create <li><span /> </li>
+			if( ! this.li ) {
+				firstTime = true;
+				this.li = document.createElement("li");
+				this.li.dtnode = this;
+				if( data.key && opts.generateIds ){
+					this.li.id = opts.idPrefix + data.key;
+				}
+				this.span = document.createElement("span");
+				this.span.className = cn.title;
+				this.li.appendChild(this.span);
+
+				if( !parent.ul ) {
+					// This is the parent's first child: create UL tag
+					// (Hidden, because it will be
+					parent.ul = document.createElement("ul");
+					parent.ul.style.display = "none";
+					parent.li.appendChild(parent.ul);
+//					if( opts.minExpandLevel > this.getLevel() ){
+//						parent.ul.className = cn.noConnector;
+//					}
+				}
+				// set node connector images, links and text
+//				this.span.innerHTML = this._getInnerHtml();
+
+				parent.ul.appendChild(this.li);
+			}
+			// set node connector images, links and text
+			this.span.innerHTML = this._getInnerHtml();
+			// Set classes for current status
+			var cnList = [];
+			cnList.push(cn.node);
+			if( data.isFolder ){
+				cnList.push(cn.folder);
+			}
+			
+			if( this.bExpanded ){
+				cnList.push(cn.expanded);
+			}
+			if( this.hasChildren() !== false ){
+				cnList.push(cn.hasChildren);
+			}
+			if( data.isLazy && this.childList === null ){
+				cnList.push(cn.lazy);
+			}
+			if( isLastSib ){
+				cnList.push(cn.lastsib);
+			}
+			if( this.bSelected ){
+				cnList.push(cn.selected);
+			}
+			if( this.hasSubSel ){
+				cnList.push(cn.partsel);
+			}
+			if( tree.activeNode === this ){
+				cnList.push(cn.active);
+			}
+			if( data.addClass ){
+				cnList.push(data.addClass);
+			}
+			// IE6 doesn't correctly evaluate multiple class names,
+			// so we create combined class names that can be used in the CSS
+			cnList.push(cn.combinedExpanderPrefix
+					+ (this.bExpanded ? "e" : "c")
+					+ (data.isLazy && this.childList === null ? "d" : "")
+					+ (isLastSib ? "l" : "")
+					);
+			cnList.push(cn.combinedIconPrefix
+					+ (this.bExpanded ? "e" : "c")
+					+ (data.isFolder ? "f" : "")
+					);
+			this.span.className = cnList.join(" ");
+
+			// TODO: we should not set this in the <span> tag also, if we set it here:
+			this.li.className = isLastSib ? cn.lastsib : "";
+
+			// Allow tweaking, binding, after node was created for the first time
+			if(firstTime && opts.onCreate){
+				opts.onCreate.call(tree, this, this.span);
+			}
+			// Hide children, if node is collapsed
+//			this.ul.style.display = ( this.bExpanded || !parent ) ? "" : "none";
+			// Allow tweaking after node state was rendered
+			if(opts.onRender){
+				opts.onRender.call(tree, this, this.span);
+			}
+		}
+		// Visit child nodes
+		if( (this.bExpanded || includeInvisible === true) && this.childList ) {
+			for(var i=0, l=this.childList.length; i<l; i++) {
+				this.childList[i].render(false, includeInvisible);
+			}
+			// Make sure the tag order matches the child array
+			this._fixOrder();
+		}
+		// Hide children, if node is collapsed
+		if( this.ul ) {
+			var isHidden = (this.ul.style.display === "none");
+			var isExpanded = !!this.bExpanded;
+//			logMsg("isHidden:%s", isHidden);
+			if( useEffects && opts.fx && (isHidden === isExpanded) ) {
+				var duration = opts.fx.duration || 200;
+				$(this.ul).animate(opts.fx, duration);
+			} else {
+				this.ul.style.display = ( this.bExpanded || !parent ) ? "" : "none";
+			}
+		}
+	},
+	/** Return '/id1/id2/id3'. */
+	getKeyPath: function(excludeSelf) {
+		var path = [];
+		this.visitParents(function(node){
+			if(node.parent){
+				path.unshift(node.data.key);
+			}
+		}, !excludeSelf);
+		return "/" + path.join(this.tree.options.keyPathSeparator);
+	},
+
+	getParent: function() {
+		return this.parent;
+	},
+
+	getChildren: function() {
+		if(this.hasChildren() === undefined){
+			return undefined; // Lazy node: unloaded, currently loading, or load error
+		}
+		return this.childList;
+	},
+
+	/** Check if node has children (returns undefined, if not sure). */
+	hasChildren: function() {
+		if(this.data.isLazy){
+			if(this.childList === null || this.childList === undefined){
+				// Not yet loaded
+				return undefined;
+			}else if(this.childList.length === 0){
+				// Loaded, but response was empty
+				return false;
+			}else if(this.childList.length === 1 && this.childList[0].isStatusNode()){
+				// Currently loading or load error
+				return undefined;
+			}
+			return true;
+		}
+		return !!this.childList;
+	},
+
+	isFirstSibling: function() {
+		var p = this.parent;
+		return !p || p.childList[0] === this;
+	},
+
+	isLastSibling: function() {
+		var p = this.parent;
+		return !p || p.childList[p.childList.length-1] === this;
+	},
+
+	getPrevSibling: function() {
+		if( !this.parent ){
+			return null;
+		}
+		var ac = this.parent.childList;
+		for(var i=1, l=ac.length; i<l; i++){ // start with 1, so prev(first) = null
+			if( ac[i] === this ){
+				return ac[i-1];
+			}
+		}
+		return null;
+	},
+
+	getNextSibling: function() {
+		if( !this.parent ){
+			return null;
+		}
+		var ac = this.parent.childList;
+		for(var i=0, l=ac.length-1; i<l; i++){ // up to length-2, so next(last) = null
+			if( ac[i] === this ){
+				return ac[i+1];
+			}
+		}
+		return null;
+	},
+
+	isStatusNode: function() {
+		return (this.data.isStatusNode === true);
+	},
+
+	isChildOf: function(otherNode) {
+		return (this.parent && this.parent === otherNode);
+	},
+
+	isDescendantOf: function(otherNode) {
+		if(!otherNode){
+			return false;
+		}
+		var p = this.parent;
+		while( p ) {
+			if( p === otherNode ){
+				return true;
+			}
+			p = p.parent;
+		}
+		return false;
+	},
+
+	countChildren: function() {
+		var cl = this.childList;
+		if( !cl ){
+			return 0;
+		}
+		var n = cl.length;
+		for(var i=0, l=n; i<l; i++){
+			var child = cl[i];
+			n += child.countChildren();
+		}
+		return n;
+	},
+
+	/**Sort child list by title.
+	 * cmd: optional compare function.
+	 * deep: optional: pass true to sort all descendant nodes.
+	 */
+	sortChildren: function(cmp, deep) {
+		var cl = this.childList;
+		if( !cl ){
+			return;
+		}
+		cmp = cmp || function(a, b) {
+//			return a.data.title === b.data.title ? 0 : a.data.title > b.data.title ? 1 : -1;
+			var x = a.data.title.toLowerCase(),
+				y = b.data.title.toLowerCase();
+			return x === y ? 0 : x > y ? 1 : -1;
+			};
+		cl.sort(cmp);
+		if( deep ){
+			for(var i=0, l=cl.length; i<l; i++){
+				if( cl[i].childList ){
+					cl[i].sortChildren(cmp, "$norender$");
+				}
+			}
+		}
+		if( deep !== "$norender$" ){
+			this.render();
+		}
+	},
+
+	_setStatusNode: function(data) {
+		// Create, modify or remove the status child node (pass 'null', to remove it).
+		var firstChild = ( this.childList ? this.childList[0] : null );
+		if( !data ) {
+			if ( firstChild && firstChild.isStatusNode()) {
+				try{
+					// I've seen exceptions here with loadKeyPath...
+					if(this.ul){
+						this.ul.removeChild(firstChild.li);
+						firstChild.li = null; // avoid leaks (issue 215)
+					}
+				}catch(e){}
+				if( this.childList.length === 1 ){
+					this.childList = [];
+				}else{
+					this.childList.shift();
+				}
+			}
+		} else if ( firstChild ) {
+			data.isStatusNode = true;
+			data.key = "_statusNode";
+			firstChild.data = data;
+			firstChild.render();
+		} else {
+			data.isStatusNode = true;
+			data.key = "_statusNode";
+			firstChild = this.addChild(data);
+		}
+	},
+
+	setLazyNodeStatus: function(lts, opts) {
+		var tooltip = (opts && opts.tooltip) ? opts.tooltip : null;
+		var info = (opts && opts.info) ? " (" + opts.info + ")" : "";
+		switch( lts ) {
+			case DTNodeStatus_Ok:
+				this._setStatusNode(null);
+				$(this.span).removeClass(this.tree.options.classNames.nodeLoading);
+				this.isLoading = false;
+//				this.render();
+				if( this.tree.options.autoFocus ) {
+					if( this === this.tree.tnRoot && this.childList && this.childList.length > 0) {
+						// special case: using ajaxInit
+						this.childList[0].focus();
+					} else {
+						this.focus();
+					}
+				}
+				break;
+			case DTNodeStatus_Loading:
+				this.isLoading = true;
+				$(this.span).addClass(this.tree.options.classNames.nodeLoading);
+				// The root is hidden, so we set a temporary status child
+				if(!this.parent){
+					this._setStatusNode({
+						title: this.tree.options.strings.loading + info,
+						tooltip: tooltip,
+						addClass: this.tree.options.classNames.nodeWait
+					});
+				}
+				break;
+			case DTNodeStatus_Error:
+				this.isLoading = false;
+//				$(this.span).addClass(this.tree.options.classNames.nodeError);
+				this._setStatusNode({
+					title: this.tree.options.strings.loadError + info,
+					tooltip: tooltip,
+					addClass: this.tree.options.classNames.nodeError
+				});
+				break;
+			default:
+				throw "Bad LazyNodeStatus: '" + lts + "'.";
+		}
+	},
+
+	_parentList: function(includeRoot, includeSelf) {
+		var l = [];
+		var dtn = includeSelf ? this : this.parent;
+		while( dtn ) {
+			if( includeRoot || dtn.parent ){
+				l.unshift(dtn);
+			}
+			dtn = dtn.parent;
+		}
+		return l;
+	},
+	getLevel: function() {
+		/**
+		 * Return node depth. 0: System root node, 1: visible top-level node.
+		 */
+		var level = 0;
+		var dtn = this.parent;
+		while( dtn ) {
+			level++;
+			dtn = dtn.parent;
+		}
+		return level;
+	},
+
+	_getTypeForOuterNodeEvent: function(event) {
+		/** Return the inner node span (title, checkbox or expander) if
+		 *  event.target points to the outer span.
+		 *  This function should fix issue #93:
+		 *  FF2 ignores empty spans, when generating events (returning the parent instead).
+		 */
+		var cns = this.tree.options.classNames;
+		var target = event.target;
+		// Only process clicks on an outer node span (probably due to a FF2 event handling bug)
+		if( target.className.indexOf(cns.node) < 0 ) {
+			return null;
+		}
+		// Event coordinates, relative to outer node span:
+		var eventX = event.pageX - target.offsetLeft;
+		var eventY = event.pageY - target.offsetTop;
+
+		for(var i=0, l=target.childNodes.length; i<l; i++) {
+			var cn = target.childNodes[i];
+			var x = cn.offsetLeft - target.offsetLeft;
+			var y = cn.offsetTop - target.offsetTop;
+			var nx = cn.clientWidth, ny = cn.clientHeight;
+//	        alert (cn.className + ": " + x + ", " + y + ", s:" + nx + ", " + ny);
+			if( eventX >= x && eventX <= (x+nx) && eventY >= y && eventY <= (y+ny) ) {
+//	            alert("HIT "+ cn.className);
+				if( cn.className==cns.title ){
+					return "title";
+				}else if( cn.className==cns.expander ){
+					return "expander";
+				}else if( cn.className==cns.checkbox ){
+					return "checkbox";
+				}else if( cn.className==cns.nodeIcon ){
+					return "icon";
+				}
+			}
+		}
+		return "prefix";
+	},
+
+	getEventTargetType: function(event) {
+		// Return the part of a node, that a click event occured on.
+		// Note: there is no check, if the event was fired on TIHS node.
+		var tcn = event && event.target ? event.target.className : "";
+		var cns = this.tree.options.classNames;
+
+		if( tcn === cns.title ){
+			return "title";
+		}else if( tcn === cns.expander ){
+			return "expander";
+		}else if( tcn === cns.checkbox ){
+			return "checkbox";
+		}else if( tcn === cns.nodeIcon ){
+			return "icon";
+		}else if( tcn === cns.empty || tcn === cns.vline || tcn === cns.connector ){
+			return "prefix";
+		}else if( tcn.indexOf(cns.node) >= 0 ){
+			// FIX issue #93
+			return this._getTypeForOuterNodeEvent(event);
+		}
+		return null;
+	},
+
+	isVisible: function() {
+		// Return true, if all parents are expanded.
+		var parents = this._parentList(true, false);
+		for(var i=0, l=parents.length; i<l; i++){
+			if( ! parents[i].bExpanded ){ return false; }
+		}
+		return true;
+	},
+
+	makeVisible: function() {
+		// Make sure, all parents are expanded
+		var parents = this._parentList(true, false);
+		for(var i=0, l=parents.length; i<l; i++){
+			parents[i]._expand(true);
+		}
+	},
+
+	focus: function() {
+		// TODO: check, if we already have focus
+//		this.tree.logDebug("dtnode.focus(): %o", this);
+		this.makeVisible();
+		try {
+			$(this.span).find(">a").focus();
+		} catch(e) { }
+	},
+
+	isFocused: function() {
+		return (this.tree.tnFocused === this);
+	},
+
+	_activate: function(flag, fireEvents) {
+		// (De)Activate - but not focus - this node.
+		this.tree.logDebug("dtnode._activate(%o, fireEvents=%o) - %o", flag, fireEvents, this);
+		var opts = this.tree.options;
+		if( this.data.isStatusNode ){
+			return;
+		}
+		if ( fireEvents && opts.onQueryActivate && opts.onQueryActivate.call(this.tree, flag, this) === false ){
+			return; // Callback returned false
+		}
+		if( flag ) {
+			// Activate
+			if( this.tree.activeNode ) {
+				if( this.tree.activeNode === this ){
+					return;
+				}
+				this.tree.activeNode.deactivate();
+			}
+			if( opts.activeVisible ){
+				this.makeVisible();
+			}
+			this.tree.activeNode = this;
+			if( opts.persist ){
+				$.cookie(opts.cookieId+"-active", this.data.key, opts.cookie);
+			}
+			this.tree.persistence.activeKey = this.data.key;
+			$(this.span).addClass(opts.classNames.active);
+			if ( fireEvents && opts.onActivate ){
+				opts.onActivate.call(this.tree, this);
+			}
+		} else {
+			// Deactivate
+			if( this.tree.activeNode === this ) {
+				if ( opts.onQueryActivate && opts.onQueryActivate.call(this.tree, false, this) === false ){
+					return; // Callback returned false
+				}
+				$(this.span).removeClass(opts.classNames.active);
+				if( opts.persist ) {
+					// Note: we don't pass null, but ''. So the cookie is not deleted.
+					// If we pass null, we also have to pass a COPY of opts, because $cookie will override opts.expires (issue 84)
+					$.cookie(opts.cookieId+"-active", "", opts.cookie);
+				}
+				this.tree.persistence.activeKey = null;
+				this.tree.activeNode = null;
+				if ( fireEvents && opts.onDeactivate ){
+					opts.onDeactivate.call(this.tree, this);
+				}
+			}
+		}
+	},
+
+	activate: function() {
+		// Select - but not focus - this node.
+//		this.tree.logDebug("dtnode.activate(): %o", this);
+		this._activate(true, true);
+	},
+
+	activateSilently: function() {
+		this._activate(true, false);
+	},
+
+	deactivate: function() {
+//		this.tree.logDebug("dtnode.deactivate(): %o", this);
+		this._activate(false, true);
+	},
+
+	isActive: function() {
+		return (this.tree.activeNode === this);
+	},
+
+	_userActivate: function() {
+		// Handle user click / [space] / [enter], according to clickFolderMode.
+		var activate = true;
+		var expand = false;
+		if ( this.data.isFolder ) {
+			switch( this.tree.options.clickFolderMode ) {
+			case 2:
+				activate = false;
+				expand = true;
+				break;
+			case 3:
+				activate = expand = true;
+				break;
+			}
+		}
+		if( this.parent === null ) {
+			expand = false;
+		}
+		if( expand ) {
+			this.toggleExpand();
+			this.focus();
+		}
+		if( activate ) {
+			this.activate();
+		}
+	},
+
+	_setSubSel: function(hasSubSel) {
+		if( hasSubSel ) {
+			this.hasSubSel = true;
+			$(this.span).addClass(this.tree.options.classNames.partsel);
+		} else {
+			this.hasSubSel = false;
+			$(this.span).removeClass(this.tree.options.classNames.partsel);
+		}
+	},
+	/**
+	 * Fix selection and partsel status, of parent nodes, according to current status of
+	 * end nodes.
+	 */
+	_updatePartSelectionState: function() {
+//		alert("_updatePartSelectionState " + this);
+//		this.tree.logDebug("_updatePartSelectionState() - %o", this);
+		var sel;
+		// Return `true` or `false` for end nodes and remove part-sel flag
+		if( ! this.hasChildren() ){
+			sel = (this.bSelected && !this.data.unselectable && !this.data.isStatusNode);
+			this._setSubSel(false);
+			return sel;
+		}
+		// Return `true`, `false`, or `undefined` for parent nodes
+		var i, l,
+			cl = this.childList,
+			allSelected = true,
+			allDeselected = true;
+		for(i=0, l=cl.length; i<l;  i++) {
+			var n = cl[i],
+				s = n._updatePartSelectionState();
+			if( s !== false){
+				allDeselected = false;
+			}
+			if( s !== true){
+				allSelected = false;
+			}
+		}
+		if( allSelected ){
+			sel = true;
+		} else if ( allDeselected ){
+			sel = false;
+		} else {
+			sel = undefined;
+		}
+		this._setSubSel(sel === undefined);
+		this.bSelected = (sel === true);
+		return sel;
+	},
+
+	/**
+	 * Fix selection status, after this node was (de)selected in multi-hier mode.
+	 * This includes (de)selecting all children.
+	 */
+	_fixSelectionState: function() {
+//		alert("_fixSelectionState " + this);
+//		this.tree.logDebug("_fixSelectionState(%s) - %o", this.bSelected, this);
+		var p, i, l;
+		if( this.bSelected ) {
+			// Select all children
+			this.visit(function(node){
+				node.parent._setSubSel(true);
+				if(!node.data.unselectable){
+					node._select(true, false, false);
+				}
+			});
+			// Select parents, if all children are selected
+			p = this.parent;
+			while( p ) {
+				p._setSubSel(true);
+				var allChildsSelected = true;
+				for(i=0, l=p.childList.length; i<l;  i++) {
+					var n = p.childList[i];
+					if( !n.bSelected && !n.data.isStatusNode && !n.data.unselectable) {
+						allChildsSelected = false;
+						break;
+					}
+				}
+				if( allChildsSelected ){
+					p._select(true, false, false);
+				}
+				p = p.parent;
+			}
+		} else {
+			// Deselect all children
+			this._setSubSel(false);
+			this.visit(function(node){
+				node._setSubSel(false);
+				node._select(false, false, false);
+			});
+			// Deselect parents, and recalc hasSubSel
+			p = this.parent;
+			while( p ) {
+				p._select(false, false, false);
+				var isPartSel = false;
+				for(i=0, l=p.childList.length; i<l;  i++) {
+					if( p.childList[i].bSelected || p.childList[i].hasSubSel ) {
+						isPartSel = true;
+						break;
+					}
+				}
+				p._setSubSel(isPartSel);
+				p = p.parent;
+			}
+		}
+	},
+
+	_select: function(sel, fireEvents, deep) {
+		// Select - but not focus - this node.
+//		this.tree.logDebug("dtnode._select(%o) - %o", sel, this);
+		var opts = this.tree.options;
+		if( this.data.isStatusNode ){
+			return;
+		}
+		//
+		if( this.bSelected === sel ) {
+//			this.tree.logDebug("dtnode._select(%o) IGNORED - %o", sel, this);
+			return;
+		}
+		// Allow event listener to abort selection
+		if ( fireEvents && opts.onQuerySelect && opts.onQuerySelect.call(this.tree, sel, this) === false ){
+			return; // Callback returned false
+		}
+		// Force single-selection
+		if( opts.selectMode==1 && sel ) {
+			this.tree.visit(function(node){
+				if( node.bSelected ) {
+					// Deselect; assuming that in selectMode:1 there's max. one other selected node
+					node._select(false, false, false);
+					return false;
+				}
+			});
+		}
+
+		this.bSelected = sel;
+//        this.tree._changeNodeList("select", this, sel);
+
+		if( sel ) {
+			if( opts.persist ){
+				this.tree.persistence.addSelect(this.data.key);
+			}
+			$(this.span).addClass(opts.classNames.selected);
+
+			if( deep && opts.selectMode === 3 ){
+				this._fixSelectionState();
+			}
+			if ( fireEvents && opts.onSelect ){
+				opts.onSelect.call(this.tree, true, this);
+			}
+		} else {
+			if( opts.persist ){
+				this.tree.persistence.clearSelect(this.data.key);
+			}
+			$(this.span).removeClass(opts.classNames.selected);
+
+			if( deep && opts.selectMode === 3 ){
+				this._fixSelectionState();
+			}
+			if ( fireEvents && opts.onSelect ){
+				opts.onSelect.call(this.tree, false, this);
+			}
+		}
+	},
+
+	select: function(sel) {
+		// Select - but not focus - this node.
+//		this.tree.logDebug("dtnode.select(%o) - %o", sel, this);
+		if( this.data.unselectable ){
+			return this.bSelected;
+		}
+		return this._select(sel!==false, true, true);
+	},
+
+	toggleSelect: function() {
+//		this.tree.logDebug("dtnode.toggleSelect() - %o", this);
+		return this.select(!this.bSelected);
+	},
+
+	isSelected: function() {
+		return this.bSelected;
+	},
+
+	isLazy: function() {
+		return !!this.data.isLazy;
+	},
+
+	_loadContent: function() {
+		try {
+			var opts = this.tree.options;
+			this.tree.logDebug("_loadContent: start - %o", this);
+			this.setLazyNodeStatus(DTNodeStatus_Loading);
+			if( true === opts.onLazyRead.call(this.tree, this) ) {
+				// If function returns 'true', we assume that the loading is done:
+				this.setLazyNodeStatus(DTNodeStatus_Ok);
+				// Otherwise (i.e. if the loading was started as an asynchronous process)
+				// the onLazyRead(dtnode) handler is expected to call dtnode.setLazyNodeStatus(DTNodeStatus_Ok/_Error) when done.
+				this.tree.logDebug("_loadContent: succeeded - %o", this);
+			}
+		} catch(e) {
+			this.tree.logWarning("_loadContent: failed - %o", e);
+			this.setLazyNodeStatus(DTNodeStatus_Error, {tooltip: ""+e});
+		}
+	},
+
+	_expand: function(bExpand, forceSync) {
+		if( this.bExpanded === bExpand ) {
+			this.tree.logDebug("dtnode._expand(%o) IGNORED - %o", bExpand, this);
+			return;
+		}
+		this.tree.logDebug("dtnode._expand(%o) - %o", bExpand, this);
+		var opts = this.tree.options;
+		if( !bExpand && this.getLevel() < opts.minExpandLevel ) {
+			this.tree.logDebug("dtnode._expand(%o) prevented collapse - %o", bExpand, this);
+			return;
+		}
+		if ( opts.onQueryExpand && opts.onQueryExpand.call(this.tree, bExpand, this) === false ){
+			return; // Callback returned false
+		}
+		this.bExpanded = bExpand;
+
+		// Persist expand state
+		if( opts.persist ) {
+			if( bExpand ){
+				this.tree.persistence.addExpand(this.data.key);
+			}else{
+				this.tree.persistence.clearExpand(this.data.key);
+			}
+		}
+		// Do not apply animations in init phase, or before lazy-loading
+		var allowEffects = !(this.data.isLazy && this.childList === null)
+			&& !this.isLoading
+			&& !forceSync;
+		this.render(allowEffects);
+
+		// Auto-collapse mode: collapse all siblings
+		if( this.bExpanded && this.parent && opts.autoCollapse ) {
+			var parents = this._parentList(false, true);
+			for(var i=0, l=parents.length; i<l; i++){
+				parents[i].collapseSiblings();
+			}
+		}
+		// If the currently active node is now hidden, deactivate it
+		if( opts.activeVisible && this.tree.activeNode && ! this.tree.activeNode.isVisible() ) {
+			this.tree.activeNode.deactivate();
+		}
+		// Expanding a lazy node: set 'loading...' and call callback
+		if( bExpand && this.data.isLazy && this.childList === null && !this.isLoading ) {
+			this._loadContent();
+			return;
+		}
+		if ( opts.onExpand ){
+			opts.onExpand.call(this.tree, bExpand, this);
+		}
+	},
+
+	isExpanded: function() {
+		return this.bExpanded;
+	},
+
+	expand: function(flag) {
+		flag = (flag !== false);
+		if( !this.childList && !this.data.isLazy && flag ){
+			return; // Prevent expanding empty nodes
+		} else if( this.parent === null && !flag ){
+			return; // Prevent collapsing the root
+		}
+		this._expand(flag);
+	},
+
+	scheduleAction: function(mode, ms) {
+		/** Schedule activity for delayed execution (cancel any pending request).
+		 *  scheduleAction('cancel') will cancel the request.
+		 */
+		if( this.tree.timer ) {
+			clearTimeout(this.tree.timer);
+			this.tree.logDebug("clearTimeout(%o)", this.tree.timer);
+		}
+		var self = this; // required for closures
+		switch (mode) {
+		case "cancel":
+			// Simply made sure that timer was cleared
+			break;
+		case "expand":
+			this.tree.timer = setTimeout(function(){
+				self.tree.logDebug("setTimeout: trigger expand");
+				self.expand(true);
+			}, ms);
+			break;
+		case "activate":
+			this.tree.timer = setTimeout(function(){
+				self.tree.logDebug("setTimeout: trigger activate");
+				self.activate();
+			}, ms);
+			break;
+		default:
+			throw "Invalid mode " + mode;
+		}
+		this.tree.logDebug("setTimeout(%s, %s): %s", mode, ms, this.tree.timer);
+	},
+
+	toggleExpand: function() {
+		this.expand(!this.bExpanded);
+	},
+
+	collapseSiblings: function() {
+		if( this.parent === null ){
+			return;
+		}
+		var ac = this.parent.childList;
+		for (var i=0, l=ac.length; i<l; i++) {
+			if ( ac[i] !== this && ac[i].bExpanded ){
+				ac[i]._expand(false);
+			}
+		}
+	},
+
+	_onClick: function(event) {
+//		this.tree.logDebug("dtnode.onClick(" + event.type + "): dtnode:" + this + ", button:" + event.button + ", which: " + event.which);
+		var targetType = this.getEventTargetType(event);
+		if( targetType === "expander" ) {
+			// Clicking the expander icon always expands/collapses
+			this.toggleExpand();
+			//this.focus(); // OXY
+		} else if( targetType === "checkbox" ) {
+			// Clicking the checkbox always (de)selects
+			this.toggleSelect();
+			this.focus(); // issue 95
+		} else {
+			this._userActivate();
+			var aTag = this.span.getElementsByTagName("a");
+			if(aTag[0]){
+				// issue 154
+				// TODO: check if still required on IE 9:
+				// Chrome and Safari don't focus the a-tag on click,
+				// but calling focus() seem to have problems on IE:
+				// http://code.google.com/p/dynatree/issues/detail?id=154
+				if(!$.browser.msie){
+					aTag[0].focus();
+				}
+			}else{
+				// 'noLink' option was set
+				return true;
+			}
+		}
+		// Make sure that clicks stop, otherwise <a href='#'> jumps to the top
+		event.preventDefault();
+	},
+
+	_onDblClick: function(event) {
+//		this.tree.logDebug("dtnode.onDblClick(" + event.type + "): dtnode:" + this + ", button:" + event.button + ", which: " + event.which);
+	},
+
+	_onKeydown: function(event) {
+//		this.tree.logDebug("dtnode.onKeydown(" + event.type + "): dtnode:" + this + ", charCode:" + event.charCode + ", keyCode: " + event.keyCode + ", which: " + event.which);
+		var handled = true,
+			sib;
+//		alert("keyDown" + event.which);
+
+		switch( event.which ) {
+			// charCodes:
+//			case 43: // '+'
+			case 107: // '+'
+			case 187: // '+' @ Chrome, Safari
+				if( !this.bExpanded ){ this.toggleExpand(); }
+				break;
+//			case 45: // '-'
+			case 109: // '-'
+			case 189: // '+' @ Chrome, Safari
+				if( this.bExpanded ){ this.toggleExpand(); }
+				break;
+			//~ case 42: // '*'
+				//~ break;
+			//~ case 47: // '/'
+				//~ break;
+			// case 13: // <enter>
+				// <enter> on a focused <a> tag seems to generate a click-event.
+				// this._userActivate();
+				// break;
+			case 32: // <space>
+				this._userActivate();
+				break;
+			case 8: // <backspace>
+				if( this.parent ){
+					this.parent.focus();
+				}
+				break;
+			case 37: // <left>
+				if( this.bExpanded ) {
+					this.toggleExpand();
+					this.focus();
+//				} else if( this.parent && (this.tree.options.rootVisible || this.parent.parent) ) {
+				} else if( this.parent && this.parent.parent ) {
+					this.parent.focus();
+				}
+				break;
+			case 39: // <right>
+				if( !this.bExpanded && (this.childList || this.data.isLazy) ) {
+					this.toggleExpand();
+					this.focus();
+				} else if( this.childList ) {
+					this.childList[0].focus();
+				}
+				break;
+			case 38: // <up>
+				sib = this.getPrevSibling();
+				while( sib && sib.bExpanded && sib.childList ){
+					sib = sib.childList[sib.childList.length-1];
+				}
+//				if( !sib && this.parent && (this.tree.options.rootVisible || this.parent.parent) )
+				if( !sib && this.parent && this.parent.parent ){
+					sib = this.parent;
+				}
+				if( sib ){
+					sib.focus();
+				}
+				break;
+			case 40: // <down>
+				if( this.bExpanded && this.childList ) {
+					sib = this.childList[0];
+				} else {
+					var parents = this._parentList(false, true);
+					for(var i=parents.length-1; i>=0; i--) {
+						sib = parents[i].getNextSibling();
+						if( sib ){ break; }
+					}
+				}
+				if( sib ){
+					sib.focus();
+				}
+				break;
+			default:
+				handled = false;
+		}
+		// Return false, if handled, to prevent default processing
+//		return !handled;
+		if(handled){
+			event.preventDefault();
+		}
+	},
+
+	_onKeypress: function(event) {
+		// onKeypress is only hooked to allow user callbacks.
+		// We don't process it, because IE and Safari don't fire keypress for cursor keys.
+//		this.tree.logDebug("dtnode.onKeypress(" + event.type + "): dtnode:" + this + ", charCode:" + event.charCode + ", keyCode: " + event.keyCode + ", which: " + event.which);
+	},
+
+	_onFocus: function(event) {
+		// Handles blur and focus events.
+//		this.tree.logDebug("dtnode.onFocus(%o): %o", event, this);
+		var opts = this.tree.options;
+		if ( event.type == "blur" || event.type == "focusout" ) {
+			if ( opts.onBlur ){
+				opts.onBlur.call(this.tree, this);
+			}
+			if( this.tree.tnFocused ){
+				$(this.tree.tnFocused.span).removeClass(opts.classNames.focused);
+			}
+			this.tree.tnFocused = null;
+			if( opts.persist ){
+				$.cookie(opts.cookieId+"-focus", "", opts.cookie);
+			}
+		} else if ( event.type=="focus" || event.type=="focusin") {
+			// Fix: sometimes the blur event is not generated
+			if( this.tree.tnFocused && this.tree.tnFocused !== this ) {
+				this.tree.logDebug("dtnode.onFocus: out of sync: curFocus: %o", this.tree.tnFocused);
+				$(this.tree.tnFocused.span).removeClass(opts.classNames.focused);
+			}
+			this.tree.tnFocused = this;
+			if ( opts.onFocus ){
+				opts.onFocus.call(this.tree, this);
+			}
+			$(this.tree.tnFocused.span).addClass(opts.classNames.focused);
+			if( opts.persist ){
+				$.cookie(opts.cookieId+"-focus", this.data.key, opts.cookie);
+			}
+		}
+		// TODO: return anything?
+//		return false;
+	},
+
+	visit: function(fn, includeSelf) {
+		// Call fn(node) for all child nodes. Stop iteration, if fn() returns false.
+		var res = true;
+		if( includeSelf === true ) {
+			res = fn(this);
+			if( res === false || res == "skip" ){
+				return res;
+			}
+		}
+		if(this.childList){
+			for(var i=0, l=this.childList.length; i<l; i++){
+				res = this.childList[i].visit(fn, true);
+				if( res === false ){
+					break;
+				}
+			}
+		}
+		return res;
+	},
+
+	visitParents: function(fn, includeSelf) {
+		// Visit parent nodes (bottom up)
+		if(includeSelf && fn(this) === false){
+			return false;
+		}
+		var p = this.parent;
+		while( p ) {
+			if(fn(p) === false){
+				return false;
+			}
+			p = p.parent;
+		}
+		return true;
+	},
+
+	remove: function() {
+		// Remove this node
+//		this.tree.logDebug ("%s.remove()", this);
+		if ( this === this.tree.root ){
+			throw "Cannot remove system root";
+		}
+		return this.parent.removeChild(this);
+	},
+
+	removeChild: function(tn) {
+		// Remove tn from list of direct children.
+		var ac = this.childList;
+		if( ac.length == 1 ) {
+			if( tn !== ac[0] ){
+				throw "removeChild: invalid child";
+			}
+			return this.removeChildren();
+		}
+		if( tn === this.tree.activeNode ){
+			tn.deactivate();
+		}
+		if( this.tree.options.persist ) {
+			if( tn.bSelected ){
+				this.tree.persistence.clearSelect(tn.data.key);
+			}
+			if ( tn.bExpanded ){
+				this.tree.persistence.clearExpand(tn.data.key);
+			}
+		}
+		tn.removeChildren(true);
+//		this.div.removeChild(tn.div);
+		this.ul.removeChild(tn.li);
+		for(var i=0, l=ac.length; i<l; i++) {
+			if( ac[i] === tn ) {
+				this.childList.splice(i, 1);
+//				delete tn;  // JSLint complained
+				break;
+			}
+		}
+	},
+
+	removeChildren: function(isRecursiveCall, retainPersistence) {
+		// Remove all child nodes (more efficiently than recursive remove())
+		this.tree.logDebug("%s.removeChildren(%o)", this, isRecursiveCall);
+		var tree = this.tree;
+		var ac = this.childList;
+		if( ac ) {
+			for(var i=0, l=ac.length; i<l; i++) {
+				var tn = ac[i];
+				if ( tn === tree.activeNode && !retainPersistence ){
+					tn.deactivate();
+				}
+				if( this.tree.options.persist && !retainPersistence ) {
+					if( tn.bSelected ){
+						this.tree.persistence.clearSelect(tn.data.key);
+					}
+					if ( tn.bExpanded ){
+						this.tree.persistence.clearExpand(tn.data.key);
+					}
+				}
+				tn.removeChildren(true, retainPersistence);
+				if(this.ul){
+					this.ul.removeChild(tn.li);
+				}
+/*
+				try{
+					this.ul.removeChild(tn.li);
+				}catch(e){
+					this.tree.logDebug("%s.removeChildren: couldnt remove LI", this, e);
+				}
+*/
+//				delete tn;  JSLint complained
+			}
+			// Set to 'null' which is interpreted as 'not yet loaded' for lazy
+			// nodes
+			this.childList = null;
+		}
+		if( ! isRecursiveCall ) {
+//			this._expand(false);
+//			this.isRead = false;
+			this.isLoading = false;
+			this.render();
+		}
+	},
+
+	setTitle: function(title) {
+		this.fromDict({title: title});
+	},
+
+	reload: function(force) {
+		throw "Use reloadChildren() instead";
+	},
+
+	reloadChildren: function(callback) {
+		// Reload lazy content (expansion state is maintained).
+		if( this.parent === null ){
+			throw "Use tree.reload() instead";
+		}else if( ! this.data.isLazy ){
+			throw "node.reloadChildren() requires lazy nodes.";
+		}
+		// appendAjax triggers 'nodeLoaded' event.
+		// We listen to this, if a callback was passed to reloadChildren
+		if(callback){
+			var self = this;
+			var eventType = "nodeLoaded.dynatree." + this.tree.$tree.attr("id")
+				+ "." + this.data.key;
+			this.tree.$tree.bind(eventType, function(e, node, isOk){
+				self.tree.$tree.unbind(eventType);
+				self.tree.logDebug("loaded %o, %o, %o", e, node, isOk);
+				if(node !== self){
+					throw "got invalid load event";
+				}
+				callback.call(self.tree, node, isOk);
+			});
+		}
+		// The expansion state is maintained
+		this.removeChildren();
+		this._loadContent();
+//		if( this.bExpanded ) {
+//			// Remove children first, to prevent effects being applied
+//			this.removeChildren();
+//			// then force re-expand to trigger lazy loading
+////			this.expand(false);
+////			this.expand(true);
+//			this._loadContent();
+//		} else {
+//			this.removeChildren();
+//			this._loadContent();
+//		}
+	},
+
+	/**
+	 * Make sure the node with a given key path is available in the tree.
+	 */
+	_loadKeyPath: function(keyPath, callback) {
+		var tree = this.tree;
+		tree.logDebug("%s._loadKeyPath(%s)", this, keyPath);
+		if(keyPath === ""){
+			throw "Key path must not be empty";
+		}
+		var segList = keyPath.split(tree.options.keyPathSeparator);
+		if(segList[0] === ""){
+			throw "Key path must be relative (don't start with '/')";
+		}
+		var seg = segList.shift();
+
+		for(var i=0, l=this.childList.length; i < l; i++){
+			var child = this.childList[i];
+			if( child.data.key === seg ){
+				if(segList.length === 0) {
+					// Found the end node
+					callback.call(tree, child, "ok");
+
+				}else if(child.data.isLazy && (child.childList === null || child.childList === undefined)){
+					tree.logDebug("%s._loadKeyPath(%s) -> reloading %s...", this, keyPath, child);
+					var self = this;
+					child.reloadChildren(function(node, isOk){
+						// After loading, look for direct child with that key
+						if(isOk){
+							tree.logDebug("%s._loadKeyPath(%s) -> reloaded %s.", node, keyPath, node);
+							callback.call(tree, child, "loaded");
+							node._loadKeyPath(segList.join(tree.options.keyPathSeparator), callback);
+						}else{
+							tree.logWarning("%s._loadKeyPath(%s) -> reloadChildren() failed.", self, keyPath);
+							callback.call(tree, child, "error");
+						}
+					}); // Note: this line gives a JSLint warning (Don't make functions within a loop)
+					// we can ignore it, since it will only be exectuted once, the the loop is ended
+					// See also http://stackoverflow.com/questions/3037598/how-to-get-around-the-jslint-error-dont-make-functions-within-a-loop
+				} else {
+					callback.call(tree, child, "loaded");
+					// Look for direct child with that key
+					child._loadKeyPath(segList.join(tree.options.keyPathSeparator), callback);
+				}
+				return;
+			}
+		}
+		// Could not find key
+		tree.logWarning("Node not found: " + seg);
+		return;
+	},
+
+	resetLazy: function() {
+		// Discard lazy content.
+		if( this.parent === null ){
+			throw "Use tree.reload() instead";
+		}else if( ! this.data.isLazy ){
+			throw "node.resetLazy() requires lazy nodes.";
+		}
+		this.expand(false);
+		this.removeChildren();
+	},
+
+	_addChildNode: function(dtnode, beforeNode) {
+		/**
+		 * Internal function to add one single DynatreeNode as a child.
+		 *
+		 */
+		var tree = this.tree,
+			opts = tree.options,
+			pers = tree.persistence;
+
+//		tree.logDebug("%s._addChildNode(%o)", this, dtnode);
+
+		// --- Update and fix dtnode attributes if necessary
+		dtnode.parent = this;
+//		if( beforeNode && (beforeNode.parent !== this || beforeNode === dtnode ) )
+//			throw "<beforeNode> must be another child of <this>";
+
+		// --- Add dtnode as a child
+		if ( this.childList === null ) {
+			this.childList = [];
+		} else if( ! beforeNode ) {
+			// Fix 'lastsib'
+			if(this.childList.length > 0) {
+				$(this.childList[this.childList.length-1].span).removeClass(opts.classNames.lastsib);
+			}
+		}
+		if( beforeNode ) {
+			var iBefore = $.inArray(beforeNode, this.childList);
+			if( iBefore < 0 ){
+				throw "<beforeNode> must be a child of <this>";
+			}
+			this.childList.splice(iBefore, 0, dtnode);
+		} else {
+			// Append node
+			this.childList.push(dtnode);
+		}
+
+		// --- Handle persistence
+		// Initial status is read from cookies, if persistence is active and
+		// cookies are already present.
+		// Otherwise the status is read from the data attributes and then persisted.
+		var isInitializing = tree.isInitializing();
+		if( opts.persist && pers.cookiesFound && isInitializing ) {
+			// Init status from cookies
+//			tree.logDebug("init from cookie, pa=%o, dk=%o", pers.activeKey, dtnode.data.key);
+			if( pers.activeKey === dtnode.data.key ){
+				tree.activeNode = dtnode;
+			}
+			if( pers.focusedKey === dtnode.data.key ){
+				tree.focusNode = dtnode;
+			}
+			dtnode.bExpanded = ($.inArray(dtnode.data.key, pers.expandedKeyList) >= 0);
+			dtnode.bSelected = ($.inArray(dtnode.data.key, pers.selectedKeyList) >= 0);
+//			tree.logDebug("    key=%o, bSelected=%o", dtnode.data.key, dtnode.bSelected);
+		} else {
+			// Init status from data (Note: we write the cookies after the init phase)
+//			tree.logDebug("init from data");
+			if( dtnode.data.activate ) {
+				tree.activeNode = dtnode;
+				if( opts.persist ){
+					pers.activeKey = dtnode.data.key;
+				}
+			}
+			if( dtnode.data.focus ) {
+				tree.focusNode = dtnode;
+				if( opts.persist ){
+					pers.focusedKey = dtnode.data.key;
+				}
+			}
+			dtnode.bExpanded = ( dtnode.data.expand === true ); // Collapsed by default
+			if( dtnode.bExpanded && opts.persist ){
+				pers.addExpand(dtnode.data.key);
+			}
+			dtnode.bSelected = ( dtnode.data.select === true ); // Deselected by default
+/*
+			Doesn't work, cause pers.selectedKeyList may be null
+			if( dtnode.bSelected && opts.selectMode==1
+				&& pers.selectedKeyList && pers.selectedKeyList.length>0 ) {
+				tree.logWarning("Ignored multi-selection in single-mode for %o", dtnode);
+				dtnode.bSelected = false; // Fixing bad input data (multi selection for mode:1)
+			}
+*/
+			if( dtnode.bSelected && opts.persist ){
+				pers.addSelect(dtnode.data.key);
+			}
+		}
+
+		// Always expand, if it's below minExpandLevel
+//		tree.logDebug ("%s._addChildNode(%o), l=%o", this, dtnode, dtnode.getLevel());
+		if ( opts.minExpandLevel >= dtnode.getLevel() ) {
+//			tree.logDebug ("Force expand for %o", dtnode);
+			this.bExpanded = true;
+		}
+
+		// In multi-hier mode, update the parents selection state
+		// issue #82: only if not initializing, because the children may not exist yet
+//		if( !dtnode.data.isStatusNode && opts.selectMode==3 && !isInitializing )
+//			dtnode._fixSelectionState();
+
+		// In multi-hier mode, update the parents selection state
+		if( dtnode.bSelected && opts.selectMode==3 ) {
+			var p = this;
+			while( p ) {
+				if( !p.hasSubSel ){
+					p._setSubSel(true);
+				}
+				p = p.parent;
+			}
+		}
+		// render this node and the new child
+		if ( tree.bEnableUpdate ){
+			this.render();
+		}
+		return dtnode;
+	},
+
+	addChild: function(obj, beforeNode) {
+		/**
+		 * Add a node object as child.
+		 *
+		 * This should be the only place, where a DynaTreeNode is constructed!
+		 * (Except for the root node creation in the tree constructor)
+		 *
+		 * @param obj A JS object (may be recursive) or an array of those.
+		 * @param {DynaTreeNode} beforeNode (optional) sibling node.
+		 *
+		 * Data format: array of node objects, with optional 'children' attributes.
+		 * [
+		 *	{ title: "t1", isFolder: true, ... }
+		 *	{ title: "t2", isFolder: true, ...,
+		 *		children: [
+		 *			{title: "t2.1", ..},
+		 *			{..}
+		 *			]
+		 *	}
+		 * ]
+		 * A simple object is also accepted instead of an array.
+		 *
+		 */
+//		this.tree.logDebug("%s.addChild(%o, %o)", this, obj, beforeNode);
+		if(typeof(obj) == "string"){
+			throw "Invalid data type for " + obj;
+		}else if( !obj || obj.length === 0 ){ // Passed null or undefined or empty array
+			return;
+		}else if( obj instanceof DynaTreeNode ){
+			return this._addChildNode(obj, beforeNode);
+		}
+
+		if( !obj.length ){ // Passed a single data object
+			obj = [ obj ];
+		}
+		var prevFlag = this.tree.enableUpdate(false);
+
+		var tnFirst = null;
+		for (var i=0, l=obj.length; i<l; i++) {
+			var data = obj[i];
+			var dtnode = this._addChildNode(new DynaTreeNode(this, this.tree, data), beforeNode);
+			if( !tnFirst ){
+				tnFirst = dtnode;
+			}
+			// Add child nodes recursively
+			if( data.children ){
+				dtnode.addChild(data.children, null);
+			}
+		}
+		this.tree.enableUpdate(prevFlag);
+		return tnFirst;
+	},
+
+	append: function(obj) {
+		this.tree.logWarning("node.append() is deprecated (use node.addChild() instead).");
+		return this.addChild(obj, null);
+	},
+
+	appendAjax: function(ajaxOptions) {
+		var self = this;
+		this.removeChildren(false, true);
+		this.setLazyNodeStatus(DTNodeStatus_Loading);
+		// Debug feature: force a delay, to simulate slow loading...
+		if(ajaxOptions.debugLazyDelay){
+			var ms = ajaxOptions.debugLazyDelay;
+			ajaxOptions.debugLazyDelay = 0;
+			this.tree.logInfo("appendAjax: waiting for debugLazyDelay " + ms);
+			setTimeout(function(){self.appendAjax(ajaxOptions);}, ms);
+			return;
+		}
+		// Ajax option inheritance: $.ajaxSetup < $.ui.dynatree.prototype.options.ajaxDefaults < tree.options.ajaxDefaults < ajaxOptions
+		var orgSuccess = ajaxOptions.success;
+		var orgError = ajaxOptions.error;
+		var eventType = "nodeLoaded.dynatree." + this.tree.$tree.attr("id")
+			+ "." + this.data.key;
+		var options = $.extend({}, this.tree.options.ajaxDefaults, ajaxOptions, {
+			success: function(data, textStatus){
+				// <this> is the request options
+//				self.tree.logDebug("appendAjax().success");
+				var prevPhase = self.tree.phase;
+				self.tree.phase = "init";
+				// postProcess is similar to the standard dataFilter hook,
+				// but it is also called for JSONP
+				if( options.postProcess ){
+					data = options.postProcess.call(this, data, this.dataType);
+				}
+				// Process ASPX WebMethod JSON object inside "d" property
+				// http://code.google.com/p/dynatree/issues/detail?id=202
+				else if (data && data.hasOwnProperty("d")) {
+					data = data.d;
+				}
+				if(!$.isArray(data) || data.length !== 0){
+					self.addChild(data, null);
+				}
+				self.tree.phase = "postInit";
+				if( orgSuccess ){
+					orgSuccess.call(options, self, data, textStatus);
+				}
+				self.tree.logDebug("trigger " + eventType);
+				self.tree.$tree.trigger(eventType, [self, true]);
+				self.tree.phase = prevPhase;
+				// This should be the last command, so node.isLoading is true
+				// while the callbacks run
+				self.setLazyNodeStatus(DTNodeStatus_Ok);
+				if($.isArray(data) && data.length === 0){
+					// Set to [] which is interpreted as 'no children' for lazy
+					// nodes
+					self.childList = [];
+					self.render();
+				}
+				},
+			error: function(XMLHttpRequest, textStatus, errorThrown){
+				// <this> is the request options
+				self.tree.logWarning("appendAjax failed:", textStatus, ":\n", XMLHttpRequest, "\n", errorThrown);
+				if( orgError ){
+					orgError.call(options, self, XMLHttpRequest, textStatus, errorThrown);
+				}
+				self.tree.$tree.trigger(eventType, [self, false]);
+				self.setLazyNodeStatus(DTNodeStatus_Error, {info: textStatus, tooltip: ""+errorThrown});
+				}
+		});
+		$.ajax(options);
+	},
+
+	move: function(targetNode, mode) {
+		/**Move this node to targetNode.
+		 *  mode 'child': append this node as last child of targetNode.
+		 *                This is the default. To be compatble with the D'n'd
+		 *                hitMode, we also accept 'over'.
+		 *  mode 'before': add this node as sibling before targetNode.
+		 *  mode 'after': add this node as sibling after targetNode.
+		 */
+		var pos;
+		if(this === targetNode){
+			return;
+		}
+		if( !this.parent  ){
+			throw "Cannot move system root";
+		}
+		if(mode === undefined || mode == "over"){
+			mode = "child";
+		}
+		var prevParent = this.parent;
+		var targetParent = (mode === "child") ? targetNode : targetNode.parent;
+		if( targetParent.isDescendantOf(this) ){
+			throw "Cannot move a node to it's own descendant";
+		}
+		// Unlink this node from current parent
+		if( this.parent.childList.length == 1 ) {
+			this.parent.childList = null;
+			this.parent.bExpanded = false;
+		} else {
+			pos = $.inArray(this, this.parent.childList);
+			if( pos < 0 ){
+				throw "Internal error";
+			}
+			this.parent.childList.splice(pos, 1);
+		}
+		// Remove from source DOM parent
+		this.parent.ul.removeChild(this.li);
+
+		// Insert this node to target parent's child list
+		this.parent = targetParent;
+		if( targetParent.hasChildren() ) {
+			switch(mode) {
+			case "child":
+				// Append to existing target children
+				targetParent.childList.push(this);
+				break;
+			case "before":
+				// Insert this node before target node
+				pos = $.inArray(targetNode, targetParent.childList);
+				if( pos < 0 ){
+					throw "Internal error";
+				}
+				targetParent.childList.splice(pos, 0, this);
+				break;
+			case "after":
+				// Insert this node after target node
+				pos = $.inArray(targetNode, targetParent.childList);
+				if( pos < 0 ){
+					throw "Internal error";
+				}
+				targetParent.childList.splice(pos+1, 0, this);
+				break;
+			default:
+				throw "Invalid mode " + mode;
+			}
+		} else {
+			targetParent.childList = [ this ];
+		}
+		// Parent has no <ul> tag yet:
+		if( !targetParent.ul ) {
+			// This is the parent's first child: create UL tag
+			// (Hidden, because it will be
+			targetParent.ul = document.createElement("ul");
+			targetParent.ul.style.display = "none";
+			targetParent.li.appendChild(targetParent.ul);
+		}
+		// Add to target DOM parent
+		targetParent.ul.appendChild(this.li);
+
+		if( this.tree !== targetNode.tree ) {
+			// Fix node.tree for all source nodes
+			this.visit(function(node){
+				node.tree = targetNode.tree;
+			}, null, true);
+			throw "Not yet implemented.";
+		}
+		// TODO: fix selection state
+		// TODO: fix active state
+		if( !prevParent.isDescendantOf(targetParent)) {
+			prevParent.render();
+		}
+		if( !targetParent.isDescendantOf(prevParent) ) {
+			targetParent.render();
+		}
+//		this.tree.redraw();
+/*
+		var tree = this.tree;
+		var opts = tree.options;
+		var pers = tree.persistence;
+
+
+		// Always expand, if it's below minExpandLevel
+//		tree.logDebug ("%s._addChildNode(%o), l=%o", this, dtnode, dtnode.getLevel());
+		if ( opts.minExpandLevel >= dtnode.getLevel() ) {
+//			tree.logDebug ("Force expand for %o", dtnode);
+			this.bExpanded = true;
+		}
+
+		// In multi-hier mode, update the parents selection state
+		// issue #82: only if not initializing, because the children may not exist yet
+//		if( !dtnode.data.isStatusNode && opts.selectMode==3 && !isInitializing )
+//			dtnode._fixSelectionState();
+
+		// In multi-hier mode, update the parents selection state
+		if( dtnode.bSelected && opts.selectMode==3 ) {
+			var p = this;
+			while( p ) {
+				if( !p.hasSubSel )
+					p._setSubSel(true);
+				p = p.parent;
+			}
+		}
+		// render this node and the new child
+		if ( tree.bEnableUpdate )
+			this.render();
+
+		return dtnode;
+
+*/
+	},
+
+	// --- end of class
+	lastentry: undefined
+};
+
+/*************************************************************************
+ * class DynaTreeStatus
+ */
+
+var DynaTreeStatus = Class.create();
+
+
+DynaTreeStatus._getTreePersistData = function(cookieId, cookieOpts) {
+	// Static member: Return persistence information from cookies
+	var ts = new DynaTreeStatus(cookieId, cookieOpts);
+	ts.read();
+	return ts.toDict();
+};
+// Make available in global scope
+getDynaTreePersistData = DynaTreeStatus._getTreePersistData; // TODO: deprecated
+
+
+DynaTreeStatus.prototype = {
+	// Constructor
+	initialize: function(cookieId, cookieOpts) {
+//		this._log("DynaTreeStatus: initialize");
+		if( cookieId === undefined ){
+			cookieId = $.ui.dynatree.prototype.options.cookieId;
+		}
+		cookieOpts = $.extend({}, $.ui.dynatree.prototype.options.cookie, cookieOpts);
+
+		this.cookieId = cookieId;
+		this.cookieOpts = cookieOpts;
+		this.cookiesFound = undefined;
+		this.activeKey = null;
+		this.focusedKey = null;
+		this.expandedKeyList = null;
+		this.selectedKeyList = null;
+	},
+	// member functions
+	_log: function(msg) {
+		//	this.logDebug("_changeNodeList(%o): nodeList:%o, idx:%o", mode, nodeList, idx);
+		Array.prototype.unshift.apply(arguments, ["debug"]);
+		_log.apply(this, arguments);
+	},
+	read: function() {
+//		this._log("DynaTreeStatus: read");
+		// Read or init cookies.
+		this.cookiesFound = false;
+
+		var cookie = $.cookie(this.cookieId + "-active");
+		this.activeKey = ( cookie === null ) ? "" : cookie;
+		if( cookie !== null ){
+			this.cookiesFound = true;
+		}
+		cookie = $.cookie(this.cookieId + "-focus");
+		this.focusedKey = ( cookie === null ) ? "" : cookie;
+		if( cookie !== null ){
+			this.cookiesFound = true;
+		}
+		cookie = $.cookie(this.cookieId + "-expand");
+		this.expandedKeyList = ( cookie === null ) ? [] : cookie.split(",");
+		if( cookie !== null ){
+			this.cookiesFound = true;
+		}
+		cookie = $.cookie(this.cookieId + "-select");
+		this.selectedKeyList = ( cookie === null ) ? [] : cookie.split(",");
+		if( cookie !== null ){
+			this.cookiesFound = true;
+		}
+	},
+	write: function() {
+//		this._log("DynaTreeStatus: write");
+		$.cookie(this.cookieId + "-active", ( this.activeKey === null ) ? "" : this.activeKey, this.cookieOpts);
+		$.cookie(this.cookieId + "-focus", ( this.focusedKey === null ) ? "" : this.focusedKey, this.cookieOpts);
+		$.cookie(this.cookieId + "-expand", ( this.expandedKeyList === null ) ? "" : this.expandedKeyList.join(","), this.cookieOpts);
+		$.cookie(this.cookieId + "-select", ( this.selectedKeyList === null ) ? "" : this.selectedKeyList.join(","), this.cookieOpts);
+	},
+	addExpand: function(key) {
+//		this._log("addExpand(%o)", key);
+		if( $.inArray(key, this.expandedKeyList) < 0 ) {
+			this.expandedKeyList.push(key);
+			$.cookie(this.cookieId + "-expand", this.expandedKeyList.join(","), this.cookieOpts);
+		}
+	},
+	clearExpand: function(key) {
+//		this._log("clearExpand(%o)", key);
+		var idx = $.inArray(key, this.expandedKeyList);
+		if( idx >= 0 ) {
+			this.expandedKeyList.splice(idx, 1);
+			$.cookie(this.cookieId + "-expand", this.expandedKeyList.join(","), this.cookieOpts);
+		}
+	},
+	addSelect: function(key) {
+//		this._log("addSelect(%o)", key);
+		if( $.inArray(key, this.selectedKeyList) < 0 ) {
+			this.selectedKeyList.push(key);
+			$.cookie(this.cookieId + "-select", this.selectedKeyList.join(","), this.cookieOpts);
+		}
+	},
+	clearSelect: function(key) {
+//		this._log("clearSelect(%o)", key);
+		var idx = $.inArray(key, this.selectedKeyList);
+		if( idx >= 0 ) {
+			this.selectedKeyList.splice(idx, 1);
+			$.cookie(this.cookieId + "-select", this.selectedKeyList.join(","), this.cookieOpts);
+		}
+	},
+	isReloading: function() {
+		return this.cookiesFound === true;
+	},
+	toDict: function() {
+		return {
+			cookiesFound: this.cookiesFound,
+			activeKey: this.activeKey,
+			focusedKey: this.activeKey,
+			expandedKeyList: this.expandedKeyList,
+			selectedKeyList: this.selectedKeyList
+		};
+	},
+	// --- end of class
+	lastentry: undefined
+};
+
+
+/*************************************************************************
+ * class DynaTree
+ */
+
+var DynaTree = Class.create();
+
+// --- Static members ----------------------------------------------------------
+
+DynaTree.version = "$Version: 1.2.0$";
+
+/*
+DynaTree._initTree = function() {
+};
+
+DynaTree._bind = function() {
+};
+*/
+//--- Class members ------------------------------------------------------------
+
+DynaTree.prototype = {
+	// Constructor
+//	initialize: function(divContainer, options) {
+	initialize: function($widget) {
+		// instance members
+		this.phase = "init";
+		this.$widget = $widget;
+		this.options = $widget.options;
+		this.$tree = $widget.element;
+		this.timer = null;
+		// find container element
+		this.divTree = this.$tree.get(0);
+
+//		var parentPos = $(this.divTree).parent().offset();
+//		this.parentTop = parentPos.top;
+//		this.parentLeft = parentPos.left;
+
+		_initDragAndDrop(this);
+	},
+
+	// member functions
+
+	_load: function(callback) {
+		var $widget = this.$widget;
+		var opts = this.options,
+			self = this;
+		this.bEnableUpdate = true;
+		this._nodeCount = 1;
+		this.activeNode = null;
+		this.focusNode = null;
+
+		// Some deprecation warnings to help with migration
+		if( opts.rootVisible !== undefined ){
+			this.logWarning("Option 'rootVisible' is no longer supported.");
+		}
+		if( opts.minExpandLevel < 1 ) {
+			this.logWarning("Option 'minExpandLevel' must be >= 1.");
+			opts.minExpandLevel = 1;
+		}
+//		_log("warn", "jQuery.support.boxModel " + jQuery.support.boxModel);
+
+		// If a 'options.classNames' dictionary was passed, still use defaults
+		// for undefined classes:
+		if( opts.classNames !== $.ui.dynatree.prototype.options.classNames ) {
+			opts.classNames = $.extend({}, $.ui.dynatree.prototype.options.classNames, opts.classNames);
+		}
+		if( opts.ajaxDefaults !== $.ui.dynatree.prototype.options.ajaxDefaults ) {
+			opts.ajaxDefaults = $.extend({}, $.ui.dynatree.prototype.options.ajaxDefaults, opts.ajaxDefaults);
+		}
+		if( opts.dnd !== $.ui.dynatree.prototype.options.dnd ) {
+			opts.dnd = $.extend({}, $.ui.dynatree.prototype.options.dnd, opts.dnd);
+		}
+		// Guess skin path, if not specified
+		if(!opts.imagePath) {
+			$("script").each( function () {
+				var _rexDtLibName = /.*dynatree[^\/]*\.js$/i;
+				if( this.src.search(_rexDtLibName) >= 0 ) {
+					if( this.src.indexOf("/")>=0 ){ // issue #47
+						opts.imagePath = this.src.slice(0, this.src.lastIndexOf("/")) + "/skin/";
+					}else{
+						opts.imagePath = "skin/";
+					}
+					self.logDebug("Guessing imagePath from '%s': '%s'", this.src, opts.imagePath);
+					return false; // first match
+				}
+			});
+		}
+
+		this.persistence = new DynaTreeStatus(opts.cookieId, opts.cookie);
+		if( opts.persist ) {
+			if( !$.cookie ){
+				_log("warn", "Please include jquery.cookie.js to use persistence.");
+			}
+			this.persistence.read();
+		}
+		this.logDebug("DynaTree.persistence: %o", this.persistence.toDict());
+
+		// Cached tag strings
+		this.cache = {
+			tagEmpty: "<span class='" + opts.classNames.empty + "'></span>",
+			tagVline: "<span class='" + opts.classNames.vline + "'></span>",
+			tagExpander: "<span class='" + opts.classNames.expander + "'></span>",
+			tagConnector: "<span class='" + opts.classNames.connector + "'></span>",
+			//tagNodeIcon: "<span class='" + opts.classNames.nodeIcon + "'></span>",
+			tagNodeIcon: "",
+			tagCheckbox: "<span class='" + opts.classNames.checkbox + "'></span>",
+			lastentry: undefined
+		};
+
+		// Clear container, in case it contained some 'waiting' or 'error' text
+		// for clients that don't support JS.
+		// We don't do this however, if we try to load from an embedded UL element.
+		if( opts.children || (opts.initAjax && opts.initAjax.url) || opts.initId ){
+			$(this.divTree).empty();
+		}
+		var $ulInitialize = this.$tree.find(">ul:first").hide();
+
+		// Create the root element
+		this.tnRoot = new DynaTreeNode(null, this, {});
+		this.tnRoot.bExpanded = true;
+		this.tnRoot.render();
+		this.divTree.appendChild(this.tnRoot.ul);
+
+		var root = this.tnRoot;
+		var isReloading = ( opts.persist && this.persistence.isReloading() );
+		var isLazy = false;
+		var prevFlag = this.enableUpdate(false);
+
+		this.logDebug("Dynatree._load(): read tree structure...");
+
+		// Init tree structure
+		if( opts.children ) {
+			// Read structure from node array
+			root.addChild(opts.children);
+
+		} else if( opts.initAjax && opts.initAjax.url ) {
+			// Init tree from AJAX request
+			isLazy = true;
+			root.data.isLazy = true;
+			this._reloadAjax(callback);
+
+		} else if( opts.initId ) {
+			// Init tree from another UL element
+			this._createFromTag(root, $("#"+opts.initId));
+
+		} else {
+			// Init tree from the first UL element inside the container <div>
+//			var $ul = this.$tree.find(">ul:first").hide();
+			this._createFromTag(root, $ulInitialize);
+			$ulInitialize.remove();
+		}
+
+		this._checkConsistency();
+		// Fix part-sel flags
+		if(!isLazy && opts.selectMode == 3){
+			root._updatePartSelectionState();
+		}
+		// Render html markup
+		this.logDebug("Dynatree._load(): render nodes...");
+		this.enableUpdate(prevFlag);
+
+		// bind event handlers
+		this.logDebug("Dynatree._load(): bind events...");
+		this.$widget.bind();
+
+		// --- Post-load processing
+		this.logDebug("Dynatree._load(): postInit...");
+		this.phase = "postInit";
+
+		// In persist mode, make sure that cookies are written, even if they are empty
+		if( opts.persist ) {
+			this.persistence.write();
+		}
+		// Set focus, if possible (this will also fire an event and write a cookie)
+		if( this.focusNode && this.focusNode.isVisible() ) {
+			this.logDebug("Focus on init: %o", this.focusNode);
+			this.focusNode.focus();
+		}
+		if( !isLazy ) {
+			if( opts.onPostInit ) {
+				opts.onPostInit.call(this, isReloading, false);
+			}
+			if( callback ){
+				callback.call(this, "ok");
+			}
+		}
+		this.phase = "idle";
+	},
+
+	_reloadAjax: function(callback) {
+		// Reload
+		var opts = this.options;
+		if( ! opts.initAjax || ! opts.initAjax.url ){
+			throw "tree.reload() requires 'initAjax' mode.";
+		}
+		var pers = this.persistence;
+		var ajaxOpts = $.extend({}, opts.initAjax);
+		// Append cookie info to the request
+//		this.logDebug("reloadAjax: key=%o, an.key:%o", pers.activeKey, this.activeNode?this.activeNode.data.key:"?");
+		if( ajaxOpts.addActiveKey ){
+			ajaxOpts.data.activeKey = pers.activeKey;
+		}
+		if( ajaxOpts.addFocusedKey ){
+			ajaxOpts.data.focusedKey = pers.focusedKey;
+		}
+		if( ajaxOpts.addExpandedKeyList ){
+			ajaxOpts.data.expandedKeyList = pers.expandedKeyList.join(",");
+		}
+		if( ajaxOpts.addSelectedKeyList ){
+			ajaxOpts.data.selectedKeyList = pers.selectedKeyList.join(",");
+		}
+		// Set up onPostInit callback to be called when Ajax returns
+		if( ajaxOpts.success ){
+			this.logWarning("initAjax: success callback is ignored; use onPostInit instead.");
+		}
+		if( ajaxOpts.error ){
+			this.logWarning("initAjax: error callback is ignored; use onPostInit instead.");
+		}
+		var isReloading = pers.isReloading();
+		ajaxOpts.success = function(dtnode, data, textStatus) {
+			if(opts.selectMode == 3){
+				dtnode.tree.tnRoot._updatePartSelectionState();
+			}
+			if(opts.onPostInit){
+				opts.onPostInit.call(dtnode.tree, isReloading, false);
+			}
+			if(callback){
+				callback.call(dtnode.tree, "ok");
+			}
+		};
+		ajaxOpts.error = function(dtnode, XMLHttpRequest, textStatus, errorThrown) {
+			if(opts.onPostInit){
+				opts.onPostInit.call(dtnode.tree, isReloading, true, XMLHttpRequest, textStatus, errorThrown);
+			}
+			if(callback){
+				callback.call(dtnode.tree, "error", XMLHttpRequest, textStatus, errorThrown);
+			}
+		};
+//		}
+		this.logDebug("Dynatree._init(): send Ajax request...");
+		this.tnRoot.appendAjax(ajaxOpts);
+	},
+
+	toString: function() {
+//		return "DynaTree '" + this.options.title + "'";
+		return "Dynatree '" + this.$tree.attr("id") + "'";
+	},
+
+	toDict: function() {
+		return this.tnRoot.toDict(true);
+	},
+
+	serializeArray: function(stopOnParents) {
+		// Return a JavaScript array of objects, ready to be encoded as a JSON
+		// string for selected nodes
+		var nodeList = this.getSelectedNodes(stopOnParents),
+			name = this.$tree.attr("name") || this.$tree.attr("id"),
+			arr = [];
+		for(var i=0, l=nodeList.length; i<l; i++){
+			arr.push({name: name, value: nodeList[i].data.key});
+		}
+		return arr;
+	},
+
+	getPersistData: function() {
+		return this.persistence.toDict();
+	},
+
+	logDebug: function(msg) {
+		if( this.options.debugLevel >= 2 ) {
+			Array.prototype.unshift.apply(arguments, ["debug"]);
+			_log.apply(this, arguments);
+		}
+	},
+
+	logInfo: function(msg) {
+		if( this.options.debugLevel >= 1 ) {
+			Array.prototype.unshift.apply(arguments, ["info"]);
+			_log.apply(this, arguments);
+		}
+	},
+
+	logWarning: function(msg) {
+		Array.prototype.unshift.apply(arguments, ["warn"]);
+		_log.apply(this, arguments);
+	},
+
+	isInitializing: function() {
+		return ( this.phase=="init" || this.phase=="postInit" );
+	},
+	isReloading: function() {
+		return ( this.phase=="init" || this.phase=="postInit" ) && this.options.persist && this.persistence.cookiesFound;
+	},
+	isUserEvent: function() {
+		return ( this.phase=="userEvent" );
+	},
+
+	redraw: function() {
+//		this.logDebug("dynatree.redraw()...");
+		this.tnRoot.render(false, false);
+//		this.logDebug("dynatree.redraw() done.");
+	},
+	renderInvisibleNodes: function() {
+		this.tnRoot.render(false, true);
+	},
+	reload: function(callback) {
+		this._load(callback);
+	},
+
+	getRoot: function() {
+		return this.tnRoot;
+	},
+
+	enable: function() {
+		this.$widget.enable();
+	},
+
+	disable: function() {
+		this.$widget.disable();
+	},
+
+	getNodeByKey: function(key) {
+		// Search the DOM by element ID (assuming this is faster than traversing all nodes).
+		// $("#...") has problems, if the key contains '.', so we use getElementById()
+		var el = document.getElementById(this.options.idPrefix + key);
+		if( el ){
+			return el.dtnode ? el.dtnode : null;
+		}
+		// Not found in the DOM, but still may be in an unrendered part of tree
+		var match = null;
+		this.visit(function(node){
+			if(node.data.key == key) {
+				match = node;
+				return false;
+			}
+		}, true);
+		return match;
+	},
+
+	getActiveNode: function() {
+		return this.activeNode;
+	},
+
+	reactivate: function(setFocus) {
+		// Re-fire onQueryActivate and onActivate events.
+		var node = this.activeNode;
+//		this.logDebug("reactivate %o", node);
+		if( node ) {
+			this.activeNode = null; // Force re-activating
+			node.activate();
+			if( setFocus ){
+				node.focus();
+			}
+		}
+	},
+
+	getSelectedNodes: function(stopOnParents) {
+		var nodeList = [];
+		this.tnRoot.visit(function(node){
+			if( node.bSelected ) {
+				nodeList.push(node);
+				if( stopOnParents === true ){
+					return "skip"; // stop processing this branch
+				}
+			}
+		});
+		return nodeList;
+	},
+
+	activateKey: function(key) {
+		var dtnode = (key === null) ? null : this.getNodeByKey(key);
+		if( !dtnode ) {
+			if( this.activeNode ){
+				this.activeNode.deactivate();
+			}
+			this.activeNode = null;
+			return null;
+		}
+		dtnode.focus();
+		dtnode.activate();
+		return dtnode;
+	},
+
+	loadKeyPath: function(keyPath, callback) {
+		var segList = keyPath.split(this.options.keyPathSeparator);
+		// Remove leading '/'
+		if(segList[0] === ""){
+			segList.shift();
+		}
+		// Remove leading system root key
+		if(segList[0] == this.tnRoot.data.key){
+			this.logDebug("Removed leading root key.");
+			segList.shift();
+		}
+		keyPath = segList.join(this.options.keyPathSeparator);
+		return this.tnRoot._loadKeyPath(keyPath, callback);
+	},
+
+	selectKey: function(key, select) {
+		var dtnode = this.getNodeByKey(key);
+		if( !dtnode ){
+			return null;
+		}
+		dtnode.select(select);
+		return dtnode;
+	},
+
+	enableUpdate: function(bEnable) {
+		if ( this.bEnableUpdate==bEnable ){
+			return bEnable;
+		}
+		this.bEnableUpdate = bEnable;
+		if ( bEnable ){
+			this.redraw();
+		}
+		return !bEnable; // return previous value
+	},
+
+	count: function() {
+		return this.tnRoot.countChildren();
+	},
+
+	visit: function(fn, includeRoot) {
+		return this.tnRoot.visit(fn, includeRoot);
+	},
+
+	_createFromTag: function(parentTreeNode, $ulParent) {
+		// Convert a <UL>...</UL> list into children of the parent tree node.
+		var self = this;
+/*
+TODO: better?
+		this.$lis = $("li:has(a[href])", this.element);
+		this.$tabs = this.$lis.map(function() { return $("a", this)[0]; });
+ */
+		$ulParent.find(">li").each(function() {
+			var $li = $(this),
+				$liSpan = $li.find(">span:first"),
+				$liA = $li.find(">a:first"),
+				title,
+				href = null,
+				target = null,
+				tooltip;
+			if( $liSpan.length ) {
+				// If a <li><span> tag is specified, use it literally.
+				title = $liSpan.html();
+			} else if( $liA.length ) {
+				title = $liA.html();
+				href = $liA.attr("href");
+				target = $liA.attr("target");
+				tooltip = $liA.attr("title");
+			} else {
+				// If only a <li> tag is specified, use the trimmed string up to
+				// the next child <ul> tag.
+				title = $li.html();
+				var iPos = title.search(/<ul/i);
+				if( iPos >= 0 ){
+					title = $.trim(title.substring(0, iPos));
+				}else{
+					title = $.trim(title);
+				}
+//				self.logDebug("%o", title);
+			}
+			// Parse node options from ID, title and class attributes
+			var data = {
+				title: title,
+				tooltip: tooltip,
+				isFolder: $li.hasClass("folder"),
+				isLazy: $li.hasClass("lazy"),
+				expand: $li.hasClass("expanded"),
+				select: $li.hasClass("selected"),
+				activate: $li.hasClass("active"),
+				focus: $li.hasClass("focused"),
+				noLink: $li.hasClass("noLink")
+			};
+			if( href ){
+				data.href = href;
+				data.target = target;
+			}
+			if( $li.attr("title") ){
+				data.tooltip = $li.attr("title"); // overrides <a title='...'>
+			}
+			if( $li.attr("id") ){
+				data.key = $li.attr("id");
+			}
+			// If a data attribute is present, evaluate as a JavaScript object
+			if( $li.attr("data") ) {
+				var dataAttr = $.trim($li.attr("data"));
+				if( dataAttr ) {
+					if( dataAttr.charAt(0) != "{" ){
+						dataAttr = "{" + dataAttr + "}";
+					}
+					try {
+						$.extend(data, eval("(" + dataAttr + ")"));
+					} catch(e) {
+						throw ("Error parsing node data: " + e + "\ndata:\n'" + dataAttr + "'");
+					}
+				}
+			}
+			var childNode = parentTreeNode.addChild(data);
+			// Recursive reading of child nodes, if LI tag contains an UL tag
+			var $ul = $li.find(">ul:first");
+			if( $ul.length ) {
+				self._createFromTag(childNode, $ul); // must use 'self', because 'this' is the each() context
+			}
+		});
+	},
+
+	_checkConsistency: function() {
+//		this.logDebug("tree._checkConsistency() NOT IMPLEMENTED - %o", this);
+	},
+
+	_setDndStatus: function(sourceNode, targetNode, helper, hitMode, accept) {
+		// hitMode: 'after', 'before', 'over', 'out', 'start', 'stop'
+		var $source = sourceNode ? $(sourceNode.span) : null,
+			$target = $(targetNode.span);
+		if( !this.$dndMarker ) {
+			this.$dndMarker = $("<div id='dt-drop-marker'></div>")
+				.hide()
+				.prependTo($(this.divTree).parent());
+//				.prependTo("body");
+//			logMsg("Creating marker: %o", this.$dndMarker);
+		}
+/*
+		if(hitMode === "start"){
+		}
+		if(hitMode === "stop"){
+//			sourceNode.removeClass("dt-drop-target");
+		}
+*/
+//		this.$dndMarker.attr("class", hitMode);
+		if(hitMode === "after" || hitMode === "before" || hitMode === "over"){
+//			$source && $source.addClass("dt-drag-source");
+			var pos = $target.offset();
+			switch(hitMode){
+			case "before":
+				this.$dndMarker.removeClass("dt-drop-after dt-drop-over");
+				this.$dndMarker.addClass("dt-drop-before");
+				pos.top -= 8;
+				break;
+			case "after":
+				this.$dndMarker.removeClass("dt-drop-before dt-drop-over");
+				this.$dndMarker.addClass("dt-drop-after");
+				pos.top += 8;
+				break;
+			default:
+				this.$dndMarker.removeClass("dt-drop-after dt-drop-before");
+				this.$dndMarker.addClass("dt-drop-over");
+				$target.addClass("dt-drop-target");
+				pos.left += 8;
+			}
+//			logMsg("Creating marker: %o", this.$dndMarker);
+//			logMsg("    $target.offset=%o", $target);
+//			logMsg("    pos/$target.offset=%o", pos);
+//			logMsg("    $target.position=%o", $target.position());
+//			logMsg("    $target.offsetParent=%o, ot:%o", $target.offsetParent(), $target.offsetParent().offset());
+//			logMsg("    $(this.divTree).offset=%o", $(this.divTree).offset());
+//			logMsg("    $(this.divTree).parent=%o", $(this.divTree).parent());
+
+			this.$dndMarker.offset({left: pos.left, top: pos.top})
+				.css({
+					"z-index": 1000
+				})
+				.show();
+//			helper.addClass("dt-drop-hover");
+		} else {
+//			$source && $source.removeClass("dt-drag-source");
+			$target.removeClass("dt-drop-target");
+			this.$dndMarker.hide();
+//			helper.removeClass("dt-drop-hover");
+		}
+		if(hitMode === "after"){
+			$target.addClass("dt-drop-after");
+		} else {
+			$target.removeClass("dt-drop-after");
+		}
+		if(hitMode === "before"){
+			$target.addClass("dt-drop-before");
+		} else {
+			$target.removeClass("dt-drop-before");
+		}
+		if(accept === true){
+			if($source){
+				$source.addClass("dt-drop-accept");
+			}
+			$target.addClass("dt-drop-accept");
+			helper.addClass("dt-drop-accept");
+		}else{
+			if($source){
+				$source.removeClass("dt-drop-accept");
+			}
+			$target.removeClass("dt-drop-accept");
+			helper.removeClass("dt-drop-accept");
+		}
+		if(accept === false){
+			if($source){
+				$source.addClass("dt-drop-reject");
+			}
+			$target.addClass("dt-drop-reject");
+			helper.addClass("dt-drop-reject");
+		}else{
+			if($source){
+				$source.removeClass("dt-drop-reject");
+			}
+			$target.removeClass("dt-drop-reject");
+			helper.removeClass("dt-drop-reject");
+		}
+	},
+
+	_onDragEvent: function(eventName, node, otherNode, event, ui, draggable) {
+		/**
+		 * Handles drag'n'drop functionality.
+		 *
+		 * A standard jQuery drag-and-drop process may generate these calls:
+		 *
+		 * draggable helper():
+		 *     _onDragEvent("helper", sourceNode, null, event, null, null);
+		 * start:
+		 *     _onDragEvent("start", sourceNode, null, event, ui, draggable);
+		 * drag:
+		 *     _onDragEvent("leave", prevTargetNode, sourceNode, event, ui, draggable);
+		 *     _onDragEvent("over", targetNode, sourceNode, event, ui, draggable);
+		 *     _onDragEvent("enter", targetNode, sourceNode, event, ui, draggable);
+		 * stop:
+		 *     _onDragEvent("drop", targetNode, sourceNode, event, ui, draggable);
+		 *     _onDragEvent("leave", targetNode, sourceNode, event, ui, draggable);
+		 *     _onDragEvent("stop", sourceNode, null, event, ui, draggable);
+		 */
+//		if(eventName !== "over"){
+//			this.logDebug("tree._onDragEvent(%s, %o, %o) - %o", eventName, node, otherNode, this);
+//		}
+		var opts = this.options;
+		var dnd = this.options.dnd;
+		var res = null;
+		var nodeTag = $(node.span);
+		var hitMode;
+
+		switch (eventName) {
+		case "helper":
+			// Only event and node argument is available
+			var helper = $("<div class='dt-drag-helper'><span class='dt-drag-helper-img' /></div>")
+				.append($(event.target).closest('a').clone());
+			// Attach node reference to helper object
+			helper.data("dtSourceNode", node);
+//			this.logDebug("helper.sourceNode=%o", helper.data("dtSourceNode"));
+			res = helper;
+			break;
+		case "start":
+			if(node.isStatusNode()) {
+				res = false;
+			} else if(dnd.onDragStart) {
+				res = dnd.onDragStart(node);
+			}
+			if(res === false) {
+				this.logDebug("tree.onDragStart() cancelled");
+				//draggable._clear();
+				// NOTE: the return value seems to be ignored (drag is not canceled, when false is returned)
+				ui.helper.trigger("mouseup");
+				ui.helper.hide();
+			} else {
+				nodeTag.addClass("dt-drag-source");
+			}
+			break;
+		case "enter":
+			res = dnd.onDragEnter ? dnd.onDragEnter(node, otherNode) : null;
+			res = {
+				over: (res !== false) && ((res === true) || (res === "over") || $.inArray("over", res) >= 0),
+				before: (res !== false) && ((res === true) || (res === "before") || $.inArray("before", res) >= 0),
+				after: (res !== false) && ((res === true) || (res === "after") || $.inArray("after", res) >= 0)
+			};
+			ui.helper.data("enterResponse", res);
+//			this.logDebug("helper.enterResponse: %o", res);
+			break;
+		case "over":
+			var enterResponse = ui.helper.data("enterResponse");
+			hitMode = null;
+			if(enterResponse === false){
+				// Don't call onDragOver if onEnter returned false.
+				break;
+			} else if(typeof enterResponse === "string") {
+				// Use hitMode from onEnter if provided.
+				hitMode = enterResponse;
+			} else {
+				// Calculate hitMode from relative cursor position.
+				var nodeOfs = nodeTag.offset();
+//				var relPos = { x: event.clientX - nodeOfs.left,
+//							y: event.clientY - nodeOfs.top };
+//				nodeOfs.top += this.parentTop;
+//				nodeOfs.left += this.parentLeft;
+				var relPos = { x: event.pageX - nodeOfs.left,
+							   y: event.pageY - nodeOfs.top };
+				var relPos2 = { x: relPos.x / nodeTag.width(),
+								y: relPos.y / nodeTag.height() };
+//				this.logDebug("event.page: %s/%s", event.pageX, event.pageY);
+//				this.logDebug("event.client: %s/%s", event.clientX, event.clientY);
+//				this.logDebug("nodeOfs: %s/%s", nodeOfs.left, nodeOfs.top);
+////				this.logDebug("parent: %s/%s", this.parentLeft, this.parentTop);
+//				this.logDebug("relPos: %s/%s", relPos.x, relPos.y);
+//				this.logDebug("relPos2: %s/%s", relPos2.x, relPos2.y);
+				if( enterResponse.after && relPos2.y > 0.75 ){
+					hitMode = "after";
+				} else if(!enterResponse.over && enterResponse.after && relPos2.y > 0.5 ){
+					hitMode = "after";
+				} else if(enterResponse.before && relPos2.y <= 0.25) {
+					hitMode = "before";
+				} else if(!enterResponse.over && enterResponse.before && relPos2.y <= 0.5) {
+					hitMode = "before";
+				} else if(enterResponse.over) {
+					hitMode = "over";
+				}
+				// Prevent no-ops like 'before source node'
+				// TODO: these are no-ops when moving nodes, but not in copy mode
+				if( dnd.preventVoidMoves ){
+					if(node === otherNode){
+//						this.logDebug("    drop over source node prevented");
+						hitMode = null;
+					}else if(hitMode === "before" && otherNode && node === otherNode.getNextSibling()){
+//						this.logDebug("    drop after source node prevented");
+						hitMode = null;
+					}else if(hitMode === "after" && otherNode && node === otherNode.getPrevSibling()){
+//						this.logDebug("    drop before source node prevented");
+						hitMode = null;
+					}else if(hitMode === "over" && otherNode
+							&& otherNode.parent === node && otherNode.isLastSibling() ){
+//						this.logDebug("    drop last child over own parent prevented");
+						hitMode = null;
+					}
+				}
+//				this.logDebug("hitMode: %s - %s - %s", hitMode, (node.parent === otherNode), node.isLastSibling());
+				ui.helper.data("hitMode", hitMode);
+			}
+			// Auto-expand node (only when 'over' the node, not 'before', or 'after')
+			if(hitMode === "over"
+				&& dnd.autoExpandMS && node.hasChildren() !== false && !node.bExpanded) {
+				node.scheduleAction("expand", dnd.autoExpandMS);
+			}
+			if(hitMode && dnd.onDragOver){
+				res = dnd.onDragOver(node, otherNode, hitMode);
+			}
+			this._setDndStatus(otherNode, node, ui.helper, hitMode, res!==false);
+			break;
+		case "drop":
+			hitMode = ui.helper.data("hitMode");
+			if(hitMode && dnd.onDrop){
+				dnd.onDrop(node, otherNode, hitMode, ui, draggable);
+			}
+			break;
+		case "leave":
+			// Cancel pending expand request
+			node.scheduleAction("cancel");
+			ui.helper.data("enterResponse", null);
+			ui.helper.data("hitMode", null);
+			this._setDndStatus(otherNode, node, ui.helper, "out", undefined);
+			if(dnd.onDragLeave){
+				dnd.onDragLeave(node, otherNode);
+			}
+			break;
+		case "stop":
+			nodeTag.removeClass("dt-drag-source");
+			if(dnd.onDragStop){
+				dnd.onDragStop(node);
+			}
+			break;
+		default:
+			throw "Unsupported drag event: " + eventName;
+		}
+		return res;
+	},
+
+	cancelDrag: function() {
+		 var dd = $.ui.ddmanager.current;
+		 if(dd){
+			 dd.cancel();
+		 }
+	},
+
+	// --- end of class
+	lastentry: undefined
+};
+
+/*************************************************************************
+ * Widget $(..).dynatree
+ */
+
+$.widget("ui.dynatree", {
+/*
+	init: function() {
+		// ui.core 1.6 renamed init() to _init(): this stub assures backward compatibility
+		_log("warn", "ui.dynatree.init() was called; you should upgrade to jquery.ui.core.js v1.8 or higher.");
+		return this._init();
+	},
+ */
+	_init: function() {
+		if( parseFloat($.ui.version) < 1.8 ) {
+			// jquery.ui.core 1.8 renamed _init() to _create(): this stub assures backward compatibility
+			if(this.options.debugLevel >= 0){
+				_log("warn", "ui.dynatree._init() was called; you should upgrade to jquery.ui.core.js v1.8 or higher.");
+			}
+			return this._create();
+		}
+		// jquery.ui.core 1.8 still uses _init() to perform "default functionality"
+		if(this.options.debugLevel >= 2){
+			_log("debug", "ui.dynatree._init() was called; no current default functionality.");
+		}
+	},
+
+	_create: function() {
+		var opts = this.options;
+		if(opts.debugLevel >= 1){
+			//logMsg("Dynatree._create(): version='%s', debugLevel=%o.", $.ui.dynatree.version, this.options.debugLevel);
+		}
+		// The widget framework supplies this.element and this.options.
+		this.options.event += ".dynatree"; // namespace event
+
+		var divTree = this.element.get(0);
+/*		// Clear container, in case it contained some 'waiting' or 'error' text
+		// for clients that don't support JS
+		if( opts.children || (opts.initAjax && opts.initAjax.url) || opts.initId )
+			$(divTree).empty();
+*/
+		// Create the DynaTree object
+		this.tree = new DynaTree(this);
+		this.tree._load();
+		this.tree.logDebug("Dynatree._init(): done.");
+	},
+
+	bind: function() {
+		// Prevent duplicate binding
+		this.unbind();
+
+		var eventNames = "click.dynatree dblclick.dynatree";
+		if( this.options.keyboard ){
+			// Note: leading ' '!
+			eventNames += " keypress.dynatree keydown.dynatree";
+		}
+		this.element.bind(eventNames, function(event){
+			var dtnode = getDtNodeFromElement(event.target);
+			if( !dtnode ){
+				return true;  // Allow bubbling of other events
+			}
+			var tree = dtnode.tree;
+			var o = tree.options;
+			tree.logDebug("event(%s): dtnode: %s", event.type, dtnode);
+			var prevPhase = tree.phase;
+			tree.phase = "userEvent";
+			try {
+				switch(event.type) {
+				case "click":
+					return ( o.onClick && o.onClick.call(tree, dtnode, event)===false ) ? false : dtnode._onClick(event);
+				case "dblclick":
+					return ( o.onDblClick && o.onDblClick.call(tree, dtnode, event)===false ) ? false : dtnode._onDblClick(event);
+				case "keydown":
+					return ( o.onKeydown && o.onKeydown.call(tree, dtnode, event)===false ) ? false : dtnode._onKeydown(event);
+				case "keypress":
+					return ( o.onKeypress && o.onKeypress.call(tree, dtnode, event)===false ) ? false : dtnode._onKeypress(event);
+				}
+			} catch(e) {
+				var _ = null; // issue 117
+				tree.logWarning("bind(%o): dtnode: %o, error: %o", event, dtnode, e);
+			} finally {
+				tree.phase = prevPhase;
+			}
+		});
+
+		// focus/blur don't bubble, i.e. are not delegated to parent <div> tags,
+		// so we use the addEventListener capturing phase.
+		// See http://www.howtocreate.co.uk/tutorials/javascript/domevents
+		function __focusHandler(event) {
+			// Handles blur and focus.
+			// Fix event for IE:
+			// doesn't pass JSLint:
+//			event = arguments[0] = $.event.fix( event || window.event );
+			// what jQuery does:
+//			var args = jQuery.makeArray( arguments );
+//			event = args[0] = jQuery.event.fix( event || window.event );
+			event = $.event.fix( event || window.event );
+			var dtnode = getDtNodeFromElement(event.target);
+			return dtnode ? dtnode._onFocus(event) : false;
+		}
+		var div = this.tree.divTree;
+		if( div.addEventListener ) {
+			div.addEventListener("focus", __focusHandler, true);
+			div.addEventListener("blur", __focusHandler, true);
+		} else {
+			div.onfocusin = div.onfocusout = __focusHandler;
+		}
+		// EVENTS
+		// disable click if event is configured to something else
+//		if (!(/^click/).test(o.event))
+//			this.$tabs.bind("click.tabs", function() { return false; });
+
+	},
+
+	unbind: function() {
+		this.element.unbind(".dynatree");
+	},
+
+/* TODO: we could handle option changes during runtime here (maybe to re-render, ...)
+	setData: function(key, value) {
+		this.tree.logDebug("dynatree.setData('" + key + "', '" + value + "')");
+	},
+*/
+	enable: function() {
+		this.bind();
+		// Call default disable(): remove -disabled from css:
+		$.Widget.prototype.enable.apply(this, arguments);
+	},
+
+	disable: function() {
+		this.unbind();
+		// Call default disable(): add -disabled to css:
+		$.Widget.prototype.disable.apply(this, arguments);
+	},
+
+	// --- getter methods (i.e. NOT returning a reference to $)
+	getTree: function() {
+		return this.tree;
+	},
+
+	getRoot: function() {
+		return this.tree.getRoot();
+	},
+
+	getActiveNode: function() {
+		return this.tree.getActiveNode();
+	},
+
+	getSelectedNodes: function() {
+		return this.tree.getSelectedNodes();
+	},
+
+	// ------------------------------------------------------------------------
+	lastentry: undefined
+});
+
+
+// The following methods return a value (thus breaking the jQuery call chain):
+if( parseFloat($.ui.version) < 1.8 ) {
+	$.ui.dynatree.getter = "getTree getRoot getActiveNode getSelectedNodes";
+}
+
+/*******************************************************************************
+ * Tools in ui.dynatree namespace
+ */
+$.ui.dynatree.version = "$Version: 1.2.0$";
+
+/**
+ * Return a DynaTreeNode object for a given DOM element
+ */
+$.ui.dynatree.getNode = function(el) {
+	if(el instanceof DynaTreeNode){
+		return el; // el already was a DynaTreeNode
+	}
+	// TODO: for some reason $el.parents("[dtnode]") does not work (jQuery 1.6.1)
+	// maybe, because dtnode is a property, not an attribute
+	var $el = el.selector === undefined ? $(el) : el,
+//		parent = $el.closest("[dtnode]"),
+		parent = $el.parents("[dtnode]").first(),
+		node;
+	if(typeof parent.prop == "function"){
+		node = parent.prop("dtnode");
+	}else{ // pre jQuery 1.6
+		node = parent.attr("dtnode");
+	}
+	return node;
+}
+
+/**Return persistence information from cookies.*/
+$.ui.dynatree.getPersistData = DynaTreeStatus._getTreePersistData;
+
+/*******************************************************************************
+ * Plugin default options:
+ */
+$.ui.dynatree.prototype.options = {
+	title: "Dynatree", // Tree's name (only used for debug outpu)
+	minExpandLevel: 1, // 1: root node is not collapsible
+	imagePath: null, // Path to a folder containing icons. Defaults to 'skin/' subdirectory.
+	children: null, // Init tree structure from this object array.
+	initId: null, // Init tree structure from a <ul> element with this ID.
+	initAjax: null, // Ajax options used to initialize the tree strucuture.
+	autoFocus: true, // Set focus to first child, when expanding or lazy-loading.
+	keyboard: true, // Support keyboard navigation.
+	persist: false, // Persist expand-status to a cookie
+	autoCollapse: false, // Automatically collapse all siblings, when a node is expanded.
+	clickFolderMode: 3, // 1:activate, 2:expand, 3:activate and expand
+	activeVisible: true, // Make sure, active nodes are visible (expanded).
+	checkbox: false, // Show checkboxes.
+	selectMode: 2, // 1:single, 2:multi, 3:multi-hier
+	fx: null, // Animations, e.g. null or { height: "toggle", duration: 200 }
+	noLink: false, // Use <span> instead of <a> tags for all nodes
+	// Low level event handlers: onEvent(dtnode, event): return false, to stop default processing
+	onClick: null, // null: generate focus, expand, activate, select events.
+	onDblClick: null, // (No default actions.)
+	onKeydown: null, // null: generate keyboard navigation (focus, expand, activate).
+	onKeypress: null, // (No default actions.)
+	onFocus: null, // null: set focus to node.
+	onBlur: null, // null: remove focus from node.
+
+	// Pre-event handlers onQueryEvent(flag, dtnode): return false, to stop processing
+	onQueryActivate: null, // Callback(flag, dtnode) before a node is (de)activated.
+	onQuerySelect: null, // Callback(flag, dtnode) before a node is (de)selected.
+	onQueryExpand: null, // Callback(flag, dtnode) before a node is expanded/collpsed.
+
+	// High level event handlers
+	onPostInit: null, // Callback(isReloading, isError) when tree was (re)loaded.
+	onActivate: null, // Callback(dtnode) when a node is activated.
+	onDeactivate: null, // Callback(dtnode) when a node is deactivated.
+	onSelect: null, // Callback(flag, dtnode) when a node is (de)selected.
+	onExpand: null, // Callback(flag, dtnode) when a node is expanded/collapsed.
+	onLazyRead: null, // Callback(dtnode) when a lazy node is expanded for the first time.
+	onCustomRender: null, // Callback(dtnode) before a node is rendered. Return a HTML string to override.
+//    onCustomRender:function(node) {
+ //       return "<a href='" + node.data.href + "' id='" + node.data.key + "' class='dt-title'>" + node.data.title + "</a>"
+  //  },
+    //onCreate: function(node, nodeSpan) {
+    //node.expand(true);
+//},
+	onCreate: null, // Callback(dtnode, nodeSpan) after a node was rendered for the first time.
+	//onRender: null, // Callback(dtnode, nodeSpan) after a node was rendered.
+
+	onRender: null,
+
+	// Drag'n'drop support
+	dnd: {
+		// Make tree nodes draggable:
+		onDragStart: null, // Callback(sourceNode), return true, to enable dnd
+		onDragStop: null, // Callback(sourceNode)
+//		helper: null,
+		// Make tree nodes accept draggables
+		autoExpandMS: 1000, // Expand nodes after n milliseconds of hovering.
+		preventVoidMoves: true, // Prevent dropping nodes 'before self', etc.
+		onDragEnter: null, // Callback(targetNode, sourceNode)
+		onDragOver: null, // Callback(targetNode, sourceNode, hitMode)
+		onDrop: null, // Callback(targetNode, sourceNode, hitMode)
+		onDragLeave: null // Callback(targetNode, sourceNode)
+	},
+	ajaxDefaults: { // Used by initAjax option
+		cache: false, // false: Append random '_' argument to the request url to prevent caching.
+		dataType: "json" // Expect json format and pass json object to callbacks.
+	},
+	strings: {
+		loading: "Loading&#8230;",
+		loadError: "Load error!"
+	},
+	generateIds: true, // Generate id attributes like <span id='dt-id-KEY'>
+	idPrefix: "", // Used to generate node id's like <span id="dt-id-<key>">.
+	keyPathSeparator: "/", // Used by node.getKeyPath() and tree.loadKeyPath().
+//    cookieId: "dt-cookie", // Choose a more unique name, to allow multiple trees.
+	cookieId: "dynatree", // Choose a more unique name, to allow multiple trees.
+	cookie: {
+		expires: null //7, // Days or Date; null: session cookie
+//		path: "/", // Defaults to current page
+//		domain: "jquery.com",
+//		secure: true
+	},
+	// Class names used, when rendering the HTML markup.
+	// Note: if only single entries are passed for options.classNames, all other
+	// values are still set to default.
+	classNames: {
+		container: "dt-container",
+		node: "dt-node",
+		folder: "dt-folder",
+//		document: "dt-document",
+
+		empty: "dt-empty",
+		vline: "dt-vline",
+		expander: "dt-expander",
+//		connector: "dt-connector",
+		connector: "dt-icon",
+		checkbox: "dt-checkbox",
+		nodeIcon: false,
+		//nodeIcon: "dt-icon",
+		title: "dt-title",
+		noConnector: "dt-no-connector",
+
+		nodeError: "dt-statusnode-error",
+		nodeWait: "dt-statusnode-wait",
+		hidden: "dt-hidden",
+		combinedExpanderPrefix: "dt-exp-",
+		combinedIconPrefix: "dt-ico-",
+		nodeLoading: "dt-loading",
+//		disabled: "dt-disabled",
+		hasChildren: "dt-has-children",
+		active: "dt-active",
+		selected: "dt-selected",
+		expanded: "dt-expanded",
+		lazy: "dt-lazy",
+		focused: "dt-focused",
+		partsel: "dt-partsel",
+		lastsib: "dt-lastsib"
+	},
+	debugLevel: 1,
+
+	// ------------------------------------------------------------------------
+	lastentry: undefined
+};
+//
+if( parseFloat($.ui.version) < 1.8 ) {
+	$.ui.dynatree.defaults = $.ui.dynatree.prototype.options;
+}
+
+/*******************************************************************************
+ * Reserved data attributes for a tree node.
+ */
+$.ui.dynatree.nodedatadefaults = {
+	title: null, // (required) Displayed name of the node (html is allowed here)
+	key: null, // May be used with activate(), select(), find(), ...
+	isFolder: true, // Use a folder icon. Also the node is expandable but not selectable.
+	isLazy: true, // Call onLazyRead(), when the node is expanded for the first time to allow for delayed creation of children.
+	tooltip: null, // Show this popup text.
+	icon: null, // Use a custom image (filename relative to tree.options.imagePath). 'null' for default icon, 'false' for no icon.
+	addClass: null, // Class name added to the node's span tag.
+	noLink: false, // Use <span> instead of <a> tag for this node
+	activate: false, // Initial active status.
+	focus: false, // Initial focused status.
+	expand: false, // Initial expanded status.
+	select: false, // Initial selected status.
+	hideCheckbox: false, // Suppress checkbox display for this node.
+	unselectable: false, // Prevent selection.
+//  disabled: false,
+	// The following attributes are only valid if passed to some functions:
+	children: null, // Array of child nodes.
+	// NOTE: we can also add custom attributes here.
+	// This may then also be used in the onActivate(), onSelect() or onLazyTree() callbacks.
+	// ------------------------------------------------------------------------
+	lastentry: undefined
+};
+
+/*******************************************************************************
+ * Drag and drop support
+ */
+function _initDragAndDrop(tree) {
+	var dnd = tree.options.dnd || null;
+	// Register 'connectToDynatree' option with ui.draggable
+	if(dnd && (dnd.onDragStart || dnd.onDrop)) {
+		_registerDnd();
+	}
+	// Attach ui.draggable to this Dynatree instance
+	if(dnd && dnd.onDragStart ) {
+		tree.$tree.draggable({
+			addClasses: false,
+			appendTo: "body",
+			containment: false,
+			delay: 0,
+			distance: 4,
+			revert: false,
+			// Delegate draggable.start, drag, and stop events to our handler
+			connectToDynatree: true,
+			// Let source tree create the helper element
+			helper: function(event) {
+				var sourceNode = getDtNodeFromElement(event.target);
+				return sourceNode.tree._onDragEvent("helper", sourceNode, null, event, null, null);
+			},
+			_last: null
+		});
+	}
+	// Attach ui.droppable to this Dynatree instance
+	if(dnd && dnd.onDrop) {
+		tree.$tree.droppable({
+			addClasses: false,
+			tolerance: "intersect",
+			greedy: false,
+			_last: null
+		});
+	}
+}
+
+//--- Extend ui.draggable event handling --------------------------------------
+var didRegisterDnd = false;
+var _registerDnd = function() {
+	if(didRegisterDnd){
+		return;
+	}
+	$.ui.plugin.add("draggable", "connectToDynatree", {
+		start: function(event, ui) {
+			var draggable = $(this).data("draggable");
+			var sourceNode = ui.helper.data("dtSourceNode") || null;
+//			logMsg("draggable-connectToDynatree.start, %s", sourceNode);
+//			logMsg("    this: %o", this);
+//			logMsg("    event: %o", event);
+//			logMsg("    draggable: %o", draggable);
+//			logMsg("    ui: %o", ui);
+			if(sourceNode) {
+				// Adjust helper offset, so cursor is slightly outside top/left corner
+//				draggable.offset.click.top -= event.target.offsetTop;
+//				draggable.offset.click.left -= event.target.offsetLeft;
+				draggable.offset.click.top = -2;
+				draggable.offset.click.left = + 16;
+//				logMsg("    draggable.offset.click FIXED: %s/%s", draggable.offset.click.left, draggable.offset.click.top);
+				// Trigger onDragStart event
+				// TODO: when called as connectTo..., the return value is ignored(?)
+				return sourceNode.tree._onDragEvent("start", sourceNode, null, event, ui, draggable);
+			}
+		},
+		drag: function(event, ui) {
+			var draggable = $(this).data("draggable");
+			var sourceNode = ui.helper.data("dtSourceNode") || null;
+			var prevTargetNode = ui.helper.data("dtTargetNode") || null;
+			var targetNode = getDtNodeFromElement(event.target);
+//			logMsg("getDtNodeFromElement(%o): %s", event.target, targetNode);
+			if(event.target && !targetNode){
+				// We got a drag event, but the targetNode could not be found
+				// at the event location. This may happen, if the mouse
+				// jumped over the drag helper, in which case we ignore it:
+				var isHelper = $(event.target).closest("div.dt-drag-helper,#dt-drop-marker").length > 0;
+				if(isHelper){
+//					logMsg("Drag event over helper: ignored.");
+					return;
+				}
+			}
+//			logMsg("draggable-connectToDynatree.drag: targetNode(from event): %s, dtTargetNode: %s", targetNode, ui.helper.data("dtTargetNode"));
+			ui.helper.data("dtTargetNode", targetNode);
+			// Leaving a tree node
+			if(prevTargetNode && prevTargetNode !== targetNode ) {
+				prevTargetNode.tree._onDragEvent("leave", prevTargetNode, sourceNode, event, ui, draggable);
+			}
+			if(targetNode){
+				if(!targetNode.tree.options.dnd.onDrop) {
+					// not enabled as drop target
+					noop(); // Keep JSLint happy
+				} else if(targetNode === prevTargetNode) {
+					// Moving over same node
+					targetNode.tree._onDragEvent("over", targetNode, sourceNode, event, ui, draggable);
+				}else{
+					// Entering this node first time
+					targetNode.tree._onDragEvent("enter", targetNode, sourceNode, event, ui, draggable);
+				}
+			}
+			// else go ahead with standard event handling
+		},
+		stop: function(event, ui) {
+			var draggable = $(this).data("draggable");
+			var sourceNode = ui.helper.data("dtSourceNode") || null;
+			var targetNode = ui.helper.data("dtTargetNode") || null;
+//			logMsg("draggable-connectToDynatree.stop: targetNode(from event): %s, dtTargetNode: %s", targetNode, ui.helper.data("dtTargetNode"));
+//			logMsg("draggable-connectToDynatree.stop, %s", sourceNode);
+			var mouseDownEvent = draggable._mouseDownEvent;
+			var eventType = event.type;
+//			logMsg("    type: %o, downEvent: %o, upEvent: %o", eventType, mouseDownEvent, event);
+//			logMsg("    targetNode: %o", targetNode);
+			var dropped = (eventType == "mouseup" && event.which == 1);
+			if(!dropped){
+				logMsg("Drag was cancelled");
+			}
+			if(targetNode) {
+				if(dropped){
+					targetNode.tree._onDragEvent("drop", targetNode, sourceNode, event, ui, draggable);
+				}
+				targetNode.tree._onDragEvent("leave", targetNode, sourceNode, event, ui, draggable);
+			}
+			if(sourceNode){
+				sourceNode.tree._onDragEvent("stop", sourceNode, null, event, ui, draggable);
+			}
+		}
+	});
+	didRegisterDnd = true;
+};
+
+// ---------------------------------------------------------------------------
+})(jQuery);

+ 9404 - 0
modules/app_java/doc/webhelp/oxygen-webhelp/resources/js/jquery.js

@@ -0,0 +1,9404 @@
+/*!
+ * jQuery JavaScript Library v1.7.2
+ * 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: Wed Mar 21 12:46:34 2012 -0700
+ */
+(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.2",
+
+	// 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";
+	},
+
+	isWindow: function( obj ) {
+		return obj != null && obj == obj.window;
+	},
+
+	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 ) {
+		if ( typeof data !== "string" || !data ) {
+			return null;
+		}
+		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, fn, key, value, chainable, emptyGet, pass ) {
+		var exec,
+			bulk = key == null,
+			i = 0,
+			length = elems.length;
+
+		// Sets many values
+		if ( key && typeof key === "object" ) {
+			for ( i in key ) {
+				jQuery.access( elems, fn, i, key[i], 1, emptyGet, value );
+			}
+			chainable = 1;
+
+		// Sets one value
+		} else if ( value !== undefined ) {
+			// Optionally, function values get executed if exec is true
+			exec = pass === undefined && jQuery.isFunction( value );
+
+			if ( bulk ) {
+				// Bulk operations only iterate when executing function values
+				if ( exec ) {
+					exec = fn;
+					fn = function( elem, key, value ) {
+						return exec.call( jQuery( elem ), value );
+					};
+
+				// Otherwise they run against the entire set
+				} else {
+					fn.call( elems, value );
+					fn = null;
+				}
+			}
+
+			if ( fn ) {
+				for (; i < length; i++ ) {
+				fn( elems[i], key, exec ? value.call( elems[i], i, fn( elems[i], key ) ) : value, pass );
+			}
+			}
+
+			chainable = 1;
+		}
+
+		return chainable ?
+			elems :
+
+			// Gets
+			bulk ?
+				fn.call( elems ) :
+				length ? fn( elems[0], key ) : emptyGet;
+	},
+
+	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 was already fired
+		fired,
+		// 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 ];
+			fired = true;
+			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 !!fired;
+			}
+		};
+
+	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,
+		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,
+		pixelMargin: true
+	};
+
+	// jQuery.boxModel DEPRECATED in 1.3, use jQuery.support.boxModel instead
+	jQuery.boxModel = support.boxModel = (document.compatMode === "CSS1Compat");
+
+	// 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");
+
+	// #11217 - WebKit loses check when the name is after the checked attribute
+	input.setAttribute( "name", "t" );
+
+	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 );
+
+	// 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 = div = input = null;
+
+	// Run tests that need a body at doc ready
+	jQuery(function() {
+		var container, outer, inner, table, td, offsetSupport,
+			marginDiv, conMarginTop, style, html, positionTopLeftWidthHeight,
+			paddingMarginBorderVisibility, paddingMarginBorder,
+			body = document.getElementsByTagName("body")[0];
+
+		if ( !body ) {
+			// Return for frameset docs that don't have a body
+			return;
+		}
+
+		conMarginTop = 1;
+		paddingMarginBorder = "padding:0;margin:0;border:";
+		positionTopLeftWidthHeight = "position:absolute;top:0;left:0;width:1px;height:1px;";
+		paddingMarginBorderVisibility = paddingMarginBorder + "0;visibility:hidden;";
+		style = "style='" + positionTopLeftWidthHeight + paddingMarginBorder + "5px solid #000;";
+		html = "<div " + style + "display:block;'><div style='" + paddingMarginBorder + "0;display:block;overflow:hidden;'></div></div>" +
+			"<table " + style + "' cellpadding='0' cellspacing='0'>" +
+			"<tr><td></td></tr></table>";
+
+		container = document.createElement("div");
+		container.style.cssText = paddingMarginBorderVisibility + "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='" + paddingMarginBorder + "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 );
+
+		// 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 ) {
+		div.innerHTML = "";
+			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;
+		}
+
+		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.innerHTML = "";
+			div.style.width = div.style.padding = "1px";
+			div.style.border = 0;
+			div.style.overflow = "hidden";
+			div.style.display = "inline";
+			div.style.zoom = 1;
+			support.inlineBlockNeedsLayout = ( div.offsetWidth === 3 );
+
+			// Check if elements with layout shrink-wrap their children
+			// (IE 6 does this)
+			div.style.display = "block";
+			div.style.overflow = "visible";
+			div.innerHTML = "<div style='width:5px;'></div>";
+			support.shrinkWrapBlocks = ( div.offsetWidth !== 3 );
+		}
+
+		div.style.cssText = positionTopLeftWidthHeight + paddingMarginBorderVisibility;
+		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 );
+
+		if ( window.getComputedStyle ) {
+			div.style.marginTop = "1%";
+			support.pixelMargin = ( window.getComputedStyle( div, null ) || { marginTop: 0 } ).marginTop !== "1%";
+		}
+
+		if ( typeof container.style.zoom !== "undefined" ) {
+			container.style.zoom = 1;
+		}
+
+		body.removeChild( container );
+		marginDiv = 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, part, attr, name, l,
+			elem = this[0],
+			i = 0,
+			data = null;
+
+		// Gets all values
+		if ( key === undefined ) {
+			if ( this.length ) {
+				data = jQuery.data( elem );
+
+				if ( elem.nodeType === 1 && !jQuery._data( elem, "parsedAttrs" ) ) {
+					attr = elem.attributes;
+					for ( l = attr.length; i < l; i++ ) {
+						name = attr[i].name;
+
+						if ( name.indexOf( "data-" ) === 0 ) {
+							name = jQuery.camelCase( name.substring(5) );
+
+							dataAttr( elem, name, data[ name ] );
+						}
+					}
+					jQuery._data( elem, "parsedAttrs", true );
+				}
+			}
+
+			return data;
+		}
+
+		// Sets multiple values
+		if ( typeof key === "object" ) {
+			return this.each(function() {
+				jQuery.data( this, key );
+			});
+		}
+
+		parts = key.split( ".", 2 );
+		parts[1] = parts[1] ? "." + parts[1] : "";
+		part = parts[1] + "!";
+
+		return jQuery.access( this, function( value ) {
+
+		if ( value === undefined ) {
+				data = this.triggerHandler( "getData" + part, [ parts[0] ] );
+
+			// Try to fetch any internally stored data first
+				if ( data === undefined && elem ) {
+					data = jQuery.data( elem, key );
+					data = dataAttr( elem, key, data );
+			}
+
+			return data === undefined && parts[1] ?
+				this.data( parts[0] ) :
+				data;
+			}
+
+			parts[1] = value;
+			this.each(function() {
+				var self = jQuery( this );
+
+				self.triggerHandler( "setData" + part, parts );
+				jQuery.data( this, key, value );
+				self.triggerHandler( "changeData" + part, parts );
+			});
+		}, null, value, arguments.length > 1, null, false );
+	},
+
+	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 ) ? +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 ) {
+		var setter = 2;
+
+		if ( typeof type !== "string" ) {
+			data = type;
+			type = "fx";
+			setter--;
+		}
+
+		if ( arguments.length < setter ) {
+			return jQuery.queue( this[0], type );
+		}
+
+		return data === undefined ?
+			this :
+			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( object );
+	}
+});
+
+
+
+
+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, jQuery.attr, name, value, arguments.length > 1 );
+	},
+
+	removeAttr: function( name ) {
+		return this.each(function() {
+			jQuery.removeAttr( this, name );
+		});
+	},
+
+	prop: function( name, value ) {
+		return jQuery.access( this, jQuery.prop, name, value, arguments.length > 1 );
+	},
+
+	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.type ] || jQuery.valHooks[ elem.nodeName.toLowerCase() ];
+
+				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.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ];
+
+			// 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, isBool,
+			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;
+					isBool = rboolean.test( name );
+
+					// See #9699 for explanation of this approach (setting first, then removal)
+					// Do not do this for boolean attributes (see #10870)
+					if ( !isBool ) {
+					jQuery.attr( elem, name, "" );
+					}
+					elem.removeAttribute( getSetAttribute ? name : propName );
+
+					// Set corresponding property to false for boolean attributes
+					if ( isBool && 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,
+		coords: 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 = /(?:^|\s)hover(\.\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;
+			selector = handleObjIn.selector;
+		}
+
+		// 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: selector && 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,
+			special = jQuery.event.special[ event.type ] || {},
+			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;
+
+		// Call the preDispatch hook for the mapped type, and let it bail if desired
+		if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) {
+			return;
+		}
+
+		// Determine handlers that should run if there are delegated events
+		// Avoid non-left-click bubbling in Firefox (#3861)
+		if ( delegateCount && !(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 ) {
+
+				// Don't process events on disabled elements (#6911, #8165)
+				if ( cur.disabled !== true ) {
+				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();
+						}
+					}
+				}
+			}
+		}
+
+		// Call the postDispatch hook for the mapped type
+		if ( special.postDispatch ) {
+			special.postDispatch.call( this, event );
+		}
+
+		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 ) {
+						event._submit_bubble = true;
+					});
+					form._submit_attached = true;
+				}
+			});
+			// return undefined since we don't need an event listener
+		},
+
+		postDispatch: function( event ) {
+			// If form was submitted by the user, bubble the event up the tree
+			if ( event._submit_bubble ) {
+				delete event._submit_bubble;
+				if ( this.parentNode && !event.isTrigger ) {
+					jQuery.event.simulate( "submit", this.parentNode, event, true );
+				}
+			}
+		},
+
+		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" ) { // && selector != null
+				// ( types-Object, data )
+				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( 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.origType + "." + handleObj.namespace : handleObj.origType,
+				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 || nodeType === 11 ) {
+			// 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;
+
+					/* falls through */
+				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) );
+}
+// Expose origPOS
+// "global" as in regardless of relation to brackets/parens
+Expr.match.globalPOS = origPOS;
+
+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.globalPOS,
+	// 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|bdi|canvas|data|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 + ")[\\s/>]", "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( value ) {
+		return jQuery.access( this, function( value ) {
+			return value === undefined ?
+				jQuery.text( this ) :
+				this.empty().append( ( this[0] && this[0].ownerDocument || document ).createTextNode( value ) );
+		}, null, value, arguments.length );
+	},
+
+	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 ) {
+		return jQuery.access( this, function( value ) {
+			var elem = this[0] || {},
+				i = 0,
+				l = this.length;
+
+		if ( value === undefined ) {
+				return elem.nodeType === 1 ?
+					elem.innerHTML.replace( rinlinejQuery, "" ) :
+				null;
+			}
+
+
+			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 (; i < l; i++ ) {
+					// Remove element nodes and prevent memory leaks
+						elem = this[i] || {};
+						if ( elem.nodeType === 1 ) {
+							jQuery.cleanData( elem.getElementsByTagName( "*" ) );
+							elem.innerHTML = value;
+					}
+				}
+
+					elem = 0;
+
+			// If using innerHTML throws an exception, use the fallback method
+				} catch(e) {}
+			}
+
+			if ( elem ) {
+			this.empty().append( value );
+		}
+		}, null, value, arguments.length );
+	},
+
+	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, function( i, elem ) {
+					if ( elem.src ) {
+						jQuery.ajax({
+							type: "GET",
+							global: false,
+							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 );
+		}
+				});
+			}
+		}
+
+		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 ] );
+			}
+		}
+	}
+
+	// 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;
+
+	// IE blanks contents when cloning scripts
+	} else if ( nodeName === "script" && dest.text !== src.text ) {
+		dest.text = src.text;
+	}
+
+	// Event data gets referenced instead of copied if the expando
+	// gets copied too
+	dest.removeAttribute( jQuery.expando );
+
+	// Clear flags for bubbling special change/submit events, they must
+	// be reattached when the newly cloned events are first activated
+	dest.removeAttribute( "_submit_attached" );
+	dest.removeAttribute( "_change_attached" );
+}
+
+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 || jQuery.isXMLDoc(elem) || !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, script, j,
+				ret = [];
+
+		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;
+		}
+
+		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"),
+						safeChildNodes = safeFragment.childNodes,
+						remove;
+
+					// 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;
+
+					// Clear elements from DocumentFragment (safeFragment or otherwise)
+					// to avoid hoarding elements. Fixes #11356
+					if ( div ) {
+						div.parentNode.removeChild( div );
+
+						// Guard against -1 index exceptions in FF3.6
+						if ( safeChildNodes.length > 0 ) {
+							remove = safeChildNodes[ safeChildNodes.length - 1 ];
+
+							if ( remove && remove.parentNode ) {
+								remove.parentNode.removeChild( remove );
+				}
+			}
+					}
+				}
+			}
+
+			// 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++ ) {
+				script = ret[i];
+				if ( scripts && jQuery.nodeName( script, "script" ) && (!script.type || rscriptType.test( script.type )) ) {
+					scripts.push( script.parentNode ? script.parentNode.removeChild( script ) : script );
+
+				} else {
+					if ( script.nodeType === 1 ) {
+						var jsTags = jQuery.grep( script.getElementsByTagName( "script" ), checkScriptType );
+
+						ret.splice.apply( ret, [i + 1, 0].concat( jsTags ) );
+					}
+					fragment.appendChild( script );
+				}
+			}
+		}
+
+		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 ];
+			}
+		}
+	}
+});
+
+
+
+
+var ralpha = /alpha\([^)]*\)/i,
+	ropacity = /opacity=([^)]*)/,
+	// fixed for IE9, see #8346
+	rupper = /([A-Z]|^ms)/g,
+	rnum = /^[\-+]?(?:\d*\.)?\d+$/i,
+	rnumnonpx = /^-?(?:\d*\.)?\d+(?!px)[^\d\s]+$/i,
+	rrelNum = /^([\-+])=([\-+.\de]+)/,
+	rmargin = /^margin/,
+
+	cssShow = { position: "absolute", visibility: "hidden", display: "block" },
+
+	// order is important!
+	cssExpand = [ "Top", "Right", "Bottom", "Left" ],
+
+	curCSS,
+
+	getComputedStyle,
+	currentStyle;
+
+jQuery.fn.css = function( name, value ) {
+	return jQuery.access( this, function( elem, name, value ) {
+		return value !== undefined ?
+			jQuery.style( elem, name, value ) :
+			jQuery.css( elem, name );
+	}, name, value, arguments.length > 1 );
+};
+
+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" );
+					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 = {},
+			ret, name;
+
+		// Remember the old values, and insert the new ones
+		for ( name in options ) {
+			old[ name ] = elem.style[ name ];
+			elem.style[ name ] = options[ name ];
+		}
+
+		ret = callback.call( elem );
+
+		// Revert the old values
+		for ( name in options ) {
+			elem.style[ name ] = old[ name ];
+		}
+
+				return ret;
+			}
+});
+
+// DEPRECATED in 1.3, Use jQuery.css() instead
+jQuery.curCSS = jQuery.css;
+
+if ( document.defaultView && document.defaultView.getComputedStyle ) {
+	getComputedStyle = function( elem, name ) {
+		var ret, defaultView, computedStyle, width,
+			style = elem.style;
+
+		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 );
+			}
+		}
+
+		// A tribute to the "awesome hack by Dean Edwards"
+		// WebKit uses "computed value (percentage if specified)" instead of "used value" for margins
+		// which is against the CSSOM draft spec: http://dev.w3.org/csswg/cssom/#resolved-values
+		if ( !jQuery.support.pixelMargin && computedStyle && rmargin.test( name ) && rnumnonpx.test( ret ) ) {
+			width = style.width;
+			style.width = ret;
+			ret = computedStyle.width;
+			style.width = width;
+		}
+
+		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 ( rnumnonpx.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;
+			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 getWidthOrHeight( elem, name, extra ) {
+
+	// Start with offset property
+	var val = name === "width" ? elem.offsetWidth : elem.offsetHeight,
+		i = name === "width" ? 1 : 0,
+		len = 4;
+
+	if ( val > 0 ) {
+		if ( extra !== "border" ) {
+			for ( ; i < len; i += 2 ) {
+				if ( !extra ) {
+					val -= parseFloat( jQuery.css( elem, "padding" + cssExpand[ i ] ) ) || 0;
+				}
+				if ( extra === "margin" ) {
+					val += parseFloat( jQuery.css( elem, extra + cssExpand[ i ] ) ) || 0;
+				} else {
+					val -= parseFloat( jQuery.css( elem, "border" + cssExpand[ i ] + "Width" ) ) || 0;
+				}
+			}
+		}
+
+		return val + "px";
+	}
+
+	// Fall back to computed then uncomputed css if necessary
+	val = curCSS( elem, name );
+	if ( val < 0 || val == null ) {
+		val = elem.style[ name ];
+	}
+
+	// Computed unit is not pixels. Stop here and return.
+	if ( rnumnonpx.test(val) ) {
+		return val;
+	}
+
+	// Normalize "", auto, and prepare for extra
+	val = parseFloat( val ) || 0;
+
+	// Add padding, border, margin
+	if ( extra ) {
+		for ( ; i < len; i += 2 ) {
+			val += parseFloat( jQuery.css( elem, "padding" + cssExpand[ i ] ) ) || 0;
+			if ( extra !== "padding" ) {
+				val += parseFloat( jQuery.css( elem, "border" + cssExpand[ i ] + "Width" ) ) || 0;
+			}
+			if ( extra === "margin" ) {
+				val += parseFloat( jQuery.css( elem, extra + cssExpand[ i ]) ) || 0;
+			}
+		}
+	}
+
+	return val + "px";
+}
+
+jQuery.each([ "height", "width" ], function( i, name ) {
+	jQuery.cssHooks[ name ] = {
+		get: function( elem, computed, extra ) {
+			if ( computed ) {
+				if ( elem.offsetWidth !== 0 ) {
+					return getWidthOrHeight( elem, name, extra );
+				} else {
+					return jQuery.swap( elem, cssShow, function() {
+						return getWidthOrHeight( elem, name, extra );
+					});
+				}
+			}
+		},
+
+		set: function( elem, value ) {
+			return rnum.test( value ) ?
+				value + "px" :
+				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
+				return jQuery.swap( elem, { "display": "inline-block" }, function() {
+					if ( computed ) {
+						return curCSS( elem, "margin-right" );
+					} else {
+						return elem.style.marginRight;
+					}
+				});
+			}
+		};
+	}
+});
+
+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 );
+	};
+}
+
+// These hooks are used by animate to expand properties
+jQuery.each({
+	margin: "",
+	padding: "",
+	border: "Width"
+}, function( prefix, suffix ) {
+
+	jQuery.cssHooks[ prefix + suffix ] = {
+		expand: function( value ) {
+			var i,
+
+				// assumes a single number if not a string
+				parts = typeof value === "string" ? value.split(" ") : [ value ],
+				expanded = {};
+
+			for ( i = 0; i < 4; i++ ) {
+				expanded[ prefix + cssExpand[ i ] + suffix ] =
+					parts[ i ] || parts[ i - 2 ] || parts[ 0 ];
+			}
+
+			return expanded;
+		}
+	};
+});
+
+
+
+
+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; charset=UTF-8",
+		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 prefilter, 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" ? i : "" ) + "]", v, traditional, add );
+			}
+		});
+
+	} else if ( !traditional && jQuery.type( 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 = ( typeof s.data === "string" ) && /^application\/x\-www\-form\-urlencoded/.test( s.contentType );
+
+	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;
+									}
+
+									// When requesting binary data, IE6-9 will throw an exception
+									// on any attempt to access responseText (#11426)
+									try {
+									responses.text = xhr.responseText;
+									} catch( _ ) {
+									}
+
+									// 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.contains( elem.ownerDocument.documentElement, elem ) ) {
+						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, hooks, replace,
+				parts, start, end, unit,
+				method;
+
+			// will store per property easing and be used to determine when an animation is complete
+			opt.animatedProperties = {};
+
+			// first pass over propertys to expand / normalize
+			for ( p in prop ) {
+				name = jQuery.camelCase( p );
+				if ( p !== name ) {
+					prop[ name ] = prop[ p ];
+					delete prop[ p ];
+				}
+
+				if ( ( hooks = jQuery.cssHooks[ name ] ) && "expand" in hooks ) {
+					replace = hooks.expand( prop[ name ] );
+					delete prop[ name ];
+
+					// not quite $.extend, this wont overwrite keys already present.
+					// also - reusing 'p' from above because we have the correct "name"
+					for ( p in replace ) {
+						if ( ! ( p in prop ) ) {
+							prop[ p ] = replace[ p ];
+						}
+					}
+				}
+			}
+
+			for ( name in prop ) {
+				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 ) {
+			return p;
+		},
+		swing: function( p ) {
+			return ( -Math.cos( p*Math.PI ) / 2 ) + 0.5;
+		}
+	},
+
+	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 ( jQuery._data( self.elem, "fxshow" + self.prop ) === undefined ) {
+				if ( self.options.hide ) {
+				jQuery._data( self.elem, "fxshow" + self.prop, self.start );
+				} else if ( self.options.show ) {
+					jQuery._data( self.elem, "fxshow" + self.prop, self.end );
+			}
+			}
+		};
+
+		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;
+			}
+		}
+	}
+});
+
+// Ensure props that can't be negative don't go there on undershoot easing
+jQuery.each( fxAttrs.concat.apply( [], fxAttrs ), function( i, prop ) {
+	// exclude marginTop, marginLeft, marginBottom and marginRight from this list
+	if ( prop.indexOf( "margin" ) ) {
+	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( ( jQuery.support.boxModel ? "<!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 getOffset,
+	rtable = /^t(?:able|d|h)$/i,
+	rroot = /^(?:body|html)$/i;
+
+if ( "getBoundingClientRect" in document.documentElement ) {
+	getOffset = function( elem, doc, docElem, box ) {
+		try {
+			box = elem.getBoundingClientRect();
+		} catch(e) {}
+
+		// 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 {
+	getOffset = function( elem, doc, docElem ) {
+		var computedStyle,
+			offsetParent = elem.offsetParent,
+			prevOffsetParent = elem,
+			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.fn.offset = function( options ) {
+	if ( arguments.length ) {
+		return options === undefined ?
+			this :
+			this.each(function( i ) {
+				jQuery.offset.setOffset( this, options, i );
+			});
+	}
+
+	var elem = this[0],
+		doc = elem && elem.ownerDocument;
+
+	if ( !doc ) {
+		return null;
+	}
+
+	if ( elem === doc.body ) {
+		return jQuery.offset.bodyOffset( elem );
+	}
+
+	return getOffset( elem, doc, doc.documentElement );
+};
+
+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( {scrollLeft: "pageXOffset", scrollTop: "pageYOffset"}, function( method, prop ) {
+	var top = /Y/.test( prop );
+
+	jQuery.fn[ method ] = function( val ) {
+		return jQuery.access( this, function( elem, method, val ) {
+			var win = getWindow( elem );
+
+		if ( val === undefined ) {
+				return win ? (prop in win) ? win[ prop ] :
+				jQuery.support.boxModel && win.document.documentElement[ method ] ||
+					win.document.body[ method ] :
+				elem[ method ];
+		}
+
+			if ( win ) {
+				win.scrollTo(
+					!top ? val : jQuery( win ).scrollLeft(),
+					 top ? val : jQuery( win ).scrollTop()
+				);
+
+			} else {
+				elem[ method ] = val;
+			}
+		}, method, val, arguments.length, null );
+	};
+});
+
+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: "height", Width: "width" }, function( name, type ) {
+	var clientProp = "client" + name,
+		scrollProp = "scroll" + name,
+		offsetProp = "offset" + name;
+
+	// 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( value ) {
+		return jQuery.access( this, function( elem, type, value ) {
+			var doc, docElemProp, orig, ret;
+
+		if ( jQuery.isWindow( elem ) ) {
+			// 3rd condition allows Nokia support, as it supports the docElem prop but not CSS1Compat
+				doc = elem.document;
+				docElemProp = doc.documentElement[ clientProp ];
+				return jQuery.support.boxModel && docElemProp ||
+					doc.body && doc.body[ clientProp ] || docElemProp;
+			}
+
+		// Get document width or height
+			if ( elem.nodeType === 9 ) {
+			// Either scroll[Width/Height] or offset[Width/Height], whichever is greater
+				doc = elem.documentElement;
+
+				// when a window > document, IE6 reports a offset[Width/Height] > client[Width/Height]
+				// so we can't use max, as it'll choose the incorrect offset[Width/Height]
+				// instead we use the correct client[Width/Height]
+				// support:IE6
+				if ( doc[ clientProp ] >= doc[ scrollProp ] ) {
+					return doc[ clientProp ];
+				}
+
+			return Math.max(
+					elem.body[ scrollProp ], doc[ scrollProp ],
+					elem.body[ offsetProp ], doc[ offsetProp ]
+			);
+			}
+
+			// Get width or height on the element
+			if ( value === undefined ) {
+				orig = jQuery.css( elem, type );
+				ret = parseFloat( orig );
+			return jQuery.isNumeric( ret ) ? ret : orig;
+		}
+
+			// Set the width or height on the element
+			jQuery( elem ).css( type, value );
+		}, type, value, arguments.length, null );
+	};
+});
+
+
+
+
+// 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 );

+ 150 - 0
modules/app_java/doc/webhelp/oxygen-webhelp/resources/js/jquery.quicksearch.js

@@ -0,0 +1,150 @@
+(function($, window, document, undefined) {
+	$.fn.quicksearch = function (target, opt) {
+		
+		var timeout, cache, rowcache, jq_results, val = '', e = this, options = $.extend({ 
+			delay: 100,
+			selector: null,
+			stripeRows: null,
+			loader: null,
+			noResults: '',
+			bind: 'keyup submit',
+			onBefore: function () { 
+				return;
+			},
+			onAfter: function () { 
+				return;
+			},
+			show: function () {
+				this.style.display = "";
+			},
+			hide: function () {
+				this.style.display = "none";
+			},
+			prepareQuery: function (val) {
+				return val.toLowerCase().split(' ');
+			},
+			testQuery: function (query, txt, _row) {
+				for (var i = 0; i < query.length; i += 1) {
+					if (txt.indexOf(query[i]) === -1) {
+						return false;
+					}
+				}
+				return true;
+			}
+		}, opt);
+		
+		this.go = function () {
+			
+			var i = 0, 
+			noresults = true, 
+			query = options.prepareQuery(val),
+			val_empty = (val.replace(' ', '').length === 0);
+			
+			for (var i = 0, len = rowcache.length; i < len; i++) {
+				if (val_empty || options.testQuery(query, cache[i], rowcache[i])) {
+					options.show.apply(rowcache[i]);
+					noresults = false;
+				} else {
+					options.hide.apply(rowcache[i]);
+				}
+			}
+			
+			if (noresults) {
+				this.results(false);
+			} else {
+				this.results(true);
+				this.stripe();
+			}
+			
+			this.loader(false);
+			options.onAfter();
+			
+			return this;
+		};
+		
+		this.stripe = function () {
+			
+			if (typeof options.stripeRows === "object" && options.stripeRows !== null)
+			{
+				var joined = options.stripeRows.join(' ');
+				var stripeRows_length = options.stripeRows.length;
+				
+				jq_results.not(':hidden').each(function (i) {
+					$(this).removeClass(joined).addClass(options.stripeRows[i % stripeRows_length]);
+				});
+			}
+			
+			return this;
+		};
+		
+		this.strip_html = function (input) {
+			var output = input.replace(new RegExp('<[^<]+\>', 'g'), "");
+			output = $.trim(output.toLowerCase());
+			return output;
+		};
+		
+		this.results = function (bool) {
+			if (typeof options.noResults === "string" && options.noResults !== "") {
+				if (bool) {
+					$(options.noResults).hide();
+				} else {
+					$(options.noResults).show();
+				}
+			}
+			return this;
+		};
+		
+		this.loader = function (bool) {
+			if (typeof options.loader === "string" && options.loader !== "") {
+				 (bool) ? $(options.loader).show() : $(options.loader).hide();
+			}
+			return this;
+		};
+		
+		this.cache = function () {
+			
+			jq_results = $(target);
+			
+			if (typeof options.noResults === "string" && options.noResults !== "") {
+				jq_results = jq_results.not(options.noResults);
+			}
+			
+			var t = (typeof options.selector === "string") ? jq_results.find(options.selector) : $(target).not(options.noResults);
+			cache = t.map(function () {
+				return e.strip_html(this.innerHTML);
+			});
+			
+			rowcache = jq_results.map(function () {
+				return this;
+			});
+			
+			return this.go();
+		};
+		
+		this.trigger = function () {
+			this.loader(true);
+			options.onBefore();
+			
+			window.clearTimeout(timeout);
+			timeout = window.setTimeout(function () {
+				e.go();
+			}, options.delay);
+			
+			return this;
+		};
+		
+		this.cache();
+		this.results(true);
+		this.stripe();
+		this.loader(false);
+		
+		return this.each(function () {
+			$(this).bind(options.bind, function () {
+				val = $(this).val();
+				e.trigger();
+			});
+		});
+		
+	};
+
+}(jQuery, this, document));

+ 183 - 0
modules/app_java/doc/webhelp/oxygen-webhelp/resources/js/jquery.realperson.js

@@ -0,0 +1,183 @@
+/* http://keith-wood.name/realPerson.html
+   Real Person Form Submission for jQuery v1.0.1.
+   Written by Keith Wood (kwood{at}iinet.com.au) June 2009.
+   Dual licensed under the GPL (http://dev.jquery.com/browser/trunk/jquery/GPL-LICENSE.txt) and 
+   MIT (http://dev.jquery.com/browser/trunk/jquery/MIT-LICENSE.txt) licenses. 
+   Please attribute the author if you use it. */
+
+(function($) { // Hide scope, no $ conflict
+
+var PROP_NAME = 'realPerson';
+
+/* Real person manager. */
+function RealPerson() {
+	this._defaults = {
+		length: 6, // Number of characters to use
+		includeNumbers: false, // True to use numbers as well as letters
+		regenerate: 'Click to change', // Instruction text to regenerate
+		hashName: '{n}Hash' // Name of the hash value field to compare with,
+			// use {n} to substitute with the original field name
+	};
+}
+
+var CHARS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';
+var DOTS = [
+	['   *   ', '  * *  ', '  * *  ', ' *   * ', ' ***** ', '*     *', '*     *'],
+	['****** ', '*     *', '*     *', '****** ', '*     *', '*     *', '****** '],
+	[' ***** ', '*     *', '*      ', '*      ', '*      ', '*     *', ' ***** '],
+	['****** ', '*     *', '*     *', '*     *', '*     *', '*     *', '****** '],
+	['*******', '*      ', '*      ', '****   ', '*      ', '*      ', '*******'],
+	['*******', '*      ', '*      ', '****   ', '*      ', '*      ', '*      '],
+	[' ***** ', '*     *', '*      ', '*      ', '*   ***', '*     *', ' ***** '],
+	['*     *', '*     *', '*     *', '*******', '*     *', '*     *', '*     *'],
+	['*******', '   *   ', '   *   ', '   *   ', '   *   ', '   *   ', '*******'],
+	['      *', '      *', '      *', '      *', '      *', '*     *', ' ***** '],
+	['*     *', '*   ** ', '* **   ', '**     ', '* **   ', '*   ** ', '*     *'],
+	['*      ', '*      ', '*      ', '*      ', '*      ', '*      ', '*******'],
+	['*     *', '**   **', '* * * *', '*  *  *', '*     *', '*     *', '*     *'],
+	['*     *', '**    *', '* *   *', '*  *  *', '*   * *', '*    **', '*     *'],
+	[' ***** ', '*     *', '*     *', '*     *', '*     *', '*     *', ' ***** '],
+	['****** ', '*     *', '*     *', '****** ', '*      ', '*      ', '*      '],
+	[' ***** ', '*     *', '*     *', '*     *', '*   * *', '*    * ', ' **** *'],
+	['****** ', '*     *', '*     *', '****** ', '*   *  ', '*    * ', '*     *'],
+	[' ***** ', '*     *', '*      ', ' ***** ', '      *', '*     *', ' ***** '],
+	['*******', '   *   ', '   *   ', '   *   ', '   *   ', '   *   ', '   *   '],
+	['*     *', '*     *', '*     *', '*     *', '*     *', '*     *', ' ***** '],
+	['*     *', '*     *', ' *   * ', ' *   * ', '  * *  ', '  * *  ', '   *   '],
+	['*     *', '*     *', '*     *', '*  *  *', '* * * *', '**   **', '*     *'],
+	['*     *', ' *   * ', '  * *  ', '   *   ', '  * *  ', ' *   * ', '*     *'],
+	['*     *', ' *   * ', '  * *  ', '   *   ', '   *   ', '   *   ', '   *   '],
+	['*******', '     * ', '    *  ', '   *   ', '  *    ', ' *     ', '*******'],
+	['  ***  ', ' *   * ', '*     *', '*     *', '*     *', ' *   * ', '  ***  '],
+	['   *   ', '  **   ', ' * *   ', '   *   ', '   *   ', '   *   ', '*******'],
+	[' ***** ', '*     *', '      *', '     * ', '   **  ', ' **    ', '*******'],
+	[' ***** ', '*     *', '      *', '    ** ', '      *', '*     *', ' ***** '],
+	['    *  ', '   **  ', '  * *  ', ' *  *  ', '*******', '    *  ', '    *  '],
+	['*******', '*      ', '****** ', '      *', '      *', '*     *', ' ***** '],
+	['  **** ', ' *     ', '*      ', '****** ', '*     *', '*     *', ' ***** '],
+	['*******', '     * ', '    *  ', '   *   ', '  *    ', ' *     ', '*      '],
+	[' ***** ', '*     *', '*     *', ' ***** ', '*     *', '*     *', ' ***** '],
+	[' ***** ', '*     *', '*     *', ' ******', '      *', '     * ', ' ****  ']];
+
+$.extend(RealPerson.prototype, {
+	/* Class name added to elements to indicate already configured with real person. */
+	markerClassName: 'hasRealPerson',
+
+	/* Override the default settings for all real person instances.
+	   @param  settings  (object) the new settings to use as defaults
+	   @return  (RealPerson) this object */
+	setDefaults: function(settings) {
+		$.extend(this._defaults, settings || {});
+		return this;
+	},
+
+	/* Attach the real person functionality to an input field.
+	   @param  target    (element) the control to affect
+	   @param  settings  (object) the custom options for this instance */
+	_attachRealPerson: function(target, settings) {
+		target = $(target);
+		if (target.hasClass(this.markerClassName)) {
+			return;
+		}
+		target.addClass(this.markerClassName);
+		var inst = {settings: $.extend({}, this._defaults)};
+		$.data(target[0], PROP_NAME, inst);
+		this._changeRealPerson(target, settings);
+	},
+
+	/* Reconfigure the settings for a real person control.
+	   @param  target    (element) the control to affect
+	   @param  settings  (object) the new options for this instance or
+	                     (string) an individual property name
+	   @param  value     (any) the individual property value (omit if settings is an object) */
+	_changeRealPerson: function(target, settings, value) {
+		target = $(target);
+		if (!target.hasClass(this.markerClassName)) {
+			return;
+		}
+		settings = settings || {};
+		if (typeof settings == 'string') {
+			var name = settings;
+			settings = {};
+			settings[name] = value;
+		}
+		var inst = $.data(target[0], PROP_NAME);
+		$.extend(inst.settings, settings);
+		target.prevAll('.realperson-challenge,.realperson-hash').remove().end().
+			before(this._generateHTML(target, inst));
+	},
+
+	/* Generate the additional content for this control.
+	   @param  target  (jQuery) the input field
+	   @param  inst    (object) the current instance settings
+	   @return  (string) the additional content */
+	_generateHTML: function(target, inst) {
+		var text = '';
+		for (var i = 0; i < inst.settings.length; i++) {
+			text += CHARS.charAt(Math.floor(Math.random() *
+				(inst.settings.includeNumbers ? 36 : 26)));
+		}
+		var html = '<div class="realperson-challenge"><div class="realperson-text">';
+		for (var i = 0; i < DOTS[0].length; i++) {
+			for (var j = 0; j < text.length; j++) {
+				html += DOTS[CHARS.indexOf(text.charAt(j))][i].replace(/ /g, '&nbsp;') +
+					'&nbsp;&nbsp;';
+			}
+			html += '<br>';
+		}
+		html += '</div><div class="realperson-regen">' + inst.settings.regenerate +
+			'</div></div><input type="hidden" class="realperson-hash" name="' +
+			inst.settings.hashName.replace(/\{n\}/, target.attr('name')) +
+			'" value="' + this._hash(text) + '">';
+		return html;
+	},
+
+	/* Remove the real person functionality from a control.
+	   @param  target  (element) the control to affect */
+	_destroyRealPerson: function(target) {
+		target = $(target);
+		if (!target.hasClass(this.markerClassName)) {
+			return;
+		}
+		target.removeClass(this.markerClassName).
+			prevAll('.realperson-challenge,.realperson-hash').remove();
+		$.removeData(target[0], PROP_NAME);
+	},
+
+	/* Compute a hash value for the given text.
+	   @param  value  (string) the text to hash
+	   @return  the corresponding hash value */
+	_hash: function(value) {
+		var hash = 5381;
+		for (var i = 0; i < value.length; i++) {
+			hash = ((hash << 5) + hash) + value.charCodeAt(i);
+		}
+		return hash;
+	}
+});
+
+/* Attach the real person functionality to a jQuery selection.
+   @param  command  (string) the command to run (optional, default 'attach')
+   @param  options  (object) the new settings to use for these instances (optional)
+   @return  (jQuery) for chaining further calls */
+$.fn.realperson = function(options) {
+	var otherArgs = Array.prototype.slice.call(arguments, 1);
+	return this.each(function() {
+		if (typeof options == 'string') {
+			$.realperson['_' + options + 'RealPerson'].
+				apply($.realperson, [this].concat(otherArgs));
+		}
+		else {
+			$.realperson._attachRealPerson(this, options || {});
+		}
+	});
+};
+
+/* Initialise the real person functionality. */
+$.realperson = new RealPerson(); // singleton instance
+
+$('.realperson-challenge').live('click', function() {
+	$(this).next().next().realperson('change');
+});
+
+})(jQuery);

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 6 - 0
modules/app_java/doc/webhelp/oxygen-webhelp/resources/js/jquery.realperson.min.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 6 - 0
modules/app_java/doc/webhelp/oxygen-webhelp/resources/js/jquery.realperson.pack.js


+ 256 - 0
modules/app_java/doc/webhelp/oxygen-webhelp/resources/js/md5.js

@@ -0,0 +1,256 @@
+/*
+ * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message
+ * Digest Algorithm, as defined in RFC 1321.
+ * Version 2.1 Copyright (C) Paul Johnston 1999 - 2002.
+ * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet
+ * Distributed under the BSD License
+ * See http://pajhome.org.uk/crypt/md5 for more info.
+ */
+
+/*
+ * Configurable variables. You may need to tweak these to be compatible with
+ * the server-side, but the defaults work in most cases.
+ */
+var hexcase = 0;  /* hex output format. 0 - lowercase; 1 - uppercase        */
+var b64pad  = ""; /* base-64 pad character. "=" for strict RFC compliance   */
+var chrsz   = 8;  /* bits per input character. 8 - ASCII; 16 - Unicode      */
+
+/*
+ * These are the functions you'll usually want to call
+ * They take string arguments and return either hex or base-64 encoded strings
+ */
+function hex_md5(s){ return binl2hex(core_md5(str2binl(s), s.length * chrsz));}
+function b64_md5(s){ return binl2b64(core_md5(str2binl(s), s.length * chrsz));}
+function str_md5(s){ return binl2str(core_md5(str2binl(s), s.length * chrsz));}
+function hex_hmac_md5(key, data) { return binl2hex(core_hmac_md5(key, data)); }
+function b64_hmac_md5(key, data) { return binl2b64(core_hmac_md5(key, data)); }
+function str_hmac_md5(key, data) { return binl2str(core_hmac_md5(key, data)); }
+
+/*
+ * Perform a simple self-test to see if the VM is working
+ */
+function md5_vm_test()
+{
+  return hex_md5("abc") == "900150983cd24fb0d6963f7d28e17f72";
+}
+
+/*
+ * Calculate the MD5 of an array of little-endian words, and a bit length
+ */
+function core_md5(x, len)
+{
+  /* append padding */
+  x[len >> 5] |= 0x80 << ((len) % 32);
+  x[(((len + 64) >>> 9) << 4) + 14] = len;
+
+  var a =  1732584193;
+  var b = -271733879;
+  var c = -1732584194;
+  var d =  271733878;
+
+  for(var i = 0; i < x.length; i += 16)
+  {
+    var olda = a;
+    var oldb = b;
+    var oldc = c;
+    var oldd = d;
+
+    a = md5_ff(a, b, c, d, x[i+ 0], 7 , -680876936);
+    d = md5_ff(d, a, b, c, x[i+ 1], 12, -389564586);
+    c = md5_ff(c, d, a, b, x[i+ 2], 17,  606105819);
+    b = md5_ff(b, c, d, a, x[i+ 3], 22, -1044525330);
+    a = md5_ff(a, b, c, d, x[i+ 4], 7 , -176418897);
+    d = md5_ff(d, a, b, c, x[i+ 5], 12,  1200080426);
+    c = md5_ff(c, d, a, b, x[i+ 6], 17, -1473231341);
+    b = md5_ff(b, c, d, a, x[i+ 7], 22, -45705983);
+    a = md5_ff(a, b, c, d, x[i+ 8], 7 ,  1770035416);
+    d = md5_ff(d, a, b, c, x[i+ 9], 12, -1958414417);
+    c = md5_ff(c, d, a, b, x[i+10], 17, -42063);
+    b = md5_ff(b, c, d, a, x[i+11], 22, -1990404162);
+    a = md5_ff(a, b, c, d, x[i+12], 7 ,  1804603682);
+    d = md5_ff(d, a, b, c, x[i+13], 12, -40341101);
+    c = md5_ff(c, d, a, b, x[i+14], 17, -1502002290);
+    b = md5_ff(b, c, d, a, x[i+15], 22,  1236535329);
+
+    a = md5_gg(a, b, c, d, x[i+ 1], 5 , -165796510);
+    d = md5_gg(d, a, b, c, x[i+ 6], 9 , -1069501632);
+    c = md5_gg(c, d, a, b, x[i+11], 14,  643717713);
+    b = md5_gg(b, c, d, a, x[i+ 0], 20, -373897302);
+    a = md5_gg(a, b, c, d, x[i+ 5], 5 , -701558691);
+    d = md5_gg(d, a, b, c, x[i+10], 9 ,  38016083);
+    c = md5_gg(c, d, a, b, x[i+15], 14, -660478335);
+    b = md5_gg(b, c, d, a, x[i+ 4], 20, -405537848);
+    a = md5_gg(a, b, c, d, x[i+ 9], 5 ,  568446438);
+    d = md5_gg(d, a, b, c, x[i+14], 9 , -1019803690);
+    c = md5_gg(c, d, a, b, x[i+ 3], 14, -187363961);
+    b = md5_gg(b, c, d, a, x[i+ 8], 20,  1163531501);
+    a = md5_gg(a, b, c, d, x[i+13], 5 , -1444681467);
+    d = md5_gg(d, a, b, c, x[i+ 2], 9 , -51403784);
+    c = md5_gg(c, d, a, b, x[i+ 7], 14,  1735328473);
+    b = md5_gg(b, c, d, a, x[i+12], 20, -1926607734);
+
+    a = md5_hh(a, b, c, d, x[i+ 5], 4 , -378558);
+    d = md5_hh(d, a, b, c, x[i+ 8], 11, -2022574463);
+    c = md5_hh(c, d, a, b, x[i+11], 16,  1839030562);
+    b = md5_hh(b, c, d, a, x[i+14], 23, -35309556);
+    a = md5_hh(a, b, c, d, x[i+ 1], 4 , -1530992060);
+    d = md5_hh(d, a, b, c, x[i+ 4], 11,  1272893353);
+    c = md5_hh(c, d, a, b, x[i+ 7], 16, -155497632);
+    b = md5_hh(b, c, d, a, x[i+10], 23, -1094730640);
+    a = md5_hh(a, b, c, d, x[i+13], 4 ,  681279174);
+    d = md5_hh(d, a, b, c, x[i+ 0], 11, -358537222);
+    c = md5_hh(c, d, a, b, x[i+ 3], 16, -722521979);
+    b = md5_hh(b, c, d, a, x[i+ 6], 23,  76029189);
+    a = md5_hh(a, b, c, d, x[i+ 9], 4 , -640364487);
+    d = md5_hh(d, a, b, c, x[i+12], 11, -421815835);
+    c = md5_hh(c, d, a, b, x[i+15], 16,  530742520);
+    b = md5_hh(b, c, d, a, x[i+ 2], 23, -995338651);
+
+    a = md5_ii(a, b, c, d, x[i+ 0], 6 , -198630844);
+    d = md5_ii(d, a, b, c, x[i+ 7], 10,  1126891415);
+    c = md5_ii(c, d, a, b, x[i+14], 15, -1416354905);
+    b = md5_ii(b, c, d, a, x[i+ 5], 21, -57434055);
+    a = md5_ii(a, b, c, d, x[i+12], 6 ,  1700485571);
+    d = md5_ii(d, a, b, c, x[i+ 3], 10, -1894986606);
+    c = md5_ii(c, d, a, b, x[i+10], 15, -1051523);
+    b = md5_ii(b, c, d, a, x[i+ 1], 21, -2054922799);
+    a = md5_ii(a, b, c, d, x[i+ 8], 6 ,  1873313359);
+    d = md5_ii(d, a, b, c, x[i+15], 10, -30611744);
+    c = md5_ii(c, d, a, b, x[i+ 6], 15, -1560198380);
+    b = md5_ii(b, c, d, a, x[i+13], 21,  1309151649);
+    a = md5_ii(a, b, c, d, x[i+ 4], 6 , -145523070);
+    d = md5_ii(d, a, b, c, x[i+11], 10, -1120210379);
+    c = md5_ii(c, d, a, b, x[i+ 2], 15,  718787259);
+    b = md5_ii(b, c, d, a, x[i+ 9], 21, -343485551);
+
+    a = safe_add(a, olda);
+    b = safe_add(b, oldb);
+    c = safe_add(c, oldc);
+    d = safe_add(d, oldd);
+  }
+  return Array(a, b, c, d);
+
+}
+
+/*
+ * These functions implement the four basic operations the algorithm uses.
+ */
+function md5_cmn(q, a, b, x, s, t)
+{
+  return safe_add(bit_rol(safe_add(safe_add(a, q), safe_add(x, t)), s),b);
+}
+function md5_ff(a, b, c, d, x, s, t)
+{
+  return md5_cmn((b & c) | ((~b) & d), a, b, x, s, t);
+}
+function md5_gg(a, b, c, d, x, s, t)
+{
+  return md5_cmn((b & d) | (c & (~d)), a, b, x, s, t);
+}
+function md5_hh(a, b, c, d, x, s, t)
+{
+  return md5_cmn(b ^ c ^ d, a, b, x, s, t);
+}
+function md5_ii(a, b, c, d, x, s, t)
+{
+  return md5_cmn(c ^ (b | (~d)), a, b, x, s, t);
+}
+
+/*
+ * Calculate the HMAC-MD5, of a key and some data
+ */
+function core_hmac_md5(key, data)
+{
+  var bkey = str2binl(key);
+  if(bkey.length > 16) bkey = core_md5(bkey, key.length * chrsz);
+
+  var ipad = Array(16), opad = Array(16);
+  for(var i = 0; i < 16; i++)
+  {
+    ipad[i] = bkey[i] ^ 0x36363636;
+    opad[i] = bkey[i] ^ 0x5C5C5C5C;
+  }
+
+  var hash = core_md5(ipad.concat(str2binl(data)), 512 + data.length * chrsz);
+  return core_md5(opad.concat(hash), 512 + 128);
+}
+
+/*
+ * Add integers, wrapping at 2^32. This uses 16-bit operations internally
+ * to work around bugs in some JS interpreters.
+ */
+function safe_add(x, y)
+{
+  var lsw = (x & 0xFFFF) + (y & 0xFFFF);
+  var msw = (x >> 16) + (y >> 16) + (lsw >> 16);
+  return (msw << 16) | (lsw & 0xFFFF);
+}
+
+/*
+ * Bitwise rotate a 32-bit number to the left.
+ */
+function bit_rol(num, cnt)
+{
+  return (num << cnt) | (num >>> (32 - cnt));
+}
+
+/*
+ * Convert a string to an array of little-endian words
+ * If chrsz is ASCII, characters >255 have their hi-byte silently ignored.
+ */
+function str2binl(str)
+{
+  var bin = Array();
+  var mask = (1 << chrsz) - 1;
+  for(var i = 0; i < str.length * chrsz; i += chrsz)
+    bin[i>>5] |= (str.charCodeAt(i / chrsz) & mask) << (i%32);
+  return bin;
+}
+
+/*
+ * Convert an array of little-endian words to a string
+ */
+function binl2str(bin)
+{
+  var str = "";
+  var mask = (1 << chrsz) - 1;
+  for(var i = 0; i < bin.length * 32; i += chrsz)
+    str += String.fromCharCode((bin[i>>5] >>> (i % 32)) & mask);
+  return str;
+}
+
+/*
+ * Convert an array of little-endian words to a hex string.
+ */
+function binl2hex(binarray)
+{
+  var hex_tab = hexcase ? "0123456789ABCDEF" : "0123456789abcdef";
+  var str = "";
+  for(var i = 0; i < binarray.length * 4; i++)
+  {
+    str += hex_tab.charAt((binarray[i>>2] >> ((i%4)*8+4)) & 0xF) +
+           hex_tab.charAt((binarray[i>>2] >> ((i%4)*8  )) & 0xF);
+  }
+  return str;
+}
+
+/*
+ * Convert an array of little-endian words to a base-64 string
+ */
+function binl2b64(binarray)
+{
+  var tab = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
+  var str = "";
+  for(var i = 0; i < binarray.length * 4; i += 3)
+  {
+    var triplet = (((binarray[i   >> 2] >> 8 * ( i   %4)) & 0xFF) << 16)
+                | (((binarray[i+1 >> 2] >> 8 * ((i+1)%4)) & 0xFF) << 8 )
+                |  ((binarray[i+2 >> 2] >> 8 * ((i+2)%4)) & 0xFF);
+    for(var j = 0; j < 4; j++)
+    {
+      if(i * 8 + j * 6 > binarray.length * 32) str += b64pad;
+      else str += tab.charAt((triplet >> 6*(3-j)) & 0x3F);
+    }
+  }
+  return str;
+}

+ 155 - 0
modules/app_java/doc/webhelp/oxygen-webhelp/resources/js/quick_search.js

@@ -0,0 +1,155 @@
+(function($, window, document, undefined) {
+	$.fn.quicksearch = function (target, opt) {
+		
+		var timeout, cache, rowcache, jq_results, val = '', e = this, options = $.extend({ 
+			delay: 10,
+			selector: null,
+			stripeRows: null,
+			loader: null,
+			noResults: '',
+			bind: 'keyup',
+			onBefore: function () { 
+				return;
+			},
+			onAfter: function () { 
+				return;
+			},
+			show: function () {
+				this.style.display = "";
+			},
+			hide: function () {
+				this.style.display = "none";
+			},
+			prepareQuery: function (val) {
+				return val.toLowerCase().split(' ');
+			},
+			testQuery: function (query, txt, _row) {
+				for (var i = 0; i < query.length; i += 1) {
+					if (txt.indexOf(query[i]) === -1) {
+						return false;
+					}
+				}
+				return true;
+			}
+		}, opt);
+		var oldVal='';
+		this.go = function () {
+			
+			var i = 0, 
+			noresults = true, 
+			query = options.prepareQuery(val),
+			val_empty = (val.replace(' ', '').length === 0);
+			
+			if (val != oldVal){
+				oldVal=val;
+			
+			for (var i = 0, len = rowcache.length; i < len; i++) {
+				if (val_empty || options.testQuery(query, cache[i], rowcache[i])) {
+					options.show.apply(rowcache[i]);
+					noresults = false;
+				} else {
+					options.hide.apply(rowcache[i]);
+				}
+			}
+			
+			if (noresults) {
+				this.results(false);
+			} else {
+				this.results(true);
+				this.stripe();
+			}
+			
+			this.loader(false);
+			options.onAfter();
+			}
+			return this;
+		};
+		
+		this.stripe = function () {
+			
+			if (typeof options.stripeRows === "object" && options.stripeRows !== null)
+			{
+				var joined = options.stripeRows.join(' ');
+				var stripeRows_length = options.stripeRows.length;
+				
+				jq_results.not(':hidden').each(function (i) {
+					$(this).removeClass(joined).addClass(options.stripeRows[i % stripeRows_length]);
+				});
+			}
+			
+			return this;
+		};
+		
+		this.strip_html = function (input) {
+			var output = input.replace(new RegExp('<[^<]+\>', 'g'), "");
+			output = $.trim(output.toLowerCase());
+			return output;
+		};
+		
+		this.results = function (bool) {
+			if (typeof options.noResults === "string" && options.noResults !== "") {
+				if (bool) {
+					$(options.noResults).hide();
+				} else {
+					$(options.noResults).show();
+				}
+			}
+			return this;
+		};
+		
+		this.loader = function (bool) {
+			if (typeof options.loader === "string" && options.loader !== "") {
+				 (bool) ? $(options.loader).show() : $(options.loader).hide();
+			}
+			return this;
+		};
+		
+		this.cache = function () {
+			
+			jq_results = $(target);
+			
+			if (typeof options.noResults === "string" && options.noResults !== "") {
+				jq_results = jq_results.not(options.noResults);
+			}
+			
+			var t = (typeof options.selector === "string") ? jq_results.find(options.selector) : $(target).not(options.noResults);
+			cache = t.map(function () {
+				return e.strip_html(this.innerHTML);
+			});
+			
+			rowcache = jq_results.map(function () {
+				return this;
+			});
+			
+			return this.go();
+		};
+		
+		this.trigger = function () {
+			this.loader(true);
+						if (val != oldVal){
+			options.onBefore();
+			}
+			
+			window.clearTimeout(timeout);
+			timeout = window.setTimeout(function () {
+				e.go();
+			}, options.delay);
+			
+			return this;
+		};
+		
+		this.cache();
+		this.results(true);
+		this.stripe();
+		this.loader(false);
+		
+		return this.each(function () {
+			$(this).bind(options.bind, function () {
+				val = $(this).val();
+				e.trigger();
+			});
+		});
+		
+	};
+
+}(jQuery, this, document));

+ 79 - 0
modules/app_java/doc/webhelp/oxygen-webhelp/resources/js/rate_article.js

@@ -0,0 +1,79 @@
+/**
+ * Reads a cookie 
+ *
+ * @param a the cookie name.
+ * @return b the cookie value of the 'a' cookie.
+ */
+function readCookie(a) {
+  var b = "";
+  a = a + "=";
+  if(document.cookie.length > 0) {
+    offset = document.cookie.indexOf(a);
+    if(offset != -1) {
+      offset += a.length;
+      end = document.cookie.indexOf(";", offset);
+      if(end == -1)end = document.cookie.length;
+      b = unescape(document.cookie.substring(offset, end))
+    }
+  }return b
+}
+
+/**
+ * Write in a cookie the rate star value 
+ *
+ * @param a the cookie name.
+ * @param b the cookie value of the 'a' cookie.
+ * @param d the cookie expiration time.
+ */
+function writeStar(a, b, d, f) {document.cookie = a + "=" + b + "; path = " + f; }
+
+/**
+ * Set the rate (how many stars and the title description) and shows the feedback textarea  
+ *
+ * @param star - how many stars the user selected.
+ * @param title - the selected stars description: e.g. 'Somewhat helpful'.
+ */
+function setRate(star, title){
+  var x = document.getElementsByTagName('a');
+  // set cookie
+  writeStar('rateUGO2', star + ' -> ' + title,1440 ,'');
+  for (i = 0; i < x.length; i++) {
+    if (x[i].className.match('show_star')) {      
+      x[i].className = "";
+    }          
+  }
+  document.getElementById('rate_comment').className = 'show';
+  document.getElementById(star).className = 'show_star';
+}
+
+$(function() {
+  $('textarea#feedback').focus(function(){
+    $(this).css({backgroundColor:"#fff"});
+  });
+  $('textarea#feedback').blur(function(){
+    $(this).css({backgroundColor:"#fff"});
+  });
+
+  $(".button").click(function() {
+		// process form
+		var feedback = $("textarea#feedback").val();
+		var dataString = '&feedback=' + feedback + '&page=' + window.location.href+ '&star=' + readCookie('rateUGO2');
+		var pageRateFile = ratingFile;
+		$.ajax({
+      type: "POST",
+      url: pageRateFile,
+      data: dataString,
+      success: function() {
+        $('div#rate_stars').css({display:"none"});
+        $('#rate_comment').html("<div class='rate_response'>Thank you for your feedback!</div>");
+        $('#rate_response').html("")
+        .hide()
+        .fadeIn(1000, function() {
+          $('#message').append("<img id='checkmark' src='../img/check.png' />");
+        });
+      }
+     });
+    return false;
+	});
+});
+

+ 199 - 0
modules/app_java/doc/webhelp/oxygen-webhelp/resources/js/webhelp.js

@@ -0,0 +1,199 @@
+var tree = "tree";
+
+/**
+ * Marks a link as being selected. 
+ *
+ * @param parentID the ID of the LI containing the link.
+ */
+function selectLink(parentID){
+    // Clear all the classes from the a elements, and selects the target.
+    var aElements = parent.tocwin.document.getElementById(tree).getElementsByTagName("a");
+    var j = 0;
+    for (j = 0; j < aElements.length; j++){
+      if(aElements[j].parentNode.id == parentID){
+        // Selected.
+        aElements[j].className='selected';
+      } else {
+        // Unselected.
+        aElements[j].className='';
+      }
+    }    
+}
+
+/**
+ * Expands and selects a specified topic.
+ *
+ * @param referringTopicURL The URL of the referring topic, as string.
+ * @param href The relative location of the target.
+ */
+function expandToTopic(referringTopicURL, href) {
+  var targetAbsoluteURL = makeAbsolute(href);
+  var targetAbsoluteURLArray = new Array();  
+  var target;
+  targetAbsoluteURLArray = targetAbsoluteURL.split("#");
+  target = targetAbsoluteURLArray[0].replace("../", "");
+  var idsToExpand = findIds(target);
+  var toc = parent.tocwin.document;
+  
+   $(function(){
+       if (idsToExpand != ''){
+             $("#tree").dynatree("getTree").getNodeByKey(idsToExpand).focus();
+       }
+    });
+}
+
+function getParent(url){
+  var str = "" + url;
+   // Removes the last component from the path.
+   url = url.substring(0, url.lastIndexOf('/'));
+   return url;
+}
+
+/*
+Finds all ids of parent elements of "a"'s having their hrefs ending in the target.
+*/
+function findIds(targetAbsoluteURL) {
+  var returnedArray = new Array();
+  var windowLocation = getParent(parent.tocwin.location.href);
+  var toc = parent.tocwin.document.getElementById('tree');
+  var aElements = toc.getElementsByTagName("a");
+  var nr = aElements.length;
+  var k = 0;
+  for (var i = 0; i < nr; i++) {
+     var linkURL = makeAbsolute(windowLocation + '/' + aElements[i].getAttribute("href"));
+     if (linkURL.match(targetAbsoluteURL)) {
+            returnedArray[k] = aElements[i].id;
+            k++;
+      }
+    }
+  return returnedArray;
+}
+
+/**
+*  Makes absolute the input URL by stripping the .. constructs.
+*/
+function makeAbsolute(inputURL) {
+  var url = inputURL;
+  // matches a foo/../ expression
+  var reParent = /[\-\w]+\/\.\.\//;
+  
+  // reduce all 'xyz/../' to just ''
+  while (reParent.test(url)) {
+    url = url.replace(reParent, "");
+  }
+  
+  return url;
+}
+
+/**
+ * Opens a page (topic) file and highlights a word from it.
+ */
+function openAndHighlight(page, words, linkName){
+    var links = document.getElementsByTagName('a');
+    for (var i = 0 ; i < links.length ; i++){
+        if (links[i].id == linkName ){
+            document.getElementById(linkName).className = 'otherLink';
+        } else if (links[i].id.startsWith('foundLink')) {
+            document.getElementById(links[i].id).className = 'foundResult';
+        }
+    }
+    
+	parent.termsToHighlight = words;
+	parent.frames['contentwin'].location = page;	
+}
+
+/**
+ * Hide and show div-s
+ */
+ 
+function showMenu(displayTab){
+    parent.termsToHighlight = Array();
+    var contentLinkText = getLocalization("Content");
+    var searchLinkText = getLocalization("Search");
+    var indexLinkText = getLocalization("Index");
+    var tabs = document.getElementById('tocMenu').getElementsByTagName("div");
+    for (var i = 0 ; i < tabs.length; i++){
+        var currentTabId = tabs[i].id;
+        // generates menu tabs        
+        document.getElementById(currentTabId).innerHTML = '<span onclick="showMenu(\'' + currentTabId + '\')">' + eval(currentTabId + "LinkText") + '</span>';
+        
+        // show selected block
+        selectedBlock = displayTab + "Block";
+        if (currentTabId == displayTab){
+            document.getElementById(selectedBlock).style.display = "block";
+            $('#' + currentTabId).addClass('selected');
+        } else  {
+            document.getElementById(currentTabId + 'Block').style.display = "none";
+            $('#' + currentTabId).removeClass('selected');
+         }   
+    }
+	if (displayTab == 'content') {
+        var pathPrefix = parent.location.pathname;
+        var expandPage = getHTMLPage2Expand(parent.contentwin.location.pathname);
+        if(expandPage){
+            expandPage = expandPage.replace(pathPrefix, "");
+            expandToTopic(window.location.href, expandPage);
+        }
+    }
+   
+    if (displayTab == 'search') {
+        $('.textToSearch').focus();
+    }
+    if (displayTab == 'index') {
+        $('#id_search').focus();
+    }
+  //  $('*', window.parent.contentwin.document).unhighlight();
+} 
+
+ 
+function hideDiv(hiddenDiv,showedDiv){   
+    parent.termsToHighlight = Array();
+    document.getElementById(hiddenDiv).style.display = "none";
+    document.getElementById(showedDiv).style.display = "block";
+    var contentLinkText = getLocalization("Content");
+    var searchLinkText = getLocalization("Search");
+    
+	if (hiddenDiv == 'searchDiv') {
+		document.getElementById('divContent').innerHTML = '<font class="normalLink">' + contentLinkText + '</font>';
+		document.getElementById('divSearch').innerHTML = '<a href="javascript:void(0);" class="activeLink" id="searchLink" onclick="hideDiv(\'displayContentDiv\',\'searchDiv\')">' + searchLinkText + '</a>';
+        var pathPrefix = parent.location.pathname;
+        var expandPage = getHTMLPage2Expand(parent.contentwin.location.pathname);
+        expandPage = expandPage.replace(pathPrefix, "");
+        expandToTopic(window.location.href, expandPage);
+    } else {
+		document.getElementById('divContent').innerHTML = '<a href="javascript:void(0);" class="activeLink" id="contentLink" onclick="hideDiv(\'searchDiv\',\'displayContentDiv\')">' + contentLinkText + '</a>';
+		document.getElementById('divSearch').innerHTML = '<font class="normalLink">' + searchLinkText + '</font>';
+	}
+    
+  //  $('*', window.parent.contentwin.document).unhighlight();
+}
+
+/**
+ *  Get the localized string for the specified key.
+ */
+function getLocalization(localizationKey) {
+	if (localization[localizationKey]){
+		return localization[localizationKey];
+	}else{
+		return localizationKey;
+	}
+}
+
+
+    function getHTMLPage2Expand(url){
+        currentPage =url;
+    if(typeof url != 'undefined'){
+      var page = url.substr(1);
+      //var page = url;
+      currentPage = page;
+      page = parent.location.search.substr(1).split("&");
+      for (x in page) {
+        var q;
+        q = page[x].split("=");;
+        if(q[0] == 'q'){
+         currentPage = q[1];
+        }
+      }
+      }
+      return currentPage;
+    }

+ 182 - 0
modules/app_java/doc/webhelp/oxygen-webhelp/resources/localization/strings.js

@@ -0,0 +1,182 @@
+var localization = new Array();
+
+localization["label.shareFrom"]="If you already have an user account for any of the following products, you can use that account to login.";
+localization["label.unconfirmedUsers"]="Unconfirmed Users";
+localization["label.cleanUsers"]="Clean Users";
+localization["label.tc.userName"]="User";
+localization["label.tc.name"]="Name";
+localization["label.tc.email"]="E-mail";
+localization["label.invertSel"]="Invert Selection";
+localization["label.invalidPosts"]="Invalid pages for posts";
+localization["label.cleanComments"]="Clean Comments";
+localization["label.fbUnavailable"]="The feedback system is disabled! Please contact the WebHelp system administrator";
+localization["label.removeInst"]="The folder containing the installation scripts must be removed after the installation is complete!";
+localization["label.plsRemoveInstall"]="Please contact system administrator to finalize the webhelp installation by removing the installation folder!";
+localization["configInvalid"]="Invalid config File - run install first!";
+localization["Content"]="Content";
+localization["Search"]="Search";
+localization["Index"]="Index";
+localization["Keywords"]="Keywords";
+localization["Loading, please wait ..."]="Loading, please wait ...";
+localization["Search no results"]="Your search returned no results for";
+localization["Results for:"]="Results for:";
+localization["There is no page containing all the search terms."]="There is no page containing all the search terms.";
+localization["Partial results:"]="Partial results:";
+localization["Output generated by"]="WebHelp output generated by";
+localization["You must enter at least one character."]="You must enter at least one character.";
+localization["Only first 10 words will be processed."]="Only first 10 words will be processed.";
+localization["Your browser is not supported. Use of Mozilla Firefox is recommended."]="Your browser is not supported. Use of Mozilla Firefox is recommended.";
+localization["label.currentPwd"]="Current Password";
+localization["label.Unsaved"]="You have unsaved data";
+localization["label.captcha"]="Enter the captcha code seen below:";
+localization["label.welcome"]="Welcome";
+localization["label.close"]="Close";
+localization["label.cancel"]="Cancel";
+localization["label.logAdmin"]="Log in as 'Moderator' user";
+localization["label.guest"]="Guest";
+localization["label.admin"]="Administrator";
+localization["label.admin.title"]="Administrative Page";
+localization["label.moderator"]="Moderator";
+localization["label.user"]="User";
+localization["label.userProfile"]="User Profile";
+localization["label.yourName"]="Your Name";
+localization["label.yourEmail"]="Your email address";
+localization["label.IwantEmail"]="I want to receive an email when";
+localization["label.commentPage"]="a comment is left on a page that I commented on";
+localization["label.commentTopic"]="a comment is left on any topic in the Help system";
+localization["label.commentMy"]="a reply is left to one of my comments";
+localization["label.apply"]="Apply Changes";
+localization["label.newPwd"]="New Password";
+localization["label.reNewPwd"]="Retype New Password";
+localization["label.chPwd"]="Change Password";
+localization["label.comments"]="Comments";
+localization["label.login"]="Log in";
+localization["label.edit"]="Edit";
+localization["label.logOff"]="Log Off";
+localization["label.approveAll"]="Approve All";
+localization["label.yes"]="Yes";
+localization["label.no"]="No";
+localization["label.addNewCmt"]="Add New Comment";
+localization["label.plsWait"]="Please Wait ...";
+localization["label.plsWaitChProfile"]="Loading User Profile ...";
+localization["label.plsWaitRecover"]="Recovering Password ...";
+localization["label.plsWaitSignUp"]="Signing you up ...";
+localization["label.plsWaitUpProfile"]="Updating Your Profile ...";
+localization["label.plsWaitUpPaswd"]="Updating your Password ...";
+localization["label.plsWaitCmts"]="Loading Comments ...";
+localization["label.plsWaitAuth"]="Verifying User ...";
+localization["label.insertCmt"]="Insert Comment";
+localization["label.submit"]="Submit";
+localization["label.userName"]="User name";
+localization["label.pswd"]="Password";
+localization["label.lostPswd"]="Lost Password";
+localization["label.signUp"]="Sign Up";
+localization["label.signUp_userName"]="Choose a user name";
+localization["label.signUp_email"]="Your Email Address";
+localization["label.signUp_name"]="Your Name";
+localization["label.signUp_password"]="Password";
+localization["label.signUp_rPassword"]="Retype Password";
+localization["label.recoverPwd"]="Recover Password";
+localization["label.recoverEmail"]="Your Email Address";
+localization["label.recoverUser"]="Your User Name";
+localization["label.bt_recover"]="Reset Password";
+localization["label.question"]="Are you sure you want to delete this message?";
+localization["label.adminPanel"]="Admin Panel";
+localization["label.changesNotApplied"]="Changes were not applied!";
+localization["label.search.user"]="Search User Information";
+localization["label.editUser"]="Edit User";
+localization["label.updateUser"]="Update User";
+localization["label.created"]="Created";
+localization["label.validated"]="Validated";
+localization["label.suspendend"]="Suspended";
+localization["label.back"]="Back";
+localization["label.setVersion"]="Set Version";
+localization["label.export"]="Export Comments";
+localization["label.confirm.bt"]="Confirm";
+localization["label.selection"]="Selected Product / Version";
+localization["label.version"]="Comments Version";
+localization["label.versionInfo"]="The comments are visible starting from version:";
+localization["label.rememberme"]="Remember me on this computer";
+localization["label.viewAllPosts"]="View All Posts";
+localization["label.allPosts"]="All Posts";
+localization["label.forView"]="Select Product and Version to View Comments";
+localization["label.forExport"]="Select Product and Version to Export Comments";
+localization["label.product"]="Product";
+localization["label.confirmGo"]="OK";
+localization["delete"]="Delete";
+localization["checkUser.1"]="Anonymous user does not validate please contact system administrator!";
+localization["checkUser.2"]="";
+localization["checkUser.3"]="";
+localization["checkUser.4"]="";
+localization["checkUser.loginError"]="Log in fail!";
+localization["info.noComments"]="There are no comments!";
+localization["invalidCode"]="Please insert the specified captcha code";
+localization["pwd.invalid"]="Invalid password";
+localization["pwd.repeat"]="Please insert the same password!";
+localization["pwd.empty"]="Please insert a minimum 5 characters password!";
+localization["label.comments"]="Comments";
+localization["checkEmail-signUp"]="Please check your e-mail and validate your registration!";
+localization["checkEmail-recover"]="Please check your e-mail for recovered password!";
+localization["recoveryConfirmation"]="Your new password has been generated, please check your e-mail";
+localization["editPost"]="Edit Comment";
+localization["newPost"]="Insert Comment";
+localization["admin"]="Administrator";
+localization["moderator"]="Moderator";
+localization["user"]="User";
+localization["created"]="Created";
+localization["validated"]="Validated";
+localization["suspended"]="Suspended";
+localization["label.back"]="Back";
+localization["label.admin"]="Admin";
+localization["label.adminComments"]="Comments";
+localization["label.adminUsers"]="Users";
+localization["logAdmin"]="Please authenticate with moderator credentials!";
+localization["approveAllConfirmation"]="Approve all comments?";
+localization["signUp.confirmOk"]="Confirmation successful!";
+localization["signUp.invalidPswd"]="Invalid password supplied !";
+localization["signUp.confirmUsr"]="User creation was successful confirmed!";
+localization["signUp.invalidUsr"]="Invalid user specified to be confirmed!";
+localization["signUp.userConfirmed"]="Your user has been already confirmed!";
+localization["signUp.err.0"]="User creation has succeeded!";
+localization["signUp.err.1"]="Password is too short!";
+localization["signUp.err.2"]="Password contain invalid characters!";
+localization["signUp.err.3"]="Invalid e-mail address!";
+localization["signUp.err.4"]="User name is already taken!";
+localization["signUp.err.5"]="Email is already in the database!";
+localization["signUp.err.6"]="Please insert a valid user name!";
+localization["signUp.err.6.info"]="User name must contain only alphanumeric characters without spaces and it must be at least 5 character long";
+localization["signUp.err.9"]="Invalid Sign Up data!";
+localization["signUp.err.10"]="User can not be created!";
+localization["pwd.tooShort"]="Password must be at least 5 characters long!";
+localization["admin.name.label"]="Name";
+localization["admin.status.label"]="Status";
+localization["admin.email.label"]="E-Mail";
+localization["admin.userName.label"]="User Name";
+localization["admin.level.label"]="Level";
+localization["admin.company.label"]="Company";
+localization["admin.date.label"]="Date";
+localization["admin.notifyPage.label"]="Page Notification";
+localization["admin.notifyAll.label"]="Web Help Notification";
+localization["admin.notifyReply.label"]="Reply Notification";
+localization["inst.deploymentSett"]="Deployment Settings";
+localization["inst.overConfig"]="Overwrite Configuration File ?";
+localization["inst.title"]="WebHelp Installer";
+localization["inst.url"]="Deployment URL";
+localization["inst.email"]="WebHelp E-mail from";
+localization["inst.errors"]="Send Errors to System Administrator";
+localization["inst.adminEmail"]="System Administrator E-mail";
+localization["inst.isModerated"]="Comment system is moderated?";
+localization["inst.sesLife"]="Client Session lifetime (sec)";
+localization["inst.isAnonymous"]="Is Anonymous post enable?";
+localization["inst.dbSettings"]="Database Settings";
+localization["inst.dbtype"]="Database Server Type";
+localization["inst.dbCreate"]="Create new database ?";
+localization["inst.dbHost"]="Database Host Name";
+localization["inst.dbName"]="Database Name";
+localization["inst.dbUser"]="Database User Name";
+localization["inst.dbPass"]="Database User Password";
+localization["inst.initSett"]="Initial Settings";
+localization["inst.adminPass"]="Administrator Password";
+localization["inst.adminPass2"]="Confirm Administrator Password";
+localization["inst.start"]="Start Installation";
+localization["inst.nextStep"]="Next Step";

+ 80 - 0
modules/app_java/doc/webhelp/oxygen-webhelp/resources/localization/strings.php

@@ -0,0 +1,80 @@
+<?php
+$translate = array();
+
+$translate["label.userProfile"]="User Profile";
+$translate["label.bt_recover"]="Reset Password";
+$translate["delete"]="Delete";
+$translate["info.noComments"]="There are no comments!";
+$translate["signUp.confirmOk"]="Confirmation successful!";
+$translate["signUp.invalidPswd"]="Invalid password supplied !";
+$translate["signUp.confirmUsr"]="User creation was successful confirmed!";
+$translate["signUp.invalidUsr"]="Invalid user specified to be confirmed!";
+$translate["signUp.userConfirmed"]="Your user has been already confirmed!";
+$translate["msg.secureOldPass"]="Please confirm profile update with the current password";
+$translate["productsListTitle"]="Products";
+$translate["versionsListTitle"]="Versions";
+$translate["unavailableTextTillApproved"]="Text is unavailable until post is approved";
+$translate["signUpEmailSubject"]="Sign Up Confirmation";
+$translate["signUpLoginConfirmation"]="Your user has been verified!";
+$translate["RecoveredEmailSubject"]="Password Recovered";
+$translate["RecoverConfirmationEmailSubject"]="Password Recovery Confirmation";
+$translate["newCommentAdded"]="Comment Added";
+$translate["newCommentToModerate"]="Comment To Moderate";
+$translate["newUnmoderatedCommentAdded"]="Non moderated Comment";
+$translate["newCommentApproved"]="Comment Posted";
+$translate["pwd.invalid"]="Password contains invalid characters!";
+$translate["email.duplicate"]="This email is already registered our database!";
+$translate["username.duplicate"]="This user name is already taken!";
+$translate["pwd.tooShort"]="Password must be at least 5 characters long!";
+$translate["input.invalid"]="You have inserted invalid date for:";
+$translate["email.user.not.match"]="User and email address does not match any user name in out database!";
+$translate["user.name.label"]="Your Name";
+$translate["user.status.label"]="Status";
+$translate["user.email.label"]="Your E-Mail";
+$translate["user.userName.label"]="";
+$translate["user.level.label"]="";
+$translate["user.company.label"]="";
+$translate["user.date.label"]="";
+$translate["user.notifyPage.label"]="Page Notification";
+$translate["user.notifyAll.label"]="Web Help Notification";
+$translate["user.notifyReply.label"]="Reply Notification";
+$translate["user.action.label"]="Edit";
+$translate["admin.name.label"]="Name";
+$translate["admin.status.label"]="Status";
+$translate["admin.email.label"]="E-Mail";
+$translate["admin.userName.label"]="User Name";
+$translate["admin.level.label"]="Level";
+$translate["admin.company.label"]="Company";
+$translate["admin.date.label"]="Date";
+$translate["admin.notifyPage.label"]="Page Notification";
+$translate["admin.notifyAll.label"]="Web Help Notification";
+$translate["admin.notifyReply.label"]="Reply Notification";
+$translate["admin.action.label"]="Action";
+$translate["comment.moderate.info"]="Post waiting for approval.";
+$translate["approved"]="Approved";
+$translate["new"]="New";
+$translate["suspended"]="Suspended";
+$translate["rejected"]="Rejected";
+$translate["approve"]="Approve";
+$translate["edit"]="Edit";
+$translate["selected"]="Selected";
+$translate["suspend"]="Suspend";
+$translate["reply"]="Reply";
+$translate["noEmailFound"]="Your specified E-mail does not match any user!";
+$translate["noEmailSpecified"]="You did not specified any email address!";
+$translate["passwordChanged"]="Your new password was generated! You will receive it in an e-mail shortly!";
+$translate["confirmationRequired"]="Your password generation must be confirmed, please check your E-mail!";
+$translate["label.tc.commentId"]="Id";
+$translate["label.tc.text"]="Text";
+$translate["label.tc.userId"]="User";
+$translate["label.tc.referedComment"]="Ref. Comment";
+$translate["label.tc.date"]="Date";
+$translate["label.tc.state"]="State";
+$translate["label.tc.page"]="Page";
+$translate["label.tc.product"]="Product";
+$translate["label.tc.version"]="Version";
+$translate["label.tc.visible"]="Visible";
+$translate["err.notLoggedIn"]="User must be authenticated, in order to execute this operation";
+
+global $translate;
+?>

+ 1 - 0
modules/app_java/doc/webhelp/oxygen-webhelp/search/default.props

@@ -0,0 +1 @@
+DEF01=a

+ 45 - 0
modules/app_java/doc/webhelp/oxygen-webhelp/search/en-us.props

@@ -0,0 +1,45 @@
+DEF01=this
+DEF02=is
+DEF03=the
+DEF04=in
+DEF05=i
+DEF06=on
+DEF07=a
+DEF08=about
+DEF09=an
+DEF10=are
+DEF11=as
+DEF12=at
+DEF13=be
+DEF14=by
+DEF15=com
+DEF16=de
+DEF17=en
+DEF18=for
+DEF19=from
+DEF20=how
+DEF21=it
+DEF22=la
+DEF23=of
+DEF24=on
+DEF25=or
+DEF26=that
+DEF27=to
+DEF28=was
+DEF29=what
+DEF30=when
+DEF31=where
+DEF32=who
+DEF33=will
+DEF34=with
+DEF35=und
+DEF36=Next
+DEF37=Prev
+DEF38=Home
+DEF39=Motive
+DEF40=Inc
+DEF41=Copyright
+DEF42=All
+DEF43=rights
+DEF44=reserved
+DEF45=Up

+ 179 - 0
modules/app_java/doc/webhelp/oxygen-webhelp/search/es-es.props

@@ -0,0 +1,179 @@
+DEF01=un
+DEF02=una
+DEF03=unas
+DEF04=unos
+DEF05=uno
+DEF06=sobre
+DEF07=todo
+DEF08=también
+DEF09=tras
+DEF10=otro
+DEF11=algún
+DEF12=alguno
+DEF13=alguna
+DEF14=algunos
+DEF15=algunas
+DEF16=ser
+DEF17=es
+DEF18=soy
+DEF19=eres
+DEF20=somos
+DEF21=sois
+DEF22=estoy
+DEF23=esta
+DEF24=estamos
+DEF25=estais
+DEF26=estan
+DEF27=como
+DEF28=en
+DEF29=para
+DEF30=atras
+DEF31=porque
+DEF32=por 
+DEF33=estado
+DEF34=estaba
+DEF35=ante
+DEF36=antes
+DEF37=siendo
+DEF38=ambos
+DEF39=pero
+DEF40=por
+DEF41=poder
+DEF42=puede
+DEF43=puedo
+DEF44=podemos
+DEF45=podeis
+DEF46=pueden
+DEF47=fui
+DEF48=fue
+DEF49=fuimos
+DEF50=fueron
+DEF51=hacer
+DEF52=hago
+DEF53=hace
+DEF54=hacemos
+DEF55=haceis
+DEF56=hacen
+DEF57=cada
+DEF58=fin
+DEF59=incluso
+DEF60=primero
+DEF61=desde
+DEF62=conseguir
+DEF63=consigo
+DEF64=consigue
+DEF65=consigues
+DEF66=conseguimos
+DEF67=consiguen
+DEF68=ir
+DEF69=voy
+DEF70=va
+DEF71=vamos
+DEF72=vais
+DEF73=van
+DEF74=vaya
+DEF75=gueno
+DEF76=ha
+DEF77=tener
+DEF78=tengo
+DEF79=tiene
+DEF80=tenemos
+DEF81=teneis
+DEF82=tienen
+DEF83=el
+DEF84=la
+DEF85=lo
+DEF86=las
+DEF87=los
+DEF88=su
+DEF89=aqui
+DEF90=mio
+DEF91=tuyo
+DEF92=ellos
+DEF93=ellas
+DEF94=nos
+DEF95=nosotros
+DEF96=vosotros
+DEF97=vosotras
+DEF98=si
+DEF99=dentro
+DEF100=solo
+DEF101=solamente
+DEF102=saber
+DEF103=sabes
+DEF104=sabe
+DEF105=sabemos
+DEF106=sabeis
+DEF107=saben
+DEF108=ultimo
+DEF109=largo
+DEF110=bastante
+DEF111=haces
+DEF112=muchos
+DEF113=aquellos
+DEF114=aquellas
+DEF115=sus
+DEF116=entonces
+DEF117=tiempo
+DEF118=verdad
+DEF119=verdadero
+DEF120=verdadera
+DEF121=cierto
+DEF122=ciertos
+DEF123=cierta
+DEF124=ciertas
+DEF125=intentar
+DEF126=intento
+DEF127=intenta
+DEF128=intentas
+DEF129=intentamos
+DEF130=intentais
+DEF131=intentan
+DEF132=dos
+DEF133=bajo
+DEF134=arriba
+DEF135=encima
+DEF136=usar
+DEF137=uso
+DEF138=usas
+DEF139=usa
+DEF140=usamos
+DEF141=usais
+DEF142=usan
+DEF143=emplear
+DEF144=empleo
+DEF145=empleas
+DEF146=emplean
+DEF147=ampleamos
+DEF148=empleais
+DEF149=valor
+DEF150=muy
+DEF151=era
+DEF152=eras
+DEF153=eramos
+DEF154=eran
+DEF155=modo
+DEF156=bien
+DEF157=cual
+DEF158=cuando
+DEF159=donde
+DEF160=mientras
+DEF161=quien
+DEF162=con
+DEF163=entre
+DEF164=sin
+DEF165=trabajo
+DEF166=trabajar
+DEF167=trabajas
+DEF168=trabaja
+DEF169=trabajamos
+DEF170=trabajais
+DEF171=trabajan
+DEF172=podria
+DEF173=podrias
+DEF174=podriamos
+DEF175=podrian
+DEF176=podriais
+DEF177=yo
+DEF178=aquel
+DEF179=qué

+ 8 - 0
modules/app_java/doc/webhelp/oxygen-webhelp/search/htmlFileInfoList.js

@@ -0,0 +1,8 @@
+fil = new Array();
+fil["0"]="ch01.html@@@Chapter 1. Admin Guide@@@null";
+fil["1"]="ch01s02.html@@@Dependencies@@@null";
+fil["2"]="ch01s03.html@@@Java runtime@@@null";
+fil["3"]="ch01s04.html@@@Parameters@@@null";
+fil["4"]="ch01s05.html@@@Functions@@@null";
+fil["5"]="ch01s06.html@@@Java Module API@@@null";
+fil["6"]="oxygen-main.html@@@Chapter 1. Admin Guide@@@null";

+ 10 - 0
modules/app_java/doc/webhelp/oxygen-webhelp/search/htmlFileList.js

@@ -0,0 +1,10 @@
+//List of files which are indexed.
+fl = new Array();
+fl["0"]= "ch01.html";
+fl["1"]= "ch01s02.html";
+fl["2"]= "ch01s03.html";
+fl["3"]= "ch01s04.html";
+fl["4"]= "ch01s05.html";
+fl["5"]= "ch01s06.html";
+fl["6"]= "oxygen-main.html";
+var doStem = false

+ 138 - 0
modules/app_java/doc/webhelp/oxygen-webhelp/search/index-1.js

@@ -0,0 +1,138 @@
+var indexerLanguage="en";
+//Auto generated index for searching.
+w["$mb"]="4*4";
+w["$ml"]="4*4";
+w["-djava"]="3*5";
+w["-djava.class.path"]="3*6";
+w["-djava.compiler"]="3*5";
+w["-verbose"]="3*2";
+w["-verbose:gc"]="3*2";
+w["-xdebug"]="3*1";
+w["."]="0*2,1*3,2*1,3*2,4*6,5*1,6*2";
+w["..."]="0*4,3*10,4*172,6*4";
+w["...modparam"]="3*4";
+w[".class"]="1*1";
+w[".jar"]="1*1";
+w[".signature"]="4*1";
+w["0"]="3*1";
+w["0x05"]="4*8";
+w["1"]="3*6,4*17,5*1";
+w["10"]="4*5";
+w["11"]="4*5";
+w["12"]="1*6,4*5";
+w["13"]="4*5";
+w["14"]="4*5";
+w["15"]="4*5";
+w["16"]="4*5";
+w["17"]="4*5";
+w["18"]="4*5";
+w["19"]="4*5";
+w["1:"]="4*1";
+w["2"]="3*5,4*5";
+w["20"]="5*5";
+w["2:"]="4*1";
+w["3"]="3*5";
+w["4"]="3*5";
+w["5"]="3*5,4*9";
+w["6"]="3*5";
+w["7"]="3*5";
+w["8"]="4*5";
+w["9"]="4*5";
+w["above"]="4*8";
+w["access"]="0*1,6*1";
+w["according"]="4*1";
+w["after"]="5*1";
+w["all"]="1*1";
+w["allows"]="0*1,6*1";
+w["ant"]="1*10";
+w["ant-contrib"]="1*3";
+w["ant-gcj"]="1*3";
+w["ant."]="1*1";
+w["apache"]="1*1";
+w["api"]="0*1,4*1,5*47,6*1";
+w["app_java"]="0*1,3*7,4*1,5*2";
+w["app_java."]="5*2";
+w["application"]="3*3";
+w["applications"]="0*1,1*41,6*1";
+w["arrays"]="4*1";
+w["assumes"]="3*3";
+w["author"]="0*1,1*1,2*1,3*1,4*1,5*1,6*1";
+w["b"]="4*3";
+w["base"]="1*1";
+w["based"]="1*2";
+w["before"]="1*2";
+w["between"]="4*1";
+w["bflag"]="4*4";
+w["boolean"]="4*14";
+w["buffer"]="4*4";
+w["build"]="1*2";
+w["but"]="3*1";
+w["byte"]="4*9";
+w["c"]="4*3";
+w["cast"]="4*9";
+w["cause"]="3*1";
+w["chapter 1"]="0*52,1*1,6*47";
+w["chapter 1. admin"]="0*52,1*1,6*47";
+w["char"]="4*1";
+w["character"]="4*1";
+w["chararacter"]="4*1";
+w["child_init"]="3*1,5*1";
+w["child_init_method"]="0*1,3*3,6*1";
+w["children"]="5*1";
+w["class"]="1*1,3*8,4*3,5*1";
+w["class_name"]="0*1,1*3,3*3,6*1";
+w["classes"]="0*1,6*1";
+w["classpath"]="1*2";
+w["classpath."]="1*1";
+w["collection"]="1*1";
+w["colon"]="4*1";
+w["combinations"]="4*1";
+w["common"]="0*1,1*3,4*40,6*1";
+w["comnmand"]="3*1";
+w["compatible"]="1*2";
+w["compiled"]="0*1,1*1,3*2,6*1";
+w["compiler"]="3*5";
+w["config"]="0*1,6*1";
+w["configuration"]="3*15";
+w["constructor"]="5*1";
+w["constructor."]="5*1";
+w["contents"]="0*5,6*5";
+w["contrib"]="1*3";
+w["correct"]="4*1";
+w["count"]="4*2";
+w["count."]="4*1";
+w["d"]="4*2";
+w["debug"]="3*5";
+w["default"]="1*6,3*12";
+w["default-jdk"]="1*3";
+w["default-jre"]="1*3";
+w["dependencies"]="0*1,1*47,6*1";
+w["dependencies "]="2*1";
+w["determine"]="4*3";
+w["dev"]="1*3";
+w["development"]="1*7";
+w["djava.class.path"]="3*3";
+w["djava.compiler"]="3*5";
+w["do"]="4*12,5*2";
+w["docs"]="3*3";
+w["double"]="4*2";
+w["e"]="4*1";
+w["e.g."]="4*1";
+w["either"]="1*1";
+w["embedded"]="3*1";
+w["ends"]="4*1";
+w["environment"]="1*1";
+w["exactly"]="4*1";
+w["example"]="4*12";
+w["examplemethod"]="4*50";
+w["examples"]="4*1";
+w["example 1"]="3*35,4*60,5*5";
+w["example 1.1. set"]="3*5";
+w["example 1.10. signature"]="4*5";
+w["example 1.10. signature:"]="4*5";
+w["example 1.11. signature"]="4*5";
+w["example 1.11. signature:"]="4*5";
+w["example 1.12. signature"]="4*5";
+w["example 1.12. signature:"]="4*5";
+w["example 1.13. signature"]="4*5";
+

+ 137 - 0
modules/app_java/doc/webhelp/oxygen-webhelp/search/index-2.js

@@ -0,0 +1,137 @@
+//Auto generated index for searching.
+w["example 1.13. signature:"]="4*5";
+w["example 1.14. signature"]="4*5";
+w["example 1.14. signature:"]="4*5";
+w["example 1.15. signature"]="4*5";
+w["example 1.15. signature:"]="4*5";
+w["example 1.16. signature"]="4*5";
+w["example 1.16. signature:"]="4*5";
+w["example 1.17. signature"]="4*5";
+w["example 1.17. signature:"]="4*5";
+w["example 1.18. signature"]="4*5";
+w["example 1.18. signature:"]="4*5";
+w["example 1.19. signature"]="4*5";
+w["example 1.19. signature:"]="4*5";
+w["example 1.2. set"]="3*5";
+w["example 1.20. minimal"]="5*5";
+w["example 1.3. set"]="3*5";
+w["example 1.4. set"]="3*5";
+w["example 1.5. set"]="3*5";
+w["example 1.6. set"]="3*5";
+w["example 1.7. set"]="3*5";
+w["example 1.8. signature"]="4*5";
+w["example 1.8. signature:"]="4*5";
+w["example 1.9. signature"]="4*5";
+w["example 1.9. signature:"]="4*5";
+w["executed"]="5*1";
+w["executes"]="4*4";
+w["executing"]="0*1,6*1";
+w["execution"]="3*1";
+w["exporting"]="0*1,6*1";
+w["extends"]="5*1";
+w["external"]="0*1,1*40,6*1";
+w["f"]="4*2";
+w["false"]="4*1";
+w["feature"]="3*1";
+w["file"]="0*1,3*2,6*1";
+w["flags"]="4*4";
+w["flagset"]="4*8";
+w["float"]="4*2";
+w["folder"]="3*3";
+w["followed"]="4*1";
+w["following"]="1*11,4*2";
+w["force_kam_cmd_exec"]="0*1,3*3,6*1";
+w["forces"]="3*1";
+w["forking"]="5*1";
+w["forking."]="5*1";
+w["from"]="0*2,3*1,6*2";
+w["full"]="5*1";
+w["function"]="4*2";
+w["functions"]="0*2,4*47,6*2";
+w["functions "]="5*1";
+w["g"]="4*1";
+w["gc"]="3*2";
+w["gcj"]="1*14";
+w["gcj-jdk"]="1*3";
+w["gcj-jre"]="1*3";
+w["gcj."]="1*1";
+w["generated"]="0*1,1*1,2*1,3*1,4*1,5*1,6*1";
+w["gij"]="1*2";
+w["given"]="4*1";
+w["guide"]="0*52,6*47";
+w["guide "]="1*1";
+w["headers"]="1*1";
+w["hello"]="4*4";
+w["here"]="5*1";
+w["if"]="3*2,4*4";
+w["immediately"]="5*1";
+w["import"]="5*2";
+w["info"]="3*1,4*3";
+w["int"]="0*1,3*40,4*33,5*2,6*1";
+w["integer"]="4*5";
+w["interface"]="0*1,6*1";
+w["invalid"]="4*1";
+w["invalid:"]="4*1";
+w["j"]="4*2";
+w["jar"]="1*1";
+w["java"]="0*5,1*14,2*48,3*25,4*29,5*47,6*5";
+w["java-common"]="1*3";
+w["java:"]="3*6";
+w["java_method_exec"]="0*1,4*48,6*1";
+w["java_options"]="0*1,3*9,6*1";
+w["java_s_method_exec"]="0*1,4*46,6*1";
+w["java_s_staticmethod_exec"]="0*1,4*46,6*1";
+w["java_staticmethod_exec"]="0*1,4*46,6*1";
+w["jdk"]="1*11,2*1";
+w["jni"]="0*2,3*6,6*2";
+w["jre"]="1*6,2*1";
+w["kamailio"]="0*1,1*44,3*39,4*24,5*6,6*1";
+w["kamailio.class"]="3*3";
+w["kamailio.jar"]="3*9";
+w["kamexec"]="3*1";
+w["kit"]="1*2";
+w["l"]="4*3";
+w["lang"]="4*37";
+w["languages"]="3*1";
+w["languages."]="3*1";
+w["launch"]="1*6";
+w["leaks"]="3*1";
+w["li"]="4*1";
+w["lib"]="5*2";
+w["libgcj12"]="1*3";
+w["libgcj13"]="1*3";
+w["libgcj13-dev"]="1*3";
+w["libraries"]="0*1,1*47,6*1";
+w["library"]="1*1,2*1";
+w["like"]="1*2";
+w["live"]="3*5";
+w["ljava"]="4*37";
+w["load"]="5*1";
+w["loaded"]="1*2";
+w["loaded:"]="1*1";
+w["located"]="3*3";
+w["long"]="4*2";
+w["machine"]="3*1";
+w["machine."]="3*1";
+w["make"]="1*2";
+w["make."]="1*1";
+w["mapping"]="4*1";
+w["may"]="3*2";
+w["meant"]="4*1";
+w["memory"]="3*1";
+w["message"]="0*1,6*1";
+w["method"]="0*4,3*1,4*179,5*1,6*4";
+w["method_signature"]="0*4,4*173,6*4";
+w["methods"]="4*6";
+w["minimal"]="0*1,5*40,6*1";
+w["modparam"]="3*3";
+w["module"]="0*2,1*2,2*1,4*1,5*47,6*2";
+w["module."]="2*1";
+w["module:"]="1*1";
+w["modules"]="0*1,1*41,3*3,5*2,6*1";
+w["modules:"]="3*6";
+w["module "]="0*1";
+w["more"]="3*1,4*3";
+w["must"]="1*2";
+w["my_mod_init"]="3*1";
+

+ 135 - 0
modules/app_java/doc/webhelp/oxygen-webhelp/search/index-3.js

@@ -0,0 +1,135 @@
+//Auto generated index for searching.
+w["name"]="3*2,4*1";
+w["name."]="3*1";
+w["named"]="3*1";
+w["native"]="0*1,3*1,6*1";
+w["nativeinterface"]="5*1";
+w["nativemethods"]="5*1";
+w["none"]="1*3,3*15";
+w["note"]="3*1,4*3";
+w["note:"]="3*1";
+w["null"]="4*2";
+w["null."]="4*1";
+w["object"]="4*3";
+w["objects"]="4*1";
+w["objects:"]="4*1";
+w["off"]="3*1";
+w["ommitting"]="4*1";
+w["openjdk"]="1*1";
+w["opt"]="3*21,5*2";
+w["optional"]="1*3,4*1";
+w["options"]="3*1";
+w["oracle"]="1*1";
+w["org"]="5*2";
+w["org.siprouter."]="5*1";
+w["org.siprouter.nativeinterface."]="5*1";
+w["other"]="1*1";
+w["output"]="0*1,1*1,2*1,3*1,4*1,5*1,6*1";
+w["overview"]="0*46,6*46";
+w["packages"]="1*10";
+w["packages."]="1*1";
+w["param1"]="0*4,4*168,6*4";
+w["param2"]="0*4,4*168,6*4";
+w["parameter"]="3*36,4*16";
+w["parameter:"]="4*1";
+w["parameters"]="0*1,3*47,4*2,6*1";
+w["parameters "]="4*1";
+w["passed"]="4*2";
+w["path"]="3*9,5*1";
+w["primitives"]="4*1";
+w["primitives:"]="4*1";
+w["process"]="5*1";
+w["program"]="0*1,5*45,6*1";
+w["prototype"]="4*24";
+w["public"]="4*24,5*3";
+w["rank"]="5*1";
+w["read"]="3*1";
+w["remove"]="5*2";
+w["representation"]="4*9";
+w["representation."]="4*8";
+w["represents"]="4*1";
+w["required"]="1*9,2*1,4*5,5*1";
+w["required."]="4*4,5*1";
+w["requirements"]="0*1,4*40,6*1";
+w["return"]="4*12,5*1";
+w["running"]="1*1";
+w["runtime"]="0*1,1*10,2*48,6*1";
+w["runtime."]="1*1";
+w["runtime "]="3*1";
+w["s"]="4*3";
+w["same"]="3*1,4*1";
+w["scenario"]="4*8";
+w["see"]="4*3";
+w["semi"]="4*1";
+w["semi-colon"]="4*1";
+w["shall"]="4*1";
+w["short"]="4*2";
+w["should"]="3*2,4*1,5*2";
+w["signature"]="4*6";
+w["signature."]="4*1";
+w["signatures"]="4*1";
+w["signatures:"]="4*1";
+w["sip"]="0*1,6*1";
+w["sipmessagebuffer"]="4*4";
+w["sipmessagelenght"]="4*4";
+w["siprouter"]="5*2";
+w["skeleton"]="0*1,5*45,6*1";
+w["something"]="4*13";
+w["specify"]="4*1,5*1";
+w["standard"]="1*2";
+w["static"]="4*14,5*1";
+w["string"]="0*3,3*120,4*37,6*3";
+w["supported"]="4*1";
+w["supports"]="4*1";
+w["symbol"]="4*1";
+w["synchronized"]="4*20";
+w["system"]="5*1";
+w["system.load"]="5*1";
+w["table"]="0*5,6*5";
+w["tasks"]="1*1";
+w["tbd"]="3*1";
+w["tbd."]="3*1";
+w["that"]="4*1";
+w["then"]="3*1";
+w["tm"]="1*1";
+w["tool"]="1*2";
+w["tools"]="1*2";
+w["true"]="4*12";
+w["type"]="4*4";
+w["type."]="4*1";
+w["types"]="1*1";
+w["untested"]="3*1";
+w["usage"]="4*12";
+w["usage:"]="4*12";
+w["use"]="1*2,2*1,4*1";
+w["used"]="3*1";
+w["using"]="0*1,1*1,6*1";
+w["v"]="4*31";
+w["value"]="3*13,4*1";
+w["variable"]="4*1";
+w["verbose"]="3*5";
+w["verbose:gc"]="3*2";
+w["virtual"]="3*1";
+w["void"]="4*1";
+w["webhelp"]="0*1,1*1,2*1,3*1,4*1,5*1,6*1";
+w["will"]="4*9";
+w["world"]="4*4";
+w["xdebug"]="3*1";
+w["xml"]="0*1,1*1,2*1,3*1,4*1,5*1,6*1";
+w["yet"]="3*1,4*1";
+w["yet."]="4*1";
+w["yte"]="4*1";
+w["z"]="4*2";
+w["zb"]="4*28";
+w["zi"]="4*1";
+w[" "]="0*4,1*4,2*4,3*4,4*4,5*5,6*8";
+w[" admin"]="0*52,1*1,6*47";
+w[" dependencies"]="0*1,6*1";
+w[" functions"]="3*1";
+w[" java"]="1*1,4*1";
+w[" minimal"]="5*5";
+w[" parameters"]="2*1";
+w[" set"]="3*35";
+w[" signature:"]="4*60";
+w["“"]="3*5,4*1";
+

+ 33 - 0
modules/app_java/doc/webhelp/oxygen-webhelp/search/index.html

@@ -0,0 +1,33 @@
+<!DOCTYPE html SYSTEM "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>WebHelp</title>
+			<meta HTTP-EQUIV="REFRESH" content="0; url=../../"/>        
+    </head>
+    <body>            
+            Current generated project :            
+            <!-- to be generated  -->
+<div id="productInfo" style="display:none;">
+	<span id="oxy_productid">${webhelp.product.id}</span>
+	<span id="oxy_productVersion">${webhelp.product.version}</span>
+</div>
+<!-- /to be generated  -->
+                 
+	<script type="text/javascript">
+    var pageSearch = window.location.href;
+    var pageWSearch = pageSearch.replace(window.location.search,"");
+    pageWSearch = pageWSearch.replace(window.location.hash,"");
+    var url=pageWSearch.split("/");
+    var newUrl="";
+    for ( var i = 0; i < url.length; i++) {
+    	if (url[i]=='oxygen-webhelp'){
+    		break;
+    	}else{    	    		
+				newUrl=newUrl+url[i]+"/";
+    	}
+		}    
+    document.location=newUrl;
+    </script>
+                                              
+    </body>
+</html>

+ 1 - 0
modules/app_java/doc/webhelp/oxygen-webhelp/search/ja-jp.props

@@ -0,0 +1 @@
+J01=\\u306B

+ 906 - 0
modules/app_java/doc/webhelp/oxygen-webhelp/search/nwSearchFnt.js

@@ -0,0 +1,906 @@
+/*----------------------------------------------------------------------------
+ * JavaScript for webhelp search
+ *----------------------------------------------------------------------------
+ This file is part of the webhelpsearch plugin for DocBook WebHelp
+ Copyright (c) 2007-2008 NexWave Solutions All Rights Reserved.
+ www.nexwave.biz Nadege Quaine
+ http://kasunbg.blogspot.com/ Kasun Gajasinghe
+ */
+
+//string initialization
+var htmlfileList = "htmlFileList.js";
+var htmlfileinfoList = "htmlFileInfoList.js";
+var useCJKTokenizing = false;
+
+//-------------------------OXYGEN PATCH START-------------------------
+// The file was generated from eXml-webHelp ant file
+// Any modification of this file will be made in eXml-webHelp Project
+
+var w = new Object();
+var scoring = new Object();
+
+var searchTextField = '';
+var no = 0;
+var noWords = 0;
+var partialSearch1 = "There is no page containing all the search terms.";
+var partialSearch2 = "Partial results:";
+var warningMsg = '<div style="padding: 5px;margin-right:5px;;background-color:#FFFF00;">';
+warningMsg+='<b>Please note that due to security settings, Google Chrome does not highlight';
+warningMsg+=' the search results in the right frame.</b><br>';
+warningMsg+='This happens only when the WebHelp files are loaded from the local file system.<br>';
+warningMsg+='Workarounds:';
+warningMsg+='<ul>';
+warningMsg+='<li>Try using another web browser.</li>';
+warningMsg+='<li>Deploy the WebHelp files on a web server.</li>';
+warningMsg+='</div>';
+txt_filesfound = 'Results';
+txt_enter_at_least_1_char = "You must enter at least one character.";
+txt_enter_more_than_10_words = "Only first 10 words will be processed.";
+txt_browser_not_supported = "Your browser is not supported. Use of Mozilla Firefox is recommended.";
+txt_please_wait = "Please wait. Search in progress...";
+txt_results_for = "Results for:";
+//-------------------------OXYGEN PATCH END-------------------------
+
+/* Cette fonction verifie la validite de la recherche entrre par l utilisateur */
+function Verifie(ditaSearch_Form) {
+
+    // Check browser compatibitily
+    if (navigator.userAgent.indexOf("Konquerer") > -1) {
+
+        alert(getLocalization(txt_browser_not_supported));
+        return;
+    }
+
+    //-------------------------OXYGEN PATCH START-------------------------
+    /*
+    var expressionInput = document.ditaSearch_Form.textToSearch.value
+    */
+    searchTextField = trim(document.searchForm.textToSearch.value);
+    var expressionInput = searchTextField;  
+
+    /*
+    //Set a cookie to store the searched keywords
+    $.cookie('textToSearch', expressionInput);
+    */
+    //-------------------------OXYGEN PATCH END-------------------------
+
+    if (expressionInput.length < 1) {
+        // expression is invalid
+        alert(getLocalization(txt_enter_at_least_1_char));
+        // reactive la fenetre de search (utile car cadres)
+
+        //-------------------------OXYGEN PATCH START-------------------------
+        /*
+        document.ditaSearch_Form.textToSearch.focus();
+        */
+        document.searchForm.textToSearch.focus();
+        //-------------------------OXYGEN PATCH END-------------------------
+    }
+    else {
+        //-------------------------OXYGEN PATCH START-------------------------
+       // OXYGEN PATCH START - EXM-20996 - split by " ", ".", ":", "-"
+    var splitSpace = searchTextField.split(" ");
+    
+    /*
+       var splitWords = [];
+        for (var i = 0 ; i < splitSpace.length ; i++) {
+          var splitDot = splitSpace[i].split(".");
+          for (var i1 = 0; i1 < splitDot.length; i1++) {
+               var splitColon = splitDot[i1].split(":");
+            for (var i2 = 0; i2 < splitColon.length; i2++) {
+                var splitDash = splitColon[i2].split("-");
+                 for (var i3 = 0; i3 < splitDash.length; i3++) {
+                     if (splitDash[i3].split("").length > 0) {
+                           splitWords.push(splitDash[i3]);
+                       }
+                 }
+            }
+          }
+       }
+       noWords = splitWords;
+       */
+       
+       noWords = splitSpace;
+
+       // OXYGEN PATCH END - EXM-20996 - split by " ", ".", ":", "-"
+    
+      if (noWords.length > 9) {
+          // Allow to search maximum 10 words
+          alert(getLocalization(txt_enter_more_than_10_words));
+          expressionInput = '';
+           for (var x = 0 ; x < 10 ; x++){
+               expressionInput = expressionInput + " " + noWords[x]; 
+          }
+          Effectuer_recherche(expressionInput);
+           document.searchForm.textToSearch.focus();
+      } else {
+          // Effectuer la recherche
+             // OXYGEN PATCH START - EXM-20996
+             expressionInput = '';
+          for (var x = 0 ; x < noWords.length ; x++) {
+                 expressionInput = expressionInput + " " + noWords[x]; 
+             }
+             // OXYGEN PATCH END - EXM-20996
+             
+             Effectuer_recherche(expressionInput);
+          // reactive la fenetre de search (utile car cadres)
+          /*
+          document.ditaSearch_Form.textToSearch.focus();
+          */
+          document.searchForm.textToSearch.focus();        
+          //-------------------------OXYGEN PATCH END-------------------------
+      }
+    }
+}
+
+var stemQueryMap = new Array();  // A hashtable which maps stems to query words
+
+/* This function parses the search expression, loads the indices and displays the results*/
+function Effectuer_recherche(expressionInput) {
+
+    /* Display a waiting message */
+    //DisplayWaitingMessage();
+
+    /*data initialisation*/
+    var searchFor = "";       // expression en lowercase et sans les caracte    res speciaux
+    //w = new Object();  // hashtable, key=word, value = list of the index of the html files
+    scriptLetterTab = new Scriptfirstchar(); // Array containing the first letter of each word to look for
+    var wordsList = new Array(); // Array with the words to look for
+    var finalWordsList = new Array(); // Array with the words to look for after removing spaces
+    var linkTab = new Array();
+    var fileAndWordList = new Array();
+    var txt_wordsnotfound = "";
+
+
+    /*nqu: expressionInput, la recherche est lower cased, plus remplacement des char speciaux*/
+    /*
+      %21   !
+      %2C   ,
+      %3A   :
+      %3B   ;
+    
+    */
+		/*  OXYGEN PATCH START - EXM-20414 */
+    searchFor = expressionInput.toLowerCase().replace(/<\//g, "_st_").replace(/\$_/g, "_di_").replace(/%2C|%3B|%21|%3A|@|\/|\*/g, " ").replace(/(%20)+/g, " ").replace(/_st_/g, "</").replace(/_di_/g, "%24_");
+		/*  OXYGEN PATCH END - EXM-20414 */
+
+    searchFor = searchFor.replace(/  +/g, " ");
+    searchFor = searchFor.replace(/ $/, "").replace(/^ /, "");
+
+    wordsList = searchFor.split(" ");
+    wordsList.sort();
+
+    //set the tokenizing method
+    if(typeof indexerLanguage != "undefined" && (indexerLanguage=="zh" || indexerLanguage=="ja" ||indexerLanguage=="ko")){
+        useCJKTokenizing=true;
+    } else {
+        useCJKTokenizing=false;
+    }
+    //If Lucene CJKTokenizer was used as the indexer, then useCJKTokenizing will be true. Else, do normal tokenizing.
+    // 2-gram tokenizinghappens in CJKTokenizing, 
+    // OXYGEN PATCH START. If doStem then make tokenize with Stemmer
+    var finalArray;
+    if (doStem){
+    // OXYGEN PATCH END.
+      if(useCJKTokenizing){
+          finalWordsList = cjkTokenize(wordsList);
+          finalArray = finalWordsList;
+      } else { 
+          finalWordsList = tokenize(wordsList);
+      }
+    } else if(useCJKTokenizing){
+          finalWordsList = cjkTokenize(wordsList);
+          finalArray = finalWordsList;
+         } 
+    if(!useCJKTokenizing){
+                //load the scripts with the indices: the following lines do not work on the server. To be corrected
+              /*if (IEBrowser) {
+               scriptsarray = loadTheIndexScripts (scriptLetterTab);
+               } */
+          
+              /**
+               * Compare with the indexed words (in the w[] array), and push words that are in it to tempTab.
+               */
+              var tempTab = new Array();
+            
+            var splitedValues = expressionInput.split(" ");
+            finalWordsList = finalWordsList.concat(splitedValues);
+            finalArray = finalWordsList;
+            finalArray = removeDuplicate(finalArray);
+              // OXYGEN PATCH START.
+              var wordsArray = '';
+              // OXYGEN PATCH END.
+              for (var t in finalWordsList) {  
+              // OXYGEN PATCH START.
+              if (doStem){
+              // OXYGEN PATCH END.
+                    if (w[finalWordsList[t].toString()] == undefined) {
+                        txt_wordsnotfound += finalWordsList[t] + " ";
+                    } else {
+                        tempTab.push(finalWordsList[t]);
+                    }
+              // OXYGEN PATCH START.
+                } else {
+                  var searchedValue = finalWordsList[t].toString();
+                  if (wordsStartsWith(searchedValue) != undefined){
+                    wordsArray+=wordsStartsWith(searchedValue);
+                  }
+                }
+              // OXYGEN PATCH END.
+              }
+              // OXYGEN PATCH START.
+              wordsArray = wordsArray.substr(0, wordsArray.length - 1);    
+            if (!doStem){   
+              finalWordsList = wordsArray.split(",");
+            } else {
+                finalWordsList = tempTab;   
+            }
+              // OXYGEN PATCH END.
+          
+              //-------------------------OXYGEN PATCH START-----------------------
+              txt_wordsnotfound = expressionInput;
+            finalWordsList = removeDuplicate(finalWordsList);
+              //-------------------------OXYGEN PATCH END-------------------------
+   }
+
+ 
+    if (finalWordsList.length) {
+      //search 'and' and 'or' one time
+      fileAndWordList = SortResults(finalWordsList);
+      //-------------------------OXYGEN PATCH START-----------------------
+      if (fileAndWordList == undefined) {
+          var cpt = 0;
+      } else {
+          var cpt = fileAndWordList.length;
+          var maxNumberOfWords = fileAndWordList[0][0].motsnb;
+      }
+    if (cpt > 0) {
+		var searchedWords = noWords.length;
+		var foundedWords  = fileAndWordList[0][0].motslisteDisplay.split(",").length;
+		//console.info("search : " + noWords.length + "   found : " + fileAndWordList[0][0].motslisteDisplay.split(",").length);
+		if (searchedWords != foundedWords) {
+		  linkTab.push("<font class=\"highlightText\">" + getLocalization(partialSearch1) + "<br>" + getLocalization(partialSearch2) + "</font>");
+		}
+    }
+    
+      //-------------------------OXYGEN PATCH END-----------------------
+      for (var i = 0; i < cpt; i++) {
+      //-------------------------OXYGEN PATCH START-----------------------
+      var hundredProcent = fileAndWordList[i][0].scoring + 100 * fileAndWordList[i][0].motsnb;
+      var ttScore_first = fileAndWordList[i][0].scoring;
+      var numberOfWords = fileAndWordList[i][0].motsnb;
+      //-------------------------OXYGEN PATCH END-----------------------
+            if (fileAndWordList[i] != undefined) {
+                linkTab.push("<p>" + getLocalization(txt_results_for) + " " + "<span class=\"searchExpression\">" + fileAndWordList[i][0].motslisteDisplay + "</span>" + "</p>");
+
+                linkTab.push("<ul class='searchresult'>");
+                for (t in fileAndWordList[i]) {
+                    //linkTab.push("<li><a href=\"../"+fl[fileAndWordList[i][t].filenb]+"\">"+fl[fileAndWordList[i][t].filenb]+"</a></li>");
+            //-------------------------OXYGEN PATCH START-----------------------                    
+                    var ttInfo = fileAndWordList[i][t].filenb;
+                    // Get scoring
+                    var ttScore = fileAndWordList[i][t].scoring;
+                    var tempInfo = fil[ttInfo];
+            //-------------------------OXYGEN PATCH END-----------------------
+                    var pos1 = tempInfo.indexOf("@@@");
+                    var pos2 = tempInfo.lastIndexOf("@@@");
+                    var tempPath = tempInfo.substring(0, pos1);
+                    var tempTitle = tempInfo.substring(pos1 + 3, pos2);
+                    var tempShortdesc = tempInfo.substring(pos2 + 3, tempInfo.length);
+
+                    //-------------------------OXYGEN PATCH START-------------------------
+                    // toc.html will not be displayed on search result
+                    if (tempPath == 'toc.html'){
+                        continue;
+                    }
+                    /*
+                    //file:///home/kasun/docbook/WEBHELP/webhelp-draft-output-format-idea/src/main/resources/web/webhelp/installation.html
+                    var linkString = "<li><a href=" + tempPath + ">" + tempTitle + "</a>";
+                    // var linkString = "<li><a href=\"installation.html\">" + tempTitle + "</a>";
+                    */
+                    var split = fileAndWordList[i][t].motsliste.split(",");
+                    // var splitedValues = expressionInput.split(" ");
+          // var finalArray = split.concat(splitedValues);          
+          
+                    arrayString = 'Array(';
+                    for(var x in finalArray){
+                      if (finalArray[x].length > 2 || useCJKTokenizing){
+                        arrayString+= "'" + finalArray[x] + "',";
+                      } 
+                    }
+                    arrayString = arrayString.substring(0,arrayString.length - 1) + ")";
+					/*  OXYGEN PATCH START - EXM-20414 */
+					arrayString = arrayString.replace(".", "\\\\.");
+					/*  OXYGEN PATCH END - EXM-20414 */
+                    var idLink = 'foundLink' + no;
+                    var link = 'openAndHighlight(\'' + tempPath + '\', ' + arrayString + ', \'' + idLink + '\')';
+                    var linkString = '<li><a id="' + idLink + '" href="' + tempPath + '" class="foundResult" onclick="'+link+'">' + tempTitle + '</a>';
+                    var starWidth = (ttScore * 100/ hundredProcent)/(ttScore_first/hundredProcent) * (numberOfWords/maxNumberOfWords);
+                    starWidth = starWidth < 10 ? (starWidth + 5) : starWidth;
+                    // Keep the 5 stars format
+                    if (starWidth > 85){
+            starWidth = 85;
+          }
+          /*
+          var noFullStars = Math.ceil(starWidth/17);
+          var fullStar  = "curr";
+          var emptyStar = "";
+          if (starWidth % 17 == 0){
+            // am stea plina
+            
+          } else {
+            
+          }
+          console.info(noFullStars);
+          */
+                    // Also check if we have a valid description
+                    if ((tempShortdesc != "null" && tempShortdesc != '...')) {
+                    //-------------------------OXYGEN PATCH END-------------------------
+                        linkString += "\n<div class=\"shortdesclink\">" + tempShortdesc + "</div>";
+                    }
+                    linkString += "</li>";
+                    //-------------------------OXYGEN PATCH START-------------------------
+                    // Add rating values for scoring at the list of matches 
+          linkString += "<div id=\"rightDiv\">";
+          linkString += "<div id=\"star\">";
+          //linkString += "<div style=\"color: rgb(136, 136, 136);\" id=\"starUser0\" class=\"user\">" 
+          //        + ((ttScore * 100/ hundredProcent)/(ttScore_first/hundredProcent)) * 1 + "</div>";
+                  linkString += "<ul id=\"star0\" class=\"star\">";
+          linkString += "<li id=\"starCur0\" class=\"curr\" style=\"width: " + starWidth + "px;\"></li>";
+                  linkString += "</ul>";
+                  
+                  linkString += "<br style=\"clear: both;\">";
+                  linkString += "</div>";
+          linkString += "</div>";
+                    //linkString += '<b>Rating: ' + ttScore + '</b>';
+                    //-------------------------OXYGEN PATCH END-------------------------                       
+                    linkTab.push(linkString);
+                    no++;
+                }
+                linkTab.push("</ul>");
+            }
+        }
+    }
+
+    var results = "";
+    if (linkTab.length > 0) { 
+        /*writeln ("<p>" + getLocalization(txt_results_for) + " " + "<span class=\"searchExpression\">"  + cleanwordsList + "</span>" + "<br/>"+"</p>");*/
+        results = "<p>";
+        //write("<ul class='searchresult'>");
+        for (t in linkTab) {
+            results += linkTab[t].toString();
+        }
+        results += "</p>";
+    } else {
+        results = "<p>" + getLocalization("Search no results") + " " + "<span class=\"searchExpression\">" + txt_wordsnotfound + "</span>" + "</p>";
+    }
+    
+    //-------------------------OXYGEN PATCH START-------------------------
+    // Verify if the browser is Google Chrome and the WebHelp is used on a local machine
+    // If browser is Google Chrome and WebHelp is used on a local machine a warning message will appear
+    // Highlighting will not work in this conditions. There is 2 workarounds
+    if (verifyBrowser()){
+        document.getElementById('searchResults').innerHTML = results;
+    } else {
+        document.getElementById('searchResults').innerHTML = warningMsg + results;
+    }
+    //-------------------------OXYGEN PATCH END-------------------------
+}
+
+//-------------------------OXYGEN PATCH START-------------------------
+// Verify if the stemmed word is aproximately the same as the searched word
+function verifyWord(word, arr){
+  for (var i = 0 ; i < arr.length ; i++){
+    if (word[0] == arr[i][0] 
+      && word[1] == arr[i][1] 
+      //&& word[2] == arr[i][2]
+      ){
+      return true;
+    }
+  }
+  return false;
+}
+
+// Look for elements that start with searchedValue.
+function wordsStartsWith(searchedValue){
+  var toReturn = '';
+  for (var sv in w){
+    if (searchedValue.length < 3){
+      continue;
+    } else {
+      if (sv.toLowerCase().indexOf(searchedValue.toLowerCase()) == 0){
+        toReturn+=sv + ","; 
+      }
+    }
+  }
+  return toReturn.length > 0 ? toReturn : undefined;
+}
+//-------------------------OXYGEN PATCH END-------------------------
+
+function tokenize(wordsList){
+    var stemmedWordsList = new Array(); // Array with the words to look for after removing spaces
+    var cleanwordsList = new Array(); // Array with the words to look for
+    for(var j in wordsList){
+        var word = wordsList[j];
+        if(typeof stemmer != "undefined" ){
+            stemQueryMap[stemmer(word)] = word;
+        } else {
+            stemQueryMap[word] = word;
+        }
+    } 
+     //stemmedWordsList is the stemmed list of words separated by spaces.
+    for (var t in wordsList) {
+        wordsList[t] = wordsList[t].replace(/(%22)|^-/g, "");
+        if (wordsList[t] != "%20") {
+            scriptLetterTab.add(wordsList[t].charAt(0));
+            cleanwordsList.push(wordsList[t]);
+        }
+    }
+
+    if(typeof stemmer != "undefined" ){
+        //Do the stemming using Porter's stemming algorithm
+        for (var i = 0; i < cleanwordsList.length; i++) {     
+            var stemWord = stemmer(cleanwordsList[i]);      
+            stemmedWordsList.push(stemWord);
+        }
+    } else {
+        stemmedWordsList = cleanwordsList;
+    }
+    return stemmedWordsList;
+}
+
+//Invoker of CJKTokenizer class methods.
+function cjkTokenize(wordsList){
+    var allTokens= new Array();
+    var notCJKTokens= new Array();
+    var j=0;
+    for(j=0;j<wordsList.length;j++){
+        var word = wordsList[j];
+        if(getAvgAsciiValue(word) < 127){
+            notCJKTokens.push(word);
+        } else { 
+            var tokenizer = new CJKTokenizer(word);
+            var tokensTmp = tokenizer.getAllTokens();
+            allTokens = allTokens.concat(tokensTmp);
+        }
+    }
+    allTokens = allTokens.concat(tokenize(notCJKTokens));
+    return allTokens;
+}
+
+//A simple way to determine whether the query is in english or not.
+function getAvgAsciiValue(word){
+    var tmp = 0;
+    var num = word.length < 5 ? word.length:5;
+    for(var i=0;i<num;i++){
+        if(i==5) break;
+        tmp += word.charCodeAt(i);
+    }
+    return tmp/num;
+}
+
+//CJKTokenizer
+function CJKTokenizer(input){
+    this.input = input;
+    this.offset=-1;
+    this.tokens = new Array(); 
+    this.incrementToken = incrementToken;
+    this.tokenize = tokenize;
+    this.getAllTokens = getAllTokens;
+    this.unique = unique;
+
+    function incrementToken(){
+    if(this.input.length - 2 <= this.offset){
+      return false;
+    }
+    else {
+      this.offset+=1;
+      return true;
+    }
+  }
+
+  function tokenize(){
+    //document.getElementById("content").innerHTML += x.substring(offset,offset+2)+"<br>";
+    return this.input.substring(this.offset,this.offset+2);
+  }
+
+  function getAllTokens(){
+    while(this.incrementToken()){
+      var tmp = this.tokenize();
+      this.tokens.push(tmp);
+    }
+        return this.unique(this.tokens);
+//    document.getElementById("content").innerHTML += tokens+" ";
+//    document.getElementById("content").innerHTML += "<br>dada"+sortedTokens+" ";
+    /*for(i=0;i<tokens.length;i++){
+      var ss = tokens[i] == sortedTokens[i];
+
+//      document.getElementById("content").innerHTML += "<br>dada"+un[i]+"- "+stems[i]+"&nbsp;&nbsp;&nbsp;"+ ss;
+      document.getElementById("content").innerHTML += "<br>"+sortedTokens[i];
+    }*/
+  }
+
+  function unique(a)
+  {
+     var r = new Array();
+     o:for(var i = 0, n = a.length; i < n; i++)
+     {
+        for(var x = 0, y = r.length; x < y; x++)
+        {
+     if(r[x]==a[i]) continue o;
+        }
+        r[r.length] = a[i];
+     }
+     return r;
+  } 
+}
+
+
+/* Scriptfirstchar: to gather the first letter of index js files to upload */
+function Scriptfirstchar() {
+    this.strLetters = "";
+    this.add = addLettre;
+}
+
+function addLettre(caract) {
+
+    if (this.strLetters == 'undefined') {
+        this.strLetters = caract;
+    } else if (this.strLetters.indexOf(caract) < 0) {
+        this.strLetters += caract;
+    }
+
+    return 0;
+}
+/* end of scriptfirstchar */
+
+/*main loader function*/
+/*tab contains the first letters of each word looked for*/
+function loadTheIndexScripts(tab) {
+
+    //alert (tab.strLetters);
+    var scriptsarray = new Array();
+
+    for (var i = 0; i < tab.strLetters.length; i++) {
+
+        scriptsarray[i] = "..\/search" + "\/" + tab.strLetters.charAt(i) + ".js";
+    }
+    // add the list of html files
+    i++;
+    scriptsarray[i] = "..\/search" + "\/" + htmlfileList;
+
+    //debug
+    for (var t in scriptsarray) {
+        //alert (scriptsarray[t]);
+    }
+
+    tab = new ScriptLoader();
+    for (t in scriptsarray) {
+        tab.add(scriptsarray[t]);
+    }
+    tab.load();
+    //alert ("scripts loaded");
+    return (scriptsarray);
+}
+
+/* ScriptLoader: to load the scripts and wait that it's finished */
+function ScriptLoader() {
+    this.cpt = 0;
+    this.scriptTab = new Array();
+    this.add = addAScriptInTheList;
+    this.load = loadTheScripts;
+    this.onScriptLoaded = onScriptLoadedFunc;
+}
+
+function addAScriptInTheList(scriptPath) {
+    this.scriptTab.push(scriptPath);
+}
+
+function loadTheScripts() {
+    var script;
+    var head;
+
+    head = document.getElementsByTagName('head').item(0);
+
+    //script = document.createElement('script');
+
+    for (var el in this.scriptTab) {
+        //alert (el+this.scriptTab[el]);
+        script = document.createElement('script');
+        script.src = this.scriptTab[el];
+        script.type = 'text/javascript';
+        script.defer = false;
+
+        head.appendChild(script);
+    }
+
+}
+
+function onScriptLoadedFunc(e) {
+    e = e || window.event;
+    var target = e.target || e.srcElement;
+    var isComplete = true;
+    if (typeof target.readyState != undefined) {
+
+        isComplete = (target.readyState == "complete" || target.readyState == "loaded");
+    }
+    if (isComplete) {
+        ScriptLoader.cpt++;
+        if (ScriptLoader.cpt == ScriptLoader.scripts.length) {
+            ScriptLoader.onLoadComplete();
+        }
+    }
+}
+
+/*
+function onLoadComplete() {
+    alert("loaded !!");
+} */
+
+/* End of scriptloader functions */
+ 
+// Array.unique( strict ) - Remove duplicate values
+function unique(tab) {
+    var a = new Array();
+    var i;
+    var l = tab.length;
+
+    if (tab[0] != undefined) {
+        a[0] = tab[0];
+    }
+    else {
+        return -1;
+    }
+
+    for (i = 1; i < l; i++) {
+        if (indexof(a, tab[i], 0) < 0) {
+            a.push(tab[i]);
+        }
+    }
+    return a;
+}
+function indexof(tab, element, begin) {
+    for (var i = begin; i < tab.length; i++) {
+        if (tab[i] == element) {
+            return i;
+        }
+    }
+    return -1;
+
+}
+/* end of Array functions */
+
+
+/*
+ Param: mots= list of words to look for.
+ This function creates an hashtable:
+ - The key is the index of a html file which contains a word to look for.
+ - The value is the list of all words contained in the html file.
+
+ Return value: the hashtable fileAndWordList
+ */
+function SortResults(mots) {
+
+    var fileAndWordList = new Object();
+    if (mots.length == 0 || mots[0].length == 0) {
+        return null;
+    }
+    
+    //-------------------------OXYGEN PATCH START-------------------------
+    // In generated js file we add scoring at the end of the word
+    // Example word1*scoringForWord1,word2*scoringForWord2 and so on
+    // Split after * to obtain the right values
+    var scoringArr = Array();
+    for (var t in mots) {
+        // get the list of the indices of the files.
+        var listNumerosDesFicStr = w[mots[t].toString()];        
+        //alert ("listNumerosDesFicStr "+listNumerosDesFicStr);
+        var tab = listNumerosDesFicStr.split(",");
+        //for each file (file's index):
+        for (var t2 in tab) {
+            var tmp = '';
+            var idx = '';
+            var temp = tab[t2].toString();
+            if (temp.indexOf('*') != -1){
+                idx = temp.indexOf('*');
+                tmp = temp.substring(idx + 3, temp.length);
+                temp = temp.substring(0,idx);
+            }
+            scoringArr.push(tmp);
+            if (fileAndWordList[temp] == undefined) {
+                fileAndWordList[temp] = "" + mots[t];
+            } else {
+                fileAndWordList[temp] += "," + mots[t];
+            }
+            //console.info("fileAndWordList[" + temp + "]=" + fileAndWordList[temp] + " : " + tmp);
+        }
+    }
+    var fileAndWordListValuesOnly = new Array();
+    // sort results according to values
+    var temptab = new Array();
+    finalObj = new Array();
+    for (t in fileAndWordList) {      
+      finalObj.push(new newObj(t,fileAndWordList[t]));
+    }    
+    finalObj = removeDerivates(finalObj);
+    for (t in finalObj) {
+        tab = finalObj[t].wordList.split(',');
+        var tempDisplay = new Array();
+        for (var x in tab) {            
+            if(stemQueryMap[tab[x]] != undefined && doStem){
+                tempDisplay.push(stemQueryMap[tab[x]]); //get the original word from the stem word.                
+            } else {
+                tempDisplay.push(tab[x]); //no stem is available. (probably a CJK language)
+            }
+        }
+        var tempDispString = tempDisplay.join(", ");
+        var index;
+        for (x in fileAndWordList) {
+          if (x === finalObj[t].filesNo) {
+            index = x;
+            break;
+          }
+        }
+        var scoring = findRating(fileAndWordList[index], index);  
+        temptab.push(new resultPerFile(finalObj[t].filesNo, finalObj[t].wordList, tab.length, tempDispString, scoring));
+        fileAndWordListValuesOnly.push(finalObj[t].wordList);        
+    }
+    fileAndWordListValuesOnly = unique(fileAndWordListValuesOnly);
+    fileAndWordListValuesOnly = fileAndWordListValuesOnly.sort(compare_nbMots);
+
+    var listToOutput = new Array();
+    for (var j in fileAndWordListValuesOnly) {
+        for (t in temptab) {
+            if (temptab[t].motsliste == fileAndWordListValuesOnly[j]) {
+                if (listToOutput[j] == undefined) {
+                    listToOutput[j] = new Array(temptab[t]);
+                } else {
+                    listToOutput[j].push(temptab[t]);
+                }
+            }
+        }
+    }   
+  // Sort results by scoring, descending on the same group
+  for (var i in listToOutput) {
+      listToOutput[i].sort(function(a, b){
+      return b.scoring - a.scoring;
+    });
+  }
+  // If we have groups with same number of words, 
+  // will sort groups by higher scoring of each group
+  for (var i = 0; i < listToOutput.length - 1; i++) {
+    for (var j = i + 1; j < listToOutput.length; j++) {
+      if (listToOutput[i][0].motsnb < listToOutput[j][0].motsnb 
+        || (listToOutput[i][0].motsnb == listToOutput[j][0].motsnb
+        && listToOutput[i][0].scoring < listToOutput[j][0].scoring)
+        ) {
+        var x = listToOutput[i];
+        listToOutput[i] = listToOutput[j];
+        listToOutput[j] = x;
+      }
+    }
+  }
+
+    return listToOutput;
+}
+
+// Remove derivates words from the list of words
+function removeDerivates(obj){
+  var toResultObject = new Array(); 
+  for (i in obj){
+    var filesNo  = obj[i].filesNo;
+    var wordList = obj[i].wordList;
+    var wList = wordList.split(",");    
+    var searchedWords = searchTextField.toLowerCase().split(" ");
+    for (var k = 0 ; k < searchedWords.length ; k++){
+      for (var j = 0 ; j < wList.length ; j++){       
+        if (wList[j].startsWith(searchedWords[k])){
+          wList[j] = searchedWords[k];
+        }
+      }
+    }
+    wList = removeDuplicate(wList);
+    var recreateList = '';
+    for(var x in wList){
+      recreateList+=wList[x] + ",";
+    }
+    recreateList = recreateList.substr(0, recreateList.length - 1);
+    toResultObject.push(new newObj(filesNo, recreateList));
+  }
+  return toResultObject;
+}
+
+function newObj(filesNo, wordList){
+  this.filesNo = filesNo;
+  this.wordList = wordList;
+}
+//-------------------------OXYGEN PATCH END-------------------------
+
+
+// Object.
+// Oxygen. Add a new parameter. Scoring.
+function resultPerFile(filenb, motsliste, motsnb, motslisteDisplay, scoring, group) {
+  //10 - spring,time - 2 - spring, time - 55 - 3
+    this.filenb = filenb;
+    this.motsliste = motsliste;
+    this.motsnb = motsnb;
+    this.motslisteDisplay= motslisteDisplay;
+    //-------------------------OXYGEN PATCH START-------------------------
+    this.scoring = scoring;
+    //-------------------------OXYGEN PATCH END-------------------------
+}
+
+//-------------------------OXYGEN PATCH START-------------------------
+function findRating(words, nr){
+    var sum = 0;
+    var xx = words.split(',');
+    for (jj = 0 ; jj < xx.length ; jj++){
+        var wrd = w[xx[jj]].split(',');
+        for (var ii = 0 ; ii < wrd.length ; ii++){
+            var wrdno = wrd[ii].split('*');
+            if (wrdno[0] == nr){
+                sum+=parseInt(wrdno[1]);
+            }
+        }
+    }
+    return sum;
+}
+//-------------------------OXYGEN PATCH END-------------------------
+function compare_nbMots(s1, s2) {
+    var t1 = s1.split(',');
+    var t2 = s2.split(',');
+    //alert ("s1:"+t1.length + " " +t2.length)
+    if (t1.length == t2.length) {
+        return 0;
+    } else if (t1.length > t2.length) {
+        return 1;
+    } else {
+        return -1;
+    }
+    //return t1.length - t2.length);
+}
+//-------------------------OXYGEN PATCH START-------------------------
+// return false if browser is Google Chrome and WebHelp is used on a local machine, not a web server 
+function verifyBrowser(){
+    var returnedValue = true;    
+    var browser = BrowserDetect.browser;
+    var addressBar = window.location.href;
+    if (browser == 'Chrome' && addressBar.indexOf('file://') === 0){
+        returnedValue = false;
+    }
+    
+    return returnedValue;
+}
+
+// Remove duplicate values from an array
+function removeDuplicate(arr) {
+   var r = new Array();
+   o:for(var i = 0, n = arr.length; i < n; i++) {
+      for(var x = 0, y = r.length; x < y; x++) {
+         if(r[x]==arr[i]) continue o;
+      }
+      r[r.length] = arr[i];
+   }
+   return r;
+}
+
+// Create startsWith method
+String.prototype.startsWith = function(str) {
+  return (this.match("^"+str)==str);
+}
+
+function trim(str, chars) {
+  return ltrim(rtrim(str, chars), chars);
+}
+ 
+function ltrim(str, chars) {
+  chars = chars || "\\s";
+  return str.replace(new RegExp("^[" + chars + "]+", "g"), "");
+}
+ 
+function rtrim(str, chars) {
+  chars = chars || "\\s";
+  return str.replace(new RegExp("[" + chars + "]+$", "g"), "");
+}
+
+//-------------------------OXYGEN PATCH END-------------------------

+ 31 - 0
modules/app_java/doc/webhelp/oxygen-webhelp/search/punctuation.props

@@ -0,0 +1,31 @@
+Punct01=\\u3002
+Punct02=\\u3003
+Punct03=\\u300C
+Punct04=\\u300D
+Punct05=\\u300E
+Punct06=\\u300F
+Punct07=\\u301D
+Punct08=\\u301E
+Punct09=\\u301F
+Punct10=\\u309B
+Punct11=\\u2018
+Punct12=\\u2019
+Punct13=\\u201A
+Punct14=\\u201C
+Punct15=\\u201D
+Punct16=\\u201E
+Punct17=\\u2032
+Punct18=\\u2033
+Punct19=\\u2035
+Punct20=\\u2039
+Punct21=\\u203A
+Punct22=\\u201E
+Punct23=\\u00BB
+Punct24=\\u00AB
+Punct25=©
+Punct26=’
+Punct27=\\u00A0
+Punct28=\\u2014
+
+
+

+ 247 - 0
modules/app_java/doc/webhelp/oxygen-webhelp/search/stemmers/de_stemmer.js

@@ -0,0 +1,247 @@
+/*
+ * Author: Joder Illi
+ *
+ * Copyright (c) 2010, FormBlitz AG
+ * All rights reserved.
+ * Implementation of the stemming algorithm from http://snowball.tartarus.org/algorithms/german/stemmer.html
+ * Copyright of the algorithm is: Copyright (c) 2001, Dr Martin Porter and can be found at http://snowball.tartarus.org/license.php
+ *
+ * Redistribution and use in source and binary forms, with or without modification, is covered by the standard BSD license.
+ *
+ */
+
+//var stemmer = function Stemmer() {
+    /*
+    German includes the following accented forms,
+    ä   ö   ü
+    and a special letter, ß, equivalent to double s.
+    The following letters are vowels:
+    a   e   i   o   u   y   ä   ö   ü
+    */
+
+    var stemmer = function(word) {
+        /*
+        Put u and y between vowels into upper case
+        */
+        word = word.replace(/([aeiouyäöü])u([aeiouyäöü])/g, '$1U$2');
+        word = word.replace(/([aeiouyäöü])y([aeiouyäöü])/g, '$1Y$2');
+
+        /*
+        and then do the following mappings,
+        (a) replace ß with ss,
+        (a) replace ae with ä,                          Not doing these, have trouble with diphtongs
+        (a) replace oe with ö,                          Not doing these, have trouble with diphtongs
+        (a) replace ue with ü unless preceded by q.     Not doing these, have trouble with diphtongs
+        So in quelle, ue is not mapped to ü because it follows q, and in feuer it is not mapped because the first part of the rule changes it to feUer, so the u is not found.
+        */
+        word = word.replace(/ß/g, 'ss');
+        //word = word.replace(/ae/g, 'ä');
+        //word = word.replace(/oe/g, 'ö');
+        //word = word.replace(/([^q])ue/g, '$1ü');
+
+        /*
+        R1 and R2 are first set up in the standard way (see the note on R1 and R2), but then R1 is adjusted so that the region before it contains at least 3 letters.
+        R1 is the region after the first non-vowel following a vowel, or is the null region at the end of the word if there is no such non-vowel.
+        R2 is the region after the first non-vowel following a vowel in R1, or is the null region at the end of the word if there is no such non-vowel.
+        */
+
+        var r1Index = word.search(/[aeiouyäöü][^aeiouyäöü]/);
+        var r1 = '';
+        if (r1Index != -1) {
+            r1Index += 2;
+            r1 = word.substring(r1Index);
+        }
+
+        var r2Index = -1;
+        var r2 = '';
+
+        if (r1Index != -1) {
+            var r2Index = r1.search(/[aeiouyäöü][^aeiouyäöü]/);
+            if (r2Index != -1) {
+                r2Index += 2;
+                r2 = r1.substring(r2Index);
+                r2Index += r1Index;
+            } else {
+                r2 = '';
+            }
+        }
+
+        if (r1Index != -1 && r1Index < 3) {
+            r1Index = 3;
+            r1 = word.substring(r1Index);
+        }
+
+        /*
+        Define a valid s-ending as one of b, d, f, g, h, k, l, m, n, r or t.
+        Define a valid st-ending as the same list, excluding letter r.
+        */
+
+        /*
+        Do each of steps 1, 2 and 3.
+        */
+
+        /*
+        Step 1:
+        Search for the longest among the following suffixes,
+        (a) em   ern   er
+        (b) e   en   es
+        (c) s (preceded by a valid s-ending)
+        */
+        var a1Index = word.search(/(em|ern|er)$/g);
+        var b1Index = word.search(/(e|en|es)$/g);
+        var c1Index = word.search(/([bdfghklmnrt]s)$/g);
+        if (c1Index != -1) {
+            c1Index++;
+        }
+        var index1 = 10000;
+        var optionUsed1 = '';
+        if (a1Index != -1 && a1Index < index1) {
+            optionUsed1 = 'a';
+            index1 = a1Index;
+        }
+        if (b1Index != -1 && b1Index < index1) {
+            optionUsed1 = 'b';
+            index1 = b1Index;
+        }
+        if (c1Index != -1 && c1Index < index1) {
+            optionUsed1 = 'c';
+            index1 = c1Index;
+        }
+
+        /*
+        and delete if in R1. (Of course the letter of the valid s-ending is not necessarily in R1.) If an ending of group (b) is deleted, and the ending is preceded by niss, delete the final s.
+        (For example, äckern -> äck, ackers -> acker, armes -> arm, bedürfnissen -> bedürfnis)
+        */
+
+        if (index1 != 10000 && r1Index != -1) {
+            if (index1 >= r1Index) {
+                word = word.substring(0, index1);
+                if (optionUsed1 == 'b') {
+                    if (word.search(/niss$/) != -1) {
+                        word = word.substring(0, word.length -1);
+                    }
+                }
+            }
+        }
+        /*
+        Step 2:
+        Search for the longest among the following suffixes,
+        (a) en   er   est
+        (b) st (preceded by a valid st-ending, itself preceded by at least 3 letters)
+        */
+
+        var a2Index = word.search(/(en|er|est)$/g);
+        var b2Index = word.search(/(.{3}[bdfghklmnt]st)$/g);
+        if (b2Index != -1) {
+            b2Index += 4;
+        }
+
+        var index2 = 10000;
+        var optionUsed2 = '';
+        if (a2Index != -1 && a2Index < index2) {
+            optionUsed2 = 'a';
+            index2 = a2Index;
+        }
+        if (b2Index != -1 && b2Index < index2) {
+            optionUsed2 = 'b';
+            index2 = b2Index;
+        }
+
+        /*
+        and delete if in R1.
+        (For example, derbsten -> derbst by step 1, and derbst -> derb by step 2, since b is a valid st-ending, and is preceded by just 3 letters)
+        */
+
+        if (index2 != 10000 && r1Index != -1) {
+            if (index2 >= r1Index) {
+                word = word.substring(0, index2);
+            }
+        }
+
+        /*
+        Step 3: d-suffixes (*)
+        Search for the longest among the following suffixes, and perform the action indicated.
+        end   ung
+            delete if in R2
+            if preceded by ig, delete if in R2 and not preceded by e
+        ig   ik   isch
+            delete if in R2 and not preceded by e
+        lich   heit
+            delete if in R2
+            if preceded by er or en, delete if in R1
+        keit
+            delete if in R2
+            if preceded by lich or ig, delete if in R2
+        */
+
+        var a3Index = word.search(/(end|ung)$/g);
+        var b3Index = word.search(/[^e](ig|ik|isch)$/g);
+        var c3Index = word.search(/(lich|heit)$/g);
+        var d3Index = word.search(/(keit)$/g);
+        if (b3Index != -1) {
+            b3Index ++;
+        }
+
+        var index3 = 10000;
+        var optionUsed3 = '';
+        if (a3Index != -1 && a3Index < index3) {
+            optionUsed3 = 'a';
+            index3 = a3Index;
+        }
+        if (b3Index != -1 && b3Index < index3) {
+            optionUsed3 = 'b';
+            index3 = b3Index;
+        }
+        if (c3Index != -1 && c3Index < index3) {
+            optionUsed3 = 'c';
+            index3 = c3Index;
+        }
+        if (d3Index != -1 && d3Index < index3) {
+            optionUsed3 = 'd';
+            index3 = d3Index;
+        }
+
+        if (index3 != 10000 && r2Index != -1) {
+            if (index3 >= r2Index) {
+                word = word.substring(0, index3);
+                var optionIndex = -1;
+                var optionSubsrt = '';
+                if (optionUsed3 == 'a') {
+                    optionIndex = word.search(/[^e](ig)$/);
+                    if (optionIndex != -1) {
+                        optionIndex++;
+                        if (optionIndex >= r2Index) {
+                            word = word.substring(0, optionIndex);
+                        }
+                    }
+                } else if (optionUsed3 == 'c') {
+                    optionIndex = word.search(/(er|en)$/);
+                    if (optionIndex != -1) {
+                        if (optionIndex >= r1Index) {
+                            word = word.substring(0, optionIndex);
+                        }
+                    }
+                } else if (optionUsed3 == 'd') {
+                    optionIndex = word.search(/(lich|ig)$/);
+                    if (optionIndex != -1) {
+                        if (optionIndex >= r2Index) {
+                            word = word.substring(0, optionIndex);
+                        }
+                    }
+                }
+            }
+        }
+
+        /*
+        Finally,
+        turn U and Y back into lower case, and remove the umlaut accent from a, o and u.
+        */
+        word = word.replace(/U/g, 'u');
+        word = word.replace(/Y/g, 'y');
+        word = word.replace(/ä/g, 'a');
+        word = word.replace(/ö/g, 'o');
+        word = word.replace(/ü/g, 'u');
+
+        return word;
+    };
+//}

Algúns arquivos non se mostraron porque demasiados arquivos cambiaron neste cambio