
<patTemplate:tmpl name="pageoutput">
	<script type="text/javascript">
		<!--
		jomresJquery(document).ready(function () {

			(function () {
				//settings
				var fadeSpeed = 200, fadeTo = 0.3, topDistance = 30;
				var topbarME = function () {
					jomresJquery('#jomres_menu').fadeTo(fadeSpeed, 1);
				}, topbarML = function () {
					jomresJquery('#jomres_menu').fadeTo(fadeSpeed, fadeTo);
				};
				var inside = false;
				//do
				jomresJquery(window).scroll(function () {
					position = jomresJquery(window).scrollTop();
					if (position > topDistance && !inside) {
						//add events
						topbarML();
						jomresJquery('#jomres_menu').bind('mouseenter', topbarME);
						jomresJquery('#jomres_menu').bind('mouseleave', topbarML);
						inside = true;
					}
					else if (position < topDistance) {
						topbarME();
						jomresJquery('#jomres_menu').unbind('mouseenter', topbarME);
						jomresJquery('#jomres_menu').unbind('mouseleave', topbarML);
						inside = false;
					}
				});
			})();

		});

		var cookieName = 'stickyAccordion';

		jomresJquery(function () {
			jomresJquery("#jomres_menu_accordion").accordion({
				autoHeight: true,
				navigation: true,
				collapsible: true,
				fillSpace: true,
				//event: "mouseover",
				active: ( jomresJquery.cookies.get(cookieName) || 0 ),
				change: function (e, ui) {
					jomresJquery.cookies.set(cookieName, jomresJquery(this).find('h3').index(ui.newHeader[0]));
				}
			});

			//jomresJquery("#jomres_menu_wrapper").slideToggle();

			jomresJquery("#jomres_menu_trigger").click(function () {
				jomresJquery("#jomres_menu_wrapper").slideToggle();
			});
		});

		function runEffect() {
			var body = jomresJquery(this).parent().children("div.jomres_menu");
			//slide the panel
			if (body.is(":hidden"))
				body.slideDown();
			else
				body.slideUp();
		}
		;
		//-->
	</script>

	<style>
		#jomres_menu {
			/*font-size:.9em;*/
		}

		#jomres_menu_trigger {
			position: fixed;
			top: 0px;
			left: 0px;
		}

		#jomres_menu_wrapper {
			position: fixed;
			top: 26px;
			left: 0px;
			width: 200px;
		}

		.menu_jomres_horiz h3 {
			margin: 0 0 0 0px !important;
		}

		.menu_jomres_horiz ul {
			margin: 0 0 0 0px !important;
		}


	</style>
	<div id="jomres_menu">
		<div id="jomres_menu_wrapper" class="ui-helper-clearfix ui-helper-hidden menu_jomres_horiz">
			<div id="jomres_menu_accordion" style="height:400px">
				<patTemplate:tmpl name="button_output">
					{DIV}
				</patTemplate:tmpl>
			</div>
		</div>
		<div id="jomres_menu_trigger" class="ui-widget-content ui-helper-jomres-buttons">
			<a href="javascript:void(0);" style="width:174px;" class="fg-button ui-state-default ui-corner-all">{_JOMRES_CONTROLPANEL}</a>
		</div>
	</div>
</patTemplate:tmpl>