/**
 *
 * Copyright (c) 2007 Tom Deater (http://www.tomdeater.com)
 * Licensed under the MIT License:
 * http://www.opensource.org/licenses/mit-license.php
 * 
 */
 
//(function($) {
//	/**
//	 * equalizes the heights of all elements in a jQuery collection
//	 * thanks to John Resig for optimizing this!
//	 * usage: $("#col1, #col2, #col3").equalizeCols();
//	 */
//	 
//	$.fn.equalizeCols = function(){
//		var height = 0;
//  
//		return this
//			.css("height", "auto")
//			.each(function() {
//				height = Math.max(height, this.offsetHeight);
//			})
//			.css("height", height)
//			.each(function() {
//				var h = this.offsetHeight;
//				if (h > height) {
//					$(this).css("height", height - (h - height));
//				};
//			});
//			
//	};
//	
//})(jQuery);/**
// *
// * Copyright (c) 2007 Tom Deater (http://www.tomdeater.com)
// * Licensed under the MIT License:
// * http://www.opensource.org/licenses/mit-license.php
// * 
// */
// 
(function($) {
	/**
	 * equalizes the heights of all elements in a jQuery collection
	 * thanks to John Resig for optimizing this!
	 * usage: $("#col1, #col2, #col3").equalizeCols();
	 */
	 
	$.fn.equalizeCols = function(){
		var height = 0;
  
		return this
			.css("height", "auto")
			.each(function() {
				height = Math.max(height, this.offsetHeight);
				//alert(height);
				
			})
			.css("height", height)
			.each(function() {
				var h = this.offsetHeight;
				var _h = 0;
				if (h > height) {
					
					if (this.id == 'boxPageContent'){
						_h = height - (h - height) - 34;
					} else {
						_h = height - (h - height);
					}

					//alert(h);
					$(this).css("height", _h);
				};
			});
			
	};
	
 
})(jQuery);

