In SP2013 this is the correct way to do it according to Microsoft @ http://msdn.microsoft.com/en-us/library/jj245759.aspx
// Make sure the SharePoint script file 'sp.js' is loaded before your // code runs.
SP.SOD.executeFunc('sp.js', 'SP.ClientContext', openModalDialog);
Reference:
ExecuteOrDelayUntilScriptLoaded not executing after page publishExecuteOrDelayUntilScriptLoaded not executing after page publish