Event.observe(window, 'load', function() {
	new Application();
});

var Application = Class.create({
	initialize: function() {
		['food', 'sugar', 'hygiene'].each(function(type) {
			$$('.product_' + type).invoke('observe', 'mouseover', function(type) {
				var flashObj = $('flashObj');
				if (flashObj && flashObj.lightUp) {
					flashObj.lightUp(type);
				}
			}.bind(this, type));
		});

		if (/MSIE 6/.test(navigator.userAgent)) {
			try {
				document.execCommand('BackgroundImageCache', false, true);
			} catch (ex) {
			}
		}
	}
});
