$(document).ready(function() {
	mpnDialogs.init();
});

var mpnDialogs = {};

mpnDialogs.init = function() {
	var bindShownEvent = function (modalDialog) {
		if(modalDialog.length) { 
			modalDialog.on('shown', function () {
				modalDialog.focus(); 
			});
		}
	};
	
	//Bind modal dialog events.
	bindShownEvent($('#aboutModal'));
	bindShownEvent($('#helpModal'));
	bindShownEvent($('#sessionModal'));
};
