function showMessageDialog( title, message ) {
	var d = jQuery( "<div>" + message + "</div>" );
	var effect = 'scale';
	d.dialog( {"title": title,
		show: effect,
		hide: effect,
		buttons: { "OK": function() { jQuery( this ).dialog( "close " ); } },
		modal: true
	});
	d.dialog( 'open ' );
}


$(document).ready( function() {
	jQuery( "#link_home" ).live( "click", function() {
		jQuery( "#content" ).load( "./sites/home.php" );
		jQuery( "#left" ).load( "./standards/kalenderRoot.php" );
	} );
	jQuery( "#link_impressum" ).live( "click", function() {
		jQuery( "#content" ).load( "./sites/impressum.php" );
		jQuery( "#left" ).load( "./standards/kalenderRoot.php" );
	} );
	jQuery( "#link_vorstandschaft" ).live( "click", function() {
		jQuery( "#content" ).load( "./sites/vorstandschaft.php" );
		jQuery( "#left" ).load( "./standards/kalenderRoot.php" );
	} );
	jQuery( "#link_gallerie" ).live( "click", function() {
		jQuery( "#content" ).load( "./sites/gallerie.php" );
		jQuery( "#left" ).load( "./standards/gallerie/naviGallerie.php" );
	} );
	jQuery( "#link_downloads" ).live( "click", function() {
		jQuery( "#content" ).load( "./sites/downloads.php" );
		jQuery( "#left" ).load( "./standards/kalenderRoot.php" );
	} );
	jQuery( "#link_gaestebuch" ).live( "click", function() {
		jQuery( "#content" ).load( "./sites/gaestebuch.php" );
		jQuery( "#left" ).load( "./standards/kalenderRoot.php" );
	} );
	jQuery( "#link_125" ).live( "click", function() {
		jQuery( "#content" ).load( "./sites/125/125.php" );
		jQuery( "#left" ).load( "./sites/125/navi125.php" );
	} );
	
	jQuery( "#link_calendarUp" ).live( "click", function() {
		var month = jQuery( "#calendarMonth" ).attr( "alt" );
		var year = jQuery( "#calendarMonth" ).attr( "name" );
		month++;
		if (month == 13) {
			month = 1;
			year++;
		}
//		jQuery( "#calendarMonth" ).text( month + " " + year );
//		jQuery( "#left" ).attr( "alt", month );
//		jQuery( "#left" ).attr( "name", year );
		jQuery( "#calendar" ).load( "./standards/kalender.php?year=" + year + "&month=" + month );
		jQuery( "#calendarNavi" ).load( "./standards/kalenderNavi.php?year=" + year + "&month=" + month );
	} );
	jQuery( "#link_calendarDown" ).live( "click", function() {
		var month = jQuery( "#calendarMonth" ).attr( "alt" );
		var year = jQuery( "#calendarMonth" ).attr( "name" );
		month--;
		if (month == 0) {
			month = 12;
			year--;
		}
//		jQuery( "#calendarMonth" ).text( month + " " + year );
//		jQuery( "#left" ).attr( "alt", month );
//		jQuery( "#left" ).attr( "name", year );
		jQuery( "#calendar" ).load( "./standards/kalender.php?year=" + year + "&month=" + month );
		jQuery( "#calendarNavi" ).load( "./standards/kalenderNavi.php?year=" + year + "&month=" + month );
	} );
	
	jQuery( "a.link_calendarActivity" ).live( "click", function() {
		var a = jQuery( this );
//		jQuery( "#calendarDetail" ).text( a.attr( "alt" ) + "  : " + a.attr( "name" ) );
		showMessageDialog( a.attr( "alt" ), a.attr( "name" ) );
	} );
	
	jQuery( "a.link_gallerieSelection" ).live( "click", function() {
		var a = jQuery( this );
		jQuery( "#content" ).load( "./standards/gallerie/galleriePreview.php?folder=" +
				a.attr( "name" ) );
	} );
	/* Die beiden Frameworks Prototype (verwendet in LightBox) und jQuery haben
	 * ein paar Schwierigkeiten miteinander.. das behebt folgendes Skrtipterl..
	 **/
	
	
	jQuery( "a.link_125festzug" ).live( "click", function() {
		var a = jQuery( this );
		jQuery( "#content" ).load( "./sites/125/festzug.php" );
	} );
	
	jQuery( "a.link_125programm" ).live( "click", function() {
		var a = jQuery( this );
		jQuery( "#content" ).load( "./sites/125/125.php" );
	} );
	
	
	jQuery.noConflict();
} );

