$(document).ready(function() {
	
	$('.CatLevel1').each(function() {
		
		$(this).find('a:first').css('text-decoration', 'none');
		$(this).find('a:first').css('cursor', 'default');
		$(this).find('a:first').click(function() { return false; } );
		
	});
	
	$('#startteaser').anythingSlider({
		autoPlay	    : true, // If autoPlay is on, this can force it to start stopped
		theme           : 'metallic',
		easing          : 'easeInOutBack',
		buildArrows		: false,
		buildNavigation : false,
		pauseOnHover	: true,
		onSlideComplete : function(slider){
			// alert('Welcome to Slide #' + slider.currentPage);
		},
		stopAtEnd : false
	});
	
	$('a.zoombox').zoombox({
        theme       : 'zoombox',        //available themes : zoombox,lightbox, prettyphoto, darkprettyphoto, simple
        opacity     : 0.8,              // Black overlay opacity
        duration    : 800,              // Animation duration
        animation   : true,             // Do we have to animate the box ?
        gallery     : true,             // Allow gallery thumb view
        autoplay : false                // Autoplay for video
    });
	
	$('.ProdListingVertical').jcarousel({
		wrap: 'circular',
		vertical: true,
		buttonNextEvent: 'mouseover',
		buttonPrevEvent: 'mouseover',
		scroll: 3
	});
	
	// Bildchen wechsel Dich auf der Produktinfo Seite
	$('.productInfoAdditionalImages a').click(function() {

		oHref = $('#productInfoImages a').attr('href');
		oSrc = $('#productInfoImages img').fadeIn().attr('src');
		
		link = $(this);
		image = $(this).attr('href');
		src = $(this).children('img').attr('src');
		obj = $(this).children('img');
		
		$('#productInfoImages img').fadeOut(function() {
			
			$('#productInfoImages a').attr('href', image);
			$('#productInfoImages img').fadeIn().attr('src', src);
			//$('#wrap img').attr('href', src);
			
			link.attr('href', oHref);
			obj.attr('href', oHref);
			obj.fadeIn().attr('src', oSrc);

		});

		return false;
		
	});

	$('#TopNavi .Level1').mouseover(function() {
		$('#TopNavi ul.SlideDownNavi').each(function() {
			
			//$(this).css('width', ($(this).find('.CatLevel1').innerWidth() * $(this).find('.CatLevel1').length - 34 + 'px'));
			//$(this).find('.CatLevel1:last').css('border', 'none');
			
		});
	});
	
});
