; /* IE */

(function () {
    var max = 0,
        panels,
        tpanels,
        spanels,
        fields,
        page,
        defMax = {"double": 390, "triple": 190},
        maxSum = 0,
        ie = /*@cc_on!@*/0;
        
        
    jQuery(document).ready(function () {
        panels = jQuery(".double .panel .inner");
        spanels = jQuery(".single .panel .inner");
        tpanels = jQuery(".triple .panel .inner");
        fields = jQuery("form.standard label input");
        page = jQuery("#page");
        
        panels.each(function () {
            var h = parseInt(jQuery(this).height(), 10);
            if(h > max) {
                max = h;
            }
        });
        
        if (max > 0) {
            panels.each(function () {
                if (parseInt(jQuery(this).height(), 10) < max) {
                    jQuery(this).height(max);
                }
            });
        }
        
        maxSum += max - defMax.double;
        max = 0;
        spanels.each(function () {
            var h = parseInt(jQuery(this).height(), 10);
            if(h > max) {
                max = h;
            }
        });
        
        if (max > 0) {
            spanels.each(function () {
                if (parseInt(jQuery(this).height(), 10) < max) {
                    jQuery(this).height(max);
                }
            });
        }
        
        max = 0;
        tpanels.each(function () {
            var h = parseInt(jQuery(this).height(), 10);
            if(h > max) {
                max = h;
            }
        });
        
        if (max > 0) {
            tpanels.each(function () {
                if (parseInt(jQuery(this).height(), 10) < max) {
                    jQuery(this).height(max);
                }
            });
        }
        maxSum += max - defMax.triple;
   
        fields.each(function () {
            jQuery(this).focus(function () {
                jQuery(this).css({zIndex: 105});
            });
            jQuery(this).blur(function () {
                if (jQuery(this).val().length > 0) {
                    v(this).css({zIndex: 105});
                } else {
                    jQuery(this).css({zIndex: 103});
                }
            });
            if (jQuery(this).val().length > 0) {
                jQuery(this).css({zIndex: 105});
            } 
        });
    });

}());