jQuery Slide Menu in Master Page
I have a ASP.NET custom server control menu with the following jQuery in the head of the master page. The problem is that when I have a button on a regular form it causes the slide action in the side menu in the master page to activate every time it is clicked in the form... how can I prevent this so that the slide action only happens on initial page load or when a different men item is clicked?

    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>
        <script type="text/javascript">
            $(document).ready(function () {
                setTimeout(function () {
                    // Slide
                    $('#menu1 > li > a.expanded + ul').slideToggle('medium');
                    $('#menu1 > li > a').click(function () {
                        $(this).toggleClass('expanded').toggleClass('collapsed').parent().find('> ul').slideToggle('medium');
                    });
                    $('#example1 .expand_all').click(function () {
                        $('#menu1 > li > a.collapsed').addClass('expanded').removeClass('collapsed').parent().find('> ul').slideDown('medium');
                    });
                    $('#example1 .collapse_all').click(function () {
                        $('#menu1 > li > a.expanded').addClass('collapsed').removeClass('expanded').parent().find('> ul').slideUp('medium');
                    });
                }, 250);
            });
        </script>
jQuery Slide Menu in Master Page
===

I have a ASP.NET custom server control menu with the following jQuery in the head of the master page. The problem is that when I have a button on a regular form it causes the slide action in the side menu in the master page to activate every time it is clicked in the form... how can I prevent this so that the slide action only happens on initial page load or when a different men item is clicked?

    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>
        <script type="text/javascript">
            $(document).ready(function () {
                setTimeout(function () {
                    // Slide
                    $('#menu1 > li > a.expanded + ul').slideToggle('medium');
                    $('#menu1 > li > a').click(function () {
                        $(this).toggleClass('expanded').toggleClass('collapsed').parent().find('> ul').slideToggle('medium');
                    });
                    $('#example1 .expand_all').click(function () {
                        $('#menu1 > li > a.collapsed').addClass('expanded').removeClass('collapsed').parent().find('> ul').slideDown('medium');
                    });
                    $('#example1 .collapse_all').click(function () {
                        $('#menu1 > li > a.expanded').addClass('collapsed').removeClass('expanded').parent().find('> ul').slideUp('medium');
                    });
                }, 250);
            });
        </script>