function oeffnefenster (url) {
 fenster = window.open(url, "fenster1", "width=470,height=500,status=yes,scrollbars=yes,resizable=yes");
 fenster.focus();
}

$(document).ready(function(){
	$("a.showlist").click(function () {
	$(this).next().toggle("slow");
	});
});

$(document).ready(function() {

	$("h2").append('<em></em>')

	$(".thumbs a").click(function(){

		var largePath = $(this).attr("href");
		var largeAlt = $(this).attr("title");

		$("#largeImg").attr({ src: largePath, alt: largeAlt });

		$("h2 em").html(" (" + largeAlt + ")"); return false;
	});

});


function pin(id){
$(document).ready(function() {

	$(".immofont").hide(1500);
	$('.immofont').load(id);
	$(".immofont").show(2000);

});
}


 $(document).ready(function(){
                $('.kformular').click(function(){
                        // Make the id overview show
                        $('#kontakt2').slideDown('slow');
                        // override default a behavior
                        return false;
                });
        });


$(document).ready(function(){
                $('.kformular_out').click(function(){
                        // Make the id overview show
                        $('#kontakt2').hide('slow');
                        // override default a behavior
                        return false;
                });
        });

$(document).ready(function(){
	$('.kontaktformular').click(function(){

	$("#kontakt").slideDown("slow");
	$("input").focus(function(){
		$(this).parent().addClass("active");
	});
	$("input").blur(function(){
		$(this).parent().removeClass();
	});
	$('#kontakt form').submit(function(e){
		e.preventDefault();
		var username = $("#username input").attr('value');
		var password = $("#password input").attr('value');
		$.ajax({
			type: "POST",
 		    url: '/lkdynamix/pimmo/kontakt/',
			timeout: 7000,

			success: function(result) {
				if(result != "true") {
					$("#ajax_load").animate({opacity: 1.0}, 500).fadeOut(500);
					$("#messages div").remove();
					$("#messages").append('<div id="ajax_error">Anmeldung war nicht erfolgreich!</div>');

					$("#login").Shake(4);
				}
				else {
					$("#ajax_load").fadeOut(200);
					$("#messages").append('<div id="ajax_accept">Erfolgreich, sende an System...</div>');
					$("#ajax_accept").hide().show("slow",function(){
						setTimeout(function(){$("#login").slideUp(500);},500);
						setTimeout(function(){$('#login form')[0].submit();},1200);
					});
				}
			}
		})
		});
	});
	$(".button")
			.ajaxStart(function(){
				$("#messages div").remove();
				$("#messages").append('<div id="ajax_load">Teste Daten...</div>');
			});
});
$(document).ready(function() { $("#contenthead a").fancybox({'overlayOpacity': 0.3, 'overlayShow': true , 'hideOnContentClick': true}); $("#imagepreview2 a").fancybox({ 'hideOnContentClick': true }); $("#imagepreview3 a").fancybox({ 'hideOnContentClick': true , 'zoomSpeedIn': 1, 'zoomSpeedOut': 1, 'overlayShow': true }); });


$(document).ready(function() { $("#imagepreview a").fancybox({'overlayOpacity': 0.3, 'overlayShow': true , 'hideOnContentClick': true}); $("#imagepreview2 a").fancybox({ 'hideOnContentClick': true }); $("#imagepreview3 a").fancybox({ 'hideOnContentClick': true , 'zoomSpeedIn': 1, 'zoomSpeedOut': 1, 'overlayShow': true }); });


