<!--//--><![CDATA[//><!--
				  
$(document).ready(function() {
	
	//fancybox
	$("a.zoom").fancybox({
		'overlayShow'	: false,
		'transitionIn'	: 'elastic',
		'transitionOut'	: 'elastic'
	});
	
	//fancybox Impressum
	$("#impressum").fancybox({
			'titlePosition'		: 'inside',
			'transitionIn'		: 'none',
			'transitionOut'		: 'none'
	});	
	
	//fancybox signup
	$("#signup").fancybox({
			'titlePosition'		: 'inside',
			'transitionIn'		: 'none',
			'transitionOut'		: 'none'
	});	
						   
						   
// ***********************************************************************************************
// Formulaires
// ***********************************************************************************************
  
 // login form					   
  $('#log').val('Username');
  $('#log').focus(function() { if ($(this).val() == 'Username') $(this).val(''); });
  $('#log').blur(function() { if ($(this).val() == '') $(this).val('Username'); });


  $('#pwd').val('Password');
  $('#pwd').focus(function() { if ($(this).val() == 'Password') $(this).val(''); });
  $('#pwd').blur(function() { if ($(this).val() == '') $(this).val('Password'); });
  
  
  // sign in form

  $('#Firma').val('Firma');
  $('#Firma').focus(function() { if ($(this).val() == 'Firma') $(this).val(''); });
  $('#Firma').blur(function() { if ($(this).val() == '') $(this).val('Firma'); });
  

  $('#Ansprechpartner').val('Ansprechpartner');
  $('#Ansprechpartner').focus(function() { if ($(this).val() == 'Ansprechpartner') $(this).val(''); });
  $('#Ansprechpartner').blur(function() { if ($(this).val() == '') $(this).val('Ansprechpartner'); });
  

  $('#Strasse').val('Strasse');
  $('#Strasse').focus(function() { if ($(this).val() == 'Strasse') $(this).val(''); });
  $('#Strasse').blur(function() { if ($(this).val() == '') $(this).val('Strasse'); });
  

  $('#PLZ').val('PLZ');
  $('#PLZ').focus(function() { if ($(this).val() == 'PLZ') $(this).val(''); });
  $('#PLZ').blur(function() { if ($(this).val() == '') $(this).val('PLZ'); });
  

  $('#Ort').val('Ort');
  $('#Ort').focus(function() { if ($(this).val() == 'Ort') $(this).val(''); });
  $('#Ort').blur(function() { if ($(this).val() == '') $(this).val('Ort'); });
  

  $('#Telefon').val('Telefon');
  $('#Telefon').focus(function() { if ($(this).val() == 'Telefon') $(this).val(''); });
  $('#Telefon').blur(function() { if ($(this).val() == '') $(this).val('Telefon'); });


  $('#Email').val('Email');
  $('#Email').focus(function() { if ($(this).val() == 'Email') $(this).val(''); });
  $('#Email').blur(function() { if ($(this).val() == '') $(this).val('Email'); });
  

  $('#Internet').val('Internet');
  $('#Internet').focus(function() { if ($(this).val() == 'Internet') $(this).val(''); });
  $('#Internet').blur(function() { if ($(this).val() == '') $(this).val('Internet'); });


  $('#Beschreibung').val('Beschreibung');
  $('#Beschreibung').focus(function() { if ($(this).val() == 'Beschreibung') $(this).val(''); });
  $('#Beschreibung').blur(function() { if ($(this).val() == '') $(this).val('Beschreibung'); });


// contact form
  $('#Name').val('Name');
  $('#Name').focus(function() { if ($(this).val() == 'Name') $(this).val(''); });
  $('#Name').blur(function() { if ($(this).val() == '') $(this).val('Name'); });

  $('#Message').val('Message');
  $('#Message').focus(function() { if ($(this).val() == 'Message') $(this).val(''); });
  $('#Message').blur(function() { if ($(this).val() == '') $(this).val('Message'); });
  
// ***********************************************************************************************  


	// BOTTOM SLIDER PANEL
	$("div.panel_button").click(function(){
		$("div#panel").animate({
			height: "100px"
		})
		.animate({height: "60px"}, "fast");
		$("div.panel_button").toggle();
	});	
	
	$("div#hide_button").click(function(){
		$("div#panel").animate({height: "0px"}, "fast");
    });	
	
	
	// TOGGLE
	//Set default open/close settings
	$('.acc_container_toggle').hide(); //Hide/close all containers
	$('.acc_trigger_toggle:first').removeClass('active').next().hide(); //Add "active" class to first trigger, then show/open the immediate next container
	$('.acc_container_toggle:first').delay(2000).slideDown().toggleClass('active').delay(500).slideUp().toggleClass('active');

	//On Click
	$('.acc_trigger_toggle').click(function(){
		$(this).toggleClass('active');									
		$('.acc_container_toggle:first').toggleClass("active").slideToggle("slow");
		return false; //Prevent the browser jump to the link anchor
	});
	
	
	// GENERAL
	//Set default open/close settings
	$('.acc_container').hide(); //Hide/close all containers
	$('.acc_trigger:first').removeClass('active').next().hide(); //Add "active" class to first trigger, then show/open the immediate next container
	$('.acc_container:first').delay(2000).slideDown().delay(500).slideUp();
	
	//On Click
	$('.acc_trigger').click(function(){
		if( $(this).next().is(':hidden') ) { //If immediate next container is closed...
			$('.acc_trigger').removeClass('active').next().slideUp(); //Remove all "active" state and slide up the immediate next container
			$(this).toggleClass('active').next().slideDown(); //Add "active" state to clicked trigger and slide down the immediate next container
		}
		return false; //Prevent the browser jump to the link anchor
	});
	
	
	//COLLECTION
	//Set default open/close settings
	$('.acc_container_collec').hide(); //Hide/close all containers
	$('.acc_trigger_collec:first').removeClass('active').next().hide(); //Add "active" class to first trigger, then show/open the immediate next container
	$('.acc_container_collec:first').delay(2000).slideDown("slow");
	
	//On Click
	$('.acc_trigger_collec').click(function(){
			if( $(this).next().is(':hidden') ) { //If immediate next container is closed...
				$('.acc_trigger_collec').removeClass('active').next().slideUp(); //Remove all "active" state and slide up the immediate next container
				$(this).toggleClass('active').next().slideDown(); //Add "active" state to clicked trigger and slide down the immediate next container
			}
			return false; //Prevent the browser jump to the link anchor	
	});
	
	

	// LANGUES
	//Hide (Collapse) the toggle containers on load
	$(".toggle_container_en").hide();
	$(".toggle_container_de").hide(); 
	$("h3#lang_en").click(function(){
		$(this).toggleClass("active").siblings(".toggle_container_en").slideToggle("slow");
		return false; //Prevent the browser jump to the link anchor
	});
	$("h3#lang_de").click(function(){
		$(this).toggleClass("active").siblings(".toggle_container_de").slideToggle("slow");
		return false; //Prevent the browser jump to the link anchor
	});


	
	//LOGO
	$("#logo").hover(function () {
      $(this).effect("bounce", { times:3 }, 100);
	});

	// NEWS
	$('.move').draggable();
	$('#paging_container').pajinate({
		items_per_page : 5,
		item_container_id : '.alt_content',
		nav_panel_id : '.alt_page_navigation'
	});
	
	// NEWS Fulltext
  	$("div#fulltext").hide(); 
    $("h3.mehr").click(function(){
		$("div#fulltext").fadeIn("slow");
		$("div#introtext").fadeOut("slow");
		return false;
	});
	
	/*// LIGHTBOX
	$(function() {
	$('a.zoom').fancybox({fixedNavigation:true});
	});
	
	$(function() {
	$('#impressum').lightBox({fixedNavigation:true});
	});*/

});










