/* == FUNCTION: EQUAL HEIGHT COLUMNS == */

function equalHeightColumns(selector)
{
	var max_height = 0;
	
	$(selector).each(function() {
		if ($(this).height() > max_height)
		{
			max_height = $(this).height();
		}
	});
	
	$(selector).each(function() {
		$(this).height(max_height);
		$("div#footer").css("zoom",1);
	});
}



/* == CLASS: PAGINATION == */

var Pagination = function()
{
	var current_page = 0;
	var total_pages = $("div#content div.page").length;
	var class_ref = this;
	
	this.init = function()
	{
		$("div#content div.page:gt(0)").hide();
		$("div#content").append("<p id=\"page_navigation\"><a href=\"#\" id=\"page_navigation_prev\">vorige pagina</a> | <a href=\"#\" id=\"page_navigation_next\">volgende pagina</a>");
		$("div#content p#page_navigation a#page_navigation_prev").click(function() {
			if (current_page == 0)
			{
				return false;
			}
			else
			{
				current_page--;
				$("div#content div.page:gt(" + current_page + ")").hide();
				$("div#content div.page:lt(" + current_page + ")").hide();
				$("div#content div.page:eq(" + current_page + ")").show();
				return false;
			}
		});
		$("div#content p#page_navigation a#page_navigation_next").click(function() {
			if (current_page == total_pages-1)
			{
				return false;
			}
			else
			{
				current_page++;
				$("div#content div.page:gt(" + current_page + ")").hide();
				$("div#content div.page:lt(" + current_page + ")").hide();
				$("div#content div.page:eq(" + current_page + ")").show();
				return false;
			}
		});
	}
}



/* == EVENTS == */

$(document).ready(function() {
	equalHeightColumns("div.program");
});