//<!--Tabs-->
                    // config
                    var tabClass = 'tab-modul';
                    var tabHeadlineTag = 'h1';

                    function showTab(sId) {
                        $('.' + tabClass + ' #tabs').children('div').each(
                            function () {
                                var tabId = $(this).attr('id');
                                if (tabId == sId) {
                                    $(this).show();
                                    if (!$('#tablink_' + tabId).parent().hasClass('selected')) {
                                        $('#tablink_' + tabId).parent().addClass('selected');
                                    }
                                } else {
                                    $(this).hide();
                                    if ($('#tablink_' + tabId).parent().hasClass('selected')) {
                                        $('#tablink_' + tabId).parent().removeClass('selected');
                                    }
                                }
                            }
                        );
                    }

                    function getId(oElement) {

                        if ($(oElement).attr('id')) {
                            return $(oElement).attr('id');
                        }
                        return getId($(oElement).parent().get(0));
                    }

                    $(document).ready(
                        function () {
                            var oNav = $('.' + tabClass).find('#navigation');
                            var firstTabId = null;
                            $('.' + tabClass + ' #tabs').children('div').each(
                                function () {
                                    var header = $(this).find(tabHeadlineTag);
                                    header.hide();
                                    var tabId = getId(this);
                                    oNav.append('<li><a id="tablink_'+tabId+'" href="#">'+header.html()+'</a></li>');
                                    if (!firstTabId) {
                                        firstTabId = tabId;
                                    }

                                    $('#tablink_' + tabId).click(
                                            function () {
                                                showTab(tabId);
                                                return false;
                                            }
                                    );
                                }
                            )
                            oNav.append('<div class="clear"></div>');
                            oNav.show();
                            showTab(firstTabId);
                        }
                    )



//<!--Kontaktformular-->

	function openmail(user,host) {
		locationstring = "mailto:" + user + "@" + host;
		window.location = locationstring;
	}

//<!-- Template Recaptcha -->
 var RecaptchaOptions = {
	theme : 'clean'
 };

//<!-- Klickbarer Bereich Sidebar-Elemente -->

			$(document).ready(
				function () {
					$('#sidebar li.sidebar-item').each(
						function () {
							$(this).css('cursor', 'pointer').click(
								function () {
									document.location.href='/'+$(this).find('a:first').attr('href');
								}
							);
						}
					);
				}
			);


// Quicklinks
$(document).ready(
	function () {
		$('.quicklink h2').each(
			function () {
				$(this).parents('.quicklink').find('img,p').css('cursor', 'pointer').click(
					function () {
						document.location.href='/'+$(this).parent().find('a:eq(1)').attr('href');
					}
				);
			}
		);
	}
);

