[jQuery] missing ; before statement

[jQuery] missing ; before statement


I worked and begged on IRC all do to get this code:
<script language="javascript" type="text/javascript">
    $(document).ready(function(){
        $.fn.addTocHandler = function ( ) {
            $("#toc").change (function () {
                $("#book").load("/beta/catalog/extras/class_data.php?
products_id=1&chapter_id=" + $(this).val(), function(){
                    $(this).addTocHandler().fadeIn();
                });
            });
            return this;
            });
        if(undefined===window.chapterList){
            window.chapterList = ['toc'];
         }
        $("#book").load("/beta/catalog/extras/class_data.php?
products_id=1&chapter_id=" + chapterList +"", function(){
            $(this).addTocHandler();
        });
    });
</script>
bur when I ran it I got a the above error. I cant see (and honestly
an not that clear on) any errors made.
Could some one point me in the right direction.
JOsh