function hideJSbox() {
    var cid = '#' + $(this).parent().attr('id');
    $(cid).children('.hidethis').animate({ height: 'hide', opacity: 'hide' }, 'fast');
    $(cid).children('h4').unbind('click').bind('click', showJSbox).children('img').attr('src', 'fileadmin/html/images/ico_arrow_close.gif');
    return false;
}
function showJSbox() {
    var cid = '#' + $(this).parent().attr('id');
    $(cid).children('.hidethis').animate({ height: 'show', opacity: 'show' }, 'fast');
    $(cid).children('h4').unbind('click').bind('click', hideJSbox).children('img').attr('src', 'fileadmin/html/images/ico_arrow_open.gif');
    return false;
}

$(document).ready(function() {
  
  $('#teaserboxes .box-content').syncHeight();
  $('#teaserboxes h3').syncHeight();
  
  $('#nav-lang').prepend('<a class="printlink" href=\"javascript:window.print();\"><img src="fileadmin/html/images/ico_print.png" alt="Seite drucken" /></a>');
  
  $('html[lang=de] input#f_suche[@value=]').attr('value','Suchbegriff...');
  $('html[lang=de] input#f_suche').blur( function() { if(this.value=='') { this.value='Suchbegriff...'; } } ).focus( function () { if(this.value=='Suchbegriff...') { this.value=''; } } );
  
  $('.jsgalerie ul').after('<div class="jsgalerie-nav floatbox">').cycle({ fx: 'fade', pager: '.jsgalerie-nav', speed: 'fast', timeout: 0 });
  
  $('.jsbox .hidethis').css('display','none');
  $('.jsbox h4').prepend('<img src=\"fileadmin/html/images/ico_arrow_close.gif\" alt=\"\" /> ').bind('click', showJSbox);
  
  $('a.fancybox').fancybox();
  
  /* Abrundungen */
  if ($.browser.msie) {
    $('.box01 h3, .box02 h3, .box03 h3, .box04 h3, .box05 h3').corner('6px top');
    $('#nav-main li a, #nav-main li strong').corner('3px');
    $('#cols-left h1').corner('6px');
  }
  
  /*
  $('td.typo3-editPanel-controls a img[src$=history2.gif]').parent('a').attr('title','Bearbeitsverlauf anzeigen');
  $('td.typo3-editPanel-controls a img[src$=move_page.gif]').parent('a').attr('title','Seite verschieben');
  $('td.typo3-editPanel-controls a img[src$=new_page.gif]').parent('a').attr('title','Neue Seite anlegen');
  $('td.typo3-editPanel-controls a img[src$=edit2.gif]').parent('a').attr('title','Datensatz bearbeiten');
  $('td.typo3-editPanel-controls a img[src$=button_up.gif]').parent('a').attr('title','Datensatz nach oben schieben');
  $('td.typo3-editPanel-controls a img[src$=button_down.gif]').parent('a').attr('title','Datensatz nach unten schieben');
  $('td.typo3-editPanel-controls a img[src$=button_hide.gif]').parent('a').attr('title','Datensatz ausblenden');
  $('td.typo3-editPanel-controls a img[src$=new_record.gif]').parent('a').attr('title','Datensatz einfügen');
  $('td.typo3-editPanel-controls a img[src$=delete_record.gif]').parent('a').attr('title','Datensatz löschen');
  $('td.typo3-editPanel-controls a').tooltip({ track: true, delay: 0, showURL: false });
  */
});
