$(function () {
    $("#navigation>ul>li:not(.aktiv)").hover(function () {
        $("li.aktiv>ul").hide();
        $(this).addClass("hover")
        //.find("ul").show()
        ;
    }, function () {
        $("li.aktiv>ul").show();
        $(this).removeClass("hover")
        //.find("ul").hide()
        ;
    });
    
    $("dl.produktinfo").children("dd").hide().end().children("dt").toggle(function () {
        $(this).addClass("slideAktiv").next("dd").slideDown("fast");
    }, function () {
        $(this).removeClass("slideAktiv").next("dd").slideUp("fast");
    }).addClass("slideable").eq(0).click();
});

function shop_popup(){
	w = 990;
	h = 700;
	LeftPosition=(screen.width)?(screen.width-w)/2:100;
	TopPosition=50;
	settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars=yes,location=no,directories=no,status=yes,menubar=yes,toolbar=yes,resizable=yes';
	win=window.open('http://eis-shop.eis-verband.de/cgi-bin/nexmart/Anmeldung.sd/19/0?katstart=1','online_shop',settings);
	if(win.focus){win.focus();}
}

/*** 
    Simple jQuery Slideshow Script
    Released by Jon Raasch (jonraasch.com) under FreeBSD license: free to use or modify, not responsible for anything, etc.  Please link out to me if you like it :)
***/

function slideSwitch() {
    var $active = $('#slideshowTeaser IMG.active');

    if ( $active.length == 0 ) $active = $('#slideshowTeaser IMG:last');

    // use this to pull the images in the order they appear in the markup
    var $next =  $active.next().length ? $active.next()
        : $('#slideshowTeaser IMG:first');

    // uncomment the 3 lines below to pull the images in random order
    
    // var $sibs  = $active.siblings();
    // var rndNum = Math.floor(Math.random() * $sibs.length );
    // var $next  = $( $sibs[ rndNum ] );


    $active.addClass('last-active');

    $next.css({opacity: 0.0})
        .addClass('active')
        .animate({opacity: 1.0}, 1000, function() {
            $active.removeClass('active last-active');
        });
}

$(function() {
    setInterval( "slideSwitch()", 5000 );
});

