Okay I've been doing JS merges for some time now and still can't figure out the logic behind making a successful merge. It comes down to repositioning libraries upwards and downwars on merge list. Sometimes jquery must be on top, sometimes it doesn't. Sometimes fancybox needs to be added as addJs, sometimes as addItem.
So, what is in your experience causing JS libraries to break when you use Magento's merge JS? Are there any rules for sucessful merge?
UPDATE: Just now in my local.xml I moved from
<action method="addItem"><type>skin_js</type><name>js/magiczoomplus.js</name></action>
to
<action method="addJs"><script>jquery/magiczoomplus.js</script></action>
and that solved the magiczoomplus error I was getting on the page. How so?
I'm trying to understand this problem so I can better tackle it in the future