Having the the same problem (images coming from an asset management
repository without extension), I used the type= attribute of the a
tag, which is intended to specify the MIME type of the linked resource
(e.g. <a type="image/jpeg">).
I had to change 8 lines in the js-code to add support for this
attribute:
In function _start() I added an additional property 'type' to item:
var item = {href: elem.href, title: elem.title, type: elem.type};
and
item = {href: subGroup[i].href, title: subGroup[i].title, type:
subGroup[i].type};
in function _change_item() i added
var type = opts.itemArray[ opts.itemCurrent ].type;
and changed
if (href.match(imageRegExp))
to
if (href.match(imageRegExp) || type.match(/^image/)) {
In function _preload_neighbor_images() there are 2 more occurence of
match(imageRegExp), which I changed in the same way.
I only needed this functionality for images and my changes work for
me.
Maybe support for type= can be added in future versions of fancybox as
I think it is a very clean solution the problem discussed in this
thread.