﻿
$(function () {
	equalHeight($("#content .equal-height"));
});	 



// FULL DIV LINK
(function ($) {
	$.fn.divLink = function () {
		return this.each(function (i) {
			$(this).click(function () { window.location = $(this).find("a").attr("href"); return false; });
			
		});
	};
})(jQuery);


// EQUAL HEIGHT
function equalHeight(group) {
	tallest = 0;
	group.each(function () {
		thisHeight = $(this).height();
		if (thisHeight > tallest) {
			tallest = thisHeight;
		}
	});
	group.each(function () {
		$(this).height(tallest);
	});
}


// VERTICALLY ALIGN FUNCTION
(function ($) {
	$.fn.vAlign = function () {
		return this.each(function (i) {
			var ah = $(this).height();
			var ph = $(this).parent().parent().height();
			var mh = (ph - ah) / 2;
			$(this).css('top', mh);
		});
	};
})(jQuery);


