  $(document).ready(function(){

$('.accordion').accordion({
                autoHeight  : false,
                collapsible : true,
                active      : false // start compressed
        });

                        $('#slider1').anythingSlider({
                        easing          : "easeInQuart",
                                startStopped    : false,
                                theme           : 'metallic',
                                autoPlayLocked  : true,
                                pauseOnHover        : true,
                                resumeDelay     : 5000,
                                delay: 10000,
                                buildArrows     : true,
                toggleArrows    : false,
                                resumeOnVideoEnd    : true,
                                animationTime: 555



                        });

                        $('#slider1').anythingSliderFx({
                '#slider1 li': [ 'fade' ]
                });

                        $('#slider2').anythingSlider({
                                width: 250,
                                startStopped    : false,
                                theme           : 'small',
                                pauseOnHover        : true,
                                autoPlayLocked  : true,
                                resumeDelay     : 10000,
                                delay: 12000,
                                animationTime: 1

                        });




                        //popupmenu

  var toggle = function(direction, display) {
    return function() {
      var self = this;
      var ul = $("ul", this);

      if( ul.css("display") == display && !self["block" + direction] ) {



        self["block" + direction] = true;
        ul["slide" + direction]("fast", function() {
          self["block" + direction] = false;

        });
 if( ul.css("display") != display){
$('li.menu').addClass('activio');
} else {
$('li.menu').removeClass('activio');
}


      }
    };
  }
  $("li.menu").hover(toggle("Down", "none"), toggle("Up", "block"));
  $("li.menu ul").hide();


//glowing cat buttons

$('.CatLevel2 a').append('<span class="hover"></span>').each(function () {
                          var $span = $('> span.hover', this).css('opacity', 0);
                          $(this).hover(function () {
                            $span.stop().fadeTo(350, 1); //Change the number 500 to change the speed of the Fade In
                         }, function () {
                   $span.stop().fadeTo(350, 0); //Change the number 500 to change the speed of the Fade Out
                          });
                });


                });
