/**
 * shop.colorbox.js
 * This is a wrapper to emulate the ghcolorbox used by the global header but allow the shop to use its own modal library
 */
(function (sjq, document, window) {
	colorbox = 'ghcolorbox',
	publicMethod = sjq.fn[colorbox] = sjq[colorbox] = function (options, callback) {
		return this;
	};
	publicMethod.init = function () {
		sjq("a.modalOverlay").unbind();
		sjq("a.modalOverlay").live("click",
			function(event){
				event.preventDefault();
				LEGO.modal.openModal(event, {name:LEGO.modal.legoId, href:event.target.href});
			}
		);
	};

	sjq(publicMethod.init);
}(jQuery, document, this));