// login form validation 
function validate(){

		if(document.login.log.value == 'Username') {
		alert('Please enter a value for both Username'); 
        return false; 
		}
		
		if(document.login.pwd.value == 'Password') {	
		alert('Please enter a value for both Password'); 
        return false; 
		}

	return true;
}


// contact form validation 
function validateContactform(){

		if(document.contactForm.Name.value == 'Name') {
		alert('Please enter a value for both Name'); 
        return false; 
		}
		
		if(document.contactForm.Email.value == 'Email') {	
		alert('Please enter a value for both Email'); 
        return false; 
		}
		
		if(document.contactForm.Message.value == 'Message') {	
		alert('Please enter a value for both Message'); 
        return false; 
		}

	return true;
}


// signup form validation 
function validateSignupForm(){

		if(document.signupForm.Firma.value == 'Firma') {
		alert('Please enter a value for Firma'); 
        return false; 
		}
		
		if(document.signupForm.Ansprechpartner.value == 'Ansprechpartner') {	
		alert('Please enter a value for Ansprechpartner'); 
        return false; 
		}
		
		if(document.signupForm.Strasse.value == 'Strasse') {	
		alert('Please enter a value for Strasse'); 
        return false; 
		}
		
		if(document.signupForm.PLZ.value == 'PLZ') {	
		alert('Please enter a value for PLZ'); 
        return false; 
		}
		
		if(document.signupForm.Ort.value == 'Ort') {	
		alert('Please enter a value for Ort'); 
        return false; 
		}

		if(document.signupForm.Telefon.value == 'Telefon') {	
		alert('Please enter a value for Telefon'); 
        return false; 
		}
		
		if(document.signupForm.Email.value == 'Email') {	
		alert('Please enter a value for Email'); 
        return false; 
		}
		
		if(document.signupForm.Internet.value == 'Internet') {	
		alert('Please enter a value for Internet'); 
        return false; 
		}
		
		if(document.signupForm.Beschreibung.value == 'Beschreibung') {	
		alert('Please enter a value for Beschreibung'); 
        return false; 
		}


	return true;
}

