// Template Options by escpro design   www.escpro.de
$(function(){

                                // Accordion
                                $("#accordion").accordion({ header: "h3" });
                                // Accordion
                                $("#accordion2").accordion({ header: "h3" });
                                $("#esc_club").accordion({ header: "h3", event: "mouseover", autoHeight: false, navigation: true });
                                // Tabs
                                $('#tabs').tabs();


                                // Dialog
                                $('#dialog').dialog({
                                        autoOpen: false,
                                        width: 600,
                                        buttons: {
                                                "Ok": function() {
                                                        $(this).dialog("close");
                                                },
                                                "Cancel": function() {
                                                        $(this).dialog("close");
                                                }
                                        }
                                });

                                // Dialog Link
                                $('#dialog_link').click(function(){
                                        $('#dialog').dialog('open');
                                        return false;
                                });

                                // Datepicker
                                $('#datepicker').datepicker({
                                        inline: true
                                });

                                // 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'); }
                                );

                        });

// Ipod Menue
$(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 });
                });
    });
