$(document).ready(function()
            {
                // Reset the page display
                resetStuff();
                
                // When a tab is clicked "activate" it
                // show it's pane and hide all the other panes
                $("ul.product_nav li a").click(function()
                    {
                       $("ul.product_nav li a").each(function() { $(this).removeClass('active') } );
                       $(this).addClass('active');
                       panelMagic($(this));
                    }
                );
            }
        );
        
        function panelMagic(tab)
        {
            matchMe = (tab.attr('id') + '_frame');
            $("div#frame div").each(function() 
                {
                    if ( $(this).attr("id") == matchMe )
                    {
                        $(this).show("slow");
                    } else {
                        $(this).hide();
                    }
                }
            );
        }
        
        function resetStuff()
        {
            // Initialize the Page... Hide all divs except the default 
            // product (tv) div
            // This also sets the default height of the frame to 200px
            // This should only happen on a page refresh
            $("#frame").css("min-height","15em");
            $("div#frame div").each(function() 
                {
                    $("ul.product_nav li a#tv").addClass('active');
                    if ( $(this).attr("id") != "tv_frame" )
                    {
                        $(this).hide();
                    } 
                }
            );
        }