	
	jQuery.fn.fadingAction = function(from, to, duration) 
	{
		obj = $(this);
		obj.fadeTo(0, from);
		obj.stop().delay(1000).fadeTo(duration, to);
	}
	
	jQuery.fn.verticalAlign = function(source, heightNum) 
	{
		heightNum = heightNum || $(this).height();
		obj1  = heightNum;
		obj2  = $(source).height();
		
		outer = Math.round(obj1 / 2);
		inner = Math.round(obj2 / 2);
		pos   = (outer - inner);
		
		$(source).css("top", "" + pos + "px");
	}
	
	jQuery.fn.hoverFX = function(opacity, duration) 
	{
		obj      = $(this);
		opacity  = opacity || .8;
		duration = duration || 250;
		
		obj.fadeTo(duration, opacity);
		
		obj.hover(
			function(){ $(this).fadeTo(duration, 1); }, 
			function(){ $(this).fadeTo(duration, opacity); }
		);
	}
	
	
	jQuery.fn.maxHeight = function(height) 
	{
		objHeight     = $(this)
		defaultHeight = objHeight.height();
		maxHeight     = $(height).height();
		
		if (objHeight.height() != maxHeight && objHeight.height() <= maxHeight) 
		{
			objHeight.css("height", maxHeight + "px");
		}
		else 
		{
			objHeight.css("height", defaultHeight + "px");
		}
	}
	
	
	jQuery.fn.navHoverFX = function(num, duration) 
	{
		obj      = $(this);
		posX     = obj.position();
		num      = num || 5;
		duration = duration || 250;
		
		obj.wrapInner('<span />');
		
		obj.hover(
			function(){ $(this).find('span').stop().animate({marginLeft: '' + (posX.left + num) + 'px'}, duration); }, 
			function(){ $(this).find('span').stop().animate({marginLeft: posX.left + 'px'}, duration); }
		);
	}
	
	
	jQuery.fn.allMaxHeight = function() 
	{
		obj       = $(this);
		maxHeight = new Array();
		arrayMax  = function( array ) { return Math.max.apply( Math, array ); };
		$(obj).each(function(){ height = $(this).find('h1').height(); maxHeight.push(height); });
		$(obj).each(function(){ height = arrayMax(maxHeight); $(this).css('height', '' + height + 'px'); });
		$(obj).each(function(){ parent = $(this); child = parent.find('h1'); $(parent).verticalAlign(child); });
	}
	
	jQuery.fn.lrgBoxHeight = function() 
	{
		obj       = $(this);
		maxHeight = new Array();
		arrayMax  = function( array ) { return Math.max.apply( Math, array ); };
		$(obj).each(function(){ height = $(this).height(); maxHeight.push(height); });
		$(obj).each(function(){ height = arrayMax(maxHeight); $(this).css('height', '' + height + 'px'); });
	}
	
	
