// JavaScript Document


/*Navigation*/
$(function(){
	$('.naviHauptnavigation').superfish({
		delay:       500,
		autoArrows:  false,
		dropShadows: false 
	});
});	


/* General */
$(document).ready(function() {
	/*Add div to Select*/
	$('.jNice .jNiceWrapper ul').each(function() {
		$(this).after('<div class="selectBorderBottom"><div></div></div>')
	});
	
	/*Carousel Leistungsportfolio*/
	$(".objCarouselCont").jCarouselLite({
		btnNext: ".nextCarousel",
		btnPrev: ".prevCarousel",
		visible: 4,
		scroll: 1,
		speed: 500,
		circular: false
	});

	/*carousel image */
	setTimeout( function() {
		$('.objCarouselCont a img').each( function() {
			$(this).css('marginTop',(153-this.height)/2);
		});
	},1);
	$('.objCarouselCont a').mouseover( function() {
		$('.textDescCarousel').html(this.rel);
	});
	
	/*navigation arrow*/
	$('.naviHauptnavigation li li').each( function() {
		if ($(this).find('ul').length > 0) {
		}
		else {
			$(this).addClass('noArrow')
		}
	});
	
	/*Lexikon*/
	$('.List_A').addClass('active');
	$('.mainButtons li a').click( function() {
		if ($(this).parent('li').hasClass('active')) {
		}
		else {
			$('.mainButtons li.active').removeClass('active');
			$(this).parent('li').addClass('active');
		}
	});
	/* carousel Produktbuttons aktiv / nicht aktiv */
	$('.line.but a').click( function() {
		var title = $(this).attr('title');
		
		$(".line.but a").css("background","transparent url(/images/project/butProdukteKategorie.png) 0 0 no-repeat");
		
		switch(title) {
			case "buecher":		$("a[title='buecher']").css("background","transparent url(/images/project/butProdukteKategorie_active.png) 0 0 no-repeat");
								break;
			case "corpcom":		$("a[title='corpcom']").css("background","transparent url(/images/project/butProdukteKategorie_active.png) 0 0 no-repeat");
								break;
			case "kataloge":	$("a[title='kataloge']").css("background","transparent url(/images/project/butProdukteKategorie_active.png) 0 0 no-repeat");
								break;
			case "kalender":	$("a[title='kalender']").css("background","transparent url(/images/project/butProdukteKategorie_active.png) 0 0 no-repeat");
								break;
			case "mailings":	$("a[title='mailings']").css("background","transparent url(/images/project/butProdukteKategorie_active.png) 0 0 no-repeat");
								break;
			case "werbemat":	$("a[title='werbemat']").css("background","transparent url(/images/project/butProdukteKategorie_active.png) 0 0 no-repeat");
								break;
			case "zeitschriften":$("a[title='zeitschriften']").css("background","transparent url(/images/project/butProdukteKategorie_active.png) 0 0 no-repeat");
								break;
		};
		
		return false;
	});
	
	$("#slider").jCarouselLite({
		btnNext: "#nextBtn",
		btnPrev: "#prevBtn",
		visible: 1,
		circular: false
	});
	
	$("ul.carousel.awards li a").lightBox();

//layer webauthor fix for bgImageoverlay
	
$('.Component.AjaxLoaded').eq(1).css({
	position: 'relative',
	zIndex: '5'
});

$('.Component.AjaxLoaded').eq(2).css({
	position: 'relative',
	zIndex: '6'
});

$('.Component.AjaxLoaded').eq(3).css({
	position: 'relative',
	zIndex: '7'
});

});