/**
 * When the open event is called, this function will be used to 'open'
 * the overlay, container and data portions of the modal dialog.
 *
 * onOpen callbacks need to handle 'opening' the overlay, container
 * and data.
 */
function modalOpen (dialog) {
	dialog.overlay.fadeIn('slow', function () {
		dialog.container.fadeIn('slow', function () {
			dialog.data.hide().slideDown('slow');
		});
	});
}

$(document).ready(function () {
	$('a.sermonLink').click(function (e) {
		e.preventDefault();
		$('#basicModalContent')[0].src = this.href;
		$('#basicModalContent').modal({onOpen: modalOpen});
	});
});