Multiple instances

Multiple instances

I've been programming for many years but still a little new to javascript and jquery.

I have a gallery plugin that I would like two instances of on the same page.  I understand the concept of creating a "new" instance of an object, but what I have is a little different.  I'll scale down the code, but if more is needed then I will provide.

Thanks

 class:
;(function($) {
var allImages = {};
var imageCounter = 0;

// Galleriffic static class
$.galleriffic = {
version: '2.0.1',
normalizeHash: function(hash) {
return hash.replace(/^.*#/, '').replace(/\?.*$/, '');
},
etc...


jquery:
// Initialize the antiques gallery
var varGalleryAntiques = $('#galleryAntiques').galleriffic({
delay:                     4500,
numThumbs:                 21,
preloadAhead:              10,
enableTopPager:            true,
etc...

I tried to modify the above to include "new" and instantiate two instances as follows...

// Initialize the antiques gallery
var varGalleryAntiques = new $('#galleryAntiques').galleriffic({
delay:                     4500,
numThumbs:                 21,
preloadAhead:              10,
enableTopPager:            true,
etc...

// Initialize the paintings gallery
var varGalleryPaintings = new $('#galleryPaintings').galleriffic({
delay:                     4500,
numThumbs:                 21,
preloadAhead:              10,
enableTopPager:            true,
etc...

but they were clashing.

Any help would be appreciated