/*
	Used to ensure that the product boxes that are placed in the same row have the same height	
	Note: Please make sure that jquery was loaded before this script
*/
jQuery(document).ready(function($){
    var maxHeight = 0;

	if($('.az_product_wrapper', '.list').length > 0) {
		var optHeight = $('.az_product_options_box').outerHeight();
		
		$('tr', '.list').each(function(){
			maxHeight = 0;
			jQuery('.az_product_wrapper', $(this)).each(function(){
				if(jQuery(this).outerHeight() > maxHeight)
					maxHeight = jQuery(this).outerHeight();
			});
			jQuery('.az_product_wrapper', $(this)).height(maxHeight+optHeight);
		});
		
	} else {
		
		jQuery('.az_product_wrapper').each(function(){
			if(jQuery(this).innerHeight() > maxHeight)
				maxHeight = jQuery(this).innerHeight();        
		});  
		
		jQuery('.az_product_wrapper').each(function(){        
			jQuery(this).height(maxHeight + 63);         
		});
	}
});
