
$(document).ready(function(){
	
	function closeInfo(){
		$('.info_active').attr('class','info');
		$(this).removeClass('act_btn');
		$(this).unbind('click',closeInfo);
		$(this).bind('click',openInfo);
		return false;
	}
	function openInfo(){
		$('.info_active').attr('class','info');
		$(this).removeClass('act_btn');
		$(this).unbind('click',openInfo);
		$(this).bind('click',closeInfo);
		return false;
	}
	
/*	$('.btn_info').bind('click',openInfo);*/
	
	$('.btn_info').click(function(){
		$('.info').attr('class','info_active');
		$(this).addClass('act_btn');
		$(this).unbind('click',openInfo);
		$(this).bind('click',closeInfo);
		return false;
	});		

/* Projektvorschau-Thmbnails // Liveline: Slider*/
    
    $(".thumb_inner").jCarouselLite({
        btnNext: ".btn_right",
        btnPrev: ".btn_left",
		visible: 3,
		circular: false
    });
	$(".lifeline_inner").jCarouselLite({
        btnNext: ".btn_right",
        btnPrev: ".btn_left",
		visible: 1,
		start: 5,
       circular: false
    });
	
/* Projekt-Bilderwechsel anhand der Thumbnails */

    $('a.enlarge').click(function(){
		var id = $(this).attr('href');
		var title = $(this).attr('title');
		$('img').parent('div.big_img').hide();
		$("img[title*='" +title+ "']").parent('div.big_img').fadeIn();
		return false;
    });
	/*
    $(window.location.href).change(function(){
      var id = window.location.href;
     // alert (news_id);
    });	
	*/
	
	
	
	
/* Formular-errors ausblenden */

	$('.form_input').keypress(function(){
		$(this).prev('.form_error_wrapper').children().fadeOut();
	});
	$('.form_textarea').keypress(function(){
		$(this).prev('.form_error_wrapper').children().fadeOut();
	});
	$('.form_error').click(function(){
		$(this).fadeOut();
	});
	
/*lightbox fuer QR-Code
  $(function() {
    $('a.lightbox').lightBox();
  });  */
});
