function slideBox(box){
  var elm = box;
  if (!$(elm).hasClass('container')){
    elm = $(elm).parents('.container');
  }

  if ($(elm).hasClass('container')){
    var more = $(elm).find('.more');

    if ($(more).css('display')=='none'){
      $(box).addClass('footer_active');
      $(more).slideDown('fast');
    }else{
      $(box).removeClass('footer_active');
      $(more).slideUp('fast');
    }
  }

  return false;
}

  $(window).load(function(){
    //contactboxes
    $("a.anspbox").fancybox(
                       {'onComplete': function(){
                                        $("#tab").tabs();
                                        $('.ui-tabs-panel').find('a.mail').each(function(){
                                         var mail = $(this).html();
                                         if ($(this).attr('ref') != '' && !mail.match(/\[at\]/)) {
                                           $(this).attr('href', 'mailto:'+$(this).attr('ref'));
                                         } else if (mail.match(/\[at\]/)) {
                                           mail = mail.replace(/\[at\]/,'@');
                                           $(this).attr('href', 'mailto:'+mail).html(mail);
                                         }
                                        });
                                      }
                       }
                   );
    
    $('#slideshow').cycle({timeout:4000});

    //accordioneffects
    $('.acc .btn').click(function() {
      if ($(this).hasClass('opened')){
        $(this).parent().find('.maincontent').hide(400);
        $(this).parent().find('.intro').show();
        $(this).removeClass('opened');
      }else{
        $(this).parent().find('.intro').hide();
        $(this).parent().find('.maincontent').show(400, function(){
                                                          if ($.browser.msie){this.style.removeAttribute('filter');}
                                                        });
        $(this).addClass('opened');
      }
    });
  });
