diff --git a/index.php b/index.php
index 34842ec71..ca284ff7e 100644
--- a/index.php
+++ b/index.php
@@ -160,6 +160,7 @@ header('Content-Type: text/html; charset=' . $GLOBALS['charset']);
// ]]>
+
diff --git a/js/helper.js b/js/helper.js
index b7f621126..0a3fbf11c 100644
--- a/js/helper.js
+++ b/js/helper.js
@@ -1,6 +1,6 @@
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
- * Various helper scripts, using mootools.
+ * Various helper scripts, using jQuery.
*
* @version $Id$
*/
@@ -14,7 +14,7 @@ var hash_init_done = 0;
* one.
*/
function setURLHash(hash) {
- if (Browser.Engine.webkit) {
+ if (jQuery.browser.webkit) {
/*
* Setting hash leads to reload in webkit:
* http://www.quirksmode.org/bugreports/archives/2005/05/Safari_13_visual_anomaly_with_windowlocationhref.html
@@ -25,7 +25,8 @@ function setURLHash(hash) {
window.parent.setURLHash(hash);
} else {
/* Do not set if we're not updating frameset */
- if (window.location.pathname.substring(-9, 9) != "index.php") {
+ var path = window.location.pathname;
+ if (path.substring(path.length - 9, path.length) != "index.php") {
return;
}
if (hash_init_done) {
@@ -40,7 +41,7 @@ function setURLHash(hash) {
* Handler for changing url according to the hash part, which is updated
* on each page to allow bookmarks.
*/
-window.addEvent('load', function() {
+jQuery(document).ready(function(){
/* Don't do anything if we're not root Window */
if (window.parent != window && window.parent.setURLHash) {
return;
diff --git a/libraries/common.inc.php b/libraries/common.inc.php
index 5a4afc4b3..fd4f3d1cb 100644
--- a/libraries/common.inc.php
+++ b/libraries/common.inc.php
@@ -546,6 +546,7 @@ $_REQUEST['js_frame'] = PMA_ifSetOr($_REQUEST['js_frame'], '');
*/
$GLOBALS['js_include'] = array();
$GLOBALS['js_include'][] = 'mootools.js';
+$GLOBALS['js_include'][] = 'jquery/jquery-1.4.2-min.js';
$GLOBALS['js_include'][] = 'helper.js';
/**