The .js file is loaded in aspx page like this:
<SharePoint:ScriptLink runat="server" ID="script1" name="/js/my.js" Localizable="false" />
Type is not defined
EDIT This script load line works:
ScriptLink control produces correct
<script> link,the problem is that its placed higher in the page then some of the other SharePoint scripts.