[jQuery] Jquery and IE

[jQuery] Jquery and IE


I'm new in here, english sucks.
I've got a problem with this function:
$(document).ready(function(){
                $("#caixa_disciplinas ul li").each(function(){
                    $(this).click(function(){
                        hora = document.getElementById('hora_'+this.id).value;
                        cod = document.getElementById('cod_'+this.id).value;
                        dia = document.getElementById('dia_'+this.id).value;
                        selecionaDisciplina($(this), 'I');
                        grade(dia,hora,cod,'I');
                    });
                });
            });
            function selecionaDisciplina(elemento, tipo){
             switch(tipo){
             case 'I':
             $(elemento).appendTo("#qdr_selecionadas ul");
                        $(elemento).click(function(){
                            selecionaDisciplina(elemento, 'E');
                            grade(dia,hora,cod,'E');
                        });
             break;
             case 'E':
             $(elemento).appendTo("#caixa_disciplinas ul");
                        $(elemento).click(function(){
                            selecionaDisciplina(elemento, 'I');
                            grade(dia,hora,cod,'I');
                        });
             break;
             default:
                        return false;
             }
             return false;
            }
It works perfectly in FF but never works in IE7.
The script lock and close the browser.
Any Idea?