$(document).ready(function() {
        // more IE6 hackage
        if($.browser.msie && $.browser.version == '6.0'){
            //change path below to /images/2/slideshow.png
            $('#slider').html('<img id="sliderimg" src="/images/2/Image3.jpg" alt="Slide Show" width="516px" height="285px" />');
            $('body').supersleight('#slider');
/*
            $('#slider').css({ 
                    'margin':'0px 15px 0px 0px'
            });
*/
        }
        
        /*
         * Contract lists, if not displaying all
         **************************************/
        $('.docgroup div').hide();
        $('.docgroup h2').css({
                'background':'transparent url(/pub/images/2/expand.gif) scroll no-repeat center left'
        });
        
        /*
         * Bind toggle images and actions to
         * document list headings
         **************************************/
        $('.docgroup h2').each(function(){
                $(this).bind('click', function(){
                        $(this).next().toggle('fast');
//                        alert($(this).css('background'));
                        if($(this).css('background') == 'transparent url(/pub/images/2/expand.gif) no-repeat scroll left center'){
                            $(this).css('background','transparent url(/pub/images/2/contract.gif) no-repeat scroll left center');
                        }else{
                            $(this).css('background','transparent url(/pub/images/2/expand.gif) no-repeat scroll left center');
                        }
                });
        });
        
        /*
         * Expand lists, if not displaying all
         **************************************/
        $('.filter select').each(function(){
                if(this.value != ''){
                    $('.docgroup div').show();
                    $('.docgroup h2').css({
                            'background':'transparent url(/pub/images/2/contract.gif) scroll no-repeat center left'
                    });
                }
        });
});

