
$(document).ready(function(){
		
	/* onHide : fade the window out, remove overlay after fade
	 */
	var myClose = function(hash){
		$('#jqmContent').html('');
		hash.w.fadeOut('3000', function(){
			hash.o.remove();
		});
	};
	var openInIframe = function(hash){
		var $trigger = $(hash.t);
		var $modal = $(hash.w);
		
		/* form is useless without javascript, anyway
		 */
		//var myUrl = $trigger.attr('href');
		var myTitle = $trigger.attr('title');
		var $modalContent = $("iframe", $modal);
		$modalContent.html('').attr('src', '/goodstart/1.html');

		$modal.jqmShow();
		$('#modalWindow').show();
	}

	$('#modalWindow').jqm({
		modal: true,
		trigger: '#goodstart_link',
		target: '#jqmContent',
		onHide: myClose,
		onShow: openInIframe
	});
})

