/* ----------------------------------------------------------------- */
/*     JS developed by LST Schenker                                  */
/*     SPAETER Internet 2010.1                                       */
/* ----------------------------------------------------------------- */


<!--
jQuery(document).ready(function($) {
	
	// Lang-Navigation: Pipes zwischen Menues
	$("#langSearch li:not(:last)").append("<span>|</span>");
	
	// Meta-Navigation: Pipes zwischen Menues
	$("#meta li:not(:last)").append("<span>|</span>");
	
	// Box Open-Close
	$(".boxContentTitle h3").after("<a href=\"#\" class=\"close\">close<\/a>");
	$(".close").click(function () { 
		$(this).toggleClass("open").next(".boxContentWrapper").toggle();
	});
	
	// Suchbox Value löschen
	$(".searchField").click(function () { 
		if($(this).val()=="Suchen"){
			$(this).val("");
		}
	});
	
	// Wenn der Fokus verloren geht und kein suchbegriff eingegeben wurde
	$(".searchField").blur(function () { 
		if($(this).val()==""){
			$(this).val("Suchen");
		}
	});
	
	// Cut Margin at every second Box
	/* does not work for fr! use :odd enstead
	$(".boxContent:nth-child(2n)").css({		
		"marginRight": 0,
		"paddingRight": 0
	});
	*/
		
	$(".boxContent:odd").css({		
		"marginRight": 0,
		"paddingRight": 0
	});
	$(".videoPlayer").media({
		width:     300, 
		height:    200
	});
	
	// small Boxes Hover
	$(".boxContentSmall").hover(
		function(){
			$(this).animate({
				opacity: 0.7
			}, 200, function() {
				// Animation complete.
			});
		}, 
		function () {
			$(this).animate({
				opacity: 1
			}, 200, function() {
				// Animation complete.
			});
		});
	
	// Get Link from small Boxes
	$(".boxContentSmall h2").click(function(){
		var boxContentSmallLink = $(this).next().find("a.boxLink").attr("href");		
		var boxContentSmallLinkURL = jQuery.url.attr("protocol")+"://"+jQuery.url.attr("host")+"\/"+boxContentSmallLink;
		window.location.href = boxContentSmallLinkURL;
		
		
	});
	
	// Katalog Link
	
	$(".article").click(function(ev){
		var katalogLink = $(this).find(".katalogLink").attr("href");		
		var katalogLinkURL = jQuery.url.attr("protocol")+"://"+jQuery.url.attr("host")+"\/"+katalogLink;	
							
		window.open(katalogLink,'BK','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=3200,height=2400');
		ev.preventDefault();
		return false;
		
				
		
		
	});	
	
	
	
	// Katalog hover
	$(".article").hover(
		function(){
			$(this).addClass("hover").find(".catalogImage").animate({
				opacity: 1
			}, 200);
		},function(){
			$(this).removeClass("hover").find(".catalogImage").animate({
				opacity: 0.7
			}, 200);
		});
	

	
	
	$('.scroll-pane').jScrollPane({
		showArrows:true
		// verticalDragMinHeight: 20,
		// 		verticalDragMaxHeight: 20,
		// 		horizontalDragMinWidth: 20,
		// 		horizontalDragMaxWidth: 20
	});
	
	
	
	// Table Sorter

	$(".spaeterSorter").tablesorter({ 
		headers: { 
			4: {sorter: false}        
		} 
    }); 
	
	// Fancybox
	$(".fancybox").fancybox({
		"padding":0,
		"margin":0,
		"opacity":false,
		"modal":false,
		"cyclic":false,
		"scrolling":"auto",
		"autoScale":true,
		"autoDimensions":true,
		"centerOnScroll":true,
		"hideOnOverlayClick":true,
		"hideOnContentClick":true,
		"overlayShow":true,
		"overlayOpacity":0.3,
		"overlayColor":"#666",
		"titleShow":true,
		"titlePosition":"over",
		"titleFormat":null,
		"transitionIn":"fade",
		"transitionOut":"fade",
		"speedIn":300,
		"speedOut":300,
		"changeSpeed":300,
		"changeFade":"fast",
		"easingIn":"swing",
		"easingOut":"swing",
		"showCloseButton":true,
		"showNavArrows":true,
		"enableEscapeButton":true
		}
		);
		
		
	// Slider Adressen	
	$(".adresse_inhalt").hide(); 
	$("h3.adresse_titel").click(function(){
		$(this).toggleClass("active").next().slideToggle("fast");
		return false;
	});
	
	$(".lineBottom:first").addClass("lineTop");
	
	
	
	// Gallery Images Hover
	$(".csc-textpic-imagerow ul li a.fancybox, .lineBottom a.fancybox, .csc-textpic-imagewrap ul li.csc-textpic-image a.fancybox").hover(
		function(){
			$(this).animate({
				opacity: 0.7
			}, 200, function() {
				// Animation complete.
			});
		}, 
		function () {
			$(this).animate({
				opacity: 1
			}, 200, function() {
				// Animation complete.
			});
		});
	
	
	
	// Breite bei Adressliste mitte
	$(".adresse_mitte_bild img:only-child").parent().parent().find(".adresse_mitte_kontakt").addClass("mit_bild");
	
	

	
	/* ----------------------------------------------------------------- */
	// mitarbeiter liste
	/* ----------------------------------------------------------------- */	
	
	$(".mitarbeiter_box_open").hide();
	
	$(".mitarbeiter_box_closed").click(function(){
		
		var person_id = this.id.split("_")[1];
		$(this).hide();
		$(this).siblings("#open_" + person_id).show();
		
	});
	
	$(".mitarbeiter_box_open").click(function(){
		var person_id = this.id.split("_")[1];
		$(this).siblings("#closed_" + person_id).show();
		$(this).hide();
	});
	
});
-->
