
window.addEvent('domready', function() {

	/*** MOST GALLERY ***/
    $$('div.MostGallery').each(function(elem){
    	elem.getElements('.thumbs img').each(function(thumb){
    		thumb.addEvent('mouseover',function() {
    			$(this).setStyle('cursor','pointer');
    			$(this).setStyle('border-style','inset');
    			$(this).getParent('div.MostGallery').getElement('.bigImg img').set('src',$(this).get('rel'));
    		});
    		thumb.addEvent('mouseout',function() {
    			$(this).setStyle('border-style','outset');
    		});
			 new Asset.image($(thumb).get('rel'));
    	});
    });
	
	/*** ImageToolTips ***/
	var t = new Tips('.tooltipImg');
	t.addEvent('show', function(tip){
		tip.fade('in');
	});
	t.addEvent('hide', function(tip){
		tip.fade('out');
	});
	$$('.tooltipImg').each(function(tip){
		var imgSrc = tip.retrieve('tip:text');
		var imgAlt = tip.retrieve('tip:title');
		tip.store('tip:text', new Element('img',{'src':imgSrc,'alt':imgAlt}));
		tip.addEvent('click', function(){
			return false;
		});
	});
	
});
