The issue relates to how you are adding your popup.js file from resources. Currently, you are using a standard HTML SCRIPT tag that has no access to resources <script type="text/javascript" src="popup.js"></script>
. However, to access extension resources you must use the Crossrider API, and hence replace your script tag as follows:
<script type="text/javascript">function crossriderMain($) {
// get popup.js from resource and then eval to include in popup scope
eval(appAPI.resources.get('popup.js'));
}</script>
I recommend that you take the time to become familiar with the Crossrider framework by visiting the Developer Center, reviewing the Demos, reading the Documentation, Guides, and FAQs and thus gain an overall understanding of what you can accomplish with the framework.
[Disclosure: I am a Crossrider employee]