$(document).ready(function() {
  $('#loading').show();
$('ul.sf-menu').superfish();

    $('#image_scroller').jcarousel({
        auto: 3,
        scroll: 1,
        wrap: 'last',
        animation: 'slow',
        initCallback: mycarousel_initCallback
    });

    $("#navigation_li li").hover(
      function () {
        $(this).addClass("hover");
      },
      function () {
        $(this).removeClass("hover");
      }
    );

  $('div.whitebox_content_space> div').hide();
  $('#details_first').show();
  $('div.whitebox_content_space> h2').hover(function() {
  $(this).addClass("headline_firstc").siblings('h2:visible').removeClass("headline_firstc");
  $(this).next('div').fadeIn().siblings('div:visible').fadeOut('fast');
  });
});

$(window).load( function() {
  $('#loading').hide();
});


function clickclear(thisfield, defaulttext) {
	if (thisfield.value == defaulttext) {
	thisfield.value = "";
	}
}

function clickrecall(thisfield, defaulttext) {
	if (thisfield.value == "") {
	thisfield.value = defaulttext;
	}
}

function mycarousel_initCallback(carousel)
{
    // Disable autoscrolling if the user clicks the prev or next button.
    carousel.buttonNext.bind('click', function() {
        carousel.startAuto(0);
    });

    carousel.buttonPrev.bind('click', function() {
        carousel.startAuto(0);
    });

    // Pause autoscrolling if the user moves with the cursor over the clip.
    carousel.clip.hover(function() {
        carousel.stopAuto();
    }, function() {
        carousel.startAuto();
    });
};
