// JavaScript Document

$(function() {
 
    $("#topic_title").autocomplete({
        source: "autocomplete.php",
        minLength: 1,
        select: function(event, ui) {
            var url = ui.item.id;
            if(url != '#') {
                location.href = "/?page=editcomedy&c_id=<?php echo $_GET['c_id'] ?>&d_id="+url+'&p=1';
            }
        },
 
        html: true, // optional (jquery.ui.autocomplete.html.js required)
 
      // optional (if other layers overlap autocomplete list)
        open: function(event, ui) {
            $(".ui-autocomplete").css("z-index", 1000);
        }
    });
 
});