I have tried a couple of auto complete's but non of them works!

When i try it in a empty document & folder it works great.
But when i paste it into my cms... the text field is there but thats all.

I can fill in anything but nothing happens.

Here is my index.php

PHP Code:
<?php
session_start
();

    require 
'libs/content.lib.php';
    require 
'includes/inc_config.php';
    require 
'libs/database.lib.php';
    require 
'libs/gebruiker.lib.php';

    class 
core
    
{
        public 
$db;
        public 
$defaultPagina;
        public 
$config;
        public 
$encodedUrl;

        function 
__construct()
        {
            
$this->db = new db();
            
$this->urlEncoder();
            
            if(
$this->getUrlSegment(1))
            {
                
$this->defaultPagina $this->getUrlSegment(1);
            }
            else
            {
                
$this->defaultPagina "home";
            }
        }
        
        private function 
urlEncoder()
        {
            
$return        = array();
            
            if(isset(
$_GET['vars']) && $_GET['vars'])
            {
                
$varsexplode explode("/",$_GET['vars']);
                if(
$varsexplode)
                {
                    for(
$varNum 1$varNum <= count($varsexplode); $varNum++)
                    {
                        if(
$varsexplode[($varNum 1)]!="")
                        {
                            
$return[$varNum] = $varsexplode[($varNum 1)];
                        }
                    }
                }
            }
            else
            {
                
$return        = array();
            }
            
            
$this->encodedUrl $return;
        }

        public function 
getUrlSegment($number,$no_value_return=FALSE)
        {
            if(isset(
$this->encodedUrl[$number]))
            {
                return 
$this->encodedUrl[$number];
            }
            else
            {
                return 
$no_value_return;
            }
        }
    }
    
    
$core = new core;
        
$content = new content;
    
$gebruiker = new gebruiker;
    
$gebouwen = new gebouwen;
    
$bedrijven = new bedrijven;
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
        <link rel="stylesheet" type="text/css" media="screen" href="<?=ROOT_URL?>css/style.css" />


        
        <script type="text/javascript" src="http://code.jquery.com/jquery-1.5.2.min.js"></script>
        <script type="text/javascript" src="<?=ROOT_URL?>js/jquery.minisuggest.js"></script>

                <script type="text/javascript">
                    $(document).ready(function(){
                      $("#simple-auto").minisuggest({
                         url         :    "<?=ROOT_URL?>/minisuggest.php",
                         maxresults    :    10,
                         params        :    {type:"simple"},
                         onselect    :    function(item){
                             alert("The selected Item Value = "+item.value+" & label = "+item.label);
                         }
                      });
                    });
                </script>
        
        
        <title>Archisource | Ontdek de bronnen van de architectuur!</title>
    </head>
    <body>
        <!-- Wrapper -->
        <div id="wrapper">
            <!-- Header logo -->
            <div id="headerlogo">

            </div>
            <!-- /Header logo -->
            
            <!-- Header login -->
            <div id="headerlogin">
                <?php        
                    
if($gebruiker->gebruikerIngelogd())
                    {
                        echo 
"<table>";
                        echo 
"<tr><td></td><td></td></tr>";
                        
                        if(isset(
$_SESSION["gebruiker"]))
                        {
                            echo 
"<tr><td>Ingelogd als: </td><td>".$_SESSION["gebruiker"]." | <a onClick='return confirmProceed()' href='".ROOT_URL."uitloggen'>uitloggen</a></td></tr>";
                        
                            if(isset(
$_SESSION["bedrijf"]))
                            {
                                echo 
"<tr><td></td><td>".$_SESSION["bedrijf"]."</td></tr>";
                            }
                        }
                        else
                        {
                            echo 
"<tr><td>Ingelogd als: </td><td>".$_SESSION["bedrijf"]." | <a onClick='return confirmProceed()' href='".ROOT_URL."uitloggen'>uitloggen</a></td></tr>";
                        }
                        
                        echo 
"</table>";
                    }
                    else
                    {
                        echo 
"<table>";
                        echo 
"<tr><td></td></tr>";
                        echo 
"<tr><td><a href='".ROOT_URL."home'>Zoeken</a> | <a href='".ROOT_URL."inloggen'>Inloggen</a></td></tr>";
                        echo 
"</table>";
                        echo 
"</form>";                    
                    }
                
?>
            </div>
            <!-- /Header login -->
            
            <!-- Navigatie balk -->
            <div id="nav">
                <ul class="solidblockmenu">
                    <?php                        
                        
// Menu items ophalen
                        
$menuItems $content->getMenuItems();

                        for(
$i 0$i count($menuItems); $i++)
                        {
                            
$separator = ($i == 0) ? "first" "";
                            
                            echo 
"<li class='".$separator."'><a href='".ROOT_URL.$menuItems[$i]['module']."'>".$menuItems[$i]['titel']."</a></li>";
                        }
                        
                        if(isset(
$_SESSION["id"]))
                        {
                            echo 
"<li class=''><a href='".ROOT_URL."mijn_archisource'>Mijn ArchiSource</a></li>";
                        }
                        else
                        {
                            echo 
"<li class=''><a href='".ROOT_URL."aanmelden'>Aanmelden</a></li>";
                        }
                    
?>
                </ul>
            </div>
            <!-- /Navigatie balk -->
            
            <!-- Content -->
            <div id="content">
                <!-- Linker content -->
                <div class="colomn">            
                    <?php
                        
if($core->defaultPagina)
                        {
                            if(
$core->defaultPagina == "uitloggen")
                            {
                                
// Uitloggen
                                
$gebruiker->gebruikerUitloggen();
                            }
                            else
                            {
                                
$content->getModule();
                            }
                        }
                    
?>
                </div>
                <!-- /Linker content -->
                
                <!-- Side bar | Search bar -->
                <div class="sidebar">
                    <!--<p>Sidebar komt hier...<p>-->
                    <a href="<?=ROOT_URL?>aanmelden"><img src="<?=ROOT_URL?>uploads/reclame/lidworden.jpg" /><a/><br/><br/>
                    <a href="<?=ROOT_URL?>gebouwen/toevoegen"><img src="<?=ROOT_URL?>uploads/reclame/Gebouwtoevoegen.jpg" /><a/>
                    <br /><br />
<input type="text" name="simple-auto" id="simple-auto" value="" />
                </div>
                <!-- /Side bar | Search bar -->
            </div>
            <!-- /Content -->
        </div>
        <!-- /Wrapper -->
        
        <!-- Footer -->
        <div id="footer">
            <p><?php
                
echo "<a class='footer' href='".ROOT_URL."home'>Home</a> | <a class='footer' href='".ROOT_URL."faq'>FAQ</a> | <a class='footer' href='".ROOT_URL."contact'>Contact</a> | <a class='footer' href='".ROOT_URL."mijn_archisource'>Mijn ArchiSource</a> | <a class='footer' href='".ROOT_URL."colofon'>Colofon</a> | <a class='footer' href='".ROOT_URL."overons'>Over ArchiSource</a>";
            
?></p>
        </div>
        <!-- /Footer -->
    </body>
</html>
Here the minisuggest.php

PHP Code:
<?php 
    $items 
= array();
    
    if(
$_POST["type"] == "simple"){
        
        
$text "Suspendisse a auctor tellus. Vestibulum venenatis lacus sed felis 
                molestie aliquam. Ut facilisis metus pellentesque erat posuere auctor. 
                Integer tempor faucibus sem ut mattis. Aenean lectus sapien, aliquet a egestas 
                rhoncus, lobortis auctor tellus. Ut ullamcorper eleifend sapien, eget 
                accumsan magna ultrices quis. Aliquam sed sem in ante facilisis bibendum. 
                Vestibulum sit amet leo sed quam fringilla vulputate. Sed bibendum blandit 
                neque eu placerat. Vivamus tristique lorem sit amet neque pulvinar venenatis. 
                Pellentesque nec sapien augue. Cras pharetra faucibus lacus, vitae facilisis 
                erat porta in. Donec in nibh nibh. Pellentesque pretium malesuada eros id 
                laoreet. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices 
                posuere cubilia Curae; Praesent lacus purus, blandit non congue id, volutpat 
                in ante. Vestibulum feugiat est et neque convallis molestie. Curabitur ac 
                eros eu odio eleifend euismod. Maecenas fermentum vehicula quam, eu tincidunt 
                nibh aliquet eget. Aliquam tellus tellus, euismod nec aliquet eu, scelerisque 
                nec neque."
;
        
        
$arr explode(" ",$text);
        
$value $_POST["value"];
        if(
$value){
            
$i 1;
            foreach(
$arr as $key=>$val){
                if(
strpos($val,$value) !== FALSE){
                    
$items[] = array("value"=>$i,"label"=>$val);
                }    
                
$i++;
            }
        }
    }elseif(
$_POST["type"] == "city"){
        
$cities = array(
            
9940    =>    array(
                
"Ertvelde","Evergem","Kluizen","Sleidinge"
            
),
            
9100    =>    array(
                
"Sint-Niklaas","Nieuwkerken-Waas"
            
),
            
9890    =>    array(
                
"Asper","Baaigem","Dikkelvenne","Gavere","Semmerzake","Vurste"
            
)
        );
        
        
$value $_POST["value"];
        if(isset(
$cities[$value])){
            foreach(
$cities[$value] as $key=>$val){
                
$items[] = array("value"=>$key,"label"=>$val);
            }
        }
    }
    
    print 
json_encode($items);
?>
I just can't get it to work. i have spend 2 days on it now

I hope somebody can help me out here!