/*
 * SimpleModal Contact Form
 * http://www.ericmmartin.com/projects/simplemodal/
 * http://code.google.com/p/simplemodal/
 *
 * Copyright (c) 2009 Eric Martin - http://ericmmartin.com
 *
 * Licensed under the MIT license:
 *   http://www.opensource.org/licenses/mit-license.php
 *
 * Revision: $Id: contact.js 212 2009-09-03 05:33:44Z emartin24 $
 *
 */

$(document).ready(function () {
	$('a.contact').click(function (e) {
		xajax_getJwindowContent(content_id,note_id);
		e.preventDefault();
			// create a modal dialog with the data
			$('#jwindow').modal({
				position: ["5%",],
				overlayId: 'jwindow-overlay',
				onOpen: contact.open,
				onClose: contact.close
			});
	});

	$('a.url_me').click(function (e) {
		xajax_getJwindowUrlContent();
		e.preventDefault();
			// create a modal dialog with the data
			$('#jwindow').modal({
				position: ["5%",],
				overlayId: 'jwindow-overlay',
				onOpen: contact.open,
				onClose: contact.close
			});
	});


});

var contact = {
	message: null,
	open: function (dialog) {
		dialog.overlay.fadeIn(200, function () {
			dialog.container.fadeIn(200, function () {
				dialog.data.fadeIn(200, function () {

				});
			});
		});
	},
	
	close: function (dialog) {
		$('#jwindow').animate({
			height: 0
		}, function () {
			dialog.data.fadeOut(200, function () {
				dialog.container.fadeOut(200, function () {
					dialog.overlay.fadeOut(200, function () {
						$.modal.close();
					});
				});
			});
		});
	}	
};


$(document).ready(function () {  
			// create a modal dialog with the data
/*
			$('#jwindow').modal({
				position: ["5%",],
				overlayId: 'jwindow-overlay',
				onOpen: contact.open,
				onClose: contact.close
			});
*/
});  
