function getBroVol() { var myWidth = 0, myHeight = 0, _vol = {}; if (document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight)) { myWidth = document.documentElement.clientWidth; myHeight = document.documentElement.clientHeight; } else if (document.body && (document.body.clientWidth || document.body.clientHeight)) { //IE9 myWidth = document.body.clientWidth; myHeight = document.body.clientHeight; } else if (document.body && document.body.offsetWidth) { myWidth = document.body.offsetWidth; myHeight = document.body.offsetHeight; } else if (document.compatMode == 'CSS1Compat' && document.documentElement && document.documentElement.offsetWidth) { myWidth = document.documentElement.offsetWidth; myHeight = document.documentElement.offsetHeight; } this.h = myHeight; this.w = myWidth; return; } function broW() { return new getBroVol().w; } (function ($) { $.fn.setEqH = function (options) { var settings = { parent: 0, oh: 0 }, temp = 0; options = $.extend(settings, options); this.each(function (index, el) { var $element = $(this); if (temp < $(this)[(options.oh == 1) ? 'outerHeight' : 'height']()) temp = $(this)[(options.oh == 1) ? 'outerHeight' : 'height']() }); return (options.parent == 1) ? this.parent().css('height', temp) : this.css('height', temp); }; })(jQuery);