var galleryInterval;
//var textInterval;
jQuery( document ).ready( function(){
    var opts =
      { align: 'middle'
      , labels: false
      , distance: 110
      };

    jQuery('#flip').jqDock(opts);

    $('#flip').hover(function() {
        stopScroll();
    }, function () {
        resumeScroll();
    });

    resumeScroll();
});

function stopScroll() {
    clearInterval(galleryInterval);
}

function resumeScroll() {
    clearInterval(galleryInterval);
    galleryInterval = setInterval("doScroll()",50);
}
function doScroll() {
    var oMyDiv = document.getElementById( 'flip' );
    oMyDiv.scrollLeft += 1;
}
$(window).load(function() {
	$('#slider').nivoSlider({
		directionNav:true,
		directionNavHide:false,
		controlNavThumbs:true,
		controlNavThumbsFromRel:true,
		directionNav:true
	});
});

$(document).ready(function() { 
    $('ul#superfish_menu').superfish({
        autoArrows:    false,
        pathLevels:    1,
        dropShadows:   true,
        speed:         0
    });
    $('a.lightbox').lightBox();
      
    $('.hauptmenupunkt').attr('href', '#');
    $('.hauptmenupunkt').click(function() {
        $(this).next().css('display', 'block');
        $(this).next().css('visibility', 'visible');
        $(this).next().css('top', '2.5em');
        return false;
    });
}); 




//Prägungsbreite und Höhe jede sekunde aktualisieren.
window.onload = init = function(e){
	helper1(); // Praegung
	//BauernSlider
}
function helper1(){
	//setTimeout("setPraegung()", 1000);	
}
function setPraegung(){
	document.getElementById("praegung").style.height = screen.availHeight+"px";
	document.getElementById("praegung").style.width = screen.availWidth+"px";
	helper1();
}


