(function ($) {
	// VERTICALLY ALIGN FUNCTION
	$.fn.vAlign = function() {
		return this.each(function(i){
			var ah = $(this).height();
			var ph = $(this).parent().height();
			var mh = ( (ph - ah ) / 2 ) - 15;
			
			if ( ah < ph ) {
				$(this).css('margin-top', mh);
			}
		});
	};
	
	$.fn.setContainerHeight = function() {
		return this.each(function(i){
			var oh = $('.imagearea').height();
			var ih = $(this).height();
			
			if ( oh>ih ) {
				$(this).css('height', oh);
			}
		});
	};

})(jQuery);

