Add support for AMD define calls where available

Adds support for AMD define calls when they're available (e.g. when using RequireJS), otherwise works as normal. The code is similar to jQuery's AMD support code. The main advantage to the patch is that it does not force AMD users to manually "amdify" their modules (this is a problem for Bower users for example) and does not interfere with users who are not using an AMD support library.

Happy to change the style if required, but I'd love to be able to get AMD support into Fancybox in some form or other.