$(function(){

                                // Accordion
                                $("#accordion").accordion({ header: "h3" });

                                // Tabs
                                $('#tabs').tabs();
                                 $('#index').tabs();


                                // Dialog
                                $('#dialog').dialog({
                                        autoOpen: false,
                                        width: 500,
                                        buttons: {

                                                "schliessen": function() {
                                                        $(this).dialog("close");
                                                }
                                        }
                                });

                                // Dialog Link
                                $('#dialog_link').click(function(){
                                        $('#dialog').dialog('open');
                                        return false;
                                });

                                // Slider
                                $('#slider').slider({
                                        range: true,
                                        values: [17, 67]
                                });

                                // Progressbar
                                $("#progressbar").progressbar({
                                        value: 20
                                });

                                //hover states on the static widgets
                                $('#dialog_link, ul#icons li').hover(
                                        function() { $(this).addClass('ui-state-hover'); },
                                        function() { $(this).removeClass('ui-state-hover'); }
                                );

                        });$(function(){

                                // Accordion
                                $("#accordion").accordion({ header: "h3" });

                                // Tabs
                                $('#tabs').tabs();
                                 $('#index').tabs();


                                // Dialog
                                $('#dialog').dialog({
                                        autoOpen: false,
                                        width: 500,
                                        buttons: {

                                                "schliessen": function() {
                                                        $(this).dialog("close");
                                                }
                                        }
                                });

                                // Dialog Link
                                $('#dialog_link').click(function(){
                                        $('#dialog').dialog('open');
                                        return false;
                                });

                                // Slider
                                $('#slider').slider({
                                        range: true,
                                        values: [17, 67]
                                });

                                // Progressbar
                                $("#progressbar").progressbar({
                                        value: 20
                                });

                                //hover states on the static widgets
                                $('#dialog_link, ul#icons li').hover(
                                        function() { $(this).addClass('ui-state-hover'); },
                                        function() { $(this).removeClass('ui-state-hover'); }
                                );

                        });
$(function(){
            // BUTTONS
            $('.fg-button').hover(
                    function(){ $(this).removeClass('ui-state-default').addClass('ui-state-focus'); },
                    function(){ $(this).removeClass('ui-state-focus').addClass('ui-state-default'); }
            );

            // MENUS
                $('#flat').menu({
                        content: $('#flat').next().html(), // grab content from this page
                        showSpeed: 400
                });

                $('#hierarchy').menu({
                        content: $('#hierarchy').next().html(),
                        crumbDefaultText: ' '
                });

                $('#hierarchybreadcrumb').menu({
                        content: $('#hierarchybreadcrumb').next().html(),
                        backLink: false
                });

                // or from an external source
                $.get('menuContent.html', function(data){ // grab content from another page
                        $('#flyout').menu({ content: data, flyOut: true });
                });
    });