/*
	#############################################################
	#															#
	#		JS for Hillebrand									#
	#															#
	#		movingline											#
	#		Agentur für Werbung & Design						#
	#		Am Stachelauer Berg 7								#
	#		57462 Olpe											#
	#															#
	#		Fon: +49 2761 - 83549 9								#
	#		Fax: +49 2761 - 83549 8								#
	#															#
	#		info@movingline.de									#
	#		www.movingline.de									#
	#															#
	#		Copyright © 2003 - 2010 by movingline				#
	#		Authors: Dominik Döppeler							#
	#															#
	#############################################################
*/


function standorte() {

    var speed_slide 	= 300; 		/* Geschwindigkeit für ausfahren */
	var speed_fade 		= 300; 		/* Geschwindigkeit für Inhalte einblenden */
	
	var spand_1_off 	= 176; 		/* Standort 1 = Breit bei deaktiv */
	var spand_1_on 		= 654; 		/* Standort 1 = Breit bei aktiv */
	
	var spand_2_off 	= 176; 		/* Standort 2 =  Breit bei deaktiv */
	var spand_2_on 		= 427; 		/* Standort 2 =  Breit bei aktiv */
		
	var spand_3_off 	= 176; 		/* Standort 3 =  Breit bei deaktiv */
	var spand_3_on 		= 427; 		/* Standort 3 =  Breit bei aktiv */
 


	/* Standort 1 */
	$(".stand_1_inset").hide();
	$(".stand_1_b_inset").hide();
	$(".stand_1").hover(function(){
		$(this).stop().animate({width:spand_1_on}, speed_slide, function(){
			$(".stand_1_inset").fadeIn(speed_fade);
			$(".stand_1_b_inset").fadeIn(speed_fade);
			});
		},
	  function(){
		$(".stand_1_inset").hide();
		$(".stand_1_b_inset").hide();
		$(this).stop().animate({width:spand_1_off}, speed_slide);
		});


	/* Standort 2 */	
	$(".stand_2_inset").hide();
	$(".stand_2").hover(function(){
		$(this).stop().animate({width:spand_2_on}, speed_slide, function(){
			$(".stand_2_inset").fadeIn(speed_fade);
			});
		},
	  function(){
		$(".stand_2_inset").hide();
		$(this).stop().animate({width:spand_2_off}, speed_slide);
		});


	/* Standort 3 */	
	$(".stand_3_inset").hide();
	$(".stand_3").hover(function(){
		$(this).stop().animate({width:spand_3_on}, speed_slide, function(){
			$(".stand_3_inset").fadeIn(speed_fade);
			});
		},
	  function(){
		$(".stand_3_inset").hide();
		$(this).stop().animate({width:spand_3_off}, speed_slide);
		});		


	} 
$(document).ready(function() {standorte();});

/*	---------------------------------------------------------------------------------------------------------------------------
	Contactslider
	--------------------------------------------------------------------------------------------------------------------------- */

function contactslider() {
  $('.member_list').hide();
  $('.member_button').click(
	function() {
	  var checkElement = $(this).prev();

	  if((checkElement.is('div')) && (checkElement.is(':visible'))) {
		return false;
		}

	  if((checkElement.is('div')) && (!checkElement.is(':visible'))) {
	 
		$('.google:visible').slideUp('normal');
		$('.member_list:visible').slideUp('normal');
		checkElement.slideDown('normal');
		return false;
		}
	  }
	);
  }
$(document).ready(function() {contactslider();});

/*	---------------------------------------------------------------------------------------------------------------------------
	Googleslider
	--------------------------------------------------------------------------------------------------------------------------- */

function googleslider() {
  $('.google').hide();
  $('.google_button').click(
	function() {
	  var checkElement = $(this).prev();
	  var checkElement = $(checkElement).prev();
	  var checkElement = $(checkElement).prev();

	  if((checkElement.is('div')) && (checkElement.is(':visible'))) {
		return false;
		}

	  if((checkElement.is('div')) && (!checkElement.is(':visible'))) {

		$('.member_list:visible').slideUp('normal');
		$('.google:visible').slideUp('normal');
		checkElement.slideDown('normal');
		return false;
		}
	  }
	);
  }
$(document).ready(function() {googleslider();});


/*	---------------------------------------------------------------------------------------------------------------------------
	Infobox
	--------------------------------------------------------------------------------------------------------------------------- */

function error() {
		$('.errorinfo, .okinfo').hide();
		$('.errorinfo, .okinfo').slideDown(1000);
		}
$(document).ready(function() {error();});
