/**
 * @author Abdellah
 */
function abZoom(triggers, start, end, relative) {
	start = start || new Array();
	end = end || new Array();
	triggers = $$(triggers);
	startWidth = start[0] || 26;
	startHeight = start[1] || 26;
	endWidth = end[0] || 36;
	endHeight = end[1] || 36;
	relative = $(relative) || $('siteActions');

	abFx = new Array();
	abFxDelayed = new Array();
	abPosition = new Array();
	abTop = new Array();
	abLeft = new Array();

	triggers.each(function(trigger, i){
		abPosition[i] = trigger.getCoordinates(relative);
		abTop[i] = abPosition[i].top - (endHeight - startHeight) / 2;
		abLeft[i] = abPosition[i].left - (endWidth - startWidth) / 2;
		abFx[i] = new Fx.Morph(trigger, {duration: 100, link: 'cancel'});
		abFxDelayed[i] = function(){
			abFx[i].start({
				'width': startWidth,
				'height': startHeight,
				'top': abPosition[i].top,
				'left': abPosition[i].left
			})
		}
		trigger.addEvents({
			'mouseover': function(){
				abFx[i].start({
					'width': endWidth,
					'height': endHeight,
					'top': abTop[i],
					'left': abLeft[i]
				})
			},
			'mouseout': function(){
				abFxDelayed[i].delay(100)
			}
		})
	})
}

function abGoHome() {
	$('goHome').addEvents({
		'mouseenter': function(){
			$('goHome').set('style', 'border-bottom: 1px solid #dedc22;');
		},
		'mouseleave': function(){
			$('goHome').set('style', 'border: none;');
		}
	});
}