﻿/*

File:		eqtr_functions.css
Created:	08/09/2010
Author:		Sean @ Equator	

Notes:

*/



$(function() {
    $(window).load(function() {
        
        if ($(".homepage").length) {
            
            var mainContentHeight = $(".homepage .mainContent").height();
            var subContentHeight = $(".homepage .installationServicesContainer").height();

            equalHeight($(".homepage .shieldProduct"));

            /*if(mainContentHeight > subContentHeight) {
            //subContentHeight = mainContentHeight + "px";
            alert("mainContent"+ mainContentHeight + ", " +subContentHeight);
            }
            if(subContentHeight > mainContentHeight) {
            mainContentHeight = subContentHeight + "px";
            alert("subContent"+ subContentHeight + ", " +mainContentHeight);
            }*/
        }
        else {
            equalHeight($(".installationServices .contentArea,.maintenanceAndProtection .productSummary"));
        }
    }
    );
});

function equalHeight(group) {
    var tallest = 0;
    group.each(function () {

            var thisHeight = $(this).height();
            if (thisHeight > tallest) {
                tallest = thisHeight;
            }
    });
    group.height(tallest);

}
