Javascript files in a theme's /js folder are automatically loaded in alphabetical order by file name. To override this, you create a file called order.php and place it in the theme's /js folder. In that file, define an array called $ordered, and add the file names to that array in the order in which you want them to be rendered. If you have an order.php file, any Javascript file that is not added to the $ordered array will not be automatically loaded in your template.
Example order.php code:
<?php
$ordered = array();
$ordered[] = 'firstfile.js';
$ordered[] = 'secondfile.js';
$ordered[] = 'thirdfile.js';
?>
