<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" /><style type="text/css"><!--
#msg dl { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fc0 solid; padding: 6px; }
#msg ul, pre { overflow: auto; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<title>[13257] trunk: introduce custom menus, props jeffikus, See #11817</title>
</head>
<body>

<div id="msg">
<dl>
<dt>Revision</dt> <dd><a href="http://trac.wordpress.org/changeset/13257">13257</a></dd>
<dt>Author</dt> <dd>wpmuguru</dd>
<dt>Date</dt> <dd>2010-02-20 21:57:43 +0000 (Sat, 20 Feb 2010)</dd>
</dl>

<h3>Log Message</h3>
<pre>introduce custom menus, props jeffikus, See <a href="http://trac.wordpress.org/ticket/11817">#11817</a></pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpadminmenuphp">trunk/wp-admin/menu.php</a></li>
<li><a href="#trunkwpincludesdefaultwidgetsphp">trunk/wp-includes/default-widgets.php</a></li>
<li><a href="#trunkwpincludesgeneraltemplatephp">trunk/wp-includes/general-template.php</a></li>
<li><a href="#trunkwpincludespostphp">trunk/wp-includes/post.php</a></li>
<li><a href="#trunkwpincludesscriptloaderphp">trunk/wp-includes/script-loader.php</a></li>
<li><a href="#trunkwpincludestaxonomyphp">trunk/wp-includes/taxonomy.php</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkwpadmincsscustomnavigationcss">trunk/wp-admin/css/custom-navigation.css</a></li>
<li><a href="#trunkwpadmincsscustomnavigationdevcss">trunk/wp-admin/css/custom-navigation.dev.css</a></li>
<li><a href="#trunkwpadmincustomnavigationphp">trunk/wp-admin/custom-navigation.php</a></li>
<li><a href="#trunkwpadminjscustomnavigationcustomjquery132devjs">trunk/wp-admin/js/custom-navigation-custom-jquery-1.3.2.dev.js</a></li>
<li><a href="#trunkwpadminjscustomnavigationcustomjquery132js">trunk/wp-admin/js/custom-navigation-custom-jquery-1.3.2.js</a></li>
<li><a href="#trunkwpadminjscustomnavigationcustomjqueryautocompletedevjs">trunk/wp-admin/js/custom-navigation-custom-jquery-autocomplete.dev.js</a></li>
<li><a href="#trunkwpadminjscustomnavigationcustomjqueryautocompletejs">trunk/wp-admin/js/custom-navigation-custom-jquery-autocomplete.js</a></li>
<li><a href="#trunkwpadminjscustomnavigationcustomjqueryui172devjs">trunk/wp-admin/js/custom-navigation-custom-jquery-ui-1.7.2.dev.js</a></li>
<li><a href="#trunkwpadminjscustomnavigationcustomjqueryui172js">trunk/wp-admin/js/custom-navigation-custom-jquery-ui-1.7.2.js</a></li>
<li><a href="#trunkwpadminjscustomnavigationdefaultitemsdevjs">trunk/wp-admin/js/custom-navigation-default-items.dev.js</a></li>
<li><a href="#trunkwpadminjscustomnavigationdefaultitemsjs">trunk/wp-admin/js/custom-navigation-default-items.js</a></li>
<li><a href="#trunkwpadminjscustomnavigationdynamicfunctionsdevjs">trunk/wp-admin/js/custom-navigation-dynamic-functions.dev.js</a></li>
<li><a href="#trunkwpadminjscustomnavigationdynamicfunctionsjs">trunk/wp-admin/js/custom-navigation-dynamic-functions.js</a></li>
<li><a href="#trunkwpadminjscustomnavigationphpfunctionsdevjs">trunk/wp-admin/js/custom-navigation-php-functions.dev.js</a></li>
<li><a href="#trunkwpadminjscustomnavigationphpfunctionsjs">trunk/wp-admin/js/custom-navigation-php-functions.js</a></li>
<li><a href="#trunkwpincludescustomnavigationfunctionsphp">trunk/wp-includes/custom-navigation-functions.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpadmincsscustomnavigationcss"></a>
<div class="addfile"><h4>Added: trunk/wp-admin/css/custom-navigation.css (0 => 13257)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/css/custom-navigation.css                                (rev 0)
+++ trunk/wp-admin/css/custom-navigation.css        2010-02-20 21:57:43 UTC (rev 13257)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+.fix{clear:both;height:1px;margin:-1px 0 0;overflow:hidden;}#no-js{display:block;}.maintitle{margin:0 0 20px 0!important;}.logo{vertical-align:middle;margin:0 10px 0 0;}#pages-left{min-width:650px;max-width:1100px;width:100%;float:left;clear:left;margin-right:-315px;}#pages-left .inside{margin-top:20px;margin-right:315px;}#nav-container{margin-top:-3px;}.sidebar-name{background-color:#AAA;background-image:url(../../../../../wp-admin/images/ed-bg.gif);border-color:#DFDFDF;text-shadow:0 1px 0 #FFF;-moz-border-radius-topleft:8px;-moz-border-radius-topright:8px;background-position:0 0;background-repeat:repeat-x;border-style:solid;border-width:1px;cursor:pointer;font-size:13px;}.sidebar-name h3{font-size:13px;height:19px;margin:0;overflow:hidden;padding:5px 12px;white-space:nowrap;}.sidebar-name-arrow{background:transparent url(../../../../../wp-admin/images/menu-bits.gif) no-repeat scroll left -109px;float:right;height:29px;width:26px;}#menu-right{width:285px;margin-right:10px;margin-left:20px;float:left;clear:right;}h2.heading{margin:32px 0 10px 0;}.widgets-holder-wrap{margin:0 0 20px 0;}.widget-holder{padding:15px 10px;-moz-border-radius-bottomleft:8px;-moz-border-radius-bottomright:8px;border-style:none solid solid;border-width:0 1px 1px;background-color:#F1F1F1;border-color:#DDD;}.checkboxes{float:right;margin:10px 12px 0 0;}.addtomenu{display:block;float:right;margin:10px 0 0 0;text-shadow:0 -1px 0 rgba(0,0,0,0.3);background:#21759B url(../../../../../wp-admin/images/button-grad.png) repeat-x scroll left top;border-color:#298CBA!important;color:#FFF!important;font-weight:bold;-moz-border-radius-bottomleft:11px;-moz-border-radius-bottomright:11px;-moz-border-radius-topleft:11px;-moz-border-radius-topright:11px;border-style:solid;border-width:1px;cursor:pointer;font-size:11px!important;line-height:16px;padding:2px 8px;text-decoration:none;}.list{zoom:1;}.list li{margin:0;}.list dt{display:none;float:left;width:260px;margin:0;padding:0 0 0 5px;line-height:30px;border-bottom:1px solid #e3e3e3;}.list dt span{float:left;}.list dt img{cursor:pointer;float:right;margin:7px 5px 0 0;}#nav-container{padding:0 10px 10px 10px;background-color:#fff;border:1px solid #DFDFDF;border-top:none;-moz-border-radius-bottomleft:8px;-moz-border-radius-bottomright:8px;}#custom-nav ul{width:100%;}#custom-nav li{margin:0;}.ui-draggable-dragging{width:500px;}#custom-nav li dl dt{-webkit-border-bottom-left-radius:6px;-webkit-border-bottom-right-radius:6px;-webkit-border-top-left-radius:6px;-webkit-border-top-right-radius:6px;border-bottom-left-radius:6px;border-bottom-right-radius:6px;border-top-left-radius:6px;border-top-right-radius:6px;-moz-border-radius-bottomleft:6px;-moz-border-radius-bottomright:6px;-moz-border-radius-topleft:6px;-moz-border-radius-topright:6px;border:1px solid #E6E6E6;position:relative;padding-left:10px;background-color:#f1f1f1;height:35px;line-height:35px;}#custom-nav li dl dt:hover{cursor:move;}#custom-nav li dl dt .controls{position:absolute;right:15px;top:-1px;}#custom-nav li dl dt img{vertical-align:middle;}#custom-nav li .title{background:url(../images/ico-arrow.png) no-repeat 4px 5px;padding-left:15px;}#custom-nav li ul li{margin-left:20px;opacity:.7;}#custom-nav li ul li ul li{opacity:.9;}#custom-nav li ul li ul li ul li{opacity:.9;}#custom-nav li ul li ul li ul li ul li{opacity:.95;}#existing-pages li .title{background:url(../images/ico-arrow.png) no-repeat 4px 13px;padding-left:15px;}#existing-pages li ul li .title{margin-left:10px;}#existing-pages li ul li ul li .title{margin-left:20px;}#existing-pages li ul li ul li ul li .title{margin-left:30px;}#existing-pages li ul li ul li ul li ul li .title{margin-left:40px;}#existing-pages li ul li ul li ul li ul li ul li .title{margin-left:50px;}#existing-pages li ul li ul li ul li ul li ul li ul li .title{margin-left:60px;}#existing-pages li ul li ul li ul li ul li ul li ul li ul li .title{margin-left:70px;}#existing-pages li ul li ul li ul li ul li ul li ul li ul li ul li .title{margin-left:80px;}#existing-categories li .title{background:url(../images/ico-arrow.png) no-repeat 4px 13px;padding-left:15px;}#existing-categories li ul li .title{margin-left:10px;}#existing-categories li ul li ul li .title{margin-left:20px;}#existing-categories li ul li ul li ul li .title{margin-left:30px;}#existing-categories li ul li ul li ul li ul li .title{margin-left:40px;}#existing-categories li ul li ul li ul li ul li ul li .title{margin-left:50px;}#existing-categories li ul li ul li ul li ul li ul li ul li .title{margin-left:60px;}#existing-categories li ul li ul li ul li ul li ul li ul li ul li .title{margin-left:70px;}#existing-categories li ul li ul li ul li ul li ul li ul li ul li ul li .title{margin-left:80px;}img.remove,img.edit{cursor:pointer;margin:0 5px 0 0;}.dropzone{height:7px;margin:3px 0 3px 0;}.hide{display:none;}.type{text-transform:uppercase;font-size:11px;color:#999;padding-right:10px;}#menu_select{width:170px;}#dialog-confirm label{padding-left:10px;}.ui-dialog{background:#fff;border:1px solid #555;-moz-box-shadow:0 4px 30px #000;}.ui-dialog-titlebar{color:#CFCFCF;font-family:&quot;Lucida Grande&quot;,Verdana,Arial,sans-serif;padding:6px 10px 6px;background-color:#222!important;border:none!important;-moz-border-radius:none!important;}#dialog-confirm{height:168px!important;padding:20px 10px 10px;}#dialog-confirm input{margin:0 0 15px 0;width:280px;}#dialog-confirm select{margin:0 0 15px 0;}.ui-dialog-buttonpane{padding:10px;}.ui-dialog-buttonpane button{margin:0 10px 0 0;background:#F2F2F2;text-shadow:0 1px 0 #FFF;border-color:#BBB;color:#464646;-moz-border-radius-bottomleft:11px;-moz-border-radius-bottomright:11px;-moz-border-radius-topleft:11px;-moz-border-radius-topright:11px;border-style:solid;border-width:1px;cursor:pointer;font-size:11px!important;line-height:14px;padding:2px 8px;text-decoration:none;}.ui-dialog-buttonpane button:hover{color:#000;border-color:#666;}.ui-icon{display:none;}.ui-widget-overlay{position:absolute;top:0;left:0;width:100%;height:100%;}.ui-widget-overlay{background:#aaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x;opacity:.60;filter:Alpha(Opacity=60);}.ui-widget-shadow{margin:-8px 0 0 -8px;padding:8px;background:#aaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x;opacity:.60;filter:Alpha(Opacity=60);-moz-border-radius:8px;-webkit-border-radius:8px;}#reset_wp_menu{background:#c77 none!important;color:white!important;text-shadow:0 1px 0 #555!important;}
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkwpadmincsscustomnavigationdevcss"></a>
<div class="addfile"><h4>Added: trunk/wp-admin/css/custom-navigation.dev.css (0 => 13257)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/css/custom-navigation.dev.css                                (rev 0)
+++ trunk/wp-admin/css/custom-navigation.dev.css        2010-02-20 21:57:43 UTC (rev 13257)
</span><span class="lines">@@ -0,0 +1,168 @@
</span><ins>+/**
+ * WordPress Administration Custom Navigation
+ * Interface CSS
+ *
+ * @author Jeffikus &lt;pearce.jp@gmail.com&gt;
+ * @version 1.1.0
+ *
+ * @package WordPress
+ * @subpackage Administration
+ */

+.fix{clear: both;height: 1px;margin: -1px 0 0;overflow: hidden;}
+
+#no-js {display:block;}
+
+.maintitle  { margin: 0 0 20px 0!important;}
+
+.logo  { vertical-align: middle; margin: 0 10px 0 0; }
+
+#pages-left { min-width:650px;max-width:1100px;width: 100%; float:left; clear: left; margin-right: -315px; }
+#pages-left .inside  {margin-top: 20px; margin-right: 315px; }
+#nav-container  { margin-top: -3px; }
+
+.sidebar-name  { background-color:#AAAAAA;
+background-image:url(../../../../../wp-admin/images/ed-bg.gif);
+border-color:#DFDFDF;
+text-shadow:0 1px 0 #FFFFFF;-moz-border-radius-topleft:8px;
+-moz-border-radius-topright:8px;
+background-position:0 0;
+background-repeat:repeat-x;
+border-style:solid;
+border-width:1px;
+cursor:pointer;
+font-size:13px; }
+
+
+.sidebar-name h3 {
+font-size:13px;
+height:19px;
+margin:0;
+overflow:hidden;
+padding:5px 12px;
+white-space:nowrap;
+}
+
+.sidebar-name-arrow {
+background:transparent url(../../../../../wp-admin/images/menu-bits.gif) no-repeat scroll left -109px;
+float:right;
+height:29px;
+width:26px;
+}
+
+#menu-right { width: 285px; margin-right: 10px; margin-left: 20px; float:left; clear: right;}
+h2.heading  { margin: 32px 0 10px 0; }
+
+.widgets-holder-wrap  { margin: 0 0 20px 0; }
+.widget-holder {
+padding:15px 10px;
+-moz-border-radius-bottomleft:8px;
+-moz-border-radius-bottomright:8px;
+border-style:none solid solid;
+border-width:0 1px 1px;
+background-color:#F1F1F1;
+border-color:#DDDDDD;
+}
+
+.checkboxes  { float: right; margin: 10px 12px 0 0; }
+
+.addtomenu  {
+display: block;
+float: right;
+margin: 10px 0 0 0;
+text-shadow:0 -1px 0 rgba(0, 0, 0, 0.3);
+background:#21759B url(../../../../../wp-admin/images/button-grad.png) repeat-x scroll left top;
+border-color:#298CBA !important;
+color:#FFFFFF !important;
+font-weight:bold;
+-moz-border-radius-bottomleft:11px;
+-moz-border-radius-bottomright:11px;
+-moz-border-radius-topleft:11px;
+-moz-border-radius-topright:11px;
+border-style:solid;
+border-width:1px;
+cursor:pointer;
+font-size:11px !important;
+line-height:16px;
+padding:2px 8px;
+text-decoration:none;
+}
+
+.list { zoom: 1; }
+.list li  { margin: 0; }
+.list dt  { display:none; float: left; width: 260px; margin: 0; padding: 0 0 0 5px; line-height: 30px; border-bottom: 1px solid #e3e3e3;  }
+.list dt span  { float: left; }
+.list dt img  { cursor: pointer; float: right; margin: 7px 5px 0 0 }
+
+#nav-container  { padding: 0 10px 10px 10px; background-color: #fff; border: 1px solid #DFDFDF; border-top: none; -moz-border-radius-bottomleft:8px; -moz-border-radius-bottomright:8px; }
+
+#custom-nav ul  { width: 100%; }
+#custom-nav li { margin: 0; }
+.ui-draggable-dragging  { width: 500px; }
+#custom-nav li dl dt { -webkit-border-bottom-left-radius:6px;-webkit-border-bottom-right-radius:6px;-webkit-border-top-left-radius:6px;-webkit-border-top-right-radius:6px;border-bottom-left-radius:6px;border-bottom-right-radius:6px;border-top-left-radius:6px;border-top-right-radius:6px;-moz-border-radius-bottomleft:6px;-moz-border-radius-bottomright:6px;-moz-border-radius-topleft:6px;-moz-border-radius-topright:6px;
+border:1px solid #E6E6E6;position: relative; padding-left:10px;background-color: #f1f1f1; height: 35px; line-height: 35px; }
+#custom-nav li dl dt:hover  { cursor: move; }
+#custom-nav li dl dt .controls  { position: absolute; right: 15px; top: -1px; }
+#custom-nav li dl dt img { vertical-align: middle; }
+#custom-nav li dl dt a {}
+#custom-nav li .title { background:url(../images/ico-arrow.png) no-repeat 4px 5px; padding-left:15px; }
+#custom-nav li ul li { margin-left:20px; opacity:.7;}
+#custom-nav li ul li ul li  { opacity: .9;}
+#custom-nav li ul li ul li ul li   { opacity: .9;}
+#custom-nav li ul li ul li ul li ul li   { opacity: .95; }
+
+#existing-pages li .title { background:url(../images/ico-arrow.png) no-repeat 4px 13px;  padding-left:15px; }
+#existing-pages li ul li .title  { margin-left:10px; }
+#existing-pages li ul li ul li .title  { margin-left:20px; }
+#existing-pages li ul li ul li ul li .title  { margin-left:30px; }
+#existing-pages li ul li ul li ul li ul li .title  { margin-left:40px; }
+#existing-pages li ul li ul li ul li ul li ul li .title  { margin-left:50px; }
+#existing-pages li ul li ul li ul li ul li ul li ul li .title  { margin-left:60px; }
+#existing-pages li ul li ul li ul li ul li ul li ul li ul li .title  { margin-left:70px; }
+#existing-pages li ul li ul li ul li ul li ul li ul li ul li ul li .title  { margin-left:80px; }
+
+#existing-categories li .title { background:url(../images/ico-arrow.png) no-repeat 4px 13px;  padding-left:15px; }
+#existing-categories li ul li .title  { margin-left:10px; }
+#existing-categories li ul li ul li .title  { margin-left:20px; }
+#existing-categories li ul li ul li ul li .title  { margin-left:30px; }
+#existing-categories li ul li ul li ul li ul li .title  { margin-left:40px; }
+#existing-categories li ul li ul li ul li ul li ul li .title  { margin-left:50px; }
+#existing-categories li ul li ul li ul li ul li ul li ul li .title  { margin-left:60px; }
+#existing-categories li ul li ul li ul li ul li ul li ul li ul li .title  { margin-left:70px; }
+#existing-categories li ul li ul li ul li ul li ul li ul li ul li ul li .title  { margin-left:80px; }
+
+
+img.remove, img.edit  { cursor: pointer; margin: 0 5px 0 0; }
+
+.dropzone {height:7px;margin: 3px 0 3px 0;}
+
+#custom-nav li dl {}
+
+.hide {display:none;}
+
+.type { text-transform: uppercase; font-size: 11px; color: #999999; padding-right:10px; }
+
+#menu_select { width: 170px; }
+
+#dialog-confirm label { padding-left: 10px; }
+
+/* EDIT LINK BOX */
+.ui-dialog  { background: #fff; border: 1px solid #555555; -moz-box-shadow:0 4px 30px #000000; }
+.ui-dialog-titlebar  { color: #CFCFCF;font-family:&quot;Lucida Grande&quot;,Verdana,Arial,sans-serif; padding: 6px 10px 6px; background-color: #222222!important; border: none!important; -moz-border-radius: none!important; }
+#dialog-confirm  { height: 168px !important; padding: 20px 10px 10px; }
+#dialog-confirm input  { margin: 0 0 15px 0; width: 280px; }
+#dialog-confirm select { margin: 0 0 15px 0; }
+.ui-dialog-buttonpane  { padding: 10px; }
+.ui-dialog-buttonpane button  { margin: 0 10px 0 0; background:#F2F2F2; text-shadow:0 1px 0 #FFFFFF; border-color:#BBBBBB; color:#464646; -moz-border-radius-bottomleft:11px; -moz-border-radius-bottomright:11px; -moz-border-radius-topleft:11px; -moz-border-radius-topright:11px; border-style:solid; border-width:1px; cursor:pointer; font-size:11px !important; line-height:14px; padding:2px 8px; text-decoration:none; }
+
+.ui-dialog-buttonpane button:hover {color:#000;border-color:#666;}
+
+.ui-icon  { display: none; }
+
+/* Overlays */
+.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
+.ui-widget-overlay { background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .60;filter:Alpha(Opacity=60); }
+.ui-widget-shadow { margin: -8px 0 0 -8px; padding: 8px; background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .60;filter:Alpha(Opacity=60); -moz-border-radius: 8px; -webkit-border-radius: 8px; }
+
+
+#reset_wp_menu { background:#c77 none !important;color:white!important;text-shadow:0 1px 0 #555 !important;}
</ins></span></pre></div>
<a id="trunkwpadmincustomnavigationphp"></a>
<div class="addfile"><h4>Added: trunk/wp-admin/custom-navigation.php (0 => 13257)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/custom-navigation.php                                (rev 0)
+++ trunk/wp-admin/custom-navigation.php        2010-02-20 21:57:43 UTC (rev 13257)
</span><span class="lines">@@ -0,0 +1,590 @@
</span><ins>+&lt;?php
+/**
+ * WordPress Administration Custom Navigation
+ * Interface functions
+ *
+ * @author Jeffikus &lt;pearce.jp@gmail.com&gt;
+ * @version 1.1.0
+ *
+ * @package WordPress
+ * @subpackage Administration
+ */

+require_once('admin.php');
+
+wp_admin_css( 'custom-navigation' );
+wp_enqueue_script( 'custom-navigation-jquery' );
+wp_enqueue_script( 'custom-navigation-ui-custom' );
+wp_enqueue_script( 'custom-navigation-dynamic-functions' );
+wp_enqueue_script( 'custom-navigation-default-items' );
+wp_enqueue_script( 'custom-navigation-autocomplete' );
+wp_enqueue_script( 'custom-navigation-php-functions' );
+wp_enqueue_script( 'jquery-ui-dialog' );
+
+require_once('admin-header.php');
+require_once (ABSPATH . WPINC . '/custom-navigation-functions.php');
+
+wp_custom_navigation();
+
+function wp_custom_nav_reset() {
+        
+        global $wpdb;
+        
+        $table_name = $wpdb-&gt;prefix . &quot;custom_nav_records&quot;;                  
+        //DROP existing menu records
+        $wpdb-&gt;query(&quot;DELETE FROM &quot;.$table_name);
+        
+        $table_name_menus = $wpdb-&gt;prefix . &quot;custom_nav_menus&quot;;                  
+        //DELETE existing menus
+        $wpdb-&gt;query(&quot;DELETE FROM &quot;.$table_name_menus);
+        
+        wp_custom_navigation_setup(true);
+                
+        return true;
+        
+}
+
+
+/*-----------------------------------------------------------------------------------*/
+/* Custom Navigation Admin Interface
+/* wp_custom_navigation() is the main function for the Custom Navigation
+/* See functions in admin-functions.php
+/*-----------------------------------------------------------------------------------*/
+
+function wp_custom_navigation() {
+        global $wpdb, $user_ID;
+        ?&gt;
+
+        &lt;div class=&quot;wrap&quot;&gt;
+        &lt;div id=&quot;no-js&quot;&gt;&lt;h3&gt;You do not have JavaScript enabled in your browser. Please enabled it to access the Custom Menu functionality.&lt;/h3&gt;&lt;/div&gt;
+                        
+        &lt;?php
+        $messagesdiv = '';
+        $menu_id_in_edit = 0;
+            
+        //Get the theme name
+        $themename =  get_current_theme();
+            
+        //CHECK which menu is selected and if menu is in edit already
+        if ( isset( $_POST['switch_menu'] ) )
+                $menu_selected_id = $_POST['menu_select'];
+        elseif ( isset( $_POST['menu_id_in_edit'] ) )
+                $menu_selected_id = $_POST['menu_id_in_edit'];
+            
+        //Default Menu to show
+        $custom_menus = get_terms( 'menu', array( 'hide_empty' =&gt; false ) );
+         if ( !empty( $custom_menus ) )
+                $menu_selected_id = $custom_menus[0]-&gt;term_id;
+
+        $menu_title = '';
+        if ( $menu_selected_id &gt; 0 ) {
+                foreach( $custom_menus as $menu ) {
+                        if ( $menu-&gt;term_id == $menu_selected_id ) {
+                                $menu_title = $menu-&gt;name;
+                                break;
+                        }
+                }
+        }
+            
+        if ( isset( $_POST['set_wp_menu'] ) ) {
+                    update_option( 'wp_custom_nav_menu', $_POST['enable_wp_menu'] );
+                $messagesdiv = '&lt;div id=&quot;message&quot; class=&quot;updated fade below-h2&quot;&gt;&lt;p&gt;'.$themename.'s Custom Menu has been updated!&lt;/p&gt;&lt;/div&gt;';
+        } 
+          
+        if ( isset( $_POST['licount'] ) )
+                $postCounter = $_POST['licount'];
+        else
+                    $postCounter = 0;
+                
+        if ( isset( $_POST['add_menu'] ) ) {
+                 $insert_menu_name = $_POST['add_menu_name'];
+
+                 if ( $insert_menu_name != '' ) {
+                        $existing_term = get_term_by( 'name', $insert_menu_name, 'menu' );
+                         if ( $existing_term ) {
+                                 $messagesdiv = '&lt;div id=&quot;message&quot; class=&quot;error fade below-h2&quot;&gt;&lt;p&gt;'.$insert_menu_name.' Menu has already created - please try another name&lt;/p&gt;&lt;/div&gt;';
+                         } else { 
+                                $term = wp_insert_term( $insert_menu_name, 'menu' );
+                                if ( $term ) {
+                                        $custom_menus[$term['term_id']] = $term;
+                                         $menu_selected_id = $term['term_id'];
+                                         $menu_id_in_edit = $menu_selected_id;
+                                         $messagesdiv = '&lt;div id=&quot;message&quot; class=&quot;updated fade below-h2&quot;&gt;&lt;p&gt;'.$insert_menu_name.' Menu has been created!&lt;/p&gt;&lt;/div&gt;';        
+
+                                        $postCounter = 0;
+                                 }
+                         }
+                 } else {
+                         $messagesdiv = '&lt;div id=&quot;message&quot; class=&quot;error fade below-h2&quot;&gt;&lt;p&gt;Please enter a valid Menu name&lt;/p&gt;&lt;/div&gt;';
+                 }
+                         
+                        
+        }
+                
+        if (isset($_POST['reset_wp_menu'])) {        
+                    $success = wp_custom_nav_reset();
+                    if ($success) {
+                            //DISPLAY SUCCESS MESSAGE IF Menu Reset Correctly
+                         $messagesdiv = '&lt;div id=&quot;message&quot; class=&quot;updated fade below-h2&quot;&gt;&lt;p&gt;'.$themename.'s Custom Menu has been RESET!&lt;/p&gt;&lt;/div&gt;';
+                         //GET reset menu id
+                        $custom_menus = array();
+                        $menu_selected_id = 0;
+                    } else {
+                            //DISPLAY SUCCESS MESSAGE IF Menu Reset Correctly
+                        $messagesdiv = '&lt;div id=&quot;message&quot; class=&quot;error fade below-h2&quot;&gt;&lt;p&gt;'.$themename.'s Custom Menu could not be RESET. Please try again.&lt;/p&gt;&lt;/div&gt;';
+                    }
+        } elseif ( $postCounter &gt; 0 &amp;&amp; $menu_selected_id &gt; 0 ) {
+                $menu_objects = get_objects_in_term( $menu_selected_id, 'menu' );
+                $menu_items = wp_custom_navigation_get_menu_items( $menu_objects );
+
+                $update_fields = array( 'menu_order', 'guid', 'post_content', 'post_title', 'post_excerpt', 'post_content_filtered' );
+                //Loop through all POST variables
+                 for ($k = 1;$k&lt;= $postCounter; $k++) {
+                         
+                         if (isset($_POST['dbid'.$k])) { $db_id = $_POST['dbid'.$k]; } else { $db_id = 0; }
+                         if (isset($_POST['postmenu'.$k])) { $post_id = $_POST['postmenu'.$k]; } else { $post_id = 0; }
+//@todo implement heirarchy
+                        if (isset($_POST['parent'.$k])) { $parent_id = $_POST['parent'.$k]; } else { $parent_id = 0; }
+                         if (isset($_POST['title'.$k])) { $custom_title = stripslashes($_POST['title'.$k]); } else { $custom_title = ''; }
+                         if (isset($_POST['linkurl'.$k])) { $custom_linkurl = $_POST['linkurl'.$k]; } else { $custom_linkurl = ''; }
+                         if (isset($_POST['description'.$k])) { $custom_description = stripslashes($_POST['description'.$k]); } else { $custom_description = ''; }
+// doesn't seem to be used by UI
+                        if (isset($_POST['icon'.$k])) { $icon = $_POST['icon'.$k]; } else { $icon = 0; }
+                         if (isset($_POST['position'.$k])) { $position = $_POST['position'.$k]; } else { $position = 0; }
+                         if (isset($_POST['linktype'.$k])) { $linktype = $_POST['linktype'.$k]; } else { $linktype = 'custom'; }
+                         if (isset($_POST['anchortitle'.$k])) { $custom_anchor_title = stripslashes($_POST['anchortitle'.$k]); } else { $custom_anchor_title = $custom_title; }
+                         if (isset($_POST['newwindow'.$k])) { $new_window = $_POST['newwindow'.$k]; } else { $new_window = 0; }
+                         
+                        $post = array( 'post_status' =&gt; 'menu-' . $linktype, 'post_type' =&gt; 'menu_item', 'post_author' =&gt; $user_ID,
+                                'ping_status' =&gt; 0, 'post_parent' =&gt; $post_id, 'menu_order' =&gt; $position,
+                                'guid' =&gt; $custom_linkurl, 'post_excerpt' =&gt; $custom_anchor_title, 'tax_input' =&gt; array( 'menu' =&gt; $menu_title ),
+                                'post_content' =&gt; $custom_description, 'post_title' =&gt; $custom_title );
+                        if ( $new_window )
+                                $post['post_content_filtered'] = '_blank';
+                        else
+                                $post['post_content_filtered'] = '';
+
+                        //New menu item
+                         if ($db_id == 0) {
+                                $post_id = wp_insert_post( $post );
+                        } elseif ( isset( $menu_items[$db_id] ) ) {
+                                foreach( $update_fields as $field ) {
+                                        if ( $post[$field] != $menu_items[$db_id]-&gt;$field ) {
+                                                $post['ID'] = $db_id;
+                                                wp_insert_post( $post );
+                                                break;
+                                        }
+                                }
+                                unset( $menu_items[$db_id] );
+                        }
+                }
+                if ( !empty( $menu_items ) ) {
+                        foreach( array_keys( $menu_items ) as $menu_id ) {
+                                wp_delete_post( $menu_id );
+                        }
+                }
+                //DISPLAY SUCCESS MESSAGE IF POST CORRECT
+                $messagesdiv = '&lt;div id=&quot;message&quot; class=&quot;updated fade below-h2&quot;&gt;&lt;p&gt;'.$themename.'s Custom Menu has been updated!&lt;/p&gt;&lt;/div&gt;';
+        }
+                 
+                 //DISPLAY Custom Navigation
+                 ?&gt;
+                &lt;div id=&quot;pages-left&quot;&gt;
+                        &lt;div class=&quot;inside&quot;&gt;
+                        &lt;h2 class=&quot;maintitle&quot;&gt;Custom Navigation&lt;/h2&gt;
+                        &lt;?php
+                                
+                                //CHECK if custom menu has been enabled
+                                $enabled_menu = get_option('wp_custom_nav_menu');
+                            $checked = strtolower($enabled_menu);
+        
+                                if ($checked == 'true') {
+                                } else {
+                                        echo '&lt;div id=&quot;message-enabled&quot; class=&quot;error fade below-h2&quot;&gt;&lt;p&gt;&lt;strong&gt;The Custom Menu has not been Enabled yet. Please enable it in order to use it --------&gt;&lt;/strong&gt;&lt;/p&gt;&lt;/div&gt;';
+                                }
+                                
+                                
+                        ?&gt;
+                        &lt;?php echo $messagesdiv; ?&gt;
+                        &lt;form onsubmit=&quot;updatepostdata()&quot; action=&quot;custom-navigation.php&quot; method=&quot;post&quot;  enctype=&quot;multipart/form-data&quot;&gt;
+                        
+                        &lt;input type=&quot;hidden&quot; name=&quot;licount&quot; id=&quot;licount&quot; value=&quot;0&quot; /&gt;
+                        &lt;input type=&quot;hidden&quot; name=&quot;menu_id_in_edit&quot; id=&quot;menu_id_in_edit&quot; value=&quot;&lt;?php echo $menu_selected_id; ?&gt;&quot; /&gt;
+                        
+                        &lt;div class=&quot;sidebar-name&quot;&gt;
+                        
+                                &lt;div class=&quot;sidebar-name-arrow&quot;&gt;
+                                        &lt;br/&gt;
+                                &lt;/div&gt;
+                                &lt;h3&gt;&lt;?php echo $menu_title; ?&gt;&lt;/h3&gt;
+                                
+                        &lt;/div&gt;
+                        
+                        &lt;div id=&quot;nav-container&quot;&gt;
+                                &lt;ul id=&quot;custom-nav&quot;&gt;
+                                
+                        &lt;?php
+                        //DISPLAY existing menu
+                        if ( $menu_selected_id &gt; 0 ) {
+                                //SET output type
+                                $output_type = &quot;backend&quot;;
+                                //MAIN OUTPUT FUNCTION
+                                wp_custom_navigation_output( 'type='.$output_type.'&amp;name='.$menu_title.'&amp;id='.$menu_selected_id );
+                        }                                
+                        ?&gt;
+                                
+                                &lt;/ul&gt;
+                        &lt;/div&gt;&lt;!-- /#nav-container --&gt;
+                        
+                        &lt;p class=&quot;submit&quot;&gt;
+                        
+                        &lt;script type=&quot;text/javascript&quot;&gt;
+                                updatepostdata();                       
+                        &lt;/script&gt;
+                        
+                        &lt;input id=&quot;save_bottom&quot; name=&quot;save_bottom&quot; type=&quot;submit&quot; value=&quot;Save All Changes&quot; /&gt;&lt;/p&gt;
+                        &lt;/div&gt;&lt;!-- /.inside --&gt;
+                &lt;/div&gt;
+                
+                &lt;div id=&quot;menu-right&quot;&gt;
+                
+                        &lt;h2 class=&quot;heading&quot;&gt;Options&lt;/h2&gt;
+                        
+                        &lt;div class=&quot;widgets-holder-wrap&quot;&gt;
+                                &lt;div class=&quot;sidebar-name&quot;&gt;
+                                        &lt;div class=&quot;sidebar-name-arrow&quot;&gt;&lt;/div&gt;
+                                        &lt;h3&gt;Setup Custom Menu&lt;/h3&gt;
+                                &lt;/div&gt;
+                                &lt;div class=&quot;widget-holder&quot;&gt;
+                                                
+                                        &lt;?php
+                                    
+                                    //SETUP Custom Menu
+                                    
+                                        $enabled_menu = get_option('wp_custom_nav_menu');
+                                           
+                                    $checked = strtolower($enabled_menu);
+            
+                                    ?&gt;
+                                    
+                                    &lt;span &gt;
+                                            &lt;label&gt;Enable&lt;/label&gt;&lt;input type=&quot;radio&quot; name=&quot;enable_wp_menu&quot; value=&quot;true&quot; &lt;?php if ($checked=='true') { echo 'checked=&quot;checked&quot;'; } ?&gt; /&gt;
+                                            &lt;label&gt;Disable&lt;/label&gt;&lt;input type=&quot;radio&quot; name=&quot;enable_wp_menu&quot; value=&quot;false&quot; &lt;?php if ($checked=='true') { } else { echo 'checked=&quot;checked&quot;'; } ?&gt; /&gt;
+                                        &lt;/span&gt;&lt;!-- /.checkboxes --&gt;                                
+                                                
+                                        &lt;input id=&quot;set_wp_menu&quot; type=&quot;submit&quot; value=&quot;Set Menu&quot; name=&quot;set_wp_menu&quot; class=&quot;button&quot; /&gt;&lt;br /&gt;
+                                        
+                                        &lt;span&gt;
+                                                &lt;label&gt;Reset Menu to Default&lt;/label&gt;
+                                                &lt;input id=&quot;reset_wp_menu&quot; type=&quot;submit&quot; value=&quot;Reset&quot; name=&quot;reset_wp_menu&quot; class=&quot;button&quot; onclick=&quot;return confirm('Are you sure you want to RESET the Custom Navigation Menu to its Default Settings?');&quot; /&gt;
+                                        &lt;/span&gt;
+                                        
+                                        &lt;div class=&quot;fix&quot;&gt;&lt;/div&gt;
+                                &lt;/div&gt;
+                        &lt;/div&gt;&lt;!-- /.widgets-holder-wrap --&gt;
+                        
+                        &lt;div class=&quot;widgets-holder-wrap&quot;&gt;
+                                &lt;div class=&quot;sidebar-name&quot;&gt;
+                                        &lt;div class=&quot;sidebar-name-arrow&quot;&gt;&lt;/div&gt;
+                                        &lt;h3&gt;Menu Selector&lt;/h3&gt;
+                                &lt;/div&gt;
+                                &lt;div class=&quot;widget-holder&quot;&gt;
+                                        &lt;select id=&quot;menu_select&quot; name=&quot;menu_select&quot;&gt;
+                                                &lt;?php 
+                                                
+                                                //DISPLAY SELECT OPTIONS
+                                                foreach( $custom_menus as $menu ) {
+                                                        $menu_term = get_term( $menu, 'menu' );
+                                                        if ( ( $menu_id_in_edit == $menu ) || ( $menu_selected_id == $menu ) )
+                                                                $selected_option = 'selected=&quot;selected&quot;';
+                                                        else
+                                                                $selected_option = '';
+                                                        ?&gt;
+                                                        &lt;option value=&quot;&lt;?php echo $menu_term-&gt;term_id; ?&gt;&quot; &lt;?php echo $selected_option; ?&gt;&gt;&lt;?php echo $menu_term-&gt;name; ?&gt;&lt;/option&gt;
+                                                        &lt;?php
+                                                        
+                                                }
+                                                ?&gt;
+                                        &lt;/select&gt;
+                                        
+                                        &lt;input id=&quot;switch_menu&quot; type=&quot;submit&quot; value=&quot;Switch&quot; name=&quot;switch_menu&quot; class=&quot;button&quot; /&gt;
+                                        &lt;input id=&quot;add_menu_name&quot; name=&quot;add_menu_name&quot; type=&quot;text&quot; value=&quot;&quot;  /&gt;
+                                        &lt;input id=&quot;add_menu&quot; type=&quot;submit&quot; value=&quot;Add Menu&quot; name=&quot;add_menu&quot; class=&quot;button&quot; /&gt;
+                                                
+                                        &lt;div class=&quot;fix&quot;&gt;&lt;/div&gt;
+                                &lt;/div&gt;
+                        &lt;/div&gt;&lt;!-- /.widgets-holder-wrap --&gt;
+                        &lt;?php $advanced_option_descriptions = get_option('wp_settings_custom_nav_advanced_options'); ?&gt;
+                        &lt;div class=&quot;widgets-holder-wrap&quot; style=&quot;display:none;&quot;&gt;
+                                &lt;div class=&quot;sidebar-name&quot;&gt;
+                                        &lt;div class=&quot;sidebar-name-arrow&quot;&gt;&lt;/div&gt;
+                                        &lt;h3&gt;Top Level Menu Descriptions&lt;/h3&gt;
+                                &lt;/div&gt;
+                                &lt;div class=&quot;widget-holder&quot;&gt;        
+                                        &lt;span&gt;Display Descriptions in Top Level Menu?&lt;/span&gt;
+                        
+                                        &lt;?php
+                                    
+                                    //UPDATE and DISPLAY Menu Description Option
+                                    if (isset($_POST['menu-descriptions']))
+                                    {
+                                            
+                                                if (isset($_POST['switch_menu'])) {
+                                                        
+                                                }
+                                                else {
+                                                        $menu_options_to_edit = $_POST['menu_id_in_edit'];
+                                                    update_option('wp_settings_custom_nav_'.$menu_options_to_edit.'_descriptions',$_POST['menu-descriptions']);        
+                                                }
+                                            
+                                    }
+                                    
+                                    if ($menu_id_in_edit &gt; 0)
+                                        {
+                                                $checkedraw = get_option('wp_settings_custom_nav_'.$menu_id_in_edit.'_descriptions');
+                                        }
+                                        else {
+                                                $checkedraw = get_option('wp_settings_custom_nav_'.$menu_selected_id.'_descriptions');
+                                        }
+                            
+                                    $checked = strtolower($checkedraw);
+                                    
+                                    if ($advanced_option_descriptions == 'no')
+                                    {
+                                            $checked = 'no';
+                                    }
+                                    
+                                    ?&gt;
+                                    
+                                    &lt;span class=&quot;checkboxes&quot;&gt;
+                                            &lt;label&gt;Yes&lt;/label&gt;&lt;input type=&quot;radio&quot; name=&quot;menu-descriptions&quot; value=&quot;yes&quot; &lt;?php if ($checked=='yes') { echo 'checked=&quot;checked&quot;'; } ?&gt; /&gt;
+                                            &lt;label&gt;No&lt;/label&gt;&lt;input type=&quot;radio&quot; name=&quot;menu-descriptions&quot; value=&quot;no&quot; &lt;?php if ($checked=='yes') { } else { echo 'checked=&quot;checked&quot;'; } ?&gt; /&gt;
+                                        &lt;/span&gt;&lt;!-- /.checkboxes --&gt;
+                                    &lt;/form&gt;
+                                        &lt;div class=&quot;fix&quot;&gt;&lt;/div&gt;
+                                &lt;/div&gt;
+                        &lt;/div&gt;&lt;!-- /.widgets-holder-wrap --&gt;
+                        
+                        &lt;div class=&quot;widgets-holder-wrap&quot;&gt;
+                                &lt;div class=&quot;sidebar-name&quot;&gt;
+                                        &lt;div class=&quot;sidebar-name-arrow&quot;&gt;&lt;/div&gt;
+                                        &lt;h3&gt;Add an Existing Page&lt;/h3&gt;
+                                &lt;/div&gt;
+                                &lt;div class=&quot;widget-holder&quot;&gt;
+                                        
+                                        &lt;?php
+                                        
+                                        $pages_args = array(
+                                    'child_of' =&gt; 0,
+                                        'sort_order' =&gt; 'ASC',
+                                        'sort_column' =&gt; 'post_title',
+                                        'hierarchical' =&gt; 1,
+                                        'exclude' =&gt; '',
+                                        'include' =&gt; '',
+                                        'meta_key' =&gt; '',
+                                        'meta_value' =&gt; '',
+                                        'authors' =&gt; '',
+                                        'parent' =&gt; -1,
+                                        'exclude_tree' =&gt; '',
+                                        'number' =&gt; '',
+                                        'offset' =&gt; 0 );
+        
+                                        //GET all pages                
+                                        $pages_array = get_pages($pages_args);
+                                        $page_name = '';
+                                        //CHECK if pages exist
+                                        if ($pages_array)
+                                        {
+                                                foreach ($pages_array as $post)
+                                                {
+                                                        //Add page name to 
+                                                        $page_name .= htmlentities($post-&gt;post_title).'|';
+                                                }
+                                        }
+                                        else
+                                        {
+                                                $page_name = &quot;No pages available&quot;;
+                                        }
+                                                
+                                        ?&gt;
+                                        
+                                        &lt;script&gt;
+                                                  $(document).ready(function(){
+
+                                                        //GET PHP pages
+                                                    var dataposts = &quot;&lt;?php echo $page_name; ?&gt;&quot;.split(&quot;|&quot;);
+                                                
+                                                        //Set autocomplete
+                                                        $(&quot;#page-search&quot;).autocomplete(dataposts);
+                                                
+                                                        //Handle autocomplete result
+                                                        $(&quot;#page-search&quot;).result(function(event, data, formatted) {
+                                                            $('#existing-pages').css('display','block');
+                                                            $(&quot;#existing-pages dt:contains('&quot; + data + &quot;')&quot;).css(&quot;display&quot;, &quot;block&quot;);
+                                                    
+                                                            $('#show-pages').hide();
+                                                            $('#hide-pages').show();
+                                                    
+                                                        });
+                                                        $('#existing-pages').css('display','none');
+                                                 });
+                                          &lt;/script&gt;
+
+
+                                        &lt;input type=&quot;text&quot; onfocus=&quot;jQuery('#page-search').attr('value','');&quot; id=&quot;page-search&quot; value=&quot;Search Pages&quot; /&gt; 
+                                        
+                                        &lt;a id=&quot;show-pages&quot; style=&quot;cursor:pointer;&quot; onclick=&quot;jQuery('#existing-pages').css('display','block');jQuery('#page-search').attr('value','');jQuery('#existing-pages dt').css('display','block');jQuery('#show-pages').hide();jQuery('#hide-pages').show();&quot;&gt;View All&lt;/a&gt; 
+                                        &lt;a id=&quot;hide-pages&quot; style=&quot;cursor:pointer;&quot; onclick=&quot;jQuery('#existing-pages').css('display','none');jQuery('#page-search').attr('value','Search Pages');jQuery('#existing-pages dt').css('display','none');jQuery('#show-pages').show();jQuery('#hide-pages').hide();&quot;&gt;Hide All&lt;/a&gt;
+                                        
+                                        &lt;script type=&quot;text/javascript&quot;&gt;
+                                        
+                                                jQuery('#hide-pages').hide();
+                                        
+                                        &lt;/script&gt;
+                                        
+                                        &lt;ul id=&quot;existing-pages&quot; class=&quot;list&quot;&gt;
+                                                &lt;?php
+                                                        $intCounter = 0;
+                                                        //Get default Pages
+                                                        $intCounter = wp_custom_nav_get_pages($intCounter,'default');
+                                                ?&gt;
+                                        &lt;/ul&gt;
+                                        
+                                        &lt;div class=&quot;fix&quot;&gt;&lt;/div&gt;
+                                        
+                                &lt;/div&gt;
+                        &lt;/div&gt;&lt;!-- /.widgets-holder-wrap --&gt;
+                        
+                        &lt;div class=&quot;widgets-holder-wrap&quot;&gt;
+                                &lt;div class=&quot;sidebar-name&quot;&gt;
+                                        &lt;div class=&quot;sidebar-name-arrow&quot;&gt;&lt;/div&gt;
+                                        &lt;h3&gt;Add an Existing Category&lt;/h3&gt;
+                                &lt;/div&gt;
+                                &lt;div class=&quot;widget-holder&quot;&gt;
+                                        
+                                        &lt;?php
+                                        
+                                        //Custom GET categories query
+                                        $categories = $wpdb-&gt;get_results(&quot;SELECT term_id FROM $wpdb-&gt;term_taxonomy WHERE taxonomy = 'category' ORDER BY term_id ASC&quot;);
+                                        $cat_name = '';
+                                        //CHECK for results
+                                        if ($categories)
+                                        {
+                                                foreach($categories as $category) 
+                                                { 
+                                                        $cat_id = $category-&gt;term_id;
+                                
+                                                        $cat_args=array(
+                                                                 'orderby' =&gt; 'name',
+                                                                  'include' =&gt; $cat_id,
+                                                                  'hierarchical' =&gt; 1,
+                                                                  'order' =&gt; 'ASC'
+                                                          );
+                                                          
+                                                          $category_names=get_categories($cat_args);
+                                                        
+                                                        if (isset($category_names[0]-&gt;name))
+                                                        {
+                                                                //Add category name to data string
+                                                                $cat_name .= htmlentities($category_names[0]-&gt;name).'|';
+                                                        }
+                                                  }
+                                          }
+                                          else
+                                        {
+                                                $cat_name = &quot;No categories available&quot;;
+                                        }
+                                  
+                                        ?&gt;
+
+                                        &lt;script&gt;
+                                                  $(document).ready(function(){
+
+                                                        //GET PHP categories
+                                                    var datacats = &quot;&lt;?php echo $cat_name; ?&gt;&quot;.split(&quot;|&quot;);
+                                                        
+                                                        //Set autocomplete
+                                                        $(&quot;#cat-search&quot;).autocomplete(datacats);
+                                                
+                                                        //Handle autocomplete result
+                                                        $(&quot;#cat-search&quot;).result(function(event, data, formatted) {
+                                                            $('#existing-categories').css('display','block');
+                                                            $(&quot;#existing-categories dt:contains('&quot; + data + &quot;')&quot;).css(&quot;display&quot;, &quot;block&quot;);
+                                                                                                       
+                                                            $('#show-cats').hide();
+                                                            $('#hide-cats').show();
+                                                    
+                                                        });
+                                                        $('#existing-categories').css('display','none');
+                                        
+                                                 });
+                                          &lt;/script&gt;
+
+
+                                        &lt;input type=&quot;text&quot; onfocus=&quot;jQuery('#cat-search').attr('value','');&quot; id=&quot;cat-search&quot; value=&quot;Search Categories&quot; /&gt; 
+                                        
+                                        &lt;a id=&quot;show-cats&quot; style=&quot;cursor:pointer;&quot; onclick=&quot;jQuery('#existing-categories').css('display','block');jQuery('#cat-search').attr('value','');jQuery('#existing-categories dt').css('display','block');jQuery('#show-cats').hide();jQuery('#hide-cats').show();&quot;&gt;View All&lt;/a&gt; 
+                                        &lt;a id=&quot;hide-cats&quot; style=&quot;cursor:pointer;&quot; onclick=&quot;jQuery('#existing-categories').css('display','none');jQuery('#cat-search').attr('value','Search Categories');jQuery('#existing-categories dt').css('display','none');jQuery('#show-cats').show();jQuery('#hide-cats').hide();&quot;&gt;Hide All&lt;/a&gt;
+                                        
+                                        &lt;script type=&quot;text/javascript&quot;&gt;
+                                        
+                                                jQuery('#hide-cats').hide();
+                                        
+                                        &lt;/script&gt;
+                                        
+                                        &lt;ul id=&quot;existing-categories&quot; class=&quot;list&quot;&gt;
+                                    &lt;?php
+                                                         //Get default Categories
+                                            $intCounter = wp_custom_nav_get_categories($intCounter,'default');                                 
+                                                ?&gt;
+                                       &lt;/ul&gt;
+                                       
+                                       &lt;div class=&quot;fix&quot;&gt;&lt;/div&gt;
+                                        
+                                &lt;/div&gt;
+                        &lt;/div&gt;&lt;!-- /.widgets-holder-wrap --&gt;
+                        
+                        &lt;div class=&quot;widgets-holder-wrap&quot;&gt;
+                                &lt;div class=&quot;sidebar-name&quot;&gt;
+                                        &lt;div class=&quot;sidebar-name-arrow&quot;&gt;&lt;/div&gt;
+                                        &lt;h3&gt;Add a Custom Url&lt;/h3&gt;
+                                &lt;/div&gt;
+                                &lt;div class=&quot;widget-holder&quot;&gt;
+                                        &lt;input id=&quot;custom_menu_item_url&quot; type=&quot;text&quot; value=&quot;http://&quot;  /&gt;
+                                        &lt;label&gt;URL&lt;/label&gt;&lt;br /&gt;
+                                   &lt;?php $templatedir = get_bloginfo('url'); ?&gt;
+                            &lt;input type=&quot;hidden&quot; id=&quot;templatedir&quot; value=&quot;&lt;?php echo $templatedir; ?&gt;&quot; /&gt;
+                            &lt;input id=&quot;custom_menu_item_name&quot; type=&quot;text&quot; value=&quot;Menu Item&quot; onfocus=&quot;jQuery('#custom_menu_item_name').attr('value','');&quot;  /&gt;
+                            &lt;label&gt;Menu Text&lt;/label&gt;&lt;br /&gt;
+                                   &lt;input id=&quot;custom_menu_item_description&quot; type=&quot;text&quot; value=&quot;A description&quot; &lt;?php if ($advanced_option_descriptions == 'no') { ?&gt;style=&quot;display:none;&quot;&lt;?php } ?&gt; onfocus=&quot;jQuery('#custom_menu_item_description').attr('value','');&quot; /&gt;
+                                   &lt;label &lt;?php if ($advanced_option_descriptions == 'no') { ?&gt;style=&quot;display:none;&quot;&lt;?php } ?&gt; &gt;Description&lt;/label&gt;
+                                   &lt;a class=&quot;addtomenu&quot; onclick=&quot;appendToList('&lt;?php echo $templatedir; ?&gt;','Custom','','','','0','');jQuery('#custom_menu_item_name').attr('value','Menu Item');jQuery('#custom_menu_item_description').attr('value','A description');&quot;&gt;Add to menu&lt;/a&gt;
+                                        &lt;div class=&quot;fix&quot;&gt;&lt;/div&gt;
+                                &lt;/div&gt;
+                        &lt;/div&gt;&lt;!-- /.widgets-holder-wrap --&gt;
+                        
+       &lt;/div&gt;
+    &lt;/div&gt;
+    
+    &lt;script type=&quot;text/javascript&quot;&gt;
+                document.getElementById('pages-left').style.display='block';
+                document.getElementById('menu-right').style.display='block';
+                document.getElementById('no-js').style.display='none';
+        &lt;/script&gt;
+        
+        &lt;div id=&quot;dialog-confirm&quot; title=&quot;Edit Menu Item&quot;&gt;
+                &lt;/label&gt;&lt;input id=&quot;edittitle&quot; type=&quot;text&quot; name=&quot;edittitle&quot; value=&quot;&quot; /&gt;&lt;label class=&quot;editlabel&quot; for=&quot;edittitle&quot;&gt;Menu Title&lt;/label&gt;&lt;br /&gt;
+                &lt;input id=&quot;editlink&quot; type=&quot;text&quot; name=&quot;editlink&quot; value=&quot;&quot; /&gt;&lt;label class=&quot;editlabel&quot; for=&quot;editlink&quot;&gt;URL&lt;/label&gt;&lt;br /&gt;
+                &lt;input id=&quot;editanchortitle&quot; type=&quot;text&quot; name=&quot;editanchortitle&quot; value=&quot;&quot; /&gt;&lt;label class=&quot;editlabel&quot; for=&quot;editanchortitle&quot; &gt;Link Title&lt;/label&gt;&lt;br /&gt;
+                &lt;select id=&quot;editnewwindow&quot; name=&quot;editnewwindow&quot;&gt;
+                        &lt;option value=&quot;1&quot; &gt;Yes&lt;/option&gt;
+                        &lt;option value=&quot;0&quot; &gt;No&lt;/option&gt;
+                &lt;/select&gt;&lt;label class=&quot;editlabel&quot; for=&quot;editnewwindow&quot; &gt;Open Link in a New Window&lt;/label&gt;
+                &lt;input id=&quot;editdescription&quot; type=&quot;text&quot; name=&quot;editdescription&quot; value=&quot;&quot; &lt;?php if ($advanced_option_descriptions == 'no') { ?&gt;style=&quot;display:none;&quot;&lt;?php } ?&gt; /&gt;&lt;label class=&quot;editlabel&quot; for=&quot;editdescription&quot; &lt;?php if ($advanced_option_descriptions == 'no') { ?&gt;style=&quot;display:none;&quot;&lt;?php } ?&gt; &gt;Description&lt;/label&gt;&lt;br /&gt;
+        &lt;/div&gt;
+
+&lt;?php
+
+}
+
+include(&quot;admin-footer.php&quot;);
</ins></span></pre></div>
<a id="trunkwpadminjscustomnavigationcustomjquery132devjs"></a>
<div class="addfile"><h4>Added: trunk/wp-admin/js/custom-navigation-custom-jquery-1.3.2.dev.js (0 => 13257)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/js/custom-navigation-custom-jquery-1.3.2.dev.js                                (rev 0)
+++ trunk/wp-admin/js/custom-navigation-custom-jquery-1.3.2.dev.js        2010-02-20 21:57:43 UTC (rev 13257)
</span><span class="lines">@@ -0,0 +1,19 @@
</span><ins>+/*
+ * jQuery JavaScript Library v1.3.2
+ * http://jquery.com/
+ *
+ * Copyright (c) 2009 John Resig
+ * Dual licensed under the MIT and GPL licenses.
+ * http://docs.jquery.com/License
+ *
+ * Date: 2009-02-19 17:34:21 -0500 (Thu, 19 Feb 2009)
+ * Revision: 6246
+ */
+(function(){var l=this,g,y=l.jQuery,p=l.$,o=l.jQuery=l.$=function(E,F){return new o.fn.init(E,F)},D=/^[^&lt;]*(&lt;(.|\s)+&gt;)[^&gt;]*$|^#([\w-]+)$/,f=/^.[^:#\[\.,]*$/;o.fn=o.prototype={init:function(E,H){E=E||document;if(E.nodeType){this[0]=E;this.length=1;this.context=E;return this}if(typeof E===&quot;string&quot;){var G=D.exec(E);if(G&amp;&amp;(G[1]||!H)){if(G[1]){E=o.clean([G[1]],H)}else{var I=document.getElementById(G[3]);if(I&amp;&amp;I.id!=G[3]){return o().find(E)}var F=o(I||[]);F.context=document;F.selector=E;return F}}else{return o(H).find(E)}}else{if(o.isFunction(E)){return o(document).ready(E)}}if(E.selector&amp;&amp;E.context){this.selector=E.selector;this.context=E.context}return this.setArray(o.isArray(E)?E:o.makeArray(E))},selector:&quot;&quot;,jquery:&quot;1.3.2&quot;,size:function(){return this.length},get:function(E){return E===g?Array.prototype.slice.call(this):this[E]},pushStack:function(F,H,E){var G=o(F);G.prevObject=this;G.context=this.context;if(H===&quot;find&quot;){G.selector=this.selector+(this.selector?&quot; &quot;:&quot;&quot;)+E}else{if(H){G.selector=this.selector+&quot;.&quot;+H+&quot;(&quot;+E+&quot;)&quot;}}return G},setArray:function(E){this.length=0;Array.prototype.push.apply(this,E);return this},each:function(F,E){return o.each(this,F,E)},index:function(E){return o.inArray(E&amp;&amp;E.jquery?E[0]:E,this)},attr:function(F,H,G){var E=F;if(typeof F===&quot;string&quot;){if(H===g){return this[0]&amp;&amp;o[G||&quot;attr&quot;](this[0],F)}else{E={};E[F]=H}}return this.each(function(I){for(F in E){o.attr(G?this.style:this,F,o.prop(this,E[F],G,I,F))}})},css:function(E,F){if((E==&quot;width&quot;||E==&quot;height&quot;)&amp;&amp;parseFloat(F)&lt;0){F=g}return this.attr(E,F,&quot;curCSS&quot;)},text:function(F){if(typeof F!==&quot;object&quot;&amp;&amp;F!=null){return this.empty().append((this[0]&amp;&amp;this[0].ownerDocument||document).createTextNode(F))}var E=&quot;&quot;;o.each(F||this,function(){o.each(this.childNodes,function(){if(this.nodeType!=8){E+=this.nodeType!=1?this.nodeValue:o.fn.text([this])}})});return E},wrapAll:function(E){if(this[0]){var F=o(E,this[0].ownerDocument).clone();if(this[0].parentNode){F.insertBefore(this[0])}F.map(function(){var G=this;while(G.firstChild){G=G.firstChild}return G}).append(this)}return this},wrapInner:function(E){return this.each(function(){o(this).contents().wrapAll(E)})},wrap:function(E){return this.each(function(){o(this).wrapAll(E)})},append:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.appendChild(E)}})},prepend:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.insertBefore(E,this.firstChild)}})},before:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this)})},after:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this.nextSibling)})},end:function(){return this.prevObject||o([])},push:[].push,sort:[].sort,splice:[].splice,find:function(E){if(this.length===1){var F=this.pushStack([],&quot;find&quot;,E);F.length=0;o.find(E,this[0],F);return F}else{return this.pushStack(o.unique(o.map(this,function(G){return o.find(E,G)})),&quot;find&quot;,E)}},clone:function(G){var E=this.map(function(){if(!o.support.noCloneEvent&amp;&amp;!o.isXMLDoc(this)){var I=this.outerHTML;if(!I){var J=this.ownerDocument.createElement(&quot;div&quot;);J.appendChild(this.cloneNode(true));I=J.innerHTML}return o.clean([I.replace(/ jQuery\d+=&quot;(?:\d+|null)&quot;/g,&quot;&quot;).replace(/^\s*/,&quot;&quot;)])[0]}else{return this.cloneNode(true)}});if(G===true){var H=this.find(&quot;*&quot;).andSelf(),F=0;E.find(&quot;*&quot;).andSelf().each(function(){if(this.nodeName!==H[F].nodeName){return}var I=o.data(H[F],&quot;events&quot;);for(var K in I){for(var J in I[K]){o.event.add(this,K,I[K][J],I[K][J].data)}}F++})}return E},filter:function(E){return this.pushStack(o.isFunction(E)&amp;&amp;o.grep(this,function(G,F){return E.call(G,F)})||o.multiFilter(E,o.grep(this,function(F){return F.nodeType===1})),&quot;filter&quot;,E)},closest:function(E){var G=o.expr.match.POS.test(E)?o(E):null,F=0;return this.map(function(){var H=this;while(H&amp;&amp;H.ownerDocument){if(G?G.index(H)&gt;-1:o(H).is(E)){o.data(H,&quot;closest&quot;,F);return H}H=H.parentNode;F++}})},not:function(E){if(typeof E===&quot;string&quot;){if(f.test(E)){return this.pushStack(o.multiFilter(E,this,true),&quot;not&quot;,E)}else{E=o.multiFilter(E,this)}}var F=E.length&amp;&amp;E[E.length-1]!==g&amp;&amp;!E.nodeType;return this.filter(function(){return F?o.inArray(this,E)&lt;0:this!=E})},add:function(E){return this.pushStack(o.unique(o.merge(this.get(),typeof E===&quot;string&quot;?o(E):o.makeArray(E))))},is:function(E){return !!E&amp;&amp;o.multiFilter(E,this).length&gt;0},hasClass:function(E){return !!E&amp;&amp;this.is(&quot;.&quot;+E)},val:function(K){if(K===g){var E=this[0];if(E){if(o.nodeName(E,&quot;option&quot;)){return(E.attributes.value||{}).specified?E.value:E.text}if(o.nodeName(E,&quot;select&quot;)){var I=E.selectedIndex,L=[],M=E.options,H=E.type==&quot;select-one&quot;;if(I&lt;0){return null}for(var F=H?I:0,J=H?I+1:M.length;F&lt;J;F++){var G=M[F];if(G.selected){K=o(G).val();if(H){return K}L.push(K)}}return L}return(E.value||&quot;&quot;).replace(/\r/g,&quot;&quot;)}return g}if(typeof K===&quot;number&quot;){K+=&quot;&quot;}return this.each(function(){if(this.nodeType!=1){return}if(o.isArray(K)&amp;&amp;/radio|checkbox/.test(this.type)){this.checked=(o.inArray(this.value,K)&gt;=0||o.inArray(this.name,K)&gt;=0)}else{if(o.nodeName(this,&quot;select&quot;)){var N=o.makeArray(K);o(&quot;option&quot;,this).each(function(){this.selected=(o.inArray(this.value,N)&gt;=0||o.inArray(this.text,N)&gt;=0)});if(!N.length){this.selectedIndex=-1}}else{this.value=K}}})},html:function(E){return E===g?(this[0]?this[0].innerHTML.replace(/ jQuery\d+=&quot;(?:\d+|null)&quot;/g,&quot;&quot;):null):this.empty().append(E)},replaceWith:function(E){return this.after(E).remove()},eq:function(E){return this.slice(E,+E+1)},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments),&quot;slice&quot;,Array.prototype.slice.call(arguments).join(&quot;,&quot;))},map:function(E){return this.pushStack(o.map(this,function(G,F){return E.call(G,F,G)}))},andSelf:function(){return this.add(this.prevObject)},domManip:function(J,M,L){if(this[0]){var I=(this[0].ownerDocument||this[0]).createDocumentFragment(),F=o.clean(J,(this[0].ownerDocument||this[0]),I),H=I.firstChild;if(H){for(var G=0,E=this.length;G&lt;E;G++){L.call(K(this[G],H),this.length&gt;1||G&gt;0?I.cloneNode(true):I)}}if(F){o.each(F,z)}}return this;function K(N,O){return M&amp;&amp;o.nodeName(N,&quot;table&quot;)&amp;&amp;o.nodeName(O,&quot;tr&quot;)?(N.getElementsByTagName(&quot;tbody&quot;)[0]||N.appendChild(N.ownerDocument.createElement(&quot;tbody&quot;))):N}}};o.fn.init.prototype=o.fn;function z(E,F){if(F.src){o.ajax({url:F.src,async:false,dataType:&quot;script&quot;})}else{o.globalEval(F.text||F.textContent||F.innerHTML||&quot;&quot;)}if(F.parentNode){F.parentNode.removeChild(F)}}function e(){return +new Date}o.extend=o.fn.extend=function(){var J=arguments[0]||{},H=1,I=arguments.length,E=false,G;if(typeof J===&quot;boolean&quot;){E=J;J=arguments[1]||{};H=2}if(typeof J!==&quot;object&quot;&amp;&amp;!o.isFunction(J)){J={}}if(I==H){J=this;--H}for(;H&lt;I;H++){if((G=arguments[H])!=null){for(var F in G){var K=J[F],L=G[F];if(J===L){continue}if(E&amp;&amp;L&amp;&amp;typeof L===&quot;object&quot;&amp;&amp;!L.nodeType){J[F]=o.extend(E,K||(L.length!=null?[]:{}),L)}else{if(L!==g){J[F]=L}}}}}return J};var b=/z-?index|font-?weight|opacity|zoom|line-?height/i,q=document.defaultView||{},s=Object.prototype.toString;o.extend({noConflict:function(E){l.$=p;if(E){l.jQuery=y}return o},isFunction:function(E){return s.call(E)===&quot;[object Function]&quot;},isArray:function(E){return s.call(E)===&quot;[object Array]&quot;},isXMLDoc:function(E){return E.nodeType===9&amp;&amp;E.documentElement.nodeName!==&quot;HTML&quot;||!!E.ownerDocument&amp;&amp;o.isXMLDoc(E.ownerDocument)},globalEval:function(G){if(G&amp;&amp;/\S/.test(G)){var F=document.getElementsByTagName(&quot;head&quot;)[0]||document.documentElement,E=document.createElement(&quot;script&quot;);E.type=&quot;text/javascript&quot;;if(o.support.scriptEval){E.appendChild(document.createTextNode(G))}else{E.text=G}F.insertBefore(E,F.firstChild);F.removeChild(E)}},nodeName:function(F,E){return F.nodeName&amp;&amp;F.nodeName.toUpperCase()==E.toUpperCase()},each:function(G,K,F){var E,H=0,I=G.length;if(F){if(I===g){for(E in G){if(K.apply(G[E],F)===false){break}}}else{for(;H&lt;I;){if(K.apply(G[H++],F)===false){break}}}}else{if(I===g){for(E in G){if(K.call(G[E],E,G[E])===false){break}}}else{for(var J=G[0];H&lt;I&amp;&amp;K.call(J,H,J)!==false;J=G[++H]){}}}return G},prop:function(H,I,G,F,E){if(o.isFunction(I)){I=I.call(H,F)}return typeof I===&quot;number&quot;&amp;&amp;G==&quot;curCSS&quot;&amp;&amp;!b.test(E)?I+&quot;px&quot;:I},className:{add:function(E,F){o.each((F||&quot;&quot;).split(/\s+/),function(G,H){if(E.nodeType==1&amp;&amp;!o.className.has(E.className,H)){E.className+=(E.className?&quot; &quot;:&quot;&quot;)+H}})},remove:function(E,F){if(E.nodeType==1){E.className=F!==g?o.grep(E.className.split(/\s+/),function(G){return !o.className.has(F,G)}).join(&quot; &quot;):&quot;&quot;}},has:function(F,E){return F&amp;&amp;o.inArray(E,(F.className||F).toString().split(/\s+/))&gt;-1}},swap:function(H,G,I){var E={};for(var F in G){E[F]=H.style[F];H.style[F]=G[F]}I.call(H);for(var F in G){H.style[F]=E[F]}},css:function(H,F,J,E){if(F==&quot;width&quot;||F==&quot;height&quot;){var L,G={position:&quot;absolute&quot;,visibility:&quot;hidden&quot;,display:&quot;block&quot;},K=F==&quot;width&quot;?[&quot;Left&quot;,&quot;Right&quot;]:[&quot;Top&quot;,&quot;Bottom&quot;];function I(){L=F==&quot;width&quot;?H.offsetWidth:H.offsetHeight;if(E===&quot;border&quot;){return}o.each(K,function(){if(!E){L-=parseFloat(o.curCSS(H,&quot;padding&quot;+this,true))||0}if(E===&quot;margin&quot;){L+=parseFloat(o.curCSS(H,&quot;margin&quot;+this,true))||0}else{L-=parseFloat(o.curCSS(H,&quot;border&quot;+this+&quot;Width&quot;,true))||0}})}if(H.offsetWidth!==0){I()}else{o.swap(H,G,I)}return Math.max(0,Math.round(L))}return o.curCSS(H,F,J)},curCSS:function(I,F,G){var L,E=I.style;if(F==&quot;opacity&quot;&amp;&amp;!o.support.opacity){L=o.attr(E,&quot;opacity&quot;);return L==&quot;&quot;?&quot;1&quot;:L}if(F.match(/float/i)){F=w}if(!G&amp;&amp;E&amp;&amp;E[F]){L=E[F]}else{if(q.getComputedStyle){if(F.match(/float/i)){F=&quot;float&quot;}F=F.replace(/([A-Z])/g,&quot;-$1&quot;).toLowerCase();var M=q.getComputedStyle(I,null);if(M){L=M.getPropertyValue(F)}if(F==&quot;opacity&quot;&amp;&amp;L==&quot;&quot;){L=&quot;1&quot;}}else{if(I.currentStyle){var J=F.replace(/\-(\w)/g,function(N,O){return O.toUpperCase()});L=I.currentStyle[F]||I.currentStyle[J];if(!/^\d+(px)?$/i.test(L)&amp;&amp;/^\d/.test(L)){var H=E.left,K=I.runtimeStyle.left;I.runtimeStyle.left=I.currentStyle.left;E.left=L||0;L=E.pixelLeft+&quot;px&quot;;E.left=H;I.runtimeStyle.left=K}}}}return L},clean:function(F,K,I){K=K||document;if(typeof K.createElement===&quot;undefined&quot;){K=K.ownerDocument||K[0]&amp;&amp;K[0].ownerDocument||document}if(!I&amp;&amp;F.length===1&amp;&amp;typeof F[0]===&quot;string&quot;){var H=/^&lt;(\w+)\s*\/?&gt;$/.exec(F[0]);if(H){return[K.createElement(H[1])]}}var G=[],E=[],L=K.createElement(&quot;div&quot;);o.each(F,function(P,S){if(typeof S===&quot;number&quot;){S+=&quot;&quot;}if(!S){return}if(typeof S===&quot;string&quot;){S=S.replace(/(&lt;(\w+)[^&gt;]*?)\/&gt;/g,function(U,V,T){return T.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?U:V+&quot;&gt;&lt;/&quot;+T+&quot;&gt;&quot;});var O=S.replace(/^\s+/,&quot;&quot;).substring(0,10).toLowerCase();var Q=!O.indexOf(&quot;&lt;opt&quot;)&amp;&amp;[1,&quot;&lt;select multiple='multiple'&gt;&quot;,&quot;&lt;/select&gt;&quot;]||!O.indexOf(&quot;&lt;leg&quot;)&amp;&amp;[1,&quot;&lt;fieldset&gt;&quot;,&quot;&lt;/fieldset&gt;&quot;]||O.match(/^&lt;(thead|tbody|tfoot|colg|cap)/)&amp;&amp;[1,&quot;&lt;table&gt;&quot;,&quot;&lt;/table&gt;&quot;]||!O.indexOf(&quot;&lt;tr&quot;)&amp;&amp;[2,&quot;&lt;table&gt;&lt;tbody&gt;&quot;,&quot;&lt;/tbody&gt;&lt;/table&gt;&quot;]||(!O.indexOf(&quot;&lt;td&quot;)||!O.indexOf(&quot;&lt;th&quot;))&amp;&amp;[3,&quot;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&quot;,&quot;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&quot;]||!O.indexOf(&quot;&lt;col&quot;)&amp;&amp;[2,&quot;&lt;table&gt;&lt;tbody&gt;&lt;/tbody&gt;&lt;colgroup&gt;&quot;,&quot;&lt;/colgroup&gt;&lt;/table&gt;&quot;]||!o.support.htmlSerialize&amp;&amp;[1,&quot;div&lt;div&gt;&quot;,&quot;&lt;/div&gt;&quot;]||[0,&quot;&quot;,&quot;&quot;];L.innerHTML=Q[1]+S+Q[2];while(Q[0]--){L=L.lastChild}if(!o.support.tbody){var R=/&lt;tbody/i.test(S),N=!O.indexOf(&quot;&lt;table&quot;)&amp;&amp;!R?L.firstChild&amp;&amp;L.firstChild.childNodes:Q[1]==&quot;&lt;table&gt;&quot;&amp;&amp;!R?L.childNodes:[];for(var M=N.length-1;M&gt;=0;--M){if(o.nodeName(N[M],&quot;tbody&quot;)&amp;&amp;!N[M].childNodes.length){N[M].parentNode.removeChild(N[M])}}}if(!o.support.leadingWhitespace&amp;&amp;/^\s/.test(S)){L.insertBefore(K.createTextNode(S.match(/^\s*/)[0]),L.firstChild)}S=o.makeArray(L.childNodes)}if(S.nodeType){G.push(S)}else{G=o.merge(G,S)}});if(I){for(var J=0;G[J];J++){if(o.nodeName(G[J],&quot;script&quot;)&amp;&amp;(!G[J].type||G[J].type.toLowerCase()===&quot;text/javascript&quot;)){E.push(G[J].parentNode?G[J].parentNode.removeChild(G[J]):G[J])}else{if(G[J].nodeType===1){G.splice.apply(G,[J+1,0].concat(o.makeArray(G[J].getElementsByTagName(&quot;script&quot;))))}I.appendChild(G[J])}}return E}return G},attr:function(J,G,K){if(!J||J.nodeType==3||J.nodeType==8){return g}var H=!o.isXMLDoc(J),L=K!==g;G=H&amp;&amp;o.props[G]||G;if(J.tagName){var F=/href|src|style/.test(G);if(G==&quot;selected&quot;&amp;&amp;J.parentNode){J.parentNode.selectedIndex}if(G in J&amp;&amp;H&amp;&amp;!F){if(L){if(G==&quot;type&quot;&amp;&amp;o.nodeName(J,&quot;input&quot;)&amp;&amp;J.parentNode){throw&quot;type property can't be changed&quot;}J[G]=K}if(o.nodeName(J,&quot;form&quot;)&amp;&amp;J.getAttributeNode(G)){return J.getAttributeNode(G).nodeValue}if(G==&quot;tabIndex&quot;){var I=J.getAttributeNode(&quot;tabIndex&quot;);return I&amp;&amp;I.specified?I.value:J.nodeName.match(/(button|input|object|select|textarea)/i)?0:J.nodeName.match(/^(a|area)$/i)&amp;&amp;J.href?0:g}return J[G]}if(!o.support.style&amp;&amp;H&amp;&amp;G==&quot;style&quot;){return o.attr(J.style,&quot;cssText&quot;,K)}if(L){J.setAttribute(G,&quot;&quot;+K)}var E=!o.support.hrefNormalized&amp;&amp;H&amp;&amp;F?J.getAttribute(G,2):J.getAttribute(G);return E===null?g:E}if(!o.support.opacity&amp;&amp;G==&quot;opacity&quot;){if(L){J.zoom=1;J.filter=(J.filter||&quot;&quot;).replace(/alpha\([^)]*\)/,&quot;&quot;)+(parseInt(K)+&quot;&quot;==&quot;NaN&quot;?&quot;&quot;:&quot;alpha(opacity=&quot;+K*100+&quot;)&quot;)}return J.filter&amp;&amp;J.filter.indexOf(&quot;opacity=&quot;)&gt;=0?(parseFloat(J.filter.match(/opacity=([^)]*)/)[1])/100)+&quot;&quot;:&quot;&quot;}G=G.replace(/-([a-z])/ig,function(M,N){return N.toUpperCase()});if(L){J[G]=K}return J[G]},trim:function(E){return(E||&quot;&quot;).replace(/^\s+|\s+$/g,&quot;&quot;)},makeArray:function(G){var E=[];if(G!=null){var F=G.length;if(F==null||typeof G===&quot;string&quot;||o.isFunction(G)||G.setInterval){E[0]=G}else{while(F){E[--F]=G[F]}}}return E},inArray:function(G,H){for(var E=0,F=H.length;E&lt;F;E++){if(H[E]===G){return E}}return -1},merge:function(H,E){var F=0,G,I=H.length;if(!o.support.getAll){while((G=E[F++])!=null){if(G.nodeType!=8){H[I++]=G}}}else{while((G=E[F++])!=null){H[I++]=G}}return H},unique:function(K){var F=[],E={};try{for(var G=0,H=K.length;G&lt;H;G++){var J=o.data(K[G]);if(!E[J]){E[J]=true;F.push(K[G])}}}catch(I){F=K}return F},grep:function(F,J,E){var G=[];for(var H=0,I=F.length;H&lt;I;H++){if(!E!=!J(F[H],H)){G.push(F[H])}}return G},map:function(E,J){var F=[];for(var G=0,H=E.length;G&lt;H;G++){var I=J(E[G],G);if(I!=null){F[F.length]=I}}return F.concat.apply([],F)}});var C=navigator.userAgent.toLowerCase();o.browser={version:(C.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[0,&quot;0&quot;])[1],safari:/webkit/.test(C),opera:/opera/.test(C),msie:/msie/.test(C)&amp;&amp;!/opera/.test(C),mozilla:/mozilla/.test(C)&amp;&amp;!/(compatible|webkit)/.test(C)};o.each({parent:function(E){return E.parentNode},parents:function(E){return o.dir(E,&quot;parentNode&quot;)},next:function(E){return o.nth(E,2,&quot;nextSibling&quot;)},prev:function(E){return o.nth(E,2,&quot;previousSibling&quot;)},nextAll:function(E){return o.dir(E,&quot;nextSibling&quot;)},prevAll:function(E){return o.dir(E,&quot;previousSibling&quot;)},siblings:function(E){return o.sibling(E.parentNode.firstChild,E)},children:function(E){return o.sibling(E.firstChild)},contents:function(E){return o.nodeName(E,&quot;iframe&quot;)?E.contentDocument||E.contentWindow.document:o.makeArray(E.childNodes)}},function(E,F){o.fn[E]=function(G){var H=o.map(this,F);if(G&amp;&amp;typeof G==&quot;string&quot;){H=o.multiFilter(G,H)}return this.pushStack(o.unique(H),E,G)}});o.each({appendTo:&quot;append&quot;,prependTo:&quot;prepend&quot;,insertBefore:&quot;before&quot;,insertAfter:&quot;after&quot;,replaceAll:&quot;replaceWith&quot;},function(E,F){o.fn[E]=function(G){var J=[],L=o(G);for(var K=0,H=L.length;K&lt;H;K++){var I=(K&gt;0?this.clone(true):this).get();o.fn[F].apply(o(L[K]),I);J=J.concat(I)}return this.pushStack(J,E,G)}});o.each({removeAttr:function(E){o.attr(this,E,&quot;&quot;);if(this.nodeType==1){this.removeAttribute(E)}},addClass:function(E){o.className.add(this,E)},removeClass:function(E){o.className.remove(this,E)},toggleClass:function(F,E){if(typeof E!==&quot;boolean&quot;){E=!o.className.has(this,F)}o.className[E?&quot;add&quot;:&quot;remove&quot;](this,F)},remove:function(E){if(!E||o.filter(E,[this]).length){o(&quot;*&quot;,this).add([this]).each(function(){o.event.remove(this);o.removeData(this)});if(this.parentNode){this.parentNode.removeChild(this)}}},empty:function(){o(this).children().remove();while(this.firstChild){this.removeChild(this.firstChild)}}},function(E,F){o.fn[E]=function(){return this.each(F,arguments)}});function j(E,F){return E[0]&amp;&amp;parseInt(o.curCSS(E[0],F,true),10)||0}var h=&quot;jQuery&quot;+e(),v=0,A={};o.extend({cache:{},data:function(F,E,G){F=F==l?A:F;var H=F[h];if(!H){H=F[h]=++v}if(E&amp;&amp;!o.cache[H]){o.cache[H]={}}if(G!==g){o.cache[H][E]=G}return E?o.cache[H][E]:H},removeData:function(F,E){F=F==l?A:F;var H=F[h];if(E){if(o.cache[H]){delete o.cache[H][E];E=&quot;&quot;;for(E in o.cache[H]){break}if(!E){o.removeData(F)}}}else{try{delete F[h]}catch(G){if(F.removeAttribute){F.removeAttribute(h)}}delete o.cache[H]}},queue:function(F,E,H){if(F){E=(E||&quot;fx&quot;)+&quot;queue&quot;;var G=o.data(F,E);if(!G||o.isArray(H)){G=o.data(F,E,o.makeArray(H))}else{if(H){G.push(H)}}}return G},dequeue:function(H,G){var E=o.queue(H,G),F=E.shift();if(!G||G===&quot;fx&quot;){F=E[0]}if(F!==g){F.call(H)}}});o.fn.extend({data:function(E,G){var H=E.split(&quot;.&quot;);H[1]=H[1]?&quot;.&quot;+H[1]:&quot;&quot;;if(G===g){var F=this.triggerHandler(&quot;getData&quot;+H[1]+&quot;!&quot;,[H[0]]);if(F===g&amp;&amp;this.length){F=o.data(this[0],E)}return F===g&amp;&amp;H[1]?this.data(H[0]):F}else{return this.trigger(&quot;setData&quot;+H[1]+&quot;!&quot;,[H[0],G]).each(function(){o.data(this,E,G)})}},removeData:function(E){return this.each(function(){o.removeData(this,E)})},queue:function(E,F){if(typeof E!==&quot;string&quot;){F=E;E=&quot;fx&quot;}if(F===g){return o.queue(this[0],E)}return this.each(function(){var G=o.queue(this,E,F);if(E==&quot;fx&quot;&amp;&amp;G.length==1){G[0].call(this)}})},dequeue:function(E){return this.each(function(){o.dequeue(this,E)})}});
+/*
+ * Sizzle CSS Selector Engine - v0.9.3
+ *  Copyright 2009, The Dojo Foundation
+ *  Released under the MIT, BSD, and GPL Licenses.
+ *  More information: http://sizzlejs.com/
+ */
+(function(){var R=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['&quot;][^'&quot;]*['&quot;]|[^[\]'&quot;]+)+\]|\\.|[^ &gt;+~,(\[\\]+)+|[&gt;+~])(\s*,\s*)?/g,L=0,H=Object.prototype.toString;var F=function(Y,U,ab,ac){ab=ab||[];U=U||document;if(U.nodeType!==1&amp;&amp;U.nodeType!==9){return[]}if(!Y||typeof Y!==&quot;string&quot;){return ab}var Z=[],W,af,ai,T,ad,V,X=true;R.lastIndex=0;while((W=R.exec(Y))!==null){Z.push(W[1]);if(W[2]){V=RegExp.rightContext;break}}if(Z.length&gt;1&amp;&amp;M.exec(Y)){if(Z.length===2&amp;&amp;I.relative[Z[0]]){af=J(Z[0]+Z[1],U)}else{af=I.relative[Z[0]]?[U]:F(Z.shift(),U);while(Z.length){Y=Z.shift();if(I.relative[Y]){Y+=Z.shift()}af=J(Y,af)}}}else{var ae=ac?{expr:Z.pop(),set:E(ac)}:F.find(Z.pop(),Z.length===1&amp;&amp;U.parentNode?U.parentNode:U,Q(U));af=F.filter(ae.expr,ae.set);if(Z.length&gt;0){ai=E(af)}else{X=false}while(Z.length){var ah=Z.pop(),ag=ah;if(!I.relative[ah]){ah=&quot;&quot;}else{ag=Z.pop()}if(ag==null){ag=U}I.relative[ah](ai,ag,Q(U))}}if(!ai){ai=af}if(!ai){throw&quot;Syntax error, unrecognized expression: &quot;+(ah||Y)}if(H.call(ai)===&quot;[object Array]&quot;){if(!X){ab.push.apply(ab,ai)}else{if(U.nodeType===1){for(var aa=0;ai[aa]!=null;aa++){if(ai[aa]&amp;&amp;(ai[aa]===true||ai[aa].nodeType===1&amp;&amp;K(U,ai[aa]))){ab.push(af[aa])}}}else{for(var aa=0;ai[aa]!=null;aa++){if(ai[aa]&amp;&amp;ai[aa].nodeType===1){ab.push(af[aa])}}}}}else{E(ai,ab)}if(V){F(V,U,ab,ac);if(G){hasDuplicate=false;ab.sort(G);if(hasDuplicate){for(var aa=1;aa&lt;ab.length;aa++){if(ab[aa]===ab[aa-1]){ab.splice(aa--,1)}}}}}return ab};F.matches=function(T,U){return F(T,null,null,U)};F.find=function(aa,T,ab){var Z,X;if(!aa){return[]}for(var W=0,V=I.order.length;W&lt;V;W++){var Y=I.order[W],X;if((X=I.match[Y].exec(aa))){var U=RegExp.leftContext;if(U.substr(U.length-1)!==&quot;\\&quot;){X[1]=(X[1]||&quot;&quot;).replace(/\\/g,&quot;&quot;);Z=I.find[Y](X,T,ab);if(Z!=null){aa=aa.replace(I.match[Y],&quot;&quot;);break}}}}if(!Z){Z=T.getElementsByTagName(&quot;*&quot;)}return{set:Z,expr:aa}};F.filter=function(ad,ac,ag,W){var V=ad,ai=[],aa=ac,Y,T,Z=ac&amp;&amp;ac[0]&amp;&amp;Q(ac[0]);while(ad&amp;&amp;ac.length){for(var ab in I.filter){if((Y=I.match[ab].exec(ad))!=null){var U=I.filter[ab],ah,af;T=false;if(aa==ai){ai=[]}if(I.preFilter[ab]){Y=I.preFilter[ab](Y,aa,ag,ai,W,Z);if(!Y){T=ah=true}else{if(Y===true){continue}}}if(Y){for(var X=0;(af=aa[X])!=null;X++){if(af){ah=U(af,Y,X,aa);var ae=W^!!ah;if(ag&amp;&amp;ah!=null){if(ae){T=true}else{aa[X]=false}}else{if(ae){ai.push(af);T=true}}}}}if(ah!==g){if(!ag){aa=ai}ad=ad.replace(I.match[ab],&quot;&quot;);if(!T){return[]}break}}}if(ad==V){if(T==null){throw&quot;Syntax error, unrecognized expression: &quot;+ad}else{break}}V=ad}return aa};var I=F.selectors={order:[&quot;ID&quot;,&quot;NAME&quot;,&quot;TAG&quot;],match:{ID:/#((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,NAME:/\[name=['&quot;]*((?:[\w\u00c0-\uFFFF_-]|\\.)+)['&quot;]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF_-]|\\.)+)\s*(?:(\S?=)\s*(['&quot;]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*_-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF_-]|\\.)+)(?:\((['&quot;]*)((?:\([^\)]+\)|[^\2\(\)]*)+)\2\))?/},attrMap:{&quot;class&quot;:&quot;className&quot;,&quot;for&quot;:&quot;htmlFor&quot;},attrHandle:{href:function(T){return T.getAttribute(&quot;href&quot;)}},relative:{&quot;+&quot;:function(aa,T,Z){var X=typeof T===&quot;string&quot;,ab=X&amp;&amp;!/\W/.test(T),Y=X&amp;&amp;!ab;if(ab&amp;&amp;!Z){T=T.toUpperCase()}for(var W=0,V=aa.length,U;W&lt;V;W++){if((U=aa[W])){while((U=U.previousSibling)&amp;&amp;U.nodeType!==1){}aa[W]=Y||U&amp;&amp;U.nodeName===T?U||false:U===T}}if(Y){F.filter(T,aa,true)}},&quot;&gt;&quot;:function(Z,U,aa){var X=typeof U===&quot;string&quot;;if(X&amp;&amp;!/\W/.test(U)){U=aa?U:U.toUpperCase();for(var V=0,T=Z.length;V&lt;T;V++){var Y=Z[V];if(Y){var W=Y.parentNode;Z[V]=W.nodeName===U?W:false}}}else{for(var V=0,T=Z.length;V&lt;T;V++){var Y=Z[V];if(Y){Z[V]=X?Y.parentNode:Y.parentNode===U}}if(X){F.filter(U,Z,true)}}},&quot;&quot;:function(W,U,Y){var V=L++,T=S;if(!U.match(/\W/)){var X=U=Y?U:U.toUpperCase();T=P}T(&quot;parentNode&quot;,U,V,W,X,Y)},&quot;~&quot;:function(W,U,Y){var V=L++,T=S;if(typeof U===&quot;string&quot;&amp;&amp;!U.match(/\W/)){var X=U=Y?U:U.toUpperCase();T=P}T(&quot;previousSibling&quot;,U,V,W,X,Y)}},find:{ID:function(U,V,W){if(typeof V.getElementById!==&quot;undefined&quot;&amp;&amp;!W){var T=V.getElementById(U[1]);return T?[T]:[]}},NAME:function(V,Y,Z){if(typeof Y.getElementsByName!==&quot;undefined&quot;){var U=[],X=Y.getElementsByName(V[1]);for(var W=0,T=X.length;W&lt;T;W++){if(X[W].getAttribute(&quot;name&quot;)===V[1]){U.push(X[W])}}return U.length===0?null:U}},TAG:function(T,U){return U.getElementsByTagName(T[1])}},preFilter:{CLASS:function(W,U,V,T,Z,aa){W=&quot; &quot;+W[1].replace(/\\/g,&quot;&quot;)+&quot; &quot;;if(aa){return W}for(var X=0,Y;(Y=U[X])!=null;X++){if(Y){if(Z^(Y.className&amp;&amp;(&quot; &quot;+Y.className+&quot; &quot;).indexOf(W)&gt;=0)){if(!V){T.push(Y)}}else{if(V){U[X]=false}}}}return false},ID:function(T){return T[1].replace(/\\/g,&quot;&quot;)},TAG:function(U,T){for(var V=0;T[V]===false;V++){}return T[V]&amp;&amp;Q(T[V])?U[1]:U[1].toUpperCase()},CHILD:function(T){if(T[1]==&quot;nth&quot;){var U=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(T[2]==&quot;even&quot;&amp;&amp;&quot;2n&quot;||T[2]==&quot;odd&quot;&amp;&amp;&quot;2n+1&quot;||!/\D/.test(T[2])&amp;&amp;&quot;0n+&quot;+T[2]||T[2]);T[2]=(U[1]+(U[2]||1))-0;T[3]=U[3]-0}T[0]=L++;return T},ATTR:function(X,U,V,T,Y,Z){var W=X[1].replace(/\\/g,&quot;&quot;);if(!Z&amp;&amp;I.attrMap[W]){X[1]=I.attrMap[W]}if(X[2]===&quot;~=&quot;){X[4]=&quot; &quot;+X[4]+&quot; &quot;}return X},PSEUDO:function(X,U,V,T,Y){if(X[1]===&quot;not&quot;){if(X[3].match(R).length&gt;1||/^\w/.test(X[3])){X[3]=F(X[3],null,null,U)}else{var W=F.filter(X[3],U,V,true^Y);if(!V){T.push.apply(T,W)}return false}}else{if(I.match.POS.test(X[0])||I.match.CHILD.test(X[0])){return true}}return X},POS:function(T){T.unshift(true);return T}},filters:{enabled:function(T){return T.disabled===false&amp;&amp;T.type!==&quot;hidden&quot;},disabled:function(T){return T.disabled===true},checked:function(T){return T.checked===true},selected:function(T){T.parentNode.selectedIndex;return T.selected===true},parent:function(T){return !!T.firstChild},empty:function(T){return !T.firstChild},has:function(V,U,T){return !!F(T[3],V).length},header:function(T){return/h\d/i.test(T.nodeName)},text:function(T){return&quot;text&quot;===T.type},radio:function(T){return&quot;radio&quot;===T.type},checkbox:function(T){return&quot;checkbox&quot;===T.type},file:function(T){return&quot;file&quot;===T.type},password:function(T){return&quot;password&quot;===T.type},submit:function(T){return&quot;submit&quot;===T.type},image:function(T){return&quot;image&quot;===T.type},reset:function(T){return&quot;reset&quot;===T.type},button:function(T){return&quot;button&quot;===T.type||T.nodeName.toUpperCase()===&quot;BUTTON&quot;},input:function(T){return/input|select|textarea|button/i.test(T.nodeName)}},setFilters:{first:function(U,T){return T===0},last:function(V,U,T,W){return U===W.length-1},even:function(U,T){return T%2===0},odd:function(U,T){return T%2===1},lt:function(V,U,T){return U&lt;T[3]-0},gt:function(V,U,T){return U&gt;T[3]-0},nth:function(V,U,T){return T[3]-0==U},eq:function(V,U,T){return T[3]-0==U}},filter:{PSEUDO:function(Z,V,W,aa){var U=V[1],X=I.filters[U];if(X){return X(Z,W,V,aa)}else{if(U===&quot;contains&quot;){return(Z.textContent||Z.innerText||&quot;&quot;).indexOf(V[3])&gt;=0}else{if(U===&quot;not&quot;){var Y=V[3];for(var W=0,T=Y.length;W&lt;T;W++){if(Y[W]===Z){return false}}return true}}}},CHILD:function(T,W){var Z=W[1],U=T;switch(Z){case&quot;only&quot;:case&quot;first&quot;:while(U=U.previousSibling){if(U.nodeType===1){return false}}if(Z==&quot;first&quot;){return true}U=T;case&quot;last&quot;:while(U=U.nextSibling){if(U.nodeType===1){return false}}return true;case&quot;nth&quot;:var V=W[2],ac=W[3];if(V==1&amp;&amp;ac==0){return true}var Y=W[0],ab=T.parentNode;if(ab&amp;&amp;(ab.sizcache!==Y||!T.nodeIndex)){var X=0;for(U=ab.firstChild;U;U=U.nextSibling){if(U.nodeType===1){U.nodeIndex=++X}}ab.sizcache=Y}var aa=T.nodeIndex-ac;if(V==0){return aa==0}else{return(aa%V==0&amp;&amp;aa/V&gt;=0)}}},ID:function(U,T){return U.nodeType===1&amp;&amp;U.getAttribute(&quot;id&quot;)===T},TAG:function(U,T){return(T===&quot;*&quot;&amp;&amp;U.nodeType===1)||U.nodeName===T},CLASS:function(U,T){return(&quot; &quot;+(U.className||U.getAttribute(&quot;class&quot;))+&quot; &quot;).indexOf(T)&gt;-1},ATTR:function(Y,W){var V=W[1],T=I.attrHandle[V]?I.attrHandle[V](Y):Y[V]!=null?Y[V]:Y.getAttribute(V),Z=T+&quot;&quot;,X=W[2],U=W[4];return T==null?X===&quot;!=&quot;:X===&quot;=&quot;?Z===U:X===&quot;*=&quot;?Z.indexOf(U)&gt;=0:X===&quot;~=&quot;?(&quot; &quot;+Z+&quot; &quot;).indexOf(U)&gt;=0:!U?Z&amp;&amp;T!==false:X===&quot;!=&quot;?Z!=U:X===&quot;^=&quot;?Z.indexOf(U)===0:X===&quot;$=&quot;?Z.substr(Z.length-U.length)===U:X===&quot;|=&quot;?Z===U||Z.substr(0,U.length+1)===U+&quot;-&quot;:false},POS:function(X,U,V,Y){var T=U[2],W=I.setFilters[T];if(W){return W(X,V,U,Y)}}}};var M=I.match.POS;for(var O in I.match){I.match[O]=RegExp(I.match[O].source+/(?![^\[]*\])(?![^\(]*\))/.source)}var E=function(U,T){U=Array.prototype.slice.call(U);if(T){T.push.apply(T,U);return T}return U};try{Array.prototype.slice.call(document.documentElement.childNodes)}catch(N){E=function(X,W){var U=W||[];if(H.call(X)===&quot;[object Array]&quot;){Array.prototype.push.apply(U,X)}else{if(typeof X.length===&quot;number&quot;){for(var V=0,T=X.length;V&lt;T;V++){U.push(X[V])}}else{for(var V=0;X[V];V++){U.push(X[V])}}}return U}}var G;if(document.documentElement.compareDocumentPosition){G=function(U,T){var V=U.compareDocumentPosition(T)&amp;4?-1:U===T?0:1;if(V===0){hasDuplicate=true}return V}}else{if(&quot;sourceIndex&quot; in document.documentElement){G=function(U,T){var V=U.sourceIndex-T.sourceIndex;if(V===0){hasDuplicate=true}return V}}else{if(document.createRange){G=function(W,U){var V=W.ownerDocument.createRange(),T=U.ownerDocument.createRange();V.selectNode(W);V.collapse(true);T.selectNode(U);T.collapse(true);var X=V.compareBoundaryPoints(Range.START_TO_END,T);if(X===0){hasDuplicate=true}return X}}}}(function(){var U=document.createElement(&quot;form&quot;),V=&quot;script&quot;+(new Date).getTime();U.innerHTML=&quot;&lt;input name='&quot;+V+&quot;'/&gt;&quot;;var T=document.documentElement;T.insertBefore(U,T.firstChild);if(!!document.getElementById(V)){I.find.ID=function(X,Y,Z){if(typeof Y.getElementById!==&quot;undefined&quot;&amp;&amp;!Z){var W=Y.getElementById(X[1]);return W?W.id===X[1]||typeof W.getAttributeNode!==&quot;undefined&quot;&amp;&amp;W.getAttributeNode(&quot;id&quot;).nodeValue===X[1]?[W]:g:[]}};I.filter.ID=function(Y,W){var X=typeof Y.getAttributeNode!==&quot;undefined&quot;&amp;&amp;Y.getAttributeNode(&quot;id&quot;);return Y.nodeType===1&amp;&amp;X&amp;&amp;X.nodeValue===W}}T.removeChild(U)})();(function(){var T=document.createElement(&quot;div&quot;);T.appendChild(document.createComment(&quot;&quot;));if(T.getElementsByTagName(&quot;*&quot;).length&gt;0){I.find.TAG=function(U,Y){var X=Y.getElementsByTagName(U[1]);if(U[1]===&quot;*&quot;){var W=[];for(var V=0;X[V];V++){if(X[V].nodeType===1){W.push(X[V])}}X=W}return X}}T.innerHTML=&quot;&lt;a href='#'&gt;&lt;/a&gt;&quot;;if(T.firstChild&amp;&amp;typeof T.firstChild.getAttribute!==&quot;undefined&quot;&amp;&amp;T.firstChild.getAttribute(&quot;href&quot;)!==&quot;#&quot;){I.attrHandle.href=function(U){return U.getAttribute(&quot;href&quot;,2)}}})();if(document.querySelectorAll){(function(){var T=F,U=document.createElement(&quot;div&quot;);U.innerHTML=&quot;&lt;p class='TEST'&gt;&lt;/p&gt;&quot;;if(U.querySelectorAll&amp;&amp;U.querySelectorAll(&quot;.TEST&quot;).length===0){return}F=function(Y,X,V,W){X=X||document;if(!W&amp;&amp;X.nodeType===9&amp;&amp;!Q(X)){try{return E(X.querySelectorAll(Y),V)}catch(Z){}}return T(Y,X,V,W)};F.find=T.find;F.filter=T.filter;F.selectors=T.selectors;F.matches=T.matches})()}if(document.getElementsByClassName&amp;&amp;document.documentElement.getElementsByClassName){(function(){var T=document.createElement(&quot;div&quot;);T.innerHTML=&quot;&lt;div class='test e'&gt;&lt;/div&gt;&lt;div class='test'&gt;&lt;/div&gt;&quot;;if(T.getElementsByClassName(&quot;e&quot;).length===0){return}T.lastChild.className=&quot;e&quot;;if(T.getElementsByClassName(&quot;e&quot;).length===1){return}I.order.splice(1,0,&quot;CLASS&quot;);I.find.CLASS=function(U,V,W){if(typeof V.getElementsByClassName!==&quot;undefined&quot;&amp;&amp;!W){return V.getElementsByClassName(U[1])}}})()}function P(U,Z,Y,ad,aa,ac){var ab=U==&quot;previousSibling&quot;&amp;&amp;!ac;for(var W=0,V=ad.length;W&lt;V;W++){var T=ad[W];if(T){if(ab&amp;&amp;T.nodeType===1){T.sizcache=Y;T.sizset=W}T=T[U];var X=false;while(T){if(T.sizcache===Y){X=ad[T.sizset];break}if(T.nodeType===1&amp;&amp;!ac){T.sizcache=Y;T.sizset=W}if(T.nodeName===Z){X=T;break}T=T[U]}ad[W]=X}}}function S(U,Z,Y,ad,aa,ac){var ab=U==&quot;previousSibling&quot;&amp;&amp;!ac;for(var W=0,V=ad.length;W&lt;V;W++){var T=ad[W];if(T){if(ab&amp;&amp;T.nodeType===1){T.sizcache=Y;T.sizset=W}T=T[U];var X=false;while(T){if(T.sizcache===Y){X=ad[T.sizset];break}if(T.nodeType===1){if(!ac){T.sizcache=Y;T.sizset=W}if(typeof Z!==&quot;string&quot;){if(T===Z){X=true;break}}else{if(F.filter(Z,[T]).length&gt;0){X=T;break}}}T=T[U]}ad[W]=X}}}var K=document.compareDocumentPosition?function(U,T){return U.compareDocumentPosition(T)&amp;16}:function(U,T){return U!==T&amp;&amp;(U.contains?U.contains(T):true)};var Q=function(T){return T.nodeType===9&amp;&amp;T.documentElement.nodeName!==&quot;HTML&quot;||!!T.ownerDocument&amp;&amp;Q(T.ownerDocument)};var J=function(T,aa){var W=[],X=&quot;&quot;,Y,V=aa.nodeType?[aa]:aa;while((Y=I.match.PSEUDO.exec(T))){X+=Y[0];T=T.replace(I.match.PSEUDO,&quot;&quot;)}T=I.relative[T]?T+&quot;*&quot;:T;for(var Z=0,U=V.length;Z&lt;U;Z++){F(T,V[Z],W)}return F.filter(X,W)};o.find=F;o.filter=F.filter;o.expr=F.selectors;o.expr[&quot;:&quot;]=o.expr.filters;F.selectors.filters.hidden=function(T){return T.offsetWidth===0||T.offsetHeight===0};F.selectors.filters.visible=function(T){return T.offsetWidth&gt;0||T.offsetHeight&gt;0};F.selectors.filters.animated=function(T){return o.grep(o.timers,function(U){return T===U.elem}).length};o.multiFilter=function(V,T,U){if(U){V=&quot;:not(&quot;+V+&quot;)&quot;}return F.matches(V,T)};o.dir=function(V,U){var T=[],W=V[U];while(W&amp;&amp;W!=document){if(W.nodeType==1){T.push(W)}W=W[U]}return T};o.nth=function(X,T,V,W){T=T||1;var U=0;for(;X;X=X[V]){if(X.nodeType==1&amp;&amp;++U==T){break}}return X};o.sibling=function(V,U){var T=[];for(;V;V=V.nextSibling){if(V.nodeType==1&amp;&amp;V!=U){T.push(V)}}return T};return;l.Sizzle=F})();o.event={add:function(I,F,H,K){if(I.nodeType==3||I.nodeType==8){return}if(I.setInterval&amp;&amp;I!=l){I=l}if(!H.guid){H.guid=this.guid++}if(K!==g){var G=H;H=this.proxy(G);H.data=K}var E=o.data(I,&quot;events&quot;)||o.data(I,&quot;events&quot;,{}),J=o.data(I,&quot;handle&quot;)||o.data(I,&quot;handle&quot;,function(){return typeof o!==&quot;undefined&quot;&amp;&amp;!o.event.triggered?o.event.handle.apply(arguments.callee.elem,arguments):g});J.elem=I;o.each(F.split(/\s+/),function(M,N){var O=N.split(&quot;.&quot;);N=O.shift();H.type=O.slice().sort().join(&quot;.&quot;);var L=E[N];if(o.event.specialAll[N]){o.event.specialAll[N].setup.call(I,K,O)}if(!L){L=E[N]={};if(!o.event.special[N]||o.event.special[N].setup.call(I,K,O)===false){if(I.addEventListener){I.addEventListener(N,J,false)}else{if(I.attachEvent){I.attachEvent(&quot;on&quot;+N,J)}}}}L[H.guid]=H;o.event.global[N]=true});I=null},guid:1,global:{},remove:function(K,H,J){if(K.nodeType==3||K.nodeType==8){return}var G=o.data(K,&quot;events&quot;),F,E;if(G){if(H===g||(typeof H===&quot;string&quot;&amp;&amp;H.charAt(0)==&quot;.&quot;)){for(var I in G){this.remove(K,I+(H||&quot;&quot;))}}else{if(H.type){J=H.handler;H=H.type}o.each(H.split(/\s+/),function(M,O){var Q=O.split(&quot;.&quot;);O=Q.shift();var N=RegExp(&quot;(^|\\.)&quot;+Q.slice().sort().join(&quot;.*\\.&quot;)+&quot;(\\.|$)&quot;);if(G[O]){if(J){delete G[O][J.guid]}else{for(var P in G[O]){if(N.test(G[O][P].type)){delete G[O][P]}}}if(o.event.specialAll[O]){o.event.specialAll[O].teardown.call(K,Q)}for(F in G[O]){break}if(!F){if(!o.event.special[O]||o.event.special[O].teardown.call(K,Q)===false){if(K.removeEventListener){K.removeEventListener(O,o.data(K,&quot;handle&quot;),false)}else{if(K.detachEvent){K.detachEvent(&quot;on&quot;+O,o.data(K,&quot;handle&quot;))}}}F=null;delete G[O]}}})}for(F in G){break}if(!F){var L=o.data(K,&quot;handle&quot;);if(L){L.elem=null}o.removeData(K,&quot;events&quot;);o.removeData(K,&quot;handle&quot;)}}},trigger:function(I,K,H,E){var G=I.type||I;if(!E){I=typeof I===&quot;object&quot;?I[h]?I:o.extend(o.Event(G),I):o.Event(G);if(G.indexOf(&quot;!&quot;)&gt;=0){I.type=G=G.slice(0,-1);I.exclusive=true}if(!H){I.stopPropagation();if(this.global[G]){o.each(o.cache,function(){if(this.events&amp;&amp;this.events[G]){o.event.trigger(I,K,this.handle.elem)}})}}if(!H||H.nodeType==3||H.nodeType==8){return g}I.result=g;I.target=H;K=o.makeArray(K);K.unshift(I)}I.currentTarget=H;var J=o.data(H,&quot;handle&quot;);if(J){J.apply(H,K)}if((!H[G]||(o.nodeName(H,&quot;a&quot;)&amp;&amp;G==&quot;click&quot;))&amp;&amp;H[&quot;on&quot;+G]&amp;&amp;H[&quot;on&quot;+G].apply(H,K)===false){I.result=false}if(!E&amp;&amp;H[G]&amp;&amp;!I.isDefaultPrevented()&amp;&amp;!(o.nodeName(H,&quot;a&quot;)&amp;&amp;G==&quot;click&quot;)){this.triggered=true;try{H[G]()}catch(L){}}this.triggered=false;if(!I.isPropagationStopped()){var F=H.parentNode||H.ownerDocument;if(F){o.event.trigger(I,K,F,true)}}},handle:function(K){var J,E;K=arguments[0]=o.event.fix(K||l.event);K.currentTarget=this;var L=K.type.split(&quot;.&quot;);K.type=L.shift();J=!L.length&amp;&amp;!K.exclusive;var I=RegExp(&quot;(^|\\.)&quot;+L.slice().sort().join(&quot;.*\\.&quot;)+&quot;(\\.|$)&quot;);E=(o.data(this,&quot;events&quot;)||{})[K.type];for(var G in E){var H=E[G];if(J||I.test(H.type)){K.handler=H;K.data=H.data;var F=H.apply(this,arguments);if(F!==g){K.result=F;if(F===false){K.preventDefault();K.stopPropagation()}}if(K.isImmediatePropagationStopped()){break}}}},props:&quot;altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which&quot;.split(&quot; &quot;),fix:function(H){if(H[h]){return H}var F=H;H=o.Event(F);for(var G=this.props.length,J;G;){J=this.props[--G];H[J]=F[J]}if(!H.target){H.target=H.srcElement||document}if(H.target.nodeType==3){H.target=H.target.parentNode}if(!H.relatedTarget&amp;&amp;H.fromElement){H.relatedTarget=H.fromElement==H.target?H.toElement:H.fromElement}if(H.pageX==null&amp;&amp;H.clientX!=null){var I=document.documentElement,E=document.body;H.pageX=H.clientX+(I&amp;&amp;I.scrollLeft||E&amp;&amp;E.scrollLeft||0)-(I.clientLeft||0);H.pageY=H.clientY+(I&amp;&amp;I.scrollTop||E&amp;&amp;E.scrollTop||0)-(I.clientTop||0)}if(!H.which&amp;&amp;((H.charCode||H.charCode===0)?H.charCode:H.keyCode)){H.which=H.charCode||H.keyCode}if(!H.metaKey&amp;&amp;H.ctrlKey){H.metaKey=H.ctrlKey}if(!H.which&amp;&amp;H.button){H.which=(H.button&amp;1?1:(H.button&amp;2?3:(H.button&amp;4?2:0)))}return H},proxy:function(F,E){E=E||function(){return F.apply(this,arguments)};E.guid=F.guid=F.guid||E.guid||this.guid++;return E},special:{ready:{setup:B,teardown:function(){}}},specialAll:{live:{setup:function(E,F){o.event.add(this,F[0],c)},teardown:function(G){if(G.length){var E=0,F=RegExp(&quot;(^|\\.)&quot;+G[0]+&quot;(\\.|$)&quot;);o.each((o.data(this,&quot;events&quot;).live||{}),function(){if(F.test(this.type)){E++}});if(E&lt;1){o.event.remove(this,G[0],c)}}}}}};o.Event=function(E){if(!this.preventDefault){return new o.Event(E)}if(E&amp;&amp;E.type){this.originalEvent=E;this.type=E.type}else{this.type=E}this.timeStamp=e();this[h]=true};function k(){return false}function u(){return true}o.Event.prototype={preventDefault:function(){this.isDefaultPrevented=u;var E=this.originalEvent;if(!E){return}if(E.preventDefault){E.preventDefault()}E.returnValue=false},stopPropagation:function(){this.isPropagationStopped=u;var E=this.originalEvent;if(!E){return}if(E.stopPropagation){E.stopPropagation()}E.cancelBubble=true},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=u;this.stopPropagation()},isDefaultPrevented:k,isPropagationStopped:k,isImmediatePropagationStopped:k};var a=function(F){var E=F.relatedTarget;while(E&amp;&amp;E!=this){try{E=E.parentNode}catch(G){E=this}}if(E!=this){F.type=F.data;o.event.handle.apply(this,arguments)}};o.each({mouseover:&quot;mouseenter&quot;,mouseout:&quot;mouseleave&quot;},function(F,E){o.event.special[E]={setup:function(){o.event.add(this,F,a,E)},teardown:function(){o.event.remove(this,F,a)}}});o.fn.extend({bind:function(F,G,E){return F==&quot;unload&quot;?this.one(F,G,E):this.each(function(){o.event.add(this,F,E||G,E&amp;&amp;G)})},one:function(G,H,F){var E=o.event.proxy(F||H,function(I){o(this).unbind(I,E);return(F||H).apply(this,arguments)});return this.each(function(){o.event.add(this,G,E,F&amp;&amp;H)})},unbind:function(F,E){return this.each(function(){o.event.remove(this,F,E)})},trigger:function(E,F){return this.each(function(){o.event.trigger(E,F,this)})},triggerHandler:function(E,G){if(this[0]){var F=o.Event(E);F.preventDefault();F.stopPropagation();o.event.trigger(F,G,this[0]);return F.result}},toggle:function(G){var E=arguments,F=1;while(F&lt;E.length){o.event.proxy(G,E[F++])}return this.click(o.event.proxy(G,function(H){this.lastToggle=(this.lastToggle||0)%F;H.preventDefault();return E[this.lastToggle++].apply(this,arguments)||false}))},hover:function(E,F){return this.mouseenter(E).mouseleave(F)},ready:function(E){B();if(o.isReady){E.call(document,o)}else{o.readyList.push(E)}return this},live:function(G,F){var E=o.event.proxy(F);E.guid+=this.selector+G;o(document).bind(i(G,this.selector),this.selector,E);return this},die:function(F,E){o(document).unbind(i(F,this.selector),E?{guid:E.guid+this.selector+F}:null);return this}});function c(H){var E=RegExp(&quot;(^|\\.)&quot;+H.type+&quot;(\\.|$)&quot;),G=true,F=[];o.each(o.data(this,&quot;events&quot;).live||[],function(I,J){if(E.test(J.type)){var K=o(H.target).closest(J.data)[0];if(K){F.push({elem:K,fn:J})}}});F.sort(function(J,I){return o.data(J.elem,&quot;closest&quot;)-o.data(I.elem,&quot;closest&quot;)});o.each(F,function(){if(this.fn.call(this.elem,H,this.fn.data)===false){return(G=false)}});return G}function i(F,E){return[&quot;live&quot;,F,E.replace(/\./g,&quot;`&quot;).replace(/ /g,&quot;|&quot;)].join(&quot;.&quot;)}o.extend({isReady:false,readyList:[],ready:function(){if(!o.isReady){o.isReady=true;if(o.readyList){o.each(o.readyList,function(){this.call(document,o)});o.readyList=null}o(document).triggerHandler(&quot;ready&quot;)}}});var x=false;function B(){if(x){return}x=true;if(document.addEventListener){document.addEventListener(&quot;DOMContentLoaded&quot;,function(){document.removeEventListener(&quot;DOMContentLoaded&quot;,arguments.callee,false);o.ready()},false)}else{if(document.attachEvent){document.attachEvent(&quot;onreadystatechange&quot;,function(){if(document.readyState===&quot;complete&quot;){document.detachEvent(&quot;onreadystatechange&quot;,arguments.callee);o.ready()}});if(document.documentElement.doScroll&amp;&amp;l==l.top){(function(){if(o.isReady){return}try{document.documentElement.doScroll(&quot;left&quot;)}catch(E){setTimeout(arguments.callee,0);return}o.ready()})()}}}o.event.add(l,&quot;load&quot;,o.ready)}o.each((&quot;blur,focus,load,resize,scroll,unload,click,dblclick,mousedown,mouseup,mousemove,mouseover,mouseout,mouseenter,mouseleave,change,select,submit,keydown,keypress,keyup,error&quot;).split(&quot;,&quot;),function(F,E){o.fn[E]=function(G){return G?this.bind(E,G):this.trigger(E)}});o(l).bind(&quot;unload&quot;,function(){for(var E in o.cache){if(E!=1&amp;&amp;o.cache[E].handle){o.event.remove(o.cache[E].handle.elem)}}});(function(){o.support={};var F=document.documentElement,G=document.createElement(&quot;script&quot;),K=document.createElement(&quot;div&quot;),J=&quot;script&quot;+(new Date).getTime();K.style.display=&quot;none&quot;;K.innerHTML='   &lt;link/&gt;&lt;table&gt;&lt;/table&gt;&lt;a href=&quot;/a&quot; style=&quot;color:red;float:left;opacity:.5;&quot;&gt;a&lt;/a&gt;&lt;select&gt;&lt;option&gt;text&lt;/option&gt;&lt;/select&gt;&lt;object&gt;&lt;param/&gt;&lt;/object&gt;';var H=K.getElementsByTagName(&quot;*&quot;),E=K.getElementsByTagName(&quot;a&quot;)[0];if(!H||!H.length||!E){return}o.support={leadingWhitespace:K.firstChild.nodeType==3,tbody:!K.getElementsByTagName(&quot;tbody&quot;).length,objectAll:!!K.getElementsByTagName(&quot;object&quot;)[0].getElementsByTagName(&quot;*&quot;).length,htmlSerialize:!!K.getElementsByTagName(&quot;link&quot;).length,style:/red/.test(E.getAttribute(&quot;style&quot;)),hrefNormalized:E.getAttribute(&quot;href&quot;)===&quot;/a&quot;,opacity:E.style.opacity===&quot;0.5&quot;,cssFloat:!!E.style.cssFloat,scriptEval:false,noCloneEvent:true,boxModel:null};G.type=&quot;text/javascript&quot;;try{G.appendChild(document.createTextNode(&quot;window.&quot;+J+&quot;=1;&quot;))}catch(I){}F.insertBefore(G,F.firstChild);if(l[J]){o.support.scriptEval=true;delete l[J]}F.removeChild(G);if(K.attachEvent&amp;&amp;K.fireEvent){K.attachEvent(&quot;onclick&quot;,function(){o.support.noCloneEvent=false;K.detachEvent(&quot;onclick&quot;,arguments.callee)});K.cloneNode(true).fireEvent(&quot;onclick&quot;)}o(function(){var L=document.createElement(&quot;div&quot;);L.style.width=L.style.paddingLeft=&quot;1px&quot;;document.body.appendChild(L);o.boxModel=o.support.boxModel=L.offsetWidth===2;document.body.removeChild(L).style.display=&quot;none&quot;})})();var w=o.support.cssFloat?&quot;cssFloat&quot;:&quot;styleFloat&quot;;o.props={&quot;for&quot;:&quot;htmlFor&quot;,&quot;class&quot;:&quot;className&quot;,&quot;float&quot;:w,cssFloat:w,styleFloat:w,readonly:&quot;readOnly&quot;,maxlength:&quot;maxLength&quot;,cellspacing:&quot;cellSpacing&quot;,rowspan:&quot;rowSpan&quot;,tabindex:&quot;tabIndex&quot;};o.fn.extend({_load:o.fn.load,load:function(G,J,K){if(typeof G!==&quot;string&quot;){return this._load(G)}var I=G.indexOf(&quot; &quot;);if(I&gt;=0){var E=G.slice(I,G.length);G=G.slice(0,I)}var H=&quot;GET&quot;;if(J){if(o.isFunction(J)){K=J;J=null}else{if(typeof J===&quot;object&quot;){J=o.param(J);H=&quot;POST&quot;}}}var F=this;o.ajax({url:G,type:H,dataType:&quot;html&quot;,data:J,complete:function(M,L){if(L==&quot;success&quot;||L==&quot;notmodified&quot;){F.html(E?o(&quot;&lt;div/&gt;&quot;).append(M.responseText.replace(/&lt;script(.|\s)*?\/script&gt;/g,&quot;&quot;)).find(E):M.responseText)}if(K){F.each(K,[M.responseText,L,M])}}});return this},serialize:function(){return o.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?o.makeArray(this.elements):this}).filter(function(){return this.name&amp;&amp;!this.disabled&amp;&amp;(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password|search/i.test(this.type))}).map(function(E,F){var G=o(this).val();return G==null?null:o.isArray(G)?o.map(G,function(I,H){return{name:F.name,value:I}}):{name:F.name,value:G}}).get()}});o.each(&quot;ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend&quot;.split(&quot;,&quot;),function(E,F){o.fn[F]=function(G){return this.bind(F,G)}});var r=e();o.extend({get:function(E,G,H,F){if(o.isFunction(G)){H=G;G=null}return o.ajax({type:&quot;GET&quot;,url:E,data:G,success:H,dataType:F})},getScript:function(E,F){return o.get(E,null,F,&quot;script&quot;)},getJSON:function(E,F,G){return o.get(E,F,G,&quot;json&quot;)},post:function(E,G,H,F){if(o.isFunction(G)){H=G;G={}}return o.ajax({type:&quot;POST&quot;,url:E,data:G,success:H,dataType:F})},ajaxSetup:function(E){o.extend(o.ajaxSettings,E)},ajaxSettings:{url:location.href,global:true,type:&quot;GET&quot;,contentType:&quot;application/x-www-form-urlencoded&quot;,processData:true,async:true,xhr:function(){return l.ActiveXObject?new ActiveXObject(&quot;Microsoft.XMLHTTP&quot;):new XMLHttpRequest()},accepts:{xml:&quot;application/xml, text/xml&quot;,html:&quot;text/html&quot;,script:&quot;text/javascript, application/javascript&quot;,json:&quot;application/json, text/javascript&quot;,text:&quot;text/plain&quot;,_default:&quot;*/*&quot;}},lastModified:{},ajax:function(M){M=o.extend(true,M,o.extend(true,{},o.ajaxSettings,M));var W,F=/=\?(&amp;|$)/g,R,V,G=M.type.toUpperCase();if(M.data&amp;&amp;M.processData&amp;&amp;typeof M.data!==&quot;string&quot;){M.data=o.param(M.data)}if(M.dataType==&quot;jsonp&quot;){if(G==&quot;GET&quot;){if(!M.url.match(F)){M.url+=(M.url.match(/\?/)?&quot;&amp;&quot;:&quot;?&quot;)+(M.jsonp||&quot;callback&quot;)+&quot;=?&quot;}}else{if(!M.data||!M.data.match(F)){M.data=(M.data?M.data+&quot;&amp;&quot;:&quot;&quot;)+(M.jsonp||&quot;callback&quot;)+&quot;=?&quot;}}M.dataType=&quot;json&quot;}if(M.dataType==&quot;json&quot;&amp;&amp;(M.data&amp;&amp;M.data.match(F)||M.url.match(F))){W=&quot;jsonp&quot;+r++;if(M.data){M.data=(M.data+&quot;&quot;).replace(F,&quot;=&quot;+W+&quot;$1&quot;)}M.url=M.url.replace(F,&quot;=&quot;+W+&quot;$1&quot;);M.dataType=&quot;script&quot;;l[W]=function(X){V=X;I();L();l[W]=g;try{delete l[W]}catch(Y){}if(H){H.removeChild(T)}}}if(M.dataType==&quot;script&quot;&amp;&amp;M.cache==null){M.cache=false}if(M.cache===false&amp;&amp;G==&quot;GET&quot;){var E=e();var U=M.url.replace(/(\?|&amp;)_=.*?(&amp;|$)/,&quot;$1_=&quot;+E+&quot;$2&quot;);M.url=U+((U==M.url)?(M.url.match(/\?/)?&quot;&amp;&quot;:&quot;?&quot;)+&quot;_=&quot;+E:&quot;&quot;)}if(M.data&amp;&amp;G==&quot;GET&quot;){M.url+=(M.url.match(/\?/)?&quot;&amp;&quot;:&quot;?&quot;)+M.data;M.data=null}if(M.global&amp;&amp;!o.active++){o.event.trigger(&quot;ajaxStart&quot;)}var Q=/^(\w+:)?\/\/([^\/?#]+)/.exec(M.url);if(M.dataType==&quot;script&quot;&amp;&amp;G==&quot;GET&quot;&amp;&amp;Q&amp;&amp;(Q[1]&amp;&amp;Q[1]!=location.protocol||Q[2]!=location.host)){var H=document.getElementsByTagName(&quot;head&quot;)[0];var T=document.createElement(&quot;script&quot;);T.src=M.url;if(M.scriptCharset){T.charset=M.scriptCharset}if(!W){var O=false;T.onload=T.onreadystatechange=function(){if(!O&amp;&amp;(!this.readyState||this.readyState==&quot;loaded&quot;||this.readyState==&quot;complete&quot;)){O=true;I();L();T.onload=T.onreadystatechange=null;H.removeChild(T)}}}H.appendChild(T);return g}var K=false;var J=M.xhr();if(M.username){J.open(G,M.url,M.async,M.username,M.password)}else{J.open(G,M.url,M.async)}try{if(M.data){J.setRequestHeader(&quot;Content-Type&quot;,M.contentType)}if(M.ifModified){J.setRequestHeader(&quot;If-Modified-Since&quot;,o.lastModified[M.url]||&quot;Thu, 01 Jan 1970 00:00:00 GMT&quot;)}J.setRequestHeader(&quot;X-Requested-With&quot;,&quot;XMLHttpRequest&quot;);J.setRequestHeader(&quot;Accept&quot;,M.dataType&amp;&amp;M.accepts[M.dataType]?M.accepts[M.dataType]+&quot;, */*&quot;:M.accepts._default)}catch(S){}if(M.beforeSend&amp;&amp;M.beforeSend(J,M)===false){if(M.global&amp;&amp;!--o.active){o.event.trigger(&quot;ajaxStop&quot;)}J.abort();return false}if(M.global){o.event.trigger(&quot;ajaxSend&quot;,[J,M])}var N=function(X){if(J.readyState==0){if(P){clearInterval(P);P=null;if(M.global&amp;&amp;!--o.active){o.event.trigger(&quot;ajaxStop&quot;)}}}else{if(!K&amp;&amp;J&amp;&amp;(J.readyState==4||X==&quot;timeout&quot;)){K=true;if(P){clearInterval(P);P=null}R=X==&quot;timeout&quot;?&quot;timeout&quot;:!o.httpSuccess(J)?&quot;error&quot;:M.ifModified&amp;&amp;o.httpNotModified(J,M.url)?&quot;notmodified&quot;:&quot;success&quot;;if(R==&quot;success&quot;){try{V=o.httpData(J,M.dataType,M)}catch(Z){R=&quot;parsererror&quot;}}if(R==&quot;success&quot;){var Y;try{Y=J.getResponseHeader(&quot;Last-Modified&quot;)}catch(Z){}if(M.ifModified&amp;&amp;Y){o.lastModified[M.url]=Y}if(!W){I()}}else{o.handleError(M,J,R)}L();if(X){J.abort()}if(M.async){J=null}}}};if(M.async){var P=setInterval(N,13);if(M.timeout&gt;0){setTimeout(function(){if(J&amp;&amp;!K){N(&quot;timeout&quot;)}},M.timeout)}}try{J.send(M.data)}catch(S){o.handleError(M,J,null,S)}if(!M.async){N()}function I(){if(M.success){M.success(V,R)}if(M.global){o.event.trigger(&quot;ajaxSuccess&quot;,[J,M])}}function L(){if(M.complete){M.complete(J,R)}if(M.global){o.event.trigger(&quot;ajaxComplete&quot;,[J,M])}if(M.global&amp;&amp;!--o.active){o.event.trigger(&quot;ajaxStop&quot;)}}return J},handleError:function(F,H,E,G){if(F.error){F.error(H,E,G)}if(F.global){o.event.trigger(&quot;ajaxError&quot;,[H,F,G])}},active:0,httpSuccess:function(F){try{return !F.status&amp;&amp;location.protocol==&quot;file:&quot;||(F.status&gt;=200&amp;&amp;F.status&lt;300)||F.status==304||F.status==1223}catch(E){}return false},httpNotModified:function(G,E){try{var H=G.getResponseHeader(&quot;Last-Modified&quot;);return G.status==304||H==o.lastModified[E]}catch(F){}return false},httpData:function(J,H,G){var F=J.getResponseHeader(&quot;content-type&quot;),E=H==&quot;xml&quot;||!H&amp;&amp;F&amp;&amp;F.indexOf(&quot;xml&quot;)&gt;=0,I=E?J.responseXML:J.responseText;if(E&amp;&amp;I.documentElement.tagName==&quot;parsererror&quot;){throw&quot;parsererror&quot;}if(G&amp;&amp;G.dataFilter){I=G.dataFilter(I,H)}if(typeof I===&quot;string&quot;){if(H==&quot;script&quot;){o.globalEval(I)}if(H==&quot;json&quot;){I=l[&quot;eval&quot;](&quot;(&quot;+I+&quot;)&quot;)}}return I},param:function(E){var G=[];function H(I,J){G[G.length]=encodeURIComponent(I)+&quot;=&quot;+encodeURIComponent(J)}if(o.isArray(E)||E.jquery){o.each(E,function(){H(this.name,this.value)})}else{for(var F in E){if(o.isArray(E[F])){o.each(E[F],function(){H(F,this)})}else{H(F,o.isFunction(E[F])?E[F]():E[F])}}}return G.join(&quot;&amp;&quot;).replace(/%20/g,&quot;+&quot;)}});var m={},n,d=[[&quot;height&quot;,&quot;marginTop&quot;,&quot;marginBottom&quot;,&quot;paddingTop&quot;,&quot;paddingBottom&quot;],[&quot;width&quot;,&quot;marginLeft&quot;,&quot;marginRight&quot;,&quot;paddingLeft&quot;,&quot;paddingRight&quot;],[&quot;opacity&quot;]];function t(F,E){var G={};o.each(d.concat.apply([],d.slice(0,E)),function(){G[this]=F});return G}o.fn.extend({show:function(J,L){if(J){return this.animate(t(&quot;show&quot;,3),J,L)}else{for(var H=0,F=this.length;H&lt;F;H++){var E=o.data(this[H],&quot;olddisplay&quot;);this[H].style.display=E||&quot;&quot;;if(o.css(this[H],&quot;display&quot;)===&quot;none&quot;){var G=this[H].tagName,K;if(m[G]){K=m[G]}else{var I=o(&quot;&lt;&quot;+G+&quot; /&gt;&quot;).appendTo(&quot;body&quot;);K=I.css(&quot;display&quot;);if(K===&quot;none&quot;){K=&quot;block&quot;}I.remove();m[G]=K}o.data(this[H],&quot;olddisplay&quot;,K)}}for(var H=0,F=this.length;H&lt;F;H++){this[H].style.display=o.data(this[H],&quot;olddisplay&quot;)||&quot;&quot;}return this}},hide:function(H,I){if(H){return this.animate(t(&quot;hide&quot;,3),H,I)}else{for(var G=0,F=this.length;G&lt;F;G++){var E=o.data(this[G],&quot;olddisplay&quot;);if(!E&amp;&amp;E!==&quot;none&quot;){o.data(this[G],&quot;olddisplay&quot;,o.css(this[G],&quot;display&quot;))}}for(var G=0,F=this.length;G&lt;F;G++){this[G].style.display=&quot;none&quot;}return this}},_toggle:o.fn.toggle,toggle:function(G,F){var E=typeof G===&quot;boolean&quot;;return o.isFunction(G)&amp;&amp;o.isFunction(F)?this._toggle.apply(this,arguments):G==null||E?this.each(function(){var H=E?G:o(this).is(&quot;:hidden&quot;);o(this)[H?&quot;show&quot;:&quot;hide&quot;]()}):this.animate(t(&quot;toggle&quot;,3),G,F)},fadeTo:function(E,G,F){return this.animate({opacity:G},E,F)},animate:function(I,F,H,G){var E=o.speed(F,H,G);return this[E.queue===false?&quot;each&quot;:&quot;queue&quot;](function(){var K=o.extend({},E),M,L=this.nodeType==1&amp;&amp;o(this).is(&quot;:hidden&quot;),J=this;for(M in I){if(I[M]==&quot;hide&quot;&amp;&amp;L||I[M]==&quot;show&quot;&amp;&amp;!L){return K.complete.call(this)}if((M==&quot;height&quot;||M==&quot;width&quot;)&amp;&amp;this.style){K.display=o.css(this,&quot;display&quot;);K.overflow=this.style.overflow}}if(K.overflow!=null){this.style.overflow=&quot;hidden&quot;}K.curAnim=o.extend({},I);o.each(I,function(O,S){var R=new o.fx(J,K,O);if(/toggle|show|hide/.test(S)){R[S==&quot;toggle&quot;?L?&quot;show&quot;:&quot;hide&quot;:S](I)}else{var Q=S.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),T=R.cur(true)||0;if(Q){var N=parseFloat(Q[2]),P=Q[3]||&quot;px&quot;;if(P!=&quot;px&quot;){J.style[O]=(N||1)+P;T=((N||1)/R.cur(true))*T;J.style[O]=T+P}if(Q[1]){N=((Q[1]==&quot;-=&quot;?-1:1)*N)+T}R.custom(T,N,P)}else{R.custom(T,S,&quot;&quot;)}}});return true})},stop:function(F,E){var G=o.timers;if(F){this.queue([])}this.each(function(){for(var H=G.length-1;H&gt;=0;H--){if(G[H].elem==this){if(E){G[H](true)}G.splice(H,1)}}});if(!E){this.dequeue()}return this}});o.each({slideDown:t(&quot;show&quot;,1),slideUp:t(&quot;hide&quot;,1),slideToggle:t(&quot;toggle&quot;,1),fadeIn:{opacity:&quot;show&quot;},fadeOut:{opacity:&quot;hide&quot;}},function(E,F){o.fn[E]=function(G,H){return this.animate(F,G,H)}});o.extend({speed:function(G,H,F){var E=typeof G===&quot;object&quot;?G:{complete:F||!F&amp;&amp;H||o.isFunction(G)&amp;&amp;G,duration:G,easing:F&amp;&amp;H||H&amp;&amp;!o.isFunction(H)&amp;&amp;H};E.duration=o.fx.off?0:typeof E.duration===&quot;number&quot;?E.duration:o.fx.speeds[E.duration]||o.fx.speeds._default;E.old=E.complete;E.complete=function(){if(E.queue!==false){o(this).dequeue()}if(o.isFunction(E.old)){E.old.call(this)}};return E},easing:{linear:function(G,H,E,F){return E+F*G},swing:function(G,H,E,F){return((-Math.cos(G*Math.PI)/2)+0.5)*F+E}},timers:[],fx:function(F,E,G){this.options=E;this.elem=F;this.prop=G;if(!E.orig){E.orig={}}}});o.fx.prototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this)}(o.fx.step[this.prop]||o.fx.step._default)(this);if((this.prop==&quot;height&quot;||this.prop==&quot;width&quot;)&amp;&amp;this.elem.style){this.elem.style.display=&quot;block&quot;}},cur:function(F){if(this.elem[this.prop]!=null&amp;&amp;(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop]}var E=parseFloat(o.css(this.elem,this.prop,F));return E&amp;&amp;E&gt;-10000?E:parseFloat(o.curCSS(this.elem,this.prop))||0},custom:function(I,H,G){this.startTime=e();this.start=I;this.end=H;this.unit=G||this.unit||&quot;px&quot;;this.now=this.start;this.pos=this.state=0;var E=this;function F(J){return E.step(J)}F.elem=this.elem;if(F()&amp;&amp;o.timers.push(F)&amp;&amp;!n){n=setInterval(function(){var K=o.timers;for(var J=0;J&lt;K.length;J++){if(!K[J]()){K.splice(J--,1)}}if(!K.length){clearInterval(n);n=g}},13)}},show:function(){this.options.orig[this.prop]=o.attr(this.elem.style,this.prop);this.options.show=true;this.custom(this.prop==&quot;width&quot;||this.prop==&quot;height&quot;?1:0,this.cur());o(this.elem).show()},hide:function(){this.options.orig[this.prop]=o.attr(this.elem.style,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(H){var G=e();if(H||G&gt;=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var E=true;for(var F in this.options.curAnim){if(this.options.curAnim[F]!==true){E=false}}if(E){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(o.css(this.elem,&quot;display&quot;)==&quot;none&quot;){this.elem.style.display=&quot;block&quot;}}if(this.options.hide){o(this.elem).hide()}if(this.options.hide||this.options.show){for(var I in this.options.curAnim){o.attr(this.elem.style,I,this.options.orig[I])}}this.options.complete.call(this.elem)}return false}else{var J=G-this.startTime;this.state=J/this.options.duration;this.pos=o.easing[this.options.easing||(o.easing.swing?&quot;swing&quot;:&quot;linear&quot;)](this.state,J,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update()}return true}};o.extend(o.fx,{speeds:{slow:600,fast:200,_default:400},step:{opacity:function(E){o.attr(E.elem.style,&quot;opacity&quot;,E.now)},_default:function(E){if(E.elem.style&amp;&amp;E.elem.style[E.prop]!=null){E.elem.style[E.prop]=E.now+E.unit}else{E.elem[E.prop]=E.now}}}});if(document.documentElement.getBoundingClientRect){o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}var G=this[0].getBoundingClientRect(),J=this[0].ownerDocument,F=J.body,E=J.documentElement,L=E.clientTop||F.clientTop||0,K=E.clientLeft||F.clientLeft||0,I=G.top+(self.pageYOffset||o.boxModel&amp;&amp;E.scrollTop||F.scrollTop)-L,H=G.left+(self.pageXOffset||o.boxModel&amp;&amp;E.scrollLeft||F.scrollLeft)-K;return{top:I,left:H}}}else{o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}o.offset.initialized||o.offset.initialize();var J=this[0],G=J.offsetParent,F=J,O=J.ownerDocument,M,H=O.documentElement,K=O.body,L=O.defaultView,E=L.getComputedStyle(J,null),N=J.offsetTop,I=J.offsetLeft;while((J=J.parentNode)&amp;&amp;J!==K&amp;&amp;J!==H){M=L.getComputedStyle(J,null);N-=J.scrollTop,I-=J.scrollLeft;if(J===G){N+=J.offsetTop,I+=J.offsetLeft;if(o.offset.doesNotAddBorder&amp;&amp;!(o.offset.doesAddBorderForTableAndCells&amp;&amp;/^t(able|d|h)$/i.test(J.tagName))){N+=parseInt(M.borderTopWidth,10)||0,I+=parseInt(M.borderLeftWidth,10)||0}F=G,G=J.offsetParent}if(o.offset.subtractsBorderForOverflowNotVisible&amp;&amp;M.overflow!==&quot;visible&quot;){N+=parseInt(M.borderTopWidth,10)||0,I+=parseInt(M.borderLeftWidth,10)||0}E=M}if(E.position===&quot;relative&quot;||E.position===&quot;static&quot;){N+=K.offsetTop,I+=K.offsetLeft}if(E.position===&quot;fixed&quot;){N+=Math.max(H.scrollTop,K.scrollTop),I+=Math.max(H.scrollLeft,K.scrollLeft)}return{top:N,left:I}}}o.offset={initialize:function(){if(this.initialized){return}var L=document.body,F=document.createElement(&quot;div&quot;),H,G,N,I,M,E,J=L.style.marginTop,K='&lt;div style=&quot;position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/div&gt;&lt;table style=&quot;position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot;&gt;&lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;';M={position:&quot;absolute&quot;,top:0,left:0,margin:0,border:0,width:&quot;1px&quot;,height:&quot;1px&quot;,visibility:&quot;hidden&quot;};for(E in M){F.style[E]=M[E]}F.innerHTML=K;L.insertBefore(F,L.firstChild);H=F.firstChild,G=H.firstChild,I=H.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(G.offsetTop!==5);this.doesAddBorderForTableAndCells=(I.offsetTop===5);H.style.overflow=&quot;hidden&quot;,H.style.position=&quot;relative&quot;;this.subtractsBorderForOverflowNotVisible=(G.offsetTop===-5);L.style.marginTop=&quot;1px&quot;;this.doesNotIncludeMarginInBodyOffset=(L.offsetTop===0);L.style.marginTop=J;L.removeChild(F);this.initialized=true},bodyOffset:function(E){o.offset.initialized||o.offset.initialize();var G=E.offsetTop,F=E.offsetLeft;if(o.offset.doesNotIncludeMarginInBodyOffset){G+=parseInt(o.curCSS(E,&quot;marginTop&quot;,true),10)||0,F+=parseInt(o.curCSS(E,&quot;marginLeft&quot;,true),10)||0}return{top:G,left:F}}};o.fn.extend({position:function(){var I=0,H=0,F;if(this[0]){var G=this.offsetParent(),J=this.offset(),E=/^body|html$/i.test(G[0].tagName)?{top:0,left:0}:G.offset();J.top-=j(this,&quot;marginTop&quot;);J.left-=j(this,&quot;marginLeft&quot;);E.top+=j(G,&quot;borderTopWidth&quot;);E.left+=j(G,&quot;borderLeftWidth&quot;);F={top:J.top-E.top,left:J.left-E.left}}return F},offsetParent:function(){var E=this[0].offsetParent||document.body;while(E&amp;&amp;(!/^body|html$/i.test(E.tagName)&amp;&amp;o.css(E,&quot;position&quot;)==&quot;static&quot;)){E=E.offsetParent}return o(E)}});o.each([&quot;Left&quot;,&quot;Top&quot;],function(F,E){var G=&quot;scroll&quot;+E;o.fn[G]=function(H){if(!this[0]){return null}return H!==g?this.each(function(){this==l||this==document?l.scrollTo(!F?H:o(l).scrollLeft(),F?H:o(l).scrollTop()):this[G]=H}):this[0]==l||this[0]==document?self[F?&quot;pageYOffset&quot;:&quot;pageXOffset&quot;]||o.boxModel&amp;&amp;document.documentElement[G]||document.body[G]:this[0][G]}});o.each([&quot;Height&quot;,&quot;Width&quot;],function(I,G){var E=I?&quot;Left&quot;:&quot;Top&quot;,H=I?&quot;Right&quot;:&quot;Bottom&quot;,F=G.toLowerCase();o.fn[&quot;inner&quot;+G]=function(){return this[0]?o.css(this[0],F,false,&quot;padding&quot;):null};o.fn[&quot;outer&quot;+G]=function(K){return this[0]?o.css(this[0],F,false,K?&quot;margin&quot;:&quot;border&quot;):null};var J=G.toLowerCase();o.fn[J]=function(K){return this[0]==l?document.compatMode==&quot;CSS1Compat&quot;&amp;&amp;document.documentElement[&quot;client&quot;+G]||document.body[&quot;client&quot;+G]:this[0]==document?Math.max(document.documentElement[&quot;client&quot;+G],document.body[&quot;scroll&quot;+G],document.documentElement[&quot;scroll&quot;+G],document.body[&quot;offset&quot;+G],document.documentElement[&quot;offset&quot;+G]):K===g?(this.length?o.css(this[0],J):null):this.css(J,typeof K===&quot;string&quot;?K:K+&quot;px&quot;)}})})();
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkwpadminjscustomnavigationcustomjquery132js"></a>
<div class="addfile"><h4>Added: trunk/wp-admin/js/custom-navigation-custom-jquery-1.3.2.js (0 => 13257)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/js/custom-navigation-custom-jquery-1.3.2.js                                (rev 0)
+++ trunk/wp-admin/js/custom-navigation-custom-jquery-1.3.2.js        2010-02-20 21:57:43 UTC (rev 13257)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+(function(){var W=this,ab,F=W.jQuery,S=W.$,T=W.jQuery=W.$=function(b,a){return new T.fn.init(b,a)},M=/^[^&lt;]*(&lt;(.|\s)+&gt;)[^&gt;]*$|^#([\w-]+)$/,ac=/^.[^:#\[\.,]*$/;T.fn=T.prototype={init:function(e,b){e=e||document;if(e.nodeType){this[0]=e;this.length=1;this.context=e;return this}if(typeof e===&quot;string&quot;){var c=M.exec(e);if(c&amp;&amp;(c[1]||!b)){if(c[1]){e=T.clean([c[1]],b)}else{var a=document.getElementById(c[3]);if(a&amp;&amp;a.id!=c[3]){return T().find(e)}var d=T(a||[]);d.context=document;d.selector=e;return d}}else{return T(b).find(e)}}else{if(T.isFunction(e)){return T(document).ready(e)}}if(e.selector&amp;&amp;e.context){this.selector=e.selector;this.context=e.context}return this.setArray(T.isArray(e)?e:T.makeArray(e))},selector:&quot;&quot;,jquery:&quot;1.3.2&quot;,size:function(){return this.length},get:function(a){return a===ab?Array.prototype.slice.call(this):this[a]},pushStack:function(c,a,d){var b=T(c);b.prevObject=this;b.context=this.context;if(a===&quot;find&quot;){b.selector=this.selector+(this.selector?&quot; &quot;:&quot;&quot;)+d}else{if(a){b.selector=this.selector+&quot;.&quot;+a+&quot;(&quot;+d+&quot;)&quot;}}return b},setArray:function(a){this.length=0;Array.prototype.push.apply(this,a);return this},each:function(a,b){return T.each(this,a,b)},index:function(a){return T.inArray(a&amp;&amp;a.jquery?a[0]:a,this)},attr:function(c,a,b){var d=c;if(typeof c===&quot;string&quot;){if(a===ab){return this[0]&amp;&amp;T[b||&quot;attr&quot;](this[0],c)}else{d={};d[c]=a}}return this.each(function(e){for(c in d){T.attr(b?this.style:this,c,T.prop(this,d[c],b,e,c))}})},css:function(b,a){if((b==&quot;width&quot;||b==&quot;height&quot;)&amp;&amp;parseFloat(a)&lt;0){a=ab}return this.attr(b,a,&quot;curCSS&quot;)},text:function(a){if(typeof a!==&quot;object&quot;&amp;&amp;a!=null){return this.empty().append((this[0]&amp;&amp;this[0].ownerDocument||document).createTextNode(a))}var b=&quot;&quot;;T.each(a||this,function(){T.each(this.childNodes,function(){if(this.nodeType!=8){b+=this.nodeType!=1?this.nodeValue:T.fn.text([this])}})});return b},wrapAll:function(b){if(this[0]){var a=T(b,this[0].ownerDocument).clone();if(this[0].parentNode){a.insertBefore(this[0])}a.map(function(){var c=this;while(c.firstChild){c=c.firstChild}return c}).append(this)}return this},wrapInner:function(a){return this.each(function(){T(this).contents().wrapAll(a)})},wrap:function(a){return this.each(function(){T(this).wrapAll(a)})},append:function(){return this.domManip(arguments,true,function(a){if(this.nodeType==1){this.appendChild(a)}})},prepend:function(){return this.domManip(arguments,true,function(a){if(this.nodeType==1){this.insertBefore(a,this.firstChild)}})},before:function(){return this.domManip(arguments,false,function(a){this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,false,function(a){this.parentNode.insertBefore(a,this.nextSibling)})},end:function(){return this.prevObject||T([])},push:[].push,sort:[].sort,splice:[].splice,find:function(b){if(this.length===1){var a=this.pushStack([],&quot;find&quot;,b);a.length=0;T.find(b,this[0],a);return a}else{return this.pushStack(T.unique(T.map(this,function(c){return T.find(b,c)})),&quot;find&quot;,b)}},clone:function(b){var d=this.map(function(){if(!T.support.noCloneEvent&amp;&amp;!T.isXMLDoc(this)){var f=this.outerHTML;if(!f){var e=this.ownerDocument.createElement(&quot;div&quot;);e.appendChild(this.cloneNode(true));f=e.innerHTML}return T.clean([f.replace(/ jQuery\d+=&quot;(?:\d+|null)&quot;/g,&quot;&quot;).replace(/^\s*/,&quot;&quot;)])[0]}else{return this.cloneNode(true)}});if(b===true){var a=this.find(&quot;*&quot;).andSelf(),c=0;d.find(&quot;*&quot;).andSelf().each(function(){if(this.nodeName!==a[c].nodeName){return}var g=T.data(a[c],&quot;events&quot;);for(var e in g){for(var f in g[e]){T.event.add(this,e,g[e][f],g[e][f].data)}}c++})}return d},filter:function(a){return this.pushStack(T.isFunction(a)&amp;&amp;T.grep(this,function(b,c){return a.call(b,c)})||T.multiFilter(a,T.grep(this,function(b){return b.nodeType===1})),&quot;filter&quot;,a)},closest:function(c){var a=T.expr.match.POS.test(c)?T(c):null,b=0;return this.map(function(){var d=this;while(d&amp;&amp;d.ownerDocument){if(a?a.index(d)&gt;-1:T(d).is(c)){T.data(d,&quot;closest&quot;,b);return d}d=d.parentNode;b++}})},not:function(b){if(typeof b===&quot;string&quot;){if(ac.test(b)){return this.pushStack(T.multiFilter(b,this,true),&quot;not&quot;,b)}else{b=T.multiFilter(b,this)}}var a=b.length&amp;&amp;b[b.length-1]!==ab&amp;&amp;!b.nodeType;return this.filter(function(){return a?T.inArray(this,b)&lt;0:this!=b})},add:function(a){return this.pushStack(T.unique(T.merge(this.get(),typeof a===&quot;string&quot;?T(a):T.makeArray(a))))},is:function(a){return !!a&amp;&amp;T.multiFilter(a,this).length&gt;0},hasClass:function(a){return !!a&amp;&amp;this.is(&quot;.&quot;+a)},val:function(c){if(c===ab){var i=this[0];if(i){if(T.nodeName(i,&quot;option&quot;)){return(i.attributes.value||{}).specified?i.value:i.text}if(T.nodeName(i,&quot;select&quot;)){var e=i.selectedIndex,b=[],a=i.options,f=i.type==&quot;select-one&quot;;if(e&lt;0){return null}for(var h=f?e:0,d=f?e+1:a.length;h&lt;d;h++){var g=a[h];if(g.selected){c=T(g).val();if(f){return c}b.push(c)}}return b}return(i.value||&quot;&quot;).replace(/\r/g,&quot;&quot;)}return ab}if(typeof c===&quot;number&quot;){c+=&quot;&quot;}return this.each(function(){if(this.nodeType!=1){return}if(T.isArray(c)&amp;&amp;/radio|checkbox/.test(this.type)){this.checked=(T.inArray(this.value,c)&gt;=0||T.inArray(this.name,c)&gt;=0)}else{if(T.nodeName(this,&quot;select&quot;)){var j=T.makeArray(c);T(&quot;option&quot;,this).each(function(){this.selected=(T.inArray(this.value,j)&gt;=0||T.inArray(this.text,j)&gt;=0)});if(!j.length){this.selectedIndex=-1}}else{this.value=c}}})},html:function(a){return a===ab?(this[0]?this[0].innerHTML.replace(/ jQuery\d+=&quot;(?:\d+|null)&quot;/g,&quot;&quot;):null):this.empty().append(a)},replaceWith:function(a){return this.after(a).remove()},eq:function(a){return this.slice(a,+a+1)},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments),&quot;slice&quot;,Array.prototype.slice.call(arguments).join(&quot;,&quot;))},map:function(a){return this.pushStack(T.map(this,function(b,c){return a.call(b,c,b)}))},andSelf:function(){return this.add(this.prevObject)},domManip:function(d,a,b){if(this[0]){var e=(this[0].ownerDocument||this[0]).createDocumentFragment(),h=T.clean(d,(this[0].ownerDocument||this[0]),e),f=e.firstChild;if(f){for(var g=0,i=this.length;g&lt;i;g++){b.call(c(this[g],f),this.length&gt;1||g&gt;0?e.cloneNode(true):e)}}if(h){T.each(h,E)}}return this;function c(k,j){return a&amp;&amp;T.nodeName(k,&quot;table&quot;)&amp;&amp;T.nodeName(j,&quot;tr&quot;)?(k.getElementsByTagName(&quot;tbody&quot;)[0]||k.appendChild(k.ownerDocument.createElement(&quot;tbody&quot;))):k}}};T.fn.init.prototype=T.fn;function E(b,a){if(a.src){T.ajax({url:a.src,async:false,dataType:&quot;script&quot;})}else{T.globalEval(a.text||a.textContent||a.innerHTML||&quot;&quot;)}if(a.parentNode){a.parentNode.removeChild(a)}}function ad(){return +new Date}T.extend=T.fn.extend=function(){var c=arguments[0]||{},e=1,d=arguments.length,h=false,f;if(typeof c===&quot;boolean&quot;){h=c;c=arguments[1]||{};e=2}if(typeof c!==&quot;object&quot;&amp;&amp;!T.isFunction(c)){c={}}if(d==e){c=this;--e}for(;e&lt;d;e++){if((f=arguments[e])!=null){for(var g in f){var b=c[g],a=f[g];if(c===a){continue}if(h&amp;&amp;a&amp;&amp;typeof a===&quot;object&quot;&amp;&amp;!a.nodeType){c[g]=T.extend(h,b||(a.length!=null?[]:{}),a)}else{if(a!==ab){c[g]=a}}}}}return c};var ag=/z-?index|font-?weight|opacity|zoom|line-?height/i,Q=document.defaultView||{},L=Object.prototype.toString;T.extend({noConflict:function(a){W.$=S;if(a){W.jQuery=F}return T},isFunction:function(a){return L.call(a)===&quot;[object Function]&quot;},isArray:function(a){return L.call(a)===&quot;[object Array]&quot;},isXMLDoc:function(a){return a.nodeType===9&amp;&amp;a.documentElement.nodeName!==&quot;HTML&quot;||!!a.ownerDocument&amp;&amp;T.isXMLDoc(a.ownerDocument)},globalEval:function(a){if(a&amp;&amp;/\S/.test(a)){var b=document.getElementsByTagName(&quot;head&quot;)[0]||document.documentElement,c=document.createElement(&quot;script&quot;);c.type=&quot;text/javascript&quot;;if(T.support.scriptEval){c.appendChild(document.createTextNode(a))}else{c.text=a}b.insertBefore(c,b.firstChild);b.removeChild(c)}},nodeName:function(a,b){return a.nodeName&amp;&amp;a.nodeName.toUpperCase()==b.toUpperCase()},each:function(e,a,f){var g,d=0,c=e.length;if(f){if(c===ab){for(g in e){if(a.apply(e[g],f)===false){break}}}else{for(;d&lt;c;){if(a.apply(e[d++],f)===false){break}}}}else{if(c===ab){for(g in e){if(a.call(e[g],g,e[g])===false){break}}}else{for(var b=e[0];d&lt;c&amp;&amp;a.call(b,d,b)!==false;b=e[++d]){}}}return e},prop:function(b,a,c,d,e){if(T.isFunction(a)){a=a.call(b,d)}return typeof a===&quot;number&quot;&amp;&amp;c==&quot;curCSS&quot;&amp;&amp;!ag.test(e)?a+&quot;px&quot;:a},className:{add:function(b,a){T.each((a||&quot;&quot;).split(/\s+/),function(d,c){if(b.nodeType==1&amp;&amp;!T.className.has(b.className,c)){b.className+=(b.className?&quot; &quot;:&quot;&quot;)+c}})},remove:function(b,a){if(b.nodeType==1){b.className=a!==ab?T.grep(b.className.split(/\s+/),function(c){return !T.className.has(a,c)}).join(&quot; &quot;):&quot;&quot;}},has:function(a,b){return a&amp;&amp;T.inArray(b,(a.className||a).toString().split(/\s+/))&gt;-1}},swap:function(b,c,a){var e={};for(var d in c){e[d]=b.style[d];b.style[d]=c[d]}a.call(b);for(var d in c){b.style[d]=e[d]}},css:function(e,g,c,h){if(g==&quot;width&quot;||g==&quot;height&quot;){var a,f={position:&quot;absolute&quot;,visibility:&quot;hidden&quot;,display:&quot;block&quot;},b=g==&quot;width&quot;?[&quot;Left&quot;,&quot;Right&quot;]:[&quot;Top&quot;,&quot;Bottom&quot;];function d(){a=g==&quot;width&quot;?e.offsetWidth:e.offsetHeight;if(h===&quot;border&quot;){return}T.each(b,function(){if(!h){a-=parseFloat(T.curCSS(e,&quot;padding&quot;+this,true))||0}if(h===&quot;margin&quot;){a+=parseFloat(T.curCSS(e,&quot;margin&quot;+this,true))||0}else{a-=parseFloat(T.curCSS(e,&quot;border&quot;+this+&quot;Width&quot;,true))||0}})}if(e.offsetWidth!==0){d()}else{T.swap(e,f,d)}return Math.max(0,Math.round(a))}return T.curCSS(e,g,c)},curCSS:function(e,h,g){var b,i=e.style;if(h==&quot;opacity&quot;&amp;&amp;!T.support.opacity){b=T.attr(i,&quot;opacity&quot;);return b==&quot;&quot;?&quot;1&quot;:b}if(h.match(/float/i)){h=H}if(!g&amp;&amp;i&amp;&amp;i[h]){b=i[h]}else{if(Q.getComputedStyle){if(h.match(/float/i)){h=&quot;float&quot;}h=h.replace(/([A-Z])/g,&quot;-$1&quot;).toLowerCase();var a=Q.getComputedStyle(e,null);if(a){b=a.getPropertyValue(h)}if(h==&quot;opacity&quot;&amp;&amp;b==&quot;&quot;){b=&quot;1&quot;}}else{if(e.currentStyle){var d=h.replace(/\-(\w)/g,function(k,j){return j.toUpperCase()});b=e.currentStyle[h]||e.currentStyle[d];if(!/^\d+(px)?$/i.test(b)&amp;&amp;/^\d/.test(b)){var f=i.left,c=e.runtimeStyle.left;e.runtimeStyle.left=e.currentStyle.left;i.left=b||0;b=i.pixelLeft+&quot;px&quot;;i.left=f;e.runtimeStyle.left=c}}}}return b},clean:function(g,b,d){b=b||document;if(typeof b.createElement===&quot;undefined&quot;){b=b.ownerDocument||b[0]&amp;&amp;b[0].ownerDocument||document}if(!d&amp;&amp;g.length===1&amp;&amp;typeof g[0]===&quot;string&quot;){var e=/^&lt;(\w+)\s*\/?&gt;$/.exec(g[0]);if(e){return[b.createElement(e[1])]}}var f=[],h=[],a=b.createElement(&quot;div&quot;);T.each(g,function(l,i){if(typeof i===&quot;number&quot;){i+=&quot;&quot;}if(!i){return}if(typeof i===&quot;string&quot;){i=i.replace(/(&lt;(\w+)[^&gt;]*?)\/&gt;/g,function(q,p,r){return r.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?q:p+&quot;&gt;&lt;/&quot;+r+&quot;&gt;&quot;});var m=i.replace(/^\s+/,&quot;&quot;).substring(0,10).toLowerCase();var k=!m.indexOf(&quot;&lt;opt&quot;)&amp;&amp;[1,&quot;&lt;select multiple='multiple'&gt;&quot;,&quot;&lt;/select&gt;&quot;]||!m.indexOf(&quot;&lt;leg&quot;)&amp;&amp;[1,&quot;&lt;fieldset&gt;&quot;,&quot;&lt;/fieldset&gt;&quot;]||m.match(/^&lt;(thead|tbody|tfoot|colg|cap)/)&amp;&amp;[1,&quot;&lt;table&gt;&quot;,&quot;&lt;/table&gt;&quot;]||!m.indexOf(&quot;&lt;tr&quot;)&amp;&amp;[2,&quot;&lt;table&gt;&lt;tbody&gt;&quot;,&quot;&lt;/tbody&gt;&lt;/table&gt;&quot;]||(!m.indexOf(&quot;&lt;td&quot;)||!m.indexOf(&quot;&lt;th&quot;))&amp;&amp;[3,&quot;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&quot;,&quot;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&quot;]||!m.indexOf(&quot;&lt;col&quot;)&amp;&amp;[2,&quot;&lt;table&gt;&lt;tbody&gt;&lt;/tbody&gt;&lt;colgroup&gt;&quot;,&quot;&lt;/colgroup&gt;&lt;/table&gt;&quot;]||!T.support.htmlSerialize&amp;&amp;[1,&quot;div&lt;div&gt;&quot;,&quot;&lt;/div&gt;&quot;]||[0,&quot;&quot;,&quot;&quot;];a.innerHTML=k[1]+i+k[2];while(k[0]--){a=a.lastChild}if(!T.support.tbody){var j=/&lt;tbody/i.test(i),n=!m.indexOf(&quot;&lt;table&quot;)&amp;&amp;!j?a.firstChild&amp;&amp;a.firstChild.childNodes:k[1]==&quot;&lt;table&gt;&quot;&amp;&amp;!j?a.childNodes:[];for(var o=n.length-1;o&gt;=0;--o){if(T.nodeName(n[o],&quot;tbody&quot;)&amp;&amp;!n[o].childNodes.length){n[o].parentNode.removeChild(n[o])}}}if(!T.support.leadingWhitespace&amp;&amp;/^\s/.test(i)){a.insertBefore(b.createTextNode(i.match(/^\s*/)[0]),a.firstChild)}i=T.makeArray(a.childNodes)}if(i.nodeType){f.push(i)}else{f=T.merge(f,i)}});if(d){for(var c=0;f[c];c++){if(T.nodeName(f[c],&quot;script&quot;)&amp;&amp;(!f[c].type||f[c].type.toLowerCase()===&quot;text/javascript&quot;)){h.push(f[c].parentNode?f[c].parentNode.removeChild(f[c]):f[c])}else{if(f[c].nodeType===1){f.splice.apply(f,[c+1,0].concat(T.makeArray(f[c].getElementsByTagName(&quot;script&quot;))))}d.appendChild(f[c])}}return h}return f},attr:function(c,f,b){if(!c||c.nodeType==3||c.nodeType==8){return ab}var e=!T.isXMLDoc(c),a=b!==ab;f=e&amp;&amp;T.props[f]||f;if(c.tagName){var g=/href|src|style/.test(f);if(f==&quot;selected&quot;&amp;&amp;c.parentNode){c.parentNode.selectedIndex}if(f in c&amp;&amp;e&amp;&amp;!g){if(a){if(f==&quot;type&quot;&amp;&amp;T.nodeName(c,&quot;input&quot;)&amp;&amp;c.parentNode){throw&quot;type property can't be changed&quot;}c[f]=b}if(T.nodeName(c,&quot;form&quot;)&amp;&amp;c.getAttributeNode(f)){return c.getAttributeNode(f).nodeValue}if(f==&quot;tabIndex&quot;){var d=c.getAttributeNode(&quot;tabIndex&quot;);return d&amp;&amp;d.specified?d.value:c.nodeName.match(/(button|input|object|select|textarea)/i)?0:c.nodeName.match(/^(a|area)$/i)&amp;&amp;c.href?0:ab}return c[f]}if(!T.support.style&amp;&amp;e&amp;&amp;f==&quot;style&quot;){return T.attr(c.style,&quot;cssText&quot;,b)}if(a){c.setAttribute(f,&quot;&quot;+b)}var h=!T.support.hrefNormalized&amp;&amp;e&amp;&amp;g?c.getAttribute(f,2):c.getAttribute(f);return h===null?ab:h}if(!T.support.opacity&amp;&amp;f==&quot;opacity&quot;){if(a){c.zoom=1;c.filter=(c.filter||&quot;&quot;).replace(/alpha\([^)]*\)/,&quot;&quot;)+(parseInt(b)+&quot;&quot;==&quot;NaN&quot;?&quot;&quot;:&quot;alpha(opacity=&quot;+b*100+&quot;)&quot;)}return c.filter&amp;&amp;c.filter.indexOf(&quot;opacity=&quot;)&gt;=0?(parseFloat(c.filter.match(/opacity=([^)]*)/)[1])/100)+&quot;&quot;:&quot;&quot;}f=f.replace(/-([a-z])/ig,function(j,i){return i.toUpperCase()});if(a){c[f]=b}return c[f]},trim:function(a){return(a||&quot;&quot;).replace(/^\s+|\s+$/g,&quot;&quot;)},makeArray:function(a){var c=[];if(a!=null){var b=a.length;if(b==null||typeof a===&quot;string&quot;||T.isFunction(a)||a.setInterval){c[0]=a}else{while(b){c[--b]=a[b]}}}return c},inArray:function(b,a){for(var d=0,c=a.length;d&lt;c;d++){if(a[d]===b){return d}}return -1},merge:function(b,e){var d=0,c,a=b.length;if(!T.support.getAll){while((c=e[d++])!=null){if(c.nodeType!=8){b[a++]=c}}}else{while((c=e[d++])!=null){b[a++]=c}}return b},unique:function(a){var f=[],g={};try{for(var e=0,d=a.length;e&lt;d;e++){var b=T.data(a[e]);if(!g[b]){g[b]=true;f.push(a[e])}}}catch(c){f=a}return f},grep:function(e,a,f){var d=[];for(var c=0,b=e.length;c&lt;b;c++){if(!f!=!a(e[c],c)){d.push(e[c])}}return d},map:function(f,a){var e=[];for(var d=0,c=f.length;d&lt;c;d++){var b=a(f[d],d);if(b!=null){e[e.length]=b}}return e.concat.apply([],e)}});var O=navigator.userAgent.toLowerCase();T.browser={version:(O.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[0,&quot;0&quot;])[1],safari:/webkit/.test(O),opera:/opera/.test(O),msie:/msie/.test(O)&amp;&amp;!/opera/.test(O),mozilla:/mozilla/.test(O)&amp;&amp;!/(compatible|webkit)/.test(O)};T.each({parent:function(a){return a.parentNode},parents:function(a){return T.dir(a,&quot;parentNode&quot;)},next:function(a){return T.nth(a,2,&quot;nextSibling&quot;)},prev:function(a){return T.nth(a,2,&quot;previousSibling&quot;)},nextAll:function(a){return T.dir(a,&quot;nextSibling&quot;)},prevAll:function(a){return T.dir(a,&quot;previousSibling&quot;)},siblings:function(a){return T.sibling(a.parentNode.firstChild,a)},children:function(a){return T.sibling(a.firstChild)},contents:function(a){return T.nodeName(a,&quot;iframe&quot;)?a.contentDocument||a.contentWindow.document:T.makeArray(a.childNodes)}},function(b,a){T.fn[b]=function(d){var c=T.map(this,a);if(d&amp;&amp;typeof d==&quot;string&quot;){c=T.multiFilter(d,c)}return this.pushStack(T.unique(c),b,d)}});T.each({appendTo:&quot;append&quot;,prependTo:&quot;prepend&quot;,insertBefore:&quot;before&quot;,insertAfter:&quot;after&quot;,replaceAll:&quot;replaceWith&quot;},function(b,a){T.fn[b]=function(h){var e=[],c=T(h);for(var d=0,g=c.length;d&lt;g;d++){var f=(d&gt;0?this.clone(true):this).get();T.fn[a].apply(T(c[d]),f);e=e.concat(f)}return this.pushStack(e,b,h)}});T.each({removeAttr:function(a){T.attr(this,a,&quot;&quot;);if(this.nodeType==1){this.removeAttribute(a)}},addClass:function(a){T.className.add(this,a)},removeClass:function(a){T.className.remove(this,a)},toggleClass:function(a,b){if(typeof b!==&quot;boolean&quot;){b=!T.className.has(this,a)}T.className[b?&quot;add&quot;:&quot;remove&quot;](this,a)},remove:function(a){if(!a||T.filter(a,[this]).length){T(&quot;*&quot;,this).add([this]).each(function(){T.event.remove(this);T.removeData(this)});if(this.parentNode){this.parentNode.removeChild(this)}}},empty:function(){T(this).children().remove();while(this.firstChild){this.removeChild(this.firstChild)}}},function(b,a){T.fn[b]=function(){return this.each(a,arguments)}});function Y(b,a){return b[0]&amp;&amp;parseInt(T.curCSS(b[0],a,true),10)||0}var aa=&quot;jQuery&quot;+ad(),I=0,R={};T.extend({cache:{},data:function(c,d,b){c=c==W?R:c;var a=c[aa];if(!a){a=c[aa]=++I}if(d&amp;&amp;!T.cache[a]){T.cache[a]={}}if(b!==ab){T.cache[a][d]=b}return d?T.cache[a][d]:a},removeData:function(c,d){c=c==W?R:c;var a=c[aa];if(d){if(T.cache[a]){delete T.cache[a][d];d=&quot;&quot;;for(d in T.cache[a]){break}if(!d){T.removeData(c)}}}else{try{delete c[aa]}catch(b){if(c.removeAttribute){c.removeAttribute(aa)}}delete T.cache[a]}},queue:function(c,d,a){if(c){d=(d||&quot;fx&quot;)+&quot;queue&quot;;var b=T.data(c,d);if(!b||T.isArray(a)){b=T.data(c,d,T.makeArray(a))}else{if(a){b.push(a)}}}return b},dequeue:function(a,b){var d=T.queue(a,b),c=d.shift();if(!b||b===&quot;fx&quot;){c=d[0]}if(c!==ab){c.call(a)}}});T.fn.extend({data:function(d,b){var a=d.split(&quot;.&quot;);a[1]=a[1]?&quot;.&quot;+a[1]:&quot;&quot;;if(b===ab){var c=this.triggerHandler(&quot;getData&quot;+a[1]+&quot;!&quot;,[a[0]]);if(c===ab&amp;&amp;this.length){c=T.data(this[0],d)}return c===ab&amp;&amp;a[1]?this.data(a[0]):c}else{return this.trigger(&quot;setData&quot;+a[1]+&quot;!&quot;,[a[0],b]).each(function(){T.data(this,d,b)})}},removeData:function(a){return this.each(function(){T.removeData(this,a)})},queue:function(b,a){if(typeof b!==&quot;string&quot;){a=b;b=&quot;fx&quot;}if(a===ab){return T.queue(this[0],b)}return this.each(function(){var c=T.queue(this,b,a);if(b==&quot;fx&quot;&amp;&amp;c.length==1){c[0].call(this)}})},dequeue:function(a){return this.each(function(){T.dequeue(this,a)})}});(function(){var b=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['&quot;][^'&quot;]*['&quot;]|[^[\]'&quot;]+)+\]|\\.|[^ &gt;+~,(\[\\]+)+|[&gt;+~])(\s*,\s*)?/g,h=0,l=Object.prototype.toString;var n=function(r,v,ai,D){ai=ai||[];v=v||document;if(v.nodeType!==1&amp;&amp;v.nodeType!==9){return[]}if(!r||typeof r!==&quot;string&quot;){return ai}var q=[],t,A,x,w,C,u,s=true;b.lastIndex=0;while((t=b.exec(r))!==null){q.push(t[1]);if(t[2]){u=RegExp.rightContext;break}}if(q.length&gt;1&amp;&amp;g.exec(r)){if(q.length===2&amp;&amp;k.relative[q[0]]){A=j(q[0]+q[1],v)}else{A=k.relative[q[0]]?[v]:n(q.shift(),v);while(q.length){r=q.shift();if(k.relative[r]){r+=q.shift()}A=j(r,A)}}}else{var B=D?{expr:q.pop(),set:o(D)}:n.find(q.pop(),q.length===1&amp;&amp;v.parentNode?v.parentNode:v,c(v));A=n.filter(B.expr,B.set);if(q.length&gt;0){x=o(A)}else{s=false}while(q.length){var y=q.pop(),z=y;if(!k.relative[y]){y=&quot;&quot;}else{z=q.pop()}if(z==null){z=v}k.relative[y](x,z,c(v))}}if(!x){x=A}if(!x){throw&quot;Syntax error, unrecognized expression: &quot;+(y||r)}if(l.call(x)===&quot;[object Array]&quot;){if(!s){ai.push.apply(ai,x)}else{if(v.nodeType===1){for(var p=0;x[p]!=null;p++){if(x[p]&amp;&amp;(x[p]===true||x[p].nodeType===1&amp;&amp;i(v,x[p]))){ai.push(A[p])}}}else{for(var p=0;x[p]!=null;p++){if(x[p]&amp;&amp;x[p].nodeType===1){ai.push(A[p])}}}}}else{o(x,ai)}if(u){n(u,v,ai,D);if(m){hasDuplicate=false;ai.sort(m);if(hasDuplicate){for(var p=1;p&lt;ai.length;p++){if(ai[p]===ai[p-1]){ai.splice(p--,1)}}}}}return ai};n.matches=function(q,p){return n(q,null,null,p)};n.find=function(p,w,x){var q,s;if(!p){return[]}for(var t=0,u=k.order.length;t&lt;u;t++){var r=k.order[t],s;if((s=k.match[r].exec(p))){var v=RegExp.leftContext;if(v.substr(v.length-1)!==&quot;\\&quot;){s[1]=(s[1]||&quot;&quot;).replace(/\\/g,&quot;&quot;);q=k.find[r](s,w,x);if(q!=null){p=p.replace(k.match[r],&quot;&quot;);break}}}}if(!q){q=w.getElementsByTagName(&quot;*&quot;)}return{set:q,expr:p}};n.filter=function(C,D,z,t){var u=C,x=[],p=D,r,w,q=D&amp;&amp;D[0]&amp;&amp;c(D[0]);while(C&amp;&amp;D.length){for(var ai in k.filter){if((r=k.match[ai].exec(C))!=null){var v=k.filter[ai],y,A;w=false;if(p==x){x=[]}if(k.preFilter[ai]){r=k.preFilter[ai](r,p,z,x,t,q);if(!r){w=y=true}else{if(r===true){continue}}}if(r){for(var s=0;(A=p[s])!=null;s++){if(A){y=v(A,r,s,p);var B=t^!!y;if(z&amp;&amp;y!=null){if(B){w=true}else{p[s]=false}}else{if(B){x.push(A);w=true}}}}}if(y!==ab){if(!z){p=x}C=C.replace(k.match[ai],&quot;&quot;);if(!w){return[]}break}}}if(C==u){if(w==null){throw&quot;Syntax error, unrecognized expression: &quot;+C}else{break}}u=C}return p};var k=n.selectors={order:[&quot;ID&quot;,&quot;NAME&quot;,&quot;TAG&quot;],match:{ID:/#((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,NAME:/\[name=['&quot;]*((?:[\w\u00c0-\uFFFF_-]|\\.)+)['&quot;]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF_-]|\\.)+)\s*(?:(\S?=)\s*(['&quot;]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*_-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF_-]|\\.)+)(?:\((['&quot;]*)((?:\([^\)]+\)|[^\2\(\)]*)+)\2\))?/},attrMap:{&quot;class&quot;:&quot;className&quot;,&quot;for&quot;:&quot;htmlFor&quot;},attrHandle:{href:function(p){return p.getAttribute(&quot;href&quot;)}},relative:{&quot;+&quot;:function(p,w,q){var s=typeof w===&quot;string&quot;,x=s&amp;&amp;!/\W/.test(w),r=s&amp;&amp;!x;if(x&amp;&amp;!q){w=w.toUpperCase()}for(var t=0,u=p.length,v;t&lt;u;t++){if((v=p[t])){while((v=v.previousSibling)&amp;&amp;v.nodeType!==1){}p[t]=r||v&amp;&amp;v.nodeName===w?v||false:v===w}}if(r){n.filter(w,p,true)}},&quot;&gt;&quot;:function(u,r,t){var w=typeof r===&quot;string&quot;;if(w&amp;&amp;!/\W/.test(r)){r=t?r:r.toUpperCase();for(var q=0,s=u.length;q&lt;s;q++){var v=u[q];if(v){var p=v.parentNode;u[q]=p.nodeName===r?p:false}}}else{for(var q=0,s=u.length;q&lt;s;q++){var v=u[q];if(v){u[q]=w?v.parentNode:v.parentNode===r}}if(w){n.filter(r,u,true)}}},&quot;&quot;:function(p,r,t){var q=h++,s=a;if(!r.match(/\W/)){var u=r=t?r:r.toUpperCase();s=d}s(&quot;parentNode&quot;,r,q,p,u,t)},&quot;~&quot;:function(p,r,t){var q=h++,s=a;if(typeof r===&quot;string&quot;&amp;&amp;!r.match(/\W/)){var u=r=t?r:r.toUpperCase();s=d}s(&quot;previousSibling&quot;,r,q,p,u,t)}},find:{ID:function(r,q,p){if(typeof q.getElementById!==&quot;undefined&quot;&amp;&amp;!p){var s=q.getElementById(r[1]);return s?[s]:[]}},NAME:function(q,u,t){if(typeof u.getElementsByName!==&quot;undefined&quot;){var r=[],v=u.getElementsByName(q[1]);for(var p=0,s=v.length;p&lt;s;p++){if(v[p].getAttribute(&quot;name&quot;)===q[1]){r.push(v[p])}}return r.length===0?null:r}},TAG:function(q,p){return p.getElementsByTagName(q[1])}},preFilter:{CLASS:function(p,r,q,s,u,t){p=&quot; &quot;+p[1].replace(/\\/g,&quot;&quot;)+&quot; &quot;;if(t){return p}for(var w=0,v;(v=r[w])!=null;w++){if(v){if(u^(v.className&amp;&amp;(&quot; &quot;+v.className+&quot; &quot;).indexOf(p)&gt;=0)){if(!q){s.push(v)}}else{if(q){r[w]=false}}}}return false},ID:function(p){return p[1].replace(/\\/g,&quot;&quot;)},TAG:function(q,r){for(var p=0;r[p]===false;p++){}return r[p]&amp;&amp;c(r[p])?q[1]:q[1].toUpperCase()},CHILD:function(q){if(q[1]==&quot;nth&quot;){var p=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(q[2]==&quot;even&quot;&amp;&amp;&quot;2n&quot;||q[2]==&quot;odd&quot;&amp;&amp;&quot;2n+1&quot;||!/\D/.test(q[2])&amp;&amp;&quot;0n+&quot;+q[2]||q[2]);q[2]=(p[1]+(p[2]||1))-0;q[3]=p[3]-0}q[0]=h++;return q},ATTR:function(v,r,q,s,u,t){var p=v[1].replace(/\\/g,&quot;&quot;);if(!t&amp;&amp;k.attrMap[p]){v[1]=k.attrMap[p]}if(v[2]===&quot;~=&quot;){v[4]=&quot; &quot;+v[4]+&quot; &quot;}return v},PSEUDO:function(u,r,q,s,t){if(u[1]===&quot;not&quot;){if(u[3].match(b).length&gt;1||/^\w/.test(u[3])){u[3]=n(u[3],null,null,r)}else{var p=n.filter(u[3],r,q,true^t);if(!q){s.push.apply(s,p)}return false}}else{if(k.match.POS.test(u[0])||k.match.CHILD.test(u[0])){return true}}return u},POS:function(p){p.unshift(true);return p}},filters:{enabled:function(p){return p.disabled===false&amp;&amp;p.type!==&quot;hidden&quot;},disabled:function(p){return p.disabled===true},checked:function(p){return p.checked===true},selected:function(p){p.parentNode.selectedIndex;return p.selected===true},parent:function(p){return !!p.firstChild},empty:function(p){return !p.firstChild},has:function(p,q,r){return !!n(r[3],p).length},header:function(p){return/h\d/i.test(p.nodeName)},text:function(p){return&quot;text&quot;===p.type},radio:function(p){return&quot;radio&quot;===p.type},checkbox:function(p){return&quot;checkbox&quot;===p.type},file:function(p){return&quot;file&quot;===p.type},password:function(p){return&quot;password&quot;===p.type},submit:function(p){return&quot;submit&quot;===p.type},image:function(p){return&quot;image&quot;===p.type},reset:function(p){return&quot;reset&quot;===p.type},button:function(p){return&quot;button&quot;===p.type||p.nodeName.toUpperCase()===&quot;BUTTON&quot;},input:function(p){return/input|select|textarea|button/i.test(p.nodeName)}},setFilters:{first:function(p,q){return q===0},last:function(q,r,s,p){return r===p.length-1},even:function(p,q){return q%2===0},odd:function(p,q){return q%2===1},lt:function(p,q,r){return q&lt;r[3]-0},gt:function(p,q,r){return q&gt;r[3]-0},nth:function(p,q,r){return r[3]-0==q},eq:function(p,q,r){return r[3]-0==q}},filter:{PSEUDO:function(u,q,p,t){var r=q[1],w=k.filters[r];if(w){return w(u,p,q,t)}else{if(r===&quot;contains&quot;){return(u.textContent||u.innerText||&quot;&quot;).indexOf(q[3])&gt;=0}else{if(r===&quot;not&quot;){var v=q[3];for(var p=0,s=v.length;p&lt;s;p++){if(v[p]===u){return false}}return true}}}},CHILD:function(w,t){var q=t[1],v=w;switch(q){case&quot;only&quot;:case&quot;first&quot;:while(v=v.previousSibling){if(v.nodeType===1){return false}}if(q==&quot;first&quot;){return true}v=w;case&quot;last&quot;:while(v=v.nextSibling){if(v.nodeType===1){return false}}return true;case&quot;nth&quot;:var u=t[2],x=t[3];if(u==1&amp;&amp;x==0){return true}var r=t[0],y=w.parentNode;if(y&amp;&amp;(y.sizcache!==r||!w.nodeIndex)){var s=0;for(v=y.firstChild;v;v=v.nextSibling){if(v.nodeType===1){v.nodeIndex=++s}}y.sizcache=r}var p=w.nodeIndex-x;if(u==0){return p==0}else{return(p%u==0&amp;&amp;p/u&gt;=0)}}},ID:function(p,q){return p.nodeType===1&amp;&amp;p.getAttribute(&quot;id&quot;)===q},TAG:function(p,q){return(q===&quot;*&quot;&amp;&amp;p.nodeType===1)||p.nodeName===q},CLASS:function(p,q){return(&quot; &quot;+(p.className||p.getAttribute(&quot;class&quot;))+&quot; &quot;).indexOf(q)&gt;-1},ATTR:function(u,p){var q=p[1],s=k.attrHandle[q]?k.attrHandle[q](u):u[q]!=null?u[q]:u.getAttribute(q),t=s+&quot;&quot;,v=p[2],r=p[4];return s==null?v===&quot;!=&quot;:v===&quot;=&quot;?t===r:v===&quot;*=&quot;?t.indexOf(r)&gt;=0:v===&quot;~=&quot;?(&quot; &quot;+t+&quot; &quot;).indexOf(r)&gt;=0:!r?t&amp;&amp;s!==false:v===&quot;!=&quot;?t!=r:v===&quot;^=&quot;?t.indexOf(r)===0:v===&quot;$=&quot;?t.substr(t.length-r.length)===r:v===&quot;|=&quot;?t===r||t.substr(0,r.length+1)===r+&quot;-&quot;:false},POS:function(u,r,q,t){var s=r[2],p=k.setFilters[s];if(p){return p(u,q,r,t)}}}};var g=k.match.POS;for(var e in k.match){k.match[e]=RegExp(k.match[e].source+/(?![^\[]*\])(?![^\(]*\))/.source)}var o=function(p,q){p=Array.prototype.slice.call(p);if(q){q.push.apply(q,p);return q}return p};try{Array.prototype.slice.call(document.documentElement.childNodes)}catch(f){o=function(t,p){var r=p||[];if(l.call(t)===&quot;[object Array]&quot;){Array.prototype.push.apply(r,t)}else{if(typeof t.length===&quot;number&quot;){for(var q=0,s=t.length;q&lt;s;q++){r.push(t[q])}}else{for(var q=0;t[q];q++){r.push(t[q])}}}return r}}var m;if(document.documentElement.compareDocumentPosition){m=function(q,r){var p=q.compareDocumentPosition(r)&amp;4?-1:q===r?0:1;if(p===0){hasDuplicate=true}return p}}else{if(&quot;sourceIndex&quot; in document.documentElement){m=function(q,r){var p=q.sourceIndex-r.sourceIndex;if(p===0){hasDuplicate=true}return p}}else{if(document.createRange){m=function(p,r){var q=p.ownerDocument.createRange(),s=r.ownerDocument.createRange();q.selectNode(p);q.collapse(true);s.selectNode(r);s.collapse(true);var t=q.compareBoundaryPoints(Range.START_TO_END,s);if(t===0){hasDuplicate=true}return t}}}}(function(){var q=document.createElement(&quot;form&quot;),p=&quot;script&quot;+(new Date).getTime();q.innerHTML=&quot;&lt;input name='&quot;+p+&quot;'/&gt;&quot;;var r=document.documentElement;r.insertBefore(q,r.firstChild);if(!!document.getElementById(p)){k.find.ID=function(v,u,t){if(typeof u.getElementById!==&quot;undefined&quot;&amp;&amp;!t){var s=u.getElementById(v[1]);return s?s.id===v[1]||typeof s.getAttributeNode!==&quot;undefined&quot;&amp;&amp;s.getAttributeNode(&quot;id&quot;).nodeValue===v[1]?[s]:ab:[]}};k.filter.ID=function(t,s){var u=typeof t.getAttributeNode!==&quot;undefined&quot;&amp;&amp;t.getAttributeNode(&quot;id&quot;);return t.nodeType===1&amp;&amp;u&amp;&amp;u.nodeValue===s}}r.removeChild(q)})();(function(){var p=document.createElement(&quot;div&quot;);p.appendChild(document.createComment(&quot;&quot;));if(p.getElementsByTagName(&quot;*&quot;).length&gt;0){k.find.TAG=function(s,t){var u=t.getElementsByTagName(s[1]);if(s[1]===&quot;*&quot;){var q=[];for(var r=0;u[r];r++){if(u[r].nodeType===1){q.push(u[r])}}u=q}return u}}p.innerHTML=&quot;&lt;a href='#'&gt;&lt;/a&gt;&quot;;if(p.firstChild&amp;&amp;typeof p.firstChild.getAttribute!==&quot;undefined&quot;&amp;&amp;p.firstChild.getAttribute(&quot;href&quot;)!==&quot;#&quot;){k.attrHandle.href=function(q){return q.getAttribute(&quot;href&quot;,2)}}})();if(document.querySelectorAll){(function(){var q=n,p=document.createElement(&quot;div&quot;);p.innerHTML=&quot;&lt;p class='TEST'&gt;&lt;/p&gt;&quot;;if(p.querySelectorAll&amp;&amp;p.querySelectorAll(&quot;.TEST&quot;).length===0){return}n=function(u,v,s,r){v=v||document;if(!r&amp;&amp;v.nodeType===9&amp;&amp;!c(v)){try{return o(v.querySelectorAll(u),s)}catch(t){}}return q(u,v,s,r)};n.find=q.find;n.filter=q.filter;n.selectors=q.selectors;n.matches=q.matches})()}if(document.getElementsByClassName&amp;&amp;document.documentElement.getElementsByClassName){(function(){var p=document.createElement(&quot;div&quot;);p.innerHTML=&quot;&lt;div class='test e'&gt;&lt;/div&gt;&lt;div class='test'&gt;&lt;/div&gt;&quot;;if(p.getElementsByClassName(&quot;e&quot;).length===0){return}p.lastChild.className=&quot;e&quot;;if(p.getElementsByClassName(&quot;e&quot;).length===1){return}k.order.splice(1,0,&quot;CLASS&quot;);k.find.CLASS=function(s,r,q){if(typeof r.getElementsByClassName!==&quot;undefined&quot;&amp;&amp;!q){return r.getElementsByClassName(s[1])}}})()}function d(v,q,r,x,p,y){var z=v==&quot;previousSibling&quot;&amp;&amp;!y;for(var t=0,u=x.length;t&lt;u;t++){var w=x[t];if(w){if(z&amp;&amp;w.nodeType===1){w.sizcache=r;w.sizset=t}w=w[v];var s=false;while(w){if(w.sizcache===r){s=x[w.sizset];break}if(w.nodeType===1&amp;&amp;!y){w.sizcache=r;w.sizset=t}if(w.nodeName===q){s=w;break}w=w[v]}x[t]=s}}}function a(v,q,r,x,p,y){var z=v==&quot;previousSibling&quot;&amp;&amp;!y;for(var t=0,u=x.length;t&lt;u;t++){var w=x[t];if(w){if(z&amp;&amp;w.nodeType===1){w.sizcache=r;w.sizset=t}w=w[v];var s=false;while(w){if(w.sizcache===r){s=x[w.sizset];break}if(w.nodeType===1){if(!y){w.sizcache=r;w.sizset=t}if(typeof q!==&quot;string&quot;){if(w===q){s=true;break}}else{if(n.filter(q,[w]).length&gt;0){s=w;break}}}w=w[v]}x[t]=s}}}var i=document.compareDocumentPosition?function(p,q){return p.compareDocumentPosition(q)&amp;16}:function(p,q){return p!==q&amp;&amp;(p.contains?p.contains(q):true)};var c=function(p){return p.nodeType===9&amp;&amp;p.documentElement.nodeName!==&quot;HTML&quot;||!!p.ownerDocument&amp;&amp;c(p.ownerDocument)};var j=function(s,u){var p=[],w=&quot;&quot;,v,q=u.nodeType?[u]:u;while((v=k.match.PSEUDO.exec(s))){w+=v[0];s=s.replace(k.match.PSEUDO,&quot;&quot;)}s=k.relative[s]?s+&quot;*&quot;:s;for(var t=0,r=q.length;t&lt;r;t++){n(s,q[t],p)}return n.filter(w,p)};T.find=n;T.filter=n.filter;T.expr=n.selectors;T.expr[&quot;:&quot;]=T.expr.filters;n.selectors.filters.hidden=function(p){return p.offsetWidth===0||p.offsetHeight===0};n.selectors.filters.visible=function(p){return p.offsetWidth&gt;0||p.offsetHeight&gt;0};n.selectors.filters.animated=function(p){return T.grep(T.timers,function(q){return p===q.elem}).length};T.multiFilter=function(p,r,q){if(q){p=&quot;:not(&quot;+p+&quot;)&quot;}return n.matches(p,r)};T.dir=function(q,r){var s=[],p=q[r];while(p&amp;&amp;p!=document){if(p.nodeType==1){s.push(p)}p=p[r]}return s};T.nth=function(t,s,q,p){s=s||1;var r=0;for(;t;t=t[q]){if(t.nodeType==1&amp;&amp;++r==s){break}}return t};T.sibling=function(p,q){var r=[];for(;p;p=p.nextSibling){if(p.nodeType==1&amp;&amp;p!=q){r.push(p)}}return r};return;W.Sizzle=n})();T.event={add:function(c,f,d,a){if(c.nodeType==3||c.nodeType==8){return}if(c.setInterval&amp;&amp;c!=W){c=W}if(!d.guid){d.guid=this.guid++}if(a!==ab){var e=d;d=this.proxy(e);d.data=a}var g=T.data(c,&quot;events&quot;)||T.data(c,&quot;events&quot;,{}),b=T.data(c,&quot;handle&quot;)||T.data(c,&quot;handle&quot;,function(){return typeof T!==&quot;undefined&quot;&amp;&amp;!T.event.triggered?T.event.handle.apply(arguments.callee.elem,arguments):ab});b.elem=c;T.each(f.split(/\s+/),function(k,j){var i=j.split(&quot;.&quot;);j=i.shift();d.type=i.slice().sort().join(&quot;.&quot;);var h=g[j];if(T.event.specialAll[j]){T.event.specialAll[j].setup.call(c,a,i)}if(!h){h=g[j]={};if(!T.event.special[j]||T.event.special[j].setup.call(c,a,i)===false){if(c.addEventListener){c.addEventListener(j,b,false)}else{if(c.attachEvent){c.attachEvent(&quot;on&quot;+j,b)}}}}h[d.guid]=d;T.event.global[j]=true});c=null},guid:1,global:{},remove:function(b,e,c){if(b.nodeType==3||b.nodeType==8){return}var f=T.data(b,&quot;events&quot;),g,h;if(f){if(e===ab||(typeof e===&quot;string&quot;&amp;&amp;e.charAt(0)==&quot;.&quot;)){for(var d in f){this.remove(b,d+(e||&quot;&quot;))}}else{if(e.type){c=e.handler;e=e.type}T.each(e.split(/\s+/),function(m,k){var i=k.split(&quot;.&quot;);k=i.shift();var l=RegExp(&quot;(^|\\.)&quot;+i.slice().sort().join(&quot;.*\\.&quot;)+&quot;(\\.|$)&quot;);if(f[k]){if(c){delete f[k][c.guid]}else{for(var j in f[k]){if(l.test(f[k][j].type)){delete f[k][j]}}}if(T.event.specialAll[k]){T.event.specialAll[k].teardown.call(b,i)}for(g in f[k]){break}if(!g){if(!T.event.special[k]||T.event.special[k].teardown.call(b,i)===false){if(b.removeEventListener){b.removeEventListener(k,T.data(b,&quot;handle&quot;),false)}else{if(b.detachEvent){b.detachEvent(&quot;on&quot;+k,T.data(b,&quot;handle&quot;))}}}g=null;delete f[k]}}})}for(g in f){break}if(!g){var a=T.data(b,&quot;handle&quot;);if(a){a.elem=null}T.removeData(b,&quot;events&quot;);T.removeData(b,&quot;handle&quot;)}}},trigger:function(d,b,e,h){var f=d.type||d;if(!h){d=typeof d===&quot;object&quot;?d[aa]?d:T.extend(T.Event(f),d):T.Event(f);if(f.indexOf(&quot;!&quot;)&gt;=0){d.type=f=f.slice(0,-1);d.exclusive=true}if(!e){d.stopPropagation();if(this.global[f]){T.each(T.cache,function(){if(this.events&amp;&amp;this.events[f]){T.event.trigger(d,b,this.handle.elem)}})}}if(!e||e.nodeType==3||e.nodeType==8){return ab}d.result=ab;d.target=e;b=T.makeArray(b);b.unshift(d)}d.currentTarget=e;var c=T.data(e,&quot;handle&quot;);if(c){c.apply(e,b)}if((!e[f]||(T.nodeName(e,&quot;a&quot;)&amp;&amp;f==&quot;click&quot;))&amp;&amp;e[&quot;on&quot;+f]&amp;&amp;e[&quot;on&quot;+f].apply(e,b)===false){d.result=false}if(!h&amp;&amp;e[f]&amp;&amp;!d.isDefaultPrevented()&amp;&amp;!(T.nodeName(e,&quot;a&quot;)&amp;&amp;f==&quot;click&quot;)){this.triggered=true;try{e[f]()}catch(a){}}this.triggered=false;if(!d.isPropagationStopped()){var g=e.parentNode||e.ownerDocument;if(g){T.event.trigger(d,b,g,true)}}},handle:function(b){var c,h;b=arguments[0]=T.event.fix(b||W.event);b.currentTarget=this;var a=b.type.split(&quot;.&quot;);b.type=a.shift();c=!a.length&amp;&amp;!b.exclusive;var d=RegExp(&quot;(^|\\.)&quot;+a.slice().sort().join(&quot;.*\\.&quot;)+&quot;(\\.|$)&quot;);h=(T.data(this,&quot;events&quot;)||{})[b.type];for(var f in h){var e=h[f];if(c||d.test(e.type)){b.handler=e;b.data=e.data;var g=e.apply(this,arguments);if(g!==ab){b.result=g;if(g===false){b.preventDefault();b.stopPropagation()}}if(b.isImmediatePropagationStopped()){break}}}},props:&quot;altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which&quot;.split(&quot; &quot;),fix:function(c){if(c[aa]){return c}var e=c;c=T.Event(e);for(var d=this.props.length,a;d;){a=this.props[--d];c[a]=e[a]}if(!c.target){c.target=c.srcElement||document}if(c.target.nodeType==3){c.target=c.target.parentNode}if(!c.relatedTarget&amp;&amp;c.fromElement){c.relatedTarget=c.fromElement==c.target?c.toElement:c.fromElement}if(c.pageX==null&amp;&amp;c.clientX!=null){var b=document.documentElement,f=document.body;c.pageX=c.clientX+(b&amp;&amp;b.scrollLeft||f&amp;&amp;f.scrollLeft||0)-(b.clientLeft||0);c.pageY=c.clientY+(b&amp;&amp;b.scrollTop||f&amp;&amp;f.scrollTop||0)-(b.clientTop||0)}if(!c.which&amp;&amp;((c.charCode||c.charCode===0)?c.charCode:c.keyCode)){c.which=c.charCode||c.keyCode}if(!c.metaKey&amp;&amp;c.ctrlKey){c.metaKey=c.ctrlKey}if(!c.which&amp;&amp;c.button){c.which=(c.button&amp;1?1:(c.button&amp;2?3:(c.button&amp;4?2:0)))}return c},proxy:function(a,b){b=b||function(){return a.apply(this,arguments)};b.guid=a.guid=a.guid||b.guid||this.guid++;return b},special:{ready:{setup:P,teardown:function(){}}},specialAll:{live:{setup:function(b,a){T.event.add(this,a[0],af)},teardown:function(a){if(a.length){var c=0,b=RegExp(&quot;(^|\\.)&quot;+a[0]+&quot;(\\.|$)&quot;);T.each((T.data(this,&quot;events&quot;).live||{}),function(){if(b.test(this.type)){c++}});if(c&lt;1){T.event.remove(this,a[0],af)}}}}}};T.Event=function(a){if(!this.preventDefault){return new T.Event(a)}if(a&amp;&amp;a.type){this.originalEvent=a;this.type=a.type}else{this.type=a}this.timeStamp=ad();this[aa]=true};function X(){return false}function J(){return true}T.Event.prototype={preventDefault:function(){this.isDefaultPrevented=J;var a=this.originalEvent;if(!a){return}if(a.preventDefault){a.preventDefault()}a.returnValue=false},stopPropagation:function(){this.isPropagationStopped=J;var a=this.originalEvent;if(!a){return}if(a.stopPropagation){a.stopPropagation()}a.cancelBubble=true},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=J;this.stopPropagation()},isDefaultPrevented:X,isPropagationStopped:X,isImmediatePropagationStopped:X};var ah=function(b){var c=b.relatedTarget;while(c&amp;&amp;c!=this){try{c=c.parentNode}catch(a){c=this}}if(c!=this){b.type=b.data;T.event.handle.apply(this,arguments)}};T.each({mouseover:&quot;mouseenter&quot;,mouseout:&quot;mouseleave&quot;},function(a,b){T.event.special[b]={setup:function(){T.event.add(this,a,ah,b)},teardown:function(){T.event.remove(this,a,ah)}}});T.fn.extend({bind:function(b,a,c){return b==&quot;unload&quot;?this.one(b,a,c):this.each(function(){T.event.add(this,b,c||a,c&amp;&amp;a)})},one:function(b,a,c){var d=T.event.proxy(c||a,function(e){T(this).unbind(e,d);return(c||a).apply(this,arguments)});return this.each(function(){T.event.add(this,b,d,c&amp;&amp;a)})},unbind:function(a,b){return this.each(function(){T.event.remove(this,a,b)})},trigger:function(b,a){return this.each(function(){T.event.trigger(b,a,this)})},triggerHandler:function(c,a){if(this[0]){var b=T.Event(c);b.preventDefault();b.stopPropagation();T.event.trigger(b,a,this[0]);return b.result}},toggle:function(a){var c=arguments,b=1;while(b&lt;c.length){T.event.proxy(a,c[b++])}return this.click(T.event.proxy(a,function(d){this.lastToggle=(this.lastToggle||0)%b;d.preventDefault();return c[this.lastToggle++].apply(this,arguments)||false}))},hover:function(b,a){return this.mouseenter(b).mouseleave(a)},ready:function(a){P();if(T.isReady){a.call(document,T)}else{T.readyList.push(a)}return this},live:function(a,b){var c=T.event.proxy(b);c.guid+=this.selector+a;T(document).bind(Z(a,this.selector),this.selector,c);return this},die:function(a,b){T(document).unbind(Z(a,this.selector),b?{guid:b.guid+this.selector+a}:null);return this}});function af(a){var d=RegExp(&quot;(^|\\.)&quot;+a.type+&quot;(\\.|$)&quot;),b=true,c=[];T.each(T.data(this,&quot;events&quot;).live||[],function(g,f){if(d.test(f.type)){var e=T(a.target).closest(f.data)[0];if(e){c.push({elem:e,fn:f})}}});c.sort(function(e,f){return T.data(e.elem,&quot;closest&quot;)-T.data(f.elem,&quot;closest&quot;)});T.each(c,function(){if(this.fn.call(this.elem,a,this.fn.data)===false){return(b=false)}});return b}function Z(a,b){return[&quot;live&quot;,a,b.replace(/\./g,&quot;`&quot;).replace(/ /g,&quot;|&quot;)].join(&quot;.&quot;)}T.extend({isReady:false,readyList:[],ready:function(){if(!T.isReady){T.isReady=true;if(T.readyList){T.each(T.readyList,function(){this.call(document,T)});T.readyList=null}T(document).triggerHandler(&quot;ready&quot;)}}});var G=false;function P(){if(G){return}G=true;if(document.addEventListener){document.addEventListener(&quot;DOMContentLoaded&quot;,function(){document.removeEventListener(&quot;DOMContentLoaded&quot;,arguments.callee,false);T.ready()},false)}else{if(document.attachEvent){document.attachEvent(&quot;onreadystatechange&quot;,function(){if(document.readyState===&quot;complete&quot;){document.detachEvent(&quot;onreadystatechange&quot;,arguments.callee);T.ready()}});if(document.documentElement.doScroll&amp;&amp;W==W.top){(function(){if(T.isReady){return}try{document.documentElement.doScroll(&quot;left&quot;)}catch(a){setTimeout(arguments.callee,0);return}T.ready()})()}}}T.event.add(W,&quot;load&quot;,T.ready)}T.each((&quot;blur,focus,load,resize,scroll,unload,click,dblclick,mousedown,mouseup,mousemove,mouseover,mouseout,mouseenter,mouseleave,change,select,submit,keydown,keypress,keyup,error&quot;).split(&quot;,&quot;),function(a,b){T.fn[b]=function(c){return c?this.bind(b,c):this.trigger(b)}});T(W).bind(&quot;unload&quot;,function(){for(var a in T.cache){if(a!=1&amp;&amp;T.cache[a].handle){T.event.remove(T.cache[a].handle.elem)}}});(function(){T.support={};var f=document.documentElement,e=document.createElement(&quot;script&quot;),a=document.createElement(&quot;div&quot;),b=&quot;script&quot;+(new Date).getTime();a.style.display=&quot;none&quot;;a.innerHTML='   &lt;link/&gt;&lt;table&gt;&lt;/table&gt;&lt;a href=&quot;/a&quot; style=&quot;color:red;float:left;opacity:.5;&quot;&gt;a&lt;/a&gt;&lt;select&gt;&lt;option&gt;text&lt;/option&gt;&lt;/select&gt;&lt;object&gt;&lt;param/&gt;&lt;/object&gt;';var d=a.getElementsByTagName(&quot;*&quot;),g=a.getElementsByTagName(&quot;a&quot;)[0];if(!d||!d.length||!g){return}T.support={leadingWhitespace:a.firstChild.nodeType==3,tbody:!a.getElementsByTagName(&quot;tbody&quot;).length,objectAll:!!a.getElementsByTagName(&quot;object&quot;)[0].getElementsByTagName(&quot;*&quot;).length,htmlSerialize:!!a.getElementsByTagName(&quot;link&quot;).length,style:/red/.test(g.getAttribute(&quot;style&quot;)),hrefNormalized:g.getAttribute(&quot;href&quot;)===&quot;/a&quot;,opacity:g.style.opacity===&quot;0.5&quot;,cssFloat:!!g.style.cssFloat,scriptEval:false,noCloneEvent:true,boxModel:null};e.type=&quot;text/javascript&quot;;try{e.appendChild(document.createTextNode(&quot;window.&quot;+b+&quot;=1;&quot;))}catch(c){}f.insertBefore(e,f.firstChild);if(W[b]){T.support.scriptEval=true;delete W[b]}f.removeChild(e);if(a.attachEvent&amp;&amp;a.fireEvent){a.attachEvent(&quot;onclick&quot;,function(){T.support.noCloneEvent=false;a.detachEvent(&quot;onclick&quot;,arguments.callee)});a.cloneNode(true).fireEvent(&quot;onclick&quot;)}T(function(){var h=document.createElement(&quot;div&quot;);h.style.width=h.style.paddingLeft=&quot;1px&quot;;document.body.appendChild(h);T.boxModel=T.support.boxModel=h.offsetWidth===2;document.body.removeChild(h).style.display=&quot;none&quot;})})();var H=T.support.cssFloat?&quot;cssFloat&quot;:&quot;styleFloat&quot;;T.props={&quot;for&quot;:&quot;htmlFor&quot;,&quot;class&quot;:&quot;className&quot;,&quot;float&quot;:H,cssFloat:H,styleFloat:H,readonly:&quot;readOnly&quot;,maxlength:&quot;maxLength&quot;,cellspacing:&quot;cellSpacing&quot;,rowspan:&quot;rowSpan&quot;,tabindex:&quot;tabIndex&quot;};T.fn.extend({_load:T.fn.load,load:function(e,b,a){if(typeof e!==&quot;string&quot;){return this._load(e)}var c=e.indexOf(&quot; &quot;);if(c&gt;=0){var g=e.slice(c,e.length);e=e.slice(0,c)}var d=&quot;GET&quot;;if(b){if(T.isFunction(b)){a=b;b=null}else{if(typeof b===&quot;object&quot;){b=T.param(b);d=&quot;POST&quot;}}}var f=this;T.ajax({url:e,type:d,dataType:&quot;html&quot;,data:b,complete:function(i,h){if(h==&quot;success&quot;||h==&quot;notmodified&quot;){f.html(g?T(&quot;&lt;div/&gt;&quot;).append(i.responseText.replace(/&lt;script(.|\s)*?\/script&gt;/g,&quot;&quot;)).find(g):i.responseText)}if(a){f.each(a,[i.responseText,h,i])}}});return this},serialize:function(){return T.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?T.makeArray(this.elements):this}).filter(function(){return this.name&amp;&amp;!this.disabled&amp;&amp;(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password|search/i.test(this.type))}).map(function(c,b){var a=T(this).val();return a==null?null:T.isArray(a)?T.map(a,function(d,e){return{name:b.name,value:d}}):{name:b.name,value:a}}).get()}});T.each(&quot;ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend&quot;.split(&quot;,&quot;),function(b,a){T.fn[a]=function(c){return this.bind(a,c)}});var N=ad();T.extend({get:function(d,b,a,c){if(T.isFunction(b)){a=b;b=null}return T.ajax({type:&quot;GET&quot;,url:d,data:b,success:a,dataType:c})},getScript:function(b,a){return T.get(b,null,a,&quot;script&quot;)},getJSON:function(c,b,a){return T.get(c,b,a,&quot;json&quot;)},post:function(d,b,a,c){if(T.isFunction(b)){a=b;b={}}return T.ajax({type:&quot;POST&quot;,url:d,data:b,success:a,dataType:c})},ajaxSetup:function(a){T.extend(T.ajaxSettings,a)},ajaxSettings:{url:location.href,global:true,type:&quot;GET&quot;,contentType:&quot;application/x-www-form-urlencoded&quot;,processData:true,async:true,xhr:function(){return W.ActiveXObject?new ActiveXObject(&quot;Microsoft.XMLHTTP&quot;):new XMLHttpRequest()},accepts:{xml:&quot;application/xml, text/xml&quot;,html:&quot;text/html&quot;,script:&quot;text/javascript, application/javascript&quot;,json:&quot;application/json, text/javascript&quot;,text:&quot;text/plain&quot;,_default:&quot;*/*&quot;}},lastModified:{},ajax:function(k){k=T.extend(true,k,T.extend(true,{},T.ajaxSettings,k));var a,r=/=\?(&amp;|$)/g,f,b,q=k.type.toUpperCase();if(k.data&amp;&amp;k.processData&amp;&amp;typeof k.data!==&quot;string&quot;){k.data=T.param(k.data)}if(k.dataType==&quot;jsonp&quot;){if(q==&quot;GET&quot;){if(!k.url.match(r)){k.url+=(k.url.match(/\?/)?&quot;&amp;&quot;:&quot;?&quot;)+(k.jsonp||&quot;callback&quot;)+&quot;=?&quot;}}else{if(!k.data||!k.data.match(r)){k.data=(k.data?k.data+&quot;&amp;&quot;:&quot;&quot;)+(k.jsonp||&quot;callback&quot;)+&quot;=?&quot;}}k.dataType=&quot;json&quot;}if(k.dataType==&quot;json&quot;&amp;&amp;(k.data&amp;&amp;k.data.match(r)||k.url.match(r))){a=&quot;jsonp&quot;+N++;if(k.data){k.data=(k.data+&quot;&quot;).replace(r,&quot;=&quot;+a+&quot;$1&quot;)}k.url=k.url.replace(r,&quot;=&quot;+a+&quot;$1&quot;);k.dataType=&quot;script&quot;;W[a]=function(u){b=u;o();l();W[a]=ab;try{delete W[a]}catch(t){}if(p){p.removeChild(d)}}}if(k.dataType==&quot;script&quot;&amp;&amp;k.cache==null){k.cache=false}if(k.cache===false&amp;&amp;q==&quot;GET&quot;){var s=ad();var c=k.url.replace(/(\?|&amp;)_=.*?(&amp;|$)/,&quot;$1_=&quot;+s+&quot;$2&quot;);k.url=c+((c==k.url)?(k.url.match(/\?/)?&quot;&amp;&quot;:&quot;?&quot;)+&quot;_=&quot;+s:&quot;&quot;)}if(k.data&amp;&amp;q==&quot;GET&quot;){k.url+=(k.url.match(/\?/)?&quot;&amp;&quot;:&quot;?&quot;)+k.data;k.data=null}if(k.global&amp;&amp;!T.active++){T.event.trigger(&quot;ajaxStart&quot;)}var g=/^(\w+:)?\/\/([^\/?#]+)/.exec(k.url);if(k.dataType==&quot;script&quot;&amp;&amp;q==&quot;GET&quot;&amp;&amp;g&amp;&amp;(g[1]&amp;&amp;g[1]!=location.protocol||g[2]!=location.host)){var p=document.getElementsByTagName(&quot;head&quot;)[0];var d=document.createElement(&quot;script&quot;);d.src=k.url;if(k.scriptCharset){d.charset=k.scriptCharset}if(!a){var i=false;d.onload=d.onreadystatechange=function(){if(!i&amp;&amp;(!this.readyState||this.readyState==&quot;loaded&quot;||this.readyState==&quot;complete&quot;)){i=true;o();l();d.onload=d.onreadystatechange=null;p.removeChild(d)}}}p.appendChild(d);return ab}var m=false;var n=k.xhr();if(k.username){n.open(q,k.url,k.async,k.username,k.password)}else{n.open(q,k.url,k.async)}try{if(k.data){n.setRequestHeader(&quot;Content-Type&quot;,k.contentType)}if(k.ifModified){n.setRequestHeader(&quot;If-Modified-Since&quot;,T.lastModified[k.url]||&quot;Thu, 01 Jan 1970 00:00:00 GMT&quot;)}n.setRequestHeader(&quot;X-Requested-With&quot;,&quot;XMLHttpRequest&quot;);n.setRequestHeader(&quot;Accept&quot;,k.dataType&amp;&amp;k.accepts[k.dataType]?k.accepts[k.dataType]+&quot;, */*&quot;:k.accepts._default)}catch(e){}if(k.beforeSend&amp;&amp;k.beforeSend(n,k)===false){if(k.global&amp;&amp;!--T.active){T.event.trigger(&quot;ajaxStop&quot;)}n.abort();return false}if(k.global){T.event.trigger(&quot;ajaxSend&quot;,[n,k])}var j=function(v){if(n.readyState==0){if(h){clearInterval(h);h=null;if(k.global&amp;&amp;!--T.active){T.event.trigger(&quot;ajaxStop&quot;)}}}else{if(!m&amp;&amp;n&amp;&amp;(n.readyState==4||v==&quot;timeout&quot;)){m=true;if(h){clearInterval(h);h=null}f=v==&quot;timeout&quot;?&quot;timeout&quot;:!T.httpSuccess(n)?&quot;error&quot;:k.ifModified&amp;&amp;T.httpNotModified(n,k.url)?&quot;notmodified&quot;:&quot;success&quot;;if(f==&quot;success&quot;){try{b=T.httpData(n,k.dataType,k)}catch(t){f=&quot;parsererror&quot;}}if(f==&quot;success&quot;){var u;try{u=n.getResponseHeader(&quot;Last-Modified&quot;)}catch(t){}if(k.ifModified&amp;&amp;u){T.lastModified[k.url]=u}if(!a){o()}}else{T.handleError(k,n,f)}l();if(v){n.abort()}if(k.async){n=null}}}};if(k.async){var h=setInterval(j,13);if(k.timeout&gt;0){setTimeout(function(){if(n&amp;&amp;!m){j(&quot;timeout&quot;)}},k.timeout)}}try{n.send(k.data)}catch(e){T.handleError(k,n,null,e)}if(!k.async){j()}function o(){if(k.success){k.success(b,f)}if(k.global){T.event.trigger(&quot;ajaxSuccess&quot;,[n,k])}}function l(){if(k.complete){k.complete(n,f)}if(k.global){T.event.trigger(&quot;ajaxComplete&quot;,[n,k])}if(k.global&amp;&amp;!--T.active){T.event.trigger(&quot;ajaxStop&quot;)}}return n},handleError:function(c,a,d,b){if(c.error){c.error(a,d,b)}if(c.global){T.event.trigger(&quot;ajaxError&quot;,[a,c,b])}},active:0,httpSuccess:function(a){try{return !a.status&amp;&amp;location.protocol==&quot;file:&quot;||(a.status&gt;=200&amp;&amp;a.status&lt;300)||a.status==304||a.status==1223}catch(b){}return false},httpNotModified:function(b,d){try{var a=b.getResponseHeader(&quot;Last-Modified&quot;);return b.status==304||a==T.lastModified[d]}catch(c){}return false},httpData:function(a,c,d){var e=a.getResponseHeader(&quot;content-type&quot;),f=c==&quot;xml&quot;||!c&amp;&amp;e&amp;&amp;e.indexOf(&quot;xml&quot;)&gt;=0,b=f?a.responseXML:a.responseText;if(f&amp;&amp;b.documentElement.tagName==&quot;parsererror&quot;){throw&quot;parsererror&quot;}if(d&amp;&amp;d.dataFilter){b=d.dataFilter(b,c)}if(typeof b===&quot;string&quot;){if(c==&quot;script&quot;){T.globalEval(b)}if(c==&quot;json&quot;){b=W[&quot;eval&quot;](&quot;(&quot;+b+&quot;)&quot;)}}return b},param:function(d){var b=[];function a(f,e){b[b.length]=encodeURIComponent(f)+&quot;=&quot;+encodeURIComponent(e)}if(T.isArray(d)||d.jquery){T.each(d,function(){a(this.name,this.value)})}else{for(var c in d){if(T.isArray(d[c])){T.each(d[c],function(){a(c,this)})}else{a(c,T.isFunction(d[c])?d[c]():d[c])}}}return b.join(&quot;&amp;&quot;).replace(/%20/g,&quot;+&quot;)}});var V={},U,ae=[[&quot;height&quot;,&quot;marginTop&quot;,&quot;marginBottom&quot;,&quot;paddingTop&quot;,&quot;paddingBottom&quot;],[&quot;width&quot;,&quot;marginLeft&quot;,&quot;marginRight&quot;,&quot;paddingLeft&quot;,&quot;paddingRight&quot;],[&quot;opacity&quot;]];function K(b,c){var a={};T.each(ae.concat.apply([],ae.slice(0,c)),function(){a[this]=b});return a}T.fn.extend({show:function(c,a){if(c){return this.animate(K(&quot;show&quot;,3),c,a)}else{for(var e=0,g=this.length;e&lt;g;e++){var h=T.data(this[e],&quot;olddisplay&quot;);this[e].style.display=h||&quot;&quot;;if(T.css(this[e],&quot;display&quot;)===&quot;none&quot;){var f=this[e].tagName,b;if(V[f]){b=V[f]}else{var d=T(&quot;&lt;&quot;+f+&quot; /&gt;&quot;).appendTo(&quot;body&quot;);b=d.css(&quot;display&quot;);if(b===&quot;none&quot;){b=&quot;block&quot;}d.remove();V[f]=b}T.data(this[e],&quot;olddisplay&quot;,b)}}for(var e=0,g=this.length;e&lt;g;e++){this[e].style.display=T.data(this[e],&quot;olddisplay&quot;)||&quot;&quot;}return this}},hide:function(b,a){if(b){return this.animate(K(&quot;hide&quot;,3),b,a)}else{for(var c=0,d=this.length;c&lt;d;c++){var e=T.data(this[c],&quot;olddisplay&quot;);if(!e&amp;&amp;e!==&quot;none&quot;){T.data(this[c],&quot;olddisplay&quot;,T.css(this[c],&quot;display&quot;))}}for(var c=0,d=this.length;c&lt;d;c++){this[c].style.display=&quot;none&quot;}return this}},_toggle:T.fn.toggle,toggle:function(a,b){var c=typeof a===&quot;boolean&quot;;return T.isFunction(a)&amp;&amp;T.isFunction(b)?this._toggle.apply(this,arguments):a==null||c?this.each(function(){var d=c?a:T(this).is(&quot;:hidden&quot;);T(this)[d?&quot;show&quot;:&quot;hide&quot;]()}):this.animate(K(&quot;toggle&quot;,3),a,b)},fadeTo:function(c,a,b){return this.animate({opacity:a},c,b)},animate:function(a,d,b,c){var e=T.speed(d,b,c);return this[e.queue===false?&quot;each&quot;:&quot;queue&quot;](function(){var g=T.extend({},e),i,f=this.nodeType==1&amp;&amp;T(this).is(&quot;:hidden&quot;),h=this;for(i in a){if(a[i]==&quot;hide&quot;&amp;&amp;f||a[i]==&quot;show&quot;&amp;&amp;!f){return g.complete.call(this)}if((i==&quot;height&quot;||i==&quot;width&quot;)&amp;&amp;this.style){g.display=T.css(this,&quot;display&quot;);g.overflow=this.style.overflow}}if(g.overflow!=null){this.style.overflow=&quot;hidden&quot;}g.curAnim=T.extend({},a);T.each(a,function(o,k){var l=new T.fx(h,g,o);if(/toggle|show|hide/.test(k)){l[k==&quot;toggle&quot;?f?&quot;show&quot;:&quot;hide&quot;:k](a)}else{var m=k.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),j=l.cur(true)||0;if(m){var p=parseFloat(m[2]),n=m[3]||&quot;px&quot;;if(n!=&quot;px&quot;){h.style[o]=(p||1)+n;j=((p||1)/l.cur(true))*j;h.style[o]=j+n}if(m[1]){p=((m[1]==&quot;-=&quot;?-1:1)*p)+j}l.custom(j,p,n)}else{l.custom(j,k,&quot;&quot;)}}});return true})},stop:function(b,c){var a=T.timers;if(b){this.queue([])}this.each(function(){for(var d=a.length-1;d&gt;=0;d--){if(a[d].elem==this){if(c){a[d](true)}a.splice(d,1)}}});if(!c){this.dequeue()}return this}});T.each({slideDown:K(&quot;show&quot;,1),slideUp:K(&quot;hide&quot;,1),slideToggle:K(&quot;toggle&quot;,1),fadeIn:{opacity:&quot;show&quot;},fadeOut:{opacity:&quot;hide&quot;}},function(b,a){T.fn[b]=function(d,c){return this.animate(a,d,c)}});T.extend({speed:function(b,a,c){var d=typeof b===&quot;object&quot;?b:{complete:c||!c&amp;&amp;a||T.isFunction(b)&amp;&amp;b,duration:b,easing:c&amp;&amp;a||a&amp;&amp;!T.isFunction(a)&amp;&amp;a};d.duration=T.fx.off?0:typeof d.duration===&quot;number&quot;?d.duration:T.fx.speeds[d.duration]||T.fx.speeds._default;d.old=d.complete;d.complete=function(){if(d.queue!==false){T(this).dequeue()}if(T.isFunction(d.old)){d.old.call(this)}};return d},easing:{linear:function(b,a,d,c){return d+c*b},swing:function(b,a,d,c){return((-Math.cos(b*Math.PI)/2)+0.5)*c+d}},timers:[],fx:function(b,c,a){this.options=c;this.elem=b;this.prop=a;if(!c.orig){c.orig={}}}});T.fx.prototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this)}(T.fx.step[this.prop]||T.fx.step._default)(this);if((this.prop==&quot;height&quot;||this.prop==&quot;width&quot;)&amp;&amp;this.elem.style){this.elem.style.display=&quot;block&quot;}},cur:function(a){if(this.elem[this.prop]!=null&amp;&amp;(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop]}var b=parseFloat(T.css(this.elem,this.prop,a));return b&amp;&amp;b&gt;-10000?b:parseFloat(T.curCSS(this.elem,this.prop))||0},custom:function(a,b,c){this.startTime=ad();this.start=a;this.end=b;this.unit=c||this.unit||&quot;px&quot;;this.now=this.start;this.pos=this.state=0;var e=this;function d(f){return e.step(f)}d.elem=this.elem;if(d()&amp;&amp;T.timers.push(d)&amp;&amp;!U){U=setInterval(function(){var f=T.timers;for(var g=0;g&lt;f.length;g++){if(!f[g]()){f.splice(g--,1)}}if(!f.length){clearInterval(U);U=ab}},13)}},show:function(){this.options.orig[this.prop]=T.attr(this.elem.style,this.prop);this.options.show=true;this.custom(this.prop==&quot;width&quot;||this.prop==&quot;height&quot;?1:0,this.cur());T(this.elem).show()},hide:function(){this.options.orig[this.prop]=T.attr(this.elem.style,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(c){var d=ad();if(c||d&gt;=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var f=true;for(var e in this.options.curAnim){if(this.options.curAnim[e]!==true){f=false}}if(f){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(T.css(this.elem,&quot;display&quot;)==&quot;none&quot;){this.elem.style.display=&quot;block&quot;}}if(this.options.hide){T(this.elem).hide()}if(this.options.hide||this.options.show){for(var b in this.options.curAnim){T.attr(this.elem.style,b,this.options.orig[b])}}this.options.complete.call(this.elem)}return false}else{var a=d-this.startTime;this.state=a/this.options.duration;this.pos=T.easing[this.options.easing||(T.easing.swing?&quot;swing&quot;:&quot;linear&quot;)](this.state,a,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update()}return true}};T.extend(T.fx,{speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){T.attr(a.elem.style,&quot;opacity&quot;,a.now)},_default:function(a){if(a.elem.style&amp;&amp;a.elem.style[a.prop]!=null){a.elem.style[a.prop]=a.now+a.unit}else{a.elem[a.prop]=a.now}}}});if(document.documentElement.getBoundingClientRect){T.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return T.offset.bodyOffset(this[0])}var f=this[0].getBoundingClientRect(),c=this[0].ownerDocument,g=c.body,h=c.documentElement,a=h.clientTop||g.clientTop||0,b=h.clientLeft||g.clientLeft||0,d=f.top+(self.pageYOffset||T.boxModel&amp;&amp;h.scrollTop||g.scrollTop)-a,e=f.left+(self.pageXOffset||T.boxModel&amp;&amp;h.scrollLeft||g.scrollLeft)-b;return{top:d,left:e}}}else{T.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return T.offset.bodyOffset(this[0])}T.offset.initialized||T.offset.initialize();var f=this[0],i=f.offsetParent,j=f,a=f.ownerDocument,c,h=a.documentElement,e=a.body,d=a.defaultView,k=d.getComputedStyle(f,null),b=f.offsetTop,g=f.offsetLeft;while((f=f.parentNode)&amp;&amp;f!==e&amp;&amp;f!==h){c=d.getComputedStyle(f,null);b-=f.scrollTop,g-=f.scrollLeft;if(f===i){b+=f.offsetTop,g+=f.offsetLeft;if(T.offset.doesNotAddBorder&amp;&amp;!(T.offset.doesAddBorderForTableAndCells&amp;&amp;/^t(able|d|h)$/i.test(f.tagName))){b+=parseInt(c.borderTopWidth,10)||0,g+=parseInt(c.borderLeftWidth,10)||0}j=i,i=f.offsetParent}if(T.offset.subtractsBorderForOverflowNotVisible&amp;&amp;c.overflow!==&quot;visible&quot;){b+=parseInt(c.borderTopWidth,10)||0,g+=parseInt(c.borderLeftWidth,10)||0}k=c}if(k.position===&quot;relative&quot;||k.position===&quot;static&quot;){b+=e.offsetTop,g+=e.offsetLeft}if(k.position===&quot;fixed&quot;){b+=Math.max(h.scrollTop,e.scrollTop),g+=Math.max(h.scrollLeft,e.scrollLeft)}return{top:b,left:g}}}T.offset={initialize:function(){if(this.initialized){return}var c=document.body,i=document.createElement(&quot;div&quot;),g,h,a,f,b,j,e=c.style.marginTop,d='&lt;div style=&quot;position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/div&gt;&lt;table style=&quot;position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot;&gt;&lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;';b={position:&quot;absolute&quot;,top:0,left:0,margin:0,border:0,width:&quot;1px&quot;,height:&quot;1px&quot;,visibility:&quot;hidden&quot;};for(j in b){i.style[j]=b[j]}i.innerHTML=d;c.insertBefore(i,c.firstChild);g=i.firstChild,h=g.firstChild,f=g.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(h.offsetTop!==5);this.doesAddBorderForTableAndCells=(f.offsetTop===5);g.style.overflow=&quot;hidden&quot;,g.style.position=&quot;relative&quot;;this.subtractsBorderForOverflowNotVisible=(h.offsetTop===-5);c.style.marginTop=&quot;1px&quot;;this.doesNotIncludeMarginInBodyOffset=(c.offsetTop===0);c.style.marginTop=e;c.removeChild(i);this.initialized=true},bodyOffset:function(c){T.offset.initialized||T.offset.initialize();var a=c.offsetTop,b=c.offsetLeft;if(T.offset.doesNotIncludeMarginInBodyOffset){a+=parseInt(T.curCSS(c,&quot;marginTop&quot;,true),10)||0,b+=parseInt(T.curCSS(c,&quot;marginLeft&quot;,true),10)||0}return{top:a,left:b}}};T.fn.extend({position:function(){var b=0,c=0,e;if(this[0]){var d=this.offsetParent(),a=this.offset(),f=/^body|html$/i.test(d[0].tagName)?{top:0,left:0}:d.offset();a.top-=Y(this,&quot;marginTop&quot;);a.left-=Y(this,&quot;marginLeft&quot;);f.top+=Y(d,&quot;borderTopWidth&quot;);f.left+=Y(d,&quot;borderLeftWidth&quot;);e={top:a.top-f.top,left:a.left-f.left}}return e},offsetParent:function(){var a=this[0].offsetParent||document.body;while(a&amp;&amp;(!/^body|html$/i.test(a.tagName)&amp;&amp;T.css(a,&quot;position&quot;)==&quot;static&quot;)){a=a.offsetParent}return T(a)}});T.each([&quot;Left&quot;,&quot;Top&quot;],function(b,c){var a=&quot;scroll&quot;+c;T.fn[a]=function(d){if(!this[0]){return null}return d!==ab?this.each(function(){this==W||this==document?W.scrollTo(!b?d:T(W).scrollLeft(),b?d:T(W).scrollTop()):this[a]=d}):this[0]==W||this[0]==document?self[b?&quot;pageYOffset&quot;:&quot;pageXOffset&quot;]||T.boxModel&amp;&amp;document.documentElement[a]||document.body[a]:this[0][a]}});T.each([&quot;Height&quot;,&quot;Width&quot;],function(b,d){var f=b?&quot;Left&quot;:&quot;Top&quot;,c=b?&quot;Right&quot;:&quot;Bottom&quot;,e=d.toLowerCase();T.fn[&quot;inner&quot;+d]=function(){return this[0]?T.css(this[0],e,false,&quot;padding&quot;):null};T.fn[&quot;outer&quot;+d]=function(g){return this[0]?T.css(this[0],e,false,g?&quot;margin&quot;:&quot;border&quot;):null};var a=d.toLowerCase();T.fn[a]=function(g){return this[0]==W?document.compatMode==&quot;CSS1Compat&quot;&amp;&amp;document.documentElement[&quot;client&quot;+d]||document.body[&quot;client&quot;+d]:this[0]==document?Math.max(document.documentElement[&quot;client&quot;+d],document.body[&quot;scroll&quot;+d],document.documentElement[&quot;scroll&quot;+d],document.body[&quot;offset&quot;+d],document.documentElement[&quot;offset&quot;+d]):g===ab?(this.length?T.css(this[0],a):null):this.css(a,typeof g===&quot;string&quot;?g:g+&quot;px&quot;)}})})();
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkwpadminjscustomnavigationcustomjqueryautocompletedevjs"></a>
<div class="addfile"><h4>Added: trunk/wp-admin/js/custom-navigation-custom-jquery-autocomplete.dev.js (0 => 13257)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/js/custom-navigation-custom-jquery-autocomplete.dev.js                                (rev 0)
+++ trunk/wp-admin/js/custom-navigation-custom-jquery-autocomplete.dev.js        2010-02-20 21:57:43 UTC (rev 13257)
</span><span class="lines">@@ -0,0 +1,808 @@
</span><ins>+/*
+ * jQuery Autocomplete plugin 1.1
+ *
+ * Copyright (c) 2009 Jörn Zaefferer
+ *
+ * Dual licensed under the MIT and GPL licenses:
+ *   http://www.opensource.org/licenses/mit-license.php
+ *   http://www.gnu.org/licenses/gpl.html
+ *
+ * Revision: $Id: jquery.autocomplete.js 15 2009-08-22 10:30:27Z joern.zaefferer $
+ */
+
+;(function($) {
+        
+$.fn.extend({
+        autocomplete: function(urlOrData, options) {
+                var isUrl = typeof urlOrData == &quot;string&quot;;
+                options = $.extend({}, $.Autocompleter.defaults, {
+                        url: isUrl ? urlOrData : null,
+                        data: isUrl ? null : urlOrData,
+                        delay: isUrl ? $.Autocompleter.defaults.delay : 10,
+                        max: options &amp;&amp; !options.scroll ? 10 : 150
+                }, options);
+                
+                // if highlight is set to false, replace it with a do-nothing function
+                options.highlight = options.highlight || function(value) { return value; };
+                
+                // if the formatMatch option is not specified, then use formatItem for backwards compatibility
+                options.formatMatch = options.formatMatch || options.formatItem;
+                
+                return this.each(function() {
+                        new $.Autocompleter(this, options);
+                });
+        },
+        result: function(handler) {
+                return this.bind(&quot;result&quot;, handler);
+        },
+        search: function(handler) {
+                return this.trigger(&quot;search&quot;, [handler]);
+        },
+        flushCache: function() {
+                return this.trigger(&quot;flushCache&quot;);
+        },
+        setOptions: function(options){
+                return this.trigger(&quot;setOptions&quot;, [options]);
+        },
+        unautocomplete: function() {
+                return this.trigger(&quot;unautocomplete&quot;);
+        }
+});
+
+$.Autocompleter = function(input, options) {
+
+        var KEY = {
+                UP: 38,
+                DOWN: 40,
+                DEL: 46,
+                TAB: 9,
+                RETURN: 13,
+                ESC: 27,
+                COMMA: 188,
+                PAGEUP: 33,
+                PAGEDOWN: 34,
+                BACKSPACE: 8
+        };
+
+        // Create $ object for input element
+        var $input = $(input).attr(&quot;autocomplete&quot;, &quot;off&quot;).addClass(options.inputClass);
+
+        var timeout;
+        var previousValue = &quot;&quot;;
+        var cache = $.Autocompleter.Cache(options);
+        var hasFocus = 0;
+        var lastKeyPressCode;
+        var config = {
+                mouseDownOnSelect: false
+        };
+        var select = $.Autocompleter.Select(options, input, selectCurrent, config);
+        
+        var blockSubmit;
+        
+        // prevent form submit in opera when selecting with return key
+        $.browser.opera &amp;&amp; $(input.form).bind(&quot;submit.autocomplete&quot;, function() {
+                if (blockSubmit) {
+                        blockSubmit = false;
+                        return false;
+                }
+        });
+        
+        // only opera doesn't trigger keydown multiple times while pressed, others don't work with keypress at all
+        $input.bind(($.browser.opera ? &quot;keypress&quot; : &quot;keydown&quot;) + &quot;.autocomplete&quot;, function(event) {
+                // a keypress means the input has focus
+                // avoids issue where input had focus before the autocomplete was applied
+                hasFocus = 1;
+                // track last key pressed
+                lastKeyPressCode = event.keyCode;
+                switch(event.keyCode) {
+                
+                        case KEY.UP:
+                                event.preventDefault();
+                                if ( select.visible() ) {
+                                        select.prev();
+                                } else {
+                                        onChange(0, true);
+                                }
+                                break;
+                                
+                        case KEY.DOWN:
+                                event.preventDefault();
+                                if ( select.visible() ) {
+                                        select.next();
+                                } else {
+                                        onChange(0, true);
+                                }
+                                break;
+                                
+                        case KEY.PAGEUP:
+                                event.preventDefault();
+                                if ( select.visible() ) {
+                                        select.pageUp();
+                                } else {
+                                        onChange(0, true);
+                                }
+                                break;
+                                
+                        case KEY.PAGEDOWN:
+                                event.preventDefault();
+                                if ( select.visible() ) {
+                                        select.pageDown();
+                                } else {
+                                        onChange(0, true);
+                                }
+                                break;
+                        
+                        // matches also semicolon
+                        case options.multiple &amp;&amp; $.trim(options.multipleSeparator) == &quot;,&quot; &amp;&amp; KEY.COMMA:
+                        case KEY.TAB:
+                        case KEY.RETURN:
+                                if( selectCurrent() ) {
+                                        // stop default to prevent a form submit, Opera needs special handling
+                                        event.preventDefault();
+                                        blockSubmit = true;
+                                        return false;
+                                }
+                                break;
+                                
+                        case KEY.ESC:
+                                select.hide();
+                                break;
+                                
+                        default:
+                                clearTimeout(timeout);
+                                timeout = setTimeout(onChange, options.delay);
+                                break;
+                }
+        }).focus(function(){
+                // track whether the field has focus, we shouldn't process any
+                // results if the field no longer has focus
+                hasFocus++;
+        }).blur(function() {
+                hasFocus = 0;
+                if (!config.mouseDownOnSelect) {
+                        hideResults();
+                }
+        }).click(function() {
+                // show select when clicking in a focused field
+                if ( hasFocus++ &gt; 1 &amp;&amp; !select.visible() ) {
+                        onChange(0, true);
+                }
+        }).bind(&quot;search&quot;, function() {
+                // TODO why not just specifying both arguments?
+                var fn = (arguments.length &gt; 1) ? arguments[1] : null;
+                function findValueCallback(q, data) {
+                        var result;
+                        if( data &amp;&amp; data.length ) {
+                                for (var i=0; i &lt; data.length; i++) {
+                                        if( data[i].result.toLowerCase() == q.toLowerCase() ) {
+                                                result = data[i];
+                                                break;
+                                        }
+                                }
+                        }
+                        if( typeof fn == &quot;function&quot; ) fn(result);
+                        else $input.trigger(&quot;result&quot;, result &amp;&amp; [result.data, result.value]);
+                }
+                $.each(trimWords($input.val()), function(i, value) {
+                        request(value, findValueCallback, findValueCallback);
+                });
+        }).bind(&quot;flushCache&quot;, function() {
+                cache.flush();
+        }).bind(&quot;setOptions&quot;, function() {
+                $.extend(options, arguments[1]);
+                // if we've updated the data, repopulate
+                if ( &quot;data&quot; in arguments[1] )
+                        cache.populate();
+        }).bind(&quot;unautocomplete&quot;, function() {
+                select.unbind();
+                $input.unbind();
+                $(input.form).unbind(&quot;.autocomplete&quot;);
+        });
+        
+        
+        function selectCurrent() {
+                var selected = select.selected();
+                if( !selected )
+                        return false;
+                
+                var v = selected.result;
+                previousValue = v;
+                
+                if ( options.multiple ) {
+                        var words = trimWords($input.val());
+                        if ( words.length &gt; 1 ) {
+                                var seperator = options.multipleSeparator.length;
+                                var cursorAt = $(input).selection().start;
+                                var wordAt, progress = 0;
+                                $.each(words, function(i, word) {
+                                        progress += word.length;
+                                        if (cursorAt &lt;= progress) {
+                                                wordAt = i;
+                                                return false;
+                                        }
+                                        progress += seperator;
+                                });
+                                words[wordAt] = v;
+                                // TODO this should set the cursor to the right position, but it gets overriden somewhere
+                                //$.Autocompleter.Selection(input, progress + seperator, progress + seperator);
+                                v = words.join( options.multipleSeparator );
+                        }
+                        v += options.multipleSeparator;
+                }
+                
+                $input.val(v);
+                hideResultsNow();
+                $input.trigger(&quot;result&quot;, [selected.data, selected.value]);
+                return true;
+        }
+        
+        function onChange(crap, skipPrevCheck) {
+                if( lastKeyPressCode == KEY.DEL ) {
+                        select.hide();
+                        return;
+                }
+                
+                var currentValue = $input.val();
+                
+                if ( !skipPrevCheck &amp;&amp; currentValue == previousValue )
+                        return;
+                
+                previousValue = currentValue;
+                
+                currentValue = lastWord(currentValue);
+                if ( currentValue.length &gt;= options.minChars) {
+                        $input.addClass(options.loadingClass);
+                        if (!options.matchCase)
+                                currentValue = currentValue.toLowerCase();
+                        request(currentValue, receiveData, hideResultsNow);
+                } else {
+                        stopLoading();
+                        select.hide();
+                }
+        };
+        
+        function trimWords(value) {
+                if (!value)
+                        return [&quot;&quot;];
+                if (!options.multiple)
+                        return [$.trim(value)];
+                return $.map(value.split(options.multipleSeparator), function(word) {
+                        return $.trim(value).length ? $.trim(word) : null;
+                });
+        }
+        
+        function lastWord(value) {
+                if ( !options.multiple )
+                        return value;
+                var words = trimWords(value);
+                if (words.length == 1) 
+                        return words[0];
+                var cursorAt = $(input).selection().start;
+                if (cursorAt == value.length) {
+                        words = trimWords(value)
+                } else {
+                        words = trimWords(value.replace(value.substring(cursorAt), &quot;&quot;));
+                }
+                return words[words.length - 1];
+        }
+        
+        // fills in the input box w/the first match (assumed to be the best match)
+        // q: the term entered
+        // sValue: the first matching result
+        function autoFill(q, sValue){
+                // autofill in the complete box w/the first match as long as the user hasn't entered in more data
+                // if the last user key pressed was backspace, don't autofill
+                if( options.autoFill &amp;&amp; (lastWord($input.val()).toLowerCase() == q.toLowerCase()) &amp;&amp; lastKeyPressCode != KEY.BACKSPACE ) {
+                        // fill in the value (keep the case the user has typed)
+                        $input.val($input.val() + sValue.substring(lastWord(previousValue).length));
+                        // select the portion of the value not typed by the user (so the next character will erase)
+                        $(input).selection(previousValue.length, previousValue.length + sValue.length);
+                }
+        };
+
+        function hideResults() {
+                clearTimeout(timeout);
+                timeout = setTimeout(hideResultsNow, 200);
+        };
+
+        function hideResultsNow() {
+                var wasVisible = select.visible();
+                select.hide();
+                clearTimeout(timeout);
+                stopLoading();
+                if (options.mustMatch) {
+                        // call search and run callback
+                        $input.search(
+                                function (result){
+                                        // if no value found, clear the input box
+                                        if( !result ) {
+                                                if (options.multiple) {
+                                                        var words = trimWords($input.val()).slice(0, -1);
+                                                        $input.val( words.join(options.multipleSeparator) + (words.length ? options.multipleSeparator : &quot;&quot;) );
+                                                }
+                                                else {
+                                                        $input.val( &quot;&quot; );
+                                                        $input.trigger(&quot;result&quot;, null);
+                                                }
+                                        }
+                                }
+                        );
+                }
+        };
+
+        function receiveData(q, data) {
+                if ( data &amp;&amp; data.length &amp;&amp; hasFocus ) {
+                        stopLoading();
+                        select.display(data, q);
+                        autoFill(q, data[0].value);
+                        select.show();
+                } else {
+                        hideResultsNow();
+                }
+        };
+
+        function request(term, success, failure) {
+                if (!options.matchCase)
+                        term = term.toLowerCase();
+                var data = cache.load(term);
+                // recieve the cached data
+                if (data &amp;&amp; data.length) {
+                        success(term, data);
+                // if an AJAX url has been supplied, try loading the data now
+                } else if( (typeof options.url == &quot;string&quot;) &amp;&amp; (options.url.length &gt; 0) ){
+                        
+                        var extraParams = {
+                                timestamp: +new Date()
+                        };
+                        $.each(options.extraParams, function(key, param) {
+                                extraParams[key] = typeof param == &quot;function&quot; ? param() : param;
+                        });
+                        
+                        $.ajax({
+                                // try to leverage ajaxQueue plugin to abort previous requests
+                                mode: &quot;abort&quot;,
+                                // limit abortion to this input
+                                port: &quot;autocomplete&quot; + input.name,
+                                dataType: options.dataType,
+                                url: options.url,
+                                data: $.extend({
+                                        q: lastWord(term),
+                                        limit: options.max
+                                }, extraParams),
+                                success: function(data) {
+                                        var parsed = options.parse &amp;&amp; options.parse(data) || parse(data);
+                                        cache.add(term, parsed);
+                                        success(term, parsed);
+                                }
+                        });
+                } else {
+                        // if we have a failure, we need to empty the list -- this prevents the the [TAB] key from selecting the last successful match
+                        select.emptyList();
+                        failure(term);
+                }
+        };
+        
+        function parse(data) {
+                var parsed = [];
+                var rows = data.split(&quot;\n&quot;);
+                for (var i=0; i &lt; rows.length; i++) {
+                        var row = $.trim(rows[i]);
+                        if (row) {
+                                row = row.split(&quot;|&quot;);
+                                parsed[parsed.length] = {
+                                        data: row,
+                                        value: row[0],
+                                        result: options.formatResult &amp;&amp; options.formatResult(row, row[0]) || row[0]
+                                };
+                        }
+                }
+                return parsed;
+        };
+
+        function stopLoading() {
+                $input.removeClass(options.loadingClass);
+        };
+
+};
+
+$.Autocompleter.defaults = {
+        inputClass: &quot;ac_input&quot;,
+        resultsClass: &quot;ac_results&quot;,
+        loadingClass: &quot;ac_loading&quot;,
+        minChars: 1,
+        delay: 400,
+        matchCase: false,
+        matchSubset: true,
+        matchContains: false,
+        cacheLength: 10,
+        max: 100,
+        mustMatch: false,
+        extraParams: {},
+        selectFirst: true,
+        formatItem: function(row) { return row[0]; },
+        formatMatch: null,
+        autoFill: false,
+        width: 0,
+        multiple: false,
+        multipleSeparator: &quot;, &quot;,
+        highlight: function(value, term) {
+                return value.replace(new RegExp(&quot;(?![^&amp;;]+;)(?!&lt;[^&lt;&gt;]*)(&quot; + term.replace(/([\^\$\(\)\[\]\{\}\*\.\+\?\|\\])/gi, &quot;\\$1&quot;) + &quot;)(?![^&lt;&gt;]*&gt;)(?![^&amp;;]+;)&quot;, &quot;gi&quot;), &quot;&lt;strong&gt;$1&lt;/strong&gt;&quot;);
+        },
+    scroll: true,
+    scrollHeight: 180
+};
+
+$.Autocompleter.Cache = function(options) {
+
+        var data = {};
+        var length = 0;
+        
+        function matchSubset(s, sub) {
+                if (!options.matchCase) 
+                        s = s.toLowerCase();
+                var i = s.indexOf(sub);
+                if (options.matchContains == &quot;word&quot;){
+                        i = s.toLowerCase().search(&quot;\\b&quot; + sub.toLowerCase());
+                }
+                if (i == -1) return false;
+                return i == 0 || options.matchContains;
+        };
+        
+        function add(q, value) {
+                if (length &gt; options.cacheLength){
+                        flush();
+                }
+                if (!data[q]){ 
+                        length++;
+                }
+                data[q] = value;
+        }
+        
+        function populate(){
+                if( !options.data ) return false;
+                // track the matches
+                var stMatchSets = {},
+                        nullData = 0;
+
+                // no url was specified, we need to adjust the cache length to make sure it fits the local data store
+                if( !options.url ) options.cacheLength = 1;
+                
+                // track all options for minChars = 0
+                stMatchSets[&quot;&quot;] = [];
+                
+                // loop through the array and create a lookup structure
+                for ( var i = 0, ol = options.data.length; i &lt; ol; i++ ) {
+                        var rawValue = options.data[i];
+                        // if rawValue is a string, make an array otherwise just reference the array
+                        rawValue = (typeof rawValue == &quot;string&quot;) ? [rawValue] : rawValue;
+                        
+                        var value = options.formatMatch(rawValue, i+1, options.data.length);
+                        if ( value === false )
+                                continue;
+                                
+                        var firstChar = value.charAt(0).toLowerCase();
+                        // if no lookup array for this character exists, look it up now
+                        if( !stMatchSets[firstChar] ) 
+                                stMatchSets[firstChar] = [];
+
+                        // if the match is a string
+                        var row = {
+                                value: value,
+                                data: rawValue,
+                                result: options.formatResult &amp;&amp; options.formatResult(rawValue) || value
+                        };
+                        
+                        // push the current match into the set list
+                        stMatchSets[firstChar].push(row);
+
+                        // keep track of minChars zero items
+                        if ( nullData++ &lt; options.max ) {
+                                stMatchSets[&quot;&quot;].push(row);
+                        }
+                };
+
+                // add the data items to the cache
+                $.each(stMatchSets, function(i, value) {
+                        // increase the cache size
+                        options.cacheLength++;
+                        // add to the cache
+                        add(i, value);
+                });
+        }
+        
+        // populate any existing data
+        setTimeout(populate, 25);
+        
+        function flush(){
+                data = {};
+                length = 0;
+        }
+        
+        return {
+                flush: flush,
+                add: add,
+                populate: populate,
+                load: function(q) {
+                        if (!options.cacheLength || !length)
+                                return null;
+                        /* 
+                         * if dealing w/local data and matchContains than we must make sure
+                         * to loop through all the data collections looking for matches
+                         */
+                        if( !options.url &amp;&amp; options.matchContains ){
+                                // track all matches
+                                var csub = [];
+                                // loop through all the data grids for matches
+                                for( var k in data ){
+                                        // don't search through the stMatchSets[&quot;&quot;] (minChars: 0) cache
+                                        // this prevents duplicates
+                                        if( k.length &gt; 0 ){
+                                                var c = data[k];
+                                                $.each(c, function(i, x) {
+                                                        // if we've got a match, add it to the array
+                                                        if (matchSubset(x.value, q)) {
+                                                                csub.push(x);
+                                                        }
+                                                });
+                                        }
+                                }                                
+                                return csub;
+                        } else 
+                        // if the exact item exists, use it
+                        if (data[q]){
+                                return data[q];
+                        } else
+                        if (options.matchSubset) {
+                                for (var i = q.length - 1; i &gt;= options.minChars; i--) {
+                                        var c = data[q.substr(0, i)];
+                                        if (c) {
+                                                var csub = [];
+                                                $.each(c, function(i, x) {
+                                                        if (matchSubset(x.value, q)) {
+                                                                csub[csub.length] = x;
+                                                        }
+                                                });
+                                                return csub;
+                                        }
+                                }
+                        }
+                        return null;
+                }
+        };
+};
+
+$.Autocompleter.Select = function (options, input, select, config) {
+        var CLASSES = {
+                ACTIVE: &quot;ac_over&quot;
+        };
+        
+        var listItems,
+                active = -1,
+                data,
+                term = &quot;&quot;,
+                needsInit = true,
+                element,
+                list;
+        
+        // Create results
+        function init() {
+                if (!needsInit)
+                        return;
+                element = $(&quot;&lt;div/&gt;&quot;)
+                .hide()
+                .addClass(options.resultsClass)
+                .css(&quot;position&quot;, &quot;absolute&quot;)
+                .appendTo(document.body);
+        
+                list = $(&quot;&lt;ul/&gt;&quot;).appendTo(element).mouseover( function(event) {
+                        if(target(event).nodeName &amp;&amp; target(event).nodeName.toUpperCase() == 'LI') {
+                    active = $(&quot;li&quot;, list).removeClass(CLASSES.ACTIVE).index(target(event));
+                            $(target(event)).addClass(CLASSES.ACTIVE);            
+                }
+                }).click(function(event) {
+                        $(target(event)).addClass(CLASSES.ACTIVE);
+                        select();
+                        // TODO provide option to avoid setting focus again after selection? useful for cleanup-on-focus
+                        input.focus();
+                        return false;
+                }).mousedown(function() {
+                        config.mouseDownOnSelect = true;
+                }).mouseup(function() {
+                        config.mouseDownOnSelect = false;
+                });
+                
+                if( options.width &gt; 0 )
+                        element.css(&quot;width&quot;, options.width);
+                        
+                needsInit = false;
+        } 
+        
+        function target(event) {
+                var element = event.target;
+                while(element &amp;&amp; element.tagName != &quot;LI&quot;)
+                        element = element.parentNode;
+                // more fun with IE, sometimes event.target is empty, just ignore it then
+                if(!element)
+                        return [];
+                return element;
+        }
+
+        function moveSelect(step) {
+                listItems.slice(active, active + 1).removeClass(CLASSES.ACTIVE);
+                movePosition(step);
+        var activeItem = listItems.slice(active, active + 1).addClass(CLASSES.ACTIVE);
+        if(options.scroll) {
+            var offset = 0;
+            listItems.slice(0, active).each(function() {
+                                offset += this.offsetHeight;
+                        });
+            if((offset + activeItem[0].offsetHeight - list.scrollTop()) &gt; list[0].clientHeight) {
+                list.scrollTop(offset + activeItem[0].offsetHeight - list.innerHeight());
+            } else if(offset &lt; list.scrollTop()) {
+                list.scrollTop(offset);
+            }
+        }
+        };
+        
+        function movePosition(step) {
+                active += step;
+                if (active &lt; 0) {
+                        active = listItems.size() - 1;
+                } else if (active &gt;= listItems.size()) {
+                        active = 0;
+                }
+        }
+        
+        function limitNumberOfItems(available) {
+                return options.max &amp;&amp; options.max &lt; available
+                        ? options.max
+                        : available;
+        }
+        
+        function fillList() {
+                list.empty();
+                var max = limitNumberOfItems(data.length);
+                for (var i=0; i &lt; max; i++) {
+                        if (!data[i])
+                                continue;
+                        var formatted = options.formatItem(data[i].data, i+1, max, data[i].value, term);
+                        if ( formatted === false )
+                                continue;
+                        var li = $(&quot;&lt;li/&gt;&quot;).html( options.highlight(formatted, term) ).addClass(i%2 == 0 ? &quot;ac_even&quot; : &quot;ac_odd&quot;).appendTo(list)[0];
+                        $.data(li, &quot;ac_data&quot;, data[i]);
+                }
+                listItems = list.find(&quot;li&quot;);
+                if ( options.selectFirst ) {
+                        listItems.slice(0, 1).addClass(CLASSES.ACTIVE);
+                        active = 0;
+                }
+                // apply bgiframe if available
+                if ( $.fn.bgiframe )
+                        list.bgiframe();
+        }
+        
+        return {
+                display: function(d, q) {
+                        init();
+                        data = d;
+                        term = q;
+                        fillList();
+                },
+                next: function() {
+                        moveSelect(1);
+                },
+                prev: function() {
+                        moveSelect(-1);
+                },
+                pageUp: function() {
+                        if (active != 0 &amp;&amp; active - 8 &lt; 0) {
+                                moveSelect( -active );
+                        } else {
+                                moveSelect(-8);
+                        }
+                },
+                pageDown: function() {
+                        if (active != listItems.size() - 1 &amp;&amp; active + 8 &gt; listItems.size()) {
+                                moveSelect( listItems.size() - 1 - active );
+                        } else {
+                                moveSelect(8);
+                        }
+                },
+                hide: function() {
+                        element &amp;&amp; element.hide();
+                        listItems &amp;&amp; listItems.removeClass(CLASSES.ACTIVE);
+                        active = -1;
+                },
+                visible : function() {
+                        return element &amp;&amp; element.is(&quot;:visible&quot;);
+                },
+                current: function() {
+                        return this.visible() &amp;&amp; (listItems.filter(&quot;.&quot; + CLASSES.ACTIVE)[0] || options.selectFirst &amp;&amp; listItems[0]);
+                },
+                show: function() {
+                        var offset = $(input).offset();
+                        element.css({
+                                width: typeof options.width == &quot;string&quot; || options.width &gt; 0 ? options.width : $(input).width(),
+                                top: offset.top + input.offsetHeight,
+                                left: offset.left
+                        }).show();
+            if(options.scroll) {
+                list.scrollTop(0);
+                list.css({
+                                        maxHeight: options.scrollHeight,
+                                        overflow: 'auto'
+                                });
+                                
+                if($.browser.msie &amp;&amp; typeof document.body.style.maxHeight === &quot;undefined&quot;) {
+                                        var listHeight = 0;
+                                        listItems.each(function() {
+                                                listHeight += this.offsetHeight;
+                                        });
+                                        var scrollbarsVisible = listHeight &gt; options.scrollHeight;
+                    list.css('height', scrollbarsVisible ? options.scrollHeight : listHeight );
+                                        if (!scrollbarsVisible) {
+                                                // IE doesn't recalculate width when scrollbar disappears
+                                                listItems.width( list.width() - parseInt(listItems.css(&quot;padding-left&quot;)) - parseInt(listItems.css(&quot;padding-right&quot;)) );
+                                        }
+                }
+                
+            }
+                },
+                selected: function() {
+                        var selected = listItems &amp;&amp; listItems.filter(&quot;.&quot; + CLASSES.ACTIVE).removeClass(CLASSES.ACTIVE);
+                        return selected &amp;&amp; selected.length &amp;&amp; $.data(selected[0], &quot;ac_data&quot;);
+                },
+                emptyList: function (){
+                        list &amp;&amp; list.empty();
+                },
+                unbind: function() {
+                        element &amp;&amp; element.remove();
+                }
+        };
+};
+
+$.fn.selection = function(start, end) {
+        if (start !== undefined) {
+                return this.each(function() {
+                        if( this.createTextRange ){
+                                var selRange = this.createTextRange();
+                                if (end === undefined || start == end) {
+                                        selRange.move(&quot;character&quot;, start);
+                                        selRange.select();
+                                } else {
+                                        selRange.collapse(true);
+                                        selRange.moveStart(&quot;character&quot;, start);
+                                        selRange.moveEnd(&quot;character&quot;, end);
+                                        selRange.select();
+                                }
+                        } else if( this.setSelectionRange ){
+                                this.setSelectionRange(start, end);
+                        } else if( this.selectionStart ){
+                                this.selectionStart = start;
+                                this.selectionEnd = end;
+                        }
+                });
+        }
+        var field = this[0];
+        if ( field.createTextRange ) {
+                var range = document.selection.createRange(),
+                        orig = field.value,
+                        teststring = &quot;&lt;-&gt;&quot;,
+                        textLength = range.text.length;
+                range.text = teststring;
+                var caretAt = field.value.indexOf(teststring);
+                field.value = orig;
+                this.selection(caretAt, caretAt + textLength);
+                return {
+                        start: caretAt,
+                        end: caretAt + textLength
+                }
+        } else if( field.selectionStart !== undefined ){
+                return {
+                        start: field.selectionStart,
+                        end: field.selectionEnd
+                }
+        }
+};
+
+})(jQuery);
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkwpadminjscustomnavigationcustomjqueryautocompletejs"></a>
<div class="addfile"><h4>Added: trunk/wp-admin/js/custom-navigation-custom-jquery-autocomplete.js (0 => 13257)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/js/custom-navigation-custom-jquery-autocomplete.js                                (rev 0)
+++ trunk/wp-admin/js/custom-navigation-custom-jquery-autocomplete.js        2010-02-20 21:57:43 UTC (rev 13257)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+(function(a){a.fn.extend({autocomplete:function(b,c){var d=typeof b==&quot;string&quot;;c=a.extend({},a.Autocompleter.defaults,{url:d?b:null,data:d?null:b,delay:d?a.Autocompleter.defaults.delay:10,max:c&amp;&amp;!c.scroll?10:150},c);c.highlight=c.highlight||function(e){return e};c.formatMatch=c.formatMatch||c.formatItem;return this.each(function(){new a.Autocompleter(this,c)})},result:function(b){return this.bind(&quot;result&quot;,b)},search:function(b){return this.trigger(&quot;search&quot;,[b])},flushCache:function(){return this.trigger(&quot;flushCache&quot;)},setOptions:function(b){return this.trigger(&quot;setOptions&quot;,[b])},unautocomplete:function(){return this.trigger(&quot;unautocomplete&quot;)}});a.Autocompleter=function(l,g){var c={UP:38,DOWN:40,DEL:46,TAB:9,RETURN:13,ESC:27,COMMA:188,PAGEUP:33,PAGEDOWN:34,BACKSPACE:8};var b=a(l).attr(&quot;autocomplete&quot;,&quot;off&quot;).addClass(g.inputClass);var j;var p=&quot;&quot;;var m=a.Autocompleter.Cache(g);var e=0;var u;var x={mouseDownOnSelect:false};var r=a.Autocompleter.Select(g,l,d,x);var w;a.browser.opera&amp;&amp;a(l.form).bind(&quot;submit.autocomplete&quot;,function(){if(w){w=false;return false}});b.bind((a.browser.opera?&quot;keypress&quot;:&quot;keydown&quot;)+&quot;.autocomplete&quot;,function(y){e=1;u=y.keyCode;switch(y.keyCode){case c.UP:y.preventDefault();if(r.visible()){r.prev()}else{t(0,true)}break;case c.DOWN:y.preventDefault();if(r.visible()){r.next()}else{t(0,true)}break;case c.PAGEUP:y.preventDefault();if(r.visible()){r.pageUp()}else{t(0,true)}break;case c.PAGEDOWN:y.preventDefault();if(r.visible()){r.pageDown()}else{t(0,true)}break;case g.multiple&amp;&amp;a.trim(g.multipleSeparator)==&quot;,&quot;&amp;&amp;c.COMMA:case c.TAB:case c.RETURN:if(d()){y.preventDefault();w=true;return false}break;case c.ESC:r.hide();break;default:clearTimeout(j);j=setTimeout(t,g.delay);break}}).focus(function(){e++}).blur(function(){e=0;if(!x.mouseDownOnSelect){s()}}).click(function(){if(e++&gt;1&amp;&amp;!r.visible()){t(0,true)}}).bind(&quot;search&quot;,function(){var y=(arguments.length&gt;1)?arguments[1]:null;function z(D,C){var A;if(C&amp;&amp;C.length){for(var B=0;B&lt;C.length;B++){if(C[B].result.toLowerCase()==D.toLowerCase()){A=C[B];break}}}if(typeof y==&quot;function&quot;){y(A)}else{b.trigger(&quot;result&quot;,A&amp;&amp;[A.data,A.value])}}a.each(h(b.val()),function(A,B){f(B,z,z)})}).bind(&quot;flushCache&quot;,function(){m.flush()}).bind(&quot;setOptions&quot;,function(){a.extend(g,arguments[1]);if(&quot;data&quot; in arguments[1]){m.populate()}}).bind(&quot;unautocomplete&quot;,function(){r.unbind();b.unbind();a(l.form).unbind(&quot;.autocomplete&quot;)});function d(){var B=r.selected();if(!B){return false}var y=B.result;p=y;if(g.multiple){var E=h(b.val());if(E.length&gt;1){var A=g.multipleSeparator.length;var D=a(l).selection().start;var C,z=0;a.each(E,function(F,G){z+=G.length;if(D&lt;=z){C=F;return false}z+=A});E[C]=y;y=E.join(g.multipleSeparator)}y+=g.multipleSeparator}b.val(y);v();b.trigger(&quot;result&quot;,[B.data,B.value]);return true}function t(A,z){if(u==c.DEL){r.hide();return}var y=b.val();if(!z&amp;&amp;y==p){return}p=y;y=i(y);if(y.length&gt;=g.minChars){b.addClass(g.loadingClass);if(!g.matchCase){y=y.toLowerCase()}f(y,k,v)}else{n();r.hide()}}function h(y){if(!y){return[&quot;&quot;]}if(!g.multiple){return[a.trim(y)]}return a.map(y.split(g.multipleSeparator),function(z){return a.trim(y).length?a.trim(z):null})}function i(y){if(!g.multiple){return y}var A=h(y);if(A.length==1){return A[0]}var z=a(l).selection().start;if(z==y.length){A=h(y)}else{A=h(y.replace(y.substring(z),&quot;&quot;))}return A[A.length-1]}function q(y,z){if(g.autoFill&amp;&amp;(i(b.val()).toLowerCase()==y.toLowerCase())&amp;&amp;u!=c.BACKSPACE){b.val(b.val()+z.substring(i(p).length));a(l).selection(p.length,p.length+z.length)}}function s(){clearTimeout(j);j=setTimeout(v,200)}function v(){var y=r.visible();r.hide();clearTimeout(j);n();if(g.mustMatch){b.search(function(z){if(!z){if(g.multiple){var A=h(b.val()).slice(0,-1);b.val(A.join(g.multipleSeparator)+(A.length?g.multipleSeparator:&quot;&quot;))}else{b.val(&quot;&quot;);b.trigger(&quot;result&quot;,null)}}})}}function k(z,y){if(y&amp;&amp;y.length&amp;&amp;e){n();r.display(y,z);q(z,y[0].value);r.show()}else{v()}}function f(z,B,y){if(!g.matchCase){z=z.toLowerCase()}var A=m.load(z);if(A&amp;&amp;A.length){B(z,A)}else{if((typeof g.url==&quot;string&quot;)&amp;&amp;(g.url.length&gt;0)){var C={timestamp:+new Date()};a.each(g.extraParams,function(D,E){C[D]=typeof E==&quot;function&quot;?E():E});a.ajax({mode:&quot;abort&quot;,port:&quot;autocomplete&quot;+l.name,dataType:g.dataType,url:g.url,data:a.extend({q:i(z),limit:g.max},C),success:function(E){var D=g.parse&amp;&amp;g.parse(E)||o(E);m.add(z,D);B(z,D)}})}else{r.emptyList();y(z)}}}function o(B){var y=[];var A=B.split(&quot;\n&quot;);for(var z=0;z&lt;A.length;z++){var C=a.trim(A[z]);if(C){C=C.split(&quot;|&quot;);y[y.length]={data:C,value:C[0],result:g.formatResult&amp;&amp;g.formatResult(C,C[0])||C[0]}}}return y}function n(){b.removeClass(g.loadingClass)}};a.Autocompleter.defaults={inputClass:&quot;ac_input&quot;,resultsClass:&quot;ac_results&quot;,loadingClass:&quot;ac_loading&quot;,minChars:1,delay:400,matchCase:false,matchSubset:true,matchContains:false,cacheLength:10,max:100,mustMatch:false,extraParams:{},selectFirst:true,formatItem:function(b){return b[0]},formatMatch:null,autoFill:false,width:0,multiple:false,multipleSeparator:&quot;, &quot;,highlight:function(c,b){return c.replace(new RegExp(&quot;(?![^&amp;;]+;)(?!&lt;[^&lt;&gt;]*)(&quot;+b.replace(/([\^\$\(\)\[\]\{\}\*\.\+\?\|\\])/gi,&quot;\\$1&quot;)+&quot;)(?![^&lt;&gt;]*&gt;)(?![^&amp;;]+;)&quot;,&quot;gi&quot;),&quot;&lt;strong&gt;$1&lt;/strong&gt;&quot;)},scroll:true,scrollHeight:180};a.Autocompleter.Cache=function(c){var f={};var d=0;function h(l,k){if(!c.matchCase){l=l.toLowerCase()}var j=l.indexOf(k);if(c.matchContains==&quot;word&quot;){j=l.toLowerCase().search(&quot;\\b&quot;+k.toLowerCase())}if(j==-1){return false}return j==0||c.matchContains}function g(j,i){if(d&gt;c.cacheLength){b()}if(!f[j]){d++}f[j]=i}function e(){if(!c.data){return false}var k={},j=0;if(!c.url){c.cacheLength=1}k[&quot;&quot;]=[];for(var m=0,l=c.data.length;m&lt;l;m++){var p=c.data[m];p=(typeof p==&quot;string&quot;)?[p]:p;var o=c.formatMatch(p,m+1,c.data.length);if(o===false){continue}var n=o.charAt(0).toLowerCase();if(!k[n]){k[n]=[]}var q={value:o,data:p,result:c.formatResult&amp;&amp;c.formatResult(p)||o};k[n].push(q);if(j++&lt;c.max){k[&quot;&quot;].push(q)}}a.each(k,function(r,s){c.cacheLength++;g(r,s)})}setTimeout(e,25);function b(){f={};d=0}return{flush:b,add:g,populate:e,load:function(n){if(!c.cacheLength||!d){return null}if(!c.url&amp;&amp;c.matchContains){var m=[];for(var j in f){if(j.length&gt;0){var o=f[j];a.each(o,function(p,k){if(h(k.value,n)){m.push(k)}})}}return m}else{if(f[n]){return f[n]}else{if(c.matchSubset){for(var l=n.length-1;l&gt;=c.minChars;l--){var o=f[n.substr(0,l)];if(o){var m=[];a.each(o,function(p,k){if(h(k.value,n)){m[m.length]=k}});return m}}}}}return null}}};a.Autocompleter.Select=function(e,j,l,p){var i={ACTIVE:&quot;ac_over&quot;};var k,f=-1,r,m=&quot;&quot;,s=true,c,o;function n(){if(!s){return}c=a(&quot;&lt;div/&gt;&quot;).hide().addClass(e.resultsClass).css(&quot;position&quot;,&quot;absolute&quot;).appendTo(document.body);o=a(&quot;&lt;ul/&gt;&quot;).appendTo(c).mouseover(function(t){if(q(t).nodeName&amp;&amp;q(t).nodeName.toUpperCase()==&quot;LI&quot;){f=a(&quot;li&quot;,o).removeClass(i.ACTIVE).index(q(t));a(q(t)).addClass(i.ACTIVE)}}).click(function(t){a(q(t)).addClass(i.ACTIVE);l();j.focus();return false}).mousedown(function(){p.mouseDownOnSelect=true}).mouseup(function(){p.mouseDownOnSelect=false});if(e.width&gt;0){c.css(&quot;width&quot;,e.width)}s=false}function q(u){var t=u.target;while(t&amp;&amp;t.tagName!=&quot;LI&quot;){t=t.parentNode}if(!t){return[]}return t}function h(t){k.slice(f,f+1).removeClass(i.ACTIVE);g(t);var v=k.slice(f,f+1).addClass(i.ACTIVE);if(e.scroll){var u=0;k.slice(0,f).each(function(){u+=this.offsetHeight});if((u+v[0].offsetHeight-o.scrollTop())&gt;o[0].clientHeight){o.scrollTop(u+v[0].offsetHeight-o.innerHeight())}else{if(u&lt;o.scrollTop()){o.scrollTop(u)}}}}function g(t){f+=t;if(f&lt;0){f=k.size()-1}else{if(f&gt;=k.size()){f=0}}}function b(t){return e.max&amp;&amp;e.max&lt;t?e.max:t}function d(){o.empty();var u=b(r.length);for(var v=0;v&lt;u;v++){if(!r[v]){continue}var w=e.formatItem(r[v].data,v+1,u,r[v].value,m);if(w===false){continue}var t=a(&quot;&lt;li/&gt;&quot;).html(e.highlight(w,m)).addClass(v%2==0?&quot;ac_even&quot;:&quot;ac_odd&quot;).appendTo(o)[0];a.data(t,&quot;ac_data&quot;,r[v])}k=o.find(&quot;li&quot;);if(e.selectFirst){k.slice(0,1).addClass(i.ACTIVE);f=0}if(a.fn.bgiframe){o.bgiframe()}}return{display:function(u,t){n();r=u;m=t;d()},next:function(){h(1)},prev:function(){h(-1)},pageUp:function(){if(f!=0&amp;&amp;f-8&lt;0){h(-f)}else{h(-8)}},pageDown:function(){if(f!=k.size()-1&amp;&amp;f+8&gt;k.size()){h(k.size()-1-f)}else{h(8)}},hide:function(){c&amp;&amp;c.hide();k&amp;&amp;k.removeClass(i.ACTIVE);f=-1},visible:function(){return c&amp;&amp;c.is(&quot;:visible&quot;)},current:function(){return this.visible()&amp;&amp;(k.filter(&quot;.&quot;+i.ACTIVE)[0]||e.selectFirst&amp;&amp;k[0])},show:function(){var v=a(j).offset();c.css({width:typeof e.width==&quot;string&quot;||e.width&gt;0?e.width:a(j).width(),top:v.top+j.offsetHeight,left:v.left}).show();if(e.scroll){o.scrollTop(0);o.css({maxHeight:e.scrollHeight,overflow:&quot;auto&quot;});if(a.browser.msie&amp;&amp;typeof document.body.style.maxHeight===&quot;undefined&quot;){var t=0;k.each(function(){t+=this.offsetHeight});var u=t&gt;e.scrollHeight;o.css(&quot;height&quot;,u?e.scrollHeight:t);if(!u){k.width(o.width()-parseInt(k.css(&quot;padding-left&quot;))-parseInt(k.css(&quot;padding-right&quot;)))}}}},selected:function(){var t=k&amp;&amp;k.filter(&quot;.&quot;+i.ACTIVE).removeClass(i.ACTIVE);return t&amp;&amp;t.length&amp;&amp;a.data(t[0],&quot;ac_data&quot;)},emptyList:function(){o&amp;&amp;o.empty()},unbind:function(){c&amp;&amp;c.remove()}}};a.fn.selection=function(i,b){if(i!==undefined){return this.each(function(){if(this.createTextRange){var j=this.createTextRange();if(b===undefined||i==b){j.move(&quot;character&quot;,i);j.select()}else{j.collapse(true);j.moveStart(&quot;character&quot;,i);j.moveEnd(&quot;character&quot;,b);j.select()}}else{if(this.setSelectionRange){this.setSelectionRange(i,b)}else{if(this.selectionStart){this.selectionStart=i;this.selectionEnd=b}}}})}var g=this[0];if(g.createTextRange){var c=document.selection.createRange(),h=g.value,f=&quot;&lt;-&gt;&quot;,d=c.text.length;c.text=f;var e=g.value.indexOf(f);g.value=h;this.selection(e,e+d);return{start:e,end:e+d}}else{if(g.selectionStart!==undefined){return{start:g.selectionStart,end:g.selectionEnd}}}}})(jQuery);
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkwpadminjscustomnavigationcustomjqueryui172devjs"></a>
<div class="addfile"><h4>Added: trunk/wp-admin/js/custom-navigation-custom-jquery-ui-1.7.2.dev.js (0 => 13257)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/js/custom-navigation-custom-jquery-ui-1.7.2.dev.js                                (rev 0)
+++ trunk/wp-admin/js/custom-navigation-custom-jquery-ui-1.7.2.dev.js        2010-02-20 21:57:43 UTC (rev 13257)
</span><span class="lines">@@ -0,0 +1,47 @@
</span><ins>+/*
+ * jQuery UI 1.7.2
+ *
+ * Copyright (c) 2009 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
+ */
+jQuery.ui||(function(c){var i=c.fn.remove,d=c.browser.mozilla&amp;&amp;(parseFloat(c.browser.version)&lt;1.9);c.ui={version:&quot;1.7.2&quot;,plugin:{add:function(k,l,n){var m=c.ui[k].prototype;for(var j in n){m.plugins[j]=m.plugins[j]||[];m.plugins[j].push([l,n[j]])}},call:function(j,l,k){var n=j.plugins[l];if(!n||!j.element[0].parentNode){return}for(var m=0;m&lt;n.length;m++){if(j.options[n[m][0]]){n[m][1].apply(j.element,k)}}}},contains:function(k,j){return document.compareDocumentPosition?k.compareDocumentPosition(j)&amp;16:k!==j&amp;&amp;k.contains(j)},hasScroll:function(m,k){if(c(m).css(&quot;overflow&quot;)==&quot;hidden&quot;){return false}var j=(k&amp;&amp;k==&quot;left&quot;)?&quot;scrollLeft&quot;:&quot;scrollTop&quot;,l=false;if(m[j]&gt;0){return true}m[j]=1;l=(m[j]&gt;0);m[j]=0;return l},isOverAxis:function(k,j,l){return(k&gt;j)&amp;&amp;(k&lt;(j+l))},isOver:function(o,k,n,m,j,l){return c.ui.isOverAxis(o,n,j)&amp;&amp;c.ui.isOverAxis(k,m,l)},keyCode:{BACKSPACE:8,CAPS_LOCK:20,COMMA:188,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38}};if(d){var f=c.attr,e=c.fn.removeAttr,h=&quot;http://www.w3.org/2005/07/aaa&quot;,a=/^aria-/,b=/^wairole:/;c.attr=function(k,j,l){var m=l!==undefined;return(j==&quot;role&quot;?(m?f.call(this,k,j,&quot;wairole:&quot;+l):(f.apply(this,arguments)||&quot;&quot;).replace(b,&quot;&quot;)):(a.test(j)?(m?k.setAttributeNS(h,j.replace(a,&quot;aaa:&quot;),l):f.call(this,k,j.replace(a,&quot;aaa:&quot;))):f.apply(this,arguments)))};c.fn.removeAttr=function(j){return(a.test(j)?this.each(function(){this.removeAttributeNS(h,j.replace(a,&quot;&quot;))}):e.call(this,j))}}c.fn.extend({remove:function(){c(&quot;*&quot;,this).add(this).each(function(){c(this).triggerHandler(&quot;remove&quot;)});return i.apply(this,arguments)},enableSelection:function(){return this.attr(&quot;unselectable&quot;,&quot;off&quot;).css(&quot;MozUserSelect&quot;,&quot;&quot;).unbind(&quot;selectstart.ui&quot;)},disableSelection:function(){return this.attr(&quot;unselectable&quot;,&quot;on&quot;).css(&quot;MozUserSelect&quot;,&quot;none&quot;).bind(&quot;selectstart.ui&quot;,function(){return false})},scrollParent:function(){var j;if((c.browser.msie&amp;&amp;(/(static|relative)/).test(this.css(&quot;position&quot;)))||(/absolute/).test(this.css(&quot;position&quot;))){j=this.parents().filter(function(){return(/(relative|absolute|fixed)/).test(c.curCSS(this,&quot;position&quot;,1))&amp;&amp;(/(auto|scroll)/).test(c.curCSS(this,&quot;overflow&quot;,1)+c.curCSS(this,&quot;overflow-y&quot;,1)+c.curCSS(this,&quot;overflow-x&quot;,1))}).eq(0)}else{j=this.parents().filter(function(){return(/(auto|scroll)/).test(c.curCSS(this,&quot;overflow&quot;,1)+c.curCSS(this,&quot;overflow-y&quot;,1)+c.curCSS(this,&quot;overflow-x&quot;,1))}).eq(0)}return(/fixed/).test(this.css(&quot;position&quot;))||!j.length?c(document):j}});c.extend(c.expr[&quot;:&quot;],{data:function(l,k,j){return !!c.data(l,j[3])},focusable:function(k){var l=k.nodeName.toLowerCase(),j=c.attr(k,&quot;tabindex&quot;);return(/input|select|textarea|button|object/.test(l)?!k.disabled:&quot;a&quot;==l||&quot;area&quot;==l?k.href||!isNaN(j):!isNaN(j))&amp;&amp;!c(k)[&quot;area&quot;==l?&quot;parents&quot;:&quot;closest&quot;](&quot;:hidden&quot;).length},tabbable:function(k){var j=c.attr(k,&quot;tabindex&quot;);return(isNaN(j)||j&gt;=0)&amp;&amp;c(k).is(&quot;:focusable&quot;)}});function g(m,n,o,l){function k(q){var p=c[m][n][q]||[];return(typeof p==&quot;string&quot;?p.split(/,?\s+/):p)}var j=k(&quot;getter&quot;);if(l.length==1&amp;&amp;typeof l[0]==&quot;string&quot;){j=j.concat(k(&quot;getterSetter&quot;))}return(c.inArray(o,j)!=-1)}c.widget=function(k,j){var l=k.split(&quot;.&quot;)[0];k=k.split(&quot;.&quot;)[1];c.fn[k]=function(p){var n=(typeof p==&quot;string&quot;),o=Array.prototype.slice.call(arguments,1);if(n&amp;&amp;p.substring(0,1)==&quot;_&quot;){return this}if(n&amp;&amp;g(l,k,p,o)){var m=c.data(this[0],k);return(m?m[p].apply(m,o):undefined)}return this.each(function(){var q=c.data(this,k);(!q&amp;&amp;!n&amp;&amp;c.data(this,k,new c[l][k](this,p))._init());(q&amp;&amp;n&amp;&amp;c.isFunction(q[p])&amp;&amp;q[p].apply(q,o))})};c[l]=c[l]||{};c[l][k]=function(o,n){var m=this;this.namespace=l;this.widgetName=k;this.widgetEventPrefix=c[l][k].eventPrefix||k;this.widgetBaseClass=l+&quot;-&quot;+k;this.options=c.extend({},c.widget.defaults,c[l][k].defaults,c.metadata&amp;&amp;c.metadata.get(o)[k],n);this.element=c(o).bind(&quot;setData.&quot;+k,function(q,p,r){if(q.target==o){return m._setData(p,r)}}).bind(&quot;getData.&quot;+k,function(q,p){if(q.target==o){return m._getData(p)}}).bind(&quot;remove&quot;,function(){return m.destroy()})};c[l][k].prototype=c.extend({},c.widget.prototype,j);c[l][k].getterSetter=&quot;option&quot;};c.widget.prototype={_init:function(){},destroy:function(){this.element.removeData(this.widgetName).removeClass(this.widgetBaseClass+&quot;-disabled &quot;+this.namespace+&quot;-state-disabled&quot;).removeAttr(&quot;aria-disabled&quot;)},option:function(l,m){var k=l,j=this;if(typeof l==&quot;string&quot;){if(m===undefined){return this._getData(l)}k={};k[l]=m}c.each(k,function(n,o){j._setData(n,o)})},_getData:function(j){return this.options[j]},_setData:function(j,k){this.options[j]=k;if(j==&quot;disabled&quot;){this.element[k?&quot;addClass&quot;:&quot;removeClass&quot;](this.widgetBaseClass+&quot;-disabled &quot;+this.namespace+&quot;-state-disabled&quot;).attr(&quot;aria-disabled&quot;,k)}},enable:function(){this._setData(&quot;disabled&quot;,false)},disable:function(){this._setData(&quot;disabled&quot;,true)},_trigger:function(l,m,n){var p=this.options[l],j=(l==this.widgetEventPrefix?l:this.widgetEventPrefix+l);m=c.Event(m);m.type=j;if(m.originalEvent){for(var k=c.event.props.length,o;k;){o=c.event.props[--k];m[o]=m.originalEvent[o]}}this.element.trigger(m,n);return !(c.isFunction(p)&amp;&amp;p.call(this.element[0],m,n)===false||m.isDefaultPrevented())}};c.widget.defaults={disabled:false};c.ui.mouse={_mouseInit:function(){var j=this;this.element.bind(&quot;mousedown.&quot;+this.widgetName,function(k){return j._mouseDown(k)}).bind(&quot;click.&quot;+this.widgetName,function(k){if(j._preventClickEvent){j._preventClickEvent=false;k.stopImmediatePropagation();return false}});if(c.browser.msie){this._mouseUnselectable=this.element.attr(&quot;unselectable&quot;);this.element.attr(&quot;unselectable&quot;,&quot;on&quot;)}this.started=false},_mouseDestroy:function(){this.element.unbind(&quot;.&quot;+this.widgetName);(c.browser.msie&amp;&amp;this.element.attr(&quot;unselectable&quot;,this._mouseUnselectable))},_mouseDown:function(l){l.originalEvent=l.originalEvent||{};if(l.originalEvent.mouseHandled){return}(this._mouseStarted&amp;&amp;this._mouseUp(l));this._mouseDownEvent=l;var k=this,m=(l.which==1),j=(typeof this.options.cancel==&quot;string&quot;?c(l.target).parents().add(l.target).filter(this.options.cancel).length:false);if(!m||j||!this._mouseCapture(l)){return true}this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){k.mouseDelayMet=true},this.options.delay)}if(this._mouseDistanceMet(l)&amp;&amp;this._mouseDelayMet(l)){this._mouseStarted=(this._mouseStart(l)!==false);if(!this._mouseStarted){l.preventDefault();return true}}this._mouseMoveDelegate=function(n){return k._mouseMove(n)};this._mouseUpDelegate=function(n){return k._mouseUp(n)};c(document).bind(&quot;mousemove.&quot;+this.widgetName,this._mouseMoveDelegate).bind(&quot;mouseup.&quot;+this.widgetName,this._mouseUpDelegate);(c.browser.safari||l.preventDefault());l.originalEvent.mouseHandled=true;return true},_mouseMove:function(j){if(c.browser.msie&amp;&amp;!j.button){return this._mouseUp(j)}if(this._mouseStarted){this._mouseDrag(j);return j.preventDefault()}if(this._mouseDistanceMet(j)&amp;&amp;this._mouseDelayMet(j)){this._mouseStarted=(this._mouseStart(this._mouseDownEvent,j)!==false);(this._mouseStarted?this._mouseDrag(j):this._mouseUp(j))}return !this._mouseStarted},_mouseUp:function(j){c(document).unbind(&quot;mousemove.&quot;+this.widgetName,this._mouseMoveDelegate).unbind(&quot;mouseup.&quot;+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;this._preventClickEvent=(j.target==this._mouseDownEvent.target);this._mouseStop(j)}return false},_mouseDistanceMet:function(j){return(Math.max(Math.abs(this._mouseDownEvent.pageX-j.pageX),Math.abs(this._mouseDownEvent.pageY-j.pageY))&gt;=this.options.distance)},_mouseDelayMet:function(j){return this.mouseDelayMet},_mouseStart:function(j){},_mouseDrag:function(j){},_mouseStop:function(j){},_mouseCapture:function(j){return true}};c.ui.mouse.defaults={cancel:null,distance:1,delay:0}})(jQuery);;/*
+ * jQuery UI Draggable 1.7.2
+ *
+ * Copyright (c) 2009 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/Draggables
+ *
+ * Depends:
+ *        ui.core.js
+ */
+(function(a){a.widget(&quot;ui.draggable&quot;,a.extend({},a.ui.mouse,{_init:function(){if(this.options.helper==&quot;original&quot;&amp;&amp;!(/^(?:r|a|f)/).test(this.element.css(&quot;position&quot;))){this.element[0].style.position=&quot;relative&quot;}(this.options.addClasses&amp;&amp;this.element.addClass(&quot;ui-draggable&quot;));(this.options.disabled&amp;&amp;this.element.addClass(&quot;ui-draggable-disabled&quot;));this._mouseInit()},destroy:function(){if(!this.element.data(&quot;draggable&quot;)){return}this.element.removeData(&quot;draggable&quot;).unbind(&quot;.draggable&quot;).removeClass(&quot;ui-draggable ui-draggable-dragging ui-draggable-disabled&quot;);this._mouseDestroy()},_mouseCapture:function(b){var c=this.options;if(this.helper||c.disabled||a(b.target).is(&quot;.ui-resizable-handle&quot;)){return false}this.handle=this._getHandle(b);if(!this.handle){return false}return true},_mouseStart:function(b){var c=this.options;this.helper=this._createHelper(b);this._cacheHelperProportions();if(a.ui.ddmanager){a.ui.ddmanager.current=this}this._cacheMargins();this.cssPosition=this.helper.css(&quot;position&quot;);this.scrollParent=this.helper.scrollParent();this.offset=this.element.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};a.extend(this.offset,{click:{left:b.pageX-this.offset.left,top:b.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this._generatePosition(b);this.originalPageX=b.pageX;this.originalPageY=b.pageY;if(c.cursorAt){this._adjustOffsetFromHelper(c.cursorAt)}if(c.containment){this._setContainment()}this._trigger(&quot;start&quot;,b);this._cacheHelperProportions();if(a.ui.ddmanager&amp;&amp;!c.dropBehaviour){a.ui.ddmanager.prepareOffsets(this,b)}this.helper.addClass(&quot;ui-draggable-dragging&quot;);this._mouseDrag(b,true);return true},_mouseDrag:function(b,d){this.position=this._generatePosition(b);this.positionAbs=this._convertPositionTo(&quot;absolute&quot;);if(!d){var c=this._uiHash();this._trigger(&quot;drag&quot;,b,c);this.position=c.position}if(!this.options.axis||this.options.axis!=&quot;y&quot;){this.helper[0].style.left=this.position.left+&quot;px&quot;}if(!this.options.axis||this.options.axis!=&quot;x&quot;){this.helper[0].style.top=this.position.top+&quot;px&quot;}if(a.ui.ddmanager){a.ui.ddmanager.drag(this,b)}return false},_mouseStop:function(c){var d=false;if(a.ui.ddmanager&amp;&amp;!this.options.dropBehaviour){d=a.ui.ddmanager.drop(this,c)}if(this.dropped){d=this.dropped;this.dropped=false}if((this.options.revert==&quot;invalid&quot;&amp;&amp;!d)||(this.options.revert==&quot;valid&quot;&amp;&amp;d)||this.options.revert===true||(a.isFunction(this.options.revert)&amp;&amp;this.options.revert.call(this.element,d))){var b=this;a(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){b._trigger(&quot;stop&quot;,c);b._clear()})}else{this._trigger(&quot;stop&quot;,c);this._clear()}return false},_getHandle:function(b){var c=!this.options.handle||!a(this.options.handle,this.element).length?true:false;a(this.options.handle,this.element).find(&quot;*&quot;).andSelf().each(function(){if(this==b.target){c=true}});return c},_createHelper:function(c){var d=this.options;var b=a.isFunction(d.helper)?a(d.helper.apply(this.element[0],[c])):(d.helper==&quot;clone&quot;?this.element.clone():this.element);if(!b.parents(&quot;body&quot;).length){b.appendTo((d.appendTo==&quot;parent&quot;?this.element[0].parentNode:d.appendTo))}if(b[0]!=this.element[0]&amp;&amp;!(/(fixed|absolute)/).test(b.css(&quot;position&quot;))){b.css(&quot;position&quot;,&quot;absolute&quot;)}return b},_adjustOffsetFromHelper:function(b){if(b.left!=undefined){this.offset.click.left=b.left+this.margins.left}if(b.right!=undefined){this.offset.click.left=this.helperProportions.width-b.right+this.margins.left}if(b.top!=undefined){this.offset.click.top=b.top+this.margins.top}if(b.bottom!=undefined){this.offset.click.top=this.helperProportions.height-b.bottom+this.margins.top}},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var b=this.offsetParent.offset();if(this.cssPosition==&quot;absolute&quot;&amp;&amp;this.scrollParent[0]!=document&amp;&amp;a.ui.contains(this.scrollParent[0],this.offsetParent[0])){b.left+=this.scrollParent.scrollLeft();b.top+=this.scrollParent.scrollTop()}if((this.offsetParent[0]==document.body)||(this.offsetParent[0].tagName&amp;&amp;this.offsetParent[0].tagName.toLowerCase()==&quot;html&quot;&amp;&amp;a.browser.msie)){b={top:0,left:0}}return{top:b.top+(parseInt(this.offsetParent.css(&quot;borderTopWidth&quot;),10)||0),left:b.left+(parseInt(this.offsetParent.css(&quot;borderLeftWidth&quot;),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition==&quot;relative&quot;){var b=this.element.position();return{top:b.top-(parseInt(this.helper.css(&quot;top&quot;),10)||0)+this.scrollParent.scrollTop(),left:b.left-(parseInt(this.helper.css(&quot;left&quot;),10)||0)+this.scrollParent.scrollLeft()}}else{return{top:0,left:0}}},_cacheMargins:function(){this.margins={left:(parseInt(this.element.css(&quot;marginLeft&quot;),10)||0),top:(parseInt(this.element.css(&quot;marginTop&quot;),10)||0)}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e=this.options;if(e.containment==&quot;parent&quot;){e.containment=this.helper[0].parentNode}if(e.containment==&quot;document&quot;||e.containment==&quot;window&quot;){this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,a(e.containment==&quot;document&quot;?document:window).width()-this.helperProportions.width-this.margins.left,(a(e.containment==&quot;document&quot;?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]}if(!(/^(document|window|parent)$/).test(e.containment)&amp;&amp;e.containment.constructor!=Array){var c=a(e.containment)[0];if(!c){return}var d=a(e.containment).offset();var b=(a(c).css(&quot;overflow&quot;)!=&quot;hidden&quot;);this.containment=[d.left+(parseInt(a(c).css(&quot;borderLeftWidth&quot;),10)||0)+(parseInt(a(c).css(&quot;paddingLeft&quot;),10)||0)-this.margins.left,d.top+(parseInt(a(c).css(&quot;borderTopWidth&quot;),10)||0)+(parseInt(a(c).css(&quot;paddingTop&quot;),10)||0)-this.margins.top,d.left+(b?Math.max(c.scrollWidth,c.offsetWidth):c.offsetWidth)-(parseInt(a(c).css(&quot;borderLeftWidth&quot;),10)||0)-(parseInt(a(c).css(&quot;paddingRight&quot;),10)||0)-this.helperProportions.width-this.margins.left,d.top+(b?Math.max(c.scrollHeight,c.offsetHeight):c.offsetHeight)-(parseInt(a(c).css(&quot;borderTopWidth&quot;),10)||0)-(parseInt(a(c).css(&quot;paddingBottom&quot;),10)||0)-this.helperProportions.height-this.margins.top]}else{if(e.containment.constructor==Array){this.containment=e.containment}}},_convertPositionTo:function(f,h){if(!h){h=this.position}var c=f==&quot;absolute&quot;?1:-1;var e=this.options,b=this.cssPosition==&quot;absolute&quot;&amp;&amp;!(this.scrollParent[0]!=document&amp;&amp;a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,g=(/(html|body)/i).test(b[0].tagName);return{top:(h.top+this.offset.relative.top*c+this.offset.parent.top*c-(a.browser.safari&amp;&amp;this.cssPosition==&quot;fixed&quot;?0:(this.cssPosition==&quot;fixed&quot;?-this.scrollParent.scrollTop():(g?0:b.scrollTop()))*c)),left:(h.left+this.offset.relative.left*c+this.offset.parent.left*c-(a.browser.safari&amp;&amp;this.cssPosition==&quot;fixed&quot;?0:(this.cssPosition==&quot;fixed&quot;?-this.scrollParent.scrollLeft():g?0:b.scrollLeft())*c))}},_generatePosition:function(e){var h=this.options,b=this.cssPosition==&quot;absolute&quot;&amp;&amp;!(this.scrollParent[0]!=document&amp;&amp;a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,i=(/(html|body)/i).test(b[0].tagName);if(this.cssPosition==&quot;relative&quot;&amp;&amp;!(this.scrollParent[0]!=document&amp;&amp;this.scrollParent[0]!=this.offsetParent[0])){this.offset.relative=this._getRelativeOffset()}var d=e.pageX;var c=e.pageY;if(this.originalPosition){if(this.containment){if(e.pageX-this.offset.click.left&lt;this.containment[0]){d=this.containment[0]+this.offset.click.left}if(e.pageY-this.offset.click.top&lt;this.containment[1]){c=this.containment[1]+this.offset.click.top}if(e.pageX-this.offset.click.left&gt;this.containment[2]){d=this.containment[2]+this.offset.click.left}if(e.pageY-this.offset.click.top&gt;this.containment[3]){c=this.containment[3]+this.offset.click.top}}if(h.grid){var g=this.originalPageY+Math.round((c-this.originalPageY)/h.grid[1])*h.grid[1];c=this.containment?(!(g-this.offset.click.top&lt;this.containment[1]||g-this.offset.click.top&gt;this.containment[3])?g:(!(g-this.offset.click.top&lt;this.containment[1])?g-h.grid[1]:g+h.grid[1])):g;var f=this.originalPageX+Math.round((d-this.originalPageX)/h.grid[0])*h.grid[0];d=this.containment?(!(f-this.offset.click.left&lt;this.containment[0]||f-this.offset.click.left&gt;this.containment[2])?f:(!(f-this.offset.click.left&lt;this.containment[0])?f-h.grid[0]:f+h.grid[0])):f}}return{top:(c-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(a.browser.safari&amp;&amp;this.cssPosition==&quot;fixed&quot;?0:(this.cssPosition==&quot;fixed&quot;?-this.scrollParent.scrollTop():(i?0:b.scrollTop())))),left:(d-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(a.browser.safari&amp;&amp;this.cssPosition==&quot;fixed&quot;?0:(this.cssPosition==&quot;fixed&quot;?-this.scrollParent.scrollLeft():i?0:b.scrollLeft())))}},_clear:function(){this.helper.removeClass(&quot;ui-draggable-dragging&quot;);if(this.helper[0]!=this.element[0]&amp;&amp;!this.cancelHelperRemoval){this.helper.remove()}this.helper=null;this.cancelHelperRemoval=false},_trigger:function(b,c,d){d=d||this._uiHash();a.ui.plugin.call(this,b,[c,d]);if(b==&quot;drag&quot;){this.positionAbs=this._convertPositionTo(&quot;absolute&quot;)}return a.widget.prototype._trigger.call(this,b,c,d)},plugins:{},_uiHash:function(b){return{helper:this.helper,position:this.position,absolutePosition:this.positionAbs,offset:this.positionAbs}}}));a.extend(a.ui.draggable,{version:&quot;1.7.2&quot;,eventPrefix:&quot;drag&quot;,defaults:{addClasses:true,appendTo:&quot;parent&quot;,axis:false,cancel:&quot;:input,option&quot;,connectToSortable:false,containment:false,cursor:&quot;auto&quot;,cursorAt:false,delay:0,distance:1,grid:false,handle:false,helper:&quot;original&quot;,iframeFix:false,opacity:false,refreshPositions:false,revert:false,revertDuration:500,scope:&quot;default&quot;,scroll:true,scrollSensitivity:20,scrollSpeed:20,snap:false,snapMode:&quot;both&quot;,snapTolerance:20,stack:false,zIndex:false}});a.ui.plugin.add(&quot;draggable&quot;,&quot;connectToSortable&quot;,{start:function(c,e){var d=a(this).data(&quot;draggable&quot;),f=d.options,b=a.extend({},e,{item:d.element});d.sortables=[];a(f.connectToSortable).each(function(){var g=a.data(this,&quot;sortable&quot;);if(g&amp;&amp;!g.options.disabled){d.sortables.push({instance:g,shouldRevert:g.options.revert});g._refreshItems();g._trigger(&quot;activate&quot;,c,b)}})},stop:function(c,e){var d=a(this).data(&quot;draggable&quot;),b=a.extend({},e,{item:d.element});a.each(d.sortables,function(){if(this.instance.isOver){this.instance.isOver=0;d.cancelHelperRemoval=true;this.instance.cancelHelperRemoval=false;if(this.shouldRevert){this.instance.options.revert=true}this.instance._mouseStop(c);this.instance.options.helper=this.instance.options._helper;if(d.options.helper==&quot;original&quot;){this.instance.currentItem.css({top:&quot;auto&quot;,left:&quot;auto&quot;})}}else{this.instance.cancelHelperRemoval=false;this.instance._trigger(&quot;deactivate&quot;,c,b)}})},drag:function(c,f){var e=a(this).data(&quot;draggable&quot;),b=this;var d=function(i){var n=this.offset.click.top,m=this.offset.click.left;var g=this.positionAbs.top,k=this.positionAbs.left;var j=i.height,l=i.width;var p=i.top,h=i.left;return a.ui.isOver(g+n,k+m,p,h,j,l)};a.each(e.sortables,function(g){this.instance.positionAbs=e.positionAbs;this.instance.helperProportions=e.helperProportions;this.instance.offset.click=e.offset.click;if(this.instance._intersectsWith(this.instance.containerCache)){if(!this.instance.isOver){this.instance.isOver=1;this.instance.currentItem=a(b).clone().appendTo(this.instance.element).data(&quot;sortable-item&quot;,true);this.instance.options._helper=this.instance.options.helper;this.instance.options.helper=function(){return f.helper[0]};c.target=this.instance.currentItem[0];this.instance._mouseCapture(c,true);this.instance._mouseStart(c,true,true);this.instance.offset.click.top=e.offset.click.top;this.instance.offset.click.left=e.offset.click.left;this.instance.offset.parent.left-=e.offset.parent.left-this.instance.offset.parent.left;this.instance.offset.parent.top-=e.offset.parent.top-this.instance.offset.parent.top;e._trigger(&quot;toSortable&quot;,c);e.dropped=this.instance.element;e.currentItem=e.element;this.instance.fromOutside=e}if(this.instance.currentItem){this.instance._mouseDrag(c)}}else{if(this.instance.isOver){this.instance.isOver=0;this.instance.cancelHelperRemoval=true;this.instance.options.revert=false;this.instance._trigger(&quot;out&quot;,c,this.instance._uiHash(this.instance));this.instance._mouseStop(c,true);this.instance.options.helper=this.instance.options._helper;this.instance.currentItem.remove();if(this.instance.placeholder){this.instance.placeholder.remove()}e._trigger(&quot;fromSortable&quot;,c);e.dropped=false}}})}});a.ui.plugin.add(&quot;draggable&quot;,&quot;cursor&quot;,{start:function(c,d){var b=a(&quot;body&quot;),e=a(this).data(&quot;draggable&quot;).options;if(b.css(&quot;cursor&quot;)){e._cursor=b.css(&quot;cursor&quot;)}b.css(&quot;cursor&quot;,e.cursor)},stop:function(b,c){var d=a(this).data(&quot;draggable&quot;).options;if(d._cursor){a(&quot;body&quot;).css(&quot;cursor&quot;,d._cursor)}}});a.ui.plugin.add(&quot;draggable&quot;,&quot;iframeFix&quot;,{start:function(b,c){var d=a(this).data(&quot;draggable&quot;).options;a(d.iframeFix===true?&quot;iframe&quot;:d.iframeFix).each(function(){a('&lt;div class=&quot;ui-draggable-iframeFix&quot; style=&quot;background: #fff;&quot;&gt;&lt;/div&gt;').css({width:this.offsetWidth+&quot;px&quot;,height:this.offsetHeight+&quot;px&quot;,position:&quot;absolute&quot;,opacity:&quot;0.001&quot;,zIndex:1000}).css(a(this).offset()).appendTo(&quot;body&quot;)})},stop:function(b,c){a(&quot;div.ui-draggable-iframeFix&quot;).each(function(){this.parentNode.removeChild(this)})}});a.ui.plugin.add(&quot;draggable&quot;,&quot;opacity&quot;,{start:function(c,d){var b=a(d.helper),e=a(this).data(&quot;draggable&quot;).options;if(b.css(&quot;opacity&quot;)){e._opacity=b.css(&quot;opacity&quot;)}b.css(&quot;opacity&quot;,e.opacity)},stop:function(b,c){var d=a(this).data(&quot;draggable&quot;).options;if(d._opacity){a(c.helper).css(&quot;opacity&quot;,d._opacity)}}});a.ui.plugin.add(&quot;draggable&quot;,&quot;scroll&quot;,{start:function(c,d){var b=a(this).data(&quot;draggable&quot;);if(b.scrollParent[0]!=document&amp;&amp;b.scrollParent[0].tagName!=&quot;HTML&quot;){b.overflowOffset=b.scrollParent.offset()}},drag:function(d,e){var c=a(this).data(&quot;draggable&quot;),f=c.options,b=false;if(c.scrollParent[0]!=document&amp;&amp;c.scrollParent[0].tagName!=&quot;HTML&quot;){if(!f.axis||f.axis!=&quot;x&quot;){if((c.overflowOffset.top+c.scrollParent[0].offsetHeight)-d.pageY&lt;f.scrollSensitivity){c.scrollParent[0].scrollTop=b=c.scrollParent[0].scrollTop+f.scrollSpeed}else{if(d.pageY-c.overflowOffset.top&lt;f.scrollSensitivity){c.scrollParent[0].scrollTop=b=c.scrollParent[0].scrollTop-f.scrollSpeed}}}if(!f.axis||f.axis!=&quot;y&quot;){if((c.overflowOffset.left+c.scrollParent[0].offsetWidth)-d.pageX&lt;f.scrollSensitivity){c.scrollParent[0].scrollLeft=b=c.scrollParent[0].scrollLeft+f.scrollSpeed}else{if(d.pageX-c.overflowOffset.left&lt;f.scrollSensitivity){c.scrollParent[0].scrollLeft=b=c.scrollParent[0].scrollLeft-f.scrollSpeed}}}}else{if(!f.axis||f.axis!=&quot;x&quot;){if(d.pageY-a(document).scrollTop()&lt;f.scrollSensitivity){b=a(document).scrollTop(a(document).scrollTop()-f.scrollSpeed)}else{if(a(window).height()-(d.pageY-a(document).scrollTop())&lt;f.scrollSensitivity){b=a(document).scrollTop(a(document).scrollTop()+f.scrollSpeed)}}}if(!f.axis||f.axis!=&quot;y&quot;){if(d.pageX-a(document).scrollLeft()&lt;f.scrollSensitivity){b=a(document).scrollLeft(a(document).scrollLeft()-f.scrollSpeed)}else{if(a(window).width()-(d.pageX-a(document).scrollLeft())&lt;f.scrollSensitivity){b=a(document).scrollLeft(a(document).scrollLeft()+f.scrollSpeed)}}}}if(b!==false&amp;&amp;a.ui.ddmanager&amp;&amp;!f.dropBehaviour){a.ui.ddmanager.prepareOffsets(c,d)}}});a.ui.plugin.add(&quot;draggable&quot;,&quot;snap&quot;,{start:function(c,d){var b=a(this).data(&quot;draggable&quot;),e=b.options;b.snapElements=[];a(e.snap.constructor!=String?(e.snap.items||&quot;:data(draggable)&quot;):e.snap).each(function(){var g=a(this);var f=g.offset();if(this!=b.element[0]){b.snapElements.push({item:this,width:g.outerWidth(),height:g.outerHeight(),top:f.top,left:f.left})}})},drag:function(u,p){var g=a(this).data(&quot;draggable&quot;),q=g.options;var y=q.snapTolerance;var x=p.offset.left,w=x+g.helperProportions.width,f=p.offset.top,e=f+g.helperProportions.height;for(var v=g.snapElements.length-1;v&gt;=0;v--){var s=g.snapElements[v].left,n=s+g.snapElements[v].width,m=g.snapElements[v].top,A=m+g.snapElements[v].height;if(!((s-y&lt;x&amp;&amp;x&lt;n+y&amp;&amp;m-y&lt;f&amp;&amp;f&lt;A+y)||(s-y&lt;x&amp;&amp;x&lt;n+y&amp;&amp;m-y&lt;e&amp;&amp;e&lt;A+y)||(s-y&lt;w&amp;&amp;w&lt;n+y&amp;&amp;m-y&lt;f&amp;&amp;f&lt;A+y)||(s-y&lt;w&amp;&amp;w&lt;n+y&amp;&amp;m-y&lt;e&amp;&amp;e&lt;A+y))){if(g.snapElements[v].snapping){(g.options.snap.release&amp;&amp;g.options.snap.release.call(g.element,u,a.extend(g._uiHash(),{snapItem:g.snapElements[v].item})))}g.snapElements[v].snapping=false;continue}if(q.snapMode!=&quot;inner&quot;){var c=Math.abs(m-e)&lt;=y;var z=Math.abs(A-f)&lt;=y;var j=Math.abs(s-w)&lt;=y;var k=Math.abs(n-x)&lt;=y;if(c){p.position.top=g._convertPositionTo(&quot;relative&quot;,{top:m-g.helperProportions.height,left:0}).top-g.margins.top}if(z){p.position.top=g._convertPositionTo(&quot;relative&quot;,{top:A,left:0}).top-g.margins.top}if(j){p.position.left=g._convertPositionTo(&quot;relative&quot;,{top:0,left:s-g.helperProportions.width}).left-g.margins.left}if(k){p.position.left=g._convertPositionTo(&quot;relative&quot;,{top:0,left:n}).left-g.margins.left}}var h=(c||z||j||k);if(q.snapMode!=&quot;outer&quot;){var c=Math.abs(m-f)&lt;=y;var z=Math.abs(A-e)&lt;=y;var j=Math.abs(s-x)&lt;=y;var k=Math.abs(n-w)&lt;=y;if(c){p.position.top=g._convertPositionTo(&quot;relative&quot;,{top:m,left:0}).top-g.margins.top}if(z){p.position.top=g._convertPositionTo(&quot;relative&quot;,{top:A-g.helperProportions.height,left:0}).top-g.margins.top}if(j){p.position.left=g._convertPositionTo(&quot;relative&quot;,{top:0,left:s}).left-g.margins.left}if(k){p.position.left=g._convertPositionTo(&quot;relative&quot;,{top:0,left:n-g.helperProportions.width}).left-g.margins.left}}if(!g.snapElements[v].snapping&amp;&amp;(c||z||j||k||h)){(g.options.snap.snap&amp;&amp;g.options.snap.snap.call(g.element,u,a.extend(g._uiHash(),{snapItem:g.snapElements[v].item})))}g.snapElements[v].snapping=(c||z||j||k||h)}}});a.ui.plugin.add(&quot;draggable&quot;,&quot;stack&quot;,{start:function(b,c){var e=a(this).data(&quot;draggable&quot;).options;var d=a.makeArray(a(e.stack.group)).sort(function(g,f){return(parseInt(a(g).css(&quot;zIndex&quot;),10)||e.stack.min)-(parseInt(a(f).css(&quot;zIndex&quot;),10)||e.stack.min)});a(d).each(function(f){this.style.zIndex=e.stack.min+f});this[0].style.zIndex=e.stack.min+d.length}});a.ui.plugin.add(&quot;draggable&quot;,&quot;zIndex&quot;,{start:function(c,d){var b=a(d.helper),e=a(this).data(&quot;draggable&quot;).options;if(b.css(&quot;zIndex&quot;)){e._zIndex=b.css(&quot;zIndex&quot;)}b.css(&quot;zIndex&quot;,e.zIndex)},stop:function(b,c){var d=a(this).data(&quot;draggable&quot;).options;if(d._zIndex){a(c.helper).css(&quot;zIndex&quot;,d._zIndex)}}})})(jQuery);;/*
+ * jQuery UI Droppable 1.7.2
+ *
+ * Copyright (c) 2009 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/Droppables
+ *
+ * Depends:
+ *        ui.core.js
+ *        ui.draggable.js
+ */
+(function(a){a.widget(&quot;ui.droppable&quot;,{_init:function(){var c=this.options,b=c.accept;this.isover=0;this.isout=1;this.options.accept=this.options.accept&amp;&amp;a.isFunction(this.options.accept)?this.options.accept:function(e){return e.is(b)};this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight};a.ui.ddmanager.droppables[this.options.scope]=a.ui.ddmanager.droppables[this.options.scope]||[];a.ui.ddmanager.droppables[this.options.scope].push(this);(this.options.addClasses&amp;&amp;this.element.addClass(&quot;ui-droppable&quot;))},destroy:function(){var b=a.ui.ddmanager.droppables[this.options.scope];for(var c=0;c&lt;b.length;c++){if(b[c]==this){b.splice(c,1)}}this.element.removeClass(&quot;ui-droppable ui-droppable-disabled&quot;).removeData(&quot;droppable&quot;).unbind(&quot;.droppable&quot;)},_setData:function(b,c){if(b==&quot;accept&quot;){this.options.accept=c&amp;&amp;a.isFunction(c)?c:function(e){return e.is(c)}}else{a.widget.prototype._setData.apply(this,arguments)}},_activate:function(c){var b=a.ui.ddmanager.current;if(this.options.activeClass){this.element.addClass(this.options.activeClass)}(b&amp;&amp;this._trigger(&quot;activate&quot;,c,this.ui(b)))},_deactivate:function(c){var b=a.ui.ddmanager.current;if(this.options.activeClass){this.element.removeClass(this.options.activeClass)}(b&amp;&amp;this._trigger(&quot;deactivate&quot;,c,this.ui(b)))},_over:function(c){var b=a.ui.ddmanager.current;if(!b||(b.currentItem||b.element)[0]==this.element[0]){return}if(this.options.accept.call(this.element[0],(b.currentItem||b.element))){if(this.options.hoverClass){this.element.addClass(this.options.hoverClass)}this._trigger(&quot;over&quot;,c,this.ui(b))}},_out:function(c){var b=a.ui.ddmanager.current;if(!b||(b.currentItem||b.element)[0]==this.element[0]){return}if(this.options.accept.call(this.element[0],(b.currentItem||b.element))){if(this.options.hoverClass){this.element.removeClass(this.options.hoverClass)}this._trigger(&quot;out&quot;,c,this.ui(b))}},_drop:function(c,d){var b=d||a.ui.ddmanager.current;if(!b||(b.currentItem||b.element)[0]==this.element[0]){return false}var e=false;this.element.find(&quot;:data(droppable)&quot;).not(&quot;.ui-draggable-dragging&quot;).each(function(){var f=a.data(this,&quot;droppable&quot;);if(f.options.greedy&amp;&amp;a.ui.intersect(b,a.extend(f,{offset:f.element.offset()}),f.options.tolerance)){e=true;return false}});if(e){return false}if(this.options.accept.call(this.element[0],(b.currentItem||b.element))){if(this.options.activeClass){this.element.removeClass(this.options.activeClass)}if(this.options.hoverClass){this.element.removeClass(this.options.hoverClass)}this._trigger(&quot;drop&quot;,c,this.ui(b));return this.element}return false},ui:function(b){return{draggable:(b.currentItem||b.element),helper:b.helper,position:b.position,absolutePosition:b.positionAbs,offset:b.positionAbs}}});a.extend(a.ui.droppable,{version:&quot;1.7.2&quot;,eventPrefix:&quot;drop&quot;,defaults:{accept:&quot;*&quot;,activeClass:false,addClasses:true,greedy:false,hoverClass:false,scope:&quot;default&quot;,tolerance:&quot;intersect&quot;}});a.ui.intersect=function(q,j,o){if(!j.offset){return false}var e=(q.positionAbs||q.position.absolute).left,d=e+q.helperProportions.width,n=(q.positionAbs||q.position.absolute).top,m=n+q.helperProportions.height;var g=j.offset.left,c=g+j.proportions.width,p=j.offset.top,k=p+j.proportions.height;switch(o){case&quot;fit&quot;:return(g&lt;e&amp;&amp;d&lt;c&amp;&amp;p&lt;n&amp;&amp;m&lt;k);break;case&quot;intersect&quot;:return(g&lt;e+(q.helperProportions.width/2)&amp;&amp;d-(q.helperProportions.width/2)&lt;c&amp;&amp;p&lt;n+(q.helperProportions.height/2)&amp;&amp;m-(q.helperProportions.height/2)&lt;k);break;case&quot;pointer&quot;:var h=((q.positionAbs||q.position.absolute).left+(q.clickOffset||q.offset.click).left),i=((q.positionAbs||q.position.absolute).top+(q.clickOffset||q.offset.click).top),f=a.ui.isOver(i,h,p,g,j.proportions.height,j.proportions.width);return f;break;case&quot;touch&quot;:return((n&gt;=p&amp;&amp;n&lt;=k)||(m&gt;=p&amp;&amp;m&lt;=k)||(n&lt;p&amp;&amp;m&gt;k))&amp;&amp;((e&gt;=g&amp;&amp;e&lt;=c)||(d&gt;=g&amp;&amp;d&lt;=c)||(e&lt;g&amp;&amp;d&gt;c));break;default:return false;break}};a.ui.ddmanager={current:null,droppables:{&quot;default&quot;:[]},prepareOffsets:function(e,g){var b=a.ui.ddmanager.droppables[e.options.scope];var f=g?g.type:null;var h=(e.currentItem||e.element).find(&quot;:data(droppable)&quot;).andSelf();droppablesLoop:for(var d=0;d&lt;b.length;d++){if(b[d].options.disabled||(e&amp;&amp;!b[d].options.accept.call(b[d].element[0],(e.currentItem||e.element)))){continue}for(var c=0;c&lt;h.length;c++){if(h[c]==b[d].element[0]){b[d].proportions.height=0;continue droppablesLoop}}b[d].visible=b[d].element.css(&quot;display&quot;)!=&quot;none&quot;;if(!b[d].visible){continue}b[d].offset=b[d].element.offset();b[d].proportions={width:b[d].element[0].offsetWidth,height:b[d].element[0].offsetHeight};if(f==&quot;mousedown&quot;){b[d]._activate.call(b[d],g)}}},drop:function(b,c){var d=false;a.each(a.ui.ddmanager.droppables[b.options.scope],function(){if(!this.options){return}if(!this.options.disabled&amp;&amp;this.visible&amp;&amp;a.ui.intersect(b,this,this.options.tolerance)){d=this._drop.call(this,c)}if(!this.options.disabled&amp;&amp;this.visible&amp;&amp;this.options.accept.call(this.element[0],(b.currentItem||b.element))){this.isout=1;this.isover=0;this._deactivate.call(this,c)}});return d},drag:function(b,c){if(b.options.refreshPositions){a.ui.ddmanager.prepareOffsets(b,c)}a.each(a.ui.ddmanager.droppables[b.options.scope],function(){if(this.options.disabled||this.greedyChild||!this.visible){return}var e=a.ui.intersect(b,this,this.options.tolerance);var g=!e&amp;&amp;this.isover==1?&quot;isout&quot;:(e&amp;&amp;this.isover==0?&quot;isover&quot;:null);if(!g){return}var f;if(this.options.greedy){var d=this.element.parents(&quot;:data(droppable):eq(0)&quot;);if(d.length){f=a.data(d[0],&quot;droppable&quot;);f.greedyChild=(g==&quot;isover&quot;?1:0)}}if(f&amp;&amp;g==&quot;isover&quot;){f.isover=0;f.isout=1;f._out.call(f,c)}this[g]=1;this[g==&quot;isout&quot;?&quot;isover&quot;:&quot;isout&quot;]=0;this[g==&quot;isover&quot;?&quot;_over&quot;:&quot;_out&quot;].call(this,c);if(f&amp;&amp;g==&quot;isout&quot;){f.isout=0;f.isover=1;f._over.call(f,c)}})}}})(jQuery);;/*
+ * jQuery UI Sortable 1.7.2
+ *
+ * Copyright (c) 2009 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/Sortables
+ *
+ * Depends:
+ *        ui.core.js
+ */
+(function(a){a.widget(&quot;ui.sortable&quot;,a.extend({},a.ui.mouse,{_init:function(){var b=this.options;this.containerCache={};this.element.addClass(&quot;ui-sortable&quot;);this.refresh();this.floating=this.items.length?(/left|right/).test(this.items[0].item.css(&quot;float&quot;)):false;this.offset=this.element.offset();this._mouseInit()},destroy:function(){this.element.removeClass(&quot;ui-sortable ui-sortable-disabled&quot;).removeData(&quot;sortable&quot;).unbind(&quot;.sortable&quot;);this._mouseDestroy();for(var b=this.items.length-1;b&gt;=0;b--){this.items[b].item.removeData(&quot;sortable-item&quot;)}},_mouseCapture:function(e,f){if(this.reverting){return false}if(this.options.disabled||this.options.type==&quot;static&quot;){return false}this._refreshItems(e);var d=null,c=this,b=a(e.target).parents().each(function(){if(a.data(this,&quot;sortable-item&quot;)==c){d=a(this);return false}});if(a.data(e.target,&quot;sortable-item&quot;)==c){d=a(e.target)}if(!d){return false}if(this.options.handle&amp;&amp;!f){var g=false;a(this.options.handle,d).find(&quot;*&quot;).andSelf().each(function(){if(this==e.target){g=true}});if(!g){return false}}this.currentItem=d;this._removeCurrentsFromItems();return true},_mouseStart:function(e,f,b){var g=this.options,c=this;this.currentContainer=this;this.refreshPositions();this.helper=this._createHelper(e);this._cacheHelperProportions();this._cacheMargins();this.scrollParent=this.helper.scrollParent();this.offset=this.currentItem.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};this.helper.css(&quot;position&quot;,&quot;absolute&quot;);this.cssPosition=this.helper.css(&quot;position&quot;);a.extend(this.offset,{click:{left:e.pageX-this.offset.left,top:e.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this._generatePosition(e);this.originalPageX=e.pageX;this.originalPageY=e.pageY;if(g.cursorAt){this._adjustOffsetFromHelper(g.cursorAt)}this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]};if(this.helper[0]!=this.currentItem[0]){this.currentItem.hide()}this._createPlaceholder();if(g.containment){this._setContainment()}if(g.cursor){if(a(&quot;body&quot;).css(&quot;cursor&quot;)){this._storedCursor=a(&quot;body&quot;).css(&quot;cursor&quot;)}a(&quot;body&quot;).css(&quot;cursor&quot;,g.cursor)}if(g.opacity){if(this.helper.css(&quot;opacity&quot;)){this._storedOpacity=this.helper.css(&quot;opacity&quot;)}this.helper.css(&quot;opacity&quot;,g.opacity)}if(g.zIndex){if(this.helper.css(&quot;zIndex&quot;)){this._storedZIndex=this.helper.css(&quot;zIndex&quot;)}this.helper.css(&quot;zIndex&quot;,g.zIndex)}if(this.scrollParent[0]!=document&amp;&amp;this.scrollParent[0].tagName!=&quot;HTML&quot;){this.overflowOffset=this.scrollParent.offset()}this._trigger(&quot;start&quot;,e,this._uiHash());if(!this._preserveHelperProportions){this._cacheHelperProportions()}if(!b){for(var d=this.containers.length-1;d&gt;=0;d--){this.containers[d]._trigger(&quot;activate&quot;,e,c._uiHash(this))}}if(a.ui.ddmanager){a.ui.ddmanager.current=this}if(a.ui.ddmanager&amp;&amp;!g.dropBehaviour){a.ui.ddmanager.prepareOffsets(this,e)}this.dragging=true;this.helper.addClass(&quot;ui-sortable-helper&quot;);this._mouseDrag(e);return true},_mouseDrag:function(f){this.position=this._generatePosition(f);this.positionAbs=this._convertPositionTo(&quot;absolute&quot;);if(!this.lastPositionAbs){this.lastPositionAbs=this.positionAbs}if(this.options.scroll){var g=this.options,b=false;if(this.scrollParent[0]!=document&amp;&amp;this.scrollParent[0].tagName!=&quot;HTML&quot;){if((this.overflowOffset.top+this.scrollParent[0].offsetHeight)-f.pageY&lt;g.scrollSensitivity){this.scrollParent[0].scrollTop=b=this.scrollParent[0].scrollTop+g.scrollSpeed}else{if(f.pageY-this.overflowOffset.top&lt;g.scrollSensitivity){this.scrollParent[0].scrollTop=b=this.scrollParent[0].scrollTop-g.scrollSpeed}}if((this.overflowOffset.left+this.scrollParent[0].offsetWidth)-f.pageX&lt;g.scrollSensitivity){this.scrollParent[0].scrollLeft=b=this.scrollParent[0].scrollLeft+g.scrollSpeed}else{if(f.pageX-this.overflowOffset.left&lt;g.scrollSensitivity){this.scrollParent[0].scrollLeft=b=this.scrollParent[0].scrollLeft-g.scrollSpeed}}}else{if(f.pageY-a(document).scrollTop()&lt;g.scrollSensitivity){b=a(document).scrollTop(a(document).scrollTop()-g.scrollSpeed)}else{if(a(window).height()-(f.pageY-a(document).scrollTop())&lt;g.scrollSensitivity){b=a(document).scrollTop(a(document).scrollTop()+g.scrollSpeed)}}if(f.pageX-a(document).scrollLeft()&lt;g.scrollSensitivity){b=a(document).scrollLeft(a(document).scrollLeft()-g.scrollSpeed)}else{if(a(window).width()-(f.pageX-a(document).scrollLeft())&lt;g.scrollSensitivity){b=a(document).scrollLeft(a(document).scrollLeft()+g.scrollSpeed)}}}if(b!==false&amp;&amp;a.ui.ddmanager&amp;&amp;!g.dropBehaviour){a.ui.ddmanager.prepareOffsets(this,f)}}this.positionAbs=this._convertPositionTo(&quot;absolute&quot;);if(!this.options.axis||this.options.axis!=&quot;y&quot;){this.helper[0].style.left=this.position.left+&quot;px&quot;}if(!this.options.axis||this.options.axis!=&quot;x&quot;){this.helper[0].style.top=this.position.top+&quot;px&quot;}for(var d=this.items.length-1;d&gt;=0;d--){var e=this.items[d],c=e.item[0],h=this._intersectsWithPointer(e);if(!h){continue}if(c!=this.currentItem[0]&amp;&amp;this.placeholder[h==1?&quot;next&quot;:&quot;prev&quot;]()[0]!=c&amp;&amp;!a.ui.contains(this.placeholder[0],c)&amp;&amp;(this.options.type==&quot;semi-dynamic&quot;?!a.ui.contains(this.element[0],c):true)){this.direction=h==1?&quot;down&quot;:&quot;up&quot;;if(this.options.tolerance==&quot;pointer&quot;||this._intersectsWithSides(e)){this._rearrange(f,e)}else{break}this._trigger(&quot;change&quot;,f,this._uiHash());break}}this._contactContainers(f);if(a.ui.ddmanager){a.ui.ddmanager.drag(this,f)}this._trigger(&quot;sort&quot;,f,this._uiHash());this.lastPositionAbs=this.positionAbs;return false},_mouseStop:function(c,d){if(!c){return}if(a.ui.ddmanager&amp;&amp;!this.options.dropBehaviour){a.ui.ddmanager.drop(this,c)}if(this.options.revert){var b=this;var e=b.placeholder.offset();b.reverting=true;a(this.helper).animate({left:e.left-this.offset.parent.left-b.margins.left+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft),top:e.top-this.offset.parent.top-b.margins.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)},parseInt(this.options.revert,10)||500,function(){b._clear(c)})}else{this._clear(c,d)}return false},cancel:function(){var b=this;if(this.dragging){this._mouseUp();if(this.options.helper==&quot;original&quot;){this.currentItem.css(this._storedCSS).removeClass(&quot;ui-sortable-helper&quot;)}else{this.currentItem.show()}for(var c=this.containers.length-1;c&gt;=0;c--){this.containers[c]._trigger(&quot;deactivate&quot;,null,b._uiHash(this));if(this.containers[c].containerCache.over){this.containers[c]._trigger(&quot;out&quot;,null,b._uiHash(this));this.containers[c].containerCache.over=0}}}if(this.placeholder[0].parentNode){this.placeholder[0].parentNode.removeChild(this.placeholder[0])}if(this.options.helper!=&quot;original&quot;&amp;&amp;this.helper&amp;&amp;this.helper[0].parentNode){this.helper.remove()}a.extend(this,{helper:null,dragging:false,reverting:false,_noFinalSort:null});if(this.domPosition.prev){a(this.domPosition.prev).after(this.currentItem)}else{a(this.domPosition.parent).prepend(this.currentItem)}return true},serialize:function(d){var b=this._getItemsAsjQuery(d&amp;&amp;d.connected);var c=[];d=d||{};a(b).each(function(){var e=(a(d.item||this).attr(d.attribute||&quot;id&quot;)||&quot;&quot;).match(d.expression||(/(.+)[-=_](.+)/));if(e){c.push((d.key||e[1]+&quot;[]&quot;)+&quot;=&quot;+(d.key&amp;&amp;d.expression?e[1]:e[2]))}});return c.join(&quot;&amp;&quot;)},toArray:function(d){var b=this._getItemsAsjQuery(d&amp;&amp;d.connected);var c=[];d=d||{};b.each(function(){c.push(a(d.item||this).attr(d.attribute||&quot;id&quot;)||&quot;&quot;)});return c},_intersectsWith:function(m){var e=this.positionAbs.left,d=e+this.helperProportions.width,k=this.positionAbs.top,j=k+this.helperProportions.height;var f=m.left,c=f+m.width,n=m.top,i=n+m.height;var o=this.offset.click.top,h=this.offset.click.left;var g=(k+o)&gt;n&amp;&amp;(k+o)&lt;i&amp;&amp;(e+h)&gt;f&amp;&amp;(e+h)&lt;c;if(this.options.tolerance==&quot;pointer&quot;||this.options.forcePointerForContainers||(this.options.tolerance!=&quot;pointer&quot;&amp;&amp;this.helperProportions[this.floating?&quot;width&quot;:&quot;height&quot;]&gt;m[this.floating?&quot;width&quot;:&quot;height&quot;])){return g}else{return(f&lt;e+(this.helperProportions.width/2)&amp;&amp;d-(this.helperProportions.width/2)&lt;c&amp;&amp;n&lt;k+(this.helperProportions.height/2)&amp;&amp;j-(this.helperProportions.height/2)&lt;i)}},_intersectsWithPointer:function(d){var e=a.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,d.top,d.height),c=a.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,d.left,d.width),g=e&amp;&amp;c,b=this._getDragVerticalDirection(),f=this._getDragHorizontalDirection();if(!g){return false}return this.floating?(((f&amp;&amp;f==&quot;right&quot;)||b==&quot;down&quot;)?2:1):(b&amp;&amp;(b==&quot;down&quot;?2:1))},_intersectsWithSides:function(e){var c=a.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,e.top+(e.height/2),e.height),d=a.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,e.left+(e.width/2),e.width),b=this._getDragVerticalDirection(),f=this._getDragHorizontalDirection();if(this.floating&amp;&amp;f){return((f==&quot;right&quot;&amp;&amp;d)||(f==&quot;left&quot;&amp;&amp;!d))}else{return b&amp;&amp;((b==&quot;down&quot;&amp;&amp;c)||(b==&quot;up&quot;&amp;&amp;!c))}},_getDragVerticalDirection:function(){var b=this.positionAbs.top-this.lastPositionAbs.top;return b!=0&amp;&amp;(b&gt;0?&quot;down&quot;:&quot;up&quot;)},_getDragHorizontalDirection:function(){var b=this.positionAbs.left-this.lastPositionAbs.left;return b!=0&amp;&amp;(b&gt;0?&quot;right&quot;:&quot;left&quot;)},refresh:function(b){this._refreshItems(b);this.refreshPositions()},_connectWith:function(){var b=this.options;return b.connectWith.constructor==String?[b.connectWith]:b.connectWith},_getItemsAsjQuery:function(b){var l=this;var g=[];var e=[];var h=this._connectWith();if(h&amp;&amp;b){for(var d=h.length-1;d&gt;=0;d--){var k=a(h[d]);for(var c=k.length-1;c&gt;=0;c--){var f=a.data(k[c],&quot;sortable&quot;);if(f&amp;&amp;f!=this&amp;&amp;!f.options.disabled){e.push([a.isFunction(f.options.items)?f.options.items.call(f.element):a(f.options.items,f.element).not(&quot;.ui-sortable-helper&quot;),f])}}}}e.push([a.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):a(this.options.items,this.element).not(&quot;.ui-sortable-helper&quot;),this]);for(var d=e.length-1;d&gt;=0;d--){e[d][0].each(function(){g.push(this)})}return a(g)},_removeCurrentsFromItems:function(){var d=this.currentItem.find(&quot;:data(sortable-item)&quot;);for(var c=0;c&lt;this.items.length;c++){for(var b=0;b&lt;d.length;b++){if(d[b]==this.items[c].item[0]){this.items.splice(c,1)}}}},_refreshItems:function(b){this.items=[];this.containers=[this];var h=this.items;var p=this;var f=[[a.isFunction(this.options.items)?this.options.items.call(this.element[0],b,{item:this.currentItem}):a(this.options.items,this.element),this]];var l=this._connectWith();if(l){for(var e=l.length-1;e&gt;=0;e--){var m=a(l[e]);for(var d=m.length-1;d&gt;=0;d--){var g=a.data(m[d],&quot;sortable&quot;);if(g&amp;&amp;g!=this&amp;&amp;!g.options.disabled){f.push([a.isFunction(g.options.items)?g.options.items.call(g.element[0],b,{item:this.currentItem}):a(g.options.items,g.element),g]);this.containers.push(g)}}}}for(var e=f.length-1;e&gt;=0;e--){var k=f[e][1];var c=f[e][0];for(var d=0,n=c.length;d&lt;n;d++){var o=a(c[d]);o.data(&quot;sortable-item&quot;,k);h.push({item:o,instance:k,width:0,height:0,left:0,top:0})}}},refreshPositions:function(b){if(this.offsetParent&amp;&amp;this.helper){this.offset.parent=this._getParentOffset()}for(var d=this.items.length-1;d&gt;=0;d--){var e=this.items[d];if(e.instance!=this.currentContainer&amp;&amp;this.currentContainer&amp;&amp;e.item[0]!=this.currentItem[0]){continue}var c=this.options.toleranceElement?a(this.options.toleranceElement,e.item):e.item;if(!b){e.width=c.outerWidth();e.height=c.outerHeight()}var f=c.offset();e.left=f.left;e.top=f.top}if(this.options.custom&amp;&amp;this.options.custom.refreshContainers){this.options.custom.refreshContainers.call(this)}else{for(var d=this.containers.length-1;d&gt;=0;d--){var f=this.containers[d].element.offset();this.containers[d].containerCache.left=f.left;this.containers[d].containerCache.top=f.top;this.containers[d].containerCache.width=this.containers[d].element.outerWidth();this.containers[d].containerCache.height=this.containers[d].element.outerHeight()}}},_createPlaceholder:function(d){var b=d||this,e=b.options;if(!e.placeholder||e.placeholder.constructor==String){var c=e.placeholder;e.placeholder={element:function(){var f=a(document.createElement(b.currentItem[0].nodeName)).addClass(c||b.currentItem[0].className+&quot; ui-sortable-placeholder&quot;).removeClass(&quot;ui-sortable-helper&quot;)[0];if(!c){f.style.visibility=&quot;hidden&quot;}return f},update:function(f,g){if(c&amp;&amp;!e.forcePlaceholderSize){return}if(!g.height()){g.height(b.currentItem.innerHeight()-parseInt(b.currentItem.css(&quot;paddingTop&quot;)||0,10)-parseInt(b.currentItem.css(&quot;paddingBottom&quot;)||0,10))}if(!g.width()){g.width(b.currentItem.innerWidth()-parseInt(b.currentItem.css(&quot;paddingLeft&quot;)||0,10)-parseInt(b.currentItem.css(&quot;paddingRight&quot;)||0,10))}}}}b.placeholder=a(e.placeholder.element.call(b.element,b.currentItem));b.currentItem.after(b.placeholder);e.placeholder.update(b,b.placeholder)},_contactContainers:function(d){for(var c=this.containers.length-1;c&gt;=0;c--){if(this._intersectsWith(this.containers[c].containerCache)){if(!this.containers[c].containerCache.over){if(this.currentContainer!=this.containers[c]){var h=10000;var g=null;var e=this.positionAbs[this.containers[c].floating?&quot;left&quot;:&quot;top&quot;];for(var b=this.items.length-1;b&gt;=0;b--){if(!a.ui.contains(this.containers[c].element[0],this.items[b].item[0])){continue}var f=this.items[b][this.containers[c].floating?&quot;left&quot;:&quot;top&quot;];if(Math.abs(f-e)&lt;h){h=Math.abs(f-e);g=this.items[b]}}if(!g&amp;&amp;!this.options.dropOnEmpty){continue}this.currentContainer=this.containers[c];g?this._rearrange(d,g,null,true):this._rearrange(d,null,this.containers[c].element,true);this._trigger(&quot;change&quot;,d,this._uiHash());this.containers[c]._trigger(&quot;change&quot;,d,this._uiHash(this));this.options.placeholder.update(this.currentContainer,this.placeholder)}this.containers[c]._trigger(&quot;over&quot;,d,this._uiHash(this));this.containers[c].containerCache.over=1}}else{if(this.containers[c].containerCache.over){this.containers[c]._trigger(&quot;out&quot;,d,this._uiHash(this));this.containers[c].containerCache.over=0}}}},_createHelper:function(c){var d=this.options;var b=a.isFunction(d.helper)?a(d.helper.apply(this.element[0],[c,this.currentItem])):(d.helper==&quot;clone&quot;?this.currentItem.clone():this.currentItem);if(!b.parents(&quot;body&quot;).length){a(d.appendTo!=&quot;parent&quot;?d.appendTo:this.currentItem[0].parentNode)[0].appendChild(b[0])}if(b[0]==this.currentItem[0]){this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css(&quot;position&quot;),top:this.currentItem.css(&quot;top&quot;),left:this.currentItem.css(&quot;left&quot;)}}if(b[0].style.width==&quot;&quot;||d.forceHelperSize){b.width(this.currentItem.width())}if(b[0].style.height==&quot;&quot;||d.forceHelperSize){b.height(this.currentItem.height())}return b},_adjustOffsetFromHelper:function(b){if(b.left!=undefined){this.offset.click.left=b.left+this.margins.left}if(b.right!=undefined){this.offset.click.left=this.helperProportions.width-b.right+this.margins.left}if(b.top!=undefined){this.offset.click.top=b.top+this.margins.top}if(b.bottom!=undefined){this.offset.click.top=this.helperProportions.height-b.bottom+this.margins.top}},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var b=this.offsetParent.offset();if(this.cssPosition==&quot;absolute&quot;&amp;&amp;this.scrollParent[0]!=document&amp;&amp;a.ui.contains(this.scrollParent[0],this.offsetParent[0])){b.left+=this.scrollParent.scrollLeft();b.top+=this.scrollParent.scrollTop()}if((this.offsetParent[0]==document.body)||(this.offsetParent[0].tagName&amp;&amp;this.offsetParent[0].tagName.toLowerCase()==&quot;html&quot;&amp;&amp;a.browser.msie)){b={top:0,left:0}}return{top:b.top+(parseInt(this.offsetParent.css(&quot;borderTopWidth&quot;),10)||0),left:b.left+(parseInt(this.offsetParent.css(&quot;borderLeftWidth&quot;),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition==&quot;relative&quot;){var b=this.currentItem.position();return{top:b.top-(parseInt(this.helper.css(&quot;top&quot;),10)||0)+this.scrollParent.scrollTop(),left:b.left-(parseInt(this.helper.css(&quot;left&quot;),10)||0)+this.scrollParent.scrollLeft()}}else{return{top:0,left:0}}},_cacheMargins:function(){this.margins={left:(parseInt(this.currentItem.css(&quot;marginLeft&quot;),10)||0),top:(parseInt(this.currentItem.css(&quot;marginTop&quot;),10)||0)}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e=this.options;if(e.containment==&quot;parent&quot;){e.containment=this.helper[0].parentNode}if(e.containment==&quot;document&quot;||e.containment==&quot;window&quot;){this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,a(e.containment==&quot;document&quot;?document:window).width()-this.helperProportions.width-this.margins.left,(a(e.containment==&quot;document&quot;?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]}if(!(/^(document|window|parent)$/).test(e.containment)){var c=a(e.containment)[0];var d=a(e.containment).offset();var b=(a(c).css(&quot;overflow&quot;)!=&quot;hidden&quot;);this.containment=[d.left+(parseInt(a(c).css(&quot;borderLeftWidth&quot;),10)||0)+(parseInt(a(c).css(&quot;paddingLeft&quot;),10)||0)-this.margins.left,d.top+(parseInt(a(c).css(&quot;borderTopWidth&quot;),10)||0)+(parseInt(a(c).css(&quot;paddingTop&quot;),10)||0)-this.margins.top,d.left+(b?Math.max(c.scrollWidth,c.offsetWidth):c.offsetWidth)-(parseInt(a(c).css(&quot;borderLeftWidth&quot;),10)||0)-(parseInt(a(c).css(&quot;paddingRight&quot;),10)||0)-this.helperProportions.width-this.margins.left,d.top+(b?Math.max(c.scrollHeight,c.offsetHeight):c.offsetHeight)-(parseInt(a(c).css(&quot;borderTopWidth&quot;),10)||0)-(parseInt(a(c).css(&quot;paddingBottom&quot;),10)||0)-this.helperProportions.height-this.margins.top]}},_convertPositionTo:function(f,h){if(!h){h=this.position}var c=f==&quot;absolute&quot;?1:-1;var e=this.options,b=this.cssPosition==&quot;absolute&quot;&amp;&amp;!(this.scrollParent[0]!=document&amp;&amp;a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,g=(/(html|body)/i).test(b[0].tagName);return{top:(h.top+this.offset.relative.top*c+this.offset.parent.top*c-(a.browser.safari&amp;&amp;this.cssPosition==&quot;fixed&quot;?0:(this.cssPosition==&quot;fixed&quot;?-this.scrollParent.scrollTop():(g?0:b.scrollTop()))*c)),left:(h.left+this.offset.relative.left*c+this.offset.parent.left*c-(a.browser.safari&amp;&amp;this.cssPosition==&quot;fixed&quot;?0:(this.cssPosition==&quot;fixed&quot;?-this.scrollParent.scrollLeft():g?0:b.scrollLeft())*c))}},_generatePosition:function(e){var h=this.options,b=this.cssPosition==&quot;absolute&quot;&amp;&amp;!(this.scrollParent[0]!=document&amp;&amp;a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,i=(/(html|body)/i).test(b[0].tagName);if(this.cssPosition==&quot;relative&quot;&amp;&amp;!(this.scrollParent[0]!=document&amp;&amp;this.scrollParent[0]!=this.offsetParent[0])){this.offset.relative=this._getRelativeOffset()}var d=e.pageX;var c=e.pageY;if(this.originalPosition){if(this.containment){if(e.pageX-this.offset.click.left&lt;this.containment[0]){d=this.containment[0]+this.offset.click.left}if(e.pageY-this.offset.click.top&lt;this.containment[1]){c=this.containment[1]+this.offset.click.top}if(e.pageX-this.offset.click.left&gt;this.containment[2]){d=this.containment[2]+this.offset.click.left}if(e.pageY-this.offset.click.top&gt;this.containment[3]){c=this.containment[3]+this.offset.click.top}}if(h.grid){var g=this.originalPageY+Math.round((c-this.originalPageY)/h.grid[1])*h.grid[1];c=this.containment?(!(g-this.offset.click.top&lt;this.containment[1]||g-this.offset.click.top&gt;this.containment[3])?g:(!(g-this.offset.click.top&lt;this.containment[1])?g-h.grid[1]:g+h.grid[1])):g;var f=this.originalPageX+Math.round((d-this.originalPageX)/h.grid[0])*h.grid[0];d=this.containment?(!(f-this.offset.click.left&lt;this.containment[0]||f-this.offset.click.left&gt;this.containment[2])?f:(!(f-this.offset.click.left&lt;this.containment[0])?f-h.grid[0]:f+h.grid[0])):f}}return{top:(c-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(a.browser.safari&amp;&amp;this.cssPosition==&quot;fixed&quot;?0:(this.cssPosition==&quot;fixed&quot;?-this.scrollParent.scrollTop():(i?0:b.scrollTop())))),left:(d-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(a.browser.safari&amp;&amp;this.cssPosition==&quot;fixed&quot;?0:(this.cssPosition==&quot;fixed&quot;?-this.scrollParent.scrollLeft():i?0:b.scrollLeft())))}},_rearrange:function(g,f,c,e){c?c[0].appendChild(this.placeholder[0]):f.item[0].parentNode.insertBefore(this.placeholder[0],(this.direction==&quot;down&quot;?f.item[0]:f.item[0].nextSibling));this.counter=this.counter?++this.counter:1;var d=this,b=this.counter;window.setTimeout(function(){if(b==d.counter){d.refreshPositions(!e)}},0)},_clear:function(d,e){this.reverting=false;var f=[],b=this;if(!this._noFinalSort&amp;&amp;this.currentItem[0].parentNode){this.placeholder.before(this.currentItem)}this._noFinalSort=null;if(this.helper[0]==this.currentItem[0]){for(var c in this._storedCSS){if(this._storedCSS[c]==&quot;auto&quot;||this._storedCSS[c]==&quot;static&quot;){this._storedCSS[c]=&quot;&quot;}}this.currentItem.css(this._storedCSS).removeClass(&quot;ui-sortable-helper&quot;)}else{this.currentItem.show()}if(this.fromOutside&amp;&amp;!e){f.push(function(g){this._trigger(&quot;receive&quot;,g,this._uiHash(this.fromOutside))})}if((this.fromOutside||this.domPosition.prev!=this.currentItem.prev().not(&quot;.ui-sortable-helper&quot;)[0]||this.domPosition.parent!=this.currentItem.parent()[0])&amp;&amp;!e){f.push(function(g){this._trigger(&quot;update&quot;,g,this._uiHash())})}if(!a.ui.contains(this.element[0],this.currentItem[0])){if(!e){f.push(function(g){this._trigger(&quot;remove&quot;,g,this._uiHash())})}for(var c=this.containers.length-1;c&gt;=0;c--){if(a.ui.contains(this.containers[c].element[0],this.currentItem[0])&amp;&amp;!e){f.push((function(g){return function(h){g._trigger(&quot;receive&quot;,h,this._uiHash(this))}}).call(this,this.containers[c]));f.push((function(g){return function(h){g._trigger(&quot;update&quot;,h,this._uiHash(this))}}).call(this,this.containers[c]))}}}for(var c=this.containers.length-1;c&gt;=0;c--){if(!e){f.push((function(g){return function(h){g._trigger(&quot;deactivate&quot;,h,this._uiHash(this))}}).call(this,this.containers[c]))}if(this.containers[c].containerCache.over){f.push((function(g){return function(h){g._trigger(&quot;out&quot;,h,this._uiHash(this))}}).call(this,this.containers[c]));this.containers[c].containerCache.over=0}}if(this._storedCursor){a(&quot;body&quot;).css(&quot;cursor&quot;,this._storedCursor)}if(this._storedOpacity){this.helper.css(&quot;opacity&quot;,this._storedOpacity)}if(this._storedZIndex){this.helper.css(&quot;zIndex&quot;,this._storedZIndex==&quot;auto&quot;?&quot;&quot;:this._storedZIndex)}this.dragging=false;if(this.cancelHelperRemoval){if(!e){this._trigger(&quot;beforeStop&quot;,d,this._uiHash());for(var c=0;c&lt;f.length;c++){f[c].call(this,d)}this._trigger(&quot;stop&quot;,d,this._uiHash())}return false}if(!e){this._trigger(&quot;beforeStop&quot;,d,this._uiHash())}this.placeholder[0].parentNode.removeChild(this.placeholder[0]);if(this.helper[0]!=this.currentItem[0]){this.helper.remove()}this.helper=null;if(!e){for(var c=0;c&lt;f.length;c++){f[c].call(this,d)}this._trigger(&quot;stop&quot;,d,this._uiHash())}this.fromOutside=false;return true},_trigger:function(){if(a.widget.prototype._trigger.apply(this,arguments)===false){this.cancel()}},_uiHash:function(c){var b=c||this;return{helper:b.helper,placeholder:b.placeholder||a([]),position:b.position,absolutePosition:b.positionAbs,offset:b.positionAbs,item:b.currentItem,sender:c?c.element:null}}}));a.extend(a.ui.sortable,{getter:&quot;serialize toArray&quot;,version:&quot;1.7.2&quot;,eventPrefix:&quot;sort&quot;,defaults:{appendTo:&quot;parent&quot;,axis:false,cancel:&quot;:input,option&quot;,connectWith:false,containment:false,cursor:&quot;auto&quot;,cursorAt:false,delay:0,distance:1,dropOnEmpty:true,forcePlaceholderSize:false,forceHelperSize:false,grid:false,handle:false,helper:&quot;original&quot;,items:&quot;&gt; *&quot;,opacity:false,placeholder:false,revert:false,scroll:true,scrollSensitivity:20,scrollSpeed:20,scope:&quot;default&quot;,tolerance:&quot;intersect&quot;,zIndex:1000}})})(jQuery);;
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkwpadminjscustomnavigationcustomjqueryui172js"></a>
<div class="addfile"><h4>Added: trunk/wp-admin/js/custom-navigation-custom-jquery-ui-1.7.2.js (0 => 13257)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/js/custom-navigation-custom-jquery-ui-1.7.2.js                                (rev 0)
+++ trunk/wp-admin/js/custom-navigation-custom-jquery-ui-1.7.2.js        2010-02-20 21:57:43 UTC (rev 13257)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+jQuery.ui||(function(p){var j=p.fn.remove,o=p.browser.mozilla&amp;&amp;(parseFloat(p.browser.version)&lt;1.9);p.ui={version:&quot;1.7.2&quot;,plugin:{add:function(c,b,e){var a=p.ui[c].prototype;for(var d in e){a.plugins[d]=a.plugins[d]||[];a.plugins[d].push([b,e[d]])}},call:function(d,b,c){var e=d.plugins[b];if(!e||!d.element[0].parentNode){return}for(var a=0;a&lt;e.length;a++){if(d.options[e[a][0]]){e[a][1].apply(d.element,c)}}}},contains:function(a,b){return document.compareDocumentPosition?a.compareDocumentPosition(b)&amp;16:a!==b&amp;&amp;a.contains(b)},hasScroll:function(a,c){if(p(a).css(&quot;overflow&quot;)==&quot;hidden&quot;){return false}var d=(c&amp;&amp;c==&quot;left&quot;)?&quot;scrollLeft&quot;:&quot;scrollTop&quot;,b=false;if(a[d]&gt;0){return true}a[d]=1;b=(a[d]&gt;0);a[d]=0;return b},isOverAxis:function(b,c,a){return(b&gt;c)&amp;&amp;(b&lt;(c+a))},isOver:function(e,c,f,a,d,b){return p.ui.isOverAxis(e,f,d)&amp;&amp;p.ui.isOverAxis(c,a,b)},keyCode:{BACKSPACE:8,CAPS_LOCK:20,COMMA:188,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38}};if(o){var m=p.attr,n=p.fn.removeAttr,k=&quot;http://www.w3.org/2005/07/aaa&quot;,r=/^aria-/,q=/^wairole:/;p.attr=function(c,d,b){var a=b!==undefined;return(d==&quot;role&quot;?(a?m.call(this,c,d,&quot;wairole:&quot;+b):(m.apply(this,arguments)||&quot;&quot;).replace(q,&quot;&quot;)):(r.test(d)?(a?c.setAttributeNS(k,d.replace(r,&quot;aaa:&quot;),b):m.call(this,c,d.replace(r,&quot;aaa:&quot;))):m.apply(this,arguments)))};p.fn.removeAttr=function(a){return(r.test(a)?this.each(function(){this.removeAttributeNS(k,a.replace(r,&quot;&quot;))}):n.call(this,a))}}p.fn.extend({remove:function(){p(&quot;*&quot;,this).add(this).each(function(){p(this).triggerHandler(&quot;remove&quot;)});return j.apply(this,arguments)},enableSelection:function(){return this.attr(&quot;unselectable&quot;,&quot;off&quot;).css(&quot;MozUserSelect&quot;,&quot;&quot;).unbind(&quot;selectstart.ui&quot;)},disableSelection:function(){return this.attr(&quot;unselectable&quot;,&quot;on&quot;).css(&quot;MozUserSelect&quot;,&quot;none&quot;).bind(&quot;selectstart.ui&quot;,function(){return false})},scrollParent:function(){var a;if((p.browser.msie&amp;&amp;(/(static|relative)/).test(this.css(&quot;position&quot;)))||(/absolute/).test(this.css(&quot;position&quot;))){a=this.parents().filter(function(){return(/(relative|absolute|fixed)/).test(p.curCSS(this,&quot;position&quot;,1))&amp;&amp;(/(auto|scroll)/).test(p.curCSS(this,&quot;overflow&quot;,1)+p.curCSS(this,&quot;overflow-y&quot;,1)+p.curCSS(this,&quot;overflow-x&quot;,1))}).eq(0)}else{a=this.parents().filter(function(){return(/(auto|scroll)/).test(p.curCSS(this,&quot;overflow&quot;,1)+p.curCSS(this,&quot;overflow-y&quot;,1)+p.curCSS(this,&quot;overflow-x&quot;,1))}).eq(0)}return(/fixed/).test(this.css(&quot;position&quot;))||!a.length?p(document):a}});p.extend(p.expr[&quot;:&quot;],{data:function(a,b,c){return !!p.data(a,c[3])},focusable:function(b){var a=b.nodeName.toLowerCase(),c=p.attr(b,&quot;tabindex&quot;);return(/input|select|textarea|button|object/.test(a)?!b.disabled:&quot;a&quot;==a||&quot;area&quot;==a?b.href||!isNaN(c):!isNaN(c))&amp;&amp;!p(b)[&quot;area&quot;==a?&quot;parents&quot;:&quot;closest&quot;](&quot;:hidden&quot;).length},tabbable:function(a){var b=p.attr(a,&quot;tabindex&quot;);return(isNaN(b)||b&gt;=0)&amp;&amp;p(a).is(&quot;:focusable&quot;)}});function l(a,f,e,b){function c(g){var h=p[a][f][g]||[];return(typeof h==&quot;string&quot;?h.split(/,?\s+/):h)}var d=c(&quot;getter&quot;);if(b.length==1&amp;&amp;typeof b[0]==&quot;string&quot;){d=d.concat(c(&quot;getterSetter&quot;))}return(p.inArray(e,d)!=-1)}p.widget=function(b,c){var a=b.split(&quot;.&quot;)[0];b=b.split(&quot;.&quot;)[1];p.fn[b]=function(e){var g=(typeof e==&quot;string&quot;),f=Array.prototype.slice.call(arguments,1);if(g&amp;&amp;e.substring(0,1)==&quot;_&quot;){return this}if(g&amp;&amp;l(a,b,e,f)){var d=p.data(this[0],b);return(d?d[e].apply(d,f):undefined)}return this.each(function(){var h=p.data(this,b);(!h&amp;&amp;!g&amp;&amp;p.data(this,b,new p[a][b](this,e))._init());(h&amp;&amp;g&amp;&amp;p.isFunction(h[e])&amp;&amp;h[e].apply(h,f))})};p[a]=p[a]||{};p[a][b]=function(e,f){var d=this;this.namespace=a;this.widgetName=b;this.widgetEventPrefix=p[a][b].eventPrefix||b;this.widgetBaseClass=a+&quot;-&quot;+b;this.options=p.extend({},p.widget.defaults,p[a][b].defaults,p.metadata&amp;&amp;p.metadata.get(e)[b],f);this.element=p(e).bind(&quot;setData.&quot;+b,function(h,i,g){if(h.target==e){return d._setData(i,g)}}).bind(&quot;getData.&quot;+b,function(g,h){if(g.target==e){return d._getData(h)}}).bind(&quot;remove&quot;,function(){return d.destroy()})};p[a][b].prototype=p.extend({},p.widget.prototype,c);p[a][b].getterSetter=&quot;option&quot;};p.widget.prototype={_init:function(){},destroy:function(){this.element.removeData(this.widgetName).removeClass(this.widgetBaseClass+&quot;-disabled &quot;+this.namespace+&quot;-state-disabled&quot;).removeAttr(&quot;aria-disabled&quot;)},option:function(b,a){var c=b,d=this;if(typeof b==&quot;string&quot;){if(a===undefined){return this._getData(b)}c={};c[b]=a}p.each(c,function(f,e){d._setData(f,e)})},_getData:function(a){return this.options[a]},_setData:function(b,a){this.options[b]=a;if(b==&quot;disabled&quot;){this.element[a?&quot;addClass&quot;:&quot;removeClass&quot;](this.widgetBaseClass+&quot;-disabled &quot;+this.namespace+&quot;-state-disabled&quot;).attr(&quot;aria-disabled&quot;,a)}},enable:function(){this._setData(&quot;disabled&quot;,false)},disable:function(){this._setData(&quot;disabled&quot;,true)},_trigger:function(b,a,g){var e=this.options[b],d=(b==this.widgetEventPrefix?b:this.widgetEventPrefix+b);a=p.Event(a);a.type=d;if(a.originalEvent){for(var c=p.event.props.length,f;c;){f=p.event.props[--c];a[f]=a.originalEvent[f]}}this.element.trigger(a,g);return !(p.isFunction(e)&amp;&amp;e.call(this.element[0],a,g)===false||a.isDefaultPrevented())}};p.widget.defaults={disabled:false};p.ui.mouse={_mouseInit:function(){var a=this;this.element.bind(&quot;mousedown.&quot;+this.widgetName,function(b){return a._mouseDown(b)}).bind(&quot;click.&quot;+this.widgetName,function(b){if(a._preventClickEvent){a._preventClickEvent=false;b.stopImmediatePropagation();return false}});if(p.browser.msie){this._mouseUnselectable=this.element.attr(&quot;unselectable&quot;);this.element.attr(&quot;unselectable&quot;,&quot;on&quot;)}this.started=false},_mouseDestroy:function(){this.element.unbind(&quot;.&quot;+this.widgetName);(p.browser.msie&amp;&amp;this.element.attr(&quot;unselectable&quot;,this._mouseUnselectable))},_mouseDown:function(b){b.originalEvent=b.originalEvent||{};if(b.originalEvent.mouseHandled){return}(this._mouseStarted&amp;&amp;this._mouseUp(b));this._mouseDownEvent=b;var c=this,a=(b.which==1),d=(typeof this.options.cancel==&quot;string&quot;?p(b.target).parents().add(b.target).filter(this.options.cancel).length:false);if(!a||d||!this._mouseCapture(b)){return true}this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){c.mouseDelayMet=true},this.options.delay)}if(this._mouseDistanceMet(b)&amp;&amp;this._mouseDelayMet(b)){this._mouseStarted=(this._mouseStart(b)!==false);if(!this._mouseStarted){b.preventDefault();return true}}this._mouseMoveDelegate=function(e){return c._mouseMove(e)};this._mouseUpDelegate=function(e){return c._mouseUp(e)};p(document).bind(&quot;mousemove.&quot;+this.widgetName,this._mouseMoveDelegate).bind(&quot;mouseup.&quot;+this.widgetName,this._mouseUpDelegate);(p.browser.safari||b.preventDefault());b.originalEvent.mouseHandled=true;return true},_mouseMove:function(a){if(p.browser.msie&amp;&amp;!a.button){return this._mouseUp(a)}if(this._mouseStarted){this._mouseDrag(a);return a.preventDefault()}if(this._mouseDistanceMet(a)&amp;&amp;this._mouseDelayMet(a)){this._mouseStarted=(this._mouseStart(this._mouseDownEvent,a)!==false);(this._mouseStarted?this._mouseDrag(a):this._mouseUp(a))}return !this._mouseStarted},_mouseUp:function(a){p(document).unbind(&quot;mousemove.&quot;+this.widgetName,this._mouseMoveDelegate).unbind(&quot;mouseup.&quot;+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))&gt;=this.options.distance)},_mouseDelayMet:function(a){return this.mouseDelayMet},_mouseStart:function(a){},_mouseDrag:function(a){},_mouseStop:function(a){},_mouseCapture:function(a){return true}};p.ui.mouse.defaults={cancel:null,distance:1,delay:0}})(jQuery);(function(b){b.widget(&quot;ui.draggable&quot;,b.extend({},b.ui.mouse,{_init:function(){if(this.options.helper==&quot;original&quot;&amp;&amp;!(/^(?:r|a|f)/).test(this.element.css(&quot;position&quot;))){this.element[0].style.position=&quot;relative&quot;}(this.options.addClasses&amp;&amp;this.element.addClass(&quot;ui-draggable&quot;));(this.options.disabled&amp;&amp;this.element.addClass(&quot;ui-draggable-disabled&quot;));this._mouseInit()},destroy:function(){if(!this.element.data(&quot;draggable&quot;)){return}this.element.removeData(&quot;draggable&quot;).unbind(&quot;.draggable&quot;).removeClass(&quot;ui-draggable ui-draggable-dragging ui-draggable-disabled&quot;);this._mouseDestroy()},_mouseCapture:function(a){var d=this.options;if(this.helper||d.disabled||b(a.target).is(&quot;.ui-resizable-handle&quot;)){return false}this.handle=this._getHandle(a);if(!this.handle){return false}return true},_mouseStart:function(a){var d=this.options;this.helper=this._createHelper(a);this._cacheHelperProportions();if(b.ui.ddmanager){b.ui.ddmanager.current=this}this._cacheMargins();this.cssPosition=this.helper.css(&quot;position&quot;);this.scrollParent=this.helper.scrollParent();this.offset=this.element.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};b.extend(this.offset,{click:{left:a.pageX-this.offset.left,top:a.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this._generatePosition(a);this.originalPageX=a.pageX;this.originalPageY=a.pageY;if(d.cursorAt){this._adjustOffsetFromHelper(d.cursorAt)}if(d.containment){this._setContainment()}this._trigger(&quot;start&quot;,a);this._cacheHelperProportions();if(b.ui.ddmanager&amp;&amp;!d.dropBehaviour){b.ui.ddmanager.prepareOffsets(this,a)}this.helper.addClass(&quot;ui-draggable-dragging&quot;);this._mouseDrag(a,true);return true},_mouseDrag:function(a,e){this.position=this._generatePosition(a);this.positionAbs=this._convertPositionTo(&quot;absolute&quot;);if(!e){var f=this._uiHash();this._trigger(&quot;drag&quot;,a,f);this.position=f.position}if(!this.options.axis||this.options.axis!=&quot;y&quot;){this.helper[0].style.left=this.position.left+&quot;px&quot;}if(!this.options.axis||this.options.axis!=&quot;x&quot;){this.helper[0].style.top=this.position.top+&quot;px&quot;}if(b.ui.ddmanager){b.ui.ddmanager.drag(this,a)}return false},_mouseStop:function(f){var e=false;if(b.ui.ddmanager&amp;&amp;!this.options.dropBehaviour){e=b.ui.ddmanager.drop(this,f)}if(this.dropped){e=this.dropped;this.dropped=false}if((this.options.revert==&quot;invalid&quot;&amp;&amp;!e)||(this.options.revert==&quot;valid&quot;&amp;&amp;e)||this.options.revert===true||(b.isFunction(this.options.revert)&amp;&amp;this.options.revert.call(this.element,e))){var a=this;b(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){a._trigger(&quot;stop&quot;,f);a._clear()})}else{this._trigger(&quot;stop&quot;,f);this._clear()}return false},_getHandle:function(a){var d=!this.options.handle||!b(this.options.handle,this.element).length?true:false;b(this.options.handle,this.element).find(&quot;*&quot;).andSelf().each(function(){if(this==a.target){d=true}});return d},_createHelper:function(f){var e=this.options;var a=b.isFunction(e.helper)?b(e.helper.apply(this.element[0],[f])):(e.helper==&quot;clone&quot;?this.element.clone():this.element);if(!a.parents(&quot;body&quot;).length){a.appendTo((e.appendTo==&quot;parent&quot;?this.element[0].parentNode:e.appendTo))}if(a[0]!=this.element[0]&amp;&amp;!(/(fixed|absolute)/).test(a.css(&quot;position&quot;))){a.css(&quot;position&quot;,&quot;absolute&quot;)}return a},_adjustOffsetFromHelper:function(a){if(a.left!=undefined){this.offset.click.left=a.left+this.margins.left}if(a.right!=undefined){this.offset.click.left=this.helperProportions.width-a.right+this.margins.left}if(a.top!=undefined){this.offset.click.top=a.top+this.margins.top}if(a.bottom!=undefined){this.offset.click.top=this.helperProportions.height-a.bottom+this.margins.top}},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var a=this.offsetParent.offset();if(this.cssPosition==&quot;absolute&quot;&amp;&amp;this.scrollParent[0]!=document&amp;&amp;b.ui.contains(this.scrollParent[0],this.offsetParent[0])){a.left+=this.scrollParent.scrollLeft();a.top+=this.scrollParent.scrollTop()}if((this.offsetParent[0]==document.body)||(this.offsetParent[0].tagName&amp;&amp;this.offsetParent[0].tagName.toLowerCase()==&quot;html&quot;&amp;&amp;b.browser.msie)){a={top:0,left:0}}return{top:a.top+(parseInt(this.offsetParent.css(&quot;borderTopWidth&quot;),10)||0),left:a.left+(parseInt(this.offsetParent.css(&quot;borderLeftWidth&quot;),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition==&quot;relative&quot;){var a=this.element.position();return{top:a.top-(parseInt(this.helper.css(&quot;top&quot;),10)||0)+this.scrollParent.scrollTop(),left:a.left-(parseInt(this.helper.css(&quot;left&quot;),10)||0)+this.scrollParent.scrollLeft()}}else{return{top:0,left:0}}},_cacheMargins:function(){this.margins={left:(parseInt(this.element.css(&quot;marginLeft&quot;),10)||0),top:(parseInt(this.element.css(&quot;marginTop&quot;),10)||0)}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var f=this.options;if(f.containment==&quot;parent&quot;){f.containment=this.helper[0].parentNode}if(f.containment==&quot;document&quot;||f.containment==&quot;window&quot;){this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,b(f.containment==&quot;document&quot;?document:window).width()-this.helperProportions.width-this.margins.left,(b(f.containment==&quot;document&quot;?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]}if(!(/^(document|window|parent)$/).test(f.containment)&amp;&amp;f.containment.constructor!=Array){var h=b(f.containment)[0];if(!h){return}var g=b(f.containment).offset();var a=(b(h).css(&quot;overflow&quot;)!=&quot;hidden&quot;);this.containment=[g.left+(parseInt(b(h).css(&quot;borderLeftWidth&quot;),10)||0)+(parseInt(b(h).css(&quot;paddingLeft&quot;),10)||0)-this.margins.left,g.top+(parseInt(b(h).css(&quot;borderTopWidth&quot;),10)||0)+(parseInt(b(h).css(&quot;paddingTop&quot;),10)||0)-this.margins.top,g.left+(a?Math.max(h.scrollWidth,h.offsetWidth):h.offsetWidth)-(parseInt(b(h).css(&quot;borderLeftWidth&quot;),10)||0)-(parseInt(b(h).css(&quot;paddingRight&quot;),10)||0)-this.helperProportions.width-this.margins.left,g.top+(a?Math.max(h.scrollHeight,h.offsetHeight):h.offsetHeight)-(parseInt(b(h).css(&quot;borderTopWidth&quot;),10)||0)-(parseInt(b(h).css(&quot;paddingBottom&quot;),10)||0)-this.helperProportions.height-this.margins.top]}else{if(f.containment.constructor==Array){this.containment=f.containment}}},_convertPositionTo:function(j,d){if(!d){d=this.position}var l=j==&quot;absolute&quot;?1:-1;var k=this.options,a=this.cssPosition==&quot;absolute&quot;&amp;&amp;!(this.scrollParent[0]!=document&amp;&amp;b.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,i=(/(html|body)/i).test(a[0].tagName);return{top:(d.top+this.offset.relative.top*l+this.offset.parent.top*l-(b.browser.safari&amp;&amp;this.cssPosition==&quot;fixed&quot;?0:(this.cssPosition==&quot;fixed&quot;?-this.scrollParent.scrollTop():(i?0:a.scrollTop()))*l)),left:(d.left+this.offset.relative.left*l+this.offset.parent.left*l-(b.browser.safari&amp;&amp;this.cssPosition==&quot;fixed&quot;?0:(this.cssPosition==&quot;fixed&quot;?-this.scrollParent.scrollLeft():i?0:a.scrollLeft())*l))}},_generatePosition:function(n){var k=this.options,a=this.cssPosition==&quot;absolute&quot;&amp;&amp;!(this.scrollParent[0]!=document&amp;&amp;b.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,j=(/(html|body)/i).test(a[0].tagName);if(this.cssPosition==&quot;relative&quot;&amp;&amp;!(this.scrollParent[0]!=document&amp;&amp;this.scrollParent[0]!=this.offsetParent[0])){this.offset.relative=this._getRelativeOffset()}var o=n.pageX;var p=n.pageY;if(this.originalPosition){if(this.containment){if(n.pageX-this.offset.click.left&lt;this.containment[0]){o=this.containment[0]+this.offset.click.left}if(n.pageY-this.offset.click.top&lt;this.containment[1]){p=this.containment[1]+this.offset.click.top}if(n.pageX-this.offset.click.left&gt;this.containment[2]){o=this.containment[2]+this.offset.click.left}if(n.pageY-this.offset.click.top&gt;this.containment[3]){p=this.containment[3]+this.offset.click.top}}if(k.grid){var l=this.originalPageY+Math.round((p-this.originalPageY)/k.grid[1])*k.grid[1];p=this.containment?(!(l-this.offset.click.top&lt;this.containment[1]||l-this.offset.click.top&gt;this.containment[3])?l:(!(l-this.offset.click.top&lt;this.containment[1])?l-k.grid[1]:l+k.grid[1])):l;var m=this.originalPageX+Math.round((o-this.originalPageX)/k.grid[0])*k.grid[0];o=this.containment?(!(m-this.offset.click.left&lt;this.containment[0]||m-this.offset.click.left&gt;this.containment[2])?m:(!(m-this.offset.click.left&lt;this.containment[0])?m-k.grid[0]:m+k.grid[0])):m}}return{top:(p-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(b.browser.safari&amp;&amp;this.cssPosition==&quot;fixed&quot;?0:(this.cssPosition==&quot;fixed&quot;?-this.scrollParent.scrollTop():(j?0:a.scrollTop())))),left:(o-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(b.browser.safari&amp;&amp;this.cssPosition==&quot;fixed&quot;?0:(this.cssPosition==&quot;fixed&quot;?-this.scrollParent.scrollLeft():j?0:a.scrollLeft())))}},_clear:function(){this.helper.removeClass(&quot;ui-draggable-dragging&quot;);if(this.helper[0]!=this.element[0]&amp;&amp;!this.cancelHelperRemoval){this.helper.remove()}this.helper=null;this.cancelHelperRemoval=false},_trigger:function(a,f,e){e=e||this._uiHash();b.ui.plugin.call(this,a,[f,e]);if(a==&quot;drag&quot;){this.positionAbs=this._convertPositionTo(&quot;absolute&quot;)}return b.widget.prototype._trigger.call(this,a,f,e)},plugins:{},_uiHash:function(a){return{helper:this.helper,position:this.position,absolutePosition:this.positionAbs,offset:this.positionAbs}}}));b.extend(b.ui.draggable,{version:&quot;1.7.2&quot;,eventPrefix:&quot;drag&quot;,defaults:{addClasses:true,appendTo:&quot;parent&quot;,axis:false,cancel:&quot;:input,option&quot;,connectToSortable:false,containment:false,cursor:&quot;auto&quot;,cursorAt:false,delay:0,distance:1,grid:false,handle:false,helper:&quot;original&quot;,iframeFix:false,opacity:false,refreshPositions:false,revert:false,revertDuration:500,scope:&quot;default&quot;,scroll:true,scrollSensitivity:20,scrollSpeed:20,snap:false,snapMode:&quot;both&quot;,snapTolerance:20,stack:false,zIndex:false}});b.ui.plugin.add(&quot;draggable&quot;,&quot;connectToSortable&quot;,{start:function(j,h){var i=b(this).data(&quot;draggable&quot;),g=i.options,a=b.extend({},h,{item:i.element});i.sortables=[];b(g.connectToSortable).each(function(){var c=b.data(this,&quot;sortable&quot;);if(c&amp;&amp;!c.options.disabled){i.sortables.push({instance:c,shouldRevert:c.options.revert});c._refreshItems();c._trigger(&quot;activate&quot;,j,a)}})},stop:function(h,f){var g=b(this).data(&quot;draggable&quot;),a=b.extend({},f,{item:g.element});b.each(g.sortables,function(){if(this.instance.isOver){this.instance.isOver=0;g.cancelHelperRemoval=true;this.instance.cancelHelperRemoval=false;if(this.shouldRevert){this.instance.options.revert=true}this.instance._mouseStop(h);this.instance.options.helper=this.instance.options._helper;if(g.options.helper==&quot;original&quot;){this.instance.currentItem.css({top:&quot;auto&quot;,left:&quot;auto&quot;})}}else{this.instance.cancelHelperRemoval=false;this.instance._trigger(&quot;deactivate&quot;,h,a)}})},drag:function(j,g){var h=b(this).data(&quot;draggable&quot;),a=this;var i=function(r){var d=this.offset.click.top,e=this.offset.click.left;var t=this.positionAbs.top,o=this.positionAbs.left;var q=r.height,f=r.width;var c=r.top,s=r.left;return b.ui.isOver(t+d,o+e,c,s,q,f)};b.each(h.sortables,function(c){this.instance.positionAbs=h.positionAbs;this.instance.helperProportions=h.helperProportions;this.instance.offset.click=h.offset.click;if(this.instance._intersectsWith(this.instance.containerCache)){if(!this.instance.isOver){this.instance.isOver=1;this.instance.currentItem=b(a).clone().appendTo(this.instance.element).data(&quot;sortable-item&quot;,true);this.instance.options._helper=this.instance.options.helper;this.instance.options.helper=function(){return g.helper[0]};j.target=this.instance.currentItem[0];this.instance._mouseCapture(j,true);this.instance._mouseStart(j,true,true);this.instance.offset.click.top=h.offset.click.top;this.instance.offset.click.left=h.offset.click.left;this.instance.offset.parent.left-=h.offset.parent.left-this.instance.offset.parent.left;this.instance.offset.parent.top-=h.offset.parent.top-this.instance.offset.parent.top;h._trigger(&quot;toSortable&quot;,j);h.dropped=this.instance.element;h.currentItem=h.element;this.instance.fromOutside=h}if(this.instance.currentItem){this.instance._mouseDrag(j)}}else{if(this.instance.isOver){this.instance.isOver=0;this.instance.cancelHelperRemoval=true;this.instance.options.revert=false;this.instance._trigger(&quot;out&quot;,j,this.instance._uiHash(this.instance));this.instance._mouseStop(j,true);this.instance.options.helper=this.instance.options._helper;this.instance.currentItem.remove();if(this.instance.placeholder){this.instance.placeholder.remove()}h._trigger(&quot;fromSortable&quot;,j);h.dropped=false}}})}});b.ui.plugin.add(&quot;draggable&quot;,&quot;cursor&quot;,{start:function(h,g){var a=b(&quot;body&quot;),f=b(this).data(&quot;draggable&quot;).options;if(a.css(&quot;cursor&quot;)){f._cursor=a.css(&quot;cursor&quot;)}a.css(&quot;cursor&quot;,f.cursor)},stop:function(a,f){var e=b(this).data(&quot;draggable&quot;).options;if(e._cursor){b(&quot;body&quot;).css(&quot;cursor&quot;,e._cursor)}}});b.ui.plugin.add(&quot;draggable&quot;,&quot;iframeFix&quot;,{start:function(a,f){var e=b(this).data(&quot;draggable&quot;).options;b(e.iframeFix===true?&quot;iframe&quot;:e.iframeFix).each(function(){b('&lt;div class=&quot;ui-draggable-iframeFix&quot; style=&quot;background: #fff;&quot;&gt;&lt;/div&gt;').css({width:this.offsetWidth+&quot;px&quot;,height:this.offsetHeight+&quot;px&quot;,position:&quot;absolute&quot;,opacity:&quot;0.001&quot;,zIndex:1000}).css(b(this).offset()).appendTo(&quot;body&quot;)})},stop:function(a,d){b(&quot;div.ui-draggable-iframeFix&quot;).each(function(){this.parentNode.removeChild(this)})}});b.ui.plugin.add(&quot;draggable&quot;,&quot;opacity&quot;,{start:function(h,g){var a=b(g.helper),f=b(this).data(&quot;draggable&quot;).options;if(a.css(&quot;opacity&quot;)){f._opacity=a.css(&quot;opacity&quot;)}a.css(&quot;opacity&quot;,f.opacity)},stop:function(a,f){var e=b(this).data(&quot;draggable&quot;).options;if(e._opacity){b(f.helper).css(&quot;opacity&quot;,e._opacity)}}});b.ui.plugin.add(&quot;draggable&quot;,&quot;scroll&quot;,{start:function(f,e){var a=b(this).data(&quot;draggable&quot;);if(a.scrollParent[0]!=document&amp;&amp;a.scrollParent[0].tagName!=&quot;HTML&quot;){a.overflowOffset=a.scrollParent.offset()}},drag:function(i,h){var j=b(this).data(&quot;draggable&quot;),g=j.options,a=false;if(j.scrollParent[0]!=document&amp;&amp;j.scrollParent[0].tagName!=&quot;HTML&quot;){if(!g.axis||g.axis!=&quot;x&quot;){if((j.overflowOffset.top+j.scrollParent[0].offsetHeight)-i.pageY&lt;g.scrollSensitivity){j.scrollParent[0].scrollTop=a=j.scrollParent[0].scrollTop+g.scrollSpeed}else{if(i.pageY-j.overflowOffset.top&lt;g.scrollSensitivity){j.scrollParent[0].scrollTop=a=j.scrollParent[0].scrollTop-g.scrollSpeed}}}if(!g.axis||g.axis!=&quot;y&quot;){if((j.overflowOffset.left+j.scrollParent[0].offsetWidth)-i.pageX&lt;g.scrollSensitivity){j.scrollParent[0].scrollLeft=a=j.scrollParent[0].scrollLeft+g.scrollSpeed}else{if(i.pageX-j.overflowOffset.left&lt;g.scrollSensitivity){j.scrollParent[0].scrollLeft=a=j.scrollParent[0].scrollLeft-g.scrollSpeed}}}}else{if(!g.axis||g.axis!=&quot;x&quot;){if(i.pageY-b(document).scrollTop()&lt;g.scrollSensitivity){a=b(document).scrollTop(b(document).scrollTop()-g.scrollSpeed)}else{if(b(window).height()-(i.pageY-b(document).scrollTop())&lt;g.scrollSensitivity){a=b(document).scrollTop(b(document).scrollTop()+g.scrollSpeed)}}}if(!g.axis||g.axis!=&quot;y&quot;){if(i.pageX-b(document).scrollLeft()&lt;g.scrollSensitivity){a=b(document).scrollLeft(b(document).scrollLeft()-g.scrollSpeed)}else{if(b(window).width()-(i.pageX-b(document).scrollLeft())&lt;g.scrollSensitivity){a=b(document).scrollLeft(b(document).scrollLeft()+g.scrollSpeed)}}}}if(a!==false&amp;&amp;b.ui.ddmanager&amp;&amp;!g.dropBehaviour){b.ui.ddmanager.prepareOffsets(j,i)}}});b.ui.plugin.add(&quot;draggable&quot;,&quot;snap&quot;,{start:function(h,g){var a=b(this).data(&quot;draggable&quot;),f=a.options;a.snapElements=[];b(f.snap.constructor!=String?(f.snap.items||&quot;:data(draggable)&quot;):f.snap).each(function(){var c=b(this);var d=c.offset();if(this!=a.element[0]){a.snapElements.push({item:this,width:c.outerWidth(),height:c.outerHeight(),top:d.top,left:d.left})}})},drag:function(r,D){var J=b(this).data(&quot;draggable&quot;),B=J.options;var d=B.snapTolerance;var i=D.offset.left,l=i+J.helperProportions.width,K=D.offset.top,L=K+J.helperProportions.height;for(var o=J.snapElements.length-1;o&gt;=0;o--){var t=J.snapElements[o].left,E=t+J.snapElements[o].width,F=J.snapElements[o].top,C=F+J.snapElements[o].height;if(!((t-d&lt;i&amp;&amp;i&lt;E+d&amp;&amp;F-d&lt;K&amp;&amp;K&lt;C+d)||(t-d&lt;i&amp;&amp;i&lt;E+d&amp;&amp;F-d&lt;L&amp;&amp;L&lt;C+d)||(t-d&lt;l&amp;&amp;l&lt;E+d&amp;&amp;F-d&lt;K&amp;&amp;K&lt;C+d)||(t-d&lt;l&amp;&amp;l&lt;E+d&amp;&amp;F-d&lt;L&amp;&amp;L&lt;C+d))){if(J.snapElements[o].snapping){(J.options.snap.release&amp;&amp;J.options.snap.release.call(J.element,r,b.extend(J._uiHash(),{snapItem:J.snapElements[o].item})))}J.snapElements[o].snapping=false;continue}if(B.snapMode!=&quot;inner&quot;){var M=Math.abs(F-L)&lt;=d;var a=Math.abs(C-K)&lt;=d;var H=Math.abs(t-l)&lt;=d;var G=Math.abs(E-i)&lt;=d;if(M){D.position.top=J._convertPositionTo(&quot;relative&quot;,{top:F-J.helperProportions.height,left:0}).top-J.margins.top}if(a){D.position.top=J._convertPositionTo(&quot;relative&quot;,{top:C,left:0}).top-J.margins.top}if(H){D.position.left=J._convertPositionTo(&quot;relative&quot;,{top:0,left:t-J.helperProportions.width}).left-J.margins.left}if(G){D.position.left=J._convertPositionTo(&quot;relative&quot;,{top:0,left:E}).left-J.margins.left}}var I=(M||a||H||G);if(B.snapMode!=&quot;outer&quot;){var M=Math.abs(F-K)&lt;=d;var a=Math.abs(C-L)&lt;=d;var H=Math.abs(t-i)&lt;=d;var G=Math.abs(E-l)&lt;=d;if(M){D.position.top=J._convertPositionTo(&quot;relative&quot;,{top:F,left:0}).top-J.margins.top}if(a){D.position.top=J._convertPositionTo(&quot;relative&quot;,{top:C-J.helperProportions.height,left:0}).top-J.margins.top}if(H){D.position.left=J._convertPositionTo(&quot;relative&quot;,{top:0,left:t}).left-J.margins.left}if(G){D.position.left=J._convertPositionTo(&quot;relative&quot;,{top:0,left:E-J.helperProportions.width}).left-J.margins.left}}if(!J.snapElements[o].snapping&amp;&amp;(M||a||H||G||I)){(J.options.snap.snap&amp;&amp;J.options.snap.snap.call(J.element,r,b.extend(J._uiHash(),{snapItem:J.snapElements[o].item})))}J.snapElements[o].snapping=(M||a||H||G||I)}}});b.ui.plugin.add(&quot;draggable&quot;,&quot;stack&quot;,{start:function(a,h){var f=b(this).data(&quot;draggable&quot;).options;var g=b.makeArray(b(f.stack.group)).sort(function(c,d){return(parseInt(b(c).css(&quot;zIndex&quot;),10)||f.stack.min)-(parseInt(b(d).css(&quot;zIndex&quot;),10)||f.stack.min)});b(g).each(function(c){this.style.zIndex=f.stack.min+c});this[0].style.zIndex=f.stack.min+g.length}});b.ui.plugin.add(&quot;draggable&quot;,&quot;zIndex&quot;,{start:function(h,g){var a=b(g.helper),f=b(this).data(&quot;draggable&quot;).options;if(a.css(&quot;zIndex&quot;)){f._zIndex=a.css(&quot;zIndex&quot;)}a.css(&quot;zIndex&quot;,f.zIndex)},stop:function(a,f){var e=b(this).data(&quot;draggable&quot;).options;if(e._zIndex){b(f.helper).css(&quot;zIndex&quot;,e._zIndex)}}})})(jQuery);(function(b){b.widget(&quot;ui.droppable&quot;,{_init:function(){var d=this.options,a=d.accept;this.isover=0;this.isout=1;this.options.accept=this.options.accept&amp;&amp;b.isFunction(this.options.accept)?this.options.accept:function(c){return c.is(a)};this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight};b.ui.ddmanager.droppables[this.options.scope]=b.ui.ddmanager.droppables[this.options.scope]||[];b.ui.ddmanager.droppables[this.options.scope].push(this);(this.options.addClasses&amp;&amp;this.element.addClass(&quot;ui-droppable&quot;))},destroy:function(){var a=b.ui.ddmanager.droppables[this.options.scope];for(var d=0;d&lt;a.length;d++){if(a[d]==this){a.splice(d,1)}}this.element.removeClass(&quot;ui-droppable ui-droppable-disabled&quot;).removeData(&quot;droppable&quot;).unbind(&quot;.droppable&quot;)},_setData:function(a,d){if(a==&quot;accept&quot;){this.options.accept=d&amp;&amp;b.isFunction(d)?d:function(c){return c.is(d)}}else{b.widget.prototype._setData.apply(this,arguments)}},_activate:function(d){var a=b.ui.ddmanager.current;if(this.options.activeClass){this.element.addClass(this.options.activeClass)}(a&amp;&amp;this._trigger(&quot;activate&quot;,d,this.ui(a)))},_deactivate:function(d){var a=b.ui.ddmanager.current;if(this.options.activeClass){this.element.removeClass(this.options.activeClass)}(a&amp;&amp;this._trigger(&quot;deactivate&quot;,d,this.ui(a)))},_over:function(d){var a=b.ui.ddmanager.current;if(!a||(a.currentItem||a.element)[0]==this.element[0]){return}if(this.options.accept.call(this.element[0],(a.currentItem||a.element))){if(this.options.hoverClass){this.element.addClass(this.options.hoverClass)}this._trigger(&quot;over&quot;,d,this.ui(a))}},_out:function(d){var a=b.ui.ddmanager.current;if(!a||(a.currentItem||a.element)[0]==this.element[0]){return}if(this.options.accept.call(this.element[0],(a.currentItem||a.element))){if(this.options.hoverClass){this.element.removeClass(this.options.hoverClass)}this._trigger(&quot;out&quot;,d,this.ui(a))}},_drop:function(h,g){var a=g||b.ui.ddmanager.current;if(!a||(a.currentItem||a.element)[0]==this.element[0]){return false}var f=false;this.element.find(&quot;:data(droppable)&quot;).not(&quot;.ui-draggable-dragging&quot;).each(function(){var c=b.data(this,&quot;droppable&quot;);if(c.options.greedy&amp;&amp;b.ui.intersect(a,b.extend(c,{offset:c.element.offset()}),c.options.tolerance)){f=true;return false}});if(f){return false}if(this.options.accept.call(this.element[0],(a.currentItem||a.element))){if(this.options.activeClass){this.element.removeClass(this.options.activeClass)}if(this.options.hoverClass){this.element.removeClass(this.options.hoverClass)}this._trigger(&quot;drop&quot;,h,this.ui(a));return this.element}return false},ui:function(a){return{draggable:(a.currentItem||a.element),helper:a.helper,position:a.position,absolutePosition:a.positionAbs,offset:a.positionAbs}}});b.extend(b.ui.droppable,{version:&quot;1.7.2&quot;,eventPrefix:&quot;drop&quot;,defaults:{accept:&quot;*&quot;,activeClass:false,addClasses:true,greedy:false,hoverClass:false,scope:&quot;default&quot;,tolerance:&quot;intersect&quot;}});b.ui.intersect=function(a,v,r){if(!v.offset){return false}var A=(a.positionAbs||a.position.absolute).left,B=A+a.helperProportions.width,s=(a.positionAbs||a.position.absolute).top,t=s+a.helperProportions.height;var y=v.offset.left,C=y+v.proportions.width,l=v.offset.top,u=l+v.proportions.height;switch(r){case&quot;fit&quot;:return(y&lt;A&amp;&amp;B&lt;C&amp;&amp;l&lt;s&amp;&amp;t&lt;u);break;case&quot;intersect&quot;:return(y&lt;A+(a.helperProportions.width/2)&amp;&amp;B-(a.helperProportions.width/2)&lt;C&amp;&amp;l&lt;s+(a.helperProportions.height/2)&amp;&amp;t-(a.helperProportions.height/2)&lt;u);break;case&quot;pointer&quot;:var x=((a.positionAbs||a.position.absolute).left+(a.clickOffset||a.offset.click).left),w=((a.positionAbs||a.position.absolute).top+(a.clickOffset||a.offset.click).top),z=b.ui.isOver(w,x,l,y,v.proportions.height,v.proportions.width);return z;break;case&quot;touch&quot;:return((s&gt;=l&amp;&amp;s&lt;=u)||(t&gt;=l&amp;&amp;t&lt;=u)||(s&lt;l&amp;&amp;t&gt;u))&amp;&amp;((A&gt;=y&amp;&amp;A&lt;=C)||(B&gt;=y&amp;&amp;B&lt;=C)||(A&lt;y&amp;&amp;B&gt;C));break;default:return false;break}};b.ui.ddmanager={current:null,droppables:{&quot;default&quot;:[]},prepareOffsets:function(l,j){var a=b.ui.ddmanager.droppables[l.options.scope];var k=j?j.type:null;var i=(l.currentItem||l.element).find(&quot;:data(droppable)&quot;).andSelf();droppablesLoop:for(var m=0;m&lt;a.length;m++){if(a[m].options.disabled||(l&amp;&amp;!a[m].options.accept.call(a[m].element[0],(l.currentItem||l.element)))){continue}for(var n=0;n&lt;i.length;n++){if(i[n]==a[m].element[0]){a[m].proportions.height=0;continue droppablesLoop}}a[m].visible=a[m].element.css(&quot;display&quot;)!=&quot;none&quot;;if(!a[m].visible){continue}a[m].offset=a[m].element.offset();a[m].proportions={width:a[m].element[0].offsetWidth,height:a[m].element[0].offsetHeight};if(k==&quot;mousedown&quot;){a[m]._activate.call(a[m],j)}}},drop:function(a,f){var e=false;b.each(b.ui.ddmanager.droppables[a.options.scope],function(){if(!this.options){return}if(!this.options.disabled&amp;&amp;this.visible&amp;&amp;b.ui.intersect(a,this,this.options.tolerance)){e=this._drop.call(this,f)}if(!this.options.disabled&amp;&amp;this.visible&amp;&amp;this.options.accept.call(this.element[0],(a.currentItem||a.element))){this.isout=1;this.isover=0;this._deactivate.call(this,f)}});return e},drag:function(a,d){if(a.options.refreshPositions){b.ui.ddmanager.prepareOffsets(a,d)}b.each(b.ui.ddmanager.droppables[a.options.scope],function(){if(this.options.disabled||this.greedyChild||!this.visible){return}var i=b.ui.intersect(a,this,this.options.tolerance);var c=!i&amp;&amp;this.isover==1?&quot;isout&quot;:(i&amp;&amp;this.isover==0?&quot;isover&quot;:null);if(!c){return}var h;if(this.options.greedy){var j=this.element.parents(&quot;:data(droppable):eq(0)&quot;);if(j.length){h=b.data(j[0],&quot;droppable&quot;);h.greedyChild=(c==&quot;isover&quot;?1:0)}}if(h&amp;&amp;c==&quot;isover&quot;){h.isover=0;h.isout=1;h._out.call(h,d)}this[c]=1;this[c==&quot;isout&quot;?&quot;isover&quot;:&quot;isout&quot;]=0;this[c==&quot;isover&quot;?&quot;_over&quot;:&quot;_out&quot;].call(this,d);if(h&amp;&amp;c==&quot;isout&quot;){h.isout=0;h.isover=1;h._over.call(h,d)}})}}})(jQuery);(function(b){b.widget(&quot;ui.sortable&quot;,b.extend({},b.ui.mouse,{_init:function(){var a=this.options;this.containerCache={};this.element.addClass(&quot;ui-sortable&quot;);this.refresh();this.floating=this.items.length?(/left|right/).test(this.items[0].item.css(&quot;float&quot;)):false;this.offset=this.element.offset();this._mouseInit()},destroy:function(){this.element.removeClass(&quot;ui-sortable ui-sortable-disabled&quot;).removeData(&quot;sortable&quot;).unbind(&quot;.sortable&quot;);this._mouseDestroy();for(var a=this.items.length-1;a&gt;=0;a--){this.items[a].item.removeData(&quot;sortable-item&quot;)}},_mouseCapture:function(j,i){if(this.reverting){return false}if(this.options.disabled||this.options.type==&quot;static&quot;){return false}this._refreshItems(j);var k=null,l=this,a=b(j.target).parents().each(function(){if(b.data(this,&quot;sortable-item&quot;)==l){k=b(this);return false}});if(b.data(j.target,&quot;sortable-item&quot;)==l){k=b(j.target)}if(!k){return false}if(this.options.handle&amp;&amp;!i){var h=false;b(this.options.handle,k).find(&quot;*&quot;).andSelf().each(function(){if(this==j.target){h=true}});if(!h){return false}}this.currentItem=k;this._removeCurrentsFromItems();return true},_mouseStart:function(j,i,a){var h=this.options,l=this;this.currentContainer=this;this.refreshPositions();this.helper=this._createHelper(j);this._cacheHelperProportions();this._cacheMargins();this.scrollParent=this.helper.scrollParent();this.offset=this.currentItem.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};this.helper.css(&quot;position&quot;,&quot;absolute&quot;);this.cssPosition=this.helper.css(&quot;position&quot;);b.extend(this.offset,{click:{left:j.pageX-this.offset.left,top:j.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this._generatePosition(j);this.originalPageX=j.pageX;this.originalPageY=j.pageY;if(h.cursorAt){this._adjustOffsetFromHelper(h.cursorAt)}this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]};if(this.helper[0]!=this.currentItem[0]){this.currentItem.hide()}this._createPlaceholder();if(h.containment){this._setContainment()}if(h.cursor){if(b(&quot;body&quot;).css(&quot;cursor&quot;)){this._storedCursor=b(&quot;body&quot;).css(&quot;cursor&quot;)}b(&quot;body&quot;).css(&quot;cursor&quot;,h.cursor)}if(h.opacity){if(this.helper.css(&quot;opacity&quot;)){this._storedOpacity=this.helper.css(&quot;opacity&quot;)}this.helper.css(&quot;opacity&quot;,h.opacity)}if(h.zIndex){if(this.helper.css(&quot;zIndex&quot;)){this._storedZIndex=this.helper.css(&quot;zIndex&quot;)}this.helper.css(&quot;zIndex&quot;,h.zIndex)}if(this.scrollParent[0]!=document&amp;&amp;this.scrollParent[0].tagName!=&quot;HTML&quot;){this.overflowOffset=this.scrollParent.offset()}this._trigger(&quot;start&quot;,j,this._uiHash());if(!this._preserveHelperProportions){this._cacheHelperProportions()}if(!a){for(var k=this.containers.length-1;k&gt;=0;k--){this.containers[k]._trigger(&quot;activate&quot;,j,l._uiHash(this))}}if(b.ui.ddmanager){b.ui.ddmanager.current=this}if(b.ui.ddmanager&amp;&amp;!h.dropBehaviour){b.ui.ddmanager.prepareOffsets(this,j)}this.dragging=true;this.helper.addClass(&quot;ui-sortable-helper&quot;);this._mouseDrag(j);return true},_mouseDrag:function(k){this.position=this._generatePosition(k);this.positionAbs=this._convertPositionTo(&quot;absolute&quot;);if(!this.lastPositionAbs){this.lastPositionAbs=this.positionAbs}if(this.options.scroll){var j=this.options,a=false;if(this.scrollParent[0]!=document&amp;&amp;this.scrollParent[0].tagName!=&quot;HTML&quot;){if((this.overflowOffset.top+this.scrollParent[0].offsetHeight)-k.pageY&lt;j.scrollSensitivity){this.scrollParent[0].scrollTop=a=this.scrollParent[0].scrollTop+j.scrollSpeed}else{if(k.pageY-this.overflowOffset.top&lt;j.scrollSensitivity){this.scrollParent[0].scrollTop=a=this.scrollParent[0].scrollTop-j.scrollSpeed}}if((this.overflowOffset.left+this.scrollParent[0].offsetWidth)-k.pageX&lt;j.scrollSensitivity){this.scrollParent[0].scrollLeft=a=this.scrollParent[0].scrollLeft+j.scrollSpeed}else{if(k.pageX-this.overflowOffset.left&lt;j.scrollSensitivity){this.scrollParent[0].scrollLeft=a=this.scrollParent[0].scrollLeft-j.scrollSpeed}}}else{if(k.pageY-b(document).scrollTop()&lt;j.scrollSensitivity){a=b(document).scrollTop(b(document).scrollTop()-j.scrollSpeed)}else{if(b(window).height()-(k.pageY-b(document).scrollTop())&lt;j.scrollSensitivity){a=b(document).scrollTop(b(document).scrollTop()+j.scrollSpeed)}}if(k.pageX-b(document).scrollLeft()&lt;j.scrollSensitivity){a=b(document).scrollLeft(b(document).scrollLeft()-j.scrollSpeed)}else{if(b(window).width()-(k.pageX-b(document).scrollLeft())&lt;j.scrollSensitivity){a=b(document).scrollLeft(b(document).scrollLeft()+j.scrollSpeed)}}}if(a!==false&amp;&amp;b.ui.ddmanager&amp;&amp;!j.dropBehaviour){b.ui.ddmanager.prepareOffsets(this,k)}}this.positionAbs=this._convertPositionTo(&quot;absolute&quot;);if(!this.options.axis||this.options.axis!=&quot;y&quot;){this.helper[0].style.left=this.position.left+&quot;px&quot;}if(!this.options.axis||this.options.axis!=&quot;x&quot;){this.helper[0].style.top=this.position.top+&quot;px&quot;}for(var m=this.items.length-1;m&gt;=0;m--){var l=this.items[m],n=l.item[0],i=this._intersectsWithPointer(l);if(!i){continue}if(n!=this.currentItem[0]&amp;&amp;this.placeholder[i==1?&quot;next&quot;:&quot;prev&quot;]()[0]!=n&amp;&amp;!b.ui.contains(this.placeholder[0],n)&amp;&amp;(this.options.type==&quot;semi-dynamic&quot;?!b.ui.contains(this.element[0],n):true)){this.direction=i==1?&quot;down&quot;:&quot;up&quot;;if(this.options.tolerance==&quot;pointer&quot;||this._intersectsWithSides(l)){this._rearrange(k,l)}else{break}this._trigger(&quot;change&quot;,k,this._uiHash());break}}this._contactContainers(k);if(b.ui.ddmanager){b.ui.ddmanager.drag(this,k)}this._trigger(&quot;sort&quot;,k,this._uiHash());this.lastPositionAbs=this.positionAbs;return false},_mouseStop:function(h,g){if(!h){return}if(b.ui.ddmanager&amp;&amp;!this.options.dropBehaviour){b.ui.ddmanager.drop(this,h)}if(this.options.revert){var a=this;var f=a.placeholder.offset();a.reverting=true;b(this.helper).animate({left:f.left-this.offset.parent.left-a.margins.left+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft),top:f.top-this.offset.parent.top-a.margins.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)},parseInt(this.options.revert,10)||500,function(){a._clear(h)})}else{this._clear(h,g)}return false},cancel:function(){var a=this;if(this.dragging){this._mouseUp();if(this.options.helper==&quot;original&quot;){this.currentItem.css(this._storedCSS).removeClass(&quot;ui-sortable-helper&quot;)}else{this.currentItem.show()}for(var d=this.containers.length-1;d&gt;=0;d--){this.containers[d]._trigger(&quot;deactivate&quot;,null,a._uiHash(this));if(this.containers[d].containerCache.over){this.containers[d]._trigger(&quot;out&quot;,null,a._uiHash(this));this.containers[d].containerCache.over=0}}}if(this.placeholder[0].parentNode){this.placeholder[0].parentNode.removeChild(this.placeholder[0])}if(this.options.helper!=&quot;original&quot;&amp;&amp;this.helper&amp;&amp;this.helper[0].parentNode){this.helper.remove()}b.extend(this,{helper:null,dragging:false,reverting:false,_noFinalSort:null});if(this.domPosition.prev){b(this.domPosition.prev).after(this.currentItem)}else{b(this.domPosition.parent).prepend(this.currentItem)}return true},serialize:function(e){var a=this._getItemsAsjQuery(e&amp;&amp;e.connected);var f=[];e=e||{};b(a).each(function(){var c=(b(e.item||this).attr(e.attribute||&quot;id&quot;)||&quot;&quot;).match(e.expression||(/(.+)[-=_](.+)/));if(c){f.push((e.key||c[1]+&quot;[]&quot;)+&quot;=&quot;+(e.key&amp;&amp;e.expression?c[1]:c[2]))}});return f.join(&quot;&amp;&quot;)},toArray:function(e){var a=this._getItemsAsjQuery(e&amp;&amp;e.connected);var f=[];e=e||{};a.each(function(){f.push(b(e.item||this).attr(e.attribute||&quot;id&quot;)||&quot;&quot;)});return f},_intersectsWith:function(p){var w=this.positionAbs.left,x=w+this.helperProportions.width,q=this.positionAbs.top,r=q+this.helperProportions.height;var v=p.left,y=v+p.width,l=p.top,s=l+p.height;var a=this.offset.click.top,t=this.offset.click.left;var u=(q+a)&gt;l&amp;&amp;(q+a)&lt;s&amp;&amp;(w+t)&gt;v&amp;&amp;(w+t)&lt;y;if(this.options.tolerance==&quot;pointer&quot;||this.options.forcePointerForContainers||(this.options.tolerance!=&quot;pointer&quot;&amp;&amp;this.helperProportions[this.floating?&quot;width&quot;:&quot;height&quot;]&gt;p[this.floating?&quot;width&quot;:&quot;height&quot;])){return u}else{return(v&lt;w+(this.helperProportions.width/2)&amp;&amp;x-(this.helperProportions.width/2)&lt;y&amp;&amp;l&lt;q+(this.helperProportions.height/2)&amp;&amp;r-(this.helperProportions.height/2)&lt;s)}},_intersectsWithPointer:function(k){var j=b.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,k.top,k.height),l=b.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,k.left,k.width),h=j&amp;&amp;l,a=this._getDragVerticalDirection(),i=this._getDragHorizontalDirection();if(!h){return false}return this.floating?(((i&amp;&amp;i==&quot;right&quot;)||a==&quot;down&quot;)?2:1):(a&amp;&amp;(a==&quot;down&quot;?2:1))},_intersectsWithSides:function(h){var j=b.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,h.top+(h.height/2),h.height),i=b.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,h.left+(h.width/2),h.width),a=this._getDragVerticalDirection(),g=this._getDragHorizontalDirection();if(this.floating&amp;&amp;g){return((g==&quot;right&quot;&amp;&amp;i)||(g==&quot;left&quot;&amp;&amp;!i))}else{return a&amp;&amp;((a==&quot;down&quot;&amp;&amp;j)||(a==&quot;up&quot;&amp;&amp;!j))}},_getDragVerticalDirection:function(){var a=this.positionAbs.top-this.lastPositionAbs.top;return a!=0&amp;&amp;(a&gt;0?&quot;down&quot;:&quot;up&quot;)},_getDragHorizontalDirection:function(){var a=this.positionAbs.left-this.lastPositionAbs.left;return a!=0&amp;&amp;(a&gt;0?&quot;right&quot;:&quot;left&quot;)},refresh:function(a){this._refreshItems(a);this.refreshPositions()},_connectWith:function(){var a=this.options;return a.connectWith.constructor==String?[a.connectWith]:a.connectWith},_getItemsAsjQuery:function(r){var a=this;var m=[];var o=[];var j=this._connectWith();if(j&amp;&amp;r){for(var p=j.length-1;p&gt;=0;p--){var i=b(j[p]);for(var q=i.length-1;q&gt;=0;q--){var n=b.data(i[q],&quot;sortable&quot;);if(n&amp;&amp;n!=this&amp;&amp;!n.options.disabled){o.push([b.isFunction(n.options.items)?n.options.items.call(n.element):b(n.options.items,n.element).not(&quot;.ui-sortable-helper&quot;),n])}}}}o.push([b.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):b(this.options.items,this.element).not(&quot;.ui-sortable-helper&quot;),this]);for(var p=o.length-1;p&gt;=0;p--){o[p][0].each(function(){m.push(this)})}return b(m)},_removeCurrentsFromItems:function(){var e=this.currentItem.find(&quot;:data(sortable-item)&quot;);for(var f=0;f&lt;this.items.length;f++){for(var a=0;a&lt;e.length;a++){if(e[a]==this.items[f].item[0]){this.items.splice(f,1)}}}},_refreshItems:function(z){this.items=[];this.containers=[this];var t=this.items;var a=this;var v=[[b.isFunction(this.options.items)?this.options.items.call(this.element[0],z,{item:this.currentItem}):b(this.options.items,this.element),this]];var r=this._connectWith();if(r){for(var w=r.length-1;w&gt;=0;w--){var q=b(r[w]);for(var x=q.length-1;x&gt;=0;x--){var u=b.data(q[x],&quot;sortable&quot;);if(u&amp;&amp;u!=this&amp;&amp;!u.options.disabled){v.push([b.isFunction(u.options.items)?u.options.items.call(u.element[0],z,{item:this.currentItem}):b(u.options.items,u.element),u]);this.containers.push(u)}}}}for(var w=v.length-1;w&gt;=0;w--){var s=v[w][1];var y=v[w][0];for(var x=0,j=y.length;x&lt;j;x++){var i=b(y[x]);i.data(&quot;sortable-item&quot;,s);t.push({item:i,instance:s,width:0,height:0,left:0,top:0})}}},refreshPositions:function(a){if(this.offsetParent&amp;&amp;this.helper){this.offset.parent=this._getParentOffset()}for(var i=this.items.length-1;i&gt;=0;i--){var h=this.items[i];if(h.instance!=this.currentContainer&amp;&amp;this.currentContainer&amp;&amp;h.item[0]!=this.currentItem[0]){continue}var j=this.options.toleranceElement?b(this.options.toleranceElement,h.item):h.item;if(!a){h.width=j.outerWidth();h.height=j.outerHeight()}var g=j.offset();h.left=g.left;h.top=g.top}if(this.options.custom&amp;&amp;this.options.custom.refreshContainers){this.options.custom.refreshContainers.call(this)}else{for(var i=this.containers.length-1;i&gt;=0;i--){var g=this.containers[i].element.offset();this.containers[i].containerCache.left=g.left;this.containers[i].containerCache.top=g.top;this.containers[i].containerCache.width=this.containers[i].element.outerWidth();this.containers[i].containerCache.height=this.containers[i].element.outerHeight()}}},_createPlaceholder:function(g){var a=g||this,f=a.options;if(!f.placeholder||f.placeholder.constructor==String){var h=f.placeholder;f.placeholder={element:function(){var c=b(document.createElement(a.currentItem[0].nodeName)).addClass(h||a.currentItem[0].className+&quot; ui-sortable-placeholder&quot;).removeClass(&quot;ui-sortable-helper&quot;)[0];if(!h){c.style.visibility=&quot;hidden&quot;}return c},update:function(d,c){if(h&amp;&amp;!f.forcePlaceholderSize){return}if(!c.height()){c.height(a.currentItem.innerHeight()-parseInt(a.currentItem.css(&quot;paddingTop&quot;)||0,10)-parseInt(a.currentItem.css(&quot;paddingBottom&quot;)||0,10))}if(!c.width()){c.width(a.currentItem.innerWidth()-parseInt(a.currentItem.css(&quot;paddingLeft&quot;)||0,10)-parseInt(a.currentItem.css(&quot;paddingRight&quot;)||0,10))}}}}a.placeholder=b(f.placeholder.element.call(a.element,a.currentItem));a.currentItem.after(a.placeholder);f.placeholder.update(a,a.placeholder)},_contactContainers:function(m){for(var n=this.containers.length-1;n&gt;=0;n--){if(this._intersectsWith(this.containers[n].containerCache)){if(!this.containers[n].containerCache.over){if(this.currentContainer!=this.containers[n]){var i=10000;var j=null;var l=this.positionAbs[this.containers[n].floating?&quot;left&quot;:&quot;top&quot;];for(var a=this.items.length-1;a&gt;=0;a--){if(!b.ui.contains(this.containers[n].element[0],this.items[a].item[0])){continue}var k=this.items[a][this.containers[n].floating?&quot;left&quot;:&quot;top&quot;];if(Math.abs(k-l)&lt;i){i=Math.abs(k-l);j=this.items[a]}}if(!j&amp;&amp;!this.options.dropOnEmpty){continue}this.currentContainer=this.containers[n];j?this._rearrange(m,j,null,true):this._rearrange(m,null,this.containers[n].element,true);this._trigger(&quot;change&quot;,m,this._uiHash());this.containers[n]._trigger(&quot;change&quot;,m,this._uiHash(this));this.options.placeholder.update(this.currentContainer,this.placeholder)}this.containers[n]._trigger(&quot;over&quot;,m,this._uiHash(this));this.containers[n].containerCache.over=1}}else{if(this.containers[n].containerCache.over){this.containers[n]._trigger(&quot;out&quot;,m,this._uiHash(this));this.containers[n].containerCache.over=0}}}},_createHelper:function(f){var e=this.options;var a=b.isFunction(e.helper)?b(e.helper.apply(this.element[0],[f,this.currentItem])):(e.helper==&quot;clone&quot;?this.currentItem.clone():this.currentItem);if(!a.parents(&quot;body&quot;).length){b(e.appendTo!=&quot;parent&quot;?e.appendTo:this.currentItem[0].parentNode)[0].appendChild(a[0])}if(a[0]==this.currentItem[0]){this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css(&quot;position&quot;),top:this.currentItem.css(&quot;top&quot;),left:this.currentItem.css(&quot;left&quot;)}}if(a[0].style.width==&quot;&quot;||e.forceHelperSize){a.width(this.currentItem.width())}if(a[0].style.height==&quot;&quot;||e.forceHelperSize){a.height(this.currentItem.height())}return a},_adjustOffsetFromHelper:function(a){if(a.left!=undefined){this.offset.click.left=a.left+this.margins.left}if(a.right!=undefined){this.offset.click.left=this.helperProportions.width-a.right+this.margins.left}if(a.top!=undefined){this.offset.click.top=a.top+this.margins.top}if(a.bottom!=undefined){this.offset.click.top=this.helperProportions.height-a.bottom+this.margins.top}},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var a=this.offsetParent.offset();if(this.cssPosition==&quot;absolute&quot;&amp;&amp;this.scrollParent[0]!=document&amp;&amp;b.ui.contains(this.scrollParent[0],this.offsetParent[0])){a.left+=this.scrollParent.scrollLeft();a.top+=this.scrollParent.scrollTop()}if((this.offsetParent[0]==document.body)||(this.offsetParent[0].tagName&amp;&amp;this.offsetParent[0].tagName.toLowerCase()==&quot;html&quot;&amp;&amp;b.browser.msie)){a={top:0,left:0}}return{top:a.top+(parseInt(this.offsetParent.css(&quot;borderTopWidth&quot;),10)||0),left:a.left+(parseInt(this.offsetParent.css(&quot;borderLeftWidth&quot;),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition==&quot;relative&quot;){var a=this.currentItem.position();return{top:a.top-(parseInt(this.helper.css(&quot;top&quot;),10)||0)+this.scrollParent.scrollTop(),left:a.left-(parseInt(this.helper.css(&quot;left&quot;),10)||0)+this.scrollParent.scrollLeft()}}else{return{top:0,left:0}}},_cacheMargins:function(){this.margins={left:(parseInt(this.currentItem.css(&quot;marginLeft&quot;),10)||0),top:(parseInt(this.currentItem.css(&quot;marginTop&quot;),10)||0)}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var f=this.options;if(f.containment==&quot;parent&quot;){f.containment=this.helper[0].parentNode}if(f.containment==&quot;document&quot;||f.containment==&quot;window&quot;){this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,b(f.containment==&quot;document&quot;?document:window).width()-this.helperProportions.width-this.margins.left,(b(f.containment==&quot;document&quot;?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]}if(!(/^(document|window|parent)$/).test(f.containment)){var h=b(f.containment)[0];var g=b(f.containment).offset();var a=(b(h).css(&quot;overflow&quot;)!=&quot;hidden&quot;);this.containment=[g.left+(parseInt(b(h).css(&quot;borderLeftWidth&quot;),10)||0)+(parseInt(b(h).css(&quot;paddingLeft&quot;),10)||0)-this.margins.left,g.top+(parseInt(b(h).css(&quot;borderTopWidth&quot;),10)||0)+(parseInt(b(h).css(&quot;paddingTop&quot;),10)||0)-this.margins.top,g.left+(a?Math.max(h.scrollWidth,h.offsetWidth):h.offsetWidth)-(parseInt(b(h).css(&quot;borderLeftWidth&quot;),10)||0)-(parseInt(b(h).css(&quot;paddingRight&quot;),10)||0)-this.helperProportions.width-this.margins.left,g.top+(a?Math.max(h.scrollHeight,h.offsetHeight):h.offsetHeight)-(parseInt(b(h).css(&quot;borderTopWidth&quot;),10)||0)-(parseInt(b(h).css(&quot;paddingBottom&quot;),10)||0)-this.helperProportions.height-this.margins.top]}},_convertPositionTo:function(j,d){if(!d){d=this.position}var l=j==&quot;absolute&quot;?1:-1;var k=this.options,a=this.cssPosition==&quot;absolute&quot;&amp;&amp;!(this.scrollParent[0]!=document&amp;&amp;b.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,i=(/(html|body)/i).test(a[0].tagName);return{top:(d.top+this.offset.relative.top*l+this.offset.parent.top*l-(b.browser.safari&amp;&amp;this.cssPosition==&quot;fixed&quot;?0:(this.cssPosition==&quot;fixed&quot;?-this.scrollParent.scrollTop():(i?0:a.scrollTop()))*l)),left:(d.left+this.offset.relative.left*l+this.offset.parent.left*l-(b.browser.safari&amp;&amp;this.cssPosition==&quot;fixed&quot;?0:(this.cssPosition==&quot;fixed&quot;?-this.scrollParent.scrollLeft():i?0:a.scrollLeft())*l))}},_generatePosition:function(n){var k=this.options,a=this.cssPosition==&quot;absolute&quot;&amp;&amp;!(this.scrollParent[0]!=document&amp;&amp;b.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,j=(/(html|body)/i).test(a[0].tagName);if(this.cssPosition==&quot;relative&quot;&amp;&amp;!(this.scrollParent[0]!=document&amp;&amp;this.scrollParent[0]!=this.offsetParent[0])){this.offset.relative=this._getRelativeOffset()}var o=n.pageX;var p=n.pageY;if(this.originalPosition){if(this.containment){if(n.pageX-this.offset.click.left&lt;this.containment[0]){o=this.containment[0]+this.offset.click.left}if(n.pageY-this.offset.click.top&lt;this.containment[1]){p=this.containment[1]+this.offset.click.top}if(n.pageX-this.offset.click.left&gt;this.containment[2]){o=this.containment[2]+this.offset.click.left}if(n.pageY-this.offset.click.top&gt;this.containment[3]){p=this.containment[3]+this.offset.click.top}}if(k.grid){var l=this.originalPageY+Math.round((p-this.originalPageY)/k.grid[1])*k.grid[1];p=this.containment?(!(l-this.offset.click.top&lt;this.containment[1]||l-this.offset.click.top&gt;this.containment[3])?l:(!(l-this.offset.click.top&lt;this.containment[1])?l-k.grid[1]:l+k.grid[1])):l;var m=this.originalPageX+Math.round((o-this.originalPageX)/k.grid[0])*k.grid[0];o=this.containment?(!(m-this.offset.click.left&lt;this.containment[0]||m-this.offset.click.left&gt;this.containment[2])?m:(!(m-this.offset.click.left&lt;this.containment[0])?m-k.grid[0]:m+k.grid[0])):m}}return{top:(p-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(b.browser.safari&amp;&amp;this.cssPosition==&quot;fixed&quot;?0:(this.cssPosition==&quot;fixed&quot;?-this.scrollParent.scrollTop():(j?0:a.scrollTop())))),left:(o-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(b.browser.safari&amp;&amp;this.cssPosition==&quot;fixed&quot;?0:(this.cssPosition==&quot;fixed&quot;?-this.scrollParent.scrollLeft():j?0:a.scrollLeft())))}},_rearrange:function(h,i,l,j){l?l[0].appendChild(this.placeholder[0]):i.item[0].parentNode.insertBefore(this.placeholder[0],(this.direction==&quot;down&quot;?i.item[0]:i.item[0].nextSibling));this.counter=this.counter?++this.counter:1;var k=this,a=this.counter;window.setTimeout(function(){if(a==k.counter){k.refreshPositions(!j)}},0)},_clear:function(i,h){this.reverting=false;var g=[],a=this;if(!this._noFinalSort&amp;&amp;this.currentItem[0].parentNode){this.placeholder.before(this.currentItem)}this._noFinalSort=null;if(this.helper[0]==this.currentItem[0]){for(var j in this._storedCSS){if(this._storedCSS[j]==&quot;auto&quot;||this._storedCSS[j]==&quot;static&quot;){this._storedCSS[j]=&quot;&quot;}}this.currentItem.css(this._storedCSS).removeClass(&quot;ui-sortable-helper&quot;)}else{this.currentItem.show()}if(this.fromOutside&amp;&amp;!h){g.push(function(c){this._trigger(&quot;receive&quot;,c,this._uiHash(this.fromOutside))})}if((this.fromOutside||this.domPosition.prev!=this.currentItem.prev().not(&quot;.ui-sortable-helper&quot;)[0]||this.domPosition.parent!=this.currentItem.parent()[0])&amp;&amp;!h){g.push(function(c){this._trigger(&quot;update&quot;,c,this._uiHash())})}if(!b.ui.contains(this.element[0],this.currentItem[0])){if(!h){g.push(function(c){this._trigger(&quot;remove&quot;,c,this._uiHash())})}for(var j=this.containers.length-1;j&gt;=0;j--){if(b.ui.contains(this.containers[j].element[0],this.currentItem[0])&amp;&amp;!h){g.push((function(c){return function(d){c._trigger(&quot;receive&quot;,d,this._uiHash(this))}}).call(this,this.containers[j]));g.push((function(c){return function(d){c._trigger(&quot;update&quot;,d,this._uiHash(this))}}).call(this,this.containers[j]))}}}for(var j=this.containers.length-1;j&gt;=0;j--){if(!h){g.push((function(c){return function(d){c._trigger(&quot;deactivate&quot;,d,this._uiHash(this))}}).call(this,this.containers[j]))}if(this.containers[j].containerCache.over){g.push((function(c){return function(d){c._trigger(&quot;out&quot;,d,this._uiHash(this))}}).call(this,this.containers[j]));this.containers[j].containerCache.over=0}}if(this._storedCursor){b(&quot;body&quot;).css(&quot;cursor&quot;,this._storedCursor)}if(this._storedOpacity){this.helper.css(&quot;opacity&quot;,this._storedOpacity)}if(this._storedZIndex){this.helper.css(&quot;zIndex&quot;,this._storedZIndex==&quot;auto&quot;?&quot;&quot;:this._storedZIndex)}this.dragging=false;if(this.cancelHelperRemoval){if(!h){this._trigger(&quot;beforeStop&quot;,i,this._uiHash());for(var j=0;j&lt;g.length;j++){g[j].call(this,i)}this._trigger(&quot;stop&quot;,i,this._uiHash())}return false}if(!h){this._trigger(&quot;beforeStop&quot;,i,this._uiHash())}this.placeholder[0].parentNode.removeChild(this.placeholder[0]);if(this.helper[0]!=this.currentItem[0]){this.helper.remove()}this.helper=null;if(!h){for(var j=0;j&lt;g.length;j++){g[j].call(this,i)}this._trigger(&quot;stop&quot;,i,this._uiHash())}this.fromOutside=false;return true},_trigger:function(){if(b.widget.prototype._trigger.apply(this,arguments)===false){this.cancel()}},_uiHash:function(d){var a=d||this;return{helper:a.helper,placeholder:a.placeholder||b([]),position:a.position,absolutePosition:a.positionAbs,offset:a.positionAbs,item:a.currentItem,sender:d?d.element:null}}}));b.extend(b.ui.sortable,{getter:&quot;serialize toArray&quot;,version:&quot;1.7.2&quot;,eventPrefix:&quot;sort&quot;,defaults:{appendTo:&quot;parent&quot;,axis:false,cancel:&quot;:input,option&quot;,connectWith:false,containment:false,cursor:&quot;auto&quot;,cursorAt:false,delay:0,distance:1,dropOnEmpty:true,forcePlaceholderSize:false,forceHelperSize:false,grid:false,handle:false,helper:&quot;original&quot;,items:&quot;&gt; *&quot;,opacity:false,placeholder:false,revert:false,scroll:true,scrollSensitivity:20,scrollSpeed:20,scope:&quot;default&quot;,tolerance:&quot;intersect&quot;,zIndex:1000}})})(jQuery);
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkwpadminjscustomnavigationdefaultitemsdevjs"></a>
<div class="addfile"><h4>Added: trunk/wp-admin/js/custom-navigation-default-items.dev.js (0 => 13257)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/js/custom-navigation-default-items.dev.js                                (rev 0)
+++ trunk/wp-admin/js/custom-navigation-default-items.dev.js        2010-02-20 21:57:43 UTC (rev 13257)
</span><span class="lines">@@ -0,0 +1,147 @@
</span><ins>+/**
+ * WordPress Administration Custom Navigation
+ * Interface JQuery functions
+ *
+ * @author Jeffikus &lt;pearce.jp@gmail.com&gt;
+ * @version 1.1.0
+ *
+ * @package WordPress
+ * @subpackage Administration
+ */

+/*
+ * Init Functions
+*/
+$(function() 
+        {
+                //Makes dialog box
+                $(&quot;#dialog-confirm&quot;).dialog({
+                        autoOpen: false,
+                        resizable: false,
+                        height: 210,
+                        width: 400,
+                        modal: true,
+                        buttons: {
+                                'Save': function() {
+                                        
+                                        titletosave = $('#edittitle').attr('value');
+                                        linktosave = $('#editlink').attr('value');
+                                        anchortitletosave = $('#editanchortitle').attr('value');
+                                        newwindowtosave = $('#editnewwindow').attr('value');
+                                        desctosave = $('#editdescription').attr('value');
+                                        
+                                        $('#title' + $(this).dialog('option', 'itemID')).attr('value',titletosave);
+                                        $('#linkurl' + $(this).dialog('option', 'itemID')).attr('value',linktosave);
+                                        $('#anchortitle' + $(this).dialog('option', 'itemID')).attr('value',anchortitletosave);
+                                        $('#newwindow' + $(this).dialog('option', 'itemID')).attr('value',newwindowtosave);
+                                        $('#description' + $(this).dialog('option', 'itemID')).attr('value',desctosave);
+                                        
+                                        $('#menu-' + $(this).dialog('option', 'itemID') + ' &gt; dl &gt; dt &gt; span.title').text(titletosave);
+                                        
+                                        $('#view' + + $(this).dialog('option', 'itemID')).attr('href', linktosave);
+                                        
+                                        $(this).dialog('close');
+                                        
+                                },
+                                Cancel: function() {
+                                        $(this).dialog('close');
+                                }
+                        }
+                });
+                
+                $('#message').animate({ opacity: 1.0 },2000).fadeOut(300, function(){ $(this).remove();});
+                
+                //Add dropzone
+            $('#custom-nav li').prepend('&lt;div class=&quot;dropzone&quot;&gt;&lt;/div&gt;');        
+                
+                //Make li items draggable
+                $('#custom-nav li').draggable({
+                            handle: ' &gt; dl',
+                            opacity: .8,
+                            addClasses: false,
+                            helper: 'clone',
+                            zIndex: 100
+                });
+
+                //Make items droppable
+                $('#custom-nav dl, #custom-nav .dropzone').droppable(
+                {
+                    accept: '#custom-nav li',
+                    tolerance: 'pointer',
+                    drop: function(e, ui) 
+                    {
+                        var li = $(this).parent();
+                        var child = !$(this).hasClass('dropzone');
+                        //Add UL to first child
+                        if (child &amp;&amp; li.children('ul').length == 0) 
+                        {
+                            li.append('&lt;ul id=&quot;sub-menu&quot; /&gt;');
+                        }
+                        //Make it draggable
+                        if (child) 
+                        {
+                            li.children('ul').append(ui.draggable);
+                        }
+                        else 
+                        {
+                            li.before(ui.draggable);
+                        }
+
+                        li.find('dl,.dropzone').css({ backgroundColor: '', borderColor: '' });
+                        
+                        var draggablevalue = ui.draggable.attr('value');
+                        var droppablevalue = li.attr('value');
+                        li.find('#menu-' + draggablevalue).find('#parent' + draggablevalue).val(droppablevalue); 
+                        $(this).parent().find(&quot;dt&quot;).removeAttr('style');
+                        $(this).parent().find(&quot;div:first&quot;).removeAttr('style');
+                        
+                        
+                    },
+                    over: function() 
+                    {
+                            //Add child
+                            if ($(this).attr('class') == 'dropzone ui-droppable') 
+                            {
+                                    $(this).parent().find(&quot;div:first&quot;).css('background', 'none').css('height', '50px');
+                            }
+                            //Add above
+                            else if ($(this).attr('class') == 'ui-droppable') 
+                            {
+                                    $(this).parent().find(&quot;dt:first&quot;).css('background', '#d8d8d8');
+                            }
+                            //do nothing
+                            else {
+                            
+                            }
+                            var parentid = $(this).parent().attr('id');
+                        
+                       },
+                    out: function() 
+                    {
+                        $(this).parent().find(&quot;dt&quot;).removeAttr('style');
+                        $(this).parent().find(&quot;div:first&quot;).removeAttr('style');
+                        $(this).filter('.dropzone').css({ borderColor: '' });
+                    },
+                    deactivate: function()
+                    {        
+                            
+                                        
+                    }
+                    
+                            
+                });
+                                 
+                //Handle Save Button Clicks        
+                $('#save_top').click(function()
+                {
+                        updatepostdata();
+                });
+                $('#save_bottom').click(function()
+                {
+                        updatepostdata();
+                });
+                
+
+        });
+
+
</ins></span></pre></div>
<a id="trunkwpadminjscustomnavigationdefaultitemsjs"></a>
<div class="addfile"><h4>Added: trunk/wp-admin/js/custom-navigation-default-items.js (0 => 13257)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/js/custom-navigation-default-items.js                                (rev 0)
+++ trunk/wp-admin/js/custom-navigation-default-items.js        2010-02-20 21:57:43 UTC (rev 13257)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+$(function(){$(&quot;#dialog-confirm&quot;).dialog({autoOpen:false,resizable:false,height:210,width:400,modal:true,buttons:{Save:function(){titletosave=$(&quot;#edittitle&quot;).attr(&quot;value&quot;);linktosave=$(&quot;#editlink&quot;).attr(&quot;value&quot;);anchortitletosave=$(&quot;#editanchortitle&quot;).attr(&quot;value&quot;);newwindowtosave=$(&quot;#editnewwindow&quot;).attr(&quot;value&quot;);desctosave=$(&quot;#editdescription&quot;).attr(&quot;value&quot;);$(&quot;#title&quot;+$(this).dialog(&quot;option&quot;,&quot;itemID&quot;)).attr(&quot;value&quot;,titletosave);$(&quot;#linkurl&quot;+$(this).dialog(&quot;option&quot;,&quot;itemID&quot;)).attr(&quot;value&quot;,linktosave);$(&quot;#anchortitle&quot;+$(this).dialog(&quot;option&quot;,&quot;itemID&quot;)).attr(&quot;value&quot;,anchortitletosave);$(&quot;#newwindow&quot;+$(this).dialog(&quot;option&quot;,&quot;itemID&quot;)).attr(&quot;value&quot;,newwindowtosave);$(&quot;#description&quot;+$(this).dialog(&quot;option&quot;,&quot;itemID&quot;)).attr(&quot;value&quot;,desctosave);$(&quot;#menu-&quot;+$(this).dialog(&quot;option&quot;,&quot;itemID&quot;)+&quot; &gt; dl &gt; dt &gt; span.title&quot;).text(titletosave);$(&quot;#view&quot;+ +$(this).dialog(&quot;option&quot;,&quot;itemID&quot;)).attr(&quot;href&quot;,linktosave);$(this).dialog(&quot;close&quot;)},Cancel:function(){$(this).dialog(&quot;close&quot;)}}});$(&quot;#message&quot;).animate({opacity:1},2000).fadeOut(300,function(){$(this).remove()});$(&quot;#custom-nav li&quot;).prepend('&lt;div class=&quot;dropzone&quot;&gt;&lt;/div&gt;');$(&quot;#custom-nav li&quot;).draggable({handle:&quot; &gt; dl&quot;,opacity:0.8,addClasses:false,helper:&quot;clone&quot;,zIndex:100});$(&quot;#custom-nav dl, #custom-nav .dropzone&quot;).droppable({accept:&quot;#custom-nav li&quot;,tolerance:&quot;pointer&quot;,drop:function(f,d){var a=$(this).parent();var g=!$(this).hasClass(&quot;dropzone&quot;);if(g&amp;&amp;a.children(&quot;ul&quot;).length==0){a.append('&lt;ul id=&quot;sub-menu&quot; /&gt;')}if(g){a.children(&quot;ul&quot;).append(d.draggable)}else{a.before(d.draggable)}a.find(&quot;dl,.dropzone&quot;).css({backgroundColor:&quot;&quot;,borderColor:&quot;&quot;});var c=d.draggable.attr(&quot;value&quot;);var b=a.attr(&quot;value&quot;);a.find(&quot;#menu-&quot;+c).find(&quot;#parent&quot;+c).val(b);$(this).parent().find(&quot;dt&quot;).removeAttr(&quot;style&quot;);$(this).parent().find(&quot;div:first&quot;).removeAttr(&quot;style&quot;)},over:function(){if($(this).attr(&quot;class&quot;)==&quot;dropzone ui-droppable&quot;){$(this).parent().find(&quot;div:first&quot;).css(&quot;background&quot;,&quot;none&quot;).css(&quot;height&quot;,&quot;50px&quot;)}else{if($(this).attr(&quot;class&quot;)==&quot;ui-droppable&quot;){$(this).parent().find(&quot;dt:first&quot;).css(&quot;background&quot;,&quot;#d8d8d8&quot;)}else{}}var a=$(this).parent().attr(&quot;id&quot;)},out:function(){$(this).parent().find(&quot;dt&quot;).removeAttr(&quot;style&quot;);$(this).parent().find(&quot;div:first&quot;).removeAttr(&quot;style&quot;);$(this).filter(&quot;.dropzone&quot;).css({borderColor:&quot;&quot;})},deactivate:function(){}});$(&quot;#save_top&quot;).click(function(){updatepostdata()});$(&quot;#save_bottom&quot;).click(function(){updatepostdata()})});
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkwpadminjscustomnavigationdynamicfunctionsdevjs"></a>
<div class="addfile"><h4>Added: trunk/wp-admin/js/custom-navigation-dynamic-functions.dev.js (0 => 13257)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/js/custom-navigation-dynamic-functions.dev.js                                (rev 0)
+++ trunk/wp-admin/js/custom-navigation-dynamic-functions.dev.js        2010-02-20 21:57:43 UTC (rev 13257)
</span><span class="lines">@@ -0,0 +1,289 @@
</span><ins>+/**
+ * WordPress Administration Custom Navigation
+ * Interface JS functions
+ *
+ * @author Jeffikus &lt;pearce.jp@gmail.com&gt;
+ * @version 1.1.0
+ *
+ * @package WordPress
+ * @subpackage Administration
+ */

+/*
+ * Removes menu items from current menu
+ * @param int o - the id of the menu li to remove.
+*/
+function removeitem(o) 
+{
+                           
+        var todelete = document.getElementById('menu-' + o);
+        
+        if (todelete)
+        {                
+                var parenttodelete = document.getElementById('menu-' + o).parentNode;
+        throwaway_node = parenttodelete.removeChild(todelete); 
+        }        
+                        
+        updatepostdata();
+};
+
+/*
+ * Loads dialog window to edit menu items from current menu
+ * @param int o - the id of the menu li to edit.
+*/
+function edititem(o) 
+{
+                           
+                itemTitle = $('#title' + o).attr('value');
+                itemURL = $('#linkurl' + o).attr('value');
+                itemAnchorTitle = $('#anchortitle' + o).attr('value');
+                itemNewWindow = $('#newwindow' + o).attr('value');
+                itemDesc = $('#description' + o).attr('value');
+                
+                $('#dialog-confirm').dialog( 'option' , 'itemID' , o )
+                                
+                $('#dialog-confirm').dialog('open');
+                
+                $('#edittitle').attr('value', itemTitle);
+                $('#editlink').attr('value', itemURL);
+                $('#editanchortitle').attr('value', itemAnchorTitle);
+                $(&quot;#editnewwindow option[value='&quot; + itemNewWindow  + &quot;']&quot;).attr('selected', 'selected');
+                $('#editdescription').attr('value', itemDesc);
+        
+};
+
+/*
+ * Prepares menu items for POST
+*/
+function updatepostdata() 
+{                       
+        
+        var i = 0;
+         $(&quot;#custom-nav&quot;).find(&quot;li&quot;).each(function(i) {
+                i = i + 1;
+             var j = $(this).attr('value');
+                
+             $(this).find('#position' + j).attr('value', i);
+             $(this).attr('id','menu-' + i);
+             $(this).attr('value', i);
+             
+             $(this).find('#dbid' + j).attr('name','dbid' + i);
+             $(this).find('#dbid' + j).attr('id','dbid' + i);
+             
+                $(this).find('#postmenu' + j).attr('name','postmenu' + i);
+             $(this).find('#postmenu' + j).attr('id','postmenu' + i);
+             
+             var p = $(this).find('#parent' + j).parent().parent().parent().attr('value');
+             
+             $(this).find('#parent' + j).attr('name','parent' + i);
+             $(this).find('#parent' + j).attr('id','parent' + i);
+             if (p) {
+                     //Do nothing
+             }
+             else {
+                     //reset p to be top level
+                     p = 0;
+             }
+                          
+             $(this).find('#parent' + j).attr('value', p);
+                          
+             $(this).find('#title' + j).attr('name','title' + i);
+             $(this).find('#title' + j).attr('id','title' + i);
+             
+             $(this).find('#linkurl' + j).attr('name','linkurl' + i);
+             $(this).find('#linkurl' + j).attr('id','linkurl' + i);
+                     
+             $(this).find('#description' + j).attr('name','description' + i);
+             $(this).find('#description' + j).attr('id','description' + i);
+             
+             $(this).find('#icon' + j).attr('name','icon' + i);
+             $(this).find('#icon' + j).attr('id','icon' + i);
+             
+             $(this).find('#position' + j).attr('name','position' + i);
+             $(this).find('#position' + j).attr('id','position' + i);
+             
+             $(this).find('#linktype' + j).attr('name','linktype' + i);
+             $(this).find('#linktype' + j).attr('id','linktype' + i);
+             
+             $(this).find('#anchortitle' + j).attr('name','anchortitle' + i);
+             $(this).find('#anchortitle' + j).attr('id','anchortitle' + i);
+             
+             $(this).find('#newwindow' + j).attr('name','newwindow' + i);
+             $(this).find('#newwindow' + j).attr('id','newwindow' + i);
+             
+             $(this).find('dl &gt; dt &gt; span &gt; #remove' + j).attr('value', i);
+             $(this).find('dl &gt; dt &gt; span &gt; #remove' + j).attr('onClick', 'removeitem(' + i + ')');
+             $(this).find('dl &gt; dt &gt; span &gt; #remove' + j).attr('id','remove' + i);
+
+             $('#licount').attr('value',i);
+
+   });
+   
+   
+        
+};        
+
+/*
+ * Adds item from Page, Category, or Custom options menu
+ * @param string templatedir - directory of the add, edit, view images.
+ * @param string additemtype - Page, Category, or Custom.
+ * @param string itemtext - menu text.
+ * @param string itemurl - url of the menu.
+ * @param int itemid - menu id.
+ * @param int itemparentid - default 0.
+ * @param string itemdescription - the description of the menu item.
+*/  
+function appendToList(templatedir,additemtype,itemtext,itemurl,itemid,itemparentid,itemdescription) 
+{
+        var inputvaluevarname = '';
+        var inputvaluevarurl = '';
+        var inputitemid = '';
+        var inputparentid= '';
+        var inputdescription = '';
+        var inputicon = '';
+
+        if (additemtype == 'Custom') 
+        {
+                inputvaluevarname = document.getElementById('custom_menu_item_name').value;
+                inputvaluevarurl = document.getElementById('custom_menu_item_url').value;
+                inputitemid = '';
+                inputparentid = '';
+                inputlinktype = 'custom';
+                inputdescription = document.getElementById('custom_menu_item_description').value;
+        }
+        else if (additemtype == 'Page')
+        {
+                inputvaluevarname = htmlentities(itemtext.toString());
+                inputvaluevarurl = itemurl.toString();
+                inputitemid = itemid.toString();
+                inputparentid = '0';
+                inputlinktype = 'page';
+                inputdescription = htmlentities(itemdescription.toString());
+                
+        }
+        else if (additemtype == 'Category')
+        {
+                inputvaluevarname = htmlentities(itemtext.toString());
+                inputvaluevarurl = itemurl.toString();
+                inputitemid = itemid.toString();
+                inputparentid = '0';
+                inputlinktype = 'category';
+                inputdescription = htmlentities(itemdescription.toString());
+        }
+        else 
+        {
+                inputvaluevarname = '';
+                inputvaluevarname = '';
+                inputitemid = '';
+                inputparentid = '';
+                inputlinktype = 'custom';
+                inputdescription = '';
+        }
+        
+        var count=document.getElementById('custom-nav').getElementsByTagName('li').length;
+
+        var randomnumber = count;
+
+        var validatetest = 0;
+
+        try 
+        {
+                var test=document.getElementById(&quot;menu-&quot; + randomnumber.toString()).value;
+        }
+        catch (err) 
+        {
+                validatetest = 1;
+        }
+
+        while (validatetest == 0) 
+        {
+                randomnumber = randomnumber + 1;
+
+                try 
+                {
+                        var test2=document.getElementById(&quot;menu-&quot; + randomnumber.toString()).value;
+                }
+                catch (err) 
+                {
+                        validatetest = 1;
+                }
+        }
+        
+        //Notification Message
+        $('.maintitle').after('&lt;div id=&quot;message&quot; class=&quot;updated fade below-h2&quot;&gt;&lt;p&gt;Menu Item added!&lt;/p&gt;&lt;/div&gt;');
+        $('#message').animate({ opacity: 1.0 },2000).fadeOut(300, function(){ $(this).remove();});
+        
+        //Appends HTML to the menu
+        $('#custom-nav').append('&lt;li id=&quot;menu-' + randomnumber + '&quot; value=&quot;' + randomnumber + '&quot;&gt;&lt;div class=&quot;dropzone ui-droppable&quot;&gt;&lt;/div&gt;&lt;dl class=&quot;ui-droppable&quot;&gt;&lt;dt&gt;&lt;span class=&quot;title&quot;&gt;' + inputvaluevarname + '&lt;/span&gt;&lt;span class=&quot;controls&quot;&gt;&lt;span class=&quot;type&quot;&gt;' + additemtype + '&lt;/span&gt;&lt;a id=&quot;edit' + randomnumber + '&quot; onclick=&quot;edititem(' + randomnumber + ')&quot; value=&quot;' + randomnumber +'&quot;&gt;&lt;img class=&quot;edit&quot; alt=&quot;Edit Menu Item&quot; title=&quot;Edit Menu Item&quot; src=&quot;' + templatedir + '/wp-admin/images/ico-edit.png&quot; /&gt;&lt;/a&gt; &lt;a id=&quot;remove' + randomnumber + '&quot; onclick=&quot;removeitem(' + randomnumber + ')&quot; value=&quot;' + randomnumber +'&quot;&gt;&lt;img class=&quot;remove&quot; alt=&quot;Remove from Custom Menu&quot; title=&quot;Remove from Custom Menu&quot; src=&quot;' + templatedir + '/wp-admin/images/ico-close.png&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;' + inputvaluevarurl + '&quot; target=&quot;_blank&quot;&gt;&lt;img alt=&quot;View Custom Link&quot; title=&quot;View Custom Link&quot; src=&quot;' + templatedir + '/wp-admin/images/ico-viewpage.png&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;&lt;/dl&gt;&lt;a class=&quot;hide&quot; href=&quot;' + inputvaluevarurl + '&quot;&gt;' + inputvaluevarname + '&lt;/a&gt;&lt;input type=&quot;hidden&quot; name=&quot;postmenu' + randomnumber + '&quot; id=&quot;postmenu' + randomnumber + '&quot; value=&quot;' + inputitemid + '&quot; /&gt;&lt;input type=&quot;hidden&quot; name=&quot;parent' + randomnumber + '&quot; id=&quot;parent' + randomnumber + '&quot; value=&quot;' + inputparentid + '&quot; /&gt;&lt;input type=&quot;hidden&quot; name=&quot;title' + randomnumber + '&quot; id=&quot;title' + randomnumber + '&quot; value=&quot;' + inputvaluevarname + '&quot; /&gt;&lt;input type=&quot;hidden&quot; name=&quot;linkurl' + randomnumber + '&quot; id=&quot;linkurl' + randomnumber + '&quot; value=&quot;' + inputvaluevarurl + '&quot; /&gt;&lt;input type=&quot;hidden&quot; name=&quot;description' + randomnumber + '&quot; id=&quot;description' + randomnumber + '&quot; value=&quot;' + inputdescription + '&quot; /&gt;&lt;input type=&quot;hidden&quot; name=&quot;icon' + randomnumber + '&quot; id=&quot;icon' + randomnumber + '&quot; value=&quot;' + inputicon + '&quot; /&gt;&lt;input type=&quot;hidden&quot; name=&quot;position' + randomnumber + '&quot; id=&quot;position' + randomnumber + '&quot; value=&quot;' + randomnumber + '&quot; /&gt;&lt;input type=&quot;hidden&quot; name=&quot;linktype' + randomnumber + '&quot; id=&quot;linktype' + randomnumber + '&quot; value=&quot;' + inputlinktype + '&quot; /&gt;&lt;input type=&quot;hidden&quot; name=&quot;anchortitle' + randomnumber + '&quot; id=&quot;anchortitle' + randomnumber + '&quot; value=&quot;' + inputvaluevarname + '&quot; /&gt;&lt;input type=&quot;hidden&quot; name=&quot;newwindow' + randomnumber + '&quot; id=&quot;newwindow' + randomnumber + '&quot; value=&quot;0&quot; /&gt;&lt;/li&gt;');
+
+        //make menu item draggable
+        $('#menu-' + randomnumber + '').draggable(
+        {
+                handle: ' &gt; dl',
+                opacity: .8,
+                addClasses: false,
+                helper: 'clone',
+                zIndex: 100
+        });
+
+        //make menu item droppable
+        $('#menu-' + randomnumber + ' dl, #menu-' + randomnumber + ' .dropzone').droppable({
+                accept: '#' + randomnumber + ', #custom-nav li',
+                tolerance: 'pointer',
+                drop: function(e, ui) 
+                {
+                        var li = $(this).parent();
+                        var child = !$(this).hasClass('dropzone');
+                        //Append UL to first child
+                        if (child &amp;&amp; li.children('ul').length == 0) 
+                        {
+                                li.append('&lt;ul/&gt;');
+                        }
+                        //Make it draggable
+                        if (child) 
+                        {
+                                li.children('ul').append(ui.draggable);
+                        }
+                        else 
+                        {
+                                li.before(ui.draggable);
+                        }
+                        
+                        li.find('dl,.dropzone').css({ backgroundColor: '', borderColor: '' });        
+                        
+                        var draggablevalue = ui.draggable.attr('value');
+                       var droppablevalue = li.attr('value');
+                       li.find('#menu-' + draggablevalue).find('#parent' + draggablevalue).val(droppablevalue); 
+                $(this).parent().find(&quot;dt&quot;).removeAttr('style');
+                $(this).parent().find(&quot;div:first&quot;).removeAttr('style');
+                
+                },
+                over: function() 
+                    {
+                            //Add child
+                            if ($(this).attr('class') == 'dropzone ui-droppable') 
+                            {
+                                    $(this).parent().find(&quot;div:first&quot;).css('background', 'none').css('height', '50px');
+                            }
+                            //Add above
+                            else if ($(this).attr('class') == 'ui-droppable') 
+                            {
+                                    $(this).parent().find(&quot;dt:first&quot;).css('background', '#d8d8d8');
+                            }
+                            //do nothing
+                            else {
+                            
+                            }
+                            var parentid = $(this).parent().attr('id');
+                        
+                       },
+                    out: function() 
+                    {
+                        $(this).parent().find(&quot;dt&quot;).removeAttr('style');
+                        $(this).parent().find(&quot;div:first&quot;).removeAttr('style');
+                        $(this).filter('.dropzone').css({ borderColor: '' });
+                    }
+        });
+
+        updatepostdata();
+};
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkwpadminjscustomnavigationdynamicfunctionsjs"></a>
<div class="addfile"><h4>Added: trunk/wp-admin/js/custom-navigation-dynamic-functions.js (0 => 13257)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/js/custom-navigation-dynamic-functions.js                                (rev 0)
+++ trunk/wp-admin/js/custom-navigation-dynamic-functions.js        2010-02-20 21:57:43 UTC (rev 13257)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+function removeitem(c){var b=document.getElementById(&quot;menu-&quot;+c);if(b){var a=document.getElementById(&quot;menu-&quot;+c).parentNode;throwaway_node=a.removeChild(b)}updatepostdata()}function edititem(a){itemTitle=$(&quot;#title&quot;+a).attr(&quot;value&quot;);itemURL=$(&quot;#linkurl&quot;+a).attr(&quot;value&quot;);itemAnchorTitle=$(&quot;#anchortitle&quot;+a).attr(&quot;value&quot;);itemNewWindow=$(&quot;#newwindow&quot;+a).attr(&quot;value&quot;);itemDesc=$(&quot;#description&quot;+a).attr(&quot;value&quot;);$(&quot;#dialog-confirm&quot;).dialog(&quot;option&quot;,&quot;itemID&quot;,a);$(&quot;#dialog-confirm&quot;).dialog(&quot;open&quot;);$(&quot;#edittitle&quot;).attr(&quot;value&quot;,itemTitle);$(&quot;#editlink&quot;).attr(&quot;value&quot;,itemURL);$(&quot;#editanchortitle&quot;).attr(&quot;value&quot;,itemAnchorTitle);$(&quot;#editnewwindow option[value='&quot;+itemNewWindow+&quot;']&quot;).attr(&quot;selected&quot;,&quot;selected&quot;);$(&quot;#editdescription&quot;).attr(&quot;value&quot;,itemDesc)}function updatepostdata(){var a=0;$(&quot;#custom-nav&quot;).find(&quot;li&quot;).each(function(c){c=c+1;var b=$(this).attr(&quot;value&quot;);$(this).find(&quot;#position&quot;+b).attr(&quot;value&quot;,c);$(this).attr(&quot;id&quot;,&quot;menu-&quot;+c);$(this).attr(&quot;value&quot;,c);$(this).find(&quot;#dbid&quot;+b).attr(&quot;name&quot;,&quot;dbid&quot;+c);$(this).find(&quot;#dbid&quot;+b).attr(&quot;id&quot;,&quot;dbid&quot;+c);$(this).find(&quot;#postmenu&quot;+b).attr(&quot;name&quot;,&quot;postmenu&quot;+c);$(this).find(&quot;#postmenu&quot;+b).attr(&quot;id&quot;,&quot;postmenu&quot;+c);var d=$(this).find(&quot;#parent&quot;+b).parent().parent().parent().attr(&quot;value&quot;);$(this).find(&quot;#parent&quot;+b).attr(&quot;name&quot;,&quot;parent&quot;+c);$(this).find(&quot;#parent&quot;+b).attr(&quot;id&quot;,&quot;parent&quot;+c);if(d){}else{d=0}$(this).find(&quot;#parent&quot;+b).attr(&quot;value&quot;,d);$(this).find(&quot;#title&quot;+b).attr(&quot;name&quot;,&quot;title&quot;+c);$(this).find(&quot;#title&quot;+b).attr(&quot;id&quot;,&quot;title&quot;+c);$(this).find(&quot;#linkurl&quot;+b).attr(&quot;name&quot;,&quot;linkurl&quot;+c);$(this).find(&quot;#linkurl&quot;+b).attr(&quot;id&quot;,&quot;linkurl&quot;+c);$(this).find(&quot;#description&quot;+b).attr(&quot;name&quot;,&quot;description&quot;+c);$(this).find(&quot;#description&quot;+b).attr(&quot;id&quot;,&quot;description&quot;+c);$(this).find(&quot;#icon&quot;+b).attr(&quot;name&quot;,&quot;icon&quot;+c);$(this).find(&quot;#icon&quot;+b).attr(&quot;id&quot;,&quot;icon&quot;+c);$(this).find(&quot;#position&quot;+b).attr(&quot;name&quot;,&quot;position&quot;+c);$(this).find(&quot;#position&quot;+b).attr(&quot;id&quot;,&quot;position&quot;+c);$(this).find(&quot;#linktype&quot;+b).attr(&quot;name&quot;,&quot;linktype&quot;+c);$(this).find(&quot;#linktype&quot;+b).attr(&quot;id&quot;,&quot;linktype&quot;+c);$(this).find(&quot;#anchortitle&quot;+b).attr(&quot;name&quot;,&quot;anchortitle&quot;+c);$(this).find(&quot;#anchortitle&quot;+b).attr(&quot;id&quot;,&quot;anchortitle&quot;+c);$(this).find(&quot;#newwindow&quot;+b).attr(&quot;name&quot;,&quot;newwindow&quot;+c);$(this).find(&quot;#newwindow&quot;+b).attr(&quot;id&quot;,&quot;newwindow&quot;+c);$(this).find(&quot;dl &gt; dt &gt; span &gt; #remove&quot;+b).attr(&quot;value&quot;,c);$(this).find(&quot;dl &gt; dt &gt; span &gt; #remove&quot;+b).attr(&quot;onClick&quot;,&quot;removeitem(&quot;+c+&quot;)&quot;);$(this).find(&quot;dl &gt; dt &gt; span &gt; #remove&quot;+b).attr(&quot;id&quot;,&quot;remove&quot;+c);$(&quot;#licount&quot;).attr(&quot;value&quot;,c)})}function appendToList(b,s,d,n,h,l,e){var k=&quot;&quot;;var c=&quot;&quot;;var r=&quot;&quot;;var o=&quot;&quot;;var i=&quot;&quot;;var a=&quot;&quot;;if(s==&quot;Custom&quot;){k=document.getElementById(&quot;custom_menu_item_name&quot;).value;c=document.getElementById(&quot;custom_menu_item_url&quot;).value;r=&quot;&quot;;o=&quot;&quot;;inputlinktype=&quot;custom&quot;;i=document.getElementById(&quot;custom_menu_item_description&quot;).value}else{if(s==&quot;Page&quot;){k=htmlentities(d.toString());c=n.toString();r=h.toString();o=&quot;0&quot;;inputlinktype=&quot;page&quot;;i=htmlentities(e.toString())}else{if(s==&quot;Category&quot;){k=htmlentities(d.toString());c=n.toString();r=h.toString();o=&quot;0&quot;;inputlinktype=&quot;category&quot;;i=htmlentities(e.toString())}else{k=&quot;&quot;;k=&quot;&quot;;r=&quot;&quot;;o=&quot;&quot;;inputlinktype=&quot;custom&quot;;i=&quot;&quot;}}}var g=document.getElementById(&quot;custom-nav&quot;).getElementsByTagName(&quot;li&quot;).length;var p=g;var m=0;try{var q=document.getElementById(&quot;menu-&quot;+p.toString()).value}catch(f){m=1}while(m==0){p=p+1;try{var j=document.getElementById(&quot;menu-&quot;+p.toString()).value}catch(f){m=1}}$(&quot;.maintitle&quot;).after('&lt;div id=&quot;message&quot; class=&quot;updated fade below-h2&quot;&gt;&lt;p&gt;Menu Item added!&lt;/p&gt;&lt;/div&gt;');$(&quot;#message&quot;).animate({opacity:1},2000).fadeOut(300,function(){$(this).remove()});$(&quot;#custom-nav&quot;).append('&lt;li id=&quot;menu-'+p+'&quot; value=&quot;'+p+'&quot;&gt;&lt;div class=&quot;dropzone ui-droppable&quot;&gt;&lt;/div&gt;&lt;dl class=&quot;ui-droppable&quot;&gt;&lt;dt&gt;&lt;span class=&quot;title&quot;&gt;'+k+'&lt;/span&gt;&lt;span class=&quot;controls&quot;&gt;&lt;span class=&quot;type&quot;&gt;'+s+'&lt;/span&gt;&lt;a id=&quot;edit'+p+'&quot; onclick=&quot;edititem('+p+')&quot; value=&quot;'+p+'&quot;&gt;&lt;img class=&quot;edit&quot; alt=&quot;Edit Menu Item&quot; title=&quot;Edit Menu Item&quot; src=&quot;'+b+'/wp-admin/images/ico-edit.png&quot; /&gt;&lt;/a&gt; &lt;a id=&quot;remove'+p+'&quot; onclick=&quot;removeitem('+p+')&quot; value=&quot;'+p+'&quot;&gt;&lt;img class=&quot;remove&quot; alt=&quot;Remove from Custom Menu&quot; title=&quot;Remove from Custom Menu&quot; src=&quot;'+b+'/wp-admin/images/ico-close.png&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;'+c+'&quot; target=&quot;_blank&quot;&gt;&lt;img alt=&quot;View Custom Link&quot; title=&quot;View Custom Link&quot; src=&quot;'+b+'/wp-admin/images/ico-viewpage.png&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/dt&gt;&lt;/dl&gt;&lt;a class=&quot;hide&quot; href=&quot;'+c+'&quot;&gt;'+k+'&lt;/a&gt;&lt;input type=&quot;hidden&quot; name=&quot;postmenu'+p+'&quot; id=&quot;postmenu'+p+'&quot; value=&quot;'+r+'&quot; /&gt;&lt;input type=&quot;hidden&quot; name=&quot;parent'+p+'&quot; id=&quot;parent'+p+'&quot; value=&quot;'+o+'&quot; /&gt;&lt;input type=&quot;hidden&quot; name=&quot;title'+p+'&quot; id=&quot;title'+p+'&quot; value=&quot;'+k+'&quot; /&gt;&lt;input type=&quot;hidden&quot; name=&quot;linkurl'+p+'&quot; id=&quot;linkurl'+p+'&quot; value=&quot;'+c+'&quot; /&gt;&lt;input type=&quot;hidden&quot; name=&quot;description'+p+'&quot; id=&quot;description'+p+'&quot; value=&quot;'+i+'&quot; /&gt;&lt;input type=&quot;hidden&quot; name=&quot;icon'+p+'&quot; id=&quot;icon'+p+'&quot; value=&quot;'+a+'&quot; /&gt;&lt;input type=&quot;hidden&quot; name=&quot;position'+p+'&quot; id=&quot;position'+p+'&quot; value=&quot;'+p+'&quot; /&gt;&lt;input type=&quot;hidden&quot; name=&quot;linktype'+p+'&quot; id=&quot;linktype'+p+'&quot; value=&quot;'+inputlinktype+'&quot; /&gt;&lt;input type=&quot;hidden&quot; name=&quot;anchortitle'+p+'&quot; id=&quot;anchortitle'+p+'&quot; value=&quot;'+k+'&quot; /&gt;&lt;input type=&quot;hidden&quot; name=&quot;newwindow'+p+'&quot; id=&quot;newwindow'+p+'&quot; value=&quot;0&quot; /&gt;&lt;/li&gt;');$(&quot;#menu-&quot;+p+&quot;&quot;).draggable({handle:&quot; &gt; dl&quot;,opacity:0.8,addClasses:false,helper:&quot;clone&quot;,zIndex:100});$(&quot;#menu-&quot;+p+&quot; dl, #menu-&quot;+p+&quot; .dropzone&quot;).droppable({accept:&quot;#&quot;+p+&quot;, #custom-nav li&quot;,tolerance:&quot;pointer&quot;,drop:function(x,w){var t=$(this).parent();var y=!$(this).hasClass(&quot;dropzone&quot;);if(y&amp;&amp;t.children(&quot;ul&quot;).length==0){t.append(&quot;&lt;ul/&gt;&quot;)}if(y){t.children(&quot;ul&quot;).append(w.draggable)}else{t.before(w.draggable)}t.find(&quot;dl,.dropzone&quot;).css({backgroundColor:&quot;&quot;,borderColor:&quot;&quot;});var v=w.draggable.attr(&quot;value&quot;);var u=t.attr(&quot;value&quot;);t.find(&quot;#menu-&quot;+v).find(&quot;#parent&quot;+v).val(u);$(this).parent().find(&quot;dt&quot;).removeAttr(&quot;style&quot;);$(this).parent().find(&quot;div:first&quot;).removeAttr(&quot;style&quot;)},over:function(){if($(this).attr(&quot;class&quot;)==&quot;dropzone ui-droppable&quot;){$(this).parent().find(&quot;div:first&quot;).css(&quot;background&quot;,&quot;none&quot;).css(&quot;height&quot;,&quot;50px&quot;)}else{if($(this).attr(&quot;class&quot;)==&quot;ui-droppable&quot;){$(this).parent().find(&quot;dt:first&quot;).css(&quot;background&quot;,&quot;#d8d8d8&quot;)}else{}}var t=$(this).parent().attr(&quot;id&quot;)},out:function(){$(this).parent().find(&quot;dt&quot;).removeAttr(&quot;style&quot;);$(this).parent().find(&quot;div:first&quot;).removeAttr(&quot;style&quot;);$(this).filter(&quot;.dropzone&quot;).css({borderColor:&quot;&quot;})}});updatepostdata()};
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkwpadminjscustomnavigationphpfunctionsdevjs"></a>
<div class="addfile"><h4>Added: trunk/wp-admin/js/custom-navigation-php-functions.dev.js (0 => 13257)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/js/custom-navigation-php-functions.dev.js                                (rev 0)
+++ trunk/wp-admin/js/custom-navigation-php-functions.dev.js        2010-02-20 21:57:43 UTC (rev 13257)
</span><span class="lines">@@ -0,0 +1,300 @@
</span><ins>+/* 
+ * More info at: http://phpjs.org
+ * 
+ * This is version: 3.08
+ * php.js is copyright 2010 Kevin van Zonneveld.
+ * 
+ * Portions copyright Brett Zamir (http://brett-zamir.me), Kevin van Zonneveld
+ * (http://kevin.vanzonneveld.net), Onno Marsman, Theriault, Michael White
+ * (http://getsprink.com), Waldo Malqui Silva, Paulo Ricardo F. Santos, Jack,
+ * Jonas Raoni Soares Silva (http://www.jsfromhell.com), Philip Peterson, Ates
+ * Goral (http://magnetiq.com), Legaev Andrey, Alex, Ratheous, Martijn
+ * Wieringa, Nate, lmeyrick (https://sourceforge.net/projects/bcmath-js/),
+ * Enrique Gonzalez, Philippe Baumann, Webtoolkit.info
+ * (http://www.webtoolkit.info/), travc, Carlos R. L. Rodrigues
+ * (http://www.jsfromhell.com), Jani Hartikainen, Ash Searle
+ * (http://hexmen.com/blog/), Ole Vrijenhoek, stag019, d3x, Erkekjetter,
+ * GeekFG (http://geekfg.blogspot.com), T.Wild, Johnny Mast
+ * (http://www.phpvrouwen.nl), Michael Grier,
+ * http://stackoverflow.com/questions/57803/how-to-convert-decimal-to-hex-in-javascript,
+ * pilus, marrtins, Andrea Giammarchi (http://webreflection.blogspot.com),
+ * WebDevHobo (http://webdevhobo.blogspot.com/), Caio Ariede
+ * (http://caioariede.com), Thunder.m, Aman Gupta, Martin
+ * (http://www.erlenwiese.de/), Tyler Akins (http://rumkin.com), Lars Fischer,
+ * Paul Smith, Alfonso Jimenez (http://www.alfonsojimenez.com), Michael White,
+ * mdsjack (http://www.mdsjack.bo.it), Pellentesque Malesuada, gettimeofday,
+ * David, Joris, saulius, Robin, Steven Levithan
+ * (http://blog.stevenlevithan.com), Public Domain
+ * (http://www.json.org/json2.js), Kankrelune (http://www.webfaktory.info/),
+ * Tim de Koning (http://www.kingsquare.nl), Arpad Ray (mailto:arpad@php.net),
+ * AJ, KELAN, Sakimori, Mailfaker (http://www.weedem.fr/), Oleg Eremeev, Marc
+ * Palau, Josh Fraser
+ * (http://onlineaspect.com/2007/06/08/auto-detect-a-time-zone-with-javascript/),
+ * Karol Kowalski, Chris, Breaking Par Consulting Inc
+ * (http://www.breakingpar.com/bkp/home.nsf/0/87256B280015193F87256CFB006C45F7),
+ * Mirek Slugen, majak, Felix Geisendoerfer (http://www.debuggable.com/felix),
+ * gorthaur, Steve Hilder, LH, Stoyan Kyosev (http://www.svest.org/), Der
+ * Simon (http://innerdom.sourceforge.net/), HKM, echo is bad, nord_ua, Ozh,
+ * metjay, XoraX (http://www.xorax.info), Eugene Bulkin
+ * (http://doubleaw.com/), JB, strcasecmp, strcmp, Taras Bogach, Francesco,
+ * Marco, noname, class_exists, madipta, Alan C, mktime, Douglas Crockford
+ * (http://javascript.crockford.com), uestla, Frank Forte, David James, Steve
+ * Clay, J A R, jpfle, Marc Jansen, Paul, Hyam Singer
+ * (http://www.impact-computing.com/), T. Wild, Ole Vrijenhoek
+ * (http://www.nervous.nl/), Raphael (Ao RUDLER), kenneth, Brad Touesnard,
+ * ChaosNo1, Subhasis Deb, Norman &quot;zEh&quot; Fuchs, 0m3r, Sanjoy Roy, Rob, Gilbert,
+ * Bayron Guevara, paulo kuong, Orlando, duncan, sankai, hitwork, Philippe
+ * Jausions (http://pear.php.net/user/jausions), Aidan Lister
+ * (http://aidanlister.com/), ejsanders, Nick Callen, Brian Tafoya
+ * (http://www.premasolutions.com/), johnrembo, sowberry, Yves Sucaet, Denny
+ * Wardhana, Ulrich, kilops, dptr1988, john (http://www.jd-tech.net), MeEtc
+ * (http://yass.meetcweb.com), Peter-Paul Koch
+ * (http://www.quirksmode.org/js/beat.html), T0bsn, Tim Wiel, Bryan Elliott,
+ * Alexander Ermolaev (http://snippets.dzone.com/user/AlexanderErmolaev), JT,
+ * Thomas Beaucourt (http://www.webapp.fr), David Randall, DxGx, Soren Hansen,
+ * lmeyrick (https://sourceforge.net/projects/bcmath-js/this.), Le Torbi,
+ * djmix, Lincoln Ramsay, Linuxworld, Thiago Mata
+ * (http://thiagomata.blog.com), Pedro Tainha (http://www.pedrotainha.com),
+ * James, Pyerre, Jon Hohle, felix, ger, Russell Walker
+ * (http://www.nbill.co.uk/), Garagoth, Andrej Pavlovic, Dino, Jamie Beck
+ * (http://www.terabit.ca/), DtTvB
+ * (http://dt.in.th/2008-09-16.string-length-in-bytes.html), setcookie, YUI
+ * Library: http://developer.yahoo.com/yui/docs/YAHOO.util.DateLocale.html,
+ * Blues at http://hacks.bluesmoon.info/strftime/strftime.js, Andreas, rem,
+ * meo, Jay Klehr, Kheang Hok Chin (http://www.distantia.ca/), Luke Smith
+ * (http://lucassmith.name), Rival, Amir Habibi
+ * (http://www.residence-mixte.com/), Cagri Ekin, Greenseed, mk.keck, Leslie
+ * Hoare, booeyOH, Ben Bryan, Michael, Christian Doebler, Kirk Strobeck, Brant
+ * Messenger (http://www.brantmessenger.com/), Rick Waldron, Mick@el, Martin
+ * Pool, Pierre-Luc Paour, Daniel Esteban, Christoph, Saulo Vallory, Kristof
+ * Coomans (SCK-CEN Belgian Nucleair Research Centre), rezna, Tomasz
+ * Wesolowski, Gabriel Paderni, Marco van Oort, Philipp Lenssen,
+ * penutbutterjelly, Simon Willison (http://simonwillison.net), Anton Ongson,
+ * Eric Nagel, Bobby Drake, Pul, Blues (http://tech.bluesmoon.info/), Luke
+ * Godfrey, Diogo Resende, Howard Yeend, vlado houba, Jalal Berrami, Itsacon
+ * (http://www.itsacon.net/), date, Billy, stensi, Cord, fearphage
+ * (http://http/my.opera.com/fearphage/), Victor, Matteo, Artur Tchernychev,
+ * Francois, nobbler, Fox, marc andreu, Nick Kolosov (http://sammy.ru),
+ * Nathan, Arno, Scott Cariss, Slawomir Kaniecki, ReverseSyntax, Jason Wong
+ * (http://carrot.org/), Mateusz &quot;loonquawl&quot; Zalega, Manish, Wagner B. Soares,
+ * 3D-GRAF, jakes, Yannoo, gabriel paderni, daniel airton wermann
+ * (http://wermann.com.br), Atli ?\x97r, Allan Jensen
+ * (http://www.winternet.no), Benjamin Lupton, davook, Maximusya, FGFEmperor,
+ * baris ozdil, Luis Salazar (http://www.freaky-media.com/), Tim de Koning,
+ * taith, Matt Bradley, FremyCompany, T.J. Leahy, Greg Frazier, Valentina De
+ * Rosa, Tod Gentille, Riddler (http://www.frontierwebdev.com/), Alexander M
+ * Beedie
+ * 
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ * 
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * &quot;Software&quot;), 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 &quot;AS IS&quot;, 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 KEVIN VAN ZONNEVELD 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.
+ */ 
+
+function get_html_translation_table (table, quote_style) {
+    // http://kevin.vanzonneveld.net
+    // +   original by: Philip Peterson
+    // +    revised by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
+    // +   bugfixed by: noname
+    // +   bugfixed by: Alex
+    // +   bugfixed by: Marco
+    // +   bugfixed by: madipta
+    // +   improved by: KELAN
+    // +   improved by: Brett Zamir (http://brett-zamir.me)
+    // +   bugfixed by: Brett Zamir (http://brett-zamir.me)
+    // +      input by: Frank Forte
+    // +   bugfixed by: T.Wild
+    // +      input by: Ratheous
+    // %          note: It has been decided that we're not going to add global
+    // %          note: dependencies to php.js, meaning the constants are not
+    // %          note: real constants, but strings instead. Integers are also supported if someone
+    // %          note: chooses to create the constants themselves.
+    // *     example 1: get_html_translation_table('HTML_SPECIALCHARS');
+    // *     returns 1: {'&quot;': '&amp;quot;', '&amp;': '&amp;amp;', '&lt;': '&amp;lt;', '&gt;': '&amp;gt;'}
+    
+    var entities = {}, hash_map = {}, decimal = 0, symbol = '';
+    var constMappingTable = {}, constMappingQuoteStyle = {};
+    var useTable = {}, useQuoteStyle = {};
+    
+    // Translate arguments
+    constMappingTable[0]      = 'HTML_SPECIALCHARS';
+    constMappingTable[1]      = 'HTML_ENTITIES';
+    constMappingQuoteStyle[0] = 'ENT_NOQUOTES';
+    constMappingQuoteStyle[2] = 'ENT_COMPAT';
+    constMappingQuoteStyle[3] = 'ENT_QUOTES';
+
+    useTable       = !isNaN(table) ? constMappingTable[table] : table ? table.toUpperCase() : 'HTML_SPECIALCHARS';
+    useQuoteStyle = !isNaN(quote_style) ? constMappingQuoteStyle[quote_style] : quote_style ? quote_style.toUpperCase() : 'ENT_COMPAT';
+
+    if (useTable !== 'HTML_SPECIALCHARS' &amp;&amp; useTable !== 'HTML_ENTITIES') {
+        throw new Error(&quot;Table: &quot;+useTable+' not supported');
+        // return false;
+    }
+
+    entities['38'] = '&amp;amp;';
+    if (useTable === 'HTML_ENTITIES') {
+        entities['160'] = '&amp;nbsp;';
+        entities['161'] = '&amp;iexcl;';
+        entities['162'] = '&amp;cent;';
+        entities['163'] = '&amp;pound;';
+        entities['164'] = '&amp;curren;';
+        entities['165'] = '&amp;yen;';
+        entities['166'] = '&amp;brvbar;';
+        entities['167'] = '&amp;sect;';
+        entities['168'] = '&amp;uml;';
+        entities['169'] = '&amp;copy;';
+        entities['170'] = '&amp;ordf;';
+        entities['171'] = '&amp;laquo;';
+        entities['172'] = '&amp;not;';
+        entities['173'] = '&amp;shy;';
+        entities['174'] = '&amp;reg;';
+        entities['175'] = '&amp;macr;';
+        entities['176'] = '&amp;deg;';
+        entities['177'] = '&amp;plusmn;';
+        entities['178'] = '&amp;sup2;';
+        entities['179'] = '&amp;sup3;';
+        entities['180'] = '&amp;acute;';
+        entities['181'] = '&amp;micro;';
+        entities['182'] = '&amp;para;';
+        entities['183'] = '&amp;middot;';
+        entities['184'] = '&amp;cedil;';
+        entities['185'] = '&amp;sup1;';
+        entities['186'] = '&amp;ordm;';
+        entities['187'] = '&amp;raquo;';
+        entities['188'] = '&amp;frac14;';
+        entities['189'] = '&amp;frac12;';
+        entities['190'] = '&amp;frac34;';
+        entities['191'] = '&amp;iquest;';
+        entities['192'] = '&amp;Agrave;';
+        entities['193'] = '&amp;Aacute;';
+        entities['194'] = '&amp;Acirc;';
+        entities['195'] = '&amp;Atilde;';
+        entities['196'] = '&amp;Auml;';
+        entities['197'] = '&amp;Aring;';
+        entities['198'] = '&amp;AElig;';
+        entities['199'] = '&amp;Ccedil;';
+        entities['200'] = '&amp;Egrave;';
+        entities['201'] = '&amp;Eacute;';
+        entities['202'] = '&amp;Ecirc;';
+        entities['203'] = '&amp;Euml;';
+        entities['204'] = '&amp;Igrave;';
+        entities['205'] = '&amp;Iacute;';
+        entities['206'] = '&amp;Icirc;';
+        entities['207'] = '&amp;Iuml;';
+        entities['208'] = '&amp;ETH;';
+        entities['209'] = '&amp;Ntilde;';
+        entities['210'] = '&amp;Ograve;';
+        entities['211'] = '&amp;Oacute;';
+        entities['212'] = '&amp;Ocirc;';
+        entities['213'] = '&amp;Otilde;';
+        entities['214'] = '&amp;Ouml;';
+        entities['215'] = '&amp;times;';
+        entities['216'] = '&amp;Oslash;';
+        entities['217'] = '&amp;Ugrave;';
+        entities['218'] = '&amp;Uacute;';
+        entities['219'] = '&amp;Ucirc;';
+        entities['220'] = '&amp;Uuml;';
+        entities['221'] = '&amp;Yacute;';
+        entities['222'] = '&amp;THORN;';
+        entities['223'] = '&amp;szlig;';
+        entities['224'] = '&amp;agrave;';
+        entities['225'] = '&amp;aacute;';
+        entities['226'] = '&amp;acirc;';
+        entities['227'] = '&amp;atilde;';
+        entities['228'] = '&amp;auml;';
+        entities['229'] = '&amp;aring;';
+        entities['230'] = '&amp;aelig;';
+        entities['231'] = '&amp;ccedil;';
+        entities['232'] = '&amp;egrave;';
+        entities['233'] = '&amp;eacute;';
+        entities['234'] = '&amp;ecirc;';
+        entities['235'] = '&amp;euml;';
+        entities['236'] = '&amp;igrave;';
+        entities['237'] = '&amp;iacute;';
+        entities['238'] = '&amp;icirc;';
+        entities['239'] = '&amp;iuml;';
+        entities['240'] = '&amp;eth;';
+        entities['241'] = '&amp;ntilde;';
+        entities['242'] = '&amp;ograve;';
+        entities['243'] = '&amp;oacute;';
+        entities['244'] = '&amp;ocirc;';
+        entities['245'] = '&amp;otilde;';
+        entities['246'] = '&amp;ouml;';
+        entities['247'] = '&amp;divide;';
+        entities['248'] = '&amp;oslash;';
+        entities['249'] = '&amp;ugrave;';
+        entities['250'] = '&amp;uacute;';
+        entities['251'] = '&amp;ucirc;';
+        entities['252'] = '&amp;uuml;';
+        entities['253'] = '&amp;yacute;';
+        entities['254'] = '&amp;thorn;';
+        entities['255'] = '&amp;yuml;';
+    }
+
+    if (useQuoteStyle !== 'ENT_NOQUOTES') {
+        entities['34'] = '&amp;quot;';
+    }
+    if (useQuoteStyle === 'ENT_QUOTES') {
+        entities['39'] = '&amp;#39;';
+    }
+    entities['60'] = '&amp;lt;';
+    entities['62'] = '&amp;gt;';
+
+
+    // ascii decimals to real symbols
+    for (decimal in entities) {
+        symbol = String.fromCharCode(decimal);
+        hash_map[symbol] = entities[decimal];
+    }
+    
+    return hash_map;
+}
+
+
+function htmlentities (string, quote_style) {
+    // http://kevin.vanzonneveld.net
+    // +   original by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
+    // +    revised by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
+    // +   improved by: nobbler
+    // +    tweaked by: Jack
+    // +   bugfixed by: Onno Marsman
+    // +    revised by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
+    // +    bugfixed by: Brett Zamir (http://brett-zamir.me)
+    // +      input by: Ratheous
+    // -    depends on: get_html_translation_table
+    // *     example 1: htmlentities('Kevin &amp; van Zonneveld');
+    // *     returns 1: 'Kevin &amp;amp; van Zonneveld'
+    // *     example 2: htmlentities(&quot;foo'bar&quot;,&quot;ENT_QUOTES&quot;);
+    // *     returns 2: 'foo&amp;#039;bar'
+
+    var hash_map = {}, symbol = '', tmp_str = '', entity = '';
+    tmp_str = string.toString();
+    
+    if (false === (hash_map = this.get_html_translation_table('HTML_ENTITIES', quote_style))) {
+        return false;
+    }
+    hash_map[&quot;'&quot;] = '&amp;#039;';
+    for (symbol in hash_map) {
+        entity = hash_map[symbol];
+        tmp_str = tmp_str.split(symbol).join(entity);
+    }
+    
+    return tmp_str;
+}
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkwpadminjscustomnavigationphpfunctionsjs"></a>
<div class="addfile"><h4>Added: trunk/wp-admin/js/custom-navigation-php-functions.js (0 => 13257)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/js/custom-navigation-php-functions.js                                (rev 0)
+++ trunk/wp-admin/js/custom-navigation-php-functions.js        2010-02-20 21:57:43 UTC (rev 13257)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+function get_html_translation_table(i,g){var d={},f={},c=0,a=&quot;&quot;;var e={},b={};var j={},h={};e[0]=&quot;HTML_SPECIALCHARS&quot;;e[1]=&quot;HTML_ENTITIES&quot;;b[0]=&quot;ENT_NOQUOTES&quot;;b[2]=&quot;ENT_COMPAT&quot;;b[3]=&quot;ENT_QUOTES&quot;;j=!isNaN(i)?e[i]:i?i.toUpperCase():&quot;HTML_SPECIALCHARS&quot;;h=!isNaN(g)?b[g]:g?g.toUpperCase():&quot;ENT_COMPAT&quot;;if(j!==&quot;HTML_SPECIALCHARS&quot;&amp;&amp;j!==&quot;HTML_ENTITIES&quot;){throw new Error(&quot;Table: &quot;+j+&quot; not supported&quot;)}d[&quot;38&quot;]=&quot;&amp;amp;&quot;;if(j===&quot;HTML_ENTITIES&quot;){d[&quot;160&quot;]=&quot;&amp;nbsp;&quot;;d[&quot;161&quot;]=&quot;&amp;iexcl;&quot;;d[&quot;162&quot;]=&quot;&amp;cent;&quot;;d[&quot;163&quot;]=&quot;&amp;pound;&quot;;d[&quot;164&quot;]=&quot;&amp;curren;&quot;;d[&quot;165&quot;]=&quot;&amp;yen;&quot;;d[&quot;166&quot;]=&quot;&amp;brvbar;&quot;;d[&quot;167&quot;]=&quot;&amp;sect;&quot;;d[&quot;168&quot;]=&quot;&amp;uml;&quot;;d[&quot;169&quot;]=&quot;&amp;copy;&quot;;d[&quot;170&quot;]=&quot;&amp;ordf;&quot;;d[&quot;171&quot;]=&quot;&amp;laquo;&quot;;d[&quot;172&quot;]=&quot;&amp;not;&quot;;d[&quot;173&quot;]=&quot;&amp;shy;&quot;;d[&quot;174&quot;]=&quot;&amp;reg;&quot;;d[&quot;175&quot;]=&quot;&amp;macr;&quot;;d[&quot;176&quot;]=&quot;&amp;deg;&quot;;d[&quot;177&quot;]=&quot;&amp;plusmn;&quot;;d[&quot;178&quot;]=&quot;&amp;sup2;&quot;;d[&quot;179&quot;]=&quot;&amp;sup3;&quot;;d[&quot;180&quot;]=&quot;&amp;acute;&quot;;d[&quot;181&quot;]=&quot;&amp;micro;&quot;;d[&quot;182&quot;]=&quot;&amp;para;&quot;;d[&quot;183&quot;]=&quot;&amp;middot;&quot;;d[&quot;184&quot;]=&quot;&amp;cedil;&quot;;d[&quot;185&quot;]=&quot;&amp;sup1;&quot;;d[&quot;186&quot;]=&quot;&amp;ordm;&quot;;d[&quot;187&quot;]=&quot;&amp;raquo;&quot;;d[&quot;188&quot;]=&quot;&amp;frac14;&quot;;d[&quot;189&quot;]=&quot;&amp;frac12;&quot;;d[&quot;190&quot;]=&quot;&amp;frac34;&quot;;d[&quot;191&quot;]=&quot;&amp;iquest;&quot;;d[&quot;192&quot;]=&quot;&amp;Agrave;&quot;;d[&quot;193&quot;]=&quot;&amp;Aacute;&quot;;d[&quot;194&quot;]=&quot;&amp;Acirc;&quot;;d[&quot;195&quot;]=&quot;&amp;Atilde;&quot;;d[&quot;196&quot;]=&quot;&amp;Auml;&quot;;d[&quot;197&quot;]=&quot;&amp;Aring;&quot;;d[&quot;198&quot;]=&quot;&amp;AElig;&quot;;d[&quot;199&quot;]=&quot;&amp;Ccedil;&quot;;d[&quot;200&quot;]=&quot;&amp;Egrave;&quot;;d[&quot;201&quot;]=&quot;&amp;Eacute;&quot;;d[&quot;202&quot;]=&quot;&amp;Ecirc;&quot;;d[&quot;203&quot;]=&quot;&amp;Euml;&quot;;d[&quot;204&quot;]=&quot;&amp;Igrave;&quot;;d[&quot;205&quot;]=&quot;&amp;Iacute;&quot;;d[&quot;206&quot;]=&quot;&amp;Icirc;&quot;;d[&quot;207&quot;]=&quot;&amp;Iuml;&quot;;d[&quot;208&quot;]=&quot;&amp;ETH;&quot;;d[&quot;209&quot;]=&quot;&amp;Ntilde;&quot;;d[&quot;210&quot;]=&quot;&amp;Ograve;&quot;;d[&quot;211&quot;]=&quot;&amp;Oacute;&quot;;d[&quot;212&quot;]=&quot;&amp;Ocirc;&quot;;d[&quot;213&quot;]=&quot;&amp;Otilde;&quot;;d[&quot;214&quot;]=&quot;&amp;Ouml;&quot;;d[&quot;215&quot;]=&quot;&amp;times;&quot;;d[&quot;216&quot;]=&quot;&amp;Oslash;&quot;;d[&quot;217&quot;]=&quot;&amp;Ugrave;&quot;;d[&quot;218&quot;]=&quot;&amp;Uacute;&quot;;d[&quot;219&quot;]=&quot;&amp;Ucirc;&quot;;d[&quot;220&quot;]=&quot;&amp;Uuml;&quot;;d[&quot;221&quot;]=&quot;&amp;Yacute;&quot;;d[&quot;222&quot;]=&quot;&amp;THORN;&quot;;d[&quot;223&quot;]=&quot;&amp;szlig;&quot;;d[&quot;224&quot;]=&quot;&amp;agrave;&quot;;d[&quot;225&quot;]=&quot;&amp;aacute;&quot;;d[&quot;226&quot;]=&quot;&amp;acirc;&quot;;d[&quot;227&quot;]=&quot;&amp;atilde;&quot;;d[&quot;228&quot;]=&quot;&amp;auml;&quot;;d[&quot;229&quot;]=&quot;&amp;aring;&quot;;d[&quot;230&quot;]=&quot;&amp;aelig;&quot;;d[&quot;231&quot;]=&quot;&amp;ccedil;&quot;;d[&quot;232&quot;]=&quot;&amp;egrave;&quot;;d[&quot;233&quot;]=&quot;&amp;eacute;&quot;;d[&quot;234&quot;]=&quot;&amp;ecirc;&quot;;d[&quot;235&quot;]=&quot;&amp;euml;&quot;;d[&quot;236&quot;]=&quot;&amp;igrave;&quot;;d[&quot;237&quot;]=&quot;&amp;iacute;&quot;;d[&quot;238&quot;]=&quot;&amp;icirc;&quot;;d[&quot;239&quot;]=&quot;&amp;iuml;&quot;;d[&quot;240&quot;]=&quot;&amp;eth;&quot;;d[&quot;241&quot;]=&quot;&amp;ntilde;&quot;;d[&quot;242&quot;]=&quot;&amp;ograve;&quot;;d[&quot;243&quot;]=&quot;&amp;oacute;&quot;;d[&quot;244&quot;]=&quot;&amp;ocirc;&quot;;d[&quot;245&quot;]=&quot;&amp;otilde;&quot;;d[&quot;246&quot;]=&quot;&amp;ouml;&quot;;d[&quot;247&quot;]=&quot;&amp;divide;&quot;;d[&quot;248&quot;]=&quot;&amp;oslash;&quot;;d[&quot;249&quot;]=&quot;&amp;ugrave;&quot;;d[&quot;250&quot;]=&quot;&amp;uacute;&quot;;d[&quot;251&quot;]=&quot;&amp;ucirc;&quot;;d[&quot;252&quot;]=&quot;&amp;uuml;&quot;;d[&quot;253&quot;]=&quot;&amp;yacute;&quot;;d[&quot;254&quot;]=&quot;&amp;thorn;&quot;;d[&quot;255&quot;]=&quot;&amp;yuml;&quot;}if(h!==&quot;ENT_NOQUOTES&quot;){d[&quot;34&quot;]=&quot;&amp;quot;&quot;}if(h===&quot;ENT_QUOTES&quot;){d[&quot;39&quot;]=&quot;&amp;#39;&quot;}d[&quot;60&quot;]=&quot;&amp;lt;&quot;;d[&quot;62&quot;]=&quot;&amp;gt;&quot;;for(c in d){a=String.fromCharCode(c);f[a]=d[c]}return f}function htmlentities(c,f){var e={},d=&quot;&quot;,a=&quot;&quot;,b=&quot;&quot;;a=c.toString();if(false===(e=this.get_html_translation_table(&quot;HTML_ENTITIES&quot;,f))){return false}e[&quot;'&quot;]=&quot;&amp;#039;&quot;;for(d in e){b=e[d];a=a.split(d).join(b)}return a};
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkwpadminmenuphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/menu.php (13256 => 13257)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/menu.php        2010-02-20 21:09:49 UTC (rev 13256)
+++ trunk/wp-admin/menu.php        2010-02-20 21:57:43 UTC (rev 13257)
</span><span class="lines">@@ -108,6 +108,7 @@
</span><span class="cx">         $submenu['themes.php'][5]  = array(__('Themes'), 'switch_themes', 'themes.php');
</span><span class="cx">         $submenu['themes.php'][10] = array(_x('Editor', 'theme editor'), 'edit_themes', 'theme-editor.php');
</span><span class="cx">         $submenu['themes.php'][15] = array(__('Add New Themes'), 'install_themes', 'theme-install.php');
</span><ins>+        $submenu['themes.php'][20] = array(__('Custom Navigation'), 'switch_themes', 'custom-navigation.php');
</ins><span class="cx"> 
</span><span class="cx"> $update_plugins = get_site_transient( 'update_plugins' );
</span><span class="cx"> $update_count = 0;
</span></span></pre></div>
<a id="trunkwpincludescustomnavigationfunctionsphp"></a>
<div class="addfile"><h4>Added: trunk/wp-includes/custom-navigation-functions.php (0 => 13257)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/custom-navigation-functions.php                                (rev 0)
+++ trunk/wp-includes/custom-navigation-functions.php        2010-02-20 21:57:43 UTC (rev 13257)
</span><span class="lines">@@ -0,0 +1,993 @@
</span><ins>+&lt;?php
+/**
+ * WordPress Administration Custom Navigation
+ * General Functions
+ *
+ * @author Jeffikus &lt;pearce.jp@gmail.com&gt;
+ * @version 1.1.0
+ *
+ * @package WordPress
+ * @subpackage Administration
+ */
+
+function wp_custom_navigation_get_menu_items( $menu_objects, $key = 'ID' ) {
+        $menu_items = array();
+        if ( !empty( $menu_objects ) &amp;&amp; !empty( $key ) ) {
+                $args = array( 'orderby' =&gt; 'menu_order', 'post_type' =&gt; 'menu_item', 'post_status' =&gt; 'menu-category,menu-page,menu-custom' );
+                if ( count( $menu_objects ) &gt; 1 )
+                        $args['include'] = implode( ',', $menu_objects );
+                else
+                        $args['include'] = $menu_objects[0];
+                $posts = new WP_Query( $args );
+                if ( ! empty( $posts-&gt;posts ) ) {
+                        foreach( $posts-&gt;posts as $post ) {
+                                $menu_items[ $post-&gt;$key ] = $post;
+                        }
+                }
+                unset( $posts );
+                ksort( $menu_items );
+        }
+        return $menu_items;
+}
+function wp_custom_navigation_setup($override = false) {
+        
+        $nav_version = '1.1.0';
+        //Custom Navigation Menu Setup
+        
+        //Check for Upgrades
+        if (get_option('wp_settings_custom_nav_version') &lt;&gt; '') {
+                $nav_version_in_db = get_option('wp_settings_custom_nav_version');
+        }
+        else {
+                $nav_version_in_db = '0';
+        }
+        
+        //Override for menu descriptions
+        update_option('wp_settings_custom_nav_advanced_options','yes');
+                        
+        if(($nav_version_in_db &lt;&gt; $nav_version) || ($override)) 
+                update_option('wp_settings_custom_nav_version',$nav_version);
+
+        $custom_menus = get_terms( 'menu', array( 'hide_empty' =&gt; false ) );
+         if ( !empty( $custom_menus ) ) {
+                foreach( $custom_menus as $menu ) {
+                        $menu_objects = get_objects_in_term( $menu-&gt;term_id, 'menu' );
+                        if ( !empty( $menu_objects ) ) {
+                                foreach( $menu_objects as $item )
+                                        wp_delete_post( $item );
+                        }
+                        wp_delete_term( $menu-&gt;term_id, 'menu' );
+                }
+        }
+
+}
+
+/*-----------------------------------------------------------------------------------*/
+/* Custom Navigation Functions */
+/* wp_custom_navigation_output() displays the menu in the back/frontend
+/* wp_custom_navigation_sub_items() is a recursive sub menu item function
+/* wp_custom_nav_get_pages()
+/* wp_custom_nav_get_categories()
+/* wp_custom_navigation_default_sub_items() is a recursive sub menu item function
+/*-----------------------------------------------------------------------------------*/
+
+/*-----------------------------------------------------------------------------------*/
+/* Main Output Function
+/* args list
+/* type - frontend or backend
+/* name - name of your menu
+/* id - id of menu in db
+/* desc - 1 = show descriptions, 2 = dont show descriptions
+/* before_title - html before title is outputted in &lt;a&gt; tag
+/* after_title - html after title is outputted in &lt;a&gt; tag
+/*-----------------------------------------------------------------------------------*/
+
+function wp_custom_navigation_output($args = array()) {
+                
+                //DEFAULT ARGS
+                $type = 'frontend';
+                $name = 'Menu 1'; 
+                $id = 0;
+                $desc = 2;
+                $before_title = '';
+                $after_title = '';
+                
+                if (isset($args)) {
+                
+                        if ( !is_array($args) ) 
+                        parse_str( $args, $args );
+        
+                        extract($args);
+                }
+
+                $menu_objects = get_objects_in_term( $id, 'menu' );
+                $menu_items = wp_custom_navigation_get_menu_items( $menu_objects, 'menu_order' );
+                //Override for menu descriptions
+                $advanced_option_descriptions = get_option('wp_settings_custom_nav_advanced_options');
+                if ($advanced_option_descriptions == 'no')
+                {
+                        $desc = 2;
+                }
+                
+                $queried_id = 0;
+                global $wp_query;
+                if ( is_page() )
+                        $queried_id = $wp_query-&gt;post-&gt;ID;
+                elseif ( is_category() )
+                        $queried_id = $wp_query-&gt;query_vars['cat'];
+            //DISPLAY Loop
+                foreach ($menu_items as $menu_item) {
+
+                        //PREPARE Menu Data
+                        //Page Menu Item
+                        switch ( $menu_item-&gt;post_status ) {
+                                case 'menu-page':
+                                        if ($menu_item-&gt;guid == '')
+                                                $link = get_permalink( $menu_item-&gt;post_parent );
+                                        else
+                                                $link = $menu_item-&gt;guid;
+
+                                        if ( $menu_item-&gt;post_title == '' )
+                                                $title = htmlentities( get_the_title( $menu_item-&gt;post_parent ) );
+                                        else
+                                                $title = htmlentities( $menu_item-&gt;post_title );
+
+                                        if ( $menu_item-&gt;post_content == '' )
+                                                $description = htmlentities( get_post_meta( $menu_item-&gt;ID, 'page-description', true ) );
+                                        else
+                                                $description = htmlentities( $menu_item-&gt;post_content );
+                                        $target = '';
+                                break;
+                        //Category Menu Item
+                                case 'menu-category':
+                                        if ($menu_item-&gt;guid == '')
+                                                $link = get_category_link( $menu_item-&gt;post_parent );
+                                        else
+                                                $link = $menu_item-&gt;guid;
+                                
+                                        if ( $menu_item-&gt;post_title == '' ) {
+                                                $title_raw = get_categories( 'include='.$menu_item-&gt;post_parent );
+                                                $title =  htmlentities($title_raw[0]-&gt;cat_name);        
+                                        } else {
+                                                $title = htmlentities( $menu_item-&gt;post_title );
+                                        }
+                                
+                                        if ( $menu_item-&gt;post_content == '' )
+                                                $description = htmlentities( strip_tags( category_description( $menu_item-&gt;post_parent ) ) );
+                                        else
+                                                $description = htmlentities( $menu_item-&gt;post_content );
+                                        $target = '';
+                                break;
+                                default:
+                        //Custom Menu Item
+                                        $link = $menu_item-&gt;guid;
+                                        $title =  htmlentities( $menu_item-&gt;post_title );
+                                        $description = htmlentities( $menu_item-&gt;post_content );
+                                        $target = 'target=&quot;_blank&quot;';
+                                break;
+                        }
+/* @todo: update to use tax/post data
+
+                        //SET anchor title
+                        if (isset($wp_custom_nav_menu_items-&gt;custom_anchor_title)) {
+                                $anchor_title = htmlentities($wp_custom_nav_menu_items-&gt;custom_anchor_title);
+                        }
+                        else {
+                                $anchor_title = $title;
+                        }
+                        
+                        if ($queried_id == $wp_custom_nav_menu_items-&gt;post_id) {
+                                $li_class = 'class=&quot;current_page_item&quot;';
+                        }
+                        else {
+                                $li_class = '';
+                        }
+                        
+                        if (isset($wp_custom_nav_menu_items-&gt;new_window)) {
+                                if ($wp_custom_nav_menu_items-&gt;new_window &gt; 0) {
+                                        $target = 'target=&quot;_blank&quot;';
+                                }
+                                else {
+                                        $target = '';
+                                }
+                        }
+*/                        
+                        //List Items
+                        ?&gt;&lt;li id=&quot;menu-&lt;?php echo $menu_item-&gt;ID; ?&gt;&quot; value=&quot;&lt;?php echo $menu_item-&gt;ID; ?&gt;&quot; &lt;?php echo $li_class; ?&gt;&gt;&lt;?php
+                                        //@todo: update front end to use post data
+                                        //FRONTEND Link
+                                        if ($type == &quot;frontend&quot;)
+                                        {                
+                                                ?&gt;&lt;a title=&quot;&lt;?php echo $anchor_title; ?&gt;&quot; href=&quot;&lt;?php echo $link; ?&gt;&quot; &lt;?php echo $target; ?&gt;&gt;&lt;?php echo $before_title.$title.$after_title; ?&gt;&lt;?php 
+                                                
+                                                        if ( $advanced_option_descriptions == 'no' ) 
+                                                        { 
+                                                                // 2 widget override do NOT display descriptions
+                                                                // 1 widget override display descriptions
+                                                                // 0 widget override not set
+                                                                if (($desc == 1) || ($desc == 0) )
+                                                                {
+                                                                        ?&gt;&lt;span class=&quot;nav-description&quot;&gt;&lt;?php echo $description; ?&gt;&lt;/span&gt;&lt;?php
+                                                                } 
+                                                                elseif ($desc == 2)
+                                                                { }
+                                                                else
+                                                                { }
+                                                        } 
+                                                        else 
+                                                        {
+                                                                // 2 widget override do NOT display descriptions
+                                                                // 1 widget override display descriptions
+                                                                // 0 widget override not set
+                                                                if ($desc == 1)
+                                                                {
+                                                                        ?&gt;&lt;span class=&quot;nav-description&quot;&gt;&lt;?php echo $description; ?&gt;&lt;/span&gt;&lt;?php
+                                                                } 
+                                                                elseif (($desc == 2) || ($desc == 0))
+                                                                { }
+                                                                else 
+                                                                { }
+                                                        }
+                                                        
+                                                ?&gt;&lt;/a&gt;&lt;?php 
+                                        }
+                                        //BACKEND draggable and droppable elements
+                                        elseif ($type == &quot;backend&quot;)
+                                                $link_type = substr( $menu_item-&gt;post_status, 5 );
+                                        {
+                                                ?&gt;
+                                                
+                                                &lt;dl&gt;
+                                                        &lt;dt&gt;
+                                                                &lt;span class=&quot;title&quot;&gt;&lt;?php echo $title; ?&gt;&lt;/span&gt;
+                                                                &lt;span class=&quot;controls&quot;&gt;
+                                                                &lt;span class=&quot;type&quot;&gt;&lt;?php echo $link_type; ?&gt;&lt;/span&gt;
+                                                                &lt;a id=&quot;edit&lt;?php echo $menu_item-&gt;menu_order; ?&gt;&quot; onclick=&quot;edititem(&lt;?php echo $menu_item-&gt;menu_order; ?&gt;)&quot; value=&quot;&lt;?php echo $menu_item-&gt;menu_order; ?&gt;&quot;&gt;&lt;img class=&quot;edit&quot; alt=&quot;Edit Menu Item&quot; title=&quot;Edit Menu Item&quot; src=&quot;&lt;?php echo get_bloginfo('url'); ?&gt;/wp-admin/images/ico-edit.png&quot; /&gt;&lt;/a&gt;
+                                                                &lt;a id=&quot;remove&lt;?php echo $menu_item-&gt;menu_order; ?&gt;&quot; onclick=&quot;removeitem(&lt;?php echo $menu_item-&gt;menu_order; ?&gt;)&quot; value=&quot;&lt;?php echo $menu_item-&gt;menu_order; ?&gt;&quot;&gt;&lt;img class=&quot;remove&quot; alt=&quot;Remove from Custom Menu&quot; title=&quot;Remove from Custom Menu&quot; src=&quot;&lt;?php echo get_bloginfo('url'); ?&gt;/wp-admin/images/ico-close.png&quot; /&gt;&lt;/a&gt;
+                                                                &lt;a id=&quot;view&lt;?php echo $menu_item-&gt;menu_order; ?&gt;&quot; target=&quot;_blank&quot; href=&quot;&lt;?php echo $link; ?&gt;&quot;&gt;&lt;img alt=&quot;View Page&quot; title=&quot;View Page&quot; src=&quot;&lt;?php echo get_bloginfo('url'); ?&gt;/wp-admin/images/ico-viewpage.png&quot; /&gt;&lt;/a&gt;
+                                                                &lt;/span&gt;
+                                                        &lt;/dt&gt;
+                                                &lt;/dl&gt;
+                                                
+                                                &lt;a&gt;&lt;span class=&quot;&quot;&gt;&lt;/span&gt;&lt;/a&gt;
+                                                &lt;input type=&quot;hidden&quot; name=&quot;dbid&lt;?php echo $menu_item-&gt;menu_order; ?&gt;&quot; id=&quot;dbid&lt;?php echo $menu_item-&gt;menu_order; ?&gt;&quot; value=&quot;&lt;?php echo $menu_item-&gt;ID; ?&gt;&quot; /&gt;
+                                                &lt;input type=&quot;hidden&quot; name=&quot;postmenu&lt;?php echo $menu_item-&gt;menu_order; ?&gt;&quot; id=&quot;postmenu&lt;?php echo $menu_item-&gt;menu_order; ?&gt;&quot; value=&quot;&lt;?php echo $id; ?&gt;&quot; /&gt;
+                                                &lt;input type=&quot;hidden&quot; name=&quot;parent&lt;?php echo $menu_item-&gt;menu_order; ?&gt;&quot; id=&quot;parent&lt;?php echo $menu_item-&gt;menu_order; ?&gt;&quot; value=&quot;&lt;?php echo $menu_item-&gt;post_parent; ?&gt;&quot; /&gt;
+                                                &lt;input type=&quot;hidden&quot; name=&quot;title&lt;?php echo $menu_item-&gt;menu_order; ?&gt;&quot; id=&quot;title&lt;?php echo $menu_item-&gt;menu_order; ?&gt;&quot; value=&quot;&lt;?php echo $title; ?&gt;&quot; /&gt;
+                                                &lt;input type=&quot;hidden&quot; name=&quot;linkurl&lt;?php echo $menu_item-&gt;menu_order; ?&gt;&quot; id=&quot;linkurl&lt;?php echo $menu_item-&gt;menu_order; ?&gt;&quot; value=&quot;&lt;?php echo $link; ?&gt;&quot; /&gt;
+                                                &lt;input type=&quot;hidden&quot; name=&quot;description&lt;?php echo $menu_item-&gt;menu_order; ?&gt;&quot; id=&quot;description&lt;?php echo $menu_item-&gt;menu_order; ?&gt;&quot; value=&quot;&lt;?php echo $description; ?&gt;&quot; /&gt;
+                                                &lt;input type=&quot;hidden&quot; name=&quot;icon&lt;?php echo $menu_item-&gt;menu_order; ?&gt;&quot; id=&quot;icon&lt;?php echo $menu_item-&gt;menu_order; ?&gt;&quot; value=&quot;0&quot; /&gt;
+                                                &lt;input type=&quot;hidden&quot; name=&quot;position&lt;?php echo $menu_item-&gt;menu_order; ?&gt;&quot; id=&quot;position&lt;?php echo $menu_item-&gt;menu_order; ?&gt;&quot; value=&quot;&lt;?php echo $menu_item-&gt;menu_order; ?&gt;&quot; /&gt;
+                                                &lt;input type=&quot;hidden&quot; name=&quot;linktype&lt;?php echo $menu_item-&gt;menu_order; ?&gt;&quot; id=&quot;linktype&lt;?php echo $menu_item-&gt;menu_order; ?&gt;&quot; value=&quot;&lt;?php echo $link_type; ?&gt;&quot; /&gt;
+                                                &lt;input type=&quot;hidden&quot; name=&quot;anchortitle&lt;?php echo $menu_item-&gt;menu_order; ?&gt;&quot; id=&quot;anchortitle&lt;?php echo $menu_item-&gt;menu_order; ?&gt;&quot; value=&quot;&lt;?php echo esc_html( $menu_item-&gt;post_excerpt ); ?&gt;&quot; /&gt;
+                                                &lt;input type=&quot;hidden&quot; name=&quot;newwindow&lt;?php echo $menu_item-&gt;menu_order; ?&gt;&quot; id=&quot;newwindow&lt;?php echo $menu_item-&gt;menu_order; ?&gt;&quot; value=&quot;&lt;?php echo ( '' == $menu_item-&gt;post_content_filtered ? '0' : '1' ); ?&gt;&quot; /&gt;
+                                                
+                                                &lt;?php 
+                                        }
+
+                                        //@todo: implement menu heirarchy
+/*                                        //DISPLAY menu sub items
+                                        if ($wp_custom_nav_menu_items-&gt;parent_id == 0) 
+                                        {
+                                                //FRONTEND
+                                                if ($type == 'frontend') 
+                                                {
+                                                        //Recursive function
+                                                        $intj = wp_custom_navigation_sub_items($wp_custom_nav_menu_items-&gt;id,$wp_custom_nav_menu_items-&gt;link_type,$table_name,$type,$wp_custom_nav_menu_id);
+                                                }
+                                                //BACKEND
+                                                else 
+                                                {
+                                                        //Recursive function
+                                                        $intj = wp_custom_navigation_sub_items($wp_custom_nav_menu_items-&gt;id,$wp_custom_nav_menu_items-&gt;link_type,$table_name,$type,$id);
+                                                }
+                                        }
+*/                        ?&gt;&lt;/li&gt;
+                        &lt;?php 
+                }
+}
+//@todo: implement menu heirarchy
+//RECURSIVE Sub Menu Items
+function wp_custom_navigation_sub_items($post_id,$type,$table_name,$output_type,$menu_id = 0) {
+        
+        $parent_id = 0;
+        global $wpdb;
+        
+        //GET sub menu items
+        $wp_custom_nav_menu = $wpdb-&gt;get_results(&quot;SELECT id,post_id,parent_id,position,custom_title,custom_link,custom_description,menu_icon,link_type,custom_anchor_title,new_window FROM &quot;.$table_name.&quot; WHERE parent_id = '&quot;.$post_id.&quot;' AND menu_id='&quot;.$menu_id.&quot;' ORDER BY position ASC&quot;);
+        
+        if (empty($wp_custom_nav_menu))
+        {
+        
+        }
+        else
+        {
+                ?&gt;&lt;ul id=&quot;sub-custom-nav&quot;&gt;
+                &lt;?php
+            $queried_id = 0;
+                global $wp_query;
+        if (is_page()) {
+                    $queried_id = $wp_query-&gt;post-&gt;ID;
+            }
+            elseif (is_category()) {
+                    $queried_id = $wp_query-&gt;query_vars['cat'];
+            }
+            else {
+
+            }
+            //DISPLAY Loop
+                foreach ($wp_custom_nav_menu as $sub_item) 
+                {
+                        //Figure out where the menu item sits
+                        $counter=$sub_item-&gt;position;
+                        
+                        //Prepare Menu Data
+                        //Category Menu Item
+                        if ($sub_item-&gt;link_type == 'category') 
+                        {
+                                
+                                $parent_id = $sub_item-&gt;parent_id;
+                                $post_id = $sub_item-&gt;post_id;
+                                
+                                if ($sub_item-&gt;custom_link == '') {
+                                        $link = get_category_link($sub_item-&gt;post_id);
+                                }
+                                else {
+                                        $link = $sub_item-&gt;custom_link;
+                                }
+                                
+                                if ($sub_item-&gt;custom_title == '') {
+                                        $title_raw = get_categories('include='.$sub_item-&gt;post_id);
+                                        $title =  htmlentities($title_raw[0]-&gt;cat_name);
+                                }
+                                else {
+                                        $title = htmlentities($sub_item-&gt;custom_title);
+                                }
+                                
+                                if ($sub_item-&gt;custom_description == '') {
+                                        $description = strip_tags(category_description($sub_item-&gt;post_id));
+                                }
+                                else {
+                                        $description = $sub_item-&gt;custom_description;
+                                }
+                                $target = '';
+                        }
+                        //Page Menu Item
+                        elseif ($sub_item-&gt;link_type == 'page')
+                        {
+                                
+                                $parent_id = $sub_item-&gt;parent_id;
+                                $post_id = $sub_item-&gt;post_id;
+                                
+                                if ($sub_item-&gt;custom_link == '') {
+                                        $link = get_permalink($sub_item-&gt;post_id);
+                                }
+                                else {
+                                        $link = $sub_item-&gt;custom_link;
+                                }
+
+                                if ($sub_item-&gt;custom_title == '') {
+                                        $title = htmlentities(get_the_title($sub_item-&gt;post_id));
+                                }
+                                else {
+                                        $title = htmlentities($sub_item-&gt;custom_title);
+                                }
+                                
+                                if ($sub_item-&gt;custom_description == '') {
+                                        $description = get_post_meta($sub_item-&gt;post_id, 'page-description', true);
+                                }
+                                else {
+                                        $description = $sub_item-&gt;custom_description;
+                                }
+                                $target = '';
+                                
+                        }
+                        //Custom Menu Item
+                        else
+                        {
+                                $link = $sub_item-&gt;custom_link;
+                                $title = htmlentities($sub_item-&gt;custom_title);
+                                $parent_id = $sub_item-&gt;parent_id;
+                                $post_id = $sub_item-&gt;post_id;
+                                $description = $sub_item-&gt;custom_description;
+                                $target = 'target=&quot;_blank&quot;';
+                        }
+                        if ($queried_id == $sub_item-&gt;post_id) {
+                                $li_class = 'class=&quot;current_page_item&quot;';
+                        }
+                        else {
+                                $li_class = '';
+                        }
+                        
+                        //SET anchor title
+                        if (isset($sub_item-&gt;custom_anchor_title)) {
+                                $anchor_title = htmlentities($sub_item-&gt;custom_anchor_title);
+                        }
+                        else {
+                                $anchor_title = $title;
+                        }
+                        
+                        if (isset($sub_item-&gt;new_window)) {
+                                if ($sub_item-&gt;new_window &gt; 0) {
+                                        $target = 'target=&quot;_blank&quot;';
+                                }
+                        }
+                        
+                        //List Items
+                        ?&gt;&lt;li id=&quot;menu-&lt;?php echo $counter; ?&gt;&quot; value=&quot;&lt;?php echo $counter; ?&gt;&quot; &lt;?php echo $li_class; ?&gt;&gt;&lt;?php 
+                                                //FRONTEND
+                                                if ($output_type == &quot;frontend&quot;)
+                                                {
+                                                        ?&gt;&lt;a title=&quot;&lt;?php echo $anchor_title; ?&gt;&quot; href=&quot;&lt;?php echo $link; ?&gt;&quot; &lt;?php echo $target; ?&gt;&gt;&lt;?php echo $title; ?&gt;&lt;/a&gt;&lt;?php 
+                                                }
+                                                //BACKEND
+                                                elseif ($output_type == &quot;backend&quot;)
+                                                {
+                                                        ?&gt;
+                                                        &lt;dl&gt;
+                                                        &lt;dt&gt;
+                                                                &lt;span class=&quot;title&quot;&gt;&lt;?php echo $title; ?&gt;&lt;/span&gt;
+                                                                &lt;span class=&quot;controls&quot;&gt;
+                                                                &lt;span class=&quot;type&quot;&gt;&lt;?php echo $sub_item-&gt;link_type; ?&gt;&lt;/span&gt;
+                                                                &lt;a id=&quot;edit&lt;?php echo $counter; ?&gt;&quot; onclick=&quot;edititem(&lt;?php echo $counter; ?&gt;)&quot; value=&quot;&lt;?php echo $counter; ?&gt;&quot;&gt;&lt;img class=&quot;edit&quot; alt=&quot;Edit Menu Item&quot; title=&quot;Edit Menu Item&quot; src=&quot;&lt;?php echo get_bloginfo('url'); ?&gt;/wp-admin/images/ico-edit.png&quot; /&gt;&lt;/a&gt; 
+                                                                &lt;a id=&quot;remove&lt;?php echo $counter; ?&gt;&quot; onclick=&quot;removeitem(&lt;?php echo $counter; ?&gt;)&quot; value=&quot;&lt;?php echo $counter; ?&gt;&quot;&gt;&lt;img class=&quot;remove&quot; alt=&quot;Remove from Custom Menu&quot; title=&quot;Remove from Custom Menu&quot; src=&quot;&lt;?php echo get_bloginfo('url'); ?&gt;/wp-admin/images/ico-close.png&quot; /&gt;&lt;/a&gt;
+                                                                &lt;a id=&quot;view&lt;?php echo $counter; ?&gt;&quot; target=&quot;_blank&quot; href=&quot;&lt;?php echo $link; ?&gt;&quot;&gt;&lt;img alt=&quot;View Page&quot; title=&quot;View Page&quot; src=&quot;&lt;?php echo get_bloginfo('url'); ?&gt;/wp-admin/images/ico-viewpage.png&quot; /&gt;&lt;/a&gt;
+                                                                &lt;/span&gt;
+                                                        &lt;/dt&gt;
+                                                        &lt;/dl&gt;
+                                                        &lt;a class=&quot;hide&quot; href=&quot;&lt;?php echo $link; ?&gt;&quot;&gt;&lt;?php echo $title; ?&gt;&lt;/a&gt;
+                                                        &lt;input type=&quot;hidden&quot; name=&quot;dbid&lt;?php echo $counter; ?&gt;&quot; id=&quot;dbid&lt;?php echo $counter; ?&gt;&quot; value=&quot;&lt;?php echo $sub_item-&gt;id; ?&gt;&quot; /&gt;
+                                                        &lt;input type=&quot;hidden&quot; name=&quot;postmenu&lt;?php echo $counter; ?&gt;&quot; id=&quot;postmenu&lt;?php echo $counter; ?&gt;&quot; value=&quot;&lt;?php echo $post_id; ?&gt;&quot; /&gt;
+                                                        &lt;input type=&quot;hidden&quot; name=&quot;parent&lt;?php echo $counter; ?&gt;&quot; id=&quot;parent&lt;?php echo $counter; ?&gt;&quot; value=&quot;&lt;?php echo $parent_id; ?&gt;&quot; /&gt;
+                                                        &lt;input type=&quot;hidden&quot; name=&quot;title&lt;?php echo $counter; ?&gt;&quot; id=&quot;title&lt;?php echo $counter; ?&gt;&quot; value=&quot;&lt;?php echo $title; ?&gt;&quot; /&gt;
+                                                        &lt;input type=&quot;hidden&quot; name=&quot;linkurl&lt;?php echo $counter; ?&gt;&quot; id=&quot;linkurl&lt;?php echo $counter; ?&gt;&quot; value=&quot;&lt;?php echo $link; ?&gt;&quot; /&gt;
+                                                        &lt;input type=&quot;hidden&quot; name=&quot;description&lt;?php echo $counter; ?&gt;&quot; id=&quot;description&lt;?php echo $counter; ?&gt;&quot; value=&quot;&lt;?php echo $description; ?&gt;&quot; /&gt;
+                                                        &lt;input type=&quot;hidden&quot; name=&quot;icon&lt;?php echo $counter; ?&gt;&quot; id=&quot;icon&lt;?php echo $counter; ?&gt;&quot; value=&quot;0&quot; /&gt;
+                                                        &lt;input type=&quot;hidden&quot; name=&quot;position&lt;?php echo $counter; ?&gt;&quot; id=&quot;position&lt;?php echo $counter; ?&gt;&quot; value=&quot;&lt;?php echo $counter; ?&gt;&quot; /&gt;
+                                                        &lt;input type=&quot;hidden&quot; name=&quot;linktype&lt;?php echo $counter; ?&gt;&quot; id=&quot;linktype&lt;?php echo $counter; ?&gt;&quot; value=&quot;&lt;?php echo $sub_item-&gt;link_type; ?&gt;&quot; /&gt;
+                                                        &lt;input type=&quot;hidden&quot; name=&quot;anchortitle&lt;?php echo $counter; ?&gt;&quot; id=&quot;anchortitle&lt;?php echo $counter; ?&gt;&quot; value=&quot;&lt;?php echo $anchor_title; ?&gt;&quot; /&gt;
+                                                        &lt;input type=&quot;hidden&quot; name=&quot;newwindow&lt;?php echo $counter; ?&gt;&quot; id=&quot;newwindow&lt;?php echo $counter; ?&gt;&quot; value=&quot;&lt;?php echo $sub_item-&gt;new_window; ?&gt;&quot; /&gt;
+                                                        &lt;?php 
+                                                }
+                                                
+                                                //Do recursion
+                                                wp_custom_navigation_sub_items($sub_item-&gt;id,$sub_item-&gt;link_type,$table_name,$output_type,$menu_id); 
+                        ?&gt;&lt;/li&gt;
+                        &lt;?php 
+        
+                } 
+        
+        ?&gt;&lt;/ul&gt;
+        &lt;?php 
+        
+        } 
+        
+        return $parent_id;

+}
+
+
+//Outputs All Pages and Sub Items
+function wp_custom_nav_get_pages($counter,$type) {
+
+        $pages_args = array(
+                    'child_of' =&gt; 0,
+                        'sort_order' =&gt; 'ASC',
+                        'sort_column' =&gt; 'post_title',
+                        'hierarchical' =&gt; 1,
+                        'exclude' =&gt; '',
+                        'include' =&gt; '',
+                        'meta_key' =&gt; '',
+                        'meta_value' =&gt; '',
+                        'authors' =&gt; '',
+                        'parent' =&gt; -1,
+                        'exclude_tree' =&gt; '',
+                        'number' =&gt; '',
+                        'offset' =&gt; 0 );
+        
+        //GET all pages                
+        $pages_array = get_pages($pages_args);
+        
+        $intCounter = $counter;
+        $parentli = $intCounter;
+        
+        if ($pages_array)
+        {
+                //DISPLAY Loop
+                foreach ($pages_array as $post)
+                {
+        
+                        if ($post-&gt;post_parent == 0)
+                        {
+                                //Custom Menu
+                                if ($type == 'menu')
+                                {
+                                        $description = get_post_meta($post-&gt;ID, 'page-description', true);
+                                        ?&gt;
+                                        
+                                        &lt;li id=&quot;menu-&lt;?php echo $intCounter; ?&gt;&quot; value=&quot;&lt;?php echo $intCounter; ?&gt;&quot;&gt;
+                                
+                                                &lt;dl&gt;
+                                                &lt;dt&gt;
+                                                &lt;span class=&quot;title&quot;&gt;&lt;?php echo $post-&gt;post_title; ?&gt;&lt;/span&gt;
+                                                &lt;span class=&quot;controls&quot;&gt;
+                                                        &lt;span class=&quot;type&quot;&gt;page&lt;/span&gt;
+                                                        &lt;a id=&quot;edit&lt;?php echo $intCounter; ?&gt;&quot; onclick=&quot;edititem(&lt;?php echo $intCounter; ?&gt;)&quot; value=&quot;&lt;?php echo $intCounter; ?&gt;&quot;&gt;&lt;img class=&quot;edit&quot; alt=&quot;Edit Menu Item&quot; title=&quot;Edit Menu Item&quot; src=&quot;&lt;?php echo get_bloginfo('url'); ?&gt;/wp-admin/images/ico-edit.png&quot; /&gt;&lt;/a&gt; 
+                                                        &lt;a id=&quot;remove&lt;?php echo $intCounter; ?&gt;&quot; onclick=&quot;removeitem(&lt;?php echo $intCounter; ?&gt;)&quot; value=&quot;&lt;?php echo $intCounter; ?&gt;&quot;&gt;
+                                                                &lt;img class=&quot;remove&quot; alt=&quot;Remove from Custom Menu&quot; title=&quot;Remove from Custom Menu&quot; src=&quot;&lt;?php echo get_bloginfo('url'); ?&gt;/wp-admin/images/ico-close.png&quot; /&gt;
+                                                        &lt;/a&gt;
+                                                        &lt;a target=&quot;_blank&quot; href=&quot;&lt;?php echo get_permalink($post-&gt;ID); ?&gt;&quot;&gt;
+                                                                &lt;img alt=&quot;View Page&quot; title=&quot;View Page&quot; src=&quot;&lt;?php echo get_bloginfo('url'); ?&gt;/wp-admin/images/ico-viewpage.png&quot; /&gt;
+                                                        &lt;/a&gt;
+                                                &lt;/span&gt;
+                                                
+                                                &lt;/dt&gt;
+                                                &lt;/dl&gt;
+                                                &lt;a class=&quot;hide&quot; href=&quot;&lt;?php echo get_permalink($post-&gt;ID); ?&gt;&quot;&gt;&lt;span class=&quot;title&quot;&gt;&lt;?php echo $post-&gt;post_title; ?&gt;&lt;/span&gt;
+                                        &lt;/a&gt;
+                                        &lt;input type=&quot;hidden&quot; name=&quot;postmenu&lt;?php echo $intCounter; ?&gt;&quot; id=&quot;postmenu&lt;?php echo $intCounter; ?&gt;&quot; value=&quot;&lt;?php echo $post-&gt;ID; ?&gt;&quot; /&gt;
+                                                &lt;input type=&quot;hidden&quot; name=&quot;parent&lt;?php echo $intCounter; ?&gt;&quot; id=&quot;parent&lt;?php echo $intCounter; ?&gt;&quot; value=&quot;0&quot; /&gt;
+                                                &lt;input type=&quot;hidden&quot; name=&quot;title&lt;?php echo $intCounter; ?&gt;&quot; id=&quot;title&lt;?php echo $intCounter; ?&gt;&quot; value=&quot;&lt;?php echo htmlentities($post-&gt;post_title); ?&gt;&quot; /&gt;
+                                                &lt;input type=&quot;hidden&quot; name=&quot;linkurl&lt;?php echo $intCounter; ?&gt;&quot; id=&quot;linkurl&lt;?php echo $intCounter; ?&gt;&quot; value=&quot;&lt;?php echo get_permalink($post-&gt;ID); ?&gt;&quot; /&gt;
+                                                &lt;input type=&quot;hidden&quot; name=&quot;description&lt;?php echo $intCounter; ?&gt;&quot; id=&quot;description&lt;?php echo $intCounter; ?&gt;&quot; value=&quot;&lt;?php echo $description; ?&gt;&quot; /&gt;
+                                                &lt;input type=&quot;hidden&quot; name=&quot;icon&lt;?php echo $intCounter; ?&gt;&quot; id=&quot;icon&lt;?php echo $intCounter; ?&gt;&quot; value=&quot;0&quot; /&gt;
+                                                &lt;input type=&quot;hidden&quot; name=&quot;position&lt;?php echo $intCounter; ?&gt;&quot; id=&quot;position&lt;?php echo $intCounter; ?&gt;&quot; value=&quot;&lt;?php echo $intCounter; ?&gt;&quot; /&gt;
+                                                &lt;input type=&quot;hidden&quot; name=&quot;linktype&lt;?php echo $intCounter; ?&gt;&quot; id=&quot;linktype&lt;?php echo $intCounter; ?&gt;&quot; value=&quot;page&quot; /&gt;
+                                                &lt;input type=&quot;hidden&quot; name=&quot;anchortitle&lt;?php echo $intCounter; ?&gt;&quot; id=&quot;anchortitle&lt;?php echo $intCounter; ?&gt;&quot; value=&quot;&lt;?php echo htmlentities($post-&gt;post_title); ?&gt;&quot; /&gt;
+                                                &lt;input type=&quot;hidden&quot; name=&quot;newwindow&lt;?php echo $intCounter; ?&gt;&quot; id=&quot;newwindow&lt;?php echo $intCounter; ?&gt;&quot; value=&quot;0&quot; /&gt;
+                                                
+                                                &lt;?php $parentli = $post-&gt;ID; ?&gt;
+                                                &lt;?php $intCounter++; ?&gt;                                        
+                                                &lt;?php
+                                                
+                                                        //Recursive function
+                                                        $intCounter = wp_custom_navigation_default_sub_items($post-&gt;ID, $intCounter, $parentli, 'pages', 'menu');
+                                                
+                                                ?&gt;
+                                        
+                                        &lt;/li&gt;
+                                        
+                                        &lt;?php 
+                                        
+                                }
+                                //Sidebar Menu
+                                elseif ($type == 'default')
+                                {
+                                        ?&gt;
+                                         
+                                         &lt;li&gt;
+                                        &lt;dl&gt;
+                                        &lt;dt&gt;
+                                        &lt;?php
+                                                $post_text = htmlentities($post-&gt;post_title);
+                                                $post_url = get_permalink($post-&gt;ID);
+                                                $post_id = $post-&gt;ID;
+                                                $post_parent_id = $post-&gt;post_parent;
+                                                
+                                                        $description = htmlentities(get_post_meta($post_id, 'page-description', true));
+                                                        
+                                        ?&gt;
+                                        &lt;?php $templatedir = get_bloginfo('url'); ?&gt;
+                                        
+                                        &lt;span class=&quot;title&quot;&gt;&lt;?php echo $post-&gt;post_title; ?&gt;&lt;/span&gt; &lt;a onclick=&quot;appendToList('&lt;?php echo $templatedir; ?&gt;','Page','&lt;?php echo $post_text; ?&gt;','&lt;?php echo $post_url; ?&gt;','&lt;?php echo $post_id; ?&gt;','&lt;?php echo $post_parent_id ?&gt;','&lt;?php echo $description; ?&gt;')&quot; name=&quot;&lt;?php echo $post_text; ?&gt;&quot; value=&quot;&lt;?php echo get_permalink($post-&gt;ID); ?&gt;&quot;&gt;&lt;img alt=&quot;Add to Custom Menu&quot; title=&quot;Add to Custom Menu&quot; src=&quot;&lt;?php echo get_bloginfo('url'); ?&gt;/wp-admin/images/ico-add.png&quot; /&gt;&lt;/a&gt;&lt;/dt&gt;
+                                        &lt;/dl&gt;
+                                        &lt;?php $parentli = $post-&gt;ID; ?&gt;
+                                                &lt;?php $intCounter++; ?&gt;                            
+                                        &lt;?php
+                                                
+                                                        //Recursive function
+                                                        $intCounter = wp_custom_navigation_default_sub_items($post_id, $intCounter, $parentli, 'pages', 'default');
+                                                
+                                                 ?&gt;
+                                                
+                                        &lt;/li&gt;
+        
+                                        &lt;?php 
+                                
+                                }
+                                else
+                                {
+                                
+                                }        
+                        } 
+                } 
+        }
+        else 
+        {
+                echo 'Not Found';
+        }
+
+        return $intCounter;
+}
+
+//Outputs All Categories and Sub Items
+function wp_custom_nav_get_categories($counter, $type) {
+
+        $category_args = array(
+                        'type'                     =&gt; 'post',
+                        'child_of'                 =&gt; 0,
+                        'orderby'                  =&gt; 'name',
+                        'order'                    =&gt; 'ASC',
+                        'hide_empty'               =&gt; false,
+                        'include_last_update_time' =&gt; false,
+                        'hierarchical'             =&gt; 1,
+                        'exclude'                  =&gt; '',
+                        'include'                  =&gt; '',
+                        'number'                   =&gt; '',
+                        'pad_counts'               =&gt; false );
+        
+        
+        
+        $intCounter = $counter;        
+        
+        //GET all categories        
+        $categories_array = get_categories($category_args);
+        
+        if ($categories_array)
+        {
+                //DISPLAY Loop
+                foreach ($categories_array as $cat_item)
+                {
+
+                        if ($cat_item-&gt;parent == 0)
+                        {
+                                //Custom Menu
+                                if ($type == 'menu')
+                                {
+                                        ?&gt;
+            
+                                    &lt;li id=&quot;menu-&lt;?php echo $intCounter; ?&gt;&quot; value=&quot;&lt;?php echo $intCounter; ?&gt;&quot;&gt;
+                                            &lt;dl&gt;
+                                    &lt;dt&gt;
+                                            &lt;span class=&quot;title&quot;&gt;&lt;?php echo $cat_item-&gt;cat_name; ?&gt;&lt;/span&gt;
+                                                        &lt;span class=&quot;controls&quot;&gt;
+                                                        &lt;span class=&quot;type&quot;&gt;category&lt;/span&gt;
+                                                        &lt;a id=&quot;edit&lt;?php echo $intCounter; ?&gt;&quot; onclick=&quot;edititem(&lt;?php echo $intCounter; ?&gt;)&quot; value=&quot;&lt;?php echo $intCounter; ?&gt;&quot;&gt;&lt;img class=&quot;edit&quot; alt=&quot;Edit Menu Item&quot; title=&quot;Edit Menu Item&quot; src=&quot;&lt;?php echo get_bloginfo('url'); ?&gt;/wp-admin/images/ico-edit.png&quot; /&gt;&lt;/a&gt; 
+                                                        &lt;a id=&quot;remove&lt;?php echo $intCounter; ?&gt;&quot; onclick=&quot;removeitem(&lt;?php echo $intCounter; ?&gt;)&quot; value=&quot;&lt;?php echo $intCounter; ?&gt;&quot;&gt;
+                                                                &lt;img class=&quot;remove&quot; alt=&quot;Remove from Custom Menu&quot; title=&quot;Remove from Custom Menu&quot; src=&quot;&lt;?php echo get_bloginfo('url'); ?&gt;/wp-admin/images/ico-close.png&quot; /&gt;
+                                                        &lt;/a&gt;
+                                                        &lt;a target=&quot;_blank&quot; href=&quot;&lt;?php echo get_category_link($cat_item-&gt;cat_ID); ?&gt;&quot;&gt;
+                                                                &lt;img alt=&quot;View Page&quot; title=&quot;View Page&quot; src=&quot;&lt;?php echo get_bloginfo('url'); ?&gt;/wp-admin/images/ico-viewpage.png&quot; /&gt;
+                                                        &lt;/a&gt;
+                                                        &lt;/span&gt;
+                                        
+                                    &lt;/dt&gt;
+                                    &lt;/dl&gt;
+                                    &lt;a class=&quot;hide&quot; href=&quot;&lt;?php echo get_category_link($cat_item-&gt;cat_ID); ?&gt;&quot;&gt;&lt;span class=&quot;title&quot;&gt;&lt;?php echo $cat_item-&gt;cat_name; ?&gt;&lt;/span&gt;
+                                    &lt;?php 
+                                    $use_cats_raw = get_option('wp_settings_custom_nav_descriptions');
+                                                   $use_cats = strtolower($use_cats_raw);
+                                                   if ($use_cats == 'yes') { ?&gt;
+                                    &lt;br/&gt; &lt;span&gt;&lt;?php echo $cat_item-&gt;category_description; ?&gt;&lt;/span&gt;
+                                    &lt;?php } ?&gt;
+                                                    &lt;/a&gt;
+                                    &lt;input type=&quot;hidden&quot; name=&quot;postmenu&lt;?php echo $intCounter; ?&gt;&quot; id=&quot;postmenu&lt;?php echo $intCounter; ?&gt;&quot; value=&quot;&lt;?php echo $cat_item-&gt;cat_ID; ?&gt;&quot; /&gt;
+                                    &lt;input type=&quot;hidden&quot; name=&quot;parent&lt;?php echo $intCounter; ?&gt;&quot; id=&quot;parent&lt;?php echo $intCounter; ?&gt;&quot; value=&quot;0&quot; /&gt;
+                                    &lt;input type=&quot;hidden&quot; name=&quot;title&lt;?php echo $intCounter; ?&gt;&quot; id=&quot;title&lt;?php echo $intCounter; ?&gt;&quot; value=&quot;&lt;?php echo htmlentities($cat_item-&gt;cat_name); ?&gt;&quot; /&gt;
+                                                &lt;input type=&quot;hidden&quot; name=&quot;linkurl&lt;?php echo $intCounter; ?&gt;&quot; id=&quot;linkurl&lt;?php echo $intCounter; ?&gt;&quot; value=&quot;&lt;?php echo get_category_link($cat_item-&gt;cat_ID); ?&gt;&quot; /&gt;
+                                                &lt;input type=&quot;hidden&quot; name=&quot;description&lt;?php echo $intCounter; ?&gt;&quot; id=&quot;description&lt;?php echo $intCounter; ?&gt;&quot; value=&quot;&lt;?php echo htmlentities($cat_item-&gt;category_description); ?&gt;&quot; /&gt;
+                                                &lt;input type=&quot;hidden&quot; name=&quot;icon&lt;?php echo $intCounter; ?&gt;&quot; id=&quot;icon&lt;?php echo $intCounter; ?&gt;&quot; value=&quot;0&quot; /&gt;
+                                                &lt;input type=&quot;hidden&quot; name=&quot;position&lt;?php echo $intCounter; ?&gt;&quot; id=&quot;position&lt;?php echo $intCounter; ?&gt;&quot; value=&quot;&lt;?php echo $intCounter; ?&gt;&quot; /&gt;
+                                                &lt;input type=&quot;hidden&quot; name=&quot;linktype&lt;?php echo $intCounter; ?&gt;&quot; id=&quot;linktype&lt;?php echo $intCounter; ?&gt;&quot; value=&quot;category&quot; /&gt;
+                                                &lt;input type=&quot;hidden&quot; name=&quot;anchortitle&lt;?php echo $intCounter; ?&gt;&quot; id=&quot;anchortitle&lt;?php echo $intCounter; ?&gt;&quot; value=&quot;&lt;?php echo htmlentities($cat_item-&gt;cat_name); ?&gt;&quot; /&gt;
+                                                &lt;input type=&quot;hidden&quot; name=&quot;newwindow&lt;?php echo $intCounter; ?&gt;&quot; id=&quot;newwindow&lt;?php echo $intCounter; ?&gt;&quot; value=&quot;0&quot; /&gt;
+                                                
+                                    &lt;?php $parentli = $cat_item-&gt;cat_ID; ?&gt;
+                                    &lt;?php $intCounter++; ?&gt;                                        
+                                           &lt;?php
+                                                
+                                                        //Recursive function
+                                                        $intCounter = wp_custom_navigation_default_sub_items($cat_item-&gt;cat_ID, $intCounter, $parentli, 'categories','menu');
+                                                        
+                                                ?&gt;
+                                    
+                                    &lt;/li&gt;
+                                    
+                                    &lt;?php 
+                            }
+                            //Sidebar Menu
+                            elseif ($type == 'default')
+                            {
+                                    ?&gt;
+                                    &lt;li&gt;
+                                                &lt;dl&gt;
+                                                &lt;dt&gt;
+                                                &lt;?php
+                                        $post_text = htmlentities($cat_item-&gt;cat_name);
+                                        $post_url = get_category_link($cat_item-&gt;cat_ID);
+                                        $post_id = $cat_item-&gt;cat_ID;
+                                        $post_parent_id = $cat_item-&gt;parent;
+                                        $description = htmlentities(strip_tags($cat_item-&gt;description));
+                                        ?&gt;
+                                        &lt;?php $templatedir = get_bloginfo('url'); ?&gt;
+                                                &lt;span class=&quot;title&quot;&gt;&lt;?php echo $cat_item-&gt;cat_name; ?&gt;&lt;/span&gt; &lt;a onclick=&quot;appendToList('&lt;?php echo $templatedir; ?&gt;','Category','&lt;?php echo $post_text; ?&gt;','&lt;?php echo $post_url; ?&gt;','&lt;?php echo $post_id; ?&gt;','&lt;?php echo $post_parent_id ?&gt;','&lt;?php echo $description; ?&gt;')&quot; name=&quot;&lt;?php echo $post_text; ?&gt;&quot; value=&quot;&lt;?php echo $post_url;  ?&gt;&quot;&gt;&lt;img alt=&quot;Add to Custom Menu&quot; title=&quot;Add to Custom Menu&quot;  src=&quot;&lt;?php echo get_bloginfo('url'); ?&gt;/wp-admin/images/ico-add.png&quot; /&gt;&lt;/a&gt; &lt;/dt&gt;
+                                                &lt;/dl&gt;
+                                                &lt;?php $parentli = $cat_item-&gt;cat_ID; ?&gt;
+                                    &lt;?php $intCounter++; ?&gt;                
+                                                &lt;?php 
+                                                        //Recursive function
+                                                        $intCounter = wp_custom_navigation_default_sub_items($cat_item-&gt;cat_ID, $intCounter, $parentli, 'categories','default');
+                                                ?&gt;
+                                                
+                                        &lt;/li&gt;
+                                        
+                                        &lt;?php 
+                            }        
+                        } 
+                }
+        }
+        else 
+        {
+                echo 'Not Found';
+        }
+        
+        return $intCounter;
+}
+
+//RECURSIVE Sub Menu Items of default categories and pages
+function wp_custom_navigation_default_sub_items($childof, $intCounter, $parentli, $type, $output_type) {
+
+        $counter = $intCounter;
+        
+        //Custom Menu
+        if ($output_type == 'menu') 
+        {
+                $sub_args = array(
+                'child_of' =&gt; $childof,
+                'hide_empty' =&gt; false,
+                'parent' =&gt; $childof);
+        }
+        //Sidebar Menu
+        elseif ($output_type == 'default') 
+        {
+                $sub_args = array(
+                'child_of' =&gt; $childof,
+                'hide_empty' =&gt; false,
+                'parent' =&gt; $childof);
+        }
+        else 
+        {
+                
+        }
+        
+        //Get Sub Category Items                        
+        if ($type == 'categories')
+        {
+                $sub_array = get_categories($sub_args);        
+        }
+        //Get Sub Page Items
+        elseif ($type == 'pages')
+        {
+                $sub_array = get_pages($sub_args);
+        }
+        
+        
+        if ($sub_array)
+        {
+                ?&gt;
+                
+                &lt;ul id=&quot;sub-custom-nav-&lt;?php echo $type ?&gt;&quot;&gt;
+                
+                &lt;?php
+                //DISPLAY Loop
+                foreach ($sub_array as $sub_item)
+                {
+                        //Prepare Menu Data
+                        //Category Menu Item
+                        if ($type == 'categories') 
+                        {
+                                $link = get_category_link($sub_item-&gt;cat_ID);
+                                $title = htmlentities($sub_item-&gt;cat_name);
+                                $parent_id = $sub_item-&gt;cat_ID;
+                                $itemid = $sub_item-&gt;cat_ID;
+                                $linktype = 'category';
+                                $appendtype = 'Category';
+                                $description = htmlentities(strip_tags($sub_item-&gt;description));                                
+                        }
+                        //Page Menu Item
+                        elseif ($type == 'pages')
+                        {
+                                $link = get_permalink($sub_item-&gt;ID);
+                                $title = htmlentities($sub_item-&gt;post_title);
+                                $parent_id = $sub_item-&gt;ID;
+                                $linktype = 'page';
+                                $itemid = $sub_item-&gt;ID;
+                                $appendtype = 'Page';
+                                $description = htmlentities(get_post_meta($itemid, 'page-description', true));
+                        }
+                        //Custom Menu Item
+                        else 
+                        {
+                                $title = '';
+                                $linktype = 'custom';
+                                $appendtype= 'Custom';
+                        }
+                        
+                        //Custom Menu
+                        if ($output_type == 'menu')
+                        {
+                                ?&gt;
+                                &lt;li id=&quot;menu-&lt;?php echo $counter; ?&gt;&quot; value=&quot;&lt;?php echo $counter; ?&gt;&quot;&gt;
+                                        &lt;dl&gt;
+                                        &lt;dt&gt;
+                                                &lt;span class=&quot;title&quot;&gt;&lt;?php echo $title; ?&gt;&lt;/span&gt;
+                                                        &lt;span class=&quot;controls&quot;&gt;
+                                                        &lt;span class=&quot;type&quot;&gt;&lt;?php echo $linktype; ?&gt;&lt;/span&gt;
+                                                        &lt;a id=&quot;edit&lt;?php echo $counter; ?&gt;&quot; onclick=&quot;edititem(&lt;?php echo $counter; ?&gt;)&quot; value=&quot;&lt;?php echo $counter; ?&gt;&quot;&gt;&lt;img class=&quot;edit&quot; alt=&quot;Edit Menu Item&quot; title=&quot;Edit Menu Item&quot; src=&quot;&lt;?php echo get_bloginfo('url'); ?&gt;/wp-admin/images/ico-edit.png&quot; /&gt;&lt;/a&gt; 
+                                                                &lt;a id=&quot;remove&lt;?php echo $counter; ?&gt;&quot; onclick=&quot;removeitem(&lt;?php echo $counter; ?&gt;)&quot; value=&quot;&lt;?php echo $counter; ?&gt;&quot;&gt;
+                                                                        &lt;img class=&quot;remove&quot; alt=&quot;Remove from Custom Menu&quot; title=&quot;Remove from Custom Menu&quot; src=&quot;&lt;?php echo get_bloginfo('url'); ?&gt;/wp-admin/images/ico-close.png&quot; /&gt;
+                                                                &lt;/a&gt;
+                                                                &lt;a target=&quot;_blank&quot; href=&quot;&lt;?php echo $link; ?&gt;&quot;&gt;
+                                                                        &lt;img alt=&quot;View Page&quot; title=&quot;View Page&quot; src=&quot;&lt;?php echo get_bloginfo('url'); ?&gt;/wp-admin/images/ico-viewpage.png&quot; /&gt;
+                                                                &lt;/a&gt;
+                                                &lt;/span&gt;
+                        
+                                        &lt;/dt&gt;
+                                        &lt;/dl&gt;
+                                        &lt;a class=&quot;hide&quot; href=&quot;&lt;?php echo $link; ?&gt;&quot;&gt;&lt;?php echo $title; ?&gt;&lt;/a&gt;
+                                        &lt;input type=&quot;hidden&quot; name=&quot;dbid&lt;?php echo $counter; ?&gt;&quot; id=&quot;dbid&lt;?php echo $counter; ?&gt;&quot; value=&quot;&lt;?php echo $sub_item-&gt;id; ?&gt;&quot; /&gt;
+                                        &lt;input type=&quot;hidden&quot; name=&quot;postmenu&lt;?php echo $counter; ?&gt;&quot; id=&quot;postmenu&lt;?php echo $counter; ?&gt;&quot; value=&quot;&lt;?php echo $parent_id; ?&gt;&quot; /&gt;
+                                        &lt;input type=&quot;hidden&quot; name=&quot;parent&lt;?php echo $counter; ?&gt;&quot; id=&quot;parent&lt;?php echo $counter; ?&gt;&quot; value=&quot;&lt;?php echo $parentli; ?&gt;&quot; /&gt;
+                                        &lt;input type=&quot;hidden&quot; name=&quot;title&lt;?php echo $counter; ?&gt;&quot; id=&quot;title&lt;?php echo $counter; ?&gt;&quot; value=&quot;&lt;?php echo $title; ?&gt;&quot; /&gt;
+                                        &lt;input type=&quot;hidden&quot; name=&quot;linkurl&lt;?php echo $counter; ?&gt;&quot; id=&quot;linkurl&lt;?php echo $counter; ?&gt;&quot; value=&quot;&lt;?php echo $link; ?&gt;&quot; /&gt;
+                                        &lt;input type=&quot;hidden&quot; name=&quot;description&lt;?php echo $counter; ?&gt;&quot; id=&quot;description&lt;?php echo $counter; ?&gt;&quot; value=&quot;&lt;?php echo $description; ?&gt;&quot; /&gt;
+                                        &lt;input type=&quot;hidden&quot; name=&quot;icon&lt;?php echo $counter; ?&gt;&quot; id=&quot;icon&lt;?php echo $counter; ?&gt;&quot; value=&quot;0&quot; /&gt;
+                                        &lt;input type=&quot;hidden&quot; name=&quot;position&lt;?php echo $counter; ?&gt;&quot; id=&quot;position&lt;?php echo $counter; ?&gt;&quot; value=&quot;&lt;?php echo $counter; ?&gt;&quot; /&gt;
+                                        &lt;input type=&quot;hidden&quot; name=&quot;linktype&lt;?php echo $counter; ?&gt;&quot; id=&quot;linktype&lt;?php echo $counter; ?&gt;&quot; value=&quot;&lt;?php echo $linktype; ?&gt;&quot; /&gt;
+                                        &lt;input type=&quot;hidden&quot; name=&quot;anchortitle&lt;?php echo $counter; ?&gt;&quot; id=&quot;anchortitle&lt;?php echo $counter; ?&gt;&quot; value=&quot;&lt;?php echo $title; ?&gt;&quot; /&gt;
+                                        &lt;input type=&quot;hidden&quot; name=&quot;newwindow&lt;?php echo $counter; ?&gt;&quot; id=&quot;newwindow&lt;?php echo $counter; ?&gt;&quot; value=&quot;0&quot; /&gt;
+                                        
+                                        &lt;?php $counter++; ?&gt;
+                                        &lt;?php 
+                                                
+                                                //Do recursion
+                                                $counter = wp_custom_navigation_default_sub_items($parent_id, $counter, $parent_id, $type, 'menu'); 
+                                                
+                                        ?&gt;
+                                        
+                                &lt;/li&gt;
+                                &lt;?php 
+                        }
+                        //Sidebar Menu
+                        elseif ($output_type == 'default')
+                        {
+                                        
+                                ?&gt;
+                                &lt;li&gt;
+                                        &lt;dl&gt;
+                                        &lt;dt&gt;
+                                        
+                                        &lt;?php $templatedir = get_bloginfo('url'); ?&gt;
+                                        &lt;span class=&quot;title&quot;&gt;&lt;?php echo $title; ?&gt;&lt;/span&gt; &lt;a onclick=&quot;appendToList('&lt;?php echo $templatedir; ?&gt;','&lt;?php echo $appendtype; ?&gt;','&lt;?php echo $title; ?&gt;','&lt;?php echo $link; ?&gt;','&lt;?php echo $itemid; ?&gt;','&lt;?php echo $parent_id ?&gt;','&lt;?php echo $description; ?&gt;')&quot; name=&quot;&lt;?php echo $title; ?&gt;&quot; value=&quot;&lt;?php echo $link; ?&gt;&quot;&gt;&lt;img alt=&quot;Add to Custom Menu&quot; title=&quot;Add to Custom Menu&quot; src=&quot;&lt;?php echo get_bloginfo('url'); ?&gt;/wp-admin/images/ico-add.png&quot; /&gt;&lt;/a&gt; &lt;/dt&gt;
+                                        &lt;/dl&gt;
+                                        &lt;?php 
+                                        
+                                                //Do recursion
+                                                $counter = wp_custom_navigation_default_sub_items($itemid, $counter, $parent_id, $type, 'default');
+                                                
+                                        ?&gt;
+                                &lt;/li&gt;
+                                          
+                                &lt;?php 
+                        }
+                        
+                }
+                ?&gt;
+                
+                &lt;/ul&gt;
+                
+        &lt;?php 
+        }
+        
+        return $counter;
+
+}
+
+/*-----------------------------------------------------------------------------------*/
+/* Recursive get children */
+/*-----------------------------------------------------------------------------------*/
+
+function get_children_menu_elements($childof, $intCounter, $parentli, $type, $menu_id, $table_name) {
+
+        $counter = $intCounter;
+        
+        global $wpdb;
+        
+        
+        
+        //Get Sub Category Items                        
+        if ($type == 'categories')
+        {
+                $sub_args = array(
+                        'child_of' =&gt; $childof,
+                        'hide_empty'  =&gt; false,
+                        'parent' =&gt; $childof);
+                $sub_array = get_categories($sub_args);        
+        }
+        //Get Sub Page Items
+        elseif ($type == 'pages')
+        {
+                $sub_args = array(
+                        'child_of' =&gt; $childof,
+                        'parent' =&gt; $childof);
+        
+                $sub_array = get_pages($sub_args);
+                
+        }
+        else {
+        
+        }
+        
+        if ($sub_array)
+        {
+                //DISPLAY Loop
+                foreach ($sub_array as $sub_item)
+                {
+                        if (isset($sub_item-&gt;parent)) {
+                                $sub_item_parent = $sub_item-&gt;parent;
+                        }
+                        elseif (isset($sub_item-&gt;post_parent)) {
+                                $sub_item_parent = $sub_item-&gt;post_parent; 
+                        }
+                        else {
+                        }
+                        //Is child
+                        if ($sub_item_parent == $childof)
+                        {
+                                //Prepare Menu Data
+                                //Category Menu Item
+                                if ($type == 'categories') 
+                                {
+                                        $link = get_category_link($sub_item-&gt;cat_ID);
+                                        $title = htmlentities($sub_item-&gt;cat_name);
+                                        $parent_id = $sub_item-&gt;category_parent;
+                                        $itemid = $sub_item-&gt;cat_ID;
+                                        $linktype = 'category';
+                                        $appendtype= 'Category';
+                                }
+                                //Page Menu Item
+                                elseif ($type == 'pages')
+                                {
+                                        $link = get_permalink($sub_item-&gt;ID);
+                                        $title = htmlentities($sub_item-&gt;post_title);
+                                        $parent_id = $sub_item-&gt;post_parent;
+                                        $linktype = 'page';
+                                        $itemid = $sub_item-&gt;ID;
+                                        $appendtype= 'Page';
+                                }
+                                //Custom Menu Item
+                                else 
+                                {
+                                        $title = '';
+                                        $linktype = 'custom';
+                                        $appendtype= 'Custom';
+                                }
+                                
+                                //CHECK for existing parent records
+                                //echo $parent_id;
+                                $wp_result = $wpdb-&gt;get_results(&quot;SELECT id FROM &quot;.$table_name.&quot; WHERE post_id='&quot;.$parent_id.&quot;' AND link_type='&quot;.$linktype.&quot;' AND menu_id='&quot;.$menu_id.&quot;'&quot;);
+                                if ($wp_result &gt; 0 &amp;&amp; isset($wp_result[0]-&gt;id)) {
+                                        $parent_id = $wp_result[0]-&gt;id;
+                                }
+                                else {
+                                        //$parent_id = 0;
+                                }
+                                
+                                //INSERT item
+                                $insert = &quot;INSERT INTO &quot;.$table_name.&quot; (position,post_id,parent_id,custom_title,custom_link,custom_description,menu_icon,link_type,menu_id,custom_anchor_title) &quot;.&quot;VALUES ('&quot;.$counter.&quot;','&quot;.$itemid.&quot;','&quot;.$parent_id.&quot;','&quot;.$title.&quot;','&quot;.$link.&quot;','','','&quot;.$linktype.&quot;','&quot;.$menu_id.&quot;','&quot;.$title.&quot;')&quot;;
+                                  $results = $wpdb-&gt;query( $insert );
+         
+                                  $counter++;
+                                  $counter = get_children_menu_elements($itemid, $counter, $parent_id, $type, $menu_id, $table_name);
+                        }        
+                        //Do nothing
+                        else {
+                        
+                        }
+                }
+        }
+        return $counter;
+}
+
+
+?&gt;
</ins></span></pre></div>
<a id="trunkwpincludesdefaultwidgetsphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/default-widgets.php (13256 => 13257)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/default-widgets.php        2010-02-20 21:09:49 UTC (rev 13256)
+++ trunk/wp-includes/default-widgets.php        2010-02-20 21:57:43 UTC (rev 13257)
</span><span class="lines">@@ -1001,6 +1001,379 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> /**
</span><ins>+ * Custom Navigation widget class
+ *
+ * @since 3.0.0
+ */
+ class WP_CustomNavWidget extends WP_Widget {
+
+        function WP_CustomNavWidget() {
+                $widget_ops = array('description' =&gt; 'Use this widget to add one of your Custom Navigation Menus as a widget.' );
+                parent::WP_Widget(false, __('Custom Navigation Menu'),$widget_ops);      
+        }
+
+        function widget($args, $instance) {  
+                $navmenu = $instance['navmenu'];
+                $navtitle = $instance['navtitle'];
+                $navdeveloper = strtolower($instance['navdeveloper']);
+                $navdiv = strtolower($instance['navdiv']);
+                $navul = strtolower($instance['navul']);
+                $navdivid = $instance['navdivid'];
+                $navdivclass = $instance['navdivclass'];
+                $navulid = $instance['navulid'];
+                $navulclass = $instance['navulclass'];
+                
+                //Override for menu descriptions
+                $advanced_option_descriptions = get_option('wp_settings_custom_nav_advanced_options');
+                if ($advanced_option_descriptions == 'no') 
+                {  
+                        $navwidgetdescription = 2;
+                } 
+                else
+                {
+                        $navwidgetdescription = $instance['navwidgetdescription'];
+                }
+                $menuexists = false;
+                
+                global $wpdb;
+                
+                //GET menu name
+                if ($navmenu &gt; 0)
+                {
+                        $table_name_menus = $wpdb-&gt;prefix . &quot;custom_nav_menus&quot;;
+                        $wp_result = $wpdb-&gt;get_results(&quot;SELECT menu_name FROM &quot;.$table_name_menus.&quot; WHERE id='&quot;.$navmenu.&quot;'&quot;);
+                        $wp_custom_nav_menu_name = $wp_result[0]-&gt;menu_name;
+                        $menuexists = true;
+                }
+                //Do nothing
+                else 
+                {
+                        $menuexists = false;
+                }
+                ?&gt;
+                
+                &lt;?php 
+                        //DEVELOPER settings enabled
+                        if ($navdeveloper == 'yes') 
+                        { 
+                                //DISPLAY Custom DIV
+                                if ($navdiv == 'yes') 
+                                { 
+                                        ?&gt;
+                                        &lt;div id=&quot;&lt;?php echo $navdivid;  ?&gt;&quot; class=&quot;&lt;?php echo $navdivclass; ?&gt;&quot;&gt;
+                                        &lt;?php 
+                                }
+                                //Do NOT display DIV
+                                else 
+                                {
+                                        
+                                } 
+                                
+                        } 
+                        //DISPLAY default DIV
+                        else 
+                        {
+                                ?&gt;
+                                &lt;div class=&quot;widget&quot;&gt;
+                                &lt;?php 
+                        }
+                ?&gt;
+                
+                        &lt;h3&gt;&lt;?php echo $navtitle; ?&gt;&lt;/h3&gt;
+                        &lt;?php 
+                        
+                        if ($menuexists) 
+                        {
+                                ?&gt;
+                        &lt;?php 
+                        
+                        //DEVELOPER settings enabled
+                                if ($navdeveloper == 'yes') 
+                                { 
+                                        //DISPLAY Custom UL
+                                        if ($navul == 'yes') 
+                                        { 
+                                                ?&gt;
+                                                &lt;ul id=&quot;&lt;?php echo $navulid;  ?&gt;&quot; class=&quot;&lt;?php echo $navulclass; ?&gt;&quot;&gt;
+                                                &lt;?php 
+                                        }
+                                        //Do NOT display UL
+                                        else 
+                                        {
+                                                
+                                        } 
+                                        
+                                } 
+                                //DISPLAY default UL
+                                else 
+                                {
+                                        ?&gt;
+                                        &lt;ul class=&quot;custom-nav&quot;&gt;
+                                        &lt;?php 
+                                }
+                        
+                        ?&gt;
+                                
+                                                &lt;?php
+                                                        //DISPLAY custom navigation menu
+                                                        if (get_option('wp_custom_nav_menu') == 'true') {
+                                                        custom_nav('name='.$wp_custom_nav_menu_name.'&amp;desc='.$navwidgetdescription);
+                                                }                                
+                                                ?&gt;
+                                
+                                &lt;?php 
+                                
+                                        //DEVELOPER settings enabled
+                                        if ($navdeveloper == 'yes') 
+                                        { 
+                                                //DISPLAY Custom UL
+                                                if ($navul == 'yes') 
+                                                { 
+                                                        ?&gt;
+                                                        &lt;/ul&gt;
+                                                        &lt;?php 
+                                                }
+                                                //Do NOT display UL
+                                                else 
+                                                {
+                                                        
+                                                } 
+                                                
+                                        } 
+                                        //DISPLAY default UL
+                                        else 
+                                        {
+                                                ?&gt;
+                                                &lt;/ul&gt;
+                                                &lt;?php 
+                                        }
+                                        
+                                ?&gt;
+                        &lt;?php
+                        }
+                        else
+                        {
+                                echo &quot;You have not setup the custom navigation widget correctly, please check your settings in the backend.&quot;;
+                        }
+                        ?&gt;
+                &lt;?php 
+                        //DEVELOPER settings enabled
+                        if ($navdeveloper == 'yes') 
+                        { 
+                                //DISPLAY Custom DIV
+                                if ($navdiv == 'yes') 
+                                { 
+                                        ?&gt;
+                                        &lt;/div&gt;
+                                        &lt;?php 
+                                }
+                                //Do NOT display DIV
+                                else 
+                                {
+                                        
+                                } 
+                                
+                        } 
+                        //DISPLAY default DIV
+                        else 
+                        {
+                                ?&gt;
+                                &lt;/div&gt;
+                                &lt;?php 
+                        }
+                ?&gt;&lt;!-- /#nav-container --&gt;
+                        
+                        &lt;?php
+        }
+
+        function update($new_instance, $old_instance) {                
+                return $new_instance;
+        }
+
+        function form($instance) {        
+                $navmenu = esc_attr($instance['navmenu']);
+                $navtitle = esc_attr($instance['navtitle']);
+                $navdeveloper = esc_attr($instance['navdeveloper']);
+                $navdiv = esc_attr($instance['navdiv']);
+                $navul = esc_attr($instance['navul']);
+                $navdivid = esc_attr($instance['navdivid']);
+                $navdivclass = esc_attr($instance['navdivclass']);
+                $navulid = esc_attr($instance['navulid']);
+                $navulclass = esc_attr($instance['navulclass']);
+                $navwidgetdescription = esc_attr($instance['navwidgetdescription']);
+                                
+                global $wpdb;
+                                
+                //GET Menu Items for SELECT OPTIONS         
+                $table_name_custom_menus = $wpdb-&gt;prefix . &quot;custom_nav_menus&quot;;
+                $custom_menu_records = $wpdb-&gt;get_results(&quot;SELECT id,menu_name FROM &quot;.$table_name_custom_menus);
+                
+                //CHECK if menus exist
+                if ($custom_menu_records &gt; 0)
+                {
+                
+                        ?&gt;
+                        
+                         &lt;p&gt;
+                    &lt;label for=&quot;&lt;?php echo $this-&gt;get_field_id('navmenu'); ?&gt;&quot;&gt;&lt;?php _e('Select Menu:'); ?&gt;&lt;/label&gt;
+                                
+                                &lt;select id=&quot;&lt;?php echo $this-&gt;get_field_id('navmenu'); ?&gt;&quot; name=&quot;&lt;?php echo $this-&gt;get_field_name('navmenu'); ?&gt;&quot;&gt;
+                                        &lt;?php 
+                                        
+                                        //DISPLAY SELECT OPTIONS
+                                        foreach ($custom_menu_records as $custom_menu_record)
+                                        {
+                                                if ($navmenu == $custom_menu_record-&gt;id) {
+                                                        $selected_option = 'selected=&quot;selected&quot;';
+                                                }
+                                                else {
+                                                        $selected_option = '';
+                                                }
+                                                ?&gt;
+                                                &lt;option value=&quot;&lt;?php echo $custom_menu_record-&gt;id; ?&gt;&quot; &lt;?php echo $selected_option; ?&gt;&gt;&lt;?php echo $custom_menu_record-&gt;menu_name; ?&gt;&lt;/option&gt;
+                                                &lt;?php
+                                                
+                                        }
+                                        ?&gt;
+                                &lt;/select&gt;
+        
+                        &lt;/p&gt;
+                        
+                        &lt;p&gt;
+                                
+                        &lt;label for=&quot;&lt;?php echo $this-&gt;get_field_id('navtitle'); ?&gt;&quot;&gt;&lt;?php _e('Title:'); ?&gt;&lt;/label&gt;
+                            &lt;input type=&quot;text&quot; name=&quot;&lt;?php echo $this-&gt;get_field_name('navtitle'); ?&gt;&quot; value=&quot;&lt;?php echo $navtitle; ?&gt;&quot; class=&quot;widefat&quot; id=&quot;&lt;?php echo $this-&gt;get_field_id('navtitle'); ?&gt;&quot; /&gt;
+                    &lt;/p&gt;
+                    
+                    &lt;p&gt;
+                        &lt;?php
+                            $checked = strtolower($navdeveloper);
+                        ?&gt;
+                        
+                        &lt;label for=&quot;&lt;?php echo $this-&gt;get_field_id('navdeveloper'); ?&gt;&quot;&gt;&lt;?php _e('Advanced Options:'); ?&gt;&lt;/label&gt;&lt;br /&gt;            
+                        &lt;span class=&quot;checkboxes&quot;&gt;
+                                   &lt;label&gt;Yes&lt;/label&gt;&lt;input type=&quot;radio&quot; id=&quot;&lt;?php echo $this-&gt;get_field_name('navdeveloper'); ?&gt;&quot; name=&quot;&lt;?php echo $this-&gt;get_field_name('navdeveloper'); ?&gt;&quot; value=&quot;yes&quot; &lt;?php if ($checked=='yes') { echo 'checked=&quot;checked&quot;'; } ?&gt; /&gt;
+                            &lt;label&gt;No&lt;/label&gt;&lt;input type=&quot;radio&quot; id=&quot;&lt;?php echo $this-&gt;get_field_name('navdeveloper'); ?&gt;&quot; name=&quot;&lt;?php echo $this-&gt;get_field_name('navdeveloper'); ?&gt;&quot; value=&quot;no&quot; &lt;?php if ($checked=='yes') { } else { echo 'checked=&quot;checked&quot;'; } ?&gt; /&gt;
+                        &lt;/span&gt;&lt;!-- /.checkboxes --&gt;
+                        
+                        &lt;/p&gt;
+                    
+                    &lt;?php 
+                    
+                    //DEVELOPER settings
+                    if ($checked == 'yes')
+                    {
+                            ?&gt;
+                            
+                            &lt;p&gt;
+                                &lt;?php
+                                    $checked = strtolower($navdiv);
+                                ?&gt;
+                                
+                                &lt;label for=&quot;&lt;?php echo $this-&gt;get_field_id('navdiv'); ?&gt;&quot;&gt;&lt;?php _e('Wrap in container DIV:'); ?&gt;&lt;/label&gt;&lt;br /&gt;        
+                                &lt;span class=&quot;checkboxes&quot;&gt;
+                                           &lt;label&gt;Yes&lt;/label&gt;&lt;input type=&quot;radio&quot; id=&quot;&lt;?php echo $this-&gt;get_field_name('navdiv'); ?&gt;&quot; name=&quot;&lt;?php echo $this-&gt;get_field_name('navdiv'); ?&gt;&quot; value=&quot;yes&quot; &lt;?php if ($checked=='yes') { echo 'checked=&quot;checked&quot;'; } ?&gt; /&gt;
+                                    &lt;label&gt;No&lt;/label&gt;&lt;input type=&quot;radio&quot; id=&quot;&lt;?php echo $this-&gt;get_field_name('navdiv'); ?&gt;&quot; name=&quot;&lt;?php echo $this-&gt;get_field_name('navdiv'); ?&gt;&quot; value=&quot;no&quot; &lt;?php if ($checked=='yes') { } else { echo 'checked=&quot;checked&quot;'; } ?&gt; /&gt;
+                                &lt;/span&gt;&lt;!-- /.checkboxes --&gt;
+                        
+                        &lt;/p&gt;
+                        
+                        &lt;?php
+                        
+                        if ($checked == 'yes')
+                        {
+                        
+                                ?&gt;
+                                
+                                &lt;p&gt;
+                                
+                            &lt;label for=&quot;&lt;?php echo $this-&gt;get_field_id('navdivid'); ?&gt;&quot;&gt;&lt;?php _e('DIV id:'); ?&gt;&lt;/label&gt;
+                            &lt;input type=&quot;text&quot; name=&quot;&lt;?php echo $this-&gt;get_field_name('navdivid'); ?&gt;&quot; value=&quot;&lt;?php echo $navdivid; ?&gt;&quot; class=&quot;widefat&quot; id=&quot;&lt;?php echo $this-&gt;get_field_id('navdivid'); ?&gt;&quot; /&gt;
+                        &lt;/p&gt;
+                        &lt;p&gt;
+                                
+                            &lt;label for=&quot;&lt;?php echo $this-&gt;get_field_id('navdivclass'); ?&gt;&quot;&gt;&lt;?php _e('DIV class:'); ?&gt;&lt;/label&gt;
+                            &lt;input type=&quot;text&quot; name=&quot;&lt;?php echo $this-&gt;get_field_name('navdivclass'); ?&gt;&quot; value=&quot;&lt;?php echo $navdivclass; ?&gt;&quot; class=&quot;widefat&quot; id=&quot;&lt;?php echo $this-&gt;get_field_id('navdivclass'); ?&gt;&quot; /&gt;
+                        &lt;/p&gt;
+                                
+                                &lt;?php
+                                
+                        }
+                        
+                        ?&gt;
+                        
+                        &lt;p&gt;
+                                &lt;?php
+                                    $checked = strtolower($navul);
+                                ?&gt;
+                                
+                                &lt;label for=&quot;&lt;?php echo $this-&gt;get_field_id('navul'); ?&gt;&quot;&gt;&lt;?php _e('Wrap in container UL:'); ?&gt;&lt;/label&gt;&lt;br /&gt;            
+                                &lt;span class=&quot;checkboxes&quot;&gt;
+                                           &lt;label&gt;Yes&lt;/label&gt;&lt;input type=&quot;radio&quot; id=&quot;&lt;?php echo $this-&gt;get_field_name('navul'); ?&gt;&quot; name=&quot;&lt;?php echo $this-&gt;get_field_name('navul'); ?&gt;&quot; value=&quot;yes&quot; &lt;?php if ($checked=='yes') { echo 'checked=&quot;checked&quot;'; } ?&gt; /&gt;
+                                    &lt;label&gt;No&lt;/label&gt;&lt;input type=&quot;radio&quot; id=&quot;&lt;?php echo $this-&gt;get_field_name('navul'); ?&gt;&quot; name=&quot;&lt;?php echo $this-&gt;get_field_name('navul'); ?&gt;&quot; value=&quot;no&quot; &lt;?php if ($checked=='yes') { } else { echo 'checked=&quot;checked&quot;'; } ?&gt; /&gt;
+                                &lt;/span&gt;&lt;!-- /.checkboxes --&gt;
+                        
+                        &lt;/p&gt;
+                        
+                        &lt;?php
+                
+                        if ($checked == 'yes')
+                        {
+                        
+                                ?&gt;
+                                
+                                &lt;p&gt;
+                                
+                            &lt;label for=&quot;&lt;?php echo $this-&gt;get_field_id('navulid'); ?&gt;&quot;&gt;&lt;?php _e('UL id:'); ?&gt;&lt;/label&gt;
+                            &lt;input type=&quot;text&quot; name=&quot;&lt;?php echo $this-&gt;get_field_name('navulid'); ?&gt;&quot; value=&quot;&lt;?php echo $navulid; ?&gt;&quot; class=&quot;widefat&quot; id=&quot;&lt;?php echo $this-&gt;get_field_id('navulid'); ?&gt;&quot; /&gt;
+                        &lt;/p&gt;
+                        &lt;p&gt;
+                                
+                            &lt;label for=&quot;&lt;?php echo $this-&gt;get_field_id('navulclass'); ?&gt;&quot;&gt;&lt;?php _e('UL class:'); ?&gt;&lt;/label&gt;
+                            &lt;input type=&quot;text&quot; name=&quot;&lt;?php echo $this-&gt;get_field_name('navulclass'); ?&gt;&quot; value=&quot;&lt;?php echo $navulclass; ?&gt;&quot; class=&quot;widefat&quot; id=&quot;&lt;?php echo $this-&gt;get_field_id('navulclass'); ?&gt;&quot; /&gt;
+                        &lt;/p&gt;
+                                
+                                &lt;?php
+                                
+                        }
+                        
+                        ?&gt;
+                        &lt;?php $advanced_option_descriptions = get_option('wp_settings_custom_nav_advanced_options'); ?&gt;
+                        &lt;p &lt;?php if ($advanced_option_descriptions == 'no') { ?&gt;style=&quot;display:none;&quot;&lt;?php } ?&gt;&gt;
+                        
+                   &lt;?php
+                                    $checked = strtolower($navwidgetdescription);
+                                ?&gt;
+                                
+                                &lt;label for=&quot;&lt;?php echo $this-&gt;get_field_id('navwidgetdescription'); ?&gt;&quot;&gt;&lt;?php _e('Show Top Level Descriptions:'); ?&gt;&lt;/label&gt;&lt;br /&gt;            
+                                &lt;span class=&quot;checkboxes&quot;&gt;
+                                           &lt;label&gt;Yes&lt;/label&gt;&lt;input type=&quot;radio&quot; id=&quot;&lt;?php echo $this-&gt;get_field_name('navwidgetdescription'); ?&gt;&quot; name=&quot;&lt;?php echo $this-&gt;get_field_name('navwidgetdescription'); ?&gt;&quot; value=&quot;1&quot; &lt;?php if ($checked=='1') { echo 'checked=&quot;checked&quot;'; } ?&gt; /&gt;
+                                    &lt;label&gt;No&lt;/label&gt;&lt;input type=&quot;radio&quot; id=&quot;&lt;?php echo $this-&gt;get_field_name('navwidgetdescription'); ?&gt;&quot; name=&quot;&lt;?php echo $this-&gt;get_field_name('navwidgetdescription'); ?&gt;&quot; value=&quot;2&quot; &lt;?php if ($checked=='1') { } else { echo 'checked=&quot;checked&quot;'; } ?&gt; /&gt;
+                                &lt;/span&gt;&lt;!-- /.checkboxes --&gt;
+                &lt;/p&gt;
+                            &lt;?php 
+                    }
+                    //Do nothing
+                    else 
+                    {
+                            
+                    }
+                        
+                }
+                //Error message for menus not existing
+                else 
+                {
+                        ?&gt;
+                        &lt;p&gt;
+                            &lt;label&gt;&lt;?php _e('The Custom Navigation has not been configured correctly.  Please check your Custom Navigation settings before adding this widget.'); ?&gt;&lt;/label&gt;
+                        &lt;/p&gt;
+                        &lt;?php
+                }
+        }
+        
+}
+
+/**
</ins><span class="cx">  * Register all of the default WordPress widgets on startup.
</span><span class="cx">  *
</span><span class="cx">  * Calls 'widgets_init' action after all of the WordPress widgets have been
</span><span class="lines">@@ -1035,7 +1408,9 @@
</span><span class="cx">         register_widget('WP_Widget_RSS');
</span><span class="cx"> 
</span><span class="cx">         register_widget('WP_Widget_Tag_Cloud');
</span><del>-
</del><ins>+        
+        register_widget('WP_CustomNavWidget');
+        
</ins><span class="cx">         do_action('widgets_init');
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkwpincludesgeneraltemplatephp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/general-template.php (13256 => 13257)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/general-template.php        2010-02-20 21:09:49 UTC (rev 13256)
+++ trunk/wp-includes/general-template.php        2010-02-20 21:57:43 UTC (rev 13257)
</span><span class="lines">@@ -2215,4 +2215,14 @@
</span><span class="cx">         return apply_filters( &quot;get_the_generator_{$type}&quot;, $gen, $type );
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+/**
+ * Outputs the Custom Navigation.
+ *
+ * @since 3.0.0
+ */
+function custom_nav($args = array()) {
+        require_once (ABSPATH . WPINC . '/custom-navigation-functions.php');
+        wp_custom_navigation_output($args);
+}
+
</ins><span class="cx"> ?&gt;
</span></span></pre></div>
<a id="trunkwpincludespostphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/post.php (13256 => 13257)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/post.php        2010-02-20 21:09:49 UTC (rev 13256)
+++ trunk/wp-includes/post.php        2010-02-20 21:57:43 UTC (rev 13257)
</span><span class="lines">@@ -63,6 +63,14 @@
</span><span class="cx">                                                                                         'query_var' =&gt; false,
</span><span class="cx">                                                                                 ) );
</span><span class="cx"> 
</span><ins>+        register_post_type( 'menu_item', array(        'public' =&gt; false,
+                                                                                        'show_ui' =&gt; false,
+                                                                                        '_builtin' =&gt; true,
+                                                                                        'capability_type' =&gt; 'post',
+                                                                                        'hierarchical' =&gt; false,
+                                                                                        'rewrite' =&gt; false,
+                                                                                        'query_var' =&gt; false,
+                                                                                ) );
</ins><span class="cx">         register_post_status( 'publish', array(        'label' =&gt; _x('Published', 'post'),
</span><span class="cx">                                                                                         'public' =&gt; true,
</span><span class="cx">                                                                                         '_builtin' =&gt; true,
</span><span class="lines">@@ -105,6 +113,18 @@
</span><span class="cx">                                                                                         '_builtin' =&gt; true,
</span><span class="cx">                                                                                         'label_count' =&gt; _n_noop('Auto-Draft &lt;span class=&quot;count&quot;&gt;(%s)&lt;/span&gt;', 'Auto-Drafts &lt;span class=&quot;count&quot;&gt;(%s)&lt;/span&gt;')
</span><span class="cx">                                                                                 ) );
</span><ins>+
+        register_post_status( 'menu-category', array(        'internal' =&gt; true,
+                                                                                        '_builtin' =&gt; true
+                                                                                ) );
+
+        register_post_status( 'menu-page', array(        'internal' =&gt; true,
+                                                                                        '_builtin' =&gt; true
+                                                                                ) );
+
+        register_post_status( 'menu-custom', array(        'internal' =&gt; true,
+                                                                                        '_builtin' =&gt; true
+                                                                                ) );
</ins><span class="cx"> }
</span><span class="cx"> add_action( 'init', 'create_initial_post_types', 0 ); // highest priority
</span><span class="cx"> 
</span><span class="lines">@@ -4494,4 +4514,4 @@
</span><span class="cx"> 
</span><span class="cx">                 add_filter('the_preview', '_set_preview');
</span><span class="cx">         }
</span><del>-}
</del><span class="cx">\ No newline at end of file
</span><ins>+}
</ins></span></pre></div>
<a id="trunkwpincludesscriptloaderphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/script-loader.php (13256 => 13257)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/script-loader.php        2010-02-20 21:09:49 UTC (rev 13256)
+++ trunk/wp-includes/script-loader.php        2010-02-20 21:57:43 UTC (rev 13257)
</span><span class="lines">@@ -394,6 +394,21 @@
</span><span class="cx">                 ) );
</span><span class="cx"> 
</span><span class="cx">         }
</span><ins>+        
+        //Custom Navigation
+
+        $scripts-&gt;add( 'custom-navigation-jquery', '/wp-admin/js/custom-navigation-custom-jquery-1.3.2.js', false, '1.3.2' );
+                
+        $scripts-&gt;add( 'custom-navigation-ui-custom', '/wp-admin/js/custom-navigation-custom-jquery-ui-1.7.2.js', array('custom-navigation-jquery'), '1.7.2' );
+        $scripts-&gt;add_data( 'custom-navigation-ui-custom', 'group', 1 );
+        
+        $scripts-&gt;add( 'custom-navigation-autocomplete', '/wp-admin/js/custom-navigation-custom-jquery-autocomplete.js', array('custom-navigation-jquery'), '1.0.0' );
+        $scripts-&gt;add_data( 'custom-navigation-autocomplete', 'group', 1 );
+        
+        $scripts-&gt;add( 'custom-navigation-default-items', '/wp-admin/js/custom-navigation-default-items.js', false, '1.0.0' );
+        $scripts-&gt;add( 'custom-navigation-dynamic-functions', '/wp-admin/js/custom-navigation-dynamic-functions.js', false, '1.0.0' );
+        $scripts-&gt;add( 'custom-navigation-php-functions', '/wp-admin/js/custom-navigation-php-functions.js', false, '1.0.0' );
+        
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> /**
</span><span class="lines">@@ -459,7 +474,8 @@
</span><span class="cx">         $styles-&gt;add( 'farbtastic', '/wp-admin/css/farbtastic.css', array(), '1.2' );
</span><span class="cx">         $styles-&gt;add( 'jcrop', '/wp-includes/js/jcrop/jquery.Jcrop.css', array(), '0.9.8' );
</span><span class="cx">         $styles-&gt;add( 'imgareaselect', '/wp-includes/js/imgareaselect/imgareaselect.css', array(), '0.9.1' );
</span><del>-
</del><ins>+        $styles-&gt;add( 'custom-navigation', &quot;/wp-admin/css/custom-navigation$suffix.css&quot;, array(), '20100215' );
+        
</ins><span class="cx">         foreach ( $rtl_styles as $rtl_style )
</span><span class="cx">                 $styles-&gt;add_data( $rtl_style, 'rtl', true );
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkwpincludestaxonomyphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/taxonomy.php (13256 => 13257)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/taxonomy.php        2010-02-20 21:09:49 UTC (rev 13256)
+++ trunk/wp-includes/taxonomy.php        2010-02-20 21:57:43 UTC (rev 13257)
</span><span class="lines">@@ -38,6 +38,11 @@
</span><span class="cx">                                                                                                         '_builtin' =&gt; true
</span><span class="cx">                                                                                                 ) ) ;
</span><span class="cx"> 
</span><ins>+        register_taxonomy( 'menu', 'post', array(        'hierarchical' =&gt; false,
+                                                                                                                'query_var' =&gt; false,
+                                                                                                                'rewrite' =&gt; false
+                                                                                                        ) ) ;
+
</ins><span class="cx">         register_taxonomy( 'link_category', 'link', array(        'hierarchical' =&gt; false,
</span><span class="cx">                                                                                                                   'label' =&gt; __('Categories'),
</span><span class="cx">                                                                                                                 'query_var' =&gt; false,
</span></span></pre>
</div>
</div>

</body>
</html>