/*
 * SimpleModal Basic Modal Dialog
 * http://www.ericmmartin.com/projects/simplemodal/
 * http://code.google.com/p/simplemodal/
 *
 * Copyright (c) 2010 Eric Martin - http://ericmmartin.com
 *
 * Licensed under the MIT license:
 *   http://www.opensource.org/licenses/mit-license.php
 *
 * Revision: $Id: basic.js 254 2010-07-23 05:14:44Z emartin24 $
 */

jQuery(function ($) {
	// Load dialog on page load
	//$('#iframe-modal-content').modal();

	// Load dialog on click
	$('#newscontainer .nachricht').click(function (e)
	{
		if(!e)
			e = window.event;
		var obj = e.currentTarget;
		var src = "news.php?n="+obj.id;
		$.modal( '<iframe src="about:blank" id="newsiframe" frameborder="0" width="630" height="450" style="border:0;"></iframe>',
		{
			containerCss:
			{
				backgroundColor:"#fff",
				borderColor:"#800",
				width:630,
				height:450,
				padding:4
			},
			
			//closeHTML:"",
			overlayClose:true,
			close:true,

		onOpen: function (dialog) { document.getElementById("newsiframe").src = src;
			dialog.overlay.slideDown('slow', function () {
				dialog.data.hide();
				dialog.container.slideDown('slow', function () {
					dialog.data.fadeIn('slow');
				});
			});
		},

		onClose: function (dialog) {
			dialog.data.fadeOut('slow', function () {
				dialog.container.hide('slow', function () {
					dialog.overlay.slideUp('slow', function () {
						$.modal.close();
					});
				});
			});
		}

		} );

		return false;
	} );
} );



