// JavaScript Documentö

function footer() {
	$("#footer").css("margin-top",0);
	if( $(window).height() > $("#design").height() ) {
		$("#footer").css("margin-top", $(window).height()-$("#design").height());
	}
}

$(document).ready(

	function() {
		
		footer();
		
		$("a:contains('löschen')").click(
			function() {
				var abfrage = confirm("Wirklich löschen?");
				if( abfrage == true ) {
					return true;
				}
				else {
					return false;
				}
			}
		);
		
		$("#pagecontent img[class!='nobox']").each(
			function() {
				$(this).wrap("<a class='group' rel='group' title=''></a>");
				$(this).attr("border", "0");
			}
		);
		
		$(".datepicker").datepicker({ dateFormat: 'dd.mm.yy' });

		
		$("a.group").fancybox({
			'hideOnContentClick': false
		});
		$('.tooltip').tooltip({
			track: true,
			delay: 0,
			showURL: false,
			showBody: "::",
			fade: 250,
			extraClass: "tooltip"
		});
		
		setTimeout("footer()", 1000);

	}
);

var resizeTimer = null;
		
$(window).bind('resize', function() {
	if (resizeTimer) clearTimeout(resizeTimer);
	resizeTimer = setTimeout(footer, 10);
});