$(function() {

	$('ul#serviceFunctions li.btnPrint a').click(function() {
		window.print();
		return false;
	});

	// handle click on search access-link
	jQuery('A[href=#searchForm]').click(function()
	{
		// take focus deferred, otherwise jumping to the hash will be last action
		window.setTimeout(function () { jQuery('#searchBox').focus(); }, 0);
	});

	var keyboardNavigationPrev = 37; // jquery keycode for prev action
	var keyboardNavigationNext = 39; // jquery keycode for next action

	jQuery(document).keydown(function (evt)
	{
		switch (evt.which)
		{
			case keyboardNavigationPrev:
				if (jQuery('#TB_prev').length > 0) jQuery('#TB_prev').click();
			break;
			case keyboardNavigationNext:
				if (jQuery('#TB_next').length > 0) jQuery('#TB_next').click();
			break;
		}
	});

});

