var productDetails = Class.create({

	varHandler: null,
	recommendationAccordion: null,
	imageCarousel: null,
	zoomImage: null,

	initialize: function() {
		var isProductSet = $('jsIsProductSet') != null;
		this.varHandler = !isProductSet ? new variationHandler(this.reloadCallback, this, 'availability') : new variationHandler(this.reloadCallback, this, "true");
	},
	
	reloadCallback: function(callbackContext, productID, masterProductID) {
		callbackContext.varHandler.reinit(productID, masterProductID);
		initComponents();
	}
});

if ('observe' in document) {
	document.observe('dom:loaded', function() {
		new productDetails();		
	});
}

